BokaMera.API.Host

<back to all web services

UpdatePaymentSettings

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/payment/settings/Update payment settingsUpdate 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 UpdatePaymentSettings() = 
        ///<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 payment is enabled
        ///</summary>
        [<ApiMember(Description="The payment is enabled")>]
        member val Enabled:Nullable<Boolean> = new Nullable<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:Nullable<Int32> = new Nullable<Int32>() with get,set

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

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

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

        ///<summary>
        ///Automatically refund customer on canceled booking
        ///</summary>
        [<ApiMember(Description="Automatically refund customer on canceled booking")>]
        member val RefundOnCancelBooking:Nullable<Boolean> = new Nullable<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:Nullable<Int32> = new Nullable<Int32>() with get,set

F# UpdatePaymentSettings DTOs

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

HTTP + CSV

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

PUT /payment/settings/ HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","Enabled":false,"InvoiceFee":0,"AllowCreditCardPayment":false,"AllowInvoicePayment":false,"AllowBankPayment":false,"RefundOnCancelBooking":false,"DefaultPaymentOptionId":0,"PaymentProviderId":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Enabled":false,"InvoiceFee":0,"AllowCreditCardPayment":false,"AllowInvoicePayment":false,"AllowBankPayment":false,"RefundOnCancelBooking":false,"DefaultPaymentOptionId":0,"PaymentProviderId":0,"AdminPaymentOptions":[{"Id":0,"Name":"String","Description":"String"}],"PaymentProviderOptions":[{"Id":0,"Name":"String","Description":"String"}],"SendPaymentRequestDirectly":false}