BokaMera.API.Host

<back to all web services

UpdateBillingInformation

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/billing/company/Update billing information.Update 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 UpdateBillingInformation 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 UpdateBillingInformation setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getBillingMethodId() { return BillingMethodId; }
        public UpdateBillingInformation setBillingMethodId(Integer value) { this.BillingMethodId = value; return this; }
        public String getName() { return Name; }
        public UpdateBillingInformation setName(String value) { this.Name = value; return this; }
        public String getAttention() { return Attention; }
        public UpdateBillingInformation setAttention(String value) { this.Attention = value; return this; }
        public String getStreet1() { return Street1; }
        public UpdateBillingInformation setStreet1(String value) { this.Street1 = value; return this; }
        public String getStreet2() { return Street2; }
        public UpdateBillingInformation setStreet2(String value) { this.Street2 = value; return this; }
        public String getZipCode() { return ZipCode; }
        public UpdateBillingInformation setZipCode(String value) { this.ZipCode = value; return this; }
        public String getCity() { return City; }
        public UpdateBillingInformation setCity(String value) { this.City = value; return this; }
        public String getCountryId() { return CountryId; }
        public UpdateBillingInformation setCountryId(String value) { this.CountryId = value; return this; }
        public String getEmail() { return Email; }
        public UpdateBillingInformation setEmail(String value) { this.Email = value; return this; }
        public Integer getPaymentTermsDays() { return PaymentTermsDays; }
        public UpdateBillingInformation setPaymentTermsDays(Integer value) { this.PaymentTermsDays = value; return this; }
        public String getVatRegistrationNumber() { return VatRegistrationNumber; }
        public UpdateBillingInformation setVatRegistrationNumber(String value) { this.VatRegistrationNumber = value; return this; }
        public String getGln() { return GLN; }
        public UpdateBillingInformation setGln(String value) { this.GLN = value; return this; }
        public String getReferenceLine1() { return ReferenceLine1; }
        public UpdateBillingInformation setReferenceLine1(String value) { this.ReferenceLine1 = value; return this; }
        public String getReferenceLine2() { return ReferenceLine2; }
        public UpdateBillingInformation 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 UpdateBillingInformation DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<UpdateBillingInformation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Attention>String</Attention>
  <BillingMethodId>0</BillingMethodId>
  <City>String</City>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <CountryId>String</CountryId>
  <Email>String</Email>
  <GLN>String</GLN>
  <Name>String</Name>
  <PaymentTermsDays>0</PaymentTermsDays>
  <ReferenceLine1>String</ReferenceLine1>
  <ReferenceLine2>String</ReferenceLine2>
  <Street1>String</Street1>
  <Street2>String</Street2>
  <VatRegistrationNumber>String</VatRegistrationNumber>
  <ZipCode>String</ZipCode>
</UpdateBillingInformation>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<BillingInformationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Attention>String</Attention>
  <BillingMethodId>0</BillingMethodId>
  <BillingMethodOptions xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Db">
    <d2p1:BillingMethod>
      <d2p1:BillingMethodCountriesRelation>
        <d2p1:BillingMethodCountriesRelation>
          <d2p1:BillingMethodId>0</d2p1:BillingMethodId>
          <d2p1:CountryId>String</d2p1:CountryId>
          <d2p1:ModifiedDate xmlns:d6p1="http://schemas.datacontract.org/2004/07/System">
            <d6p1:DateTime>0001-01-01T00:00:00Z</d6p1:DateTime>
            <d6p1:OffsetMinutes>0</d6p1:OffsetMinutes>
          </d2p1:ModifiedDate>
        </d2p1:BillingMethodCountriesRelation>
      </d2p1:BillingMethodCountriesRelation>
      <d2p1:Description>String</d2p1:Description>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:ModifiedDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </d2p1:ModifiedDate>
      <d2p1:Name>String</d2p1:Name>
    </d2p1:BillingMethod>
  </BillingMethodOptions>
  <City>String</City>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <CountryId>String</CountryId>
  <Email>String</Email>
  <GLN>String</GLN>
  <Name>String</Name>
  <PaymentTermsDays>0</PaymentTermsDays>
  <ReferenceLine1>String</ReferenceLine1>
  <ReferenceLine2>String</ReferenceLine2>
  <Street1>String</Street1>
  <Street2>String</Street2>
  <VatRegistrationNumber>String</VatRegistrationNumber>
  <ZipCode>String</ZipCode>
</BillingInformationResponse>