Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /billing/company/ | Update billing information. | Update billing information. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports BokaMera.API.ServiceModel.Db
Namespace Global
Namespace BokaMera.API.ServiceModel.Db
Public Partial Class BaseModel
End Class
Public Partial Class BillingMethod
Inherits BaseModel
Public Sub New()
BillingMethodCountriesRelation = New List(Of BillingMethodCountriesRelation)
End Sub
Public Overridable Property BillingMethodCountriesRelation As List(Of BillingMethodCountriesRelation)
<Required>
Public Overridable Property Name As String
<Required>
Public Overridable Property Description As String
Public Overridable Property ModifiedDate As Nullable(Of DateTimeOffset)
Public Overridable Property Id As Integer
End Class
Public Partial Class BillingMethodCountriesRelation
Inherits BaseModel
<Required>
Public Overridable Property BillingMethodId As Integer
<Required>
Public Overridable Property CountryId As String
Public Overridable Property ModifiedDate As Nullable(Of DateTimeOffset)
End Class
End Namespace
Namespace BokaMera.API.ServiceModel.Dtos
Public Partial Class BillingInformationResponse
Public Sub New()
BillingMethodOptions = New List(Of BillingMethod)
End Sub
'''<Summary>
'''The company id.
'''</Summary>
<ApiMember(Description:="The company id.")>
Public Overridable Property CompanyId As Guid
'''<Summary>
'''The prefered billing method.
'''</Summary>
<ApiMember(Description:="The prefered billing method.", IsRequired:=true)>
Public Overridable Property BillingMethodId As Integer
'''<Summary>
'''The name that should be printed on the billing information, normally this would be your company name.
'''</Summary>
<ApiMember(Description:="The name that should be printed on the billing information, normally this would be your company name.")>
Public Overridable Property Name As String
'''<Summary>
'''If you want to add the attention to the billing address.
'''</Summary>
<ApiMember(Description:="If you want to add the attention to the billing address.")>
Public Overridable Property Attention As String
'''<Summary>
'''The street for the billing adress. This is required when having postal invoice as billing method.
'''</Summary>
<ApiMember(Description:="The street for the billing adress. This is required when having postal invoice as billing method.")>
Public Overridable Property Street1 As String
'''<Summary>
'''The street for the billing adress.
'''</Summary>
<ApiMember(Description:="The street for the billing adress.")>
Public Overridable Property Street2 As String
'''<Summary>
'''The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.
'''</Summary>
<ApiMember(Description:="The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.")>
Public Overridable Property ZipCode As String
'''<Summary>
'''The city for the billing adress. This is required when having postal invoice as billing method.
'''</Summary>
<ApiMember(Description:="The city for the billing adress. This is required when having postal invoice as billing method.")>
Public Overridable Property City As String
'''<Summary>
'''The country for the billing adress. This is required when having postal invoice as billing method.
'''</Summary>
<ApiMember(Description:="The country for the billing adress. This is required when having postal invoice as billing method.")>
Public Overridable Property CountryId As String
'''<Summary>
'''The billing email. This is required when having email invoice as billing method.
'''</Summary>
<ApiMember(Description:="The billing email. This is required when having email invoice as billing method.")>
Public Overridable Property Email As String
'''<Summary>
'''The company global location number.
'''</Summary>
<ApiMember(Description:="The company global location number.")>
Public Overridable Property GLN As String
'''<Summary>
'''You're internal rereference.
'''</Summary>
<ApiMember(Description:="You're internal rereference.")>
Public Overridable Property ReferenceLine1 As String
'''<Summary>
'''You're internal rereference.
'''</Summary>
<ApiMember(Description:="You're internal rereference.")>
Public Overridable Property ReferenceLine2 As String
'''<Summary>
'''The billing payment terms in days. This is default 15 days.
'''</Summary>
<ApiMember(Description:="The billing payment terms in days. This is default 15 days.")>
Public Overridable Property PaymentTermsDays As Integer
'''<Summary>
'''The company vat registration number.
'''</Summary>
<ApiMember(Description:="The company vat registration number.")>
Public Overridable Property VatRegistrationNumber As String
'''<Summary>
'''The billing method options to choose from
'''</Summary>
<ApiMember(Description:="The billing method options to choose from")>
Public Overridable Property BillingMethodOptions As List(Of BillingMethod)
End Class
<ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
<ValidateRequest(Validator:="IsAuthenticated")>
Public Partial Class UpdateBillingInformation
Implements ICompany
'''<Summary>
'''The company id, if empty will use the company id for the user you are logged in with.
'''</Summary>
<ApiMember(Description:="The company id, if empty will use the company id for the user you are logged in with.")>
Public Overridable Property CompanyId As Nullable(Of Guid)
'''<Summary>
'''The prefered billing method.
'''</Summary>
<ApiMember(Description:="The prefered billing method.", IsRequired:=true)>
Public Overridable Property BillingMethodId As Nullable(Of Integer)
'''<Summary>
'''The name that should be printed on the billing information, normally this would be your company name.
'''</Summary>
<ApiMember(Description:="The name that should be printed on the billing information, normally this would be your company name.")>
Public Overridable Property Name As String
'''<Summary>
'''If you want to add the attention to the billing address.
'''</Summary>
<ApiMember(Description:="If you want to add the attention to the billing address.")>
Public Overridable Property Attention As String
'''<Summary>
'''The street for the billing adress. This is required when having postal invoice as billing method.
'''</Summary>
<ApiMember(Description:="The street for the billing adress. This is required when having postal invoice as billing method.")>
Public Overridable Property Street1 As String
'''<Summary>
'''The street for the billing adress.
'''</Summary>
<ApiMember(Description:="The street for the billing adress.")>
Public Overridable Property Street2 As String
'''<Summary>
'''The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.
'''</Summary>
<ApiMember(Description:="The zip code (postal code) for the billing adress. This is required when having postal invoice as billing method.")>
Public Overridable Property ZipCode As String
'''<Summary>
'''The city for the billing adress. This is required when having postal invoice as billing method.
'''</Summary>
<ApiMember(Description:="The city for the billing adress. This is required when having postal invoice as billing method.")>
Public Overridable Property City As String
'''<Summary>
'''The country for the billing adress. This is required when having postal invoice as billing method.
'''</Summary>
<ApiMember(Description:="The country for the billing adress. This is required when having postal invoice as billing method.")>
Public Overridable Property CountryId As String
'''<Summary>
'''The billing email. This is required when having email invoice as billing method.
'''</Summary>
<ApiMember(Description:="The billing email. This is required when having email invoice as billing method.")>
Public Overridable Property Email As String
'''<Summary>
'''The billing payment terms in days. This is default 15 days.
'''</Summary>
<ApiMember(Description:="The billing payment terms in days. This is default 15 days.")>
Public Overridable Property PaymentTermsDays As Nullable(Of Integer)
'''<Summary>
'''The company vat registration number.
'''</Summary>
<ApiMember(Description:="The company vat registration number.")>
Public Overridable Property VatRegistrationNumber As String
'''<Summary>
'''The company global location number.
'''</Summary>
<ApiMember(Description:="The company global location number.")>
Public Overridable Property GLN As String
'''<Summary>
'''You're internal rereference.
'''</Summary>
<ApiMember(Description:="You're internal rereference.")>
Public Overridable Property ReferenceLine1 As String
'''<Summary>
'''You're internal rereference.
'''</Summary>
<ApiMember(Description:="You're internal rereference.")>
Public Overridable Property ReferenceLine2 As String
End Class
End Namespace
End Namespace
VB.NET UpdateBillingInformation 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 /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>