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
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    @ValidateRequest(Validator="IsAuthenticated")
    public static class UpdatePaymentSettings implements 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.")
        public UUID CompanyId = null;

        /**
        * The payment is enabled
        */
        @ApiMember(Description="The payment is enabled")
        public Boolean Enabled = null;

        /**
        * If there should be any fee added when customer selected invoice payment method
        */
        @ApiMember(Description="If there should be any fee added when customer selected invoice payment method")
        public Integer InvoiceFee = null;

        /**
        * If allow credit card payment
        */
        @ApiMember(Description="If allow credit card payment")
        public Boolean AllowCreditCardPayment = null;

        /**
        * If allow invoice payment
        */
        @ApiMember(Description="If allow invoice payment")
        public Boolean AllowInvoicePayment = null;

        /**
        * If allow bank payment
        */
        @ApiMember(Description="If allow bank payment")
        public Boolean AllowBankPayment = null;

        /**
        * Automatically refund customer on canceled booking
        */
        @ApiMember(Description="Automatically refund customer on canceled booking")
        public Boolean RefundOnCancelBooking = null;

        /**
        * The default option when admin creates a new booking
        */
        @ApiMember(Description="The default option when admin creates a new booking")
        public Integer DefaultPaymentOptionId = null;

        /**
        * What payment provider to use
        */
        @ApiMember(Description="What payment provider to use")
        public Integer PaymentProviderId = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public UpdatePaymentSettings setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Boolean isEnabled() { return Enabled; }
        public UpdatePaymentSettings setEnabled(Boolean value) { this.Enabled = value; return this; }
        public Integer getInvoiceFee() { return InvoiceFee; }
        public UpdatePaymentSettings setInvoiceFee(Integer value) { this.InvoiceFee = value; return this; }
        public Boolean isAllowCreditCardPayment() { return AllowCreditCardPayment; }
        public UpdatePaymentSettings setAllowCreditCardPayment(Boolean value) { this.AllowCreditCardPayment = value; return this; }
        public Boolean isAllowInvoicePayment() { return AllowInvoicePayment; }
        public UpdatePaymentSettings setAllowInvoicePayment(Boolean value) { this.AllowInvoicePayment = value; return this; }
        public Boolean isAllowBankPayment() { return AllowBankPayment; }
        public UpdatePaymentSettings setAllowBankPayment(Boolean value) { this.AllowBankPayment = value; return this; }
        public Boolean isRefundOnCancelBooking() { return RefundOnCancelBooking; }
        public UpdatePaymentSettings setRefundOnCancelBooking(Boolean value) { this.RefundOnCancelBooking = value; return this; }
        public Integer getDefaultPaymentOptionId() { return DefaultPaymentOptionId; }
        public UpdatePaymentSettings setDefaultPaymentOptionId(Integer value) { this.DefaultPaymentOptionId = value; return this; }
        public Integer getPaymentProviderId() { return PaymentProviderId; }
        public UpdatePaymentSettings setPaymentProviderId(Integer value) { this.PaymentProviderId = value; return this; }
    }

    public static class PaymentSettingsQueryResponse
    {
        /**
        * The company id
        */
        @ApiMember(Description="The company id")
        public UUID CompanyId = null;

        /**
        * The payment is enabled
        */
        @ApiMember(Description="The payment is enabled")
        public Boolean Enabled = null;

        /**
        * If there should be any fee added when customer selected invoice payment method
        */
        @ApiMember(Description="If there should be any fee added when customer selected invoice payment method")
        public Integer InvoiceFee = null;

        /**
        * If allow credit card payment
        */
        @ApiMember(Description="If allow credit card payment")
        public Boolean AllowCreditCardPayment = null;

        /**
        * If allow invoice payment
        */
        @ApiMember(Description="If allow invoice payment")
        public Boolean AllowInvoicePayment = null;

        /**
        * If allow bank payment
        */
        @ApiMember(Description="If allow bank payment")
        public Boolean AllowBankPayment = null;

        /**
        * Automatically refund customer on canceled booking
        */
        @ApiMember(Description="Automatically refund customer on canceled booking")
        public Boolean RefundOnCancelBooking = null;

        /**
        * The default option when admin creates a new booking
        */
        @ApiMember(Description="The default option when admin creates a new booking")
        public Integer DefaultPaymentOptionId = null;

        /**
        * What payment provider to use
        */
        @ApiMember(Description="What payment provider to use")
        public Integer PaymentProviderId = 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")
        public ArrayList<AdminPaymentOptionsResponse> AdminPaymentOptions = 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", ParameterType="query")
        public ArrayList<PaymentProviderOptionsResponse> PaymentProviderOptions = null;

        /**
        * SendPaymentRequestDirectly
        */
        @ApiMember(Description="SendPaymentRequestDirectly")
        public Boolean SendPaymentRequestDirectly = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public PaymentSettingsQueryResponse setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Boolean isEnabled() { return Enabled; }
        public PaymentSettingsQueryResponse setEnabled(Boolean value) { this.Enabled = value; return this; }
        public Integer getInvoiceFee() { return InvoiceFee; }
        public PaymentSettingsQueryResponse setInvoiceFee(Integer value) { this.InvoiceFee = value; return this; }
        public Boolean isAllowCreditCardPayment() { return AllowCreditCardPayment; }
        public PaymentSettingsQueryResponse setAllowCreditCardPayment(Boolean value) { this.AllowCreditCardPayment = value; return this; }
        public Boolean isAllowInvoicePayment() { return AllowInvoicePayment; }
        public PaymentSettingsQueryResponse setAllowInvoicePayment(Boolean value) { this.AllowInvoicePayment = value; return this; }
        public Boolean isAllowBankPayment() { return AllowBankPayment; }
        public PaymentSettingsQueryResponse setAllowBankPayment(Boolean value) { this.AllowBankPayment = value; return this; }
        public Boolean isRefundOnCancelBooking() { return RefundOnCancelBooking; }
        public PaymentSettingsQueryResponse setRefundOnCancelBooking(Boolean value) { this.RefundOnCancelBooking = value; return this; }
        public Integer getDefaultPaymentOptionId() { return DefaultPaymentOptionId; }
        public PaymentSettingsQueryResponse setDefaultPaymentOptionId(Integer value) { this.DefaultPaymentOptionId = value; return this; }
        public Integer getPaymentProviderId() { return PaymentProviderId; }
        public PaymentSettingsQueryResponse setPaymentProviderId(Integer value) { this.PaymentProviderId = value; return this; }
        public ArrayList<AdminPaymentOptionsResponse> getAdminPaymentOptions() { return AdminPaymentOptions; }
        public PaymentSettingsQueryResponse setAdminPaymentOptions(ArrayList<AdminPaymentOptionsResponse> value) { this.AdminPaymentOptions = value; return this; }
        public ArrayList<PaymentProviderOptionsResponse> getPaymentProviderOptions() { return PaymentProviderOptions; }
        public PaymentSettingsQueryResponse setPaymentProviderOptions(ArrayList<PaymentProviderOptionsResponse> value) { this.PaymentProviderOptions = value; return this; }
        public Boolean isSendPaymentRequestDirectly() { return SendPaymentRequestDirectly; }
        public PaymentSettingsQueryResponse setSendPaymentRequestDirectly(Boolean value) { this.SendPaymentRequestDirectly = value; return this; }
    }

    public static class AdminPaymentOptionsResponse
    {
        /**
        * The payment options id
        */
        @ApiMember(Description="The payment options id")
        public Integer Id = null;

        /**
        * The payment options name
        */
        @ApiMember(Description="The payment options name")
        public String Name = null;

        /**
        * The payment options description
        */
        @ApiMember(Description="The payment options description")
        public String Description = null;
        
        public Integer getId() { return Id; }
        public AdminPaymentOptionsResponse setId(Integer value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public AdminPaymentOptionsResponse setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public AdminPaymentOptionsResponse setDescription(String value) { this.Description = value; return this; }
    }

    public static class PaymentProviderOptionsResponse
    {
        /**
        * The payment provider id
        */
        @ApiMember(Description="The payment provider id")
        public Integer Id = null;

        /**
        * The payment provider name
        */
        @ApiMember(Description="The payment provider name")
        public String Name = null;

        /**
        * The payment provider description
        */
        @ApiMember(Description="The payment provider description")
        public String Description = null;
        
        public Integer getId() { return Id; }
        public PaymentProviderOptionsResponse setId(Integer value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public PaymentProviderOptionsResponse setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public PaymentProviderOptionsResponse setDescription(String value) { this.Description = value; return this; }
    }

}

Java UpdatePaymentSettings DTOs

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

HTTP + OTHER

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: api.bokamera.se 
Accept: text/jsonl
Content-Type: text/jsonl
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/jsonl
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}