model

package
v1.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2019 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DeliveryTypeCrossdocking = DeliveryType("send_to_warehouse")
	DeliveryTypeDropshipping = DeliveryType("dropship")
	DeliveryTypePickup       = DeliveryType("pickup")

	DocumentTypeCarrierManifest = DocumentType("carrierManifest")
	DocumentTypeSerialNumber    = DocumentType("serialNumber")
	DocumentTypeExportInvoice   = DocumentType("exportInvoice")
	DocumentTypeInvoice         = DocumentType("invoice")
	DocumentTypeShippingLabel   = DocumentType("shippingLabel")
	DocumentTypeShippingParcel  = DocumentType("shippingParcel")

	FailureReasonCanceled       = FailureReasonType("canceled")
	FailureReasonReturned       = FailureReasonType("returned")
	FailureReasonFailed         = FailureReasonType("failed")
	FailureReasonReturnRejected = FailureReasonType("return_rejected")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	FirstName string `json:"FirstName"`
	LastName  string `json:"LastName"`
	Phone     string `json:"Phone"`
	Phone2    string `json:"Phone2"`
	Address1  string `json:"Address1"`
	Address2  string `json:"Address2"`
	Address3  string `json:"Address3"`
	Address4  string `json:"Address4"`
	Address5  string `json:"Address5"`
	City      string `json:"City"`
	Ward      string `json:"Ward"`
	Region    string `json:"Region"`
	PostCode  string `json:"PostCode"`
	Country   string `json:"Country"`
}

type Attribute

type Attribute struct {
	Label             string           `json:"Label"`
	Name              string           `json:"Name"`
	FeedName          string           `json:"FeedName"`
	GlobalIdentifier  string           `json:"GlobalIdentifier"`
	IsMandatory       ScBool           `json:"IsMandatory"`
	IsGlobalAttribute ScBool           `json:"IsGlobalAttribute"`
	Description       string           `json:"Description"`
	ProductType       string           `json:"ProductType"`
	InputType         string           `json:"InputType"`
	AttributeType     string           `json:"AttributeType"`
	ExampleValue      string           `json:"ExampleValue"`
	MaxLength         ScInt            `json:"MaxLength"`
	Options           AttributeOptions `json:"Options"`
}

type AttributeOption

type AttributeOption struct {
	GlobalIdentifier string `json:"GlobalIdentifier"`
	Name             string `json:"Name"`
	IsDefault        ScBool `json:"IsDefault"`
}

type AttributeOptions

type AttributeOptions []AttributeOption

func (*AttributeOptions) UnmarshalJSON

func (ao *AttributeOptions) UnmarshalJSON(b []byte) error

type Attributes

type Attributes struct {
	Attributes []Attribute `json:"Attribute"`
}

type Brand

type Brand struct {
	BrandId          ScInt  `json:"BrandId"`
	Name             string `json:"Name"`
	GlobalIdentifier string `json:"GlobalIdentifier"`
}

type Brands

type Brands struct {
	Brands []Brand `json:"Brand"`
}

type Categories

type Categories struct {
	Categories []Category `json:"Category"`
}

func (*Categories) UnmarshalJSON

func (c *Categories) UnmarshalJSON(b []byte) error

type Category

type Category struct {
	Name             string     `json:"Name"`
	CategoryId       ScInt      `json:"CategoryId"`
	AttributeSetId   ScInt      `json:"AttributeSetId"`
	GlobalIdentifier string     `json:"GlobalIdentifier"`
	Children         Categories `json:"Children"`
}

type CharData added in v1.1.0

type CharData string

func (CharData) MarshalXML added in v1.1.0

func (cd CharData) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type DeliveryType

type DeliveryType string

type Document

type Document struct {
	DocumentType string `json:"DocumentType"`
	MimeType     string `json:"MimeType"`
	File         string `json:"File"`
}

type DocumentType

type DocumentType string

type FailureReason added in v1.3.1

type FailureReason struct {
	Type FailureReasonType `json:"Type"`
	Name string            `json:"Name"`
}

type FailureReasonType added in v1.3.1

type FailureReasonType string

type FailureReasons added in v1.3.1

type FailureReasons struct {
	Reasons []FailureReason `json:"Reasons"`
}

func (*FailureReasons) UnmarshalJSON added in v1.3.1

func (fr *FailureReasons) UnmarshalJSON(b []byte) error

type Feed added in v1.1.0

