Versions in this module Expand all Collapse all v1 v1.0.2 Jan 13, 2021 Changes in this version + const BillingStatusAccepted + const BillingStatusActive + const BillingStatusCancelled + const BillingStatusDeclined + const BillingStatusExpired + const BillingStatusFrozen + const BillingStatusPending + const BillingStatusUnknown + const BillingTypeOneTime + const BillingTypeRecurring + const BillingTypeUnknown + const BillingTypeUsage + const PolicyRefund + const PriceRuleTargetSelectionAll + const PriceRuleTargetSelectionEntitled + const PriceRuleTargetTypeLineItem + const PriceRuleTargetTypeShippingLine + const PriceRuleValueTypeFixedAmount + const PriceRuleValueTypePercentage + const StripeVaultToken + const WebhookHeaderHmac + const WebhookHeaderShopDomain + const WebhookHeaderTopic + var ErrCallIssuer = errors.New("call_issuer") + var ErrCardDeclined = errors.New("card_declined") + var ErrExpiredCard = errors.New("expired_card") + var ErrIncorrectAddress = errors.New("incorrect_address") + var ErrIncorrectCvc = errors.New("incorrect_cvc") + var ErrIncorrectNumber = errors.New("incorrect_number") + var ErrIncorrectZip = errors.New("incorrect_zip") + var ErrInvalidCvc = errors.New("invalid_expiry_date") + var ErrInvalidExpiryDate = errors.New("invalid_expiry_date") + var ErrInvalidNumber = errors.New("invalid_number") + var ErrNotEnoughInStock = `not_enough_in_stock` + var ErrPickUpCard = errors.New("pick_up_card") + var ErrProcessingError = errors.New("processing_error") + var ErrUnsupportedBillingType = errors.New("unsupported billing type") + func CheckResponse(r *http.Response) error + type AddressError struct + Code string + Field string + Key string + Message string + func (e *AddressError) Error() string + func (e *AddressError) Type() string + type AppliedDiscount struct + Amount string + Applicable bool + Description string + NonApplicableReason string + Title string + Value string + ValueType string + type Billing struct + ActivatedOn string + BillingOn string + CancelledOn string + CappedAmount string + ConfirmationUrl string + CreatedAt *time.Time + ID int64 + Name string + Price string + ReturnUrl string + Status BillingStatus + Terms string + Test bool + TrialDays int64 + TrialEndsOn string + Type BillingType + UpdatedAt *time.Time + type BillingAddress struct + type BillingService service + func (c *BillingService) Activate(ctx context.Context, billing *Billing) (*Billing, *http.Response, error) + func (c *BillingService) Cancel(ctx context.Context, billing *Billing) (*Billing, *http.Response, error) + func (c *BillingService) Create(ctx context.Context, billing *Billing) (*Billing, *http.Response, error) + func (c *BillingService) CreateUsageCharge(ctx context.Context, charge *UsageCharge) (*UsageCharge, *http.Response, error) + func (c *BillingService) Get(ctx context.Context, billing *Billing) (*Billing, *http.Response, error) + func (c *BillingService) Update(ctx context.Context, billing *Billing) (*Billing, *http.Response, error) + type BillingStatus uint32 + func (s *BillingStatus) UnmarshalText(text []byte) error + func (s BillingStatus) MarshalText() ([]byte, error) + func (s BillingStatus) String() string + type BillingType uint32 + func (t *BillingType) UnmarshalText(text []byte) error + func (t BillingType) MarshalText() ([]byte, error) + func (t BillingType) String() string + type Checkout struct + AppliedDiscount *AppliedDiscount + BillingAddress *CustomerAddress + CompletedAt *time.Time + Currency string + CustomerID int64 + DiscountCode string + Email string + LineItems []*LineItem + Name string + OrderID int64 + OrderStatusURL string + PaymentDue string + PaymentURL string + Payments []*Payment + ShippingAddress *CustomerAddress + ShippingLine *ShippingLine + ShopifyPaymentAccountID string + SubtotalPrice string + TaxLines []*TaxLine + TaxesIncluded bool + Token string + TotalPrice string + TotalTax string + WebProcessingURL string + WebURL string + type CheckoutRequest struct + Checkout *Checkout + func (c *CheckoutRequest) MarshalJSON() ([]byte, error) + type CheckoutService service + func (c *CheckoutService) Create(ctx context.Context, checkout *Checkout) (*Checkout, *http.Response, error) + func (c *CheckoutService) CreateOrUpdate(ctx context.Context, checkout *Checkout) (*Checkout, *http.Response, error) + func (c *CheckoutService) Get(ctx context.Context, token string) (*Checkout, *http.Response, error) + func (c *CheckoutService) ListShippingRates(ctx context.Context, token string) ([]*CheckoutShipping, *http.Response, error) + func (c *CheckoutService) Payment(ctx context.Context, token string, payment *Payment) (*Payment, *http.Response, error) + func (c *CheckoutService) Update(ctx context.Context, checkout *Checkout) (*Checkout, *http.Response, error) + type CheckoutShipping struct + Checkout *ShippingRate + DeliveryRange []time.Time + Handle string + ID string + PhoneRequired bool + Price string + Title string + type Client struct + Billing *BillingService + Checkout *CheckoutService + CollectionList *CollectionListService + CustomCollection *CustomCollectionService + DiscountCode *DiscountCodeService + Policy *PolicyService + PriceRule *PriceRuleService + Product *ProductService + ProductList *ProductListService + ShippingZone *ShippingZoneService + Shop *ShopService + UserAgent string + Variant *VariantService + Webhook *WebhookService + func NewClient(httpClient *http.Client, options ...Option) (*Client, error) + func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error) + func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error) + type CollectionList struct + BodyHTML string + Handle string + ID int64 + Image *CollectionListImage + PublishedAt time.Time + SortOrder CollectionListSortOrder + Title string + UpdatedAt time.Time + type CollectionListImage struct + CreatedAt time.Time + Src string + type CollectionListParam struct + Limit int + Page int + func (p *CollectionListParam) EncodeQuery() string + type CollectionListService service + func (p *CollectionListService) Get(ctx context.Context, ID int64) (*CollectionList, *http.Response, error) + func (p *CollectionListService) List(ctx context.Context, params *CollectionListParam) ([]*CollectionList, *http.Response, error) + func (p *CollectionListService) ListProductIDs(ctx context.Context, ID int64) ([]int64, *http.Response, error) + type CollectionListSortOrder uint32 + const CollectionListSortOrderAlphaAsc + const CollectionListSortOrderAlphaDesc + const CollectionListSortOrderBestSelling + const CollectionListSortOrderCreated + const CollectionListSortOrderCreatedDesc + const CollectionListSortOrderManual + const CollectionListSortOrderPriceAsc + const CollectionListSortOrderPriceDesc + func (s *CollectionListSortOrder) UnmarshalText(text []byte) error + func (s CollectionListSortOrder) MarshalText() ([]byte, error) + func (s CollectionListSortOrder) String() string + type CustomCollection struct + BodyHTML string + Handle string + ID int64 + Image CustomCollectionImage + PublishedAt time.Time + PublishedScope string + SortOrder string + Title string + UpdatedAt time.Time + type CustomCollectionImage struct + CreatedAt time.Time + Height int + Src string + Width int + type CustomCollectionParam struct + ProductID int64 + func (p *CustomCollectionParam) EncodeQuery() string + type CustomCollectionService service + func (c *CustomCollectionService) Get(ctx context.Context, params *CustomCollectionParam) ([]*CustomCollection, *http.Response, error) + type CustomerAddress struct + Address1 string + Address2 string + City string + Company string + Country string + CountryCode string + FirstName string + LastName string + Phone string + Province string + ProvinceCode string + Zip string + type DiscountCode struct + Code string + CreatedAt *time.Time + ID int64 + PriceRuleID int64 + UpdatedAt *time.Time + UsageCount int32 + type DiscountCodeError struct + Reason interface{} + func (e *DiscountCodeError) Error() string + func (e *DiscountCodeError) Type() string + type DiscountCodeRequest struct + type DiscountCodeService service + func (s *DiscountCodeService) Create(ctx context.Context, discountCode *DiscountCode) (*DiscountCode, *http.Response, error) + func (s *DiscountCodeService) Delete(ctx context.Context, discountCode *DiscountCode) (*DiscountCode, *http.Response, error) + func (s *DiscountCodeService) Get(ctx context.Context, discountCode *DiscountCode) (*DiscountCode, *http.Response, error) + type EmailError struct + Message string + func (e *EmailError) Error() string + func (e *EmailError) Type() string + type ErrorResponse struct + Errors interface{} + func (r *ErrorResponse) Error() string + type LineItem struct + Quantity int64 + VariantID int64 + type LineItemError struct + Code string + Field string + Message string + Position string + func (e *LineItemError) Error() string + func (e *LineItemError) Type() string + type Option func(*Options) error + func Debug(b bool) Option + func ShopURL(u string) Option + func Token(t string) Option + type Options struct + Debug bool + ShopURL string + Token string + type Payment struct + Amount string + ID int64 + PaymentProcessingErrorMessage string + PaymentToken *PaymentToken + RequestDetails *RequestDetail + SessionID string + Transaction *Transaction + UniqueToken string + type PaymentRequest struct + Payment *Payment + type PaymentToken struct + PaymentData string + Type string + type Policy struct + Body string + CreatedAt time.Time + ID int64 + Title string + URL string + UpdatedAt time.Time + type PolicyService service + func (s *PolicyService) List(ctx context.Context) ([]*Policy, *http.Response, error) + type PriceRule struct + AllocationLimit int + AllocationMethod string + CreatedAt time.Time + CustomerSelection string + EndsAt *time.Time + EntitledCollectionIds []int64 + EntitledCountryIds []int64 + EntitledProductIds []int64 + EntitledVariantIds []int64 + ID int64 + OncePerCustomer bool + PrerequisiteCollectionIDs []int64 + PrerequisiteCustomerIds []int64 + PrerequisiteProductIDs []int64 + PrerequisiteQuantityRange struct{ ... } + PrerequisiteQuantityRatio struct{ ... } + PrerequisiteSavedSearchIds []int64 + PrerequisiteShippingPriceRange struct{ ... } + PrerequisiteSubtotalRange struct{ ... } + PrerequisiteVariantIDs []int64 + StartsAt time.Time + TargetSelection PriceRuleTargetSelection + TargetType PriceRuleTargetType + Title string + UpdatedAt time.Time + UsageLimit int + Value string + ValueType PriceRuleValueType + type PriceRuleParam struct + CreatedAtMin *time.Time + EndsAtMax *time.Time + EndsAtMin *time.Time + Limit int + Page int + SinceID int64 + StartsAtMax *time.Time + StartsAtMin *time.Time + TimesUsed int + func (p *PriceRuleParam) EncodeQuery() string + type PriceRuleService service + func (p *PriceRuleService) CreatePriceRule(ctx context.Context, rule *PriceRule) (*PriceRule, *http.Response, error) + func (p *PriceRuleService) Get(ctx context.Context, ID int64) (*PriceRule, *http.Response, error) + func (p *PriceRuleService) List(ctx context.Context, params *PriceRuleParam) ([]*PriceRule, *http.Response, error) + func (p *PriceRuleService) ListDiscountCodes(ctx context.Context, ID int64) ([]*DiscountCode, *http.Response, error) + type PriceRuleTargetSelection string + type PriceRuleTargetType string + type PriceRuleValueType string + type Product struct + Available bool + BodyHTML string + CreatedAt time.Time + Handle string + Image *ProductImage + Images []*ProductImage + Options []*ProductOption + ProductID int64 + ProductType string + PublishedAt time.Time + PublishedScope string + Tags string + TemplateSuffix interface{} + Title string + UpdatedAt time.Time + Variants []*ProductVariant + Vendor string + type ProductImage struct + CreatedAt string + Height int64 + ID int64 + Position int + ProductID int64 + Src string + UpdatedAt string + VariantIds []int64 + Width int64 + type ProductList Product + type ProductListParam struct + CollectionID int64 + Handle string + Limit int + Page int + ProductIDs []int64 + UpdatedAtMin time.Time + func (p *ProductListParam) EncodeQuery() string + type ProductListService service + func (p *ProductListService) Count(ctx context.Context) (int, *http.Response, error) + func (p *ProductListService) Get(ctx context.Context, params *ProductListParam) ([]*ProductList, *http.Response, error) + func (p *ProductListService) GetProduct(ctx context.Context, ID int64) (*ProductList, *http.Response, error) + type ProductOption struct + ID int64 + Name string + Position int + ProductID int64 + Values []string + type ProductService service + func (p *ProductService) GetImages(ctx context.Context, productID int64) ([]*ProductImage, *http.Response, error) + func (p *ProductService) GetStock(ctx context.Context, variantID int64) (int, *http.Response, error) + func (p *ProductService) GetVariant(ctx context.Context, variantID int64) (*ProductVariant, *http.Response, error) + func (p *ProductService) List(ctx context.Context) ([]*Product, *http.Response, error) + type ProductVariant struct + Available bool + Barcode string + CompareAtPrice string + CreatedAt time.Time + FulfillmentService string + Grams int + ID int64 + ImageID interface{} + InventoryManagement string + InventoryPolicy string + InventoryQuantity int + OldInventoryQuantity int + Option1 string + Option2 string + Option3 string + OptionValues []VariantOption + Position int + Price string + ProductID int64 + RequiresShipping bool + Sku string + Taxable bool + Title string + UpdatedAt time.Time + Weight float64 + WeightUnit string + type RecurringBillingRequest struct + Billing *Billing + type RequestDetail struct + AcceptLanguage string + IPAddress string + UserAgent string + type ShippingLine struct + DeliveryRange []time.Time + Handle string + Price string + Title string + type ShippingRate struct + PaymentDue string + SubtotalPrice string + TotalPrice string + TotalTax string + type ShippingRateRequest struct + CheckoutShipping []*CheckoutShipping + type ShippingZone struct + CarrierShippingRateProviders []*ShippingZoneRate + Countries []*ShippingZoneCountry + ID int64 + Name string + PriceBasedShippingRates []*ShippingZoneRate + WeightBasedShippingRates []*ShippingZoneRate + type ShippingZoneCountry struct + Code string + ID int64 + Name string + Provinces []*ShippingZoneProvince + Tax float64 + TaxName string + type ShippingZoneProvince struct + Code string + CountryID int64 + ID int64 + Name string + ShippingZoneID int64 + Tax float64 + TaxName string + TaxPercentage float64 + TaxType string + type ShippingZoneRate struct + CarrierServiceID int64 + FlatModifier string + ID int64 + MaxOrderSubtotal string + MinOrderSubtotal string + Name string + PercentModifier float64 + Price string + ShippingZoneID int64 + WeightHigh float64 + WeightLow float64 + type ShippingZoneService service + func (s *ShippingZoneService) List(ctx context.Context) ([]*ShippingZone, *http.Response, error) + type Shop struct + Address1 string + Address2 string + City string + Country string + CountryCode string + CountryName string + CountyTaxes bool + CreatedAt string + Currency string + CustomerEmail string + Domain string + EligibleForCardReaderGiveaway bool + EligibleForPayments bool + Email string + Finances bool + ForceSsl bool + GoogleAppsDomain interface{} + GoogleAppsLoginEnabled interface{} + HasDiscounts bool + HasGiftCards bool + HasStorefront bool + ID int + IanaTimezone string + Latitude float64 + Longitude float64 + MoneyFormat string + MoneyInEmailsFormat string + MoneyWithCurrencyFormat string + MoneyWithCurrencyInEmailsFormat string + MyshopifyDomain string + Name string + PasswordEnabled bool + Phone string + PlanDisplayName string + PlanName string + PrimaryLocale string + Province string + ProvinceCode string + RequiresExtraPaymentsAgreement bool + SetupRequired bool + ShopOwner string + Source interface{} + TaxShipping interface{} + TaxesIncluded interface{} + Timezone string + UpdatedAt string + WeightUnit string + Zip string + type ShopService service + func (s *ShopService) Get(ctx context.Context) (*Shop, *http.Response, error) + type ShopifyErrorer interface + Type func() string + type Storefront struct + AccessScope string + AccessToken string + CreatedAt string + ID int64 + Title string + type StorefrontService service + func (f *StorefrontService) Create(ctx context.Context, title string) (*Storefront, *http.Response, error) + type StorefrontWrapper struct + Storefront *Storefront + type TaxLine struct + Price string + Rate float64 + Title string + type Topic string + const TopicAppUninstalled + const TopicCartsCreate + const TopicCartsUpdate + const TopicCheckoutsCreate + const TopicCheckoutsDelete + const TopicCheckoutsUpdate + const TopicCollectionListingsAdd + const TopicCollectionListingsRemove + const TopicCollectionListingsUpdate + const TopicCollectionsCreate + const TopicCollectionsDelete + const TopicCollectionsUpdate + const TopicCustomerGroupsCreate + const TopicCustomerGroupsDelete + const TopicCustomerGroupsUpdate + const TopicCustomersCreate + const TopicCustomersDelete + const TopicCustomersDisable + const TopicCustomersEnable + const TopicCustomersUpdate + const TopicDraftOrdersCreate + const TopicDraftOrdersDelete + const TopicDraftOrdersUpdate + const TopicFulfillmentEventsCreate + const TopicFulfillmentEventsDelete + const TopicFulfillmentsCreate + const TopicFulfillmentsUpdate + const TopicOrderTransactionsCreate + const TopicOrdersCancelled + const TopicOrdersCreate + const TopicOrdersDelete + const TopicOrdersFulfilled + const TopicOrdersPaid + const TopicOrdersPartiallyFulfilled + const TopicOrdersUpdated + const TopicProductListingsAdd + const TopicProductListingsRemove + const TopicProductListingsUpdate + const TopicProductsCreate + const TopicProductsDelete + const TopicProductsUpdate + const TopicRefundsCreate + const TopicShopUpdate + const TopicThemesCreate + const TopicThemesDelete + const TopicThemesPublish + const TopicThemesUpdate + const TopicUnknown + type Transaction struct + Amount string + CreatedAt *time.Time + Currency string + ErrorCode string + ID int64 + Message string + OrderID int64 + Status TransactionStatus + Test bool + type TransactionError error + type TransactionStatus uint32 + const TransactionStatusError + const TransactionStatusFailure + const TransactionStatusPending + const TransactionStatusSuccess + func (s *TransactionStatus) UnmarshalText(text []byte) error + func (s TransactionStatus) MarshalText() ([]byte, error) + func (s TransactionStatus) String() string + type UsageCharge struct + BalanceRemaining float64 + BalanceUsed float64 + BillingOn string + CreatedAt *time.Time + Description string + ID int64 + Price string + RecurringApplicationChargeID int64 + RiskLevel float64 + UpdatedAt *time.Time + type UsageChargeRequest struct + UsageCharge *UsageCharge + type Variant struct + AdminGraphqlAPIID string + Barcode string + CompareAtPrice string + CreatedAt string + FulfillmentService string + Grams int + ID int64 + ImageID int64 + InventoryItemID int + InventoryManagement string + InventoryPolicy string + InventoryQuantity int + OldInventoryQuantity int + Option1 string + Option2 string + Option3 string + Position int + Price string + ProductID int64 + RequiresShipping bool + Sku string + Taxable bool + Title string + UpdatedAt string + Weight float64 + WeightUnit string + type VariantOption struct + Name string + OptionID int64 + Value string + type VariantParam struct + Limit int + Page int + func (param *VariantParam) EncodeQuery() string + type VariantService service + func (p *VariantService) Get(ctx context.Context, params *VariantParam) ([]*Variant, *http.Response, error) + func (p *VariantService) GetVariant(ctx context.Context, ID int64) (*Variant, *http.Response, error) + type Webhook struct + Address string + CreatedAt time.Time + Fields []string + Format string + ID int + MetafieldNamespaces []string + Topic Topic + UpdatedAt time.Time + type WebhookRequest struct + Webhook *Webhook + type WebhookService service + func (s *WebhookService) Create(ctx context.Context, webhook *WebhookRequest) (*Webhook, *http.Response, error) + func (s *WebhookService) List(ctx context.Context) ([]*Webhook, *http.Response, error) + func (s WebhookService) Delete(ctx context.Context, ID int64) (*http.Response, error)