model

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: MIT Imports: 8 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")
)

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"`
	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 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 {
	OrderItems []OrderItem `json:"OrderItems"`
}

func (*OrderItems) UnmarshalJSON

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

type Orders

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

func (*Orders) UnmarshalJSON

func (o *Orders) 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"`
	Categories               ScStringSlice          `json:"Categories"`
	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) UnmarshalJSON

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

type ScFloat

type ScFloat float64

func (*ScFloat) UnmarshalJSON

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

type ScInt

type ScInt int

func (*ScInt) UnmarshalJSON

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

type ScStringSlice

type ScStringSlice []string

func (*ScStringSlice) UnmarshalJSON

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

type ScTimestamp

type ScTimestamp time.Time

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

Jump to

Keyboard shortcuts

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