type Feed struct {
	Feed             string                `json:"Feed"`
	Status           string                `json:"Status"`
	Action           string                `json:"Action"`
	CreationDate     ScTimestamp           `json:"CreationDate"`
	UpdatedDate      ScTimestamp           `json:"UpdatedDate"`
	Source           string                `json:"Source"`
	TotalRecords     ScInt                 `json:"TotalRecords"`
	ProcessedRecords ScInt                 `json:"ProcessedRecords"`
	FailedRecords    ScInt                 `json:"FailedRecords"`
	FailureReports   FeedFailureReportFile `json:"FailureReports"`
}

type FeedError added in v1.1.0

type FeedError struct {
	Code        string `json:"Code"`
	Message     string `json:"Message"`
	SellerSku   string `json:"SellerSku"`
	OrderId     string `json:"OrderId"`
	OrderItemId string `json:"OrderItemId"`
}

type FeedErrors added in v1.1.0

type FeedErrors struct {
	Errors []FeedError
}

func (*FeedErrors) UnmarshalJSON added in v1.1.0

func (fe *FeedErrors) UnmarshalJSON(b []byte) error

type FeedFailureReportFile added in v1.1.0

type FeedFailureReportFile struct {
	MimeType string `json:"MimeType"`
	File     string `json:"File"`
}

func (*FeedFailureReportFile) UnmarshalJSON added in v1.1.0

func (ffrf *FeedFailureReportFile) UnmarshalJSON(b []byte) error

type FeedList added in v1.1.0

type FeedList struct {
	Feeds []Feed `json:"Feeds"`
}

func (*FeedList) UnmarshalJSON added in v1.1.0

func (fl *FeedList) UnmarshalJSON(b []byte) error

type FeedStatus added in v1.1.0

type FeedStatus struct {
	Feed             string       `json:"Feed"`
	Status           string       `json:"Status"`
	Action           string       `json:"Action"`
	CreationDate     ScTimestamp  `json:"CreationDate"`
	UpdatedDate      ScTimestamp  `json:"UpdatedDate"`
	Source           string       `json:"Source"`
	TotalRecords     ScInt        `json:"TotalRecords"`
	ProcessedRecords ScInt        `json:"ProcessedRecords"`
	FailedRecords    ScInt        `json:"FailedRecords"`
	FeedErrors       FeedErrors   `json:"FeedErrors"`
	FeedWarnings     FeedWarnings `json:"FeedWarnings"`
}

type FeedWarning added in v1.1.0

type FeedWarning struct {
	Message     string `json:"Message"`
	SellerSku   string `json:"SellerSku"`
	OrderId     string `json:"OrderId"`
	OrderItemId string `json:"OrderItemId"`
}

type FeedWarnings added in v1.1.0

type FeedWarnings struct {
	Warnings []FeedWarning
}

func (*FeedWarnings) UnmarshalJSON added in v1.1.0

func (fw *FeedWarnings) UnmarshalJSON(b []byte) error

type Images

type Images []string

func (*Images) UnmarshalJSON

func (i *Images) UnmarshalJSON(b []byte) error

type IntSlice added in v1.1.0

type IntSlice []int

func (IntSlice) MarshalXML added in v1.1.0

func (is IntSlice) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type Order

type Order struct {
	OrderId                    ScInt       `json:"OrderId"`
	CustomerFirstName          string      `json:"CustomerFirstName"`
	CustomerLastName           string      `json:"CustomerLastName"`
	OrderNumber                string      `json:"OrderNumber"`
	PaymentMethod              string      `json:"PaymentMethod"`
	Remarks                    string      `json:"Remarks"`
	DeliveryInfo               string      `json:"DeliveryInfo"`
	Price                      ScFloat     `json:"Price"`
	GiftOption                 ScBool      `json:"GiftOption"`
	GiftMessage                string      `json:"GiftMessage"`
	VoucherCode                string      `json:"VoucherCode"`
	CreatedAt                  ScTimestamp `json:"CreatedAt"`
	UpdatedAt                  ScTimestamp `json:"UpdatedAt"`
	AddressBilling             Address     `json:"AddressBilling"`
	AddressShipping            Address     `json:"AddressShipping"`
	NationalRegistrationNumber string      `json:"NationalRegistrationNumber"`
	ItemsCount                 ScInt       `json:"ItemsCount"`
	PromisedShippingTime       ScTimestamp `json:"PromisedShippingTime"`
	ExtraAttributes            string      `json:"ExtraAttributes"`
	Statuses                   Status      `json:"Statuses"`
}

