Documentation ¶
Index ¶
- Variables
- func CheckResponseError(resp *http.Response) error
- type Address
- type App
- type AppliedDiscount
- type Article
- type ArticleResource
- type ArticleService
- type ArticleServiceRequest
- func (r *ArticleServiceRequest) Authors() ([]string, error)
- func (r *ArticleServiceRequest) BlogTags(blogID int64, params interface{}) ([]string, error)
- func (r *ArticleServiceRequest) Count(blogID int64, params interface{}) (int64, error)
- func (r *ArticleServiceRequest) Create(blogID int64, params interface{}) (Article, error)
- func (r *ArticleServiceRequest) Delete(blogID int64, articleID int64) error
- func (r *ArticleServiceRequest) Find(blogID int64, articleID int64, params interface{}) (Article, error)
- func (r *ArticleServiceRequest) Get(blogID int64, params interface{}) ([]Article, error)
- func (r *ArticleServiceRequest) Paginate(blogID int64, params interface{}) (int64, []Article, error)
- func (r *ArticleServiceRequest) Tags(params interface{}) ([]string, error)
- func (r *ArticleServiceRequest) Update(blogID int64, articleID int64, params interface{}) (Article, error)
- type ArticlesResource
- type AuthorsResource
- type Checkout
- type CheckoutService
- type CheckoutServiceRequest
- type CheckoutsResource
- type Client
- func (c *Client) CreateAndDo(method, urlStr string, body, options, resource interface{}) error
- func (c *Client) Delete(urlStr string, body, resource interface{}) error
- func (c *Client) Do(req *http.Request, v interface{}) error
- func (c *Client) Get(urlStr string, options, resource interface{}) error
- func (c *Client) NewRequest(method, path string, body, params interface{}) (*http.Request, error)
- func (c *Client) Post(urlStr string, body, resource interface{}) error
- func (c *Client) Put(urlStr string, body, resource interface{}) error
- type ClientDetail
- type Count
- type CountriesResource
- type Country
- type CountryResource
- type CountryService
- type CountryServiceRequest
- type Customer
- type CustomerAddress
- type DiscountCode
- type DraftOrder
- type DraftOrderInvoice
- type DraftOrderInvoiceResource
- type DraftOrderResource
- type DraftOrderService
- type DraftOrderServiceRequest
- func (r *DraftOrderServiceRequest) Complete(draftOrderID int64, params interface{}) (DraftOrder, error)
- func (r *DraftOrderServiceRequest) Count(params interface{}) (int64, error)
- func (r *DraftOrderServiceRequest) Create(params interface{}) (DraftOrder, error)
- func (r *DraftOrderServiceRequest) Delete(draftOrderID int64) error
- func (r *DraftOrderServiceRequest) Find(draftOrderID int64, params interface{}) (DraftOrder, error)
- func (r *DraftOrderServiceRequest) Get(params interface{}) ([]DraftOrder, error)
- func (r *DraftOrderServiceRequest) Invoice(draftOrderID int64) (DraftOrderInvoice, error)
- func (r *DraftOrderServiceRequest) Paginate(params interface{}) (int64, []DraftOrder, error)
- func (r *DraftOrderServiceRequest) Update(draftOrderID int64, params interface{}) (DraftOrder, error)
- type DraftOrdersResource
- type Fulfillment
- type Image
- type LineItem
- type Metafield
- type NoteAttribute
- type Order
- type OrderAdjustment
- type OrderCountOptions
- type OrderOptions
- type OrderResource
- type OrderService
- type OrderServiceRequest
- func (r *OrderServiceRequest) Cancel(orderID int64, params interface{}) (Order, error)
- func (r *OrderServiceRequest) Close(orderID int64) (Order, error)
- func (r *OrderServiceRequest) Count(params interface{}) (int64, error)
- func (r *OrderServiceRequest) Create(params interface{}) (Order, error)
- func (r *OrderServiceRequest) Delete(orderID int64) error
- func (r *OrderServiceRequest) Find(orderID int64, params interface{}) (Order, error)
- func (r *OrderServiceRequest) Get(params interface{}) ([]Order, error)
- func (r *OrderServiceRequest) Open(orderID int64) (Order, error)
- func (r *OrderServiceRequest) Paginate(params interface{}) (int64, []Order, error)
- func (r *OrderServiceRequest) Update(orderID int64, params interface{}) (Order, error)
- type OrdersResource
- type Product
- type ProductImage
- type ProductOption
- type ProductResource
- type ProductService
- type ProductServiceRequest
- func (r *ProductServiceRequest) Count(params interface{}) (int64, error)
- func (r *ProductServiceRequest) Create(params interface{}) (Product, error)
- func (r *ProductServiceRequest) Delete(productID int64) error
- func (r *ProductServiceRequest) Find(productID int64, params interface{}) (Product, error)
- func (r *ProductServiceRequest) Get(params interface{}) ([]Product, error)
- func (r *ProductServiceRequest) Update(productID int64, params interface{}) (Product, error)
- type ProductVariant
- type ProductsResource
- type Property
- type Province
- type RateLimitError
- type Receipt
- type Redirect
- type RedirectResource
- type RedirectService
- type RedirectServiceRequest
- func (r *RedirectServiceRequest) Count(params interface{}) (int64, error)
- func (r *RedirectServiceRequest) Create(params interface{}) (Redirect, error)
- func (r *RedirectServiceRequest) Delete(redirectID int64) error
- func (r *RedirectServiceRequest) Find(redirectID int64, params interface{}) (Redirect, error)
- func (r *RedirectServiceRequest) Get(params interface{}) ([]Redirect, error)
- func (r *RedirectServiceRequest) Paginate(params interface{}) (int64, []Redirect, error)
- func (r *RedirectServiceRequest) Update(redirectID int64, params interface{}) (Redirect, error)
- type RedirectsResource
- type Refund
- type RefundLineItem
- type ResponseError
- type ShippingLine
- type TagsResource
- type TaxLine
- type Transaction
- type Webhook
- type WebhookResource
- type WebhookService
- type WebhookServiceRequest
- func (r *WebhookServiceRequest) Count(params interface{}) (int64, error)
- func (r *WebhookServiceRequest) Create(params interface{}) (Webhook, error)
- func (r *WebhookServiceRequest) Delete(webhookID int64) error
- func (r *WebhookServiceRequest) Find(webhookID int64, params interface{}) (Webhook, error)
- func (r *WebhookServiceRequest) Get(params interface{}) ([]Webhook, error)
- func (r *WebhookServiceRequest) Paginate(params interface{}) (int64, []Webhook, error)
- func (r *WebhookServiceRequest) Update(webhookID int64, params interface{}) (Webhook, error)
- type WebhooksResource
Constants ¶
This section is empty.
Variables ¶
View Source
var Scopes = map[string]string{
"read_content": "Access to Article, Blog, Comment, Page, and Redirect.",
"write_content": "Write to Article, Blog, Comment, Page, and Redirect.",
"read_themes": "Access to Asset and Theme.",
"write_themes": "Write to Asset and Theme.",
"read_products": "Access to Product, Product Variant, Product Image, Collect, Custom Collection, and Smart Collection.",
"write_products": "Write to Product, Product Variant, Product Image, Collect, Custom Collection, and Smart Collection.",
"read_product_listings": "Access to Product Listing, and Collection Listing.",
"read_collection_listings": "Write to Product Listing, and Collection Listing.",
"read_customers": "Access to Customer and Saved Search.",
"write_customers": "Write to Customer and Saved Search.",
"read_orders": "Access to Order, Transaction and Fulfillment.",
"write_orders": "Write to Order, Transaction and Fulfillment.",
"read_draft_orders": "Access to Draft Order.",
"write_draft_orders": "Write to Draft Order.",
"read_script_tags": "Access to Script Tag.",
"write_script_tags": "Write to Script Tag.",
"read_fulfillments": "Access to Fulfillment Service.",
"write_fulfillments": "Write to Fulfillment Service.",
"read_shipping": "Access to Carrier Service, Country and Province.",
"write_shipping": "Write to Carrier Service, Country and Province.",
"read_analytics": "Access to Analytics API.",
"read_checkouts": "Access to Checkouts.",
"write_checkouts": "Write to Checkouts.",
"read_reports": "Access to Reports.",
"write_reports": "Write to Reports.",
"read_price_rules": "Access to Price Rules.",
"write_price_rules": "Write to Price Rules.",
}
Functions ¶
func CheckResponseError ¶
Types ¶
type Address ¶
type Address struct { Address1 string `json:"address1,omitempty"` Address2 string `json:"address2,omitempty"` City string `json:"city,omitempty"` Company string `json:"company,omitempty"` Country string `json:"country,omitempty"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` Latitude *decimal.Decimal `json:"latitude,omitempty"` Longitude *decimal.Decimal `json:"longitude,omitempty"` Phone string `json:"phone,omitempty"` Province string `json:"province,omitempty"` Zip string `json:"zip,omitempty"` Name string `json:"name,omitempty"` CountryCode string `json:"country_code,omitempty"` ProvinceCode string `json:"province_code,omitempty"` }
type App ¶
type App struct { APIKey string APISecretKey string RedirectURL string Scope string ShopName string State string Private bool }
func (App) AuthorizeURL ¶
func (App) GetAccessToken ¶
func (App) VerifyHMAC ¶
type AppliedDiscount ¶
type Article ¶
type Article struct { ID int64 `json:"id,omitempty"` Title string `json:"title,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` BodyHTML string `json:"body_html,omitempty"` BlogID int64 `json:"blog_id,omitempty"` Author string `json:"author,omitempty"` UserID int64 `json:"user_id,omitempty"` PublishedAt *time.Time `json:"published_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` SummaryHTML string `json:"summary_html,omitempty"` TemplateSuffix string `json:"template_suffix,omitempty"` Handle string `json:"handle,omitempty"` Tags string `json:"tags,omitempty"` Image Image `json:"image,omitempty"` Metafields []Metafield `json:"metafields,omitempty"` Published bool `json:"published,omitempty"` }
type ArticleResource ¶
type ArticleResource struct {
Article Article `json:"article"`
}
type ArticleService ¶
type ArticleService interface { Get(int64, interface{}) ([]Article, error) Count(int64, interface{}) (int64, error) Paginate(int64, interface{}) (int64, []Article, error) Find(int64, int64, interface{}) (Article, error) Create(int64, interface{}) (Article, error) Update(int64, int64, interface{}) (Article, error) Delete(int64, int64) error Authors() ([]string, error) Tags(interface{}) ([]string, error) BlogTags(int64, interface{}) ([]string, error) }
type ArticleServiceRequest ¶
type ArticleServiceRequest struct {
// contains filtered or unexported fields
}
func (*ArticleServiceRequest) Authors ¶
func (r *ArticleServiceRequest) Authors() ([]string, error)
func (*ArticleServiceRequest) BlogTags ¶
func (r *ArticleServiceRequest) BlogTags(blogID int64, params interface{}) ([]string, error)
func (*ArticleServiceRequest) Count ¶
func (r *ArticleServiceRequest) Count(blogID int64, params interface{}) (int64, error)
func (*ArticleServiceRequest) Create ¶
func (r *ArticleServiceRequest) Create(blogID int64, params interface{}) (Article, error)
func (*ArticleServiceRequest) Delete ¶
func (r *ArticleServiceRequest) Delete(blogID int64, articleID int64) error
func (*ArticleServiceRequest) Find ¶
func (r *ArticleServiceRequest) Find(blogID int64, articleID int64, params interface{}) (Article, error)
func (*ArticleServiceRequest) Get ¶
func (r *ArticleServiceRequest) Get(blogID int64, params interface{}) ([]Article, error)
func (*ArticleServiceRequest) Paginate ¶
func (r *ArticleServiceRequest) Paginate(blogID int64, params interface{}) (int64, []Article, error)
func (*ArticleServiceRequest) Tags ¶
func (r *ArticleServiceRequest) Tags(params interface{}) ([]string, error)
type ArticlesResource ¶
type ArticlesResource struct {
Articles []Article `json:"articles"`
}
type AuthorsResource ¶
type AuthorsResource struct {
Authors []string `json:"authors,omitempty"`
}
type Checkout ¶
type Checkout struct { ID int64 `json:"id,omitempty"` Token string `json:"token,omitempty"` CartToken string `json:"cart_token,omitempty"` Email string `json:"email,omitempty"` Gateway string `json:"gateway,omitempty"` BuyerAcceptsMarketing bool `json:"buyer_accepts_marketing,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` LandingSite string `json:"landing_site,omitempty"` Note string `json:"note,omitempty"` NoteAttributes []NoteAttribute `json:"note_attributes,omitempty"` ReferringSite string `json:"referring_site,omitempty"` ShippingLines []ShippingLine `json:"shipping_lines,omitempty"` SubtotalPrice string `json:"subtotal_price,omitempty"` TaxesIncluded bool `json:"taxes_included,omitempty"` TotalDiscounts string `json:"total_discounts,omitempty"` TotalLineItemsPrice string `json:"total_line_items_price,omitempty"` TotalPrice string `json:"total_price,omitempty"` TotalTax string `json:"total_tax,omitempty"` TotalWeight int64 `json:"total_weight,omitempty"` Currency string `json:"currency,omitempty"` CompletedAt *time.Time `json:"completed_at,omitempty"` ClosedAt *time.Time `json:"closed_at,omitempty"` UserID int64 `json:"user_id,omitempty"` LocationID int64 `json:"location_id,omitempty"` SourceIdentifier string `json:"source_identifier,omitempty"` SourceURL string `json:"source_url,omitempty"` DeviceID string `json:"device_id,omitempty"` Phone string `json:"phone,omitempty"` CustomerLocale string `json:"customer_locale,omitempty"` LineItems []LineItem `json:"line_items,omitempty"` Name string `json:"name,omitempty"` Source string `json:"source,omitempty"` DiscountCodes []DiscountCode `json:"discount_codes,omitempty"` AbandonedCheckoutURL string `json:"abandoned_checkout_url,omitempty"` TaxLines []TaxLine `json:"tax_lines,omitempty"` SourceName string `json:"source_name,omitempty"` ShippingAddress *Address `json:"shipping_address,omitempty"` Customer *Customer `json:"customer,omitempty"` }
type CheckoutService ¶
type CheckoutServiceRequest ¶
type CheckoutServiceRequest struct {
// contains filtered or unexported fields
}
func (*CheckoutServiceRequest) Count ¶
func (r *CheckoutServiceRequest) Count(params interface{}) (int64, error)
func (*CheckoutServiceRequest) Get ¶
func (r *CheckoutServiceRequest) Get(params interface{}) ([]Checkout, error)
type CheckoutsResource ¶
type CheckoutsResource struct {
Checkouts []Checkout `json:"checkouts"`
}
type Client ¶
type Client struct { DraftOrder *DraftOrderService // contains filtered or unexported fields }
func (*Client) CreateAndDo ¶
func (*Client) NewRequest ¶
type ClientDetail ¶
type CountriesResource ¶
type CountriesResource struct {
Countries []Country `json:"countries"`
}
type CountryResource ¶
type CountryResource struct {
Country Country `json:"country"`
}
type CountryService ¶
type CountryServiceRequest ¶
type CountryServiceRequest struct {
// contains filtered or unexported fields
}
func (*CountryServiceRequest) Count ¶
func (r *CountryServiceRequest) Count() (int64, error)
func (*CountryServiceRequest) Find ¶
func (r *CountryServiceRequest) Find(countryID int64, params interface{}) (Country, error)
func (*CountryServiceRequest) Get ¶
func (r *CountryServiceRequest) Get(params interface{}) ([]Country, error)
type Customer ¶
type Customer struct { AcceptsMarketing bool `json:"accepts_marketing"` Addresses []CustomerAddress `json:"addresses,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` DefaultAddress *CustomerAddress `json:"default_address,omitempty"` Email string `json:"email,omitempty"` FirstName string `json:"first_name,omitempty"` ID int64 `json:"id,omitempty"` LastName string `json:"last_name,omitempty"` LastOrderID int64 `json:"last_order_id,omitempty"` LastOrderName string `json:"last_order_name,omitempty"` Metafields []Metafield `json:"metafields,omitempty"` MultipassIdentifier string `json:"multipass_identifier,omitempty"` Note string `json:"note,omitempty"` OrderCount int64 `json:"order_count,omitempty"` Phone string `json:"phone,omitempty"` State string `json:"state,omitempty"` Tags string `json:"tags,omitempty"` TaxExempt bool `json:"tax_exempt,omitempty"` TotalSpent *decimal.Decimal `json:"total_spent,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` VerifiedEmail bool `json:"verified_email,omitempty"` }
type CustomerAddress ¶
type DiscountCode ¶
type DraftOrder ¶
type DraftOrder struct { ID int64 `json:"id,omitempty"` OrderID int64 `json:"order_id,omitempty"` Name string `json:"name,omitempty"` Customer *Customer `json:"customer"` ShippingAddress *Address `json:"shipping_address"` BillingAddress *Address `json:"billing_address"` Note string `json:"note,omitempty"` NoteAttributes []NoteAttribute `json:"note_attributes,omitempty"` Email string `json:"email,omitempty"` Currency string `json:"currency,omitempty"` InvoiceSentAt *time.Time `json:"invoice_sent_at,omitempty"` InvoiceURL string `json:"invoice_url"` LineItems []LineItem `json:"line_items,omitempty"` ShippingLine *ShippingLine `json:"shipping_line,omitempty"` Tags string `json:"tags,omitempty"` TaxExempt bool `json:"tax_exempt,omitempty"` TaxLines []TaxLine `json:"tax_lines,omitempty"` AppliedDiscount *AppliedDiscount `json:"applied_discount,omitempty"` TaxesIncluded bool `json:"taxes_included,omitempty"` TotalTax *decimal.Decimal `json:"total_tax,omitempty"` SubtotalPrice *decimal.Decimal `json:"subtotal_price,omitempty"` TotalPrice *decimal.Decimal `json:"total_price,omitempty"` CompletedAt *time.Time `json:"completed_at,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` Status string `json:"status,omitempty"` UseCustomerDefaultAddress bool `json:"use_customer_default_address,omitempty"` }
type DraftOrderInvoice ¶
type DraftOrderInvoiceResource ¶
type DraftOrderInvoiceResource struct {
DraftOrderInvoice DraftOrderInvoice `json:"draft_order_invoice"`
}
type DraftOrderResource ¶
type DraftOrderResource struct {
DraftOrder DraftOrder `json:"draft_order"`
}
type DraftOrderService ¶
type DraftOrderService service
type DraftOrderServiceRequest ¶
type DraftOrderServiceRequest struct {
// contains filtered or unexported fields
}
func (*DraftOrderServiceRequest) Complete ¶
func (r *DraftOrderServiceRequest) Complete(draftOrderID int64, params interface{}) (DraftOrder, error)
func (*DraftOrderServiceRequest) Count ¶
func (r *DraftOrderServiceRequest) Count(params interface{}) (int64, error)
func (*DraftOrderServiceRequest) Create ¶
func (r *DraftOrderServiceRequest) Create(params interface{}) (DraftOrder, error)
func (*DraftOrderServiceRequest) Delete ¶
func (r *DraftOrderServiceRequest) Delete(draftOrderID int64) error
func (*DraftOrderServiceRequest) Find ¶
func (r *DraftOrderServiceRequest) Find(draftOrderID int64, params interface{}) (DraftOrder, error)
func (*DraftOrderServiceRequest) Get ¶
func (r *DraftOrderServiceRequest) Get(params interface{}) ([]DraftOrder, error)
func (*DraftOrderServiceRequest) Invoice ¶
func (r *DraftOrderServiceRequest) Invoice(draftOrderID int64) (DraftOrderInvoice, error)
func (*DraftOrderServiceRequest) Paginate ¶
func (r *DraftOrderServiceRequest) Paginate(params interface{}) (int64, []DraftOrder, error)
func (*DraftOrderServiceRequest) Update ¶
func (r *DraftOrderServiceRequest) Update(draftOrderID int64, params interface{}) (DraftOrder, error)
type DraftOrdersResource ¶
type DraftOrdersResource struct {
DraftOrders []DraftOrder `json:"draft_orders"`
}
type Fulfillment ¶
type Fulfillment struct { ID int64 `json:"id"` OrderID int64 `json:"order_id"` Status string `json:"status"` CreatedAt *time.Time `json:"created_at"` Service string `json:"service"` UpdatedAt *time.Time `json:"updated_at"` TrackingCompany string `json:"tracking_company"` ShipmentStatus string `json:"shipment_status"` TrackingNumber string `json:"tracking_number"` TrackingNumbers []string `json:"tracking_numbers"` TrackingURL string `json:"tracking_url"` TrackingURLs []string `json:"tracking_urls"` Receipt Receipt `json:"receipt"` LineItems []LineItem `json:"line_items"` }
type LineItem ¶
type LineItem struct { Custom bool `json:"custom,omitempty"` FulfillableQuantity int64 `json:"fulfillable_quantity,omitempty"` FulfillmentService string `json:"fulfillment_service,omitempty"` Grams *decimal.Decimal `json:"grams,omitempty"` ID int64 `json:"id,omitempty"` Price *decimal.Decimal `json:"price,omitempty"` ProductID int64 `json:"product_id,omitempty"` Quantity int64 `json:"quantity,omitempty"` RequiresShipping bool `json:"requires_shipping,omitempty"` SKU string `json:"sku,omitempty"` Title string `json:"title,omitempty"` VariantID int64 `json:"variant_id,omitempty"` VariantTitle string `json:"variant_title,omitempty"` Vendor string `json:"vendor,omitempty"` Name string `json:"name,omitempty"` GiftCard bool `json:"gift_card,omitempty"` Properties []Property `json:"properties,omitempty"` Taxable bool `json:"taxable,omitempty"` VariantInventoryManagement string `json:"variant_inventory_management,omitempty"` ProductExists bool `json:"product_exists,omitempty"` TotalDiscount *decimal.Decimal `json:"total_discount,omitempty"` FulfillmentStatus string `json:"fulfillment_status,omitempty"` TaxLines []TaxLine `json:"tax_lines,omitempty"` AppliedDiscount *AppliedDiscount `json:"applied_discount,omitempty"` }
type Metafield ¶
type Metafield struct { CreatedAt *time.Time `json:"created_at,omitempty"` Description string `json:"description,omitempty"` ID int64 `json:"id,omitempty"` Key string `json:"key,omitempty"` Namespace string `json:"namespace,omitempty"` OwnerID int64 `json:"owner_id,omitempty"` OwnerResource string `json:"owner_resource,omitempty"` Value string `json:"value,omitempty"` ValueType string `json:"value_type,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` }
type NoteAttribute ¶
type Order ¶
type Order struct { ID int64 `json:"id,omitempty"` Email string `json:"email,omitempty"` ClosedAt *time.Time `json:"closed_at,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` Number int64 `json:"number,omitempty"` Note string `json:"note,omitempty"` Token string `json:"token,omitempty"` Gateway string `json:"gateway,omitempty"` Test bool `json:"test,omitempty"` TotalPrice *decimal.Decimal `json:"total_price,omitempty"` SubtotalPrice *decimal.Decimal `json:"subtotal_price,omitempty"` TotalWeight *decimal.Decimal `json:"total_weight,omitempty"` TotalTax *decimal.Decimal `json:"total_tax,omitempty"` TaxesIncluded bool `json:"taxes_included,omitempty"` Currency string `json:"currency,omitempty"` FinancialStatus string `json:"financial_status,omitempty"` Confirmed bool `json:"confirmed,omitempty"` TotalDiscounts *decimal.Decimal `json:"total_discounts,omitempty"` TotalLineItemsPrice *decimal.Decimal `json:"total_line_items_price,omitempty"` CartToken string `json:"cart_token,omitempty"` BuyerAcceptsMarketing bool `json:"buyer_accepts_marketing,omitempty"` Name string `json:"name,omitempty"` ReferringSite string `json:"referring_site,omitempty"` LandingSite string `json:"landing_site,omitempty"` CancelledAt *time.Time `json:"cancelled_at,omitempty"` CancelReason string `json:"cancel_reason,omitempty"` TotalPriceUSD *decimal.Decimal `json:"total_price_usd,omitempty"` CheckoutToken string `json:"checkout_token,omitempty"` Reference string `json:"reference,omitempty"` UserID int64 `json:"user_id,omitempty"` LocationID int64 `json:"location_id,omitempty"` SourceIdentifier string `json:"source_identifier,omitempty"` SourceURL string `json:"source_url,omitempty"` ProcessedAt *time.Time `json:"processed_at,omitempty"` DeviceID int64 `json:"device_id,omitempty"` Phone string `json:"phone,omitempty"` CustomerLocale string `json:"customer_locale,omitempty"` AppID int64 `json:"app_id,omitempty"` BrowserIP string `json:"browser_ip,omitempty"` LandingSiteRef string `json:"landing_site_ref,omitempty"` OrderNumber int64 `json:"order_number,omitempty"` DiscountCodes []DiscountCode `json:"discount_codes,omitempty"` NoteAttributes []NoteAttribute `json:"note_attributes,omitempty"` PaymentGatewayNames []string `json:"payment_gateway_names,omitempty"` ProcessingMethod string `json:"processing_method,omitempty"` CheckoutID int64 `json:"checkout_id,omitempty"` SourceName string `json:"source_name,omitempty"` FulfillmentStatus string `json:"fulfillment_status,omitempty"` TaxLines []TaxLine `json:"tax_lines,omitempty"` Tags string `json:"tags,omitempty"` ContactEmail string `json:"contact_email,omitempty"` OrderStatusURL string `json:"order_status_url,omitempty"` LineItems []LineItem `json:"line_items,omitempty"` ShippingLines []ShippingLine `json:"shipping_lines,omitempty"` BillingAddress *Address `json:"billing_address,omitempty"` ShippingAddress *Address `json:"shipping_address,omitempty"` Fulfillments []Fulfillment `json:"fulfillments,omitempty"` ClientDetails *ClientDetail `json:"client_details,omitempty"` Refunds []Refund `json:"refunds,omitempty"` Customer *Customer `json:"customer,omitempty"` }
type OrderAdjustment ¶
type OrderAdjustment struct { }
type OrderCountOptions ¶
type OrderCountOptions struct { CreatedAtMin *time.Time `url:"created_at_min,omitempty"` CreatedAtMax *time.Time `url:"created_at_max,omitempty"` UpdatedAtMin *time.Time `url:"updated_at_min,omitempty"` UpdatedAtMax *time.Time `url:"updated_at_max,omitempty"` Status string `url:"status,omitempty"` FinancialStatus string `url:"financial_status,omitempty"` FulfillmentStatus string `url:"fulfillment_status,omitempty"` }
type OrderOptions ¶
type OrderOptions struct { OrderCountOptions IDs string `url:"ids,omitempty"` Limit int64 `url:"limit,omitempty"` Page int64 `url:"page"` SinceID int64 `url:"since_id,omitempty"` ProcessedAtMin *time.Time `url:"processed_at_min,omitempty"` ProcessedAtMax *time.Time `url:"processed_at_max,omitempty"` AttributionAppID string `url:"attribution_app_id"` Fields string `url:"fields"` }
type OrderResource ¶
type OrderResource struct {
Order Order `json:"order"`
}
type OrderService ¶
type OrderService interface { Get(interface{}) ([]Order, error) Count(interface{}) (int64, error) Paginate(interface{}) (int64, []Order, error) Find(int64, interface{}) (Order, error) Close(int64) (Order, error) Open(int64) (Order, error) Cancel(int64, interface{}) (Order, error) Create(interface{}) (Order, error) Update(int64, interface{}) (Order, error) Delete(int64) error }
type OrderServiceRequest ¶
type OrderServiceRequest struct {
// contains filtered or unexported fields
}
func (*OrderServiceRequest) Cancel ¶
func (r *OrderServiceRequest) Cancel(orderID int64, params interface{}) (Order, error)
func (*OrderServiceRequest) Close ¶
func (r *OrderServiceRequest) Close(orderID int64) (Order, error)
func (*OrderServiceRequest) Count ¶
func (r *OrderServiceRequest) Count(params interface{}) (int64, error)
func (*OrderServiceRequest) Create ¶
func (r *OrderServiceRequest) Create(params interface{}) (Order, error)
func (*OrderServiceRequest) Delete ¶
func (r *OrderServiceRequest) Delete(orderID int64) error
func (*OrderServiceRequest) Find ¶
func (r *OrderServiceRequest) Find(orderID int64, params interface{}) (Order, error)
func (*OrderServiceRequest) Get ¶
func (r *OrderServiceRequest) Get(params interface{}) ([]Order, error)
type OrdersResource ¶
type OrdersResource struct {
Orders []Order `json:"orders"`
}
type Product ¶
type Product struct { ID int64 `json:"id"` Title string `json:"title"` BodyHTML string `json:"body_html"` Vendor string `json:"vendor"` ProductType string `json:"product_type"` CreatedAt *time.Time `json:"created_at"` Handle string `json:"handle"` UpdatedAt *time.Time `json:"updated_at"` PublishedAt *time.Time `json:"published_at"` TemplateSuffix string `json:"template_suffix"` PublishedScope string `json:"published_scope"` Tags string `json:"tags"` Variants []ProductVariant `json:"variants"` Options []ProductOption `json:"options"` Images []ProductImage `json:"images"` Image ProductImage `json:"image"` }
type ProductImage ¶
type ProductImage struct { ID int64 `json:"id"` ProductID int64 `json:"product_id"` Position int64 `json:"position"` CreatedAt *time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` Width int64 `json:"width"` Height int64 `json:"height"` Src string `json:"src"` VariantIDs []int64 `json:"variant_ids"` }
type ProductOption ¶
type ProductResource ¶
type ProductResource struct {
Product Product `json:"product"`
}
type ProductService ¶
type ProductServiceRequest ¶
type ProductServiceRequest struct {
// contains filtered or unexported fields
}
func (*ProductServiceRequest) Count ¶
func (r *ProductServiceRequest) Count(params interface{}) (int64, error)
func (*ProductServiceRequest) Create ¶
func (r *ProductServiceRequest) Create(params interface{}) (Product, error)
func (*ProductServiceRequest) Delete ¶
func (r *ProductServiceRequest) Delete(productID int64) error
func (*ProductServiceRequest) Find ¶
func (r *ProductServiceRequest) Find(productID int64, params interface{}) (Product, error)
func (*ProductServiceRequest) Get ¶
func (r *ProductServiceRequest) Get(params interface{}) ([]Product, error)
type ProductVariant ¶
type ProductVariant struct { ID int64 `json:"id"` ProductID int64 `json:"product_id"` Title string `json:"title"` Price string `json:"price"` SKU string `json:"sku"` Position int64 `json:"position"` InventoryPolicy string `json:"inventory_policy"` CompareAtPrice string `json:"compare_at_price"` FulfillmentService string `json:"fulfillment_service"` InventoryManagement string `json:"inventory_management"` Option1 string `json:"option_1"` Option2 string `json:"option_2"` Option3 string `json:"option_3"` CreatedAt *time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` Taxable bool `json:"taxable"` Barcode string `json:"barcode"` Grams int64 `json:"grams"` ImageID int64 `json:"image_id"` InventoryQuantity int64 `json:"inventory_quantity"` Weight *decimal.Decimal `json:"weight"` WeightUnit string `json:"weight_unit"` OldInventoryQuantity int64 `json:"old_inventory_quantity"` RequiresShipping bool `json:"requires_shipping"` }
type ProductsResource ¶
type ProductsResource struct {
Products []Product `json:"products"`
}
type Province ¶
type Province struct { ID int64 `json:"id"` Name string `json:"name"` Code string `json:"code"` CountryID int64 `json:"country_id"` Tax float64 `json:"tax"` TaxName string `json:"tax_name"` TaxType string `json:"tax_type"` TaxPercentage float64 `json:"tax_percentage"` ShippingZoneID int64 `json:"shipping_zone_id"` }
type RateLimitError ¶
type RateLimitError struct { ResponseError RetryAfter int }
type RedirectResource ¶
type RedirectResource struct {
Redirect Redirect `json:"redirect"`
}
type RedirectService ¶
type RedirectService interface { Get(interface{}) ([]Redirect, error) Count(interface{}) (int64, error) Paginate(interface{}) (int64, []Redirect, error) Find(int64, interface{}) (Redirect, error) Create(interface{}) (Redirect, error) Update(int64, interface{}) (Redirect, error) Delete(int64) error }
type RedirectServiceRequest ¶
type RedirectServiceRequest struct {
// contains filtered or unexported fields
}
func (*RedirectServiceRequest) Count ¶
func (r *RedirectServiceRequest) Count(params interface{}) (int64, error)
func (*RedirectServiceRequest) Create ¶
func (r *RedirectServiceRequest) Create(params interface{}) (Redirect, error)
func (*RedirectServiceRequest) Delete ¶
func (r *RedirectServiceRequest) Delete(redirectID int64) error
func (*RedirectServiceRequest) Find ¶
func (r *RedirectServiceRequest) Find(redirectID int64, params interface{}) (Redirect, error)
func (*RedirectServiceRequest) Get ¶
func (r *RedirectServiceRequest) Get(params interface{}) ([]Redirect, error)
type RedirectsResource ¶
type RedirectsResource struct {
Redirects []Redirect `json:"redirects"`
}
type Refund ¶
type Refund struct { ID int64 `json:"id"` OrderID int64 `json:"order_id"` CreatedAt *time.Time `json:"created_at"` Note string `json:"note"` Restock bool `json:"restock"` UserID int64 `json:"user_id"` ProcessedAt *time.Time `json:"processed_at"` RefundLineItems []RefundLineItem `json:"refund_line_items"` Transactions []Transaction `json:"transactions"` OrderAdjustments []OrderAdjustment `json:"order_adjustments"` }
type RefundLineItem ¶
type ResponseError ¶
func (ResponseError) Error ¶
func (e ResponseError) Error() string
type ShippingLine ¶
type ShippingLine struct { ID int64 `json:"id"` Title string `json:"title"` Price decimal.Decimal `json:"price"` Code string `json:"code"` Source string `json:"source"` Phone string `json:"phone"` RequestedFulfillmentServiceID string `json:"requested_fulfillment_service_id"` DeliveryCategory string `json:"delivery_category"` CarrierIdentifier string `json:"carrier_identifier"` TaxLines []TaxLine `json:"tax_lines"` Custom bool `json:"custom"` }
type TagsResource ¶
type TagsResource struct {
Tags []string `json:"tags,omitempty"`
}
type Transaction ¶
type Transaction struct { ID int64 `json:"id"` OrderID int64 `json:"order_id"` Amount string `json:"amount"` Kind string `json:"kind"` Gateway string `json:"gateway"` Status string `json:"status"` Message string `json:"message"` CreatedAt *time.Time `json:"created_at"` Test bool `json:"test"` Authorization string `json:"authorization"` Currency string `json:"currency"` LocationID int64 `json:"location_id"` UserID int64 `json:"user_id"` ParentID int64 `json:"parent_id"` DeviceID int64 `json:"device_id"` Receipt Receipt `json:"receipt"` ErrorCode string `json:"error_code"` SourceName string `json:"source_name"` }
type Webhook ¶
type Webhook struct { ID int64 `json:"id,omitempty"` Address string `json:"address,omitempty"` Topic string `json:"topic,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` Format string `json:"format,omitempty"` Fields []string `json:"fields,omitempty"` MetafieldNamespaces []string `json:"metafield_namespaces"` }
type WebhookResource ¶
type WebhookResource struct {
Webhook Webhook `json:"webhook"`
}
type WebhookService ¶
type WebhookServiceRequest ¶
type WebhookServiceRequest struct {
// contains filtered or unexported fields
}
func (*WebhookServiceRequest) Count ¶
func (r *WebhookServiceRequest) Count(params interface{}) (int64, error)
func (*WebhookServiceRequest) Create ¶
func (r *WebhookServiceRequest) Create(params interface{}) (Webhook, error)
func (*WebhookServiceRequest) Delete ¶
func (r *WebhookServiceRequest) Delete(webhookID int64) error
func (*WebhookServiceRequest) Find ¶
func (r *WebhookServiceRequest) Find(webhookID int64, params interface{}) (Webhook, error)
func (*WebhookServiceRequest) Get ¶
func (r *WebhookServiceRequest) Get(params interface{}) ([]Webhook, error)
type WebhooksResource ¶
type WebhooksResource struct {
Webhooks []Webhook `json:"webhooks"`
}
Click to show internal directories.
Click to hide internal directories.