Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
POST | /payment/settings | Add payment settings | Add payment settings for the logged in company |
---|
export class AdminPaymentOptionsResponse
{
/** @description The payment options id */
// @ApiMember(Description="The payment options id")
public Id: number;
/** @description The payment options name */
// @ApiMember(Description="The payment options name")
public Name: string;
/** @description The payment options description */
// @ApiMember(Description="The payment options description")
public Description: string;
public constructor(init?: Partial<AdminPaymentOptionsResponse>) { (Object as any).assign(this, init); }
}
export class PaymentProviderOptionsResponse
{
/** @description The payment provider id */
// @ApiMember(Description="The payment provider id")
public Id: number;
/** @description The payment provider name */
// @ApiMember(Description="The payment provider name")
public Name: string;
/** @description The payment provider description */
// @ApiMember(Description="The payment provider description")
public Description: string;
public constructor(init?: Partial<PaymentProviderOptionsResponse>) { (Object as any).assign(this, init); }
}
export class PaymentSettingsQueryResponse
{
/** @description The company id */
// @ApiMember(Description="The company id")
public CompanyId: string;
/** @description The payment is enabled */
// @ApiMember(Description="The payment is enabled")
public Enabled: boolean;
/** @description 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 InvoiceFee: number;
/** @description If allow credit card payment */
// @ApiMember(Description="If allow credit card payment")
public AllowCreditCardPayment: boolean;
/** @description If allow invoice payment */
// @ApiMember(Description="If allow invoice payment")
public AllowInvoicePayment: boolean;
/** @description If allow bank payment */
// @ApiMember(Description="If allow bank payment")
public AllowBankPayment: boolean;
/** @description Automatically refund customer on canceled booking */
// @ApiMember(Description="Automatically refund customer on canceled booking")
public RefundOnCancelBooking: boolean;
/** @description The default option when admin creates a new booking */
// @ApiMember(Description="The default option when admin creates a new booking")
public DefaultPaymentOptionId?: number;
/** @description What payment provider to use */
// @ApiMember(Description="What payment provider to use")
public PaymentProviderId: number;
/** @description 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 AdminPaymentOptions: AdminPaymentOptionsResponse[];
/** @description 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 PaymentProviderOptions: PaymentProviderOptionsResponse[];
/** @description SendPaymentRequestDirectly */
// @ApiMember(Description="SendPaymentRequestDirectly")
public SendPaymentRequestDirectly: boolean;
public constructor(init?: Partial<PaymentSettingsQueryResponse>) { (Object as any).assign(this, init); }
}
// @ValidateRequest(Validator="IsAuthenticated")
export class AddPaymentSettings implements ICompany
{
/** @description 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 CompanyId?: string;
/** @description The payson payment is enabled */
// @ApiMember(Description="The payson payment is enabled")
public Enabled: boolean;
/** @description 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 InvoiceFee: number;
/** @description If allow credit card payment */
// @ApiMember(Description="If allow credit card payment")
public AllowCreditCardPayment: boolean;
/** @description If allow invoice payment */
// @ApiMember(Description="If allow invoice payment")
public AllowInvoicePayment: boolean;
/** @description If allow bank payment */
// @ApiMember(Description="If allow bank payment")
public AllowBankPayment: boolean;
/** @description Automatically refund customer on canceled booking */
// @ApiMember(Description="Automatically refund customer on canceled booking")
public RefundOnCancelBooking: boolean;
/** @description The default option when admin creates a new booking */
// @ApiMember(Description="The default option when admin creates a new booking")
public DefaultAdminPaymentOptionsId?: number;
/** @description What payment provider to use */
// @ApiMember(Description="What payment provider to use")
public PaymentProviderId: number;
public constructor(init?: Partial<AddPaymentSettings>) { (Object as any).assign(this, init); }
}
TypeScript AddPaymentSettings DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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.bookmore.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CompanyId: 00000000-0000-0000-0000-000000000000,
Enabled: False,
InvoiceFee: 0,
AllowCreditCardPayment: False,
AllowInvoicePayment: False,
AllowBankPayment: False,
RefundOnCancelBooking: False,
DefaultAdminPaymentOptionsId: 0,
PaymentProviderId: 0
}
HTTP/1.1 200 OK Content-Type: text/jsv 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 }