type OrderItem

type OrderItem struct {
	OrderItemId          ScInt       `json:"OrderItemId"`
	ShopId               string      `json:"ShopId"`
	OrderId              ScInt       `json:"OrderId"`
	Name                 string      `json:"Name"`
	Sku                  string      `json:"Sku"`
	Variation            string      `json:"Variation"`
	ShopSku              string      `json:"ShopSku"`
	ShippingType         string      `json:"ShippingType"`
	ItemPrice            ScFloat     `json:"ItemPrice"`
	PaidPrice            ScFloat     `json:"PaidPrice"`
	Currency             string      `json:"Currency"`
	WalletCredits        ScFloat     `json:"WalletCredits"`
	TaxAmount            ScFloat     `json:"TaxAmount"`
	CodCollectableAmount ScFloat     `json:"CodCollectableAmount"`
	ShippingAmount       ScFloat     `json:"ShippingAmount"`
	ShippingServiceCost  ScFloat     `json:"ShippingServiceCost"`
	VoucherAmount        ScFloat     `json:"VoucherAmount"`
	VoucherCode          string      `json:"VoucherCode"`
	Status               string      `json:"Status"`
	IsProcessable        ScBool      `json:"IsProcessable"`
	ShipmentProvider     string      `json:"ShipmentProvider"`
	IsDigital            ScBool      `json:"IsDigital"`
	DigitalDeliveryInfo  string      `json:"DigitalDeliveryInfo"`
	TrackingCode         string      `json:"TrackingCode"`
	TrackingCodePre      string      `json:"TrackingCodePre"`
	Reason               string      `json:"Reason"`
	ReasonDetail         string      `json:"ReasonDetail"`
	PurchaseOrderId      ScInt       `json:"PurchaseOrderId"`
	PurchaseOrderNumber  string      `json:"PurchaseOrderNumber"`
	PackageId            string      `json:"PackageId"`
	PromisedShippingTime ScTimestamp `json:"PromisedShippingTime"`
	ExtraAttributes      string      `json:"ExtraAttributes"`
	ShippingProviderType string      `json:"ShippingProviderType"`
	CreatedAt            ScTimestamp `json:"CreatedAt"`
	UpdatedAt            ScTimestamp `json:"UpdatedAt"`
	ReturnStatus         string      `json:"ReturnStatus"`
}

type OrderItems

type OrderItems struct {
	Items []OrderItem `json:"OrderItems"`
}

func (*OrderItems) UnmarshalJSON

func (oi *OrderItems) UnmarshalJSON(b []byte) error

type OrderWithItems added in v1.1.3

type OrderWithItems struct {
	OrderId     ScInt      `json:"OrderId"`
	OrderNumber string     `json:"OrderNumber"`
	OrderItems  OrderItems `json:"OrderItems"`
}

type Orders

type Orders struct {
	Orders []Order `json:"Orders"`
}

func (*Orders) UnmarshalJSON

func (o *Orders) UnmarshalJSON(b []byte) error

type OrdersWithItems added in v1.1.3

type OrdersWithItems struct {
	Orders []OrderWithItems `json:"Orders"`
}

func (*OrdersWithItems) UnmarshalJSON added in v1.1.3

func (o *OrdersWithItems) UnmarshalJSON(b []byte) error

type Product

type Product struct {
	SellerSku                string                 `json:"SellerSku"`
	ShopSku                  string                 `json:"ShopSku"`
	Name                     string                 `json:"Name"`
	Description              string                 `json:"Description"`
	Brand                    string                 `json:"Brand"`
	TaxClass                 string                 `json:"TaxClass"`
	Variation                string                 `json:"Variation"`
	ParentSku                string                 `json:"ParentSku"`
	Quantity                 ScInt                  `json:"Quantity"`
	FulfillmentByNonSellable ScBool                 `json:"FulfillmentByNonSellable"`
	Available                ScBool                 `json:"Available"`
	Price                    ScFloat                `json:"Price"`
	SalePrice                ScFloat                `json:"SalePrice"`
	SaleStartDate            ScTimestamp            `json:"SaleStartDate"`
	SaleEndDate              ScTimestamp            `json:"SaleEndDate"`
	Status                   string                 `json:"Status"`
	ProductId                string                 `json:"ProductId"`
	Url                      string                 `json:"Url"`
	MainImage                string                 `json:"MainImage"`
	Images                   Images                 `json:"Images"`
	PrimaryCategory          string                 `json:"PrimaryCategory"`
	PrimaryCategoryId        ScInt                  `json:"PrimaryCategoryId"`
	Categories               ScStringSlice          `json:"Categories"`
	CategoriesIds            ScIntSlice             `json:"CategoriesIds"`
	ProductData              map[string]interface{} `json:"ProductData"`
	BrowseNodes              ScStringSlice          `json:"BrowseNodes"`
	ShipmentType             string                 `json:"ShipmentType"`
	Condition                string                 `json:"Condition"`
}

