Documentation
¶
Index ¶
- func NewStringFromSqlNullString(nullString sql.NullString) *string
- type AFS
- type Address
- type Carrier
- type CreditCardTransaction
- type Error
- type ErrorResponse
- type GiftCardTransaction
- type InvalidSKUItemError
- type Money
- type Region
- type ReservationError
- type SKU
- type Shipment
- type ShipmentLineItem
- type Shipments
- type ShippingMethod
- type SkuAfs
- type StockItem
- type StockItemSummary
- type StockLocation
- type StoreCreditTransaction
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 ¶
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 ¶
type Carrier ¶
type Carrier struct {
ID uint `json:"id"`
Name string `json:"name"`
TrackingTemplate string `json:"trackingTemplate"`
Scope string `json:"scope"`
}
func NewCarrierFromModel ¶
type CreditCardTransaction ¶
type ErrorResponse ¶
type ErrorResponse interface {
GetAllErrors() []string
}
type GiftCardTransaction ¶
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 Region ¶
type Region struct {
ID uint `json:"id"`
Name string `json:"name"`
CountryID uint `json:"countryId"`
CountryName string `json:"countryName"`
}
func NewRegionFromModel ¶
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 ¶
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"`
}
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 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 StockItem ¶
type StockItem struct {
ID uint `json:"id"`
SKU string `json:"sku"`
StockLocationID uint `json:"stockLocationId"`
DefaultUnitCost int `json:"defaultUnitCost"`
}
func NewStockItemFromModel ¶
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 ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.