| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| PUT | /billing/company/ | Update billing information. | Update billing information. |
|---|
"use strict";
export class BillingInfoBase {
/** @param {{FirstName?:string,LastName?:string,PhoneNumber?:string,CountryId?:string,BillingMethodId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
FirstName;
/** @type {string} */
LastName;
/** @type {string} */
PhoneNumber;
/** @type {string} */
CountryId;
/** @type {number} */
BillingMethodId;
}
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,FirstName?:string,LastName?:string,PhoneNumber?: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 Billing person first name */
FirstName;
/**
* @type {string}
* @description Billing person last name */
LastName;
/**
* @type {string}
* @description Billing person phone numbers */
PhoneNumber;
/**
* @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 Your internal reference. */
ReferenceLine1;
/**
* @type {string}
* @description Your internal reference. */
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 extends BillingInfoBase {
/** @param {{CompanyId?:string,Name?:string,Attention?:string,Street1?:string,Street2?:string,ZipCode?:string,City?:string,Email?:string,PaymentTermsDays?:number,VatRegistrationNumber?:string,GLN?:string,ReferenceLine1?:string,ReferenceLine2?:string,FirstName?:string,LastName?:string,PhoneNumber?:string,CountryId?:string,BillingMethodId?:number}} [init] */
constructor(init) { super(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 {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 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 Your internal reference. */
ReferenceLine1;
/**
* @type {string}
* @description Your internal reference. */
ReferenceLine2;
}
JavaScript UpdateBillingInformation 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.
PUT /billing/company/ HTTP/1.1
Host: api.bokamera.se
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CompanyId: 00000000-0000-0000-0000-000000000000,
Name: String,
Attention: String,
Street1: String,
Street2: String,
ZipCode: String,
City: String,
Email: String,
PaymentTermsDays: 0,
VatRegistrationNumber: String,
GLN: String,
ReferenceLine1: String,
ReferenceLine2: String,
FirstName: String,
LastName: String,
PhoneNumber: String,
CountryId: String,
BillingMethodId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
BillingMethodId: 0,
Name: String,
FirstName: String,
LastName: String,
PhoneNumber: 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
}
]
}