Documentation
¶
Index ¶
- Constants
- func GenerateToken(partnerKey string, timestamp int64, request, secret string) string
- func VerifyUser(username string, password string, clientCode string, client *http.Client) (string, error)
- type Address
- type Addresses
- type Attribute
- type BaseDocument
- type BusinessArea
- type CompanyInfo
- type CompanyInfos
- type ConfParameter
- type ContactPerson
- type ContactPersons
- type Country
- type Currency
- type Customer
- type CustomerConstructor
- type CustomerDataProcessingLog
- type CustomerImportReport
- type CustomerImportReports
- type Customers
- type DocumentData
- type DocumentDatas
- type Employee
- type EmployeeProduct
- type EmployeeWarehouse
- type GetAddressesResponse
- type GetBusinessAreasResponse
- type GetCompanyInfoResponse
- type GetConfParametersResponse
- type GetCountriesResponse
- type GetCurrenciesResponse
- type GetCustomersResponse
- type GetEmployeesResponse
- type GetPointsOfSaleResponse
- type GetProductUnitsResponse
- type GetProductsResponse
- type GetProjectStatusesResponse
- type GetProjectsResponse
- type GetSalesDocumentResponse
- type GetSuppliersResponse
- type GetUserRightsResponse
- type GetVatRatesResponse
- type GetWarehousesResponse
- type IClient
- type IdentityToken
- type InstallationRequest
- type InstallationResponse
- type InvoiceRow
- type InvoiceState
- type JwtToken
- type JwtTokenResponse
- type NetTotalsByRate
- type NetTotalsByRates
- type NetTotalsByTaxRate
- type NetTotalsByTaxRates
- type ObjAttribute
- type PaymentAttribute
- type PaymentInfo
- type PaymentStatus
- type PaymentType
- type PointOfSale
- type PostCustomerResponse
- type PostPurchaseDocumentResponse
- type PostSalesDocumentResponse
- type Product
- type ProductBrand
- type ProductCategory
- type ProductDimensions
- type ProductGroup
- type ProductImage
- type ProductRow
- type ProductRows
- type ProductUnit
- type ProductVariaton
- type Project
- type ProjectStatus
- type PurchaseDocImportReport
- type PurchaseDocImportReports
- type PurchaseDocumentConstructor
- type PurchaseDocumentConstructors
- type Records
- type SaleDocImportReport
- type SaleDocImportReports
- type SaleDocument
- type SaleDocumentConstructor
- type SessionInfo
- type ShoppingCartProduct
- type ShoppingCartTotals
- type Status
- type StockInfo
- type Supplier
- type UserCredentials
- type UserRights
- type VatRate
- type VatRates
- type VatTotalsByRate
- type VatTotalsByRates
- type VatTotalsByTaxRate
- type VatTotalsByTaxRates
- type VerifyUserResponse
- type Warehouse
- type Warehouses
- type WebshopClient
Constants ¶
View Source
const ( GetSalesDocumentsMethod = "getSalesDocuments" GetCustomersMethod = "getCustomers" GetCountriesMethod = "getCountries" GetEmployeesMethod = "getEmployees" GetBusinessAreasMethod = "getBusinessAreas" GetProjectsMethod = "getProjects" GetProjectStatusesMethod = "getProjectStatuses" GetCurrenciesMethod = "getCurrencies" GetVatRatesMethod = "getVatRates" GetPaymentsMethod = "getPayments" GetUserRightsMethod = "getUserRights" //GetCompanyInfoMethod ... GetCompanyInfoMethod = "getCompanyInfo" VerifyIdentityTokenMethod = "verifyIdentityToken" GetPointsOfSaleMethod = "getPointsOfSale" GetIdentityToken = "getIdentityToken" GetJWTTokenMethod = "getJwtToken" GetConfParametersMethod = "getConfParameters" GetWarehousesMethod = "getWarehouses" GetAddressesMethod = "getAddresses" GetProductsMethod = "getProducts" GetProductCategoriesMethod = "getProductCategories" GetProductBrandsMethod = "getBrands" GetProductGroupsMethod = "getProductGroups" GetProductUnitsMethod = "getProductUnits" VerifyCustomerUserMethod = "verifyCustomerUser" Cash = "CASH" Card = "CARD" Transfer = "TRANSFER" Check = "CHECK" Paid = "PAID" Unpaid = "UNPAID" BankTransfer = "Direct bank transfer" CheckPayment = "Check payments" PayPal = "PayPal" CashOnDelivery = "Cash on delivery" //MaxIdleConns for Erply API MaxIdleConns = 25 //MaxConnsPerHost for Erply API MaxConnsPerHost = 25 )
View Source
const ( PAID PaymentStatus = "PAID" UNPAID PaymentStatus = "UNPAID" PENDING InvoiceState = "PENDING" CARD PaymentType = "CARD" )
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
Types ¶
type Address ¶
type Address struct {
AddressID int `json:"addressID"`
OwnerID int `json:"ownerID"`
TypeID int `json:"typeID"`
Address2 string `json:"address2"`
Address string `json:"address"`
Street string `json:"street"`
PostalCode string `json:"postalCode"`
City string `json:"city"`
State string `json:"state"`
Country string `json:"country"`
}
Address from getAddresses
type Attribute ¶
type Attribute struct {
Name string `json:"attributeNam"`
Type string `json:"attributeType"`
Value string `json:"attributeValue"`
}
Attribute field
type BaseDocument ¶
type BusinessArea ¶ added in v0.1.0
type CompanyInfo ¶
type CompanyInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Code string `json:"code"`
VAT string `json:"VAT"`
Phone string `json:"phone"`
Mobile string `json:"mobile"`
Fax string `json:"fax"`
Email string `json:"email"`
Web string `json:"web"`
BankAccountNumber string `json:"bankAccountNumber"`
BankName string `json:"bankName"`
BankSWIFT string `json:"bankSWIFT"`
BankIBAN string `json:"bankIBAN"`
BankAccountNumber2 string `json:"bankAccountNumber2"`
BankName2 string `json:"bankName2"`
BankSWIFT2 string `json:"bankSWIFT2"`
BankIBAN2 string `json:"bankIBAN2"`
Address string `json:"address"`
Country string `json:"country"`
//field for ConfParameters
ConfParameters ConfParameter
}
CompanyInfo ..
type ConfParameter ¶
type ContactPerson ¶
type ContactPerson struct {
ContactPersonID int `json:"contactPersonID"`
FullName string `json:"fullName"`
GroupName string `json:"groupName"`
CountryID string `json:"countryID"`
Phone string `json:"phone"`
Email string `json:"email"`
Fax string `json:"fax"`
Code string `json:"code"`
BankName string `json:"bankName"`
BankAccountNumber string `json:"bankAccountNumber"`
BankIBAN string `json:"bankIBAN"`
BankSWIFT string `json:"bankSWIFT"`
Notes string `json:"notes"`
}
type ContactPersons ¶
type ContactPersons []ContactPerson
type Customer ¶
type Customer struct {
ID int `json:"id"`
CustomerID int `json:"customerID"`
TypeID string `json:"type_id"`
FullName string `json:"fullName"`
CompanyName string `json:"companyName"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
GroupID int `json:"groupID"`
EDI string `json:"EDI"`
IsPOSDefaultCustomer int `json:"isPOSDefaultCustomer"`
CountryID string `json:"countryID"`
Phone string `json:"phone"`
EInvoiceEmail string `json:"eInvoiceEmail"`
Email string `json:"email"`
Fax string `json:"fax"`
Code string `json:"code"`
ReferenceNumber string `json:"referenceNumber"`
VatNumber string `json:"vatNumber"`
BankName string `json:"bankName"`
BankAccountNumber string `json:"bankAccountNumber"`
BankIBAN string `json:"bankIBAN"`
BankSWIFT string `json:"bankSWIFT"`
PaymentDays int `json:"paymentDays"`
Notes string `json:"notes"`
LastModified int `json:"lastModified"`
CustomerType string `json:"customerType"`
Address string `json:"address"`
CustomerAddresses Addresses `json:"addresses"`
Street string `json:"street"`
Address2 string `json:"address2"`
City string `json:"city"`
PostalCode string `json:"postalCode"`
Country string `json:"country"`
State string `json:"state"`
ContactPersons ContactPersons `json:"contactPersons"`
// Web-shop related fields
Username string `json:"webshopUsername"`
LastLogin string `json:"webshopLastLogin"`
}
type CustomerConstructor ¶
type CustomerConstructor struct {
CustomerID int
CompanyName string
Address string
PostalCode string
AddressTypeID int
City string
State string
Country string
FirstName string
LastName string
FullName string
RegistryCode string
VatNumber string
Email string
Phone string
BankName string
BankAccountNumber string
// Web-shop related fields
Username string
Password string
}
type CustomerDataProcessingLog ¶
type CustomerDataProcessingLog struct {
// contains filtered or unexported fields
}
CustomerDataProcessingLog ...
type CustomerImportReport ¶
type CustomerImportReports ¶
type CustomerImportReports []CustomerImportReport
type DocumentData ¶
type DocumentData struct {
//Document type
Type string
//Currency code: "EUR", "USD" etc. Currency must be defined in your Erply account.
CurrencyCode string
//eg. 2010-01-29
//Each sales document must have a date. If omitted, API applies current date.
Date string
//eg. 14:59:00
//If omitted, API applies current time.
Time string
//Assign a custom number to this sales document. As opposed to invoiceNo, this field may contain letters, spacing and punctuation.
CustomNumber string
// number of invoice document in provider system
InvoiceNumber string
// Invoice content text
InvoiceContentText string
///Sales document's custom reference number. This field must be used only if you want to override default reference numbers.
CustomReferenceNumber string
//Notes printed on the invoice
Notes string
//Additional text
Text string
//Status of the document itself.
//For invoices, possible values: PENDING, READY, MAILED, PRINTED. For orders, possible values are: PENDING, READY, SHIPPED, FULFILLED, CANCELLED
InvoiceState InvoiceState
//Expected invoice payment method: eg. CASH, CARD, TRANSFER, CHECK, GIFTCARD.
PaymentType PaymentType
// DEB for debit and CRED for credit
PaymentMethod string
//By default: system-specific, usually 14.
//In how many days the invoice is due.
PaymentDays string
//Invoice payment status.
//Possible values: PAID, UNPAID.
PaymentStatus PaymentStatus
//Invoice payment information, who paid, when, how.
//Max 255 characters
PaymentInfo string
//Payment reference number
PaymentReferenceNumber string
//ISO date (yyyy-mm-dd)
// Customer requested delivery date (for the whole document). You may also set requested delivery dates for each line individually, see deliveryDate#
DeliveryDate string
//ISO date (yyyy-mm-dd)
ShippingDate string
//Search by exact warehouse code.
WarehouseCode string
//seller company registry code
Seller CustomerConstructor
Payer CustomerConstructor
Buyer CustomerConstructor
Delivery CustomerConstructor
ProductRows ProductRows
CustomerId uint
}
type DocumentDatas ¶
type DocumentDatas []DocumentData
type Employee ¶ added in v0.1.0
type Employee struct {
EmployeeID string `json:"employeeID"`
FullName string `json:"fullName"`
EmployeeName string `json:"employeeName"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Phone string `json:"phone"`
Mobile string `json:"mobile"`
Email string `json:"email"`
Fax string `json:"fax"`
Code string `json:"code"`
Gender string `json:"gender"`
UserID string `json:"userID"`
Username string `json:"username"`
UserGroupID string `json:"userGroupID"`
Warehouses []EmployeeWarehouse `json:"warehouses"`
PointsOfSale string `json:"pointsOfSale"`
ProductIDs []EmployeeProduct `json:"productIDs"`
Attributes []ObjAttribute `json:"attributes"`
LastModified uint64 `json:"lastModified"`
LastModifiedByUserName string `json:"lastModifiedByUserName"`
// detail fileds
Skype string `json:"skype"`
Birthday string `json:"birthday"`
JobTitleID uint `json:"jobTitleID"`
JobTitleName string `json:"jobTitleName"`
Notes string `json:"notes"`
Added uint64 `json:"added"`
}
type EmployeeProduct ¶ added in v0.1.0
type EmployeeWarehouse ¶ added in v0.1.0
type EmployeeWarehouse struct {
Id uint `json:"id"`
}
type GetAddressesResponse ¶
type GetAddressesResponse struct {
Status Status `json:"status"`
Addresses Addresses `json:"records"`
}
GetAddressesResponse ..
type GetBusinessAreasResponse ¶ added in v0.1.0
type GetBusinessAreasResponse struct {
Status Status `json:"status"`
BusinessAreas []BusinessArea `json:"records"`
}
type GetCompanyInfoResponse ¶
type GetCompanyInfoResponse struct {
Status Status `json:"status"`
CompanyInfos CompanyInfos `json:"records"`
}
GetCompanyInfoResponse ...
type GetConfParametersResponse ¶
type GetConfParametersResponse struct {
Status Status `json:"status"`
ConfParameters []ConfParameter `json:"records"`
}
GetConfParametersResponse ...
type GetCountriesResponse ¶ added in v0.1.0
type GetCurrenciesResponse ¶ added in v0.1.0
type GetCustomersResponse ¶
type GetCustomersResponse struct {
Status Status `json:"status"`
Customers Customers `json:"records"`
}
GetCustomersResponse ...
type GetEmployeesResponse ¶ added in v0.1.0
type GetPointsOfSaleResponse ¶
type GetPointsOfSaleResponse struct {
Status Status `json:"status"`
PointsOfSale []PointOfSale `json:"records"`
}
type GetProductUnitsResponse ¶
type GetProductUnitsResponse struct {
Status Status `json:"status"`
ProductUnits []ProductUnit `json:"records"`
}
GetProductUnitsResponse ...
type GetProductsResponse ¶
type GetProductsResponse struct {
Status Status `json:"status"`
Products []Product `json:"records"`
}
GetProductsResponse ...
type GetProjectStatusesResponse ¶ added in v0.1.0
type GetProjectStatusesResponse struct {
Status Status `json:"status"`
ProjectStatuses []ProjectStatus `json:"records"`
}
type GetProjectsResponse ¶ added in v0.1.0
type GetSalesDocumentResponse ¶
type GetSalesDocumentResponse struct {
Status Status `json:"status"`
SalesDocuments []SaleDocument `json:"records"`
}
type GetSuppliersResponse ¶ added in v0.1.0
type GetSuppliersResponse struct {
Status Status `json:"status"`
Suppliers []Supplier `json:"records"`
}
GetSuppliersResponse
type GetUserRightsResponse ¶
type GetUserRightsResponse struct {
Status Status `json:"status"`
Records []UserRights `json:"records"`
}
type GetVatRatesResponse ¶
type GetVatRatesResponse struct {
Status Status `json:"status"`
VatRates []VatRate `json:"records"`
}
GetVatRatesResponse ...
type GetWarehousesResponse ¶
type GetWarehousesResponse struct {
Status Status `json:"status"`
Warehouses Warehouses `json:"records"`
}
type IClient ¶
type IClient interface {
GetConfParameters() (*ConfParameter, error)
GetWarehouses() (Warehouses, error)
GetUserName() (string, error)
GetSalesDocumentByID(id string) ([]SaleDocument, error)
GetSalesDocumentsByIDs(id []string) ([]SaleDocument, error)
GetCustomers(ctx context.Context, filters map[string]string) ([]Customer, error)
GetCustomersByIDs(customerID []string) (Customers, error)
GetCustomerByRegNumber(regNumber string) (*Customer, error)
GetCustomerByGLN(gln string) (*Customer, error)
GetSuppliers(ctx context.Context, filters map[string]string) ([]Supplier, error)
GetSupplierByName(name string) (*Customer, error)
GetVatRatesByID(vatRateID string) (VatRates, error)
GetCompanyInfo() (*CompanyInfo, error)
GetProductUnits() ([]ProductUnit, error)
GetProductCategories(ctx context.Context, filters map[string]string) ([]ProductCategory, error)
GetProductBrands(ctx context.Context, filters map[string]string) ([]ProductBrand, error)
GetProductGroups(ctx context.Context, filters map[string]string) ([]ProductGroup, error)
GetProducts(ctx context.Context, filters map[string]string) ([]Product, error)
GetProductsByIDs(ids []string) ([]Product, error)
GetProductsByCode3(code3 string) (*Product, error)
GetAddresses() (*Address, error)
GetCountries(ctx context.Context, filters map[string]string) ([]Country, error)
GetEmployees(ctx context.Context, filters map[string]string) ([]Employee, error)
GetBusinessAreas(ctx context.Context, filters map[string]string) ([]BusinessArea, error)
GetProjects(ctx context.Context, filters map[string]string) ([]Project, error)
GetProjectStatus(ctx context.Context, filters map[string]string) ([]ProjectStatus, error)
GetCurrencies(ctx context.Context, filters map[string]string) ([]Currency, error)
PostPurchaseDocument(in *PurchaseDocumentConstructor, provider string) (PurchaseDocImportReports, error)
PostSalesDocumentFromWoocomm(in *SaleDocumentConstructor, shopOrderID string) (SaleDocImportReports, error)
PostSalesDocument(in *SaleDocumentConstructor, provider string) (SaleDocImportReports, error)
PostCustomer(in *CustomerConstructor) (*CustomerImportReport, error)
PostSupplier(in *CustomerConstructor) (*CustomerImportReport, error)
DeleteDocumentsByID(id string) error
GetPointsOfSale(ctx context.Context, filters map[string]string) ([]PointOfSale, error)
GetPointsOfSaleByID(posID string) (*PointOfSale, error)
VerifyIdentityToken(jwt string) (*SessionInfo, error)
GetIdentityToken() (*IdentityToken, error)
GetJWTToken(partnerKey string) (*JwtToken, error)
SavePayment(in *PaymentInfo) (int64, error)
GetPayments(ctx context.Context, filters map[string]string) ([]PaymentInfo, error)
VerifyCustomerUser(username, password string) (*WebshopClient, error)
CalculateShoppingCart(in *DocumentData) (*ShoppingCartTotals, error)
IsCustomerUsernameAvailable(username string) (bool, error)
Close()
}
IClient interface for cached and simple client
type IdentityToken ¶
type IdentityToken struct {
Jwt string `json:"identityToken"`
}
type InstallationRequest ¶ added in v0.1.0
type InstallationResponse ¶ added in v0.1.0
type InstallationResponse struct {
ClientCode int `json:"clientCode"`
UserName string `json:"username"`
Password string `json:"password"`
}
func CreateInstallation ¶ added in v0.1.0
func CreateInstallation(baseUrl, partnerKey string, in *InstallationRequest, cli *http.Client) (*InstallationResponse, error)
type InvoiceRow ¶
type InvoiceRow struct {
RowID string `json:"rowID"`
ProductID string `json:"productID"`
Product *Product
ItemName string `json:"itemName"`
Barcode string `json:"barcode"`
VatrateID string `json:"vatrateID"`
Amount string `json:"amount"`
Price string `json:"price"`
Discount string `json:"discount"`
BillingStartDate string `json:"billingStartDate"`
BillingEndDate string `json:"billingEndDate"`
Code string `json:"code"`
FinalNetPrice float64 `json:"finalNetPrice"`
FinalPriceWithVAT float64 `json:"finalPriceWithVAT"`
RowNetTotal float64 `json:"rowNetTotal"`
RowVAT float64 `json:"rowVAT"`
RowTotal float64 `json:"rowTotal"`
CampaignIDs string `json:"campaignIDs"`
}
type InvoiceState ¶
type InvoiceState string
type JwtTokenResponse ¶ added in v0.1.0
type NetTotalsByRate ¶
type NetTotalsByRate struct {
}
type NetTotalsByRates ¶
type NetTotalsByRates []NetTotalsByRate
type NetTotalsByTaxRate ¶
type NetTotalsByTaxRates ¶
type NetTotalsByTaxRates []NetTotalsByTaxRate
type ObjAttribute ¶ added in v0.1.0
type PaymentAttribute ¶
type PaymentInfo ¶ added in v0.1.0
type PaymentInfo struct {
DocumentID int `json:"documentID"` // Invoice ID
Type string `json:"type"` // CASH, TRANSFER, CARD, CREDIT, GIFTCARD, CHECK, TIP
Date string `json:"date"`
Sum string `json:"sum"`
CurrencyCode string `json:"currencyCode"` // EUR, USD
Info string `json:"info"` // Information about the payer or payment transaction
Added uint64 `json:"added"`
}
type PaymentStatus ¶
type PaymentStatus string
type PaymentType ¶
type PaymentType string
type PointOfSale ¶
type PostCustomerResponse ¶
type PostCustomerResponse struct {
Status Status `json:"status"`
CustomerImportReports CustomerImportReports `json:"records"`
}
type PostPurchaseDocumentResponse ¶
type PostPurchaseDocumentResponse struct {
Status Status `json:"status"`
ImportReports PurchaseDocImportReports `json:"records"`
}
type PostSalesDocumentResponse ¶
type PostSalesDocumentResponse struct {
Status Status `json:"status"`
ImportReports SaleDocImportReports `json:"records"`
}
type Product ¶
type Product struct {
ProductID int `json:"productID"`
ParentProductID int `json:"parentProductID"`
Type string `json:"type"`
Name string `json:"name"`
Description string `json:"description"`
DescriptionLong string `json:"longdesc"`
Status string `json:"status"`
Code string `json:"code"`
Code2 string `json:"code2"`
Code3 *string `json:"code3"`
Price float64 `json:"price"`
PriceWithVat float32 `json:"priceWithVat"`
UnitName *string `json:"unitName"`
Images []ProductImage `json:"images"`
DisplayedInWebshop byte `json:"displayedInWebshop"`
CategoryId uint `json:"categoryID"`
CategoryName string `json:"categoryName"`
BrandID uint `json:"brandID"`
BrandName string `json:"brandName"`
GroupID uint `json:"groupID"`
GroupName string `json:"groupName"`
Warehouses map[uint]StockInfo `json:"warehouses"`
RelatedProducts []string `json:"relatedProducts"`
Vatrate float64 `json:"vatrate"`
ProductVariations []string `json:"productVariations"` // Variations of matrix product
VariationList []ProductVariaton `json:"variationList"`
}
Product ...
type ProductBrand ¶ added in v0.1.0
type ProductCategory ¶ added in v0.1.0
type ProductDimensions ¶ added in v0.1.0
type ProductGroup ¶ added in v0.1.0
type ProductGroup struct {
ID uint `json:"productGroupID"`
Name string `json:"name"`
ShowInWebshop string `json:"showInWebshop"`
NonDiscountable byte `json:"nonDiscountable"`
PositionNo int `json:"positionNo"`
ParentGroupID string `json:"parentGroupID"`
Added uint64 `json:"added"`
LastModified uint64 `json:"lastModified"`
SubGroups []ProductGroup `json:"subGroups"`
}
type ProductImage ¶ added in v0.1.0
type ProductImage struct {
PictureID string `json:"pictureID"`
Name string `json:"name"`
ThumbURL string `json:"thumbURL"`
SmallURL string `json:"smallURL"`
LargeURL string `json:"largeURL"`
FullURL string `json:"fullURL"`
External byte `json:"external"`
HostingProvider string `json:"hostingProvider"`
Hash *string `json:"hash"`
Tenant *string `json:"tenant"`
}
type ProductRow ¶
type ProductRow struct {
//ID of the product (SKU) sold. Either productID or serviceID can be set, but not both at the same time. Both can be omitted, however - in that case a free-text invoice row will be created.
ProductID string
ItemName string
//Sold quantity must be a decimal, and can not be zero.
Amount string
///Net sales price per item, pre-discount.
Price string
//Discount % that WILL BE SUBTRACTED from the price specified in previous parameter.
Discount string
//Customer requested delivery date for this specific item. You can also set a requested delivery date for the whole document, see deliveryDate above.
DeliveryDate string
//Billing start date. See previous field.
BillingStartDate string
//Billing end date. See previous field.
BillingEndDate string
// item vat rate
VatRate string
}
type ProductRows ¶
type ProductRows []ProductRow
type ProductUnit ¶
ProductUnit ...
type ProductVariaton ¶ added in v0.1.0
type ProductVariaton struct {
ProductID string `json:"productID"`
Name string `json:"name"`
Code string `json:"code"`
Code2 string `json:"code2"`
Dimensions []ProductDimensions `json:"dimensions"`
}
type Project ¶ added in v0.1.0
type Project struct {
ProjectID uint `json:"projectID"`
Name string `json:"name"`
CustomerID uint `json:"customerID"`
CustomerName string `json:"customerName"`
EmployeeID uint `json:"employeeID"`
EmployeeName string `json:"employeeName"`
TypeID uint `json:"typeID"`
TypeName string `json:"typeName"`
StatusID uint `json:"statusID"`
StatusName string `json:"statusName"`
StartDate string `json:"startDate"`
EndDate string `json:"endDate"`
Notes string `json:"notes"`
LastModified uint64 `json:"lastModified"`
}
type ProjectStatus ¶ added in v0.1.0
type PurchaseDocImportReport ¶
type PurchaseDocImportReports ¶
type PurchaseDocImportReports []PurchaseDocImportReport
type PurchaseDocumentConstructor ¶
type PurchaseDocumentConstructor struct {
DocumentData *DocumentData
PaymentParty *Customer
DeliveryParty *Customer
SellerParty *Customer
VatRates VatRates
}
type PurchaseDocumentConstructors ¶
type PurchaseDocumentConstructors []PurchaseDocumentConstructor
type SaleDocImportReport ¶
type SaleDocImportReports ¶
type SaleDocImportReports []SaleDocImportReport
type SaleDocument ¶
type SaleDocument struct {
ID int `json:"id"`
CurrencyRate string `json:"currencyRate"`
WarehouseID int `json:"warehouseID"`
Number string `json:"number"`
Date string `json:"date"`
Time string `json:"time"`
/*
Parties block
*/
//Payer if invoice_client_is_payer = 1
ClientID int `json:"clientID"`
//Recipient if invoice_client_is_payer = 1
ShipToID int `json:"shipToID"`
ShipTo *Customer
//Recipient if invoice_client_is_payer = 0
CustomerID int `json:"customerID"`
//Payer if invoice_client_is_payer = 0
PayerID int `json:"payerID"`
Payer *Customer
//Buyer represents IClient if invoice_client_is_payer = 1 OR Customer if invoice_client_is_payer = 0
Buyer *Customer
//Location for additional fields from getWarehouses request to be used in seller party address.
Location *Warehouse
AddressID int `json:"addressID"`
PayerAddressID int `json:"payerAddressID"`
ShipToAddressID string `json:"shipToAddressID"`
ContactID int `json:"contactID"`
EmployeeID int `json:"employeeID"`
PaymentDays string `json:"paymentDays"`
Confirmed string `json:"confirmed"`
Notes string `json:"notes"`
LastModified int `json:"lastModified"`
PackingUnitsDescription string `json:"packingUnitsDescription"`
CurrencyCode string `json:"currencyCode"`
ContactName string `json:"contactName"`
Type string `json:"type"`
InvoiceState string `json:"invoiceState"`
PaymentType string `json:"paymentType"`
BaseDocuments []BaseDocument `json:"baseDocuments"`
NetTotal float64 `json:"netTotal"`
VatTotal float64 `json:"vatTotal"`
VatTotalsByTaxRates VatTotalsByTaxRates `json:"vatTotalsByTaxRate"`
Rounding float64 `json:"rounding"`
Total float64 `json:"total"`
Paid string `json:"paid"`
PrintDiscounts int `json:"printDiscounts"`
ReferenceNumber string `json:"referenceNumber"`
CustomReferenceNumber string `json:"customReferenceNumber"`
PaymentStatus string `json:"paymentStatus"`
Penalty string `json:"penalty"`
InvoiceLink string `json:"invoiceLink"`
InvoiceRows []InvoiceRow `json:"rows"`
}
SaleDocument model
type SaleDocumentConstructor ¶
type SaleDocumentConstructor struct {
DocumentData *DocumentData
Attributes []*Attribute
PaymentParty *Customer
DeliveryParty *Customer
SellerParty *Customer
VatRates VatRates
}
SaleDocumentConstructor ..
type SessionInfo ¶
type SessionInfo struct {
SessionKey string `json:"sessionKey"`
}
type ShoppingCartProduct ¶ added in v0.1.0
type ShoppingCartProduct struct {
ProductID string `json:"productID"`
Amount string `json:"amount"`
OriginalPrice float64 `json:"originalPrice"`
OriginalPriceWithVAT float64 `json:"originalPriceWithVAT"`
FinalPrice float64 `json:"finalPrice"`
FinalPriceWithVAT float64 `json:"finalPriceWithVAT"`
Discount float64 `json:"discount"`
}
type ShoppingCartTotals ¶ added in v0.1.0
type ShoppingCartTotals struct {
Rows []ShoppingCartProduct `json:"rows"`
NetTotal float64 `json:"netTotal"`
VATTotal float64 `json:"vatTotal"`
Total float64 `json:"total"`
}
type Status ¶
type Status struct {
Request string `json:"request"`
RequestUnixTime int `json:"requestUnixTime"`
ResponseStatus string `json:"responseStatus"`
ErrorCode int `json:"errorCode"`
ErrorField string `json:"errorField"`
GenerationTime float64 `json:"generationTime"`
RecordsTotal int `json:"recordsTotal"`
RecordsInResponse int `json:"recordsInResponse"`
}
type Supplier ¶ added in v0.1.0
type Supplier struct {
SupplierId uint `json:"supplierID"`
SupplierType string `json:"supplierType"`
FullName string `json:"fullName"`
CompanyName string `json:"companyName"`
FirstName string `json:"firstName"`
LstName string `json:"lastName"`
GroupId uint `json:"groupID"`
GroupName string `json:"groupName"`
Phone string `json:"phone"`
Mobile string `json:"mobile"`
Email string `json:"email"`
Fax string `json:"fax"`
Code string `json:"code"`
IntegrationCode string `json:"integrationCode"`
VatrateID uint `json:"vatrateID"`
CurrencyCode string `json:"currencyCode"`
DeliveryTermsID uint `json:"deliveryTermsID"`
CountryId uint `json:"countryID"`
CountryName string `json:"countryName"`
CountryCode string `json:"countryCode"`
Address string `json:"address"`
Gln string `json:"GLN"`
Attributes []ObjAttribute `json:"attributes"`
// Detail fields
VatNumber string `json:"vatNumber"`
Skype string `json:"skype"`
Website string `json:"website"`
BankName string `json:"bankName"`
BankAccountNumber string `json:"bankAccountNumber"`
BankIBAN string `json:"bankIBAN"`
BankSWIFT string `json:"bankSWIFT"`
Birthday string `json:"birthday"`
CompanyID uint `json:"companyID"`
ParentCompanyName string `json:"parentCompanyName"`
SupplierManagerID uint `json:"supplierManagerID"`
SupplierManagerName string `json:"supplierManagerName"`
PaymentDays uint `json:"paymentDays"`
Notes string `json:"notes"`
LastModified string `json:"lastModified"`
Added uint64 `json:"added"`
}
type UserCredentials ¶
type UserRights ¶
type UserRights struct {
UserName string `json:"userName"`
}
type VatTotalsByRate ¶
type VatTotalsByRate struct {
}
type VatTotalsByRates ¶
type VatTotalsByRates []VatTotalsByRate
type VatTotalsByTaxRate ¶
type VatTotalsByTaxRates ¶
type VatTotalsByTaxRates []VatTotalsByTaxRate
type VerifyUserResponse ¶
type VerifyUserResponse struct {
Records []Records `json:"records"`
}
type Warehouse ¶
type Warehouse struct {
WarehouseID string `json:"warehouseID"`
PricelistID string `json:"pricelistID"`
PricelistID2 string `json:"pricelistID2"`
PricelistID3 string `json:"pricelistID3"`
PricelistID4 int `json:"pricelistID4"`
PricelistID5 int `json:"pricelistID5"`
Name string `json:"name"`
Code string `json:"code"`
AddressID int `json:"addressID"`
Address string `json:"address"`
Street string `json:"street"`
Address2 string `json:"address2"`
City string `json:"city"`
State string `json:"state"`
Country string `json:"country"`
ZIPcode string `json:"ZIPcode"`
StoreGroups string `json:"storeGroups"`
CompanyName string `json:"companyName"`
CompanyCode string `json:"companyCode"`
CompanyVatNumber string `json:"companyVatNumber"`
Phone string `json:"phone"`
Fax string `json:"fax"`
Email string `json:"email"`
Website string `json:"website"`
BankName string `json:"bankName"`
BankAccountNumber string `json:"bankAccountNumber"`
Iban string `json:"iban"`
Swift string `json:"swift"`
UsesLocalQuickButtons int `json:"usesLocalQuickButtons"`
DefaultCustomerGroupID int `json:"defaultCustomerGroupID"`
IsOfflineInventory int `json:"isOfflineInventory"`
TimeZone string `json:"timeZone"`
Attributes []struct {
AttributeName string `json:"attributeName"`
AttributeType string `json:"attributeType"`
AttributeValue string `json:"attributeValue"`
} `json:"attributes"`
}
type Warehouses ¶
type Warehouses []Warehouse
type WebshopClient ¶ added in v0.1.0
type WebshopClient struct {
ClientID string `json:"clientID"`
ClientUsername string `json:"clientUsername"`
ClientName string `json:"clientName"`
ClientFirstName string `json:"clientFirstName"`
ClientLastName string `json:"clientLastName"`
ClientGroupID string `json:"clientGroupID"`
ClientGroupName string `json:"clientGroupName"`
CompanyID string `json:"companyID"`
CompanyName string `json:"companyName"`
}
Click to show internal directories.
Click to hide internal directories.