BokaMera.API.Host

<back to all web services

AddPaymentSettings

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
POST/payment/settingsAdd payment settingsAdd payment settings for the logged in company
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos

Namespace Global

    Namespace BokaMera.API.ServiceModel.Dtos

        <ValidateRequest(Validator:="IsAuthenticated")>
        Public Partial Class AddPaymentSettings
            Implements ICompany
            '''<Summary>
            '''The company id, if empty will use the company id for the user you are logged in with.
            '''</Summary>
            <ApiMember(Description:="The company id, if empty will use the company id for the user you are logged in with.")>
            Public Overridable Property CompanyId As Nullable(Of Guid)

            '''<Summary>
            '''The payson payment is enabled
            '''</Summary>
            <ApiMember(Description:="The payson payment is enabled")>
            Public Overridable Property Enabled As Boolean

            '''<Summary>
            '''If there should be any fee added when customer selected invoice payment method
            '''</Summary>
            <ApiMember(Description:="If there should be any fee added when customer selected invoice payment method")>
            Public Overridable Property InvoiceFee As Integer

            '''<Summary>
            '''If allow credit card payment
            '''</Summary>
            <ApiMember(Description:="If allow credit card payment")>
            Public Overridable Property AllowCreditCardPayment As Boolean

            '''<Summary>
            '''If allow invoice payment
            '''</Summary>
            <ApiMember(Description:="If allow invoice payment")>
            Public Overridable Property AllowInvoicePayment As Boolean

            '''<Summary>
            '''If allow bank payment
            '''</Summary>
            <ApiMember(Description:="If allow bank payment")>
            Public Overridable Property AllowBankPayment As Boolean

            '''<Summary>
            '''Automatically refund customer on canceled booking
            '''</Summary>
            <ApiMember(Description:="Automatically refund customer on canceled booking")>
            Public Overridable Property RefundOnCancelBooking As Boolean

            '''<Summary>
            '''The default option when admin creates a new booking
            '''</Summary>
            <ApiMember(Description:="The default option when admin creates a new booking")>
            Public Overridable Property DefaultAdminPaymentOptionsId As Nullable(Of Integer)

            '''<Summary>
            '''What payment provider to use
            '''</Summary>
            <ApiMember(Description:="What payment provider to use")>
            Public Overridable Property PaymentProviderId As Integer
        End Class

        Public Partial Class AdminPaymentOptionsResponse
            '''<Summary>
            '''The payment options id
            '''</Summary>
            <ApiMember(Description:="The payment options id")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The payment options name
            '''</Summary>
            <ApiMember(Description:="The payment options name")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The payment options description
            '''</Summary>
            <ApiMember(Description:="The payment options description")>
            Public Overridable Property Description As String
        End Class

        Public Partial Class PaymentProviderOptionsResponse
            '''<Summary>
            '''The payment provider id
            '''</Summary>
            <ApiMember(Description:="The payment provider id")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The payment provider name
            '''</Summary>
            <ApiMember(Description:="The payment provider name")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The payment provider description
            '''</Summary>
            <ApiMember(Description:="The payment provider description")>
            Public Overridable Property Description As String
        End Class

        Public Partial Class PaymentSettingsQueryResponse
            Public Sub New()
                AdminPaymentOptions = New List(Of AdminPaymentOptionsResponse)
                PaymentProviderOptions = New List(Of PaymentProviderOptionsResponse)
            End Sub

            '''<Summary>
            '''The company id
            '''</Summary>
            <ApiMember(Description:="The company id")>
            Public Overridable Property CompanyId As Guid

            '''<Summary>
            '''The payment is enabled
            '''</Summary>
            <ApiMember(Description:="The payment is enabled")>
            Public Overridable Property Enabled As Boolean

            '''<Summary>
            '''If there should be any fee added when customer selected invoice payment method
            '''</Summary>
            <ApiMember(Description:="If there should be any fee added when customer selected invoice payment method")>
            Public Overridable Property InvoiceFee As Integer

            '''<Summary>
            '''If allow credit card payment
            '''</Summary>
            <ApiMember(Description:="If allow credit card payment")>
            Public Overridable Property AllowCreditCardPayment As Boolean

            '''<Summary>
            '''If allow invoice payment
            '''</Summary>
            <ApiMember(Description:="If allow invoice payment")>
            Public Overridable Property AllowInvoicePayment As Boolean

            '''<Summary>
            '''If allow bank payment
            '''</Summary>
            <ApiMember(Description:="If allow bank payment")>
            Public Overridable Property AllowBankPayment As Boolean

            '''<Summary>
            '''Automatically refund customer on canceled booking
            '''</Summary>
            <ApiMember(Description:="Automatically refund customer on canceled booking")>
            Public Overridable Property RefundOnCancelBooking As Boolean

            '''<Summary>
            '''The default option when admin creates a new booking
            '''</Summary>
            <ApiMember(Description:="The default option when admin creates a new booking")>
            Public Overridable Property DefaultPaymentOptionId As Nullable(Of Integer)

            '''<Summary>
            '''What payment provider to use
            '''</Summary>
            <ApiMember(Description:="What payment provider to use")>
            Public Overridable Property PaymentProviderId As Integer

            '''<Summary>
            '''If you want to include the admin payment options to select from
            '''</Summary>
            <ApiMember(DataType:="boolean", Description:="If you want to include the admin payment options to select from", ParameterType:="query")>
            Public Overridable Property AdminPaymentOptions As List(Of AdminPaymentOptionsResponse)

            '''<Summary>
            '''If you want to include the payment provider options to select from
            '''</Summary>
            <ApiMember(DataType:="boolean", Description:="If you want to include the payment provider options to select from", ParameterType:="query")>
            Public Overridable Property PaymentProviderOptions As List(Of PaymentProviderOptionsResponse)

            '''<Summary>
            '''SendPaymentRequestDirectly
            '''</Summary>
            <ApiMember(Description:="SendPaymentRequestDirectly")>
            Public Overridable Property SendPaymentRequestDirectly As Boolean
        End Class
    End Namespace
End Namespace

VB.NET AddPaymentSettings DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /payment/settings HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AddPaymentSettings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <AllowBankPayment>false</AllowBankPayment>
  <AllowCreditCardPayment>false</AllowCreditCardPayment>
  <AllowInvoicePayment>false</AllowInvoicePayment>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <DefaultAdminPaymentOptionsId>0</DefaultAdminPaymentOptionsId>
  <Enabled>false</Enabled>
  <InvoiceFee>0</InvoiceFee>
  <PaymentProviderId>0</PaymentProviderId>
  <RefundOnCancelBooking>false</RefundOnCancelBooking>
</AddPaymentSettings>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PaymentSettingsQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <AdminPaymentOptions>
    <AdminPaymentOptionsResponse>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </AdminPaymentOptionsResponse>
  </AdminPaymentOptions>
  <AllowBankPayment>false</AllowBankPayment>
  <AllowCreditCardPayment>false</AllowCreditCardPayment>
  <AllowInvoicePayment>false</AllowInvoicePayment>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <DefaultPaymentOptionId>0</DefaultPaymentOptionId>
  <Enabled>false</Enabled>
  <InvoiceFee>0</InvoiceFee>
  <PaymentProviderId>0</PaymentProviderId>
  <PaymentProviderOptions>
    <PaymentProviderOptionsResponse>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </PaymentProviderOptionsResponse>
  </PaymentProviderOptions>
  <RefundOnCancelBooking>false</RefundOnCancelBooking>
  <SendPaymentRequestDirectly>false</SendPaymentRequestDirectly>
</PaymentSettingsQueryResponse>