responses

package
v0.0.0-...-1aaf8f9 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStringFromSqlNullString

func NewStringFromSqlNullString(nullString sql.NullString) *string

Types

type AFS

type AFS struct {
	StockItemID uint   `json:"stockItemId"`
	SKU         string `json:"sku"`
	AFS         int    `json:"afs"`
}

func NewAFSFromModel

func NewAFSFromModel(afs *models.AFS) *AFS

type Address

type Address struct {
	ID          uint    `json:"id"`
	Name        string  `json:"name"`
	Region      Region  `json:"region"`
	City        string  `json:"city"`
	Zip         string  `json:"zip"`
	Address1    string  `json:"address1"`
	Address2    *string `json:"address2"`
	PhoneNumber string  `json:"phoneNumber"`
}

func NewAddressFromModel

func NewAddressFromModel(model *models.Address) *Address

type Carrier

type Carrier struct {
	ID               uint   `json:"id"`
	Name             string `json:"name"`
	TrackingTemplate string `json:"trackingTemplate"`
	Scope            string `json:"scope"`
}

func NewCarrierFromModel

func NewCarrierFromModel(carrier *models.Carrier) *Carrier

type CreditCardTransaction

type CreditCardTransaction struct {
	ID         uint   `json:"id"`
	Brand      string `json:"brand"`
	HolderName string `json:"holderName"`
	LastFour   string `json:"lastFour"`
	ExpMonth   uint   `json:"expMonth"`
	ExpYear    uint   `json:"expYear"`
	Amount     uint   `json:"amount"`
	CreatedAt  string `json:"createdAt"`
}

type Error

type Error struct {
	Errors []string `json:"errors"`
}

func (Error) GetAllErrors

func (err Error) GetAllErrors() []string

type ErrorResponse

type ErrorResponse interface {
	GetAllErrors() []string
}

type GiftCardTransaction

type GiftCardTransaction struct {
	ID        uint   `json:"id"`
	Code      string `json:"code"`
	Amount    uint   `json:"amount"`
	CreatedAt string `json:"createdAt"`
}

type InvalidSKUItemError

type InvalidSKUItemError struct {
	Sku   string `json:"sku"`
	Afs   int    `json:"afs"`
	Debug string `json:"debug"`
}

func (*InvalidSKUItemError) Error

func (err *InvalidSKUItemError) Error() string

type Money

type Money struct {
	Currency string `json:"currency"`
	Value    int    `json:"value"`
}

type Region

type Region struct {
	ID          uint   `json:"id"`
	Name        string `json:"name"`
	CountryID   uint   `json:"countryId"`
	CountryName string `json:"countryName"`
}

func NewRegionFromModel

func NewRegionFromModel(model *models.Region) *Region

type ReservationError

type ReservationError struct {
	Errors []InvalidSKUItemError `json:"errors"`
}

func NewReservationError

func NewReservationError(aggregateErrors []error) (*ReservationError, error)

func (ReservationError) GetAllErrors

func (err ReservationError) GetAllErrors() []string

type SKU

type SKU struct {
	ID    uint   `json:"id"`
	Code  string `json:"code"`
	UPC   string `json:"upc"`
	Title string `json:"title"`

	UnitCost Money  `json:"unitCost"`
	TaxClass string `json:"taxClass"`

	RequiresShipping bool   `json:"requiresShipping"`
	ShippingClass    string `json:"shippingClass"`

	IsReturnable bool      `json:"isReturnable"`
	ReturnWindow dimension `json:"returnWindow"`

	Height dimension `json:"height"`
	Weight dimension `json:"weight"`
	Length dimension `json:"length"`
	Width  dimension `json:"width"`

	RequiresInventoryTracking bool          `json:"requiresInventoryTracking"`
	InventoryWarningLevel     quantityLevel `json:"inventoryWarningLevel"`
	MaximumQuantityInCart     quantityLevel `json:"maximumQuantityInCart"`
	MinimumQuantityInCart     quantityLevel `json:"minimumQuantityInCart"`

	AllowBackorder bool `json:"allowBackorder"`
	AllowPreorder  bool `json:"allowPreorder"`

	RequiresLotTracking           bool      `json:"requiresLotTracking"`
	LotExpirationThreshold        dimension `json:"lotExpirationThreshold"`
	LotExpirationWarningThreshold dimension `json:"lotExpirationWarningThreshold"`
}

