BokaMera.API.Host

<back to all web services

PaymentSettingsQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, bookingsupplier-administrator-read, superadmin
The following routes are available for this service:
GET/payment/settingsGet payment settingsGet payment settings for the logged in company
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


@ValidateRequest(Validator="IsAuthenticated")
open class PaymentSettingsQuery : ICompany
{
    /**
    * The company id, if empty will use the company id for the user you are logged in with.
    */
    @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
    override var CompanyId:UUID? = null

    /**
    * If you want to include the admin payment options to select from
    */
    @ApiMember(DataType="boolean", Description="If you want to include the admin payment options to select from")
    open var IncludeAdminPaymentOptions:Boolean? = null

    /**
    * If you want to include the payment provider options to select from
    */
    @ApiMember(DataType="boolean", Description="If you want to include the payment provider options to select from")
    open var IncludePaymentProviderOptions:Boolean? = null
}

open class PaymentSettingsQueryResponse
{
    /**
    * The company id
    */
    @ApiMember(Description="The company id")
    open var CompanyId:UUID? = null

    /**
    * The payment is enabled
    */
    @ApiMember(Description="The payment is enabled")
    open var Enabled:Boolean? = null

    /**
    * Automatically refund customer on canceled booking
    */
    @ApiMember(Description="Automatically refund customer on canceled booking")
    open var RefundOnCancelBooking:Boolean? = null

    /**
    * The default option when admin creates a new booking
    */
    @ApiMember(Description="The default option when admin creates a new booking")
    open var DefaultPaymentOptionId:Int? = null

    /**
    * What payment provider to use
    */
    @ApiMember(Description="What payment provider to use")
    open var PaymentProviderId:Int? = null

    /**
    * If you want to include the admin payment options to select from
    */
    @ApiMember(DataType="boolean", Description="If you want to include the admin payment options to select from", ParameterType="query")
    open var AdminPaymentOptions:ArrayList<AdminPaymentOptionsResponse> = ArrayList<AdminPaymentOptionsResponse>()

    /**
    * If you want to include the payment provider options to select from
    */
    @ApiMember(DataType="boolean", Description="If you want to include the payment provider options to select from", ParameterType="query")
    open var PaymentProviderOptions:ArrayList<PaymentProviderOptionsResponse> = ArrayList<PaymentProviderOptionsResponse>()
}

open class AdminPaymentOptionsResponse
{
    /**
    * The payment options id
    */
    @ApiMember(Description="The payment options id")
    open var Id:Int? = null

    /**
    * The payment options name
    */
    @ApiMember(Description="The payment options name")
    open var Name:String? = null

    /**
    * The payment options description
    */
    @ApiMember(Description="The payment options description")
    open var Description:String? = null
}

open class PaymentProviderOptionsResponse
{
    /**
    * The payment provider id
    */
    @ApiMember(Description="The payment provider id")
    open var Id:Int? = null

    /**
    * The payment provider name
    */
    @ApiMember(Description="The payment provider name")
    open var Name:String? = null

    /**
    * The payment provider description
    */
    @ApiMember(Description="The payment provider description")
    open var Description:String? = null
}

Kotlin PaymentSettingsQuery 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.

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

{"Enabled":false,"RefundOnCancelBooking":false,"DefaultPaymentOptionId":0,"PaymentProviderId":0,"AdminPaymentOptions":[{"Id":0,"Name":"String","Description":"String"}],"PaymentProviderOptions":[{"Id":0,"Name":"String","Description":"String"}]}