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
namespace BokaMera.API.ServiceModel.Dtos

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type AdminPaymentOptionsResponse() = 
        ///<summary>
        ///The payment options id
        ///</summary>
        [<ApiMember(Description="The payment options id")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///The payment options name
        ///</summary>
        [<ApiMember(Description="The payment options name")>]
        member val Name:String = null with get,set

        ///<summary>
        ///The payment options description
        ///</summary>
        [<ApiMember(Description="The payment options description")>]
        member val Description:String = null with get,set

    [<AllowNullLiteral>]
    type PaymentProviderOptionsResponse() = 
        ///<summary>
        ///The payment provider id
        ///</summary>
        [<ApiMember(Description="The payment provider id")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///The payment provider name
        ///</summary>
        [<ApiMember(Description="The payment provider name")>]
        member val Name:String = null with get,set

        ///<summary>
        ///The payment provider description
        ///</summary>
        [<ApiMember(Description="The payment provider description")>]
        member val Description:String = null with get,set

    [<AllowNullLiteral>]
    type PaymentSettingsQueryResponse() = 
        ///<summary>
        ///The company id
        ///</summary>
        [<ApiMember(Description="The company id")>]
        member val CompanyId:Guid = new Guid() with get,set

        ///<summary>
        ///The payment is enabled
        ///</summary>
        [<ApiMember(Description="The payment is enabled")>]
        member val Enabled:Boolean = new Boolean() with get,set

        ///<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")>]
        member val InvoiceFee:Int32 = new Int32() with get,set

        ///<summary>
        ///If allow credit card payment
        ///</summary>
        [<ApiMember(Description="If allow credit card payment")>]
        member val AllowCreditCardPayment:Boolean = new Boolean() with get,set

        ///<summary>
        ///If allow invoice payment
        ///</summary>
        [<ApiMember(Description="If allow invoice payment")>]
        member val AllowInvoicePayment:Boolean = new Boolean() with get,set

        ///<summary>
        ///If allow bank payment
        ///</summary>
        [<ApiMember(Description="If allow bank payment")>]
        member val AllowBankPayment:Boolean = new Boolean() with get,set

        ///<summary>
        ///Automatically refund customer on canceled booking
        ///</summary>
        [<ApiMember(Description="Automatically refund customer on canceled booking")>]
        member val RefundOnCancelBooking:Boolean = new Boolean() with get,set

        ///<summary>
        ///The default option when admin creates a new booking
        ///</summary>
        [<ApiMember(Description="The default option when admin creates a new booking")>]
        member val DefaultPaymentOptionId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///What payment provider to use
        ///</summary>
        [<ApiMember(Description="What payment provider to use")>]
        member val PaymentProviderId:Int32 = new Int32() with get,set

        ///<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")>]
        member val AdminPaymentOptions:ResizeArray<AdminPaymentOptionsResponse> = new ResizeArray<AdminPaymentOptionsResponse>() with get,set

        ///<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")>]
        member val PaymentProviderOptions:ResizeArray<PaymentProviderOptionsResponse> = new ResizeArray<PaymentProviderOptionsResponse>() with get,set

        ///<summary>
        ///SendPaymentRequestDirectly
        ///</summary>
        [<ApiMember(Description="SendPaymentRequestDirectly")>]
        member val SendPaymentRequestDirectly:Boolean = new Boolean() with get,set

    [<ValidateRequest(Validator="IsAuthenticated")>]
    [<AllowNullLiteral>]
    type AddPaymentSettings() = 
        ///<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.")>]
        member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set

        ///<summary>
        ///The payson payment is enabled
        ///</summary>
        [<ApiMember(Description="The payson payment is enabled")>]
        member val Enabled:Boolean = new Boolean() with get,set

        ///<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")>]
        member val InvoiceFee:Int32 = new Int32() with get,set

        ///<summary>
        ///If allow credit card payment
        ///</summary>
        [<ApiMember(Description="If allow credit card payment")>]
        member val AllowCreditCardPayment:Boolean = new Boolean() with get,set

        ///<summary>
        ///If allow invoice payment
        ///</summary>
        [<ApiMember(Description="If allow invoice payment")>]
        member val AllowInvoicePayment:Boolean = new Boolean() with get,set

        ///<summary>
        ///If allow bank payment
        ///</summary>
        [<ApiMember(Description="If allow bank payment")>]
        member val AllowBankPayment:Boolean = new Boolean() with get,set

        ///<summary>
        ///Automatically refund customer on canceled booking
        ///</summary>
        [<ApiMember(Description="Automatically refund customer on canceled booking")>]
        member val RefundOnCancelBooking:Boolean = new Boolean() with get,set

        ///<summary>
        ///The default option when admin creates a new booking
        ///</summary>
        [<ApiMember(Description="The default option when admin creates a new booking")>]
        member val DefaultAdminPaymentOptionsId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///What payment provider to use
        ///</summary>
        [<ApiMember(Description="What payment provider to use")>]
        member val PaymentProviderId:Int32 = new Int32() with get,set

F# 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>