Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discounts ¶
type Discounts struct {
PriceRules []PriceRule `json:"price_rules"`
}
Discounts shopify API response to price_rules.json
type PriceRule ¶
type PriceRule struct { ID int `json:"id"` ValueType string `json:"value_type"` Value string `json:"value"` CustomerSelection string `json:"customer_selection"` TargetType string `json:"target_type"` TargetSelection string `json:"target_selection"` AllocationMethod string `json:"allocation_method"` AllocationLimit int `json:"allocation_limit"` OncePerCustomer bool `json:"once_per_customer"` UsageLimit int `json:"usage_limit"` StartsAt string `json:"starts_at"` EndsAt string `json:"ends_at"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` EntitledProductIds []int `json:"entitled_product_ids"` EntitledVariantIds []int `json:"entitled_variant_ids"` EntitledCollectionIds []int `json:"entitled_collection_ids"` EntitledCountryIds []int `json:"entitled_country_ids"` PrerequisiteProductIds []int `json:"prerequisite_product_ids"` PrerequisiteVariantIds []int `json:"prerequisite_variant_ids"` PrerequisiteCollectionIds []int `json:"prerequisite_collection_ids"` PrerequisiteSavedSearchIds []int `json:"prerequisite_saved_search_ids"` PrerequisiteCustomerIds []int `json:"prerequisite_customer_ids"` PrerequisiteSubtotalRange struct { GreaterThanOrEqualTo string `json:"greater_than_or_equal_to"` } `json:"prerequisite_subtotal_range"` PrerequisiteQuantityRange struct { GreaterThanOrEqualTo int `json:"greater_than_or_equal_to"` } `json:"prerequisite_quantity_range"` PrerequisiteShippingPriceRange struct { LessThanOrEqualTo int `json:"less_than_or_equal_to"` } `json:"prerequisite_shipping_price_range"` PrerequisiteToEntitlementQuantityRatio struct { PrerequisiteQuantity int `json:"prerequisite_quantity"` EntitledQuantity int `json:"entitled_quantity"` } `json:"prerequisite_to_entitlement_quantity_ratio"` Title string `json:"title"` AdminGraphqlAPIID string `json:"admin_graphql_api_id"` }
PriceRule discount code infos
func FetchDiscountCode ¶
FetchDiscountCode fetches the given code infos
Click to show internal directories.
Click to hide internal directories.