| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| PUT | /payment/settings/ | Update payment settings | Update payment settings for the logged in company |
|---|
"use strict";
export class AdminPaymentOptionsResponse {
/** @param {{Id?:number,Name?:string,Description?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The payment options id */
Id;
/**
* @type {string}
* @description The payment options name */
Name;
/**
* @type {string}
* @description The payment options description */
Description;
}
export class PaymentProviderOptionsResponse {
/** @param {{Id?:number,Name?:string,Description?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The payment provider id */
Id;
/**
* @type {string}
* @description The payment provider name */
Name;
/**
* @type {string}
* @description The payment provider description */
Description;
}
export class PaymentSettingsQueryResponse {
/** @param {{CompanyId?:string,Enabled?:boolean,RefundOnCancelBooking?:boolean,DefaultPaymentOptionId?:number,PaymentProviderId?:number,AdminPaymentOptions?:AdminPaymentOptionsResponse[],PaymentProviderOptions?:PaymentProviderOptionsResponse[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The company id */
CompanyId;
/**
* @type {boolean}
* @description The payment is enabled */
Enabled;
/**
* @type {boolean}
* @description Automatically refund customer on canceled booking */
RefundOnCancelBooking;
/**
* @type {?number}
* @description The default option when admin creates a new booking */
DefaultPaymentOptionId;
/**
* @type {number}
* @description What payment provider to use */
PaymentProviderId;
/**
* @type {AdminPaymentOptionsResponse[]}
* @description If you want to include the admin payment options to select from */
AdminPaymentOptions = [];
/**
* @type {PaymentProviderOptionsResponse[]}
* @description If you want to include the payment provider options to select from */
PaymentProviderOptions = [];
}
export class UpdatePaymentSettings {
/** @param {{CompanyId?:string,Enabled?:boolean,RefundOnCancelBooking?:boolean,DefaultPaymentOptionId?:number,PaymentProviderId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?string}
* @description The company id, if empty will use the company id for the user you are logged in with. */
CompanyId;
/**
* @type {?boolean}
* @description The payment is enabled */
Enabled;
/**
* @type {?boolean}
* @description Automatically refund customer on canceled booking */
RefundOnCancelBooking;
/**
* @type {?number}
* @description The default option when admin creates a new booking */
DefaultPaymentOptionId;
/**
* @type {?number}
* @description What payment provider to use */
PaymentProviderId;
}
JavaScript UpdatePaymentSettings DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<UpdatePaymentSettings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<DefaultPaymentOptionId>0</DefaultPaymentOptionId>
<Enabled>false</Enabled>
<PaymentProviderId>0</PaymentProviderId>
<RefundOnCancelBooking>false</RefundOnCancelBooking>
</UpdatePaymentSettings>
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>
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<DefaultPaymentOptionId>0</DefaultPaymentOptionId>
<Enabled>false</Enabled>
<PaymentProviderId>0</PaymentProviderId>
<PaymentProviderOptions>
<PaymentProviderOptionsResponse>
<Description>String</Description>
<Id>0</Id>
<Name>String</Name>
</PaymentProviderOptionsResponse>
</PaymentProviderOptions>
<RefundOnCancelBooking>false</RefundOnCancelBooking>
</PaymentSettingsQueryResponse>