| GET | /eaccounting/customers |
|---|
import Foundation
import ServiceStack
public class EAccountingCustomerQuery : QueryData<EAccountingCustomerQueryResponse>, ICompany
{
public var companyId:String?
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case companyId
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
companyId = try container.decodeIfPresent(String.self, forKey: .companyId)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if companyId != nil { try container.encode(companyId, forKey: .companyId) }
}
}
public class EAccountingCustomerQueryResponse : Codable
{
public var id:String
public var customerNumber:String
public var corporateIdentityNumber:String
public var contactPersonEmail:String
public var contactPersonMobile:String
public var contactPersonName:String
public var contactPersonPhone:String
public var currencyCode:String
public var gln:String
public var invoiceCity:String
public var invoicePostalCode:String
public var emailAddress:String
public var emailAddressOrder:String
public var emailAddressQuote:String
public var invoiceAddress:EAccountingInvoiceAddress
public var deliveryCustomerName:String
public var deliveryAddress1:String
public var deliveryAddress2:String
public var deliveryCity:String
public var deliveryCountryCode:String
public var deliveryPostalCode:String
public var deliveryMethodId:String
public var deliveryTermId:String
public var payToAccountId:String
public var name:String
public var note:String
public var reverseChargeOnConstructionServices:Bool
public var webshopCustomerNumber:Int?
public var mobilePhone:String
public var telephone:String
public var termsOfPaymentId:String
public var eAccountingTermsOfPayment:EAccountingTermsOfPaymentQueryResponse
public var vatNumber:String
public var wwwAddress:String
public var lastInvoiceDate:String
public var isPrivatePerson:Bool
public var isNorthernIreland:Bool
public var discountPercentage:Double?
public var changedUtc:Date?
public var isActive:Bool
public var forceBookkeepVat:Bool
public var ediGlnNumber:String
public var salesDocumentLanguage:String
public var electronicAddress:String
public var electronicReference:String
public var ediServiceDelivererId:String
public var autoInvoiceActivationEmailSentDate:Date?
public var autoInvoiceRegistrationRequestSentDate:Date?
public var emailAddresses:[String] = []
public var customerLabels:[CustomerLabelQueryResponse] = []
public var messageThreads:[String] = []
public var notes:[String] = []
public var isFutureInvoiceDateAllowed:Bool
public var deliveryBasedVat:Bool
public var salesPriceListId:String
public var iban:String
public var directDebitCustomerSettings:DirectDebitCustomerSettingsQueryResponse
public var discountAgreementId:String
public var unpaidInvoicesAmount:Double
required public init(){}
}
public class EAccountingInvoiceAddress : Codable
{
public var corporateIdentityNumber:String
public var invoiceAddress1:String
public var invoiceAddress2:String
public var invoiceCity:String
public var invoicePostalCode:String
public var invoiceCountryCode:String
required public init(){}
}
public class EAccountingTermsOfPaymentQueryResponse : Codable
{
public var id:String
public var name:String
public var nameEnglish:String
public var numberOfDays:Int
public var termsOfPaymentTypeId:Int
public var termsOfPaymentTypeText:String
public var availableForSales:Bool
public var availableForPurchase:Bool
required public init(){}
}
public class CustomerLabelQueryResponse : Codable
{
public var id:String
public var name:String
public var Description:String
required public init(){}
}
public class DirectDebitCustomerSettingsQueryResponse : Codable
{
public var mandateId:String
public var mandateType:Int
public var sequenceType:Int
public var signingDate:Date
public var endDate:Date
public var latestDirectDebit:Date
required public init(){}
}
public class AccessKeyTypeResponse : Codable
{
public var id:Int
public var keyType:String
public var Description:String
required public init(){}
}
Swift EAccountingCustomerQuery DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /eaccounting/customers HTTP/1.1 Host: api.bookmore.com Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Offset":0,"Total":0,"Results":[{"Id":"String","CustomerNumber":"String","CorporateIdentityNumber":"String","ContactPersonEmail":"String","ContactPersonMobile":"String","ContactPersonName":"String","ContactPersonPhone":"String","CurrencyCode":"String","GLN":"String","InvoiceCity":"String","InvoicePostalCode":"String","EmailAddress":"String","EmailAddressOrder":"String","EmailAddressQuote":"String","InvoiceAddress":{"CorporateIdentityNumber":"String","InvoiceAddress1":"String","InvoiceAddress2":"String","InvoiceCity":"String","InvoicePostalCode":"String","InvoiceCountryCode":"String"},"DeliveryCustomerName":"String","DeliveryAddress1":"String","DeliveryAddress2":"String","DeliveryCity":"String","DeliveryCountryCode":"String","DeliveryPostalCode":"String","DeliveryMethodId":"String","DeliveryTermId":"String","PayToAccountId":"String","Name":"String","Note":"String","ReverseChargeOnConstructionServices":false,"WebshopCustomerNumber":0,"MobilePhone":"String","Telephone":"String","TermsOfPaymentId":"String","EAccountingTermsOfPayment":{"Id":"String","Name":"String","NameEnglish":"String","NumberOfDays":0,"TermsOfPaymentTypeId":0,"TermsOfPaymentTypeText":"String","AvailableForSales":false,"AvailableForPurchase":false},"VatNumber":"String","WwwAddress":"String","LastInvoiceDate":"String","IsPrivatePerson":false,"IsNorthernIreland":false,"DiscountPercentage":0,"ChangedUtc":"0001-01-01T00:00:00","IsActive":false,"ForceBookkeepVat":false,"EdiGlnNumber":"String","SalesDocumentLanguage":"String","ElectronicAddress":"String","ElectronicReference":"String","EdiServiceDelivererId":"String","AutoInvoiceActivationEmailSentDate":"0001-01-01T00:00:00","AutoInvoiceRegistrationRequestSentDate":"0001-01-01T00:00:00","EmailAddresses":["String"],"CustomerLabels":[{"Id":"String","Name":"String","Description":"String"}],"MessageThreads":["String"],"Notes":["String"],"IsFutureInvoiceDateAllowed":false,"DeliveryBasedVat":false,"SalesPriceListId":"String","Iban":"String","DirectDebitCustomerSettings":{"MandateId":"String","MandateType":0,"SequenceType":0},"DiscountAgreementId":"String","UnpaidInvoicesAmount":0}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}