BokaMera.API.Host

<back to all web services

AddBillingInformation

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
POST/billing/company/Add new billing information.Add new billing information.
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
    @ValidateRequest(Validator="IsAuthenticated")
    public static class AddBillingInformation 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 prefered billing method.
        */
        @ApiMember(Description="The prefered billing method.", IsRequired=true)
        public Integer BillingMethodId = null;

        /**
        * The name that should be printed on the billing information, normally this would be your company name.
        */
        @ApiMember(Description="The name that should be printed on the billing information, normally this would be your company name.")
        public String Name = null;

        /**
        * If you want to add the attention to the billing address.
        */
        @ApiMember(Description="If you want to add the attention to the billing address.")
        public String Attention = null;

        /**
        * The street for the billing adress. This is required when having postal invoice as billing method.
        */
        @ApiMember(Description="The street for the billing adress. This is required when having postal invoice as billing method.")
        public String Street1 = null;

        /**
        * The street for the billing adress.
        */
        @ApiMember(Description="The street for the billing adress.")
        public String Street2 = null;

        /**
        * The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.
        */
        @ApiMember(Description="The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.")
        public String ZipCode = null;

        /**
        * The city for the billing adress. This is required when having postal invoice as billing method.
        */
        @ApiMember(Description="The city for the billing adress. This is required when having postal invoice as billing method.")
        public String City = null;

        /**
        * The country for the billing adress. This is required when having postal invoice as billing method.
        */
        @ApiMember(Description="The country for the billing adress. This is required when having postal invoice as billing method.")
        public String CountryId = null;

        /**
        * The billing email. This is required when having email invoice as billing method.
        */
        @ApiMember(Description="The billing email. This is required when having email invoice as billing method.")
        public String Email = null;

        /**
        * The billing payment terms in days. This is default 15 days.
        */
        @ApiMember(Description="The billing payment terms in days. This is default 15 days.")
        public Integer PaymentTermsDays = null;

        /**
        * The company vat registration number.
        */
        @ApiMember(Description="The company vat registration number.")
        public String VatRegistrationNumber = null;

        /**
        * The company global location number.
        */
        @ApiMember(Description="The company global location number.")
        public String GLN = null;

        /**
        * You're internal rereference.
        */
        @ApiMember(Description="You're internal rereference.")
        public String ReferenceLine1 = null;

        /**
        * You're internal rereference.
        */
        @ApiMember(Description="You're internal rereference.")
        public String ReferenceLine2 = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public AddBillingInformation setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getBillingMethodId() { return BillingMethodId; }
        public AddBillingInformation setBillingMethodId(Integer value) { this.BillingMethodId = value; return this; }
        public String getName() { return Name; }
        public AddBillingInformation setName(String value) { this.Name = value; return this; }
        public String getAttention() { return Attention; }
        public AddBillingInformation setAttention(String value) { this.Attention = value; return this; }
        public String getStreet1() { return Street1; }
        public AddBillingInformation setStreet1(String value) { this.Street1 = value; return this; }
        public String getStreet2() { return Street2; }
        public AddBillingInformation setStreet2(String value) { this.Street2 = value; return this; }
        public String getZipCode() { return ZipCode; }
        public AddBillingInformation setZipCode(String value) { this.ZipCode = value; return this; }
        public String getCity() { return City; }
        public AddBillingInformation setCity(String value) { this.City = value; return this; }
        public String getCountryId() { return CountryId; }
        public AddBillingInformation setCountryId(String value) { this.CountryId = value; return this; }
        public String getEmail() { return Email; }
        public AddBillingInformation setEmail(String value) { this.Email = value; return this; }
        public Integer getPaymentTermsDays() { return PaymentTermsDays; }
        public AddBillingInformation setPaymentTermsDays(Integer value) { this.PaymentTermsDays = value; return this; }
        public String getVatRegistrationNumber() { return VatRegistrationNumber; }
        public AddBillingInformation setVatRegistrationNumber(String value) { this.VatRegistrationNumber = value; return this; }
        public String getGln() { return GLN; }
        public AddBillingInformation setGln(String value) { this.GLN = value; return this; }
        public String getReferenceLine1() { return ReferenceLine1; }
        public AddBillingInformation setReferenceLine1(String value) { this.ReferenceLine1 = value; return this; }
        public String getReferenceLine2() { return ReferenceLine2; }
        public AddBillingInformation setReferenceLine2(String value) { this.ReferenceLine2 = value; return this; }
    }

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

        /**
        * The prefered billing method.
        */
        @ApiMember(Description="The prefered billing method.", IsRequired=true)
        public Integer BillingMethodId = null;

        /**
        * The name that should be printed on the billing information, normally this would be your company name.
        */
        @ApiMember(Description="The name that should be printed on the billing information, normally this would be your company name.")
        public String Name = null;

        /**
        * If you want to add the attention to the billing address.
        */
        @ApiMember(Description="If you want to add the attention to the billing address.")
        public String Attention = null;

        /**
        * The street for the billing adress. This is required when having postal invoice as billing method.
        */
        @ApiMember(Description="The street for the billing adress. This is required when having postal invoice as billing method.")
        public String Street1 = null;

        /**
        * The street for the billing adress.
        */
        @ApiMember(Description="The street for the billing adress.")
        public String Street2 = null;

        /**
        * The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.
        */
        @ApiMember(Description="The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.")
        public String ZipCode = null;

        /**
        * The city for the billing adress. This is required when having postal invoice as billing method.
        */
        @ApiMember(Description="The city for the billing adress. This is required when having postal invoice as billing method.")
        public String City = null;

        /**
        * The country for the billing adress. This is required when having postal invoice as billing method.
        */
        @ApiMember(Description="The country for the billing adress. This is required when having postal invoice as billing method.")
        public String CountryId = null;

        /**
        * The billing email. This is required when having email invoice as billing method.
        */
        @ApiMember(Description="The billing email. This is required when having email invoice as billing method.")
        public String Email = null;

        /**
        * The company global location number.
        */
        @ApiMember(Description="The company global location number.")
        public String GLN = null;

        /**
        * You're internal rereference.
        */
        @ApiMember(Description="You're internal rereference.")
        public String ReferenceLine1 = null;

        /**
        * You're internal rereference.
        */
        @ApiMember(Description="You're internal rereference.")
        public String ReferenceLine2 = null;

        /**
        * The billing payment terms in days. This is default 15 days.
        */
        @ApiMember(Description="The billing payment terms in days. This is default 15 days.")
        public Integer PaymentTermsDays = null;

        /**
        * The company vat registration number.
        */
        @ApiMember(Description="The company vat registration number.")
        public String VatRegistrationNumber = null;

        /**
        * The billing method options to choose from
        */
        @ApiMember(Description="The billing method options to choose from")
        public ArrayList<BillingMethod> BillingMethodOptions = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public BillingInformationResponse setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getBillingMethodId() { return BillingMethodId; }
        public BillingInformationResponse setBillingMethodId(Integer value) { this.BillingMethodId = value; return this; }
        public String getName() { return Name; }
        public BillingInformationResponse setName(String value) { this.Name = value; return this; }
        public String getAttention() { return Attention; }
        public BillingInformationResponse setAttention(String value) { this.Attention = value; return this; }
        public String getStreet1() { return Street1; }
        public BillingInformationResponse setStreet1(String value) { this.Street1 = value; return this; }
        public String getStreet2() { return Street2; }
        public BillingInformationResponse setStreet2(String value) { this.Street2 = value; return this; }
        public String getZipCode() { return ZipCode; }
        public BillingInformationResponse setZipCode(String value) { this.ZipCode = value; return this; }
        public String getCity() { return City; }
        public BillingInformationResponse setCity(String value) { this.City = value; return this; }
        public String getCountryId() { return CountryId; }
        public BillingInformationResponse setCountryId(String value) { this.CountryId = value; return this; }
        public String getEmail() { return Email; }
        public BillingInformationResponse setEmail(String value) { this.Email = value; return this; }
        public String getGln() { return GLN; }
        public BillingInformationResponse setGln(String value) { this.GLN = value; return this; }
        public String getReferenceLine1() { return ReferenceLine1; }
        public BillingInformationResponse setReferenceLine1(String value) { this.ReferenceLine1 = value; return this; }
        public String getReferenceLine2() { return ReferenceLine2; }
        public BillingInformationResponse setReferenceLine2(String value) { this.ReferenceLine2 = value; return this; }
        public Integer getPaymentTermsDays() { return PaymentTermsDays; }
        public BillingInformationResponse setPaymentTermsDays(Integer value) { this.PaymentTermsDays = value; return this; }
        public String getVatRegistrationNumber() { return VatRegistrationNumber; }
        public BillingInformationResponse setVatRegistrationNumber(String value) { this.VatRegistrationNumber = value; return this; }
        public ArrayList<BillingMethod> getBillingMethodOptions() { return BillingMethodOptions; }
        public BillingInformationResponse setBillingMethodOptions(ArrayList<BillingMethod> value) { this.BillingMethodOptions = value; return this; }
    }

    public static class BillingMethod extends BaseModel
    {
        public ArrayList<BillingMethodCountriesRelation> BillingMethodCountriesRelation = null;
        @Required()
        public String Name = null;

        @Required()
        public String Description = null;

        public Date ModifiedDate = null;
        public Integer Id = null;
        
        public ArrayList<BillingMethodCountriesRelation> getBillingMethodCountriesRelation() { return BillingMethodCountriesRelation; }
        public BillingMethod setBillingMethodCountriesRelation(ArrayList<BillingMethodCountriesRelation> value) { this.BillingMethodCountriesRelation = value; return this; }
        public String getName() { return Name; }
        public BillingMethod setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public BillingMethod setDescription(String value) { this.Description = value; return this; }
        public Date getModifiedDate() { return ModifiedDate; }
        public BillingMethod setModifiedDate(Date value) { this.ModifiedDate = value; return this; }
        public Integer getId() { return Id; }
        public BillingMethod setId(Integer value) { this.Id = value; return this; }
    }

    public static class BaseModel
    {
        
    }

    public static class BillingMethodCountriesRelation extends BaseModel
    {
        @Required()
        public Integer BillingMethodId = null;

        @Required()
        public String CountryId = null;

        public Date ModifiedDate = null;
        
        public Integer getBillingMethodId() { return BillingMethodId; }
        public BillingMethodCountriesRelation setBillingMethodId(Integer value) { this.BillingMethodId = value; return this; }
        public String getCountryId() { return CountryId; }
        public BillingMethodCountriesRelation setCountryId(String value) { this.CountryId = value; return this; }
        public Date getModifiedDate() { return ModifiedDate; }
        public BillingMethodCountriesRelation setModifiedDate(Date value) { this.ModifiedDate = value; return this; }
    }

}

Java AddBillingInformation 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.

POST /billing/company/ HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsonl
Content-Type: text/jsonl
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/jsonl
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}]}