type Products

type Products struct {
	Products []Product `json:"Products"`
}

func (*Products) UnmarshalJSON

func (p *Products) UnmarshalJSON(b []byte) error

type ScBool

type ScBool bool

func (ScBool) MarshalJSON added in v1.1.7

func (t ScBool) MarshalJSON() ([]byte, error)

func (*ScBool) UnmarshalJSON

func (t *ScBool) UnmarshalJSON(b []byte) error

type ScFloat

type ScFloat float64

func (ScFloat) MarshalJSON added in v1.1.7

func (f ScFloat) MarshalJSON() ([]byte, error)

func (*ScFloat) UnmarshalJSON

func (f *ScFloat) UnmarshalJSON(b []byte) error

type ScInt

type ScInt int

func (ScInt) MarshalJSON added in v1.1.7

func (i ScInt) MarshalJSON() ([]byte, error)

func (*ScInt) UnmarshalJSON

func (i *ScInt) UnmarshalJSON(b []byte) error

type ScIntSlice added in v1.3.5

type ScIntSlice []int

func (ScIntSlice) MarshalJSON added in v1.3.5

func (i ScIntSlice) MarshalJSON() ([]byte, error)

func (*ScIntSlice) UnmarshalJSON added in v1.3.5

func (i *ScIntSlice) UnmarshalJSON(b []byte) error

type ScStringSlice

type ScStringSlice []string

func (ScStringSlice) MarshalJSON added in v1.1.7

func (s ScStringSlice) MarshalJSON() ([]byte, error)

func (*ScStringSlice) UnmarshalJSON

func (s *ScStringSlice) UnmarshalJSON(b []byte) error

type ScTimestamp

type ScTimestamp time.Time

func (ScTimestamp) MarshalJSON added in v1.1.3

func (t ScTimestamp) MarshalJSON() ([]byte, error)

func (*ScTimestamp) UnmarshalJSON

func (t *ScTimestamp) UnmarshalJSON(b []byte) error

type Status

type Status []string

func (*Status) UnmarshalJSON

func (s *Status) UnmarshalJSON(b []byte) error

type Webhook added in v1.2.0

type Webhook struct {
	WebhookId     string        `json:"WebhookId"`
	CallbackUrl   string        `json:"CallbackUrl"`
	WebhookSource string        `json:"WebhookSource"`
	Events        WebhookEvents `json:"Events"`
}

type WebhookEntities added in v1.2.0

type WebhookEntities struct {
	WebhookEntities []WebhookEntity `json:"Entities"`
}

func (*WebhookEntities) UnmarshalJSON added in v1.2.0

func (w *WebhookEntities) UnmarshalJSON(b []byte) error

type WebhookEntity added in v1.2.0

type WebhookEntity struct {
	Name   string              `json:"Name"`
	Events WebhookEntityEvents `json:"Events"`
}

type WebhookEntityEvent added in v1.2.0

type WebhookEntityEvent struct {
	EventName  string `json:"EventName"`
	EventAlias string `json:"EventAlias"`
}

type WebhookEntityEvents added in v1.2.0

type WebhookEntityEvents struct {
	Events []WebhookEntityEvent `json:"Events"`
}

func (*WebhookEntityEvents) UnmarshalJSON added in v1.2.0

func (w *WebhookEntityEvents) UnmarshalJSON(b []byte) error

type WebhookEvent added in v1.2.0

type WebhookEvent string

type WebhookEvents added in v1.2.0

type WebhookEvents struct {
	Events []WebhookEvent `json:"Events"`
}

func (*WebhookEvents) UnmarshalJSON added in v1.2.0

func (w *WebhookEvents) UnmarshalJSON(b []byte) error

type Webhooks added in v1.2.0

type Webhooks struct {
	Webhooks []Webhook `json:"Webhooks"`
}

func (*Webhooks) UnmarshalJSON added in v1.2.0

func (w *Webhooks) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL