Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /billing/company/ | Update billing information. | Update billing information. |
---|
"use strict";
export class BaseModel {
constructor(init) { Object.assign(this, init) }
}
export class BillingMethodCountriesRelation extends BaseModel {
/** @param {{BillingMethodId?:number,CountryId?:string,ModifiedDate?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {number} */
BillingMethodId;
/** @type {string} */
CountryId;
/** @type {?string} */
ModifiedDate;
}
export class BillingMethod extends BaseModel {
/** @param {{BillingMethodCountriesRelation?:BillingMethodCountriesRelation[],Name?:string,Description?:string,ModifiedDate?:string,Id?:number}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {BillingMethodCountriesRelation[]} */
BillingMethodCountriesRelation;
/** @type {string} */
Name;
/** @type {string} */
Description;
/** @type {?string} */
ModifiedDate;
/** @type {number} */
Id;
}
export class BillingInformationResponse {
/** @param {{CompanyId?:string,BillingMethodId?:number,Name?:string,Attention?:string,Street1?:string,Street2?:string,ZipCode?:string,City?:string,CountryId?:string,Email?:string,GLN?:string,ReferenceLine1?:string,ReferenceLine2?:string,PaymentTermsDays?:number,VatRegistrationNumber?:string,BillingMethodOptions?:BillingMethod[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The company id. */
CompanyId;
/**
* @type {number}
* @description The prefered billing method. */
BillingMethodId;
/**
* @type {string}
* @description The name that should be printed on the billing information, normally this would be your company name. */
Name;
/**
* @type {string}
* @description If you want to add the attention to the billing address. */
Attention;
/**
* @type {string}
* @description The street for the billing adress. This is required when having postal invoice as billing method. */
Street1;
/**
* @type {string}
* @description The street for the billing adress. */
Street2;
/**
* @type {string}
* @description The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method. */
ZipCode;
/**
* @type {string}
* @description The city for the billing adress. This is required when having postal invoice as billing method. */
City;
/**
* @type {string}
* @description The country for the billing adress. This is required when having postal invoice as billing method. */
CountryId;
/**
* @type {string}
* @description The billing email. This is required when having email invoice as billing method. */
Email;
/**
* @type {string}
* @description The company global location number. */
GLN;
/**
* @type {string}
* @description You're internal rereference. */
ReferenceLine1;
/**
* @type {string}
* @description You're internal rereference. */
ReferenceLine2;
/**
* @type {number}
* @description The billing payment terms in days. This is default 15 days. */
PaymentTermsDays;
/**
* @type {string}
* @description The company vat registration number. */
VatRegistrationNumber;
/**
* @type {BillingMethod[]}
* @description The billing method options to choose from */
BillingMethodOptions;
}
export class UpdateBillingInformation {
/** @param {{CompanyId?:string,BillingMethodId?:number,Name?:string,Attention?:string,Street1?:string,Street2?:string,ZipCode?:string,City?:string,CountryId?:string,Email?:string,PaymentTermsDays?:number,VatRegistrationNumber?:string,GLN?:string,ReferenceLine1?:string,ReferenceLine2?:string}} [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 {number}
* @description The prefered billing method. */
BillingMethodId;
/**
* @type {string}
* @description The name that should be printed on the billing information, normally this would be your company name. */
Name;
/**
* @type {string}
* @description If you want to add the attention to the billing address. */
Attention;
/**
* @type {string}
* @description The street for the billing adress. This is required when having postal invoice as billing method. */
Street1;
/**
* @type {string}
* @description The street for the billing adress. */
Street2;
/**
* @type {string}
* @description The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method. */
ZipCode;
/**
* @type {string}
* @description The city for the billing adress. This is required when having postal invoice as billing method. */
City;
/**
* @type {string}
* @description The country for the billing adress. This is required when having postal invoice as billing method. */
CountryId;
/**
* @type {string}
* @description The billing email. This is required when having email invoice as billing method. */
Email;
/**
* @type {?number}
* @description The billing payment terms in days. This is default 15 days. */
PaymentTermsDays;
/**
* @type {string}
* @description The company vat registration number. */
VatRegistrationNumber;
/**
* @type {string}
* @description The company global location number. */
GLN;
/**
* @type {string}
* @description You're internal rereference. */
ReferenceLine1;
/**
* @type {string}
* @description You're internal rereference. */
ReferenceLine2;
}
JavaScript UpdateBillingInformation DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /billing/company/ HTTP/1.1
Host: api.bokamera.se
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","BillingMethodId":0,"Name":"String","Attention":"String","Street1":"String","Street2":"String","ZipCode":"String","City":"String","CountryId":"String","Email":"String","PaymentTermsDays":0,"VatRegistrationNumber":"String","GLN":"String","ReferenceLine1":"String","ReferenceLine2":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"BillingMethodId":0,"Name":"String","Attention":"String","Street1":"String","Street2":"String","ZipCode":"String","City":"String","CountryId":"String","Email":"String","GLN":"String","ReferenceLine1":"String","ReferenceLine2":"String","PaymentTermsDays":0,"VatRegistrationNumber":"String","BillingMethodOptions":[{"BillingMethodCountriesRelation":[{"BillingMethodId":0,"CountryId":"String","ModifiedDate":"0001-01-01T00:00:00.0000000+00:00"}],"Name":"String","Description":"String","ModifiedDate":"0001-01-01T00:00:00.0000000+00:00","Id":0}]}