Documentation
¶
Index ¶
- type BillingAddress
- type Category
- type Coupon
- type FeeLine
- type Image
- type LineItem
- type MetaData
- type Order
- type OrderRefund
- type Product
- type ProductAttribute
- type ProductCategory
- type ProductVariation
- type ProductVariationAttribute
- type Refund
- type ShippingAddress
- type ShippingLine
- type Tax
- type TaxLine
- type Woo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BillingAddress ¶
type BillingAddress struct {
ShippingAddress
Email string `json:"email"`
Phone string `json:"phone"`
}
type Coupon ¶
type Coupon struct {
ID int `json:"id,omitempty"`
Code string `json:"code,omitempty"`
Amount string `json:"amount"`
}
Coupon : "discount_type", "date_expires", "individual_use",... | currently assume that only one type is used and no expires TODO: add logic to differentiate types
type LineItem ¶
type LineItem struct {
ID int `json:"id"`
Name string `json:"name"`
ProductID int `json:"product_id"`
VariationID *int `json:"variation_id"`
Quantity int `json:"quantity"`
TaxClass string `json:"tax_class"`
SubTotal string `json:"subtotal"`
SubTotalTax string `json:"subtotal_tax"`
Total string `json:"total"`
TotalTax string `json:"total_tax"`
Taxes []Tax `json:"taxes"`
MetaData []MetaData `json:"meta_data"`
SKU string `json:"sku"`
Price float32 `json:"price"`
Categories []ProductCategory `json:"_al_categories"`
}
type Order ¶
type Order struct {
ID int `json:"id"`
Number string `json:"number"`
DiscountTotal string `json:"discount_total"`
DiscountTax string `json:"discount_tax"`
ShippingTotal string `json:"shipping_total"`
ShippingTax string `json:"shipping_tax"`
CartTax string `json:"cart_tax"`
Total string `json:"total"`
TotalTax string `json:"total_tax"`
PricesIncludeTax bool `json:"prices_include_tax"`
CustomerNote string `json:"customer_note"`
Billing BillingAddress `json:"billing"`
Shipping ShippingAddress `json:"shipping"`
MetaData []MetaData `json:"meta_data"`
LineItems []LineItem `json:"line_items"`
TaxLines []TaxLine `json:"tax_lines"`
ShippingLines []ShippingLine `json:"shipping_lines"`
FeeLines []FeeLine `json:"fee_lines"`
Refunds []OrderRefund `json:"refunds"`
DateCreatedGMT string `json:"date_created_gmt"`
}
func (*Order) GetDeliveryDate ¶
func (*Order) GetDeliveryTime ¶
func (*Order) GetInvoiceNumber ¶
func (*Order) GetShippingMethod ¶
func (*Order) GetStoreKey ¶
type OrderRefund ¶
type Product ¶
type Product struct {
ID int `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Status string `json:"status"`
SKU string `json:"sku"`
Price string `json:"price"`
RegularPrice string `json:"regular_price"`
SalePrice string `json:"sale_price"`
TaxClass string `json:"tax_class"`
Categories []Category `json:"categories"`
Images []Image `json:"images"`
Attributes []ProductAttribute `json:"attributes"`
Variations []int `json:"variations"`
}
type ProductAttribute ¶
type ProductCategory ¶
type ProductVariation ¶
type ProductVariation struct {
ID int `json:"id"`
Price string `json:"price"`
RegularPrice string `json:"regular_price"`
SalePrice string `json:"sale_price"`
Attributes []ProductVariationAttribute `json:"attributes"`
}
type Refund ¶
type Refund struct {
ID int `json:"id"`
DateCreated string `json:"date_created"`
DateCreatedGMT string `json:"date_created_gmt"`
Amount string `json:"amount"`
Reason string `json:"reason"`
MetaData []MetaData `json:"meta_data"`
LineItems []LineItem `json:"line_items"`
TaxLines []TaxLine `json:"tax_lines"`
FeeLines []FeeLine `json:"fee_lines"`
}
type ShippingAddress ¶
type ShippingLine ¶
type TaxLine ¶
type TaxLine struct {
ID int `json:"id"`
RateCode string `json:"rate_code"`
RateID int `json:"rate_id"`
Label string `json:"label"`
Compound bool `json:"compound"`
TaxTotal string `json:"tax_total"`
ShippingTaxTotal string `json:"shipping_tax_total"`
RatePercent int `json:"rate_percent"`
MetaData []MetaData `json:"meta_data"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.