func NewSKUFromModel

func NewSKUFromModel(sku *models.SKU) *SKU

type Shipment

type Shipment struct {
	ID                uint               `json:"id"`
	ReferenceNumber   string             `json:"referenceNumber"`
	ShippingMethod    ShippingMethod     `json:"shippingMethod"`
	OrderRefNum       string             `json:"orderRefNum"`
	State             string             `json:"state"`
	ShipmentDate      *string            `json:"shipmentDate"`
	EstimatedArrival  *string            `json:"estimatedArrival"`
	DeliveredDate     *string            `json:"deliveredDate"`
	Address           Address            `json:"address"`
	ShipmentLineItems []ShipmentLineItem `json:"lineItems"`
	TrackingNumber    *string            `json:"trackingNumber"`
	ShippingPrice     int                `json:"shippingPrice"`
	Scope             string             `json:"scope"`
}

func NewShipmentFromModel

func NewShipmentFromModel(model *models.Shipment) (*Shipment, error)

type ShipmentLineItem

type ShipmentLineItem struct {
	ID               uint     `json:"id"`
	ReferenceNumbers []string `json:"referenceNumbers"`
	SKU              string   `json:"sku"`
	Name             string   `json:"name"`
	Price            uint     `json:"price"`
	ImagePath        string   `json:"imagePath"`
}

func NewShipmentLineItemFromModel

func NewShipmentLineItemFromModel(model *models.ShipmentLineItem) *ShipmentLineItem

type Shipments

type Shipments struct {
	Shipments []Shipment `json:"shipments"`
}

type ShippingMethod

type ShippingMethod struct {
	ID           uint    `json:"id"`
	Carrier      Carrier `json:"carrier"`
	Name         string  `json:"name"`
	Code         string  `json:"code"`
	ShippingType string  `json:"type"`
	Cost         uint    `json:"cost"`
	Scope        string  `json:"scope"`
}

func NewShippingMethodFromModel

func NewShippingMethodFromModel(shippingMethod *models.ShippingMethod) (*ShippingMethod, error)

type SkuAfs

type SkuAfs struct {
	Sellable    int `json:"sellable"`
	NonSellable int `json:"nonSellable"`
	Backorder   int `json:"backorder"`
	Preorder    int `json:"preorder"`
}

type StockItem

type StockItem struct {
	ID              uint   `json:"id"`
	SKU             string `json:"sku"`
	StockLocationID uint   `json:"stockLocationId"`
	DefaultUnitCost int    `json:"defaultUnitCost"`
}

func NewStockItemFromModel

func NewStockItemFromModel(si *models.StockItem) *StockItem

type StockItemSummary

type StockItemSummary struct {
	Summary []stockItemSummary `json:"summary"`
}

func NewSummaryFromModel

func NewSummaryFromModel(summaries []*models.StockItemSummary) *StockItemSummary

type StockLocation

type StockLocation struct {
	ID      uint     `json:"id"`
	Name    string   `json:"name"`
	Type    string   `json:"type"`
	Address *Address `json:"address,omitempty"`
	Scope   string   `json:"scope"`
}

func NewStockLocationFromModel

func NewStockLocationFromModel(location *models.StockLocation) *StockLocation

func NewStockLocationsFromModels

func NewStockLocationsFromModels(locations []*models.StockLocation) []*StockLocation

type StoreCreditTransaction

type StoreCreditTransaction struct {
	ID        uint   `json:"id"`
	Amount    uint   `json:"amount"`
	CreatedAt string `json:"createdAt"`
}

Jump to

Keyboard shortcuts

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