Documentation ¶
Index ¶
- Constants
- func BuildBaseUrl(request Request) (url string)
- func BuildIdUrl(request Request, resource string, id int) (url string)
- func BuildSimpleUrl(request Request, resource string) (url string)
- func ExtractNextCursorUrl(header string) string
- type ApiVersion
- type Client
- type Collect
- type CollectRequestOptions
- type CollectWrapper
- type Collection
- type Creator
- type Getter
- type Image
- type Lister
- type MetaFields
- type OAuthRequest
- type OAuthResponse
- type PresentmentPrice
- type Price
- type Product
- type ProductImage
- type ProductMetafield
- type ProductOption
- type ProductRequestOptions
- type ProductVariant
- type ProductWrapper
- type QueryParamStringer
- type RecurringApplicationCharge
- type RecurringApplicationChargeOptons
- type RecurringApplicationChargeWrapper
- type RecurringApplicationChargesWrapper
- type Request
- type RestAdminClient
- func (c *RestAdminClient) CollectList(details ShopifyContext, options CollectRequestOptions) (result []Collect, err error)
- func (r *RestAdminClient) Create(context ShopifyContext, returnResource Creator, originalResource Creator) (err error)
- func (r *RestAdminClient) Delete(context ShopifyContext, resource string, id int) (err error)
- func (r *RestAdminClient) Get(context ShopifyContext, resource Getter) (err error)
- func (r *RestAdminClient) List(context ShopifyContext, options QueryParamStringer, resource Lister) (next string, err error)
- func (c *RestAdminClient) OAuthRequest(details ShopifyContext, request OAuthRequest) (result OAuthResponse, err error)
- func (c *RestAdminClient) ProductList(details ShopifyContext, options ProductRequestOptions) (products []Product, err error)
- func (c *RestAdminClient) RecurringApplicationChargeActivate(details ShopifyContext, request RecurringApplicationCharge) (result RecurringApplicationCharge, err error)
- func (c *RestAdminClient) RecurringApplicationChargeCreate(details ShopifyContext, request RecurringApplicationCharge) (result RecurringApplicationCharge, err error)
- func (c *RestAdminClient) RecurringApplicationChargeList(details ShopifyContext, options RecurringApplicationChargeOptons) (charges []RecurringApplicationCharge, err error)
- func (r *RestAdminClient) Request(request Request) (result []byte, next string, err error)
- func (c *RestAdminClient) ScriptTagCreate(details ShopifyContext, request ScriptTag) (result ScriptTag, err error)
- func (c *RestAdminClient) ShopGet(context ShopifyContext) (result Shop, err error)
- func (r *RestAdminClient) WebhookCreate(context ShopifyContext, request Webhook) (result *Webhook, err error)
- func (r *RestAdminClient) WebhookDelete(context ShopifyContext, id int) (err error)
- func (r *RestAdminClient) WebhookList(context ShopifyContext, options WebHookRequestOptions) (results []Webhook, next string, err error)
- type Rules
- type ScriptTag
- type ScriptTageWrapper
- type Shop
- type ShopWrapper
- type ShopifyContext
- type ShopifyTestImpl
- func (client *ShopifyTestImpl) ClearBillingActivateResponses()
- func (client *ShopifyTestImpl) ClearBillingSetupResponses()
- func (client *ShopifyTestImpl) ClearOAuthResponses()
- func (client *ShopifyTestImpl) ClearShopResponses()
- func (client *ShopifyTestImpl) ClearWebhookResponse()
- func (client *ShopifyTestImpl) CollectList(details ShopifyContext, options CollectRequestOptions) (result []Collect, err error)
- func (client *ShopifyTestImpl) OAuthRequest(details ShopifyContext, request OAuthRequest) (result OAuthResponse, err error)
- func (client *ShopifyTestImpl) ProductList(details ShopifyContext, options ProductRequestOptions) (result []Product, err error)
- func (client *ShopifyTestImpl) RecurringApplicationChargeActivate(details ShopifyContext, request RecurringApplicationCharge) (result RecurringApplicationCharge, err error)
- func (client *ShopifyTestImpl) RecurringApplicationChargeCreate(details ShopifyContext, request RecurringApplicationCharge) (result RecurringApplicationCharge, err error)
- func (client *ShopifyTestImpl) RecurringApplicationChargeList(details ShopifyContext, options RecurringApplicationChargeOptons) (result []RecurringApplicationCharge, err error)
- func (client *ShopifyTestImpl) RegisterBillingSetupResponse(shopName string, response RecurringApplicationCharge)
- func (client *ShopifyTestImpl) RegisterFakeBillingActivateResponse(shopName string, response RecurringApplicationCharge)
- func (client *ShopifyTestImpl) RegisterFakeProductsResponse(shopName string, products []Product)
- func (client *ShopifyTestImpl) RegisterFakeRecurringApplicationCharges(shopName string, charges []RecurringApplicationCharge)
- func (client *ShopifyTestImpl) RegisterFakeScriptTag(shopName string, response ScriptTag)
- func (client *ShopifyTestImpl) RegisterOAuthResponse(shopName string, response OAuthResponse)
- func (client *ShopifyTestImpl) RegisterShopResponse(shopName string, response Shop)
- func (client *ShopifyTestImpl) RegisterWebhookResponse(shopName string, response Webhook)
- func (c *ShopifyTestImpl) ScriptTagCreate(details ShopifyContext, scriptTag ScriptTag) (result ScriptTag, err error)
- func (client *ShopifyTestImpl) ShopGet(details ShopifyContext) (result Shop, err error)
- func (client *ShopifyTestImpl) WebhookCreate(details ShopifyContext, request Webhook) (result Webhook, err error)
- func (client *ShopifyTestImpl) WebhookDelete(details ShopifyContext, request Webhook) (err error)
- func (client *ShopifyTestImpl) WebhookList(details ShopifyContext, options WebHookRequestOptions) (result []Webhook, err error)
- type WebHookRequestOptions
- type Webhook
- type WebhookWrapper
- type Webhooks
- type WebhooksWrapper
Constants ¶
View Source
const ( ProductCreate = "products/create" ProductUpdate = "products/update" ProductDelete = "products/delete" AppUninstalled = "app/uninstalled" XShopifyShopDomain = "X-Shopify-Shop-Domain" XShopifyHmacSha256 = "X-Shopify-Hmac-Sha256" )
Variables ¶
This section is empty.
Functions ¶
func BuildBaseUrl ¶
A helper for building the base url for a shopify request
func BuildIdUrl ¶
A helper for building a url that has an id
func BuildSimpleUrl ¶
A Helper function to build a request url with only a resource component.
func ExtractNextCursorUrl ¶
Used to extract the cursor based url from the response header.
Types ¶
type ApiVersion ¶
type ApiVersion int
const ( VERSION_2019_07 ApiVersion = iota VERSION_2019_10 VERSION_2020_01 VERSION_2020_04 VERSION_2020_07 VERSION_2020_10 )
func (ApiVersion) String ¶
func (a ApiVersion) String() string
type Client ¶
type Client interface { OAuthRequest(Request, OAuthRequest) (OAuthResponse, error) RecurringApplicationChargeCreate(details Request, request RecurringApplicationCharge) (RecurringApplicationCharge, error) RecurringApplicationChargeActivate(Request, RecurringApplicationCharge) (RecurringApplicationCharge, error) ShopGet(Request) (Shop, error) WebhookCreate(ShopifyContext, Webhook) (Webhook, error) WebhookDelete(ShopifyContext, int) error WebhookList(ShopifyContext, WebHookRequestOptions) ([]Webhook, error) ProductList(Request, ProductRequestOptions) ([]Product, error) CollectList(Request, CollectRequestOptions) ([]Collect, error) RecurringApplicationChargeList(Request, RecurringApplicationChargeOptons) ([]RecurringApplicationCharge, error) ScriptTagCreate(Request, ScriptTag) (ScriptTag, error) }
type CollectRequestOptions ¶
type CollectWrapper ¶
type CollectWrapper struct {
Collects []Collect `json:"collect"`
}
type Collection ¶
type Collection struct { BodyHtml string `json:"body_html"` Handle string `json:"handle"` Image Image `json:"image"` Id int `json:"id"` MetaFields []MetaFields `json:"metafields"` Published bool `json:"published"` PublishedAt string `json:"published_at"` PublishedScope string `json:"published_scope"` // TODO this could be an enum value SortOrder string `json:"sort_order"` // TODO this could be an enum value TemplateSuffix string `json:"template_suffix"` Title string `json:"title"` UpdatedAt string `json:"updated_at"` Rules Rules `json:"rules,omitempty"` Disjunctive bool `json:"disjunctive,omitempty"` ProductsManuallySortedCount int `json:"products_manually_sorted_count,omitempty"` }
type MetaFields ¶
type OAuthRequest ¶
type OAuthResponse ¶
type PresentmentPrice ¶
type Product ¶
type Product struct { BodyHtml string `json:"body_html,omitempty"` CreatedAt string `json:"created_at,omitempty"` Handle string `json:"handle,omitempty"` Id int `json:"id,omitempty"` Images []ProductImage `json:"images,omitempty"` Title string `json:"title,omitempty"` Variants []ProductVariant `json:"variants,omitempty"` Options []ProductOption `json:"options,omitempty"` ProductType string `json:"product_type,omitempty"` PublishedAt string `json:"published_at,omitempty"` PublishedScope string `json:"published_scope,omitempty"` Tags string `json:"tags,omitempty"` TemplateSuffix string `json:"template_suffix,omitempty"` MetafieldsGlobalTitleTag string `json:"metafields_global_title_tag,omitempty"` MetafieldsGlobalDescriptionTag string `json:"metafields_global_description_tag,omitempty"` UpdateAt string `json:"update_at,omitempty"` Vendor string `json:"vendor,omitempty"` Image ProductImage `json:"image,omitempty"` }
type ProductImage ¶
type ProductImage struct { Id int `json:"id"` ProductId int `json:"product_id"` Position int `json:"position"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Width int `json:"width"` Height int `json:"height"` Src string `json:"src"` VariantIds []int `json:"variant_ids"` }
type ProductMetafield ¶
type ProductOption ¶
type ProductRequestOptions ¶
type ProductRequestOptions struct { Ids []int `url:"ids,omitempty"` Limit int `url:"limit,omitempty"` SinceId int `url:"since_id"` Title string `url:"title,omitempty"` Vendor string `url:"vendor,omitempty"` Handle string `url:"handle,omitempty"` ProductType string `url:"product_type,omitempty"` CollectionId int `url:"collection_id,omitempty"` CreatedAtMin string `url:"created_at_min,omitempty"` CreatedAtMax string `url:"created_at_max,omitempty"` UpdatedAtMin string `url:"updated_at_min,omitempty"` UpdatedAtMax string `url:"updated_at_max,omitempty"` PublishedAtMin string `url:"published_at_min,omitempty"` PublishedAtMax string `url:"published_at_max,omitempty"` PublishedStatus string `url:"published_status,omitempty"` Fields []string `url:"fields,omitempty"` PresentmentCurrencies string `url:"presentment_currencies,omitempty"` All bool }
type ProductVariant ¶
type ProductVariant struct { Barcode string `json:"barcode,omitempty"` CompareAtPrice string `json:"compare_at_price,omitempty"` CreateAt string `json:"create_at,omitempty"` FulfillmentService string `json:"fulfillment_service,omitempty"` Grams int `json:"grams,omitempty"` Id int `json:"id,omitempty"` ImageId int `json:"image_id,omitempty"` InventoryItemId int `json:"inventory_item_id,omitempty"` InventoryManagement string `json:"inventory_management,omitempty"` InventoryPolicy string `json:"inventory_policy,omitempty"` InventoryQuantity int `json:"inventory_quantity,omitempty"` Metafields []MetaFields `json:"metafields,omitempty"` OptionOne string `json:"option1,omitempty"` OptionTwo string `json:"option2,omitempty"` OptionThree string `json:"option3,omitempty"` PresentmentPrices []PresentmentPrice `json:"presentment_prices,omitempty"` Position int `json:"position,omitempty"` Price string `json:"price,omitempty"` ProductId int `json:"product_id,omitempty"` Sku string `json:"sku,omitempty"` Taxable bool `json:"taxable,omitempty"` TaxCode string `json:"tax_code,omitempty"` Title string `json:"title,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Weight float32 `json:"weight,omitempty"` WeightUnit string `json:"weight_unit,omitempty"` }
type ProductWrapper ¶
type ProductWrapper struct {
Products []Product `json:"products"`
}
type QueryParamStringer ¶
type RecurringApplicationCharge ¶
type RecurringApplicationCharge struct { ConfirmationUrl string `json:"confirmation_url,omitempty"` Id int `json:"id,omitempty"` Name string `json:"name,omitempty"` Price string `json:"price,omitempty"` ReturnUrl string `json:"return_url,omitempty"` Status string `json:"status,omitempty"` Test bool `json:"test,omitempty"` TrialDays int `json:"trial_days,omitempty"` }
type RecurringApplicationChargeWrapper ¶
type RecurringApplicationChargeWrapper struct {
RecurringApplicationCharges RecurringApplicationCharge `json:"recurring_application_charge,omitempty"`
}
type RecurringApplicationChargesWrapper ¶
type RecurringApplicationChargesWrapper struct {
RecurringApplicationCharges []RecurringApplicationCharge `json:"recurring_application_charges,omitempty"`
}
type Request ¶
type Request struct { Context ShopifyContext Method string Url string Headers map[string]string Body []byte Version ApiVersion }
type RestAdminClient ¶
type RestAdminClient struct { Http *http.Client Logger *log.Logger Version ApiVersion }
func (*RestAdminClient) CollectList ¶
func (c *RestAdminClient) CollectList(details ShopifyContext, options CollectRequestOptions) (result []Collect, err error)
func (*RestAdminClient) Create ¶
func (r *RestAdminClient) Create(context ShopifyContext, returnResource Creator, originalResource Creator) (err error)
func (*RestAdminClient) Delete ¶
func (r *RestAdminClient) Delete(context ShopifyContext, resource string, id int) (err error)
func (*RestAdminClient) Get ¶
func (r *RestAdminClient) Get(context ShopifyContext, resource Getter) (err error)
func (*RestAdminClient) List ¶
func (r *RestAdminClient) List(context ShopifyContext, options QueryParamStringer, resource Lister) (next string, err error)
func (*RestAdminClient) OAuthRequest ¶
func (c *RestAdminClient) OAuthRequest(details ShopifyContext, request OAuthRequest) (result OAuthResponse, err error)
func (*RestAdminClient) ProductList ¶
func (c *RestAdminClient) ProductList(details ShopifyContext, options ProductRequestOptions) (products []Product, err error)
func (*RestAdminClient) RecurringApplicationChargeActivate ¶
func (c *RestAdminClient) RecurringApplicationChargeActivate(details ShopifyContext, request RecurringApplicationCharge) (result RecurringApplicationCharge, err error)
func (*RestAdminClient) RecurringApplicationChargeCreate ¶
func (c *RestAdminClient) RecurringApplicationChargeCreate(details ShopifyContext, request RecurringApplicationCharge) (result RecurringApplicationCharge, err error)
func (*RestAdminClient) RecurringApplicationChargeList ¶
func (c *RestAdminClient) RecurringApplicationChargeList(details ShopifyContext, options RecurringApplicationChargeOptons) (charges []RecurringApplicationCharge, err error)
func (*RestAdminClient) Request ¶
func (r *RestAdminClient) Request(request Request) (result []byte, next string, err error)
func (*RestAdminClient) ScriptTagCreate ¶
func (c *RestAdminClient) ScriptTagCreate(details ShopifyContext, request ScriptTag) (result ScriptTag, err error)
func (*RestAdminClient) ShopGet ¶
func (c *RestAdminClient) ShopGet(context ShopifyContext) (result Shop, err error)
func (*RestAdminClient) WebhookCreate ¶
func (r *RestAdminClient) WebhookCreate(context ShopifyContext, request Webhook) (result *Webhook, err error)
func (*RestAdminClient) WebhookDelete ¶
func (r *RestAdminClient) WebhookDelete(context ShopifyContext, id int) (err error)
func (*RestAdminClient) WebhookList ¶
func (r *RestAdminClient) WebhookList(context ShopifyContext, options WebHookRequestOptions) (results []Webhook, next string, err error)
type Rules ¶
type Rules struct { Column string `json:"column"` Relation string `json:"relation"` Condition string `json:"condition"` }
TODO these could be enum values
type ScriptTageWrapper ¶
type ScriptTageWrapper struct {
ScriptTag ScriptTag `json:"script_tag"`
}
type Shop ¶
type Shop struct { AddressOne string `json:"address1,omitempty"` AddressTwo string `json:"address2,omitempty"` CheckoutApiSupported bool `json:"checkout_api_supported,omitempty"` City string `json:"city,omitempty"` Country string `json:"country,omitempty"` CountryCode string `json:"country_code,omitempty"` CountryTaxes bool `json:"country_taxes,omitempty"` CreateAt string `json:"create_at,omitempty"` CustomerEmail string `json:"customer_email,omitempty"` Currency string `json:"currency,omitempty"` Domain string `json:"domain,omitempty"` EnabledPresentmenCurrencies []string `json:"enabled_presentmen_currencies,omitempty"` EligibleForCardReaderGiveaway bool `json:"eligible_for_card_reader_giveaway,omitempty"` EligibleForPayments bool `json:"eligible_for_payments,omitempty"` Email string `json:"email,omitempty"` ForceSsl bool `json:"force_ssl,omitempty"` GoogleAppsDomain string `json:"google_apps_domain,omitempty"` GoogleAppsLoginEnabled bool `json:"google_apps_login_enabled,omitempty"` HasDiscounts bool `json:"has_discounts,omitempty"` HasGiftCards bool `json:"has_gift_cards,omitempty"` HasStorefront bool `json:"has_storefront,omitempty"` IanaTimezone string `json:"iana_timezone,omitempty"` Id int `json:"id,omitempty"` Latitude float64 `json:"latitude,omitempty"` Longitude float64 `json:"longitude,omitempty"` MoneyFormat string `json:"money_format,omitempty"` MoneyInEmailsFormat string `json:"money_in_emails_format,omitempty"` MoneyWithCurrencyFormat string `json:"money_with_currency_format,omitempty"` MultiLocationEnabled bool `json:"multi_location_enabled,omitempty"` MyshopifyDomain string `json:"myshopify_domain,omitempty"` Name string `json:"name,omitempty"` PasswordEnabled bool `json:"password_enabled,omitempty"` Phone string `json:"phone,omitempty"` PlanDisplayName string `json:"plan_display_name,omitempty"` PreLaunchEnabled bool `json:"pre_launch_enabled,omitempty"` PlaneName string `json:"plane_name,omitempty"` PrimaryLocale string `json:"primary_locale,omitempty"` Province string `json:"province,omitempty"` ProvinceCode string `json:"province_code,omitempty"` RequiresExtraPaymentsAgreement bool `json:"requires_extra_payments_agreement,omitempty"` SetupRequired bool `json:"setup_required,omitempty"` ShopOwner string `json:"shop_owner,omitempty"` Source string `json:"source,omitempty"` TaxesIncluded bool `json:"taxes_included,omitempty"` TaxShipping bool `json:"tax_shipping,omitempty"` Timezone string `json:"timezone,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` WeightUnit string `json:"weight_unit,omitempty"` Zip string `json:"zip,omitempty"` }
type ShopWrapper ¶
type ShopWrapper struct {
Shop Shop `json:"shop,omitempty"`
}
func (ShopWrapper) BuildGetUrl ¶
func (s ShopWrapper) BuildGetUrl(request Request) string
func (ShopWrapper) GetId ¶
func (s ShopWrapper) GetId() int
func (ShopWrapper) GetResourceName ¶
func (s ShopWrapper) GetResourceName() string
type ShopifyContext ¶
type ShopifyTestImpl ¶
type ShopifyTestImpl struct {
// contains filtered or unexported fields
}
func NewShopifyTestImp ¶
func NewShopifyTestImp() *ShopifyTestImpl
func (*ShopifyTestImpl) ClearBillingActivateResponses ¶
func (client *ShopifyTestImpl) ClearBillingActivateResponses()
func (*ShopifyTestImpl) ClearBillingSetupResponses ¶
func (client *ShopifyTestImpl) ClearBillingSetupResponses()
func (*ShopifyTestImpl) ClearOAuthResponses ¶
func (client *ShopifyTestImpl) ClearOAuthResponses()
func (*ShopifyTestImpl) ClearShopResponses ¶
func (client *ShopifyTestImpl) ClearShopResponses()
func (*ShopifyTestImpl) ClearWebhookResponse ¶
func (client *ShopifyTestImpl) ClearWebhookResponse()
func (*ShopifyTestImpl) CollectList ¶
func (client *ShopifyTestImpl) CollectList(details ShopifyContext, options CollectRequestOptions) (result []Collect, err error)
func (*ShopifyTestImpl) OAuthRequest ¶
func (client *ShopifyTestImpl) OAuthRequest(details ShopifyContext, request OAuthRequest) (result OAuthResponse, err error)
func (*ShopifyTestImpl) ProductList ¶
func (client *ShopifyTestImpl) ProductList(details ShopifyContext, options ProductRequestOptions) (result []Product, err error)
func (*ShopifyTestImpl) RecurringApplicationChargeActivate ¶
func (client *ShopifyTestImpl) RecurringApplicationChargeActivate(details ShopifyContext, request RecurringApplicationCharge) (result RecurringApplicationCharge, err error)
func (*ShopifyTestImpl) RecurringApplicationChargeCreate ¶
func (client *ShopifyTestImpl) RecurringApplicationChargeCreate(details ShopifyContext, request RecurringApplicationCharge) (result RecurringApplicationCharge, err error)
func (*ShopifyTestImpl) RecurringApplicationChargeList ¶
func (client *ShopifyTestImpl) RecurringApplicationChargeList(details ShopifyContext, options RecurringApplicationChargeOptons) (result []RecurringApplicationCharge, err error)
func (*ShopifyTestImpl) RegisterBillingSetupResponse ¶
func (client *ShopifyTestImpl) RegisterBillingSetupResponse(shopName string, response RecurringApplicationCharge)
func (*ShopifyTestImpl) RegisterFakeBillingActivateResponse ¶
func (client *ShopifyTestImpl) RegisterFakeBillingActivateResponse(shopName string, response RecurringApplicationCharge)
func (*ShopifyTestImpl) RegisterFakeProductsResponse ¶
func (client *ShopifyTestImpl) RegisterFakeProductsResponse(shopName string, products []Product)
func (*ShopifyTestImpl) RegisterFakeRecurringApplicationCharges ¶
func (client *ShopifyTestImpl) RegisterFakeRecurringApplicationCharges(shopName string, charges []RecurringApplicationCharge)
func (*ShopifyTestImpl) RegisterFakeScriptTag ¶
func (client *ShopifyTestImpl) RegisterFakeScriptTag(shopName string, response ScriptTag)
func (*ShopifyTestImpl) RegisterOAuthResponse ¶
func (client *ShopifyTestImpl) RegisterOAuthResponse(shopName string, response OAuthResponse)
func (*ShopifyTestImpl) RegisterShopResponse ¶
func (client *ShopifyTestImpl) RegisterShopResponse(shopName string, response Shop)
func (*ShopifyTestImpl) RegisterWebhookResponse ¶
func (client *ShopifyTestImpl) RegisterWebhookResponse(shopName string, response Webhook)
func (*ShopifyTestImpl) ScriptTagCreate ¶
func (c *ShopifyTestImpl) ScriptTagCreate(details ShopifyContext, scriptTag ScriptTag) (result ScriptTag, err error)
func (*ShopifyTestImpl) ShopGet ¶
func (client *ShopifyTestImpl) ShopGet(details ShopifyContext) (result Shop, err error)
func (*ShopifyTestImpl) WebhookCreate ¶
func (client *ShopifyTestImpl) WebhookCreate(details ShopifyContext, request Webhook) (result Webhook, err error)
func (*ShopifyTestImpl) WebhookDelete ¶
func (client *ShopifyTestImpl) WebhookDelete(details ShopifyContext, request Webhook) (err error)
func (*ShopifyTestImpl) WebhookList ¶
func (client *ShopifyTestImpl) WebhookList(details ShopifyContext, options WebHookRequestOptions) (result []Webhook, err error)
type WebHookRequestOptions ¶
type WebHookRequestOptions struct { Address string `url:"address,omitempty"` CreatedAtMax string `url:"created_at_max,omitempty"` CreatedAtMin string `url:"created_at_min,omitempty"` Fields []string `url:"fields,omitempty"` Limit int `url:"limit,omitempty"` SinceId int `url:"since_id"` Topic string `url:"topic,omitempty"` UpdatedAtMin string `url:"updated_at_min,omitempty"` UpdatedAtMax string `url:"updated_at_max,omitempty"` }
func (WebHookRequestOptions) UrlOptionsString ¶
func (w WebHookRequestOptions) UrlOptionsString() (queryParams string, err error)
type Webhook ¶
type Webhook struct { Address string `json:"address"` Created_at string `json:"created_at, omitempty"` Fields []string `json:"fields omitempty"` Format string `json:"format"` Id int `json:"id, omitempty"` MetafieldNamespaces []string `json:"metafield_namespaces, omitempty"` Topic string `json:"topic"` UpdatedAt string `json:"updated_at, omitempty"` }
type WebhookWrapper ¶
type WebhookWrapper struct {
Webhook *Webhook `json:"webhook"`
}
func (WebhookWrapper) BuildCreateUrl ¶
func (w WebhookWrapper) BuildCreateUrl(request Request) string
func (WebhookWrapper) GetResourceName ¶
func (w WebhookWrapper) GetResourceName() string
type WebhooksWrapper ¶
type WebhooksWrapper struct {
Webhooks []Webhook
}
func (WebhooksWrapper) GetResourceName ¶
func (w WebhooksWrapper) GetResourceName() string
func (*WebhooksWrapper) UnmarshalJSON ¶
func (w *WebhooksWrapper) UnmarshalJSON(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.