Documentation
¶
Index ¶
- type AddCustomerRewardPointsResponse
- type AddCustomerRewardPointsResponseBulk
- type AddCustomerRewardPointsResponseBulkItem
- type AddCustomerRewardPointsResult
- type Attribute
- type Client
- func (cli *Client) AddCustomerRewardPoints(ctx context.Context, filters map[string]string) (AddCustomerRewardPointsResult, error)
- func (cli *Client) AddCustomerRewardPointsBulk(ctx context.Context, bulkFilters []map[string]interface{}, ...) (AddCustomerRewardPointsResponseBulk, error)
- func (cli *Client) DeleteCustomer(ctx context.Context, filters map[string]string) error
- func (cli *Client) DeleteCustomerBulk(ctx context.Context, customerMap []map[string]interface{}, ...) (DeleteCustomersResponseBulk, error)
- func (cli *Client) DeleteSupplier(ctx context.Context, filters map[string]string) error
- func (cli *Client) DeleteSupplierBulk(ctx context.Context, supplierMap []map[string]interface{}, ...) (DeleteSuppliersResponseBulk, error)
- func (cli *Client) GetCustomers(ctx context.Context, filters map[string]string) ([]Customer, error)
- func (cli *Client) GetCustomersBulk(ctx context.Context, bulkFilters []map[string]interface{}, ...) (GetCustomersResponseBulk, error)
- func (cli *Client) GetSuppliers(ctx context.Context, filters map[string]string) ([]Supplier, error)
- func (cli *Client) GetSuppliersBulk(ctx context.Context, bulkFilters []map[string]interface{}, ...) (GetSuppliersResponseBulk, error)
- func (cli *Client) SaveCustomer(ctx context.Context, filters map[string]string) (*CustomerImportReport, error)
- func (cli *Client) SaveCustomerBulk(ctx context.Context, customerMap []map[string]interface{}, ...) (SaveCustomerResponseBulk, error)
- func (cli *Client) SaveSupplier(ctx context.Context, filters map[string]string) (*CustomerImportReport, error)
- func (cli *Client) SaveSupplierBulk(ctx context.Context, supplierMap []map[string]interface{}, ...) (SaveSuppliersResponseBulk, error)
- func (cli *Client) ValidateCustomerUsername(ctx context.Context, username string) (bool, error)
- func (cli *Client) VerifyCustomerUser(ctx context.Context, username, password string) (*WebshopClient, error)
- type ContactPerson
- type ContactPersons
- type Customer
- type CustomerImportReport
- type CustomerImportReports
- type CustomerListingDataProvider
- type CustomerRequest
- type Customers
- type DeleteCustomerResponse
- type DeleteCustomerResponseBulkItem
- type DeleteCustomersResponseBulk
- type DeleteSupplierResponse
- type DeleteSuppliersResponseBulk
- type DeleteSuppliersResponseBulkItem
- type GetCustomersResponse
- type GetCustomersResponseBulk
- type GetCustomersResponseBulkItem
- type GetSuppliersResponse
- type GetSuppliersResponseBulk
- type GetSuppliersResponseBulkItem
- type Manager
- type PostCustomerResponse
- type SaveCustomerResp
- type SaveCustomerResponseBulk
- type SaveCustomerResponseBulkItem
- type SaveSupplierResp
- type SaveSuppliersResponseBulk
- type SaveSuppliersResponseBulkItem
- type Supplier
- type SupplierListingDataProvider
- type WebshopClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddCustomerRewardPointsResponse ¶ added in v1.14.0
type AddCustomerRewardPointsResponse struct {
Status sharedCommon.Status `json:"status"`
AddCustomerRewardPointsResults []AddCustomerRewardPointsResult `json:"records"`
}
type AddCustomerRewardPointsResponseBulk ¶ added in v1.14.0
type AddCustomerRewardPointsResponseBulk struct {
Status sharedCommon.Status `json:"status"`
BulkItems []AddCustomerRewardPointsResponseBulkItem `json:"requests"`
}
type AddCustomerRewardPointsResponseBulkItem ¶ added in v1.14.0
type AddCustomerRewardPointsResponseBulkItem struct {
Status sharedCommon.StatusBulk `json:"status"`
AddCustomerRewardPointsResults []AddCustomerRewardPointsResult `json:"records"`
}
type AddCustomerRewardPointsResult ¶ added in v1.14.0
type Attribute ¶
type Attribute struct {
Name string `json:"attributeNam"`
Type string `json:"attributeType"`
Value string `json:"attributeValue"`
}
Attribute field
type Client ¶
func (*Client) AddCustomerRewardPoints ¶ added in v1.14.0
func (*Client) AddCustomerRewardPointsBulk ¶ added in v1.14.0
func (*Client) DeleteCustomer ¶ added in v1.15.0
func (*Client) DeleteCustomerBulk ¶ added in v1.15.0
func (*Client) DeleteSupplier ¶ added in v1.9.1
DeleteSupplier https://learn-api.erply.com/requests/deletesupplier/
func (*Client) DeleteSupplierBulk ¶ added in v1.9.1
func (*Client) GetCustomers ¶
GetCustomers will list customers according to specified filters.
func (*Client) GetCustomersBulk ¶ added in v1.7.5
func (cli *Client) GetCustomersBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetCustomersResponseBulk, error)
GetCustomersBulk will list customers according to specified filters sending a bulk request to fetch more customers than the default limit
func (*Client) GetSuppliers ¶
GetSuppliers will list suppliers according to specified filters.
func (*Client) GetSuppliersBulk ¶ added in v1.3.1
func (cli *Client) GetSuppliersBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetSuppliersResponseBulk, error)
GetSuppliersBulk will list suppliers according to specified filters sending a bulk request to fetch more suppliers than the default limit
func (*Client) SaveCustomer ¶
func (*Client) SaveCustomerBulk ¶ added in v1.15.0
func (*Client) SaveSupplier ¶
func (*Client) SaveSupplierBulk ¶ added in v1.4.0
func (*Client) ValidateCustomerUsername ¶
func (*Client) VerifyCustomerUser ¶
func (cli *Client) VerifyCustomerUser(ctx context.Context, username, password string) (*WebshopClient, error)
username and password are required fields here
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"`
PayerID int `json:"payerID,omitempty"`
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"`
GLN string `json:"GLN"`
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 sharedCommon.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"`
Attributes []sharedCommon.ObjAttribute `json:"attributes"`
Credit int `json:"credit"`
CompanyTypeID int `json:"companyTypeID"`
PersonTitleID int `json:"personTitleID"`
EmailEnabled int `json:"emailEnabled"`
MailEnabled int `json:"mailEnabled"`
EInvoiceEnabled int `json:"eInvoiceEnabled"`
FlagStatus int `json:"flagStatus"`
OperatorIdentifier string `json:"operatorIdentifier"`
Gender string `json:"gender"`
GroupName string `json:"groupName"`
Mobile string `json:"mobile"`
Birthday string `json:"birthday"`
IntegrationCode string `json:"integrationCode"`
ColorStatus string `json:"colorStatus"`
FactoringContractNumber string `json:"factoringContractNumber"`
Image string `json:"image"`
TwitterID string `json:"twitterID"`
FacebookName string `json:"facebookName"`
CreditCardLastNumbers string `json:"creditCardLastNumbers"`
EuCustomerType string `json:"euCustomerType"`
CustomerCardNumber string `json:"customerCardNumber"`
LastModifierUsername string `json:"lastModifierUsername"`
DefaultAssociationName string `json:"defaultAssociationName"`
DefaultProfessionalName string `json:"defaultProfessionalName"`
TaxExempt int `json:"taxExempt"`
PaysViaFactoring int `json:"paysViaFactoring"`
SalesBlocked int `json:"salesBlocked"`
RewardPointsDisabled int `json:"rewardPointsDisabled"`
CustomerBalanceDisabled int `json:"customerBalanceDisabled"`
PosCouponsDisabled int `json:"posCouponsDisabled"`
EmailOptOut int `json:"emailOptOut"`
ShipGoodsWithWaybills int `json:"shipGoodsWithWaybills"`
DefaultAssociationID int `json:"defaultAssociationID"`
DefaultProfessionalID int `json:"defaultProfessionalID"`
// Web-shop related fields
Username string `json:"webshopUsername"`
LastLogin string `json:"webshopLastLogin"`
}
type CustomerImportReport ¶
type CustomerImportReports ¶
type CustomerImportReports []CustomerImportReport
type CustomerListingDataProvider ¶ added in v1.7.5
type CustomerListingDataProvider struct {
// contains filtered or unexported fields
}
func NewCustomerListingDataProvider ¶ added in v1.7.5
func NewCustomerListingDataProvider(erplyClient Manager) *CustomerListingDataProvider
type CustomerRequest ¶
type CustomerRequest 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 DeleteCustomerResponse ¶ added in v1.15.0
type DeleteCustomerResponse struct {
Status sharedCommon.Status `json:"status"`
}
type DeleteCustomerResponseBulkItem ¶ added in v1.15.0
type DeleteCustomerResponseBulkItem struct {
Status sharedCommon.StatusBulk `json:"status"`
}
type DeleteCustomersResponseBulk ¶ added in v1.15.0
type DeleteCustomersResponseBulk struct {
Status sharedCommon.Status `json:"status"`
BulkItems []DeleteCustomerResponseBulkItem `json:"requests"`
}
type DeleteSupplierResponse ¶ added in v1.9.1
type DeleteSupplierResponse struct {
Status sharedCommon.Status `json:"status"`
}
type DeleteSuppliersResponseBulk ¶ added in v1.9.1
type DeleteSuppliersResponseBulk struct {
Status sharedCommon.Status `json:"status"`
BulkItems []DeleteSuppliersResponseBulkItem `json:"requests"`
}
type DeleteSuppliersResponseBulkItem ¶ added in v1.9.1
type DeleteSuppliersResponseBulkItem struct {
Status sharedCommon.StatusBulk `json:"status"`
}
type GetCustomersResponse ¶
type GetCustomersResponse struct {
Status sharedCommon.Status `json:"status"`
Customers Customers `json:"records"`
}
type GetCustomersResponseBulk ¶ added in v1.7.5
type GetCustomersResponseBulk struct {
Status sharedCommon.Status `json:"status"`
BulkItems []GetCustomersResponseBulkItem `json:"requests"`
}
type GetCustomersResponseBulkItem ¶ added in v1.7.5
type GetCustomersResponseBulkItem struct {
Status sharedCommon.StatusBulk `json:"status"`
Customers Customers `json:"records"`
}
type GetSuppliersResponse ¶ added in v1.3.1
type GetSuppliersResponse struct {
Status sharedCommon.Status `json:"status"`
Suppliers []Supplier `json:"records"`
}
GetSuppliersResponse
type GetSuppliersResponseBulk ¶ added in v1.3.1
type GetSuppliersResponseBulk struct {
Status sharedCommon.Status `json:"status"`
BulkItems []GetSuppliersResponseBulkItem `json:"requests"`
}
type GetSuppliersResponseBulkItem ¶ added in v1.3.1
type GetSuppliersResponseBulkItem struct {
Status sharedCommon.StatusBulk `json:"status"`
Suppliers []Supplier `json:"records"`
}
type Manager ¶
type Manager interface {
SaveCustomer(ctx context.Context, filters map[string]string) (*CustomerImportReport, error)
SaveCustomerBulk(ctx context.Context, customerMap []map[string]interface{}, attrs map[string]string) (SaveCustomerResponseBulk, error)
GetCustomers(ctx context.Context, filters map[string]string) ([]Customer, error)
GetCustomersBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetCustomersResponseBulk, error)
DeleteCustomer(ctx context.Context, filters map[string]string) error
DeleteCustomerBulk(ctx context.Context, customerMap []map[string]interface{}, attrs map[string]string) (DeleteCustomersResponseBulk, error)
VerifyCustomerUser(ctx context.Context, username, password string) (*WebshopClient, error)
ValidateCustomerUsername(ctx context.Context, username string) (bool, error)
GetSuppliers(ctx context.Context, filters map[string]string) ([]Supplier, error)
GetSuppliersBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (GetSuppliersResponseBulk, error)
SaveSupplier(ctx context.Context, filters map[string]string) (*CustomerImportReport, error)
SaveSupplierBulk(ctx context.Context, suppliers []map[string]interface{}, attrs map[string]string) (SaveSuppliersResponseBulk, error)
DeleteSupplier(ctx context.Context, filters map[string]string) error
DeleteSupplierBulk(ctx context.Context, supplierMap []map[string]interface{}, attrs map[string]string) (DeleteSuppliersResponseBulk, error)
AddCustomerRewardPoints(ctx context.Context, filters map[string]string) (AddCustomerRewardPointsResult, error)
AddCustomerRewardPointsBulk(ctx context.Context, bulkFilters []map[string]interface{}, baseFilters map[string]string) (AddCustomerRewardPointsResponseBulk, error)
}
type PostCustomerResponse ¶
type PostCustomerResponse struct {
Status sharedCommon.Status `json:"status"`
CustomerImportReports CustomerImportReports `json:"records"`
}
type SaveCustomerResp ¶ added in v1.15.0
type SaveCustomerResponseBulk ¶ added in v1.15.0
type SaveCustomerResponseBulk struct {
Status sharedCommon.Status `json:"status"`
BulkItems []SaveCustomerResponseBulkItem `json:"requests"`
}
type SaveCustomerResponseBulkItem ¶ added in v1.15.0
type SaveCustomerResponseBulkItem struct {
Status sharedCommon.StatusBulk `json:"status"`
Records []SaveCustomerResp `json:"records"`
}
type SaveSupplierResp ¶ added in v1.4.0
type SaveSupplierResp struct {
SupplierID int `json:"supplierID"`
AlreadyExists bool `json:"alreadyExists"`
}
SaveSupplierResp
type SaveSuppliersResponseBulk ¶ added in v1.4.0
type SaveSuppliersResponseBulk struct {
Status sharedCommon.Status `json:"status"`
BulkItems []SaveSuppliersResponseBulkItem `json:"requests"`
}
type SaveSuppliersResponseBulkItem ¶ added in v1.4.0
type SaveSuppliersResponseBulkItem struct {
Status sharedCommon.StatusBulk `json:"status"`
Records []SaveSupplierResp `json:"records"`
}
type Supplier ¶
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 []sharedCommon.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 SupplierListingDataProvider ¶ added in v1.6.2
type SupplierListingDataProvider struct {
// contains filtered or unexported fields
}
func NewSupplierListingDataProvider ¶ added in v1.15.0
func NewSupplierListingDataProvider(erplyClient Manager) *SupplierListingDataProvider
type WebshopClient ¶
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.