Documentation
¶
Index ¶
- Constants
- type BaseLinker
- func (baseLiner *BaseLinker) GetJournal(parameters GetJournalListParameters) ([]Log, Error)
- func (baseLiner *BaseLinker) GetOrder(orderId int, unconfirmed bool) (Order, Error)
- func (baseLiner *BaseLinker) GetOrders(parameters GetOrdersListParameters) ([]Order, Error)
- func (baseLiner *BaseLinker) GetProduct(storageId, productId string) (Product, Error)
- func (baseLiner *BaseLinker) GetProductDetails(storageId, productId string) (Product, Error)
- func (baseLiner *BaseLinker) GetProductsList(parameters GetProductsListParameters) ([]Product, Error)
- func (baseLiner *BaseLinker) GetProdutsDetails(parameters GetProductsDetailsParameters) ([]Product, Error)
- type BaseResponse
- type Error
- type GetJournalListParameters
- type GetJournalListResponse
- type GetOrdersListParameters
- type GetOrdersListResponse
- type GetProductsDetailsParameters
- type GetProductsListParameters
- type GetProductsResponse
- type Log
- type Order
- type Product
Constants ¶
View Source
const ( ErrorNoCode = "ERROR_NO_CODE" ErrorCodeAccountBlocked = "ERROR_USER_ACCOUNT_BLOCKED" )
View Source
const ( LogTypeCreateNewOrder = 1 LogTypeChangeOrderStatus = 18 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseLinker ¶
func NewBaseLinker ¶
func NewBaseLinker(url string, token string) *BaseLinker
func (*BaseLinker) GetJournal ¶
func (baseLiner *BaseLinker) GetJournal(parameters GetJournalListParameters) ([]Log, Error)
Documentation: https://api.baselinker.com/index.php?method=getJournalList
func (*BaseLinker) GetOrder ¶
func (baseLiner *BaseLinker) GetOrder(orderId int, unconfirmed bool) (Order, Error)
func (*BaseLinker) GetOrders ¶
func (baseLiner *BaseLinker) GetOrders(parameters GetOrdersListParameters) ([]Order, Error)
Documentation: https://api.baselinker.com/index.php?method=getOrders
func (*BaseLinker) GetProduct ¶
func (baseLiner *BaseLinker) GetProduct(storageId, productId string) (Product, Error)
func (*BaseLinker) GetProductDetails ¶
func (baseLiner *BaseLinker) GetProductDetails(storageId, productId string) (Product, Error)
func (*BaseLinker) GetProductsList ¶
func (baseLiner *BaseLinker) GetProductsList(parameters GetProductsListParameters) ([]Product, Error)
Documentation: https://api.baselinker.com/index.php?method=getProductsList
func (*BaseLinker) GetProdutsDetails ¶
func (baseLiner *BaseLinker) GetProdutsDetails(parameters GetProductsDetailsParameters) ([]Product, Error)
Documentation: https://api.baselinker.com/index.php?method=getProductsData
type BaseResponse ¶
type BaseResponse struct { Status string `json:"status"` ErrorMessage string `json:"error_message"` ErrorCode string `json:"error_code"` }
func NewSimpleError ¶
func NewSimpleError(err error) *BaseResponse
func (*BaseResponse) CodeError ¶
func (baseLinkerResponse *BaseResponse) CodeError() string
func (*BaseResponse) Error ¶
func (baseLinkerResponse *BaseResponse) Error() string
func (*BaseResponse) IsSuccess ¶
func (baseLinkerResponse *BaseResponse) IsSuccess() bool
type GetJournalListResponse ¶
type GetJournalListResponse struct { *BaseResponse Logs []Log `json:"logs"` }
type GetOrdersListParameters ¶
type GetOrdersListParameters struct { Unconfirmed bool `json:"get_unconfirmed_orders"` ConfirmedOn int `json:"date_confirmed_from,omitempty"` FromOn int `json:"date_from,omitempty"` FromId int `json:"id_from,omitempty"` OrderId int `json:"order_id,omitempty"` StatusId int `json:"status_id,omitempty"` FilterByEmail string `json:"filter_email,omitempty"` }
type GetOrdersListResponse ¶
type GetOrdersListResponse struct { *BaseResponse Orders []Order `json:"orders"` }
type GetProductsListParameters ¶
type GetProductsListParameters struct { StorageId string `json:"storage_id"` FilterCategoryId string `json:"filter_category_id,omitempty"` FilterSort string `json:"filter_sort,omitempty"` FilterId string `json:"filter_id,omitempty"` FilterEan string `json:"filter_ean,omitempty"` FilterSku string `json:"filter_sku,omitempty"` FilterName string `json:"filter_name,omitempty"` FilterPriceFrom float32 `json:"filter_price_from,omitempty"` FilterPriceTo float32 `json:"filter_price_to,omitempty"` FilterQuantityFrom int `json:"filter_quantity_from,omitempty"` FilterQuantityTo int `json:"filter_quantity_to,omitempty"` FilterAvailable int `json:"filter_available,omitempty"` Page int `json:"page,omitempty"` }
type GetProductsResponse ¶
type GetProductsResponse struct { *BaseResponse Products []Product `json:"products"` }
type Order ¶
type Order struct { Id int `json:"order_id"` Phone string `json:"phone"` Email string `json:"email"` Products []Product `json:"products"` // Invoice InvoiceNip string `json:"invoice_nip"` InvoiceClientName string `json:"invoice_fullname"` InvoiceCompanyName string `json:"invoice_company"` // Client ClientName string `json:"delivery_fullname"` ClientCompanyName string `json:"delivery_company"` ClientCity string `json:"delivery_city"` ClientStreet string `json:"delivery_address"` ClientPostalCode string `json:"delivery_postcode"` }
func (*Order) GetClientFullName ¶
func (*Order) HasInvoiceNip ¶
Click to show internal directories.
Click to hide internal directories.