github.com/r0busta/go-shopify-graphql-model@v0.0.4/graph/model/models_gen.go (about) 1 // Code generated by github.com/99designs/gqlgen, DO NOT EDIT. 2 3 package model 4 5 import ( 6 "fmt" 7 "io" 8 "strconv" 9 10 "gopkg.in/guregu/null.v4" 11 ) 12 13 // Information about the price charged to a shop every plan period. 14 type AppPricingDetails map[string]interface{} 15 16 // Services and features purchased once by the store. 17 type AppPurchase interface { 18 IsAppPurchase() 19 } 20 21 // A discount application involved in order editing that might be newly added or have new changes applied. 22 type CalculatedDiscountApplication interface { 23 IsCalculatedDiscountApplication() 24 } 25 26 // The main embed of a comment event. 27 type CommentEventEmbed map[string]interface{} 28 29 // The subject line of a comment event. 30 type CommentEventSubject interface { 31 IsCommentEventSubject() 32 } 33 34 // Represents events preceding a customer order, such as shop sessions. 35 type CustomerMoment interface { 36 IsCustomerMoment() 37 } 38 39 // All possible instruments for CustomerPaymentMethods. 40 type CustomerPaymentInstrument map[string]interface{} 41 42 // The criteria (weight or price) that the field must meet based on the operator. 43 type DeliveryConditionCriteria map[string]interface{} 44 45 // Rate provided by a rate definition or a participant. 46 type DeliveryRateProvider map[string]interface{} 47 48 // Discount applications capture the intentions of a discount source at 49 // the time of application on an order's line items or shipping lines. 50 type DiscountApplication interface { 51 IsDiscountApplication() 52 } 53 54 // An automatic discount. 55 type DiscountAutomatic map[string]interface{} 56 57 // A code discount. 58 type DiscountCode map[string]interface{} 59 60 // The prerequisite quantity required for the discount to be applicable. 61 type DiscountCustomerBuysValue map[string]interface{} 62 63 // The value of the discount and how it will be applied. 64 type DiscountCustomerGetsValue map[string]interface{} 65 66 // The selection of customers who can use this discount. 67 type DiscountCustomerSelection map[string]interface{} 68 69 // The type of discount that will be applied. Currently, only percentage off is supported. 70 type DiscountEffect map[string]interface{} 71 72 // Entitled or prerequisite items on a discount. An item could be either collection or product or product_variant. 73 type DiscountItems map[string]interface{} 74 75 // The minimum subtotal or quantity requirements for the discount. 76 type DiscountMinimumRequirement map[string]interface{} 77 78 // The selection of shipping countries to which this discount applies. 79 type DiscountShippingDestinationSelection map[string]interface{} 80 81 // Represents an error in the input of a mutation. 82 type DisplayableError interface { 83 IsDisplayableError() 84 } 85 86 // Events chronicle resource activities such as the creation of an article, the fulfillment of an order, or the 87 // addition of a product. 88 type Event interface { 89 IsEvent() 90 } 91 92 // Connector to event records on a compatible host. 93 type HasEvents interface { 94 IsHasEvents() 95 } 96 97 // Localization extensions associated with the specified resource. For example, the tax id for government invoice. 98 type HasLocalizationExtensions interface { 99 IsHasLocalizationExtensions() 100 } 101 102 // Localization extensions associated with the specified resource. For example, the tax id for government invoice. 103 type HasLocalizationExtensionsForDraftOrders interface { 104 IsHasLocalizationExtensionsForDraftOrders() 105 } 106 107 // Represents information about the metafields associated to the specified resource. 108 type HasMetafields interface { 109 IsHasMetafields() 110 } 111 112 // Published translations associated with the resource. 113 type HasPublishedTranslations interface { 114 IsHasPublishedTranslations() 115 } 116 117 // Interoperability metadata for types that directly correspond to a REST Admin API resource. 118 // For example, on the Product type, LegacyInteroperability returns metadata for the corresponding [Product object](https://help.shopify.com/api/reference/products/product) in the REST Admin API. 119 type LegacyInteroperability interface { 120 IsLegacyInteroperability() 121 } 122 123 // Represents a media interface. 124 type Media interface { 125 IsMedia() 126 } 127 128 // A default cursor for use in pagination. 129 // The default cursor can be used for next and previous navigation. 130 type Navigable interface { 131 IsNavigable() 132 } 133 134 // An object with an ID to support global identification. 135 type Node interface { 136 IsNode() 137 } 138 139 // Online Store preview URL of the object. 140 type OnlineStorePreviewable interface { 141 IsOnlineStorePreviewable() 142 } 143 144 // A change that has been applied to an order. 145 type OrderStagedChange map[string]interface{} 146 147 // The value of the price rule. 148 type PriceRuleValue map[string]interface{} 149 150 // The value of the pricing object. 151 type PricingValue map[string]interface{} 152 153 // Represents a resource that can be published to a channel. 154 // A publishable resource can be either a Product or Collection. 155 type Publishable interface { 156 IsPublishable() 157 } 158 159 // Represents the billing frequency associated to the selling plan (for example, bill every week, or bill every 160 // three months). The selling plan billing policy and associated records (selling plan groups, selling plans, pricing 161 // policies, and delivery policy) are deleted 48 hours after a merchant uninstalls their subscriptions app. 162 // We recommend backing up these records if you need to restore them later. 163 type SellingPlanBillingPolicy map[string]interface{} 164 165 // Represents the delivery frequency associated to the selling plan (for example, deliver every month, or deliver 166 // every other week). The selling plan delivery policy and associated records (selling plan groups, selling plans, 167 // pricing policies, and billing policy) are deleted 48 hours after a merchant uninstalls their subscriptions app. 168 // We recommend backing up these records if you need to restore them later. 169 type SellingPlanDeliveryPolicy map[string]interface{} 170 171 // Represents the type of pricing associated to the selling plan (for example, a $10 or 20% discount that is set 172 // for a limited period or that is fixed for the duration of the subscription). Selling plan pricing policies and 173 // associated records (selling plan groups, selling plans, billing policy, and delivery policy) are deleted 48 174 // hours after a merchant uninstalls their subscriptions app. We recommend backing up these records if you need 175 // to restore them later. 176 type SellingPlanPricingPolicy map[string]interface{} 177 178 // Represents a selling plan pricing policy adjustment value type. 179 type SellingPlanPricingPolicyAdjustmentValue map[string]interface{} 180 181 // Represents selling plan pricing policy common fields. 182 type SellingPlanPricingPolicyBase interface { 183 IsSellingPlanPricingPolicyBase() 184 } 185 186 // The charge descriptors for a payments account. 187 type ShopifyPaymentsChargeStatementDescriptor interface { 188 IsShopifyPaymentsChargeStatementDescriptor() 189 } 190 191 // Describes the delivery method to use to get the physical goods to the customer. 192 type SubscriptionDeliveryMethod map[string]interface{} 193 194 // Subscription draft discount types. 195 type SubscriptionDiscount map[string]interface{} 196 197 // The value of the discount and how it will be applied. 198 type SubscriptionDiscountValue map[string]interface{} 199 200 // The result of the query to fetch shipping options for the subscription contract. 201 type SubscriptionShippingOptionResult map[string]interface{} 202 203 // Information about the payment instrument used for this transaction. 204 type TenderTransactionDetails map[string]interface{} 205 206 // Endpoint where webhooks will be delivered. 207 type WebhookSubscriptionEndpoint map[string]interface{} 208 209 // Represents the access scope permission that is applicable to a merchant's shop, such as `read_orders`. 210 type AccessScope struct { 211 // Description of the access scopes enabled on an api permission. 212 Description null.String `json:"description,omitempty"` 213 // A human-friendly string for an access scope. 214 Handle null.String `json:"handle,omitempty"` 215 } 216 217 // Whether all items in the cart are entitled to the discount. 218 type AllDiscountItems struct { 219 // Whether all items are selected. The value is hardcoded to `true`. 220 AllItems bool `json:"allItems,omitempty"` 221 } 222 223 func (AllDiscountItems) IsDiscountItems() {} 224 225 // A version of the API. 226 type APIVersion struct { 227 // The human-readable name of the version. 228 DisplayName null.String `json:"displayName,omitempty"` 229 // The unique identifier of an ApiVersion. All supported API versions have a date-based (YYYY-MM) or `unstable` handle. 230 Handle null.String `json:"handle,omitempty"` 231 // Whether the version is supported by Shopify. 232 Supported bool `json:"supported,omitempty"` 233 } 234 235 // A Shopify application. 236 type App struct { 237 // A unique application API identifier. 238 APIKey null.String `json:"apiKey,omitempty"` 239 // App store page URL of the app. 240 AppStoreAppURL *null.String `json:"appStoreAppUrl,omitempty"` 241 // App store page URL of the developer who created the app. 242 AppStoreDeveloperURL *null.String `json:"appStoreDeveloperUrl,omitempty"` 243 // Banner image for the app. 244 Banner *Image `json:"banner,omitempty"` 245 // Description of the app. 246 Description *null.String `json:"description,omitempty"` 247 // App's developer name. 248 DeveloperName *null.String `json:"developerName,omitempty"` 249 // Website of the developer who created the app. 250 DeveloperURL null.String `json:"developerUrl,omitempty"` 251 // Whether the app uses the Embedded App SDK. 252 Embedded bool `json:"embedded,omitempty"` 253 // Requirements that must be met before the app can be installed. 254 FailedRequirements []*FailedRequirement `json:"failedRequirements,omitempty"` 255 // List of app features. 256 Features []null.String `json:"features,omitempty"` 257 // Feedback from this app about the store. 258 Feedback *AppFeedback `json:"feedback,omitempty"` 259 // Handle of the app. 260 Handle *null.String `json:"handle,omitempty"` 261 // Icon that represents the app. 262 Icon *Image `json:"icon,omitempty"` 263 // Globally unique identifier. 264 ID null.String `json:"id,omitempty"` 265 // Webpage where you can install the app. 266 InstallURL *null.String `json:"installUrl,omitempty"` 267 // Corresponding AppInstallation for this shop and App. 268 // Returns null if the App is not installed. 269 Installation *AppInstallation `json:"installation,omitempty"` 270 // Webpage that the app starts in. 271 LaunchURL null.String `json:"launchUrl,omitempty"` 272 // Menu items for the app, which also appear as submenu items in left navigation sidebar in the Shopify admin. 273 NavigationItems []*NavigationItem `json:"navigationItems,omitempty"` 274 // Detailed information about the app pricing. 275 PricingDetails *null.String `json:"pricingDetails,omitempty"` 276 // Summary of the app pricing details. 277 PricingDetailsSummary null.String `json:"pricingDetailsSummary,omitempty"` 278 // Link to app privacy policy. 279 PrivacyPolicyURL *null.String `json:"privacyPolicyUrl,omitempty"` 280 // Whether the app is published. 281 Published bool `json:"published,omitempty"` 282 // Screenshots of the app. 283 Screenshots []*Image `json:"screenshots,omitempty"` 284 // Whether the app was developed by Shopify. 285 ShopifyDeveloped bool `json:"shopifyDeveloped,omitempty"` 286 // Name of the app. 287 Title null.String `json:"title,omitempty"` 288 // Message that appears when the app is uninstalled. For example: 289 // By removing this app, you will no longer be able to publish products to MySocialSite or view this app in your Shopify admin. You can re-enable this channel at any time. 290 UninstallMessage null.String `json:"uninstallMessage,omitempty"` 291 // Webpage where you can uninstall the app. 292 UninstallURL *null.String `json:"uninstallUrl,omitempty"` 293 } 294 295 func (App) IsNode() {} 296 297 // An auto-generated type for paginating through multiple Apps. 298 type AppConnection struct { 299 // A list of edges. 300 Edges []*AppEdge `json:"edges,omitempty"` 301 // Information to aid in pagination. 302 PageInfo *PageInfo `json:"pageInfo,omitempty"` 303 } 304 305 // App credits can be applied by the merchant towards future app purchases, subscriptions, or usage records in Shopify. 306 type AppCredit struct { 307 // The amount that can be used towards future app purchases in Shopify. 308 Amount *MoneyV2 `json:"amount,omitempty"` 309 // The date and time when the app credit was created. 310 CreatedAt null.String `json:"createdAt,omitempty"` 311 // The description of the app credit. 312 Description null.String `json:"description,omitempty"` 313 // Globally unique identifier. 314 ID null.String `json:"id,omitempty"` 315 // Whether the app credit is a test transaction. 316 Test bool `json:"test,omitempty"` 317 } 318 319 func (AppCredit) IsNode() {} 320 321 // An auto-generated type for paginating through multiple AppCredits. 322 type AppCreditConnection struct { 323 // A list of edges. 324 Edges []*AppCreditEdge `json:"edges,omitempty"` 325 // Information to aid in pagination. 326 PageInfo *PageInfo `json:"pageInfo,omitempty"` 327 } 328 329 // Return type for `appCreditCreate` mutation. 330 type AppCreditCreatePayload struct { 331 // The newly created app credit. 332 AppCredit *AppCredit `json:"appCredit,omitempty"` 333 // List of errors that occurred executing the mutation. 334 UserErrors []*UserError `json:"userErrors,omitempty"` 335 } 336 337 // An auto-generated type which holds one AppCredit and a cursor during pagination. 338 type AppCreditEdge struct { 339 // A cursor for use in pagination. 340 Cursor null.String `json:"cursor,omitempty"` 341 // The item at the end of AppCreditEdge. 342 Node *AppCredit `json:"node,omitempty"` 343 } 344 345 // An auto-generated type which holds one App and a cursor during pagination. 346 type AppEdge struct { 347 // A cursor for use in pagination. 348 Cursor null.String `json:"cursor,omitempty"` 349 // The item at the end of AppEdge. 350 Node *App `json:"node,omitempty"` 351 } 352 353 // Reports the status of shops and their resources and displays this information 354 // within Shopify admin. AppFeedback is used to notify merchants about steps they need to take 355 // to set up an app on their store. 356 type AppFeedback struct { 357 // The application associated to the feedback. 358 // App *App `json:"app,omitempty"` 359 // A link to where merchants can resolve errors. 360 Link *Link `json:"link,omitempty"` 361 // The feedback message presented to the merchant. 362 Messages []*UserError `json:"messages,omitempty"` 363 } 364 365 // Represents an installed application on a shop. 366 type AppInstallation struct { 367 // Access scopes granted to an app by a merchant during installation. 368 AccessScopes []*AccessScope `json:"accessScopes,omitempty"` 369 // Active subscriptions charged to a shop on a recurring basis. 370 ActiveSubscriptions []*AppSubscription `json:"activeSubscriptions,omitempty"` 371 // All subscriptions created for a shop. 372 AllSubscriptions *AppSubscriptionConnection `json:"allSubscriptions,omitempty"` 373 // Application which is installed. 374 App *App `json:"app,omitempty"` 375 // Channel associated with the installed application. 376 Channel *Channel `json:"channel,omitempty"` 377 // Credits that can be used towards future app purchases. 378 Credits *AppCreditConnection `json:"credits,omitempty"` 379 // Globally unique identifier. 380 ID null.String `json:"id,omitempty"` 381 // Url used to launch the app. 382 LaunchURL null.String `json:"launchUrl,omitempty"` 383 // One-time purchases to a shop. 384 OneTimePurchases *AppPurchaseOneTimeConnection `json:"oneTimePurchases,omitempty"` 385 // Publication associated with the installed application. 386 Publication *Publication `json:"publication,omitempty"` 387 // Subscriptions charge to a shop on a recurring basis. 388 Subscriptions []*AppSubscription `json:"subscriptions,omitempty"` 389 // Webpage where you can uninstall the app. 390 UninstallURL *null.String `json:"uninstallUrl,omitempty"` 391 } 392 393 func (AppInstallation) IsNode() {} 394 395 // An auto-generated type for paginating through multiple AppInstallations. 396 type AppInstallationConnection struct { 397 // A list of edges. 398 Edges []*AppInstallationEdge `json:"edges,omitempty"` 399 // Information to aid in pagination. 400 PageInfo *PageInfo `json:"pageInfo,omitempty"` 401 } 402 403 // An auto-generated type which holds one AppInstallation and a cursor during pagination. 404 type AppInstallationEdge struct { 405 // A cursor for use in pagination. 406 Cursor null.String `json:"cursor,omitempty"` 407 // The item at the end of AppInstallationEdge. 408 Node *AppInstallation `json:"node,omitempty"` 409 } 410 411 // Defines the pricing model for the app subscription. 412 type AppPlanInput struct { 413 // Usage based billing pricing details. 414 AppUsagePricingDetails *AppUsagePricingInput `json:"appUsagePricingDetails,omitempty"` 415 // Recurring based billing pricing details. 416 AppRecurringPricingDetails *AppRecurringPricingInput `json:"appRecurringPricingDetails,omitempty"` 417 } 418 419 // Defines the app plan the merchant is subscribed to. 420 type AppPlanV2 struct { 421 // Defines the pricing model for the app subscription. 422 PricingDetails AppPricingDetails `json:"pricingDetails,omitempty"` 423 } 424 425 // Services and features purchased once by a store. 426 type AppPurchaseOneTime struct { 427 // The date and time when the app purchase was created. 428 CreatedAt null.String `json:"createdAt,omitempty"` 429 // Globally unique identifier. 430 ID null.String `json:"id,omitempty"` 431 // The name of the app purchase. 432 Name null.String `json:"name,omitempty"` 433 // The amount to be charged to the store for the app purchase. 434 Price *MoneyV2 `json:"price,omitempty"` 435 // The status of the app purchase. Possible values include pending, active, declined and cancelled. 436 Status AppPurchaseStatus `json:"status,omitempty"` 437 // Whether the app purchase is a test transaction. 438 Test bool `json:"test,omitempty"` 439 } 440 441 func (AppPurchaseOneTime) IsAppPurchase() {} 442 func (AppPurchaseOneTime) IsNode() {} 443 444 // An auto-generated type for paginating through multiple AppPurchaseOneTimes. 445 type AppPurchaseOneTimeConnection struct { 446 // A list of edges. 447 Edges []*AppPurchaseOneTimeEdge `json:"edges,omitempty"` 448 // Information to aid in pagination. 449 PageInfo *PageInfo `json:"pageInfo,omitempty"` 450 } 451 452 // Return type for `appPurchaseOneTimeCreate` mutation. 453 type AppPurchaseOneTimeCreatePayload struct { 454 // The newly created app one-time purchase. 455 AppPurchaseOneTime *AppPurchaseOneTime `json:"appPurchaseOneTime,omitempty"` 456 // The URL where the merchant can approve or decline the app one-time purchase. 457 ConfirmationURL *null.String `json:"confirmationUrl,omitempty"` 458 // List of errors that occurred executing the mutation. 459 UserErrors []*UserError `json:"userErrors,omitempty"` 460 } 461 462 // An auto-generated type which holds one AppPurchaseOneTime and a cursor during pagination. 463 type AppPurchaseOneTimeEdge struct { 464 // A cursor for use in pagination. 465 Cursor null.String `json:"cursor,omitempty"` 466 // The item at the end of AppPurchaseOneTimeEdge. 467 Node *AppPurchaseOneTime `json:"node,omitempty"` 468 } 469 470 // Price charged every interval. 471 type AppRecurringPricing struct { 472 // Specifies the number of days in a billing cycle of the app subscription. 473 Interval AppPricingInterval `json:"interval,omitempty"` 474 // The amount to be charged to the store every billing interval. 475 Price *MoneyV2 `json:"price,omitempty"` 476 } 477 478 func (AppRecurringPricing) IsAppPricingDetails() {} 479 480 // Allows an app to charge per billing interval. 481 type AppRecurringPricingInput struct { 482 // Specifies the billing frequency of the app subscription. 483 Interval *AppPricingInterval `json:"interval,omitempty"` 484 // The amount to be charged to the store every billing interval. The only permitted currency code is USD. 485 Price *MoneyInput `json:"price,omitempty"` 486 } 487 488 // Provides users access to services and/or features for a duration of time. 489 type AppSubscription struct { 490 // The date and time when the app subscription was created. 491 CreatedAt null.String `json:"createdAt,omitempty"` 492 // The date and time when the current app subscription period ends. 493 CurrentPeriodEnd *null.String `json:"currentPeriodEnd,omitempty"` 494 // Globally unique identifier. 495 ID null.String `json:"id,omitempty"` 496 // Attaches a plan to an app subscription. 497 LineItems []*AppSubscriptionLineItem `json:"lineItems,omitempty"` 498 // The name of the app subscription. 499 Name null.String `json:"name,omitempty"` 500 // The URL where the merchant is redirected after approving the app subscription. 501 ReturnURL null.String `json:"returnUrl,omitempty"` 502 // The status of the app subscription. Possible values include pending, active, declined, 503 // expired, frozen, and cancelled. 504 Status AppSubscriptionStatus `json:"status,omitempty"` 505 // Specifies whether the app subscription is a test transaction. 506 Test bool `json:"test,omitempty"` 507 // The number of days of the free trial. 508 TrialDays int `json:"trialDays,omitempty"` 509 } 510 511 func (AppSubscription) IsNode() {} 512 513 // Return type for `appSubscriptionCancel` mutation. 514 type AppSubscriptionCancelPayload struct { 515 // The cancelled app subscription. 516 AppSubscription *AppSubscription `json:"appSubscription,omitempty"` 517 // List of errors that occurred executing the mutation. 518 UserErrors []*UserError `json:"userErrors,omitempty"` 519 } 520 521 // An auto-generated type for paginating through multiple AppSubscriptions. 522 type AppSubscriptionConnection struct { 523 // A list of edges. 524 Edges []*AppSubscriptionEdge `json:"edges,omitempty"` 525 // Information to aid in pagination. 526 PageInfo *PageInfo `json:"pageInfo,omitempty"` 527 } 528 529 // Return type for `appSubscriptionCreate` mutation. 530 type AppSubscriptionCreatePayload struct { 531 // The newly created app subscription. 532 AppSubscription *AppSubscription `json:"appSubscription,omitempty"` 533 // The URL where the merchant approves or declines an app subscription. 534 ConfirmationURL *null.String `json:"confirmationUrl,omitempty"` 535 // List of errors that occurred executing the mutation. 536 UserErrors []*UserError `json:"userErrors,omitempty"` 537 } 538 539 // An auto-generated type which holds one AppSubscription and a cursor during pagination. 540 type AppSubscriptionEdge struct { 541 // A cursor for use in pagination. 542 Cursor null.String `json:"cursor,omitempty"` 543 // The item at the end of AppSubscriptionEdge. 544 Node *AppSubscription `json:"node,omitempty"` 545 } 546 547 // Attaches a plan to an app subscription. 548 type AppSubscriptionLineItem struct { 549 // Globally unique identifier. 550 ID null.String `json:"id,omitempty"` 551 // Defines the pricing model for the app subscription. 552 Plan *AppPlanV2 `json:"plan,omitempty"` 553 // Lists the store's usage for a usage pricing plan. 554 UsageRecords *AppUsageRecordConnection `json:"usageRecords,omitempty"` 555 } 556 557 // Allows an app to add more than one plan to an app subscription. 558 type AppSubscriptionLineItemInput struct { 559 // Defines the pricing model for the app subscription. 560 Plan *AppPlanInput `json:"plan,omitempty"` 561 } 562 563 // Return type for `appSubscriptionLineItemUpdate` mutation. 564 type AppSubscriptionLineItemUpdatePayload struct { 565 // The updated app subscription. 566 AppSubscription *AppSubscription `json:"appSubscription,omitempty"` 567 // The URL where the merchant approves or declines the updated app subscription line item. 568 ConfirmationURL *null.String `json:"confirmationUrl,omitempty"` 569 // List of errors that occurred executing the mutation. 570 UserErrors []*UserError `json:"userErrors,omitempty"` 571 } 572 573 // Defines the usage pricing model for the app subscription. 574 type AppUsagePricing struct { 575 // The total usage records for interval. 576 BalanceUsed *MoneyV2 `json:"balanceUsed,omitempty"` 577 // The limit a store can be charged for usage based pricing. 578 CappedAmount *MoneyV2 `json:"cappedAmount,omitempty"` 579 // Specifies the interval which usage records are applied. 580 Interval AppPricingInterval `json:"interval,omitempty"` 581 // The terms and conditions for app usage pricing. 582 Terms null.String `json:"terms,omitempty"` 583 } 584 585 func (AppUsagePricing) IsAppPricingDetails() {} 586 587 // Allows an app to charge a store for usage. 588 type AppUsagePricingInput struct { 589 // The limit a customer can be charged for usage based pricing. 590 CappedAmount *MoneyInput `json:"cappedAmount,omitempty"` 591 // The terms and conditions for app usage. 592 Terms null.String `json:"terms,omitempty"` 593 } 594 595 // Store usage for app subscriptions with usage pricing. 596 type AppUsageRecord struct { 597 // The date and time when the usage record was created. 598 CreatedAt null.String `json:"createdAt,omitempty"` 599 // The description of the app usage record. 600 Description null.String `json:"description,omitempty"` 601 // Globally unique identifier. 602 ID null.String `json:"id,omitempty"` 603 // The price of the usage record. The only permitted currency code is USD. 604 Price *MoneyV2 `json:"price,omitempty"` 605 // Defines the usage pricing plan the merchant is subscribed to. 606 // SubscriptionLineItem *AppSubscriptionLineItem `json:"subscriptionLineItem,omitempty"` 607 } 608 609 func (AppUsageRecord) IsNode() {} 610 611 // An auto-generated type for paginating through multiple AppUsageRecords. 612 type AppUsageRecordConnection struct { 613 // A list of edges. 614 Edges []*AppUsageRecordEdge `json:"edges,omitempty"` 615 // Information to aid in pagination. 616 PageInfo *PageInfo `json:"pageInfo,omitempty"` 617 } 618 619 // Return type for `appUsageRecordCreate` mutation. 620 type AppUsageRecordCreatePayload struct { 621 // The newly created app usage record. 622 AppUsageRecord *AppUsageRecord `json:"appUsageRecord,omitempty"` 623 // List of errors that occurred executing the mutation. 624 UserErrors []*UserError `json:"userErrors,omitempty"` 625 } 626 627 // An auto-generated type which holds one AppUsageRecord and a cursor during pagination. 628 type AppUsageRecordEdge struct { 629 // A cursor for use in pagination. 630 Cursor null.String `json:"cursor,omitempty"` 631 // The item at the end of AppUsageRecordEdge. 632 Node *AppUsageRecord `json:"node,omitempty"` 633 } 634 635 // Represents a generic custom attribute. 636 type Attribute struct { 637 // Key or name of the attribute. 638 Key null.String `json:"key,omitempty"` 639 // Value of the attribute. 640 Value *null.String `json:"value,omitempty"` 641 } 642 643 // Specifies the input fields required for an attribute. 644 type AttributeInput struct { 645 // Key or name of the attribute. 646 Key null.String `json:"key,omitempty"` 647 // Value of the attribute. 648 Value null.String `json:"value,omitempty"` 649 } 650 651 // Automatic discount applications capture the intentions of a discount that was automatically applied. 652 type AutomaticDiscountApplication struct { 653 // The method by which the discount's value is allocated to its entitled items. 654 AllocationMethod DiscountApplicationAllocationMethod `json:"allocationMethod,omitempty"` 655 // An ordered index that can be used to identify the discount application and indicate the precedence 656 // of the discount application for calculations. 657 Index int `json:"index,omitempty"` 658 // How the discount amount is distributed on the discounted lines. 659 TargetSelection DiscountApplicationTargetSelection `json:"targetSelection,omitempty"` 660 // Whether the discount is applied on line items or shipping lines. 661 TargetType DiscountApplicationTargetType `json:"targetType,omitempty"` 662 // The title of the discount application. 663 Title null.String `json:"title,omitempty"` 664 // The value of the discount application. 665 Value PricingValue `json:"value,omitempty"` 666 } 667 668 func (AutomaticDiscountApplication) IsDiscountApplication() {} 669 670 // Basic events chronicle resource activities such as the creation of an article, the fulfillment of an order, or 671 // the addition of a product. 672 type BasicEvent struct { 673 // The name of the app that created the event. Returns null when the event originates from the Shopify admin. 674 AppTitle *null.String `json:"appTitle,omitempty"` 675 // Whether the event was created by an app. 676 AttributeToApp bool `json:"attributeToApp,omitempty"` 677 // Whether the event was caused by an admin user. 678 AttributeToUser bool `json:"attributeToUser,omitempty"` 679 // The date and time when the event was created. 680 CreatedAt null.String `json:"createdAt,omitempty"` 681 // Whether the event is critical. 682 CriticalAlert bool `json:"criticalAlert,omitempty"` 683 // Globally unique identifier. 684 ID null.String `json:"id,omitempty"` 685 // Human readable text that describes the event. 686 Message null.String `json:"message,omitempty"` 687 } 688 689 func (BasicEvent) IsNode() {} 690 func (BasicEvent) IsEvent() {} 691 692 // Represents an error that happens during the execution of a billing attempt mutation. 693 type BillingAttemptUserError struct { 694 // Error code to uniquely identify the error. 695 Code *BillingAttemptUserErrorCode `json:"code,omitempty"` 696 // Path to the input field which caused the error. 697 Field []null.String `json:"field,omitempty"` 698 // The error message. 699 Message null.String `json:"message,omitempty"` 700 } 701 702 func (BillingAttemptUserError) IsDisplayableError() {} 703 704 // An asynchronous long-running operation to fetch data in bulk. 705 // 706 // Bulk operations are created using the `bulkOperationRunQuery` mutation. After they are created, 707 // clients should poll the `status` field for updates. When `COMPLETED`, the `url` field contains 708 // a link to the data in [JSONL](http://jsonlines.org/) format. 709 // 710 // See the [bulk operations guide](https://help.shopify.com/api/guides/bulk-operations) for more details. 711 type BulkOperation struct { 712 // When the bulk operation was successfully completed. 713 CompletedAt *null.String `json:"completedAt,omitempty"` 714 // When the bulk operation was created. 715 CreatedAt null.String `json:"createdAt,omitempty"` 716 // Error code for failed operations. 717 ErrorCode *BulkOperationErrorCode `json:"errorCode,omitempty"` 718 // File size in bytes of the file in the `url` field. 719 FileSize *null.String `json:"fileSize,omitempty"` 720 // Globally unique identifier. 721 ID null.String `json:"id,omitempty"` 722 // The running count of all objects processed. 723 // For example, when fetching all products and their variants, this field counts both products and variants. 724 // This field can be used to track operation progress. 725 ObjectCount null.String `json:"objectCount,omitempty"` 726 // URL to partial/incomplete response data (in [JSONL](http://jsonlines.org/) format) returned by a failed operation. 727 // Expires **one week** after the operation fails. Returns `null` when there's no data available. 728 PartialDataURL *null.String `json:"partialDataUrl,omitempty"` 729 // GraphQL query document specified in `bulkOperationRunQuery`. 730 Query null.String `json:"query,omitempty"` 731 // The running count of all objects processed at the root of the query. 732 // For example, when fetching all products and their variants, this field counts only products. 733 // This field can be used to track operation progress. 734 RootObjectCount null.String `json:"rootObjectCount,omitempty"` 735 // Status of the bulk operation. 736 Status BulkOperationStatus `json:"status,omitempty"` 737 // URL to the response data in [JSONL](http://jsonlines.org/) format. 738 // Expires **one week** after the operation completes. 739 URL *null.String `json:"url,omitempty"` 740 } 741 742 func (BulkOperation) IsNode() {} 743 744 // Return type for `bulkOperationCancel` mutation. 745 type BulkOperationCancelPayload struct { 746 // The bulk operation to be canceled. 747 BulkOperation *BulkOperation `json:"bulkOperation,omitempty"` 748 // List of errors that occurred executing the mutation. 749 UserErrors []*UserError `json:"userErrors,omitempty"` 750 } 751 752 // Return type for `bulkOperationRunQuery` mutation. 753 type BulkOperationRunQueryPayload struct { 754 // The newly created bulk operation. 755 BulkOperation *BulkOperation `json:"bulkOperation,omitempty"` 756 // List of errors that occurred executing the mutation. 757 UserErrors []*UserError `json:"userErrors,omitempty"` 758 } 759 760 // Discount code applications capture the intentions of a discount code at 761 // the time that it is applied onto an order. 762 type CalculatedAutomaticDiscountApplication struct { 763 // The method by which the discount's value is allocated to its entitled items. 764 AllocationMethod DiscountApplicationAllocationMethod `json:"allocationMethod,omitempty"` 765 // The level at which the discount was applied. 766 AppliedTo DiscountApplicationLevel `json:"appliedTo,omitempty"` 767 // The description of discount application. Indicates the reason why the discount was applied. 768 Description *null.String `json:"description,omitempty"` 769 // Globally unique identifier. 770 ID null.String `json:"id,omitempty"` 771 // How the discount amount is distributed on the discounted lines. 772 TargetSelection DiscountApplicationTargetSelection `json:"targetSelection,omitempty"` 773 // Whether the discount is applied on line items or shipping lines. 774 TargetType DiscountApplicationTargetType `json:"targetType,omitempty"` 775 // The value of the discount application. 776 Value PricingValue `json:"value,omitempty"` 777 } 778 779 func (CalculatedAutomaticDiscountApplication) IsCalculatedDiscountApplication() {} 780 781 // An amount discounting the line that has been allocated by an associated discount application. 782 type CalculatedDiscountAllocation struct { 783 // The money amount allocated by the discount application in shop and presentment currencies. 784 AllocatedAmountSet *MoneyBag `json:"allocatedAmountSet,omitempty"` 785 // The discount that the allocated amount originated from. 786 DiscountApplication CalculatedDiscountApplication `json:"discountApplication,omitempty"` 787 } 788 789 // An auto-generated type for paginating through multiple CalculatedDiscountApplications. 790 type CalculatedDiscountApplicationConnection struct { 791 // A list of edges. 792 Edges []*CalculatedDiscountApplicationEdge `json:"edges,omitempty"` 793 // Information to aid in pagination. 794 PageInfo *PageInfo `json:"pageInfo,omitempty"` 795 } 796 797 // An auto-generated type which holds one CalculatedDiscountApplication and a cursor during pagination. 798 type CalculatedDiscountApplicationEdge struct { 799 // A cursor for use in pagination. 800 Cursor null.String `json:"cursor,omitempty"` 801 // The item at the end of CalculatedDiscountApplicationEdge. 802 Node CalculatedDiscountApplication `json:"node,omitempty"` 803 } 804 805 // Discount code applications capture the intentions of a discount code at 806 // the time that it is applied onto an order. 807 type CalculatedDiscountCodeApplication struct { 808 // The method by which the discount's value is allocated to its entitled items. 809 AllocationMethod DiscountApplicationAllocationMethod `json:"allocationMethod,omitempty"` 810 // The level at which the discount was applied. 811 AppliedTo DiscountApplicationLevel `json:"appliedTo,omitempty"` 812 // The string identifying the discount code that was used at the time of application. 813 Code null.String `json:"code,omitempty"` 814 // The description of discount application. Indicates the reason why the discount was applied. 815 Description *null.String `json:"description,omitempty"` 816 // Globally unique identifier. 817 ID null.String `json:"id,omitempty"` 818 // How the discount amount is distributed on the discounted lines. 819 TargetSelection DiscountApplicationTargetSelection `json:"targetSelection,omitempty"` 820 // Whether the discount is applied on line items or shipping lines. 821 TargetType DiscountApplicationTargetType `json:"targetType,omitempty"` 822 // The value of the discount application. 823 Value PricingValue `json:"value,omitempty"` 824 } 825 826 func (CalculatedDiscountCodeApplication) IsCalculatedDiscountApplication() {} 827 828 // The computed properties for a draft order. 829 type CalculatedDraftOrder struct { 830 // Order-level discount applied to the draft order. 831 AppliedDiscount *DraftOrderAppliedDiscount `json:"appliedDiscount,omitempty"` 832 // The available shipping rates for the draft order. Requires a customer with a valid shipping address and at least one line item. 833 AvailableShippingRates []*ShippingRate `json:"availableShippingRates,omitempty"` 834 // Customer who will be sent an invoice for the draft order, if there is one. 835 Customer *Customer `json:"customer,omitempty"` 836 // Line items in the draft order with their computed properties. 837 LineItems []*CalculatedDraftOrderLineItem `json:"lineItems,omitempty"` 838 // Line item that contains the shipping costs. 839 ShippingLine *ShippingLine `json:"shippingLine,omitempty"` 840 // Subtotal of the line items and their discounts (does not contain shipping charges or shipping discounts, or taxes). 841 SubtotalPrice null.String `json:"subtotalPrice,omitempty"` 842 // Total amount of taxes charged for each line item and shipping line. 843 TaxLines []*TaxLine `json:"taxLines,omitempty"` 844 // Total amount of the draft order (includes taxes, shipping charges, and discounts). 845 TotalPrice null.String `json:"totalPrice,omitempty"` 846 // Total shipping charge for the draft order. 847 TotalShippingPrice null.String `json:"totalShippingPrice,omitempty"` 848 // Total amount of taxes for the draft order. 849 TotalTax null.String `json:"totalTax,omitempty"` 850 } 851 852 // The computed line items for a draft order. 853 type CalculatedDraftOrderLineItem struct { 854 // Discount applied to the line item. 855 AppliedDiscount *DraftOrderAppliedDiscount `json:"appliedDiscount,omitempty"` 856 // Indicates if this is a product variant line item, or a custom line item. 857 Custom bool `json:"custom,omitempty"` 858 // List of additional information (metafields) about the line item. 859 CustomAttributes []*Attribute `json:"customAttributes,omitempty"` 860 // Total price with discounts applied. 861 DiscountedTotal *MoneyV2 `json:"discountedTotal,omitempty"` 862 // Unit price with discounts applied. 863 DiscountedUnitPrice *MoneyV2 `json:"discountedUnitPrice,omitempty"` 864 // Name of the service provider who fulfilled the order. 865 // 866 // Valid values are either **manual** or the name of the provider. 867 // For example, **amazon**, **shipwire**. 868 FulfillmentService *FulfillmentService `json:"fulfillmentService,omitempty"` 869 // Image associated with the draft order line item. 870 Image *Image `json:"image,omitempty"` 871 // Indicates whether the line item represents the puchase of a gift card. 872 IsGiftCard bool `json:"isGiftCard,omitempty"` 873 // Name of the product. 874 Name null.String `json:"name,omitempty"` 875 // Total price (without discounts) of the line item, based on the original unit price of the variant x quantity. 876 OriginalTotal *MoneyV2 `json:"originalTotal,omitempty"` 877 // Variant price without any discounts applied. 878 OriginalUnitPrice *MoneyV2 `json:"originalUnitPrice,omitempty"` 879 // Product associated with the draft order line item. 880 Product *Product `json:"product,omitempty"` 881 // Number of variant items requested in the draft order. 882 Quantity int `json:"quantity,omitempty"` 883 // Whether physical shipping is required for the variant. 884 RequiresShipping bool `json:"requiresShipping,omitempty"` 885 // Variant SKU number. 886 Sku *null.String `json:"sku,omitempty"` 887 // Whether the variant is taxable. 888 Taxable bool `json:"taxable,omitempty"` 889 // Title of the product or variant (this field only applies to custom line items). 890 Title null.String `json:"title,omitempty"` 891 // Total value of the discount. 892 TotalDiscount *MoneyV2 `json:"totalDiscount,omitempty"` 893 // Variant associated with the draft order line item. 894 Variant *ProductVariant `json:"variant,omitempty"` 895 // Name of the variant. 896 VariantTitle *null.String `json:"variantTitle,omitempty"` 897 // Name of the vendor who made the variant. 898 Vendor *null.String `json:"vendor,omitempty"` 899 // Weight unit and value for a draft order line item. 900 Weight *Weight `json:"weight,omitempty"` 901 } 902 903 // A line item involved in order editing that may be newly added or have new changes applied. 904 type CalculatedLineItem struct { 905 // The discounts that have been allocated onto the line item by discount applications. 906 CalculatedDiscountAllocations []*CalculatedDiscountAllocation `json:"calculatedDiscountAllocations,omitempty"` 907 // List of additional information (metafields) about the line item. 908 CustomAttributes []*Attribute `json:"customAttributes,omitempty"` 909 // The discounts that have been allocated onto the line item by discount applications. 910 DiscountAllocations []*DiscountAllocation `json:"discountAllocations,omitempty"` 911 // The total line price after discounts are applied in shop and presentment currencies. 912 DiscountedUnitPriceSet *MoneyBag `json:"discountedUnitPriceSet,omitempty"` 913 // The total number of items that can be edited. 914 EditableQuantity int `json:"editableQuantity,omitempty"` 915 // The editable quantity prior to any changes made in the current edit. 916 EditableQuantityBeforeChanges int `json:"editableQuantityBeforeChanges,omitempty"` 917 // The total price of editable lines in shop and presentment currencies. 918 EditableSubtotalSet *MoneyBag `json:"editableSubtotalSet,omitempty"` 919 // Whether the calculated line item has a staged discount. 920 HasStagedLineItemDiscount bool `json:"hasStagedLineItemDiscount,omitempty"` 921 // Globally unique identifier. 922 ID null.String `json:"id,omitempty"` 923 // The Image object associated to the line item's variant. 924 Image *Image `json:"image,omitempty"` 925 // Variant price without any discounts applied in shop and presentment currencies. 926 OriginalUnitPriceSet *MoneyBag `json:"originalUnitPriceSet,omitempty"` 927 // The total number of items. 928 Quantity int `json:"quantity,omitempty"` 929 // Whether the line item can be restocked or not. 930 Restockable bool `json:"restockable,omitempty"` 931 // Whether the changes on the line item will result in a restock. 932 Restocking bool `json:"restocking,omitempty"` 933 // Variant SKU number. 934 Sku *null.String `json:"sku,omitempty"` 935 // A list of changes that affect this line item. 936 StagedChanges []OrderStagedChange `json:"stagedChanges,omitempty"` 937 // Title of the product or variant. 938 Title null.String `json:"title,omitempty"` 939 // The total price of uneditable lines in shop and presentment currencies. 940 UneditableSubtotalSet *MoneyBag `json:"uneditableSubtotalSet,omitempty"` 941 // The product variant associated with this line item. Will be null for custom line items and items whose 942 // variant has been deleted. 943 Variant *ProductVariant `json:"variant,omitempty"` 944 // Name of the variant. 945 VariantTitle *null.String `json:"variantTitle,omitempty"` 946 } 947 948 // An auto-generated type for paginating through multiple CalculatedLineItems. 949 type CalculatedLineItemConnection struct { 950 // A list of edges. 951 Edges []*CalculatedLineItemEdge `json:"edges,omitempty"` 952 // Information to aid in pagination. 953 PageInfo *PageInfo `json:"pageInfo,omitempty"` 954 } 955 956 // An auto-generated type which holds one CalculatedLineItem and a cursor during pagination. 957 type CalculatedLineItemEdge struct { 958 // A cursor for use in pagination. 959 Cursor null.String `json:"cursor,omitempty"` 960 // The item at the end of CalculatedLineItemEdge. 961 Node *CalculatedLineItem `json:"node,omitempty"` 962 } 963 964 // Manual discount applications capture the intentions of a discount that was manually created for an order. 965 type CalculatedManualDiscountApplication struct { 966 // The method by which the discount's value is allocated to its entitled items. 967 AllocationMethod DiscountApplicationAllocationMethod `json:"allocationMethod,omitempty"` 968 // The level at which the discount was applied. 969 AppliedTo DiscountApplicationLevel `json:"appliedTo,omitempty"` 970 // The description of discount application. Indicates the reason why the discount was applied. 971 Description *null.String `json:"description,omitempty"` 972 // Globally unique identifier. 973 ID null.String `json:"id,omitempty"` 974 // How the discount amount is distributed on the discounted lines. 975 TargetSelection DiscountApplicationTargetSelection `json:"targetSelection,omitempty"` 976 // Whether the discount is applied on line items or shipping lines. 977 TargetType DiscountApplicationTargetType `json:"targetType,omitempty"` 978 // The value of the discount application. 979 Value PricingValue `json:"value,omitempty"` 980 } 981 982 func (CalculatedManualDiscountApplication) IsCalculatedDiscountApplication() {} 983 984 // An order with edits applied but not saved. 985 type CalculatedOrder struct { 986 // Returns only the new discount applications being added to the order. 987 AddedDiscountApplications *CalculatedDiscountApplicationConnection `json:"addedDiscountApplications,omitempty"` 988 // Returns only the new line items being added to the order. 989 AddedLineItems *CalculatedLineItemConnection `json:"addedLineItems,omitempty"` 990 // Amount of the order-level discount (does not contain any line item discounts) in shop and presentment currencies. 991 CartDiscountAmountSet *MoneyBag `json:"cartDiscountAmountSet,omitempty"` 992 // Will be true when the changes have been applied to the order. 993 Committed bool `json:"committed,omitempty"` 994 // Globally unique identifier. 995 ID null.String `json:"id,omitempty"` 996 // Returns all items on the order that existed before starting the edit. 997 // will include any changes that have been made. 998 LineItems *CalculatedLineItemConnection `json:"lineItems,omitempty"` 999 // The HTML of the customer notification for the order edit. 1000 NotificationPreviewHTML *null.String `json:"notificationPreviewHtml,omitempty"` 1001 // The customer notification title. 1002 NotificationPreviewTitle null.String `json:"notificationPreviewTitle,omitempty"` 1003 // The order with changes applied. 1004 Order *Order `json:"order,omitempty"` 1005 // The order without any changes applied. 1006 OriginalOrder *Order `json:"originalOrder,omitempty"` 1007 // List of changes made on the order. 1008 StagedChanges *OrderStagedChangeConnection `json:"stagedChanges,omitempty"` 1009 // The sum of the quantities for the line items that contribute to the order's subtotal. 1010 SubtotalLineItemsQuantity int `json:"subtotalLineItemsQuantity,omitempty"` 1011 // Subtotal of the line items and their discounts (does not contain shipping costs, shipping discounts) in shop and presentment currencies. 1012 SubtotalPriceSet *MoneyBag `json:"subtotalPriceSet,omitempty"` 1013 // Taxes charged for the line item. 1014 TaxLines []*TaxLine `json:"taxLines,omitempty"` 1015 // Total price of the order less the total amount received from the customer in shop and presentment currencies. 1016 TotalOutstandingSet *MoneyBag `json:"totalOutstandingSet,omitempty"` 1017 // Total amount of the order (includes taxes and discounts) in shop and presentment currencies. 1018 TotalPriceSet *MoneyBag `json:"totalPriceSet,omitempty"` 1019 } 1020 1021 func (CalculatedOrder) IsNode() {} 1022 1023 // Discount code applications capture the intentions of a discount code at 1024 // the time that it is applied onto an order. 1025 type CalculatedScriptDiscountApplication struct { 1026 // The method by which the discount's value is allocated to its entitled items. 1027 AllocationMethod DiscountApplicationAllocationMethod `json:"allocationMethod,omitempty"` 1028 // The level at which the discount was applied. 1029 AppliedTo DiscountApplicationLevel `json:"appliedTo,omitempty"` 1030 // The description of discount application. Indicates the reason why the discount was applied. 1031 Description *null.String `json:"description,omitempty"` 1032 // Globally unique identifier. 1033 ID null.String `json:"id,omitempty"` 1034 // How the discount amount is distributed on the discounted lines. 1035 TargetSelection DiscountApplicationTargetSelection `json:"targetSelection,omitempty"` 1036 // Whether the discount is applied on line items or shipping lines. 1037 TargetType DiscountApplicationTargetType `json:"targetType,omitempty"` 1038 // The value of the discount application. 1039 Value PricingValue `json:"value,omitempty"` 1040 } 1041 1042 func (CalculatedScriptDiscountApplication) IsCalculatedDiscountApplication() {} 1043 1044 // A channel represents an app where you sell a group of products and collections. 1045 // A channel can be a platform or marketplace such as Facebook or Pinterest, an online store, or POS. 1046 type Channel struct { 1047 // Underlying app used by the channel. 1048 App *App `json:"app,omitempty"` 1049 // The collection publications for the list of collections published to the channel. 1050 CollectionPublicationsV3 *ResourcePublicationConnection `json:"collectionPublicationsV3,omitempty"` 1051 // The list of collections published to the channel. 1052 Collections *CollectionConnection `json:"collections,omitempty"` 1053 // Unique identifier for the channel. 1054 Handle null.String `json:"handle,omitempty"` 1055 // Whether the collection is available to the channel. 1056 HasCollection bool `json:"hasCollection,omitempty"` 1057 // Globally unique identifier. 1058 ID null.String `json:"id,omitempty"` 1059 // Name of the channel. 1060 Name null.String `json:"name,omitempty"` 1061 // Menu items for the channel, which also appear as submenu items in left navigation sidebar in the Shopify admin. 1062 NavigationItems []*NavigationItem `json:"navigationItems,omitempty"` 1063 // Home page for the channel. 1064 OverviewPath *null.String `json:"overviewPath,omitempty"` 1065 // The product publications for the products published to the channel. 1066 ProductPublications *ProductPublicationConnection `json:"productPublications,omitempty"` 1067 // The product publications for the list of products published to the channel. 1068 ProductPublicationsV3 *ResourcePublicationConnection `json:"productPublicationsV3,omitempty"` 1069 // The list of products published to the channel. 1070 Products *ProductConnection `json:"products,omitempty"` 1071 // Whether or not this channel supports future publishing. 1072 SupportsFuturePublishing bool `json:"supportsFuturePublishing,omitempty"` 1073 } 1074 1075 func (Channel) IsNode() {} 1076 1077 // An auto-generated type for paginating through multiple Channels. 1078 type ChannelConnection struct { 1079 // A list of edges. 1080 Edges []*ChannelEdge `json:"edges,omitempty"` 1081 // Information to aid in pagination. 1082 PageInfo *PageInfo `json:"pageInfo,omitempty"` 1083 } 1084 1085 // An auto-generated type which holds one Channel and a cursor during pagination. 1086 type ChannelEdge struct { 1087 // A cursor for use in pagination. 1088 Cursor null.String `json:"cursor,omitempty"` 1089 // The item at the end of ChannelEdge. 1090 Node *Channel `json:"node,omitempty"` 1091 } 1092 1093 // Represents a collection of products. 1094 type Collection struct { 1095 // The number of publications a resource is published to without feedback errors. 1096 AvailablePublicationCount int `json:"availablePublicationCount,omitempty"` 1097 // The stripped description of the collection, in a single line with HTML tags removed. 1098 Description null.String `json:"description,omitempty"` 1099 // The description of the collection, complete with HTML formatting. 1100 DescriptionHTML null.String `json:"descriptionHtml,omitempty"` 1101 // Information about the collection that's provided through resource feedback. 1102 Feedback *ResourceFeedback `json:"feedback,omitempty"` 1103 // A unique human-friendly string for the collection. Automatically generated from the collection's title. 1104 Handle null.String `json:"handle,omitempty"` 1105 // Whether the collection includes a product. 1106 HasProduct bool `json:"hasProduct,omitempty"` 1107 // Globally unique identifier. 1108 ID null.String `json:"id,omitempty"` 1109 // The image associated with the collection. 1110 Image *Image `json:"image,omitempty"` 1111 // The ID of the corresponding resource in the REST Admin API. 1112 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 1113 // The metafield associated with the resource. 1114 Metafield *Metafield `json:"metafield,omitempty"` 1115 // A paginated list of metafields associated with the resource. 1116 Metafields *MetafieldConnection `json:"metafields,omitempty"` 1117 // Returns a private metafield found by namespace and key. 1118 PrivateMetafield *PrivateMetafield `json:"privateMetafield,omitempty"` 1119 // List of private metafields. 1120 PrivateMetafields *PrivateMetafieldConnection `json:"privateMetafields,omitempty"` 1121 // The products that are included in the collection. 1122 Products *ProductConnection `json:"products,omitempty"` 1123 // The number of products included in the collection. 1124 ProductsCount int `json:"productsCount,omitempty"` 1125 // The number of publications a resource is published on. 1126 PublicationCount int `json:"publicationCount,omitempty"` 1127 // The channels where the collection is published. 1128 Publications *CollectionPublicationConnection `json:"publications,omitempty"` 1129 // Check to see whether the resource is published to a given channel. 1130 PublishedOnChannel bool `json:"publishedOnChannel,omitempty"` 1131 // Check to see whether the resource is published to the calling app's channel. 1132 PublishedOnCurrentChannel bool `json:"publishedOnCurrentChannel,omitempty"` 1133 // Check to see whether the resource is published to the calling app's publication. 1134 PublishedOnCurrentPublication bool `json:"publishedOnCurrentPublication,omitempty"` 1135 // Check to see whether the resource is published to a given publication. 1136 PublishedOnPublication bool `json:"publishedOnPublication,omitempty"` 1137 // The list of resources that are published to a publication. 1138 ResourcePublications *ResourcePublicationConnection `json:"resourcePublications,omitempty"` 1139 // The list of resources that are either published or staged to be published to a publication. 1140 ResourcePublicationsV2 *ResourcePublicationV2Connection `json:"resourcePublicationsV2,omitempty"` 1141 // The rules used to assign products to the collection. This applies only to smart collections. 1142 RuleSet *CollectionRuleSet `json:"ruleSet,omitempty"` 1143 // SEO information for the collection. 1144 Seo *Seo `json:"seo,omitempty"` 1145 // The order in which the collection's products are sorted. 1146 SortOrder CollectionSortOrder `json:"sortOrder,omitempty"` 1147 // The storefront ID of the collection. 1148 StorefrontID null.String `json:"storefrontId,omitempty"` 1149 // The theme template used when viewing this collection in a store. 1150 TemplateSuffix *null.String `json:"templateSuffix,omitempty"` 1151 // The title of the collection. 1152 Title null.String `json:"title,omitempty"` 1153 // The translations associated with the resource. 1154 Translations []*PublishedTranslation `json:"translations,omitempty"` 1155 // The list of channels that the resource is not published to. 1156 UnpublishedChannels *ChannelConnection `json:"unpublishedChannels,omitempty"` 1157 // The list of publications that the resource is not published to. 1158 UnpublishedPublications *PublicationConnection `json:"unpublishedPublications,omitempty"` 1159 // The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the collection was last modified. 1160 UpdatedAt null.String `json:"updatedAt,omitempty"` 1161 } 1162 1163 func (Collection) IsHasMetafields() {} 1164 func (Collection) IsNode() {} 1165 func (Collection) IsPublishable() {} 1166 func (Collection) IsHasPublishedTranslations() {} 1167 1168 // Return type for `collectionAddProducts` mutation. 1169 type CollectionAddProductsPayload struct { 1170 // The updated collection. 1171 Collection *Collection `json:"collection,omitempty"` 1172 // List of errors that occurred executing the mutation. 1173 UserErrors []*UserError `json:"userErrors,omitempty"` 1174 } 1175 1176 // An auto-generated type for paginating through multiple Collections. 1177 type CollectionConnection struct { 1178 // A list of edges. 1179 Edges []*CollectionEdge `json:"edges,omitempty"` 1180 // Information to aid in pagination. 1181 PageInfo *PageInfo `json:"pageInfo,omitempty"` 1182 } 1183 1184 // Return type for `collectionCreate` mutation. 1185 type CollectionCreatePayload struct { 1186 // The collection that has been created. 1187 Collection *Collection `json:"collection,omitempty"` 1188 // List of errors that occurred executing the mutation. 1189 UserErrors []*UserError `json:"userErrors,omitempty"` 1190 } 1191 1192 // Specifies the collection to delete. 1193 type CollectionDeleteInput struct { 1194 // The ID of the collection to be deleted. 1195 ID null.String `json:"id,omitempty"` 1196 } 1197 1198 // Return type for `collectionDelete` mutation. 1199 type CollectionDeletePayload struct { 1200 // The ID of the collection that was deleted. 1201 DeletedCollectionID *null.String `json:"deletedCollectionId,omitempty"` 1202 // The shop associated with the collection. 1203 Shop *Shop `json:"shop,omitempty"` 1204 // List of errors that occurred executing the mutation. 1205 UserErrors []*UserError `json:"userErrors,omitempty"` 1206 } 1207 1208 // An auto-generated type which holds one Collection and a cursor during pagination. 1209 type CollectionEdge struct { 1210 // A cursor for use in pagination. 1211 Cursor null.String `json:"cursor,omitempty"` 1212 // The item at the end of CollectionEdge. 1213 Node *Collection `json:"node,omitempty"` 1214 } 1215 1216 // Specifies the input fields required to create a collection. 1217 type CollectionInput struct { 1218 // The description of the collection, in HTML format. 1219 DescriptionHTML *null.String `json:"descriptionHtml,omitempty"` 1220 // A unique human-friendly string for the collection. Automatically generated from the collection's title. 1221 Handle *null.String `json:"handle,omitempty"` 1222 // Specifies the collection to update or create a new collection if absent. 1223 ID *null.String `json:"id,omitempty"` 1224 // The image associated with the collection. 1225 Image *ImageInput `json:"image,omitempty"` 1226 // Initial list of collection products. Only valid with `productCreate` and without rules. 1227 Products []null.String `json:"products,omitempty"` 1228 // Initial list of collection publications. Only valid with `productCreate`. This argument is deprecated: Use PublishablePublish instead. 1229 Publications []*CollectionPublicationInput `json:"publications,omitempty"` 1230 // The private metafields to associated with this product. 1231 PrivateMetafields []*PrivateMetafieldInput `json:"privateMetafields,omitempty"` 1232 // The rules used to assign products to the collection. 1233 RuleSet *CollectionRuleSetInput `json:"ruleSet,omitempty"` 1234 // The theme template used when viewing the collection in a store. 1235 TemplateSuffix *null.String `json:"templateSuffix,omitempty"` 1236 // The order in which the collection's products are sorted. 1237 SortOrder *CollectionSortOrder `json:"sortOrder,omitempty"` 1238 // Required for creating a new collection. 1239 Title *null.String `json:"title,omitempty"` 1240 // The metafields to associate with this collection. 1241 Metafields []*MetafieldInput `json:"metafields,omitempty"` 1242 // SEO information for the collection. 1243 Seo *SEOInput `json:"seo,omitempty"` 1244 // Indicates whether a redirect is required after a new handle has been provided. 1245 // If true, then the old handle is redirected to the new one automatically. 1246 RedirectNewHandle *bool `json:"redirectNewHandle,omitempty"` 1247 } 1248 1249 // Represents the publications where a collection is published. 1250 type CollectionPublication struct { 1251 // The channel where the collection will be published. 1252 Channel *Channel `json:"channel,omitempty"` 1253 // The collection to be published on the publication. 1254 Collection *Collection `json:"collection,omitempty"` 1255 // Whether the publication is published or not. 1256 IsPublished bool `json:"isPublished,omitempty"` 1257 // The publication where the collection will be published. 1258 Publication *Publication `json:"publication,omitempty"` 1259 // The date that the publication was or is going to be published. 1260 PublishDate null.String `json:"publishDate,omitempty"` 1261 } 1262 1263 // An auto-generated type for paginating through multiple CollectionPublications. 1264 type CollectionPublicationConnection struct { 1265 // A list of edges. 1266 Edges []*CollectionPublicationEdge `json:"edges,omitempty"` 1267 // Information to aid in pagination. 1268 PageInfo *PageInfo `json:"pageInfo,omitempty"` 1269 } 1270 1271 // An auto-generated type which holds one CollectionPublication and a cursor during pagination. 1272 type CollectionPublicationEdge struct { 1273 // A cursor for use in pagination. 1274 Cursor null.String `json:"cursor,omitempty"` 1275 // The item at the end of CollectionPublicationEdge. 1276 Node *CollectionPublication `json:"node,omitempty"` 1277 } 1278 1279 // Specifies the publications to which a collection will be published. 1280 type CollectionPublicationInput struct { 1281 // The ID of the publication. 1282 PublicationID *null.String `json:"publicationId,omitempty"` 1283 // The ID of the channel. This argument is deprecated: Use publicationId instead. 1284 ChannelID *null.String `json:"channelId,omitempty"` 1285 // This argument is deprecated: Use publicationId instead. 1286 ChannelHandle *null.String `json:"channelHandle,omitempty"` 1287 } 1288 1289 // Specifies a collection to publish and the sales channels to publish it to. 1290 type CollectionPublishInput struct { 1291 // The collection to create or update publications for. 1292 ID null.String `json:"id,omitempty"` 1293 // The channels where the collection will be published. 1294 CollectionPublications []*CollectionPublicationInput `json:"collectionPublications,omitempty"` 1295 } 1296 1297 // Return type for `collectionPublish` mutation. 1298 type CollectionPublishPayload struct { 1299 // The published collection. 1300 Collection *Collection `json:"collection,omitempty"` 1301 // The channels where the collection has been published. 1302 CollectionPublications []*CollectionPublication `json:"collectionPublications,omitempty"` 1303 // The shop associated with the collection. 1304 Shop *Shop `json:"shop,omitempty"` 1305 // List of errors that occurred executing the mutation. 1306 UserErrors []*UserError `json:"userErrors,omitempty"` 1307 } 1308 1309 // Return type for `collectionRemoveProducts` mutation. 1310 type CollectionRemoveProductsPayload struct { 1311 // The asynchronous job removing the products. 1312 Job *Job `json:"job,omitempty"` 1313 // List of errors that occurred executing the mutation. 1314 UserErrors []*UserError `json:"userErrors,omitempty"` 1315 } 1316 1317 // Return type for `collectionReorderProducts` mutation. 1318 type CollectionReorderProductsPayload struct { 1319 // The asynchronous job reordering the products. 1320 Job *Job `json:"job,omitempty"` 1321 // List of errors that occurred executing the mutation. 1322 UserErrors []*UserError `json:"userErrors,omitempty"` 1323 } 1324 1325 // Represents at rule that's used to assign products to a collection. 1326 type CollectionRule struct { 1327 // The attribute that the rule focuses on (for example, `title` or `product_type`). 1328 Column CollectionRuleColumn `json:"column,omitempty"` 1329 // The value that the operator is applied to (for example, `Hats`). 1330 Condition null.String `json:"condition,omitempty"` 1331 // The type of operator that the rule is based on (for example, `equals`, `contains`, or `not_equals`). 1332 Relation CollectionRuleRelation `json:"relation,omitempty"` 1333 } 1334 1335 // Collections may use rules to automatically include the matching products. This defines restrictions for a type of rule. 1336 type CollectionRuleConditions struct { 1337 // Allowed relations of the rule. 1338 AllowedRelations []CollectionRuleRelation `json:"allowedRelations,omitempty"` 1339 // Most commonly used relation for this rule. 1340 DefaultRelation CollectionRuleRelation `json:"defaultRelation,omitempty"` 1341 // Type of the rule. 1342 RuleType CollectionRuleColumn `json:"ruleType,omitempty"` 1343 } 1344 1345 // Specifies a rule to associate with a collection. 1346 type CollectionRuleInput struct { 1347 // The attribute that the rule focuses on (for example, `title` or `product_type`). 1348 Column CollectionRuleColumn `json:"column,omitempty"` 1349 // The type of operator that the rule is based on (for example, `equals`, `contains`, or `not_equals`). 1350 Relation CollectionRuleRelation `json:"relation,omitempty"` 1351 // The value that the operator is applied to (for example, `Hats`). 1352 Condition null.String `json:"condition,omitempty"` 1353 } 1354 1355 // The set of rules that are used to determine which products are included in the collection. 1356 type CollectionRuleSet struct { 1357 // Whether products must match any or all of the rules to be included in the collection. 1358 // If true, then products must match one or more of the rules to be included in the collection. 1359 // If false, then products must match all of the rules to be included in the collection. 1360 AppliedDisjunctively bool `json:"appliedDisjunctively,omitempty"` 1361 // The rules used to assign products to the collection. 1362 Rules []*CollectionRule `json:"rules,omitempty"` 1363 } 1364 1365 // Specifies a rule set for the collection. 1366 type CollectionRuleSetInput struct { 1367 // Whether products must match any or all of the rules to be included in the collection. 1368 // If true, then products must match one or more of the rules to be included in the collection. 1369 // If false, then products must match all of the rules to be included in the collection. 1370 AppliedDisjunctively bool `json:"appliedDisjunctively,omitempty"` 1371 // The rules used to assign products to the collection. 1372 Rules []*CollectionRuleInput `json:"rules,omitempty"` 1373 } 1374 1375 // Specifies the collection to unpublish and the sales channels to remove it from. 1376 type CollectionUnpublishInput struct { 1377 // The collection to create or update publications for. 1378 ID null.String `json:"id,omitempty"` 1379 // The channels where the collection is published. 1380 CollectionPublications []*CollectionPublicationInput `json:"collectionPublications,omitempty"` 1381 } 1382 1383 // Return type for `collectionUnpublish` mutation. 1384 type CollectionUnpublishPayload struct { 1385 // The collection that has been unpublished. 1386 Collection *Collection `json:"collection,omitempty"` 1387 // The shop associated with the collection. 1388 Shop *Shop `json:"shop,omitempty"` 1389 // List of errors that occurred executing the mutation. 1390 UserErrors []*UserError `json:"userErrors,omitempty"` 1391 } 1392 1393 // Return type for `collectionUpdate` mutation. 1394 type CollectionUpdatePayload struct { 1395 // The updated collection. 1396 Collection *Collection `json:"collection,omitempty"` 1397 // The asynchronous job updating the products based on the new rule set. 1398 Job *Job `json:"job,omitempty"` 1399 // List of errors that occurred executing the mutation. 1400 UserErrors []*UserError `json:"userErrors,omitempty"` 1401 } 1402 1403 // Comment events are generated by staff members of a shop. 1404 // They are created when a staff member adds a comment to the timeline of an order, draft order, customer, or transfer. 1405 type CommentEvent struct { 1406 // The name of the app that created the event. Returns null when the event originates from the Shopify admin. 1407 AppTitle *null.String `json:"appTitle,omitempty"` 1408 // The attachments associated with the comment event. 1409 Attachments []*CommentEventAttachment `json:"attachments,omitempty"` 1410 // Whether the event was created by an app. 1411 AttributeToApp bool `json:"attributeToApp,omitempty"` 1412 // Whether the event was caused by an admin user. 1413 AttributeToUser bool `json:"attributeToUser,omitempty"` 1414 // Whether the comment event can be deleted. If true, then the comment event can be deleted. 1415 CanDelete bool `json:"canDelete,omitempty"` 1416 // Whether the comment event can be edited. If true, then the comment event can be edited. 1417 CanEdit bool `json:"canEdit,omitempty"` 1418 // The date and time when the event was created. 1419 CreatedAt null.String `json:"createdAt,omitempty"` 1420 // Whether the event is critical. 1421 CriticalAlert bool `json:"criticalAlert,omitempty"` 1422 // Whether the comment event has been edited. If true, then the comment event has been edited. 1423 Edited bool `json:"edited,omitempty"` 1424 // The references associated with the comment event. 1425 Embed CommentEventEmbed `json:"embed,omitempty"` 1426 // Globally unique identifier. 1427 ID null.String `json:"id,omitempty"` 1428 // Human readable text that describes the event. 1429 Message null.String `json:"message,omitempty"` 1430 // The raw body of the comment event. 1431 RawMessage null.String `json:"rawMessage,omitempty"` 1432 // The subject of the comment event. 1433 Subject CommentEventSubject `json:"subject,omitempty"` 1434 } 1435 1436 func (CommentEvent) IsNode() {} 1437 func (CommentEvent) IsEvent() {} 1438 1439 // A file attachment associated to a comment event. 1440 type CommentEventAttachment struct { 1441 // The file extension of the comment event attachment, indicating the file format. 1442 FileExtension *null.String `json:"fileExtension,omitempty"` 1443 // Globally unique identifier. 1444 ID null.String `json:"id,omitempty"` 1445 // The image attached to the comment event. 1446 Image *Image `json:"image,omitempty"` 1447 // The filename of the comment event attachment. 1448 Name null.String `json:"name,omitempty"` 1449 // The size of the attachment. 1450 Size int `json:"size,omitempty"` 1451 // The URL of the attachment. 1452 URL null.String `json:"url,omitempty"` 1453 } 1454 1455 // Countries that have been defined in shipping zones for the shop. 1456 type CountriesInShippingZones struct { 1457 // Countries that have been defined in shipping zones. 1458 CountryCodes []CountryCode `json:"countryCodes,omitempty"` 1459 // Whether 'Rest of World' has been defined in any shipping zones. 1460 IncludeRestOfWorld bool `json:"includeRestOfWorld,omitempty"` 1461 } 1462 1463 // Holds the country specific harmonized system code and the country ISO code. 1464 type CountryHarmonizedSystemCode struct { 1465 // Country ISO code. 1466 CountryCode CountryCode `json:"countryCode,omitempty"` 1467 // Country specific harmonized system code. 1468 HarmonizedSystemCode null.String `json:"harmonizedSystemCode,omitempty"` 1469 } 1470 1471 // An auto-generated type for paginating through multiple CountryHarmonizedSystemCodes. 1472 type CountryHarmonizedSystemCodeConnection struct { 1473 // A list of edges. 1474 Edges []*CountryHarmonizedSystemCodeEdge `json:"edges,omitempty"` 1475 // Information to aid in pagination. 1476 PageInfo *PageInfo `json:"pageInfo,omitempty"` 1477 } 1478 1479 // An auto-generated type which holds one CountryHarmonizedSystemCode and a cursor during pagination. 1480 type CountryHarmonizedSystemCodeEdge struct { 1481 // A cursor for use in pagination. 1482 Cursor null.String `json:"cursor,omitempty"` 1483 // The item at the end of CountryHarmonizedSystemCodeEdge. 1484 Node *CountryHarmonizedSystemCode `json:"node,omitempty"` 1485 } 1486 1487 // Holds the country specific harmonized system code and the country ISO code. 1488 type CountryHarmonizedSystemCodeInput struct { 1489 // Country specific harmonized system code. 1490 HarmonizedSystemCode null.String `json:"harmonizedSystemCode,omitempty"` 1491 // Country ISO code. 1492 CountryCode CountryCode `json:"countryCode,omitempty"` 1493 } 1494 1495 // Specifies the input fields required to create a media object. 1496 type CreateMediaInput struct { 1497 // The original source of the media object. May be an external URL or signed upload URL. 1498 OriginalSource null.String `json:"originalSource,omitempty"` 1499 // The alt text associated to the media. 1500 Alt *null.String `json:"alt,omitempty"` 1501 // The media content type. 1502 MediaContentType MediaContentType `json:"mediaContentType,omitempty"` 1503 } 1504 1505 // Currency formats. 1506 type CurrencyFormats struct { 1507 // HTML without currency. 1508 MoneyFormat null.String `json:"moneyFormat,omitempty"` 1509 // Email without currency. 1510 MoneyInEmailsFormat null.String `json:"moneyInEmailsFormat,omitempty"` 1511 // HTML with currency. 1512 MoneyWithCurrencyFormat null.String `json:"moneyWithCurrencyFormat,omitempty"` 1513 // Email with currency. 1514 MoneyWithCurrencyInEmailsFormat null.String `json:"moneyWithCurrencyInEmailsFormat,omitempty"` 1515 } 1516 1517 // Represents a currency setting. 1518 type CurrencySetting struct { 1519 // The currency's ISO code. 1520 CurrencyCode CurrencyCode `json:"currencyCode,omitempty"` 1521 // The full name of the currency. 1522 CurrencyName null.String `json:"currencyName,omitempty"` 1523 // Flag describing whether the currency is enabled. 1524 Enabled bool `json:"enabled,omitempty"` 1525 // Date and time when the exchange rate for the currency was last modified. 1526 RateUpdatedAt *null.String `json:"rateUpdatedAt,omitempty"` 1527 } 1528 1529 // An auto-generated type for paginating through multiple CurrencySettings. 1530 type CurrencySettingConnection struct { 1531 // A list of edges. 1532 Edges []*CurrencySettingEdge `json:"edges,omitempty"` 1533 // Information to aid in pagination. 1534 PageInfo *PageInfo `json:"pageInfo,omitempty"` 1535 } 1536 1537 // An auto-generated type which holds one CurrencySetting and a cursor during pagination. 1538 type CurrencySettingEdge struct { 1539 // A cursor for use in pagination. 1540 Cursor null.String `json:"cursor,omitempty"` 1541 // The item at the end of CurrencySettingEdge. 1542 Node *CurrencySetting `json:"node,omitempty"` 1543 } 1544 1545 // Represents information about a customer of the shop, such as the customer's contact details, their order 1546 // history, and whether they've agreed to receive email marketing. 1547 type Customer struct { 1548 // Whether the customer has agreed to receive marketing materials. 1549 AcceptsMarketing bool `json:"acceptsMarketing,omitempty"` 1550 // The date and time when the customer consented or objected to receiving marketing material by email. 1551 AcceptsMarketingUpdatedAt null.String `json:"acceptsMarketingUpdatedAt,omitempty"` 1552 // A list of addresses associated with the customer. 1553 Addresses []*MailingAddress `json:"addresses,omitempty"` 1554 // The average amount that the customer spent per order. 1555 AverageOrderAmount *null.String `json:"averageOrderAmount,omitempty"` 1556 // The average amount that the customer spent per order. 1557 AverageOrderAmountV2 *MoneyV2 `json:"averageOrderAmountV2,omitempty"` 1558 // Whether the merchant can delete the customer from their store. 1559 // 1560 // A customer can be deleted from a store only if they have not yet made an order. After a customer makes an 1561 // order, they can't be deleted from a store. 1562 CanDelete bool `json:"canDelete,omitempty"` 1563 // The date and time when the customer was added to the store. 1564 CreatedAt null.String `json:"createdAt,omitempty"` 1565 // The default address associated with the customer. 1566 DefaultAddress *MailingAddress `json:"defaultAddress,omitempty"` 1567 // The full name of the customer, based on the values for first_name and last_name. If the first_name and 1568 // last_name are not available, then this falls back to the customer's email address, and if that is not available, the customer's phone number. 1569 DisplayName null.String `json:"displayName,omitempty"` 1570 // The customer's email address. 1571 Email *null.String `json:"email,omitempty"` 1572 // A list of events associated with the customer. 1573 Events *EventConnection `json:"events,omitempty"` 1574 // The customer's first name. 1575 FirstName *null.String `json:"firstName,omitempty"` 1576 // Whether the customer has a note associated with them. 1577 HasNote bool `json:"hasNote,omitempty"` 1578 // Whether the merchant has added timeline comments about the customer on the customer's page. 1579 HasTimelineComment bool `json:"hasTimelineComment,omitempty"` 1580 // Globally unique identifier. 1581 ID null.String `json:"id,omitempty"` 1582 // The image associated with the customer. 1583 Image *Image `json:"image,omitempty"` 1584 // The customer's last name. 1585 LastName *null.String `json:"lastName,omitempty"` 1586 // The customer's last order. 1587 LastOrder *Order `json:"lastOrder,omitempty"` 1588 // The ID of the corresponding resource in the REST Admin API. 1589 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 1590 // The amount of time since the customer was first added to the store. 1591 // 1592 // Example: 'about 12 years'. 1593 LifetimeDuration null.String `json:"lifetimeDuration,omitempty"` 1594 // The customer's locale. 1595 Locale null.String `json:"locale,omitempty"` 1596 // The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that the 1597 // customer gave when they consented to receive marketing material by email. 1598 // 1599 // If the customer does not accept email marketing, then this property will be null. 1600 MarketingOptInLevel *CustomerMarketingOptInLevel `json:"marketingOptInLevel,omitempty"` 1601 // The metafield associated with the resource. 1602 Metafield *Metafield `json:"metafield,omitempty"` 1603 // A paginated list of metafields associated with the resource. 1604 Metafields *MetafieldConnection `json:"metafields,omitempty"` 1605 // A unique identifier for the customer that's used with Multipass login. 1606 MultipassIdentifier *null.String `json:"multipassIdentifier,omitempty"` 1607 // A note about the customer. 1608 Note *null.String `json:"note,omitempty"` 1609 // A list of the customer's orders. 1610 Orders *OrderConnection `json:"orders,omitempty"` 1611 // The number of orders that the customer has made at the store in their lifetime. 1612 OrdersCount null.String `json:"ordersCount,omitempty"` 1613 // A list of the customer's payment methods. 1614 PaymentMethods *CustomerPaymentMethodConnection `json:"paymentMethods,omitempty"` 1615 // The customer's phone number. 1616 Phone *null.String `json:"phone,omitempty"` 1617 // Returns a private metafield found by namespace and key. 1618 PrivateMetafield *PrivateMetafield `json:"privateMetafield,omitempty"` 1619 // List of private metafields. 1620 PrivateMetafields *PrivateMetafieldConnection `json:"privateMetafields,omitempty"` 1621 // Possible subscriber states of a customer defined by their subscription contracts. 1622 ProductSubscriberStatus CustomerProductSubscriberStatus `json:"productSubscriberStatus,omitempty"` 1623 // The state of the customer's account with the shop. 1624 State CustomerState `json:"state,omitempty"` 1625 // A list of the customer's subscription contracts. 1626 SubscriptionContracts *SubscriptionContractConnection `json:"subscriptionContracts,omitempty"` 1627 // A comma separated list of tags that have been added to the customer. 1628 Tags []null.String `json:"tags,omitempty"` 1629 // Whether the customer is exempt from being charged taxes on their orders. 1630 TaxExempt bool `json:"taxExempt,omitempty"` 1631 // The list of tax exemptions applied to the customer. 1632 TaxExemptions []TaxExemption `json:"taxExemptions,omitempty"` 1633 // The total amount that the customer has spent on orders in their lifetime. 1634 TotalSpent null.String `json:"totalSpent,omitempty"` 1635 // The total amount that the customer has spent on orders in their lifetime. 1636 TotalSpentV2 *MoneyV2 `json:"totalSpentV2,omitempty"` 1637 // The date and time when the customer was last updated. 1638 UpdatedAt null.String `json:"updatedAt,omitempty"` 1639 // Whether the email address is formatted correctly. This does not 1640 // guarantee that the email address actually exists. 1641 ValidEmailAddress bool `json:"validEmailAddress,omitempty"` 1642 // Whether the customer has verified their email address. Defaults to `true` if the customer is created through the Shopify admin or API. 1643 VerifiedEmail bool `json:"verifiedEmail,omitempty"` 1644 } 1645 1646 func (Customer) IsCommentEventEmbed() {} 1647 func (Customer) IsNode() {} 1648 func (Customer) IsCommentEventSubject() {} 1649 func (Customer) IsHasMetafields() {} 1650 func (Customer) IsLegacyInteroperability() {} 1651 func (Customer) IsHasEvents() {} 1652 1653 // Return type for `customerAddTaxExemptions` mutation. 1654 type CustomerAddTaxExemptionsPayload struct { 1655 // The updated customer. 1656 Customer *Customer `json:"customer,omitempty"` 1657 // List of errors that occurred executing the mutation. 1658 UserErrors []*UserError `json:"userErrors,omitempty"` 1659 } 1660 1661 // An auto-generated type for paginating through multiple Customers. 1662 type CustomerConnection struct { 1663 // A list of edges. 1664 Edges []*CustomerEdge `json:"edges,omitempty"` 1665 // Information to aid in pagination. 1666 PageInfo *PageInfo `json:"pageInfo,omitempty"` 1667 } 1668 1669 // Return type for `customerCreate` mutation. 1670 type CustomerCreatePayload struct { 1671 // The created customer. 1672 Customer *Customer `json:"customer,omitempty"` 1673 // List of errors that occurred executing the mutation. 1674 UserErrors []*UserError `json:"userErrors,omitempty"` 1675 } 1676 1677 // Represents a card instrument for customer payment method. 1678 type CustomerCreditCard struct { 1679 // The billing address of the card. 1680 BillingAddress *CustomerCreditCardBillingAddress `json:"billingAddress,omitempty"` 1681 // The brand of the card. 1682 Brand null.String `json:"brand,omitempty"` 1683 // Whether the card is about to expire. 1684 ExpiresSoon bool `json:"expiresSoon,omitempty"` 1685 // The expiry month of the card. 1686 ExpiryMonth int `json:"expiryMonth,omitempty"` 1687 // The expiry year of the card. 1688 ExpiryYear int `json:"expiryYear,omitempty"` 1689 // The card's BIN number. 1690 FirstDigits *null.String `json:"firstDigits,omitempty"` 1691 // The payment method can be revoked if there are no active subscription contracts. 1692 IsRevocable bool `json:"isRevocable,omitempty"` 1693 // The last 4 digits of the card. 1694 LastDigits null.String `json:"lastDigits,omitempty"` 1695 // The masked card number with only the last 4 digits displayed. 1696 MaskedNumber null.String `json:"maskedNumber,omitempty"` 1697 // The name of the card holder. 1698 Name null.String `json:"name,omitempty"` 1699 } 1700 1701 func (CustomerCreditCard) IsCustomerPaymentInstrument() {} 1702 1703 // The billing address of a credit card payment instrument. 1704 type CustomerCreditCardBillingAddress struct { 1705 // The first line of the address. Typically the street address or PO Box number. 1706 Address1 *null.String `json:"address1,omitempty"` 1707 // The name of the city, district, village, or town. 1708 City *null.String `json:"city,omitempty"` 1709 // The name of the country. 1710 Country *null.String `json:"country,omitempty"` 1711 // The two-letter code for the country of the address. 1712 // For example, US. 1713 CountryCode *CountryCode `json:"countryCode,omitempty"` 1714 // The region of the address, such as the province, state, or district. 1715 Province *null.String `json:"province,omitempty"` 1716 // The two-letter code for the region. 1717 // For example, ON. 1718 ProvinceCode *null.String `json:"provinceCode,omitempty"` 1719 // The zip or postal code of the address. 1720 Zip *null.String `json:"zip,omitempty"` 1721 } 1722 1723 // Specifies the customer to delete. 1724 type CustomerDeleteInput struct { 1725 // The ID of the customer to delete. 1726 ID null.String `json:"id,omitempty"` 1727 } 1728 1729 // Return type for `customerDelete` mutation. 1730 type CustomerDeletePayload struct { 1731 // ID of the deleted customer. 1732 DeletedCustomerID *null.String `json:"deletedCustomerId,omitempty"` 1733 // Shop of the deleted customer. 1734 Shop *Shop `json:"shop,omitempty"` 1735 // List of errors that occurred executing the mutation. 1736 UserErrors []*UserError `json:"userErrors,omitempty"` 1737 } 1738 1739 // An auto-generated type which holds one Customer and a cursor during pagination. 1740 type CustomerEdge struct { 1741 // A cursor for use in pagination. 1742 Cursor null.String `json:"cursor,omitempty"` 1743 // The item at the end of CustomerEdge. 1744 Node *Customer `json:"node,omitempty"` 1745 } 1746 1747 // Return type for `customerGenerateAccountActivationUrl` mutation. 1748 type CustomerGenerateAccountActivationURLPayload struct { 1749 // The newly generated account activation URL. 1750 AccountActivationURL *null.String `json:"accountActivationUrl,omitempty"` 1751 // List of errors that occurred executing the mutation. 1752 UserErrors []*UserError `json:"userErrors,omitempty"` 1753 } 1754 1755 // Provides the fields and values to use when creating or updating a customer. 1756 type CustomerInput struct { 1757 // Whether the customer has consented to receive marketing material via email. 1758 AcceptsMarketing *bool `json:"acceptsMarketing,omitempty"` 1759 // The date and time when the customer consented or objected to receiving marketing material by email. Set 1760 // whenever the customer consents or objects to marketing material. 1761 AcceptsMarketingUpdatedAt *null.String `json:"acceptsMarketingUpdatedAt,omitempty"` 1762 // An input that specifies addresses for a customer. 1763 Addresses []*MailingAddressInput `json:"addresses,omitempty"` 1764 // The unique email address of the customer. 1765 Email *null.String `json:"email,omitempty"` 1766 // The customer's first name. 1767 FirstName *null.String `json:"firstName,omitempty"` 1768 // Specifies the customer to update, or creates a new customer if one doesn't exist. 1769 ID *null.String `json:"id,omitempty"` 1770 // The customer's last name. 1771 LastName *null.String `json:"lastName,omitempty"` 1772 // The customer's locale. 1773 Locale *null.String `json:"locale,omitempty"` 1774 // The marketing subscription opt-in level (as described by the M3AAWG best practices guideline) that was 1775 // enabled when the customer consented to receiving marketing material by email. 1776 MarketingOptInLevel *CustomerMarketingOptInLevel `json:"marketingOptInLevel,omitempty"` 1777 // Attaches additional metadata to the customer. 1778 Metafields []*MetafieldInput `json:"metafields,omitempty"` 1779 // A note about the customer. 1780 Note *null.String `json:"note,omitempty"` 1781 // The unique phone number for the customer. 1782 Phone *null.String `json:"phone,omitempty"` 1783 // The private metafields to associated with this product. 1784 PrivateMetafields []*PrivateMetafieldInput `json:"privateMetafields,omitempty"` 1785 // A comma separated list of tags that have been added to the customer. 1786 Tags []null.String `json:"tags,omitempty"` 1787 // Whether the customer is exempt from paying taxes on their order. 1788 TaxExempt *bool `json:"taxExempt,omitempty"` 1789 // The list of tax exemptions to apply to the customer. 1790 TaxExemptions []TaxExemption `json:"taxExemptions,omitempty"` 1791 } 1792 1793 // Represents a customer's activity on a shop's online store. 1794 type CustomerJourney struct { 1795 // The position of the current order within the customer's order history. 1796 CustomerOrderIndex int `json:"customerOrderIndex,omitempty"` 1797 // The amount of days between first session and order creation date. First session represents first session since the last order, or first session within the 30 day attribution window, if more than 30 days has passed since the last order. 1798 DaysToConversion int `json:"daysToConversion,omitempty"` 1799 // The customer's first session going into the shop. 1800 FirstVisit *CustomerVisit `json:"firstVisit,omitempty"` 1801 // The last session before an order is made. 1802 LastVisit *CustomerVisit `json:"lastVisit,omitempty"` 1803 // Events preceding a customer order, such as shop sessions. 1804 Moments []CustomerMoment `json:"moments,omitempty"` 1805 } 1806 1807 // Represents a customer's activity on a shop's online store. 1808 type CustomerJourneySummary struct { 1809 // The position of the current order within the customer's order history. Test orders aren't included. 1810 CustomerOrderIndex *int `json:"customerOrderIndex,omitempty"` 1811 // The number of days between the first session and the order creation date. The first session represents the first session since the last order, or the first session within the 30 day attribution window, if more than 30 days have passed since the last order. 1812 DaysToConversion *int `json:"daysToConversion,omitempty"` 1813 // The customer's first session going into the shop. 1814 FirstVisit *CustomerVisit `json:"firstVisit,omitempty"` 1815 // The last session before an order is made. 1816 LastVisit *CustomerVisit `json:"lastVisit,omitempty"` 1817 // The events preceding a customer order, such as shop sessions. 1818 Moments *CustomerMomentConnection `json:"moments,omitempty"` 1819 // The total number of customer moments associated with this order. Returns null if the order is still in the process of being attributed. 1820 MomentsCount *int `json:"momentsCount,omitempty"` 1821 // Whether or not the attributed sessions for the order have been created yet. 1822 Ready bool `json:"ready,omitempty"` 1823 } 1824 1825 // An auto-generated type for paginating through multiple CustomerMoments. 1826 type CustomerMomentConnection struct { 1827 // A list of edges. 1828 Edges []*CustomerMomentEdge `json:"edges,omitempty"` 1829 // Information to aid in pagination. 1830 PageInfo *PageInfo `json:"pageInfo,omitempty"` 1831 } 1832 1833 // An auto-generated type which holds one CustomerMoment and a cursor during pagination. 1834 type CustomerMomentEdge struct { 1835 // A cursor for use in pagination. 1836 Cursor null.String `json:"cursor,omitempty"` 1837 // The item at the end of CustomerMomentEdge. 1838 Node CustomerMoment `json:"node,omitempty"` 1839 } 1840 1841 // A customer's payment method. 1842 type CustomerPaymentMethod struct { 1843 // The customer to whom the payment method belongs. 1844 Customer *Customer `json:"customer,omitempty"` 1845 // The ID of this payment method. 1846 ID null.String `json:"id,omitempty"` 1847 // The instrument for this payment method. 1848 Instrument CustomerPaymentInstrument `json:"instrument,omitempty"` 1849 // The time that the payment method was revoked. 1850 RevokedAt *null.String `json:"revokedAt,omitempty"` 1851 // List Subscription Contracts. 1852 SubscriptionContracts *SubscriptionContractConnection `json:"subscriptionContracts,omitempty"` 1853 } 1854 1855 func (CustomerPaymentMethod) IsNode() {} 1856 1857 // An auto-generated type for paginating through multiple CustomerPaymentMethods. 1858 type CustomerPaymentMethodConnection struct { 1859 // A list of edges. 1860 Edges []*CustomerPaymentMethodEdge `json:"edges,omitempty"` 1861 // Information to aid in pagination. 1862 PageInfo *PageInfo `json:"pageInfo,omitempty"` 1863 } 1864 1865 // Return type for `customerPaymentMethodCreditCardCreate` mutation. 1866 type CustomerPaymentMethodCreditCardCreatePayload struct { 1867 // The customer payment method. 1868 CustomerPaymentMethod *CustomerPaymentMethod `json:"customerPaymentMethod,omitempty"` 1869 // List of errors that occurred executing the mutation. 1870 UserErrors []*UserError `json:"userErrors,omitempty"` 1871 } 1872 1873 // Return type for `customerPaymentMethodCreditCardUpdate` mutation. 1874 type CustomerPaymentMethodCreditCardUpdatePayload struct { 1875 // The customer payment method. 1876 CustomerPaymentMethod *CustomerPaymentMethod `json:"customerPaymentMethod,omitempty"` 1877 // List of errors that occurred executing the mutation. 1878 UserErrors []*UserError `json:"userErrors,omitempty"` 1879 } 1880 1881 // An auto-generated type which holds one CustomerPaymentMethod and a cursor during pagination. 1882 type CustomerPaymentMethodEdge struct { 1883 // A cursor for use in pagination. 1884 Cursor null.String `json:"cursor,omitempty"` 1885 // The item at the end of CustomerPaymentMethodEdge. 1886 Node *CustomerPaymentMethod `json:"node,omitempty"` 1887 } 1888 1889 // Return type for `customerPaymentMethodRemoteCreditCardCreate` mutation. 1890 type CustomerPaymentMethodRemoteCreditCardCreatePayload struct { 1891 // The customer payment method. 1892 CustomerPaymentMethod *CustomerPaymentMethod `json:"customerPaymentMethod,omitempty"` 1893 // List of errors that occurred executing the mutation. 1894 UserErrors []*CustomerPaymentMethodUserError `json:"userErrors,omitempty"` 1895 } 1896 1897 // Return type for `customerPaymentMethodRevoke` mutation. 1898 type CustomerPaymentMethodRevokePayload struct { 1899 // The ID of the revoked customer payment method. 1900 RevokedCustomerPaymentMethodID *null.String `json:"revokedCustomerPaymentMethodId,omitempty"` 1901 // List of errors that occurred executing the mutation. 1902 UserErrors []*UserError `json:"userErrors,omitempty"` 1903 } 1904 1905 // Return type for `customerPaymentMethodSendUpdateEmail` mutation. 1906 type CustomerPaymentMethodSendUpdateEmailPayload struct { 1907 // The customer to whom an update payment method email was sent. 1908 Customer *Customer `json:"customer,omitempty"` 1909 // List of errors that occurred executing the mutation. 1910 UserErrors []*UserError `json:"userErrors,omitempty"` 1911 } 1912 1913 // Represents an error in the input of a mutation. 1914 type CustomerPaymentMethodUserError struct { 1915 // Error code to uniquely identify the error. 1916 Code *CustomerPaymentMethodUserErrorCode `json:"code,omitempty"` 1917 // Path to the input field which caused the error. 1918 Field []null.String `json:"field,omitempty"` 1919 // The error message. 1920 Message null.String `json:"message,omitempty"` 1921 } 1922 1923 func (CustomerPaymentMethodUserError) IsDisplayableError() {} 1924 1925 // Return type for `customerRemoveTaxExemptions` mutation. 1926 type CustomerRemoveTaxExemptionsPayload struct { 1927 // The updated customer. 1928 Customer *Customer `json:"customer,omitempty"` 1929 // List of errors that occurred executing the mutation. 1930 UserErrors []*UserError `json:"userErrors,omitempty"` 1931 } 1932 1933 // Return type for `customerReplaceTaxExemptions` mutation. 1934 type CustomerReplaceTaxExemptionsPayload struct { 1935 // The updated customer. 1936 Customer *Customer `json:"customer,omitempty"` 1937 // List of errors that occurred executing the mutation. 1938 UserErrors []*UserError `json:"userErrors,omitempty"` 1939 } 1940 1941 // Return type for `customerUpdateDefaultAddress` mutation. 1942 type CustomerUpdateDefaultAddressPayload struct { 1943 // The customer whose address was updated. 1944 Customer *Customer `json:"customer,omitempty"` 1945 // List of errors that occurred executing the mutation. 1946 UserErrors []*UserError `json:"userErrors,omitempty"` 1947 } 1948 1949 // Return type for `customerUpdate` mutation. 1950 type CustomerUpdatePayload struct { 1951 // The updated customer. 1952 Customer *Customer `json:"customer,omitempty"` 1953 // List of errors that occurred executing the mutation. 1954 UserErrors []*UserError `json:"userErrors,omitempty"` 1955 } 1956 1957 // Information about a customer's session on a shop's online store. 1958 type CustomerVisit struct { 1959 // Globally unique identifier. 1960 ID null.String `json:"id,omitempty"` 1961 // URL of the first page the customer landed on for the session. 1962 LandingPage *null.String `json:"landingPage,omitempty"` 1963 // Landing page information with URL linked in HTML. For example, the first page the customer visited was store.myshopify.com/products/1. 1964 LandingPageHTML *null.String `json:"landingPageHtml,omitempty"` 1965 // Represent actions taken by an app, on behalf of a merchant, 1966 // to market Shopify resources such as products, collections, and discounts. 1967 MarketingEvent *MarketingEvent `json:"marketingEvent,omitempty"` 1968 // When the customer moment occurred. 1969 OccurredAt null.String `json:"occurredAt,omitempty"` 1970 // Marketing referral code from the link that the customer clicked to visit the store. 1971 // Supports the following URL attributes: _ref_, _source_, or _r_. 1972 // For example, if the URL is myshopifystore.com/products/slide?ref=j2tj1tn2, then this value is j2tj1tn2. 1973 ReferralCode *null.String `json:"referralCode,omitempty"` 1974 // Referral information with URLs linked in HTML. 1975 ReferralInfoHTML null.String `json:"referralInfoHtml,omitempty"` 1976 // Webpage where the customer clicked a link that sent them to the online store. 1977 // For example, _https://randomblog.com/page1_ or _android-app://com.google.android.gm_. 1978 ReferrerURL *null.String `json:"referrerUrl,omitempty"` 1979 // Source from which the customer visited the store, such as a platform (Facebook, Google), email, direct, 1980 // a website domain, QR code, or unknown. 1981 Source null.String `json:"source,omitempty"` 1982 // Describes the source explicitly for first or last session. 1983 SourceDescription *null.String `json:"sourceDescription,omitempty"` 1984 // Type of marketing tactic. 1985 SourceType *MarketingTactic `json:"sourceType,omitempty"` 1986 // A set of UTM parameters gathered from the URL parameters of the referrer. 1987 UtmParameters *UTMParameters `json:"utmParameters,omitempty"` 1988 } 1989 1990 func (CustomerVisit) IsCustomerMoment() {} 1991 func (CustomerVisit) IsNode() {} 1992 1993 // Deletion events chronicle the destruction of resources (e.g. products and collections). 1994 // Once deleted, the deletion event is the only trace of the original's existence, 1995 // as the resource itself has been removed and can no longer be accessed. 1996 type DeletionEvent struct { 1997 // The date and time when the deletion event for the related resource was generated. 1998 OccurredAt null.String `json:"occurredAt,omitempty"` 1999 // The id of the resource that was deleted. 2000 SubjectID null.String `json:"subjectId,omitempty"` 2001 // The type of resource that was deleted. 2002 SubjectType DeletionEventSubjectType `json:"subjectType,omitempty"` 2003 } 2004 2005 // An auto-generated type for paginating through multiple DeletionEvents. 2006 type DeletionEventConnection struct { 2007 // A list of edges. 2008 Edges []*DeletionEventEdge `json:"edges,omitempty"` 2009 // Information to aid in pagination. 2010 PageInfo *PageInfo `json:"pageInfo,omitempty"` 2011 } 2012 2013 // An auto-generated type which holds one DeletionEvent and a cursor during pagination. 2014 type DeletionEventEdge struct { 2015 // A cursor for use in pagination. 2016 Cursor null.String `json:"cursor,omitempty"` 2017 // The item at the end of DeletionEventEdge. 2018 Node *DeletionEvent `json:"node,omitempty"` 2019 } 2020 2021 // The service and the countries they are available for. 2022 type DeliveryAvailableService struct { 2023 // The countries the service provider ships to. 2024 Countries *DeliveryCountryCodesOrRestOfWorld `json:"countries,omitempty"` 2025 // The name of the service. 2026 Name null.String `json:"name,omitempty"` 2027 } 2028 2029 // Information about a carrier or service provider. 2030 type DeliveryCarrierService struct { 2031 // Services offered for given destinations. 2032 AvailableServicesForCountries []*DeliveryAvailableService `json:"availableServicesForCountries,omitempty"` 2033 // The properly formatted name of the service provider, ready to display. 2034 FormattedName *null.String `json:"formattedName,omitempty"` 2035 // The logo of the service provider. 2036 Icon *Image `json:"icon,omitempty"` 2037 // Globally unique identifier. 2038 ID null.String `json:"id,omitempty"` 2039 // The name of the service provider. 2040 Name *null.String `json:"name,omitempty"` 2041 } 2042 2043 func (DeliveryCarrierService) IsNode() {} 2044 2045 // A carrier services and their set of shop locations that can be used. 2046 type DeliveryCarrierServiceAndLocations struct { 2047 // The carrier service. 2048 CarrierService *DeliveryCarrierService `json:"carrierService,omitempty"` 2049 // The locations that support this carrier service. 2050 Locations []*Location `json:"locations,omitempty"` 2051 } 2052 2053 // A condition that must pass for a method definition to be applied to an order. 2054 type DeliveryCondition struct { 2055 // The criteria (weight or price) that the field must meet based on the operator. 2056 ConditionCriteria DeliveryConditionCriteria `json:"conditionCriteria,omitempty"` 2057 // The field to compare the criteria unit against, using the operator. 2058 Field DeliveryConditionField `json:"field,omitempty"` 2059 // Globally unique identifier. 2060 ID null.String `json:"id,omitempty"` 2061 // The operator to compare the field and criteria. 2062 Operator DeliveryConditionOperator `json:"operator,omitempty"` 2063 } 2064 2065 func (DeliveryCondition) IsNode() {} 2066 2067 // A country that is used to define a zone. 2068 type DeliveryCountry struct { 2069 // The ISO 3166-1 alpha-2 country code of this country and a flag indicating Rest Of World. 2070 Code *DeliveryCountryCodeOrRestOfWorld `json:"code,omitempty"` 2071 // Globally unique identifier. 2072 ID null.String `json:"id,omitempty"` 2073 // The name of the country. 2074 Name null.String `json:"name,omitempty"` 2075 // The regions associated with this country. 2076 Provinces []*DeliveryProvince `json:"provinces,omitempty"` 2077 // The name of the country, translated based on the user locale. 2078 TranslatedName null.String `json:"translatedName,omitempty"` 2079 } 2080 2081 func (DeliveryCountry) IsNode() {} 2082 2083 // A country with the name of the zone. 2084 type DeliveryCountryAndZone struct { 2085 // The country in the delivery zone. 2086 Country *DeliveryCountry `json:"country,omitempty"` 2087 // The name of the delivery zone. 2088 Zone null.String `json:"zone,omitempty"` 2089 } 2090 2091 // The ISO 3166-1 alpha-2 country code and a flag indicating Rest Of World. 2092 type DeliveryCountryCodeOrRestOfWorld struct { 2093 // The country code. 2094 CountryCode *CountryCode `json:"countryCode,omitempty"` 2095 // Indicates if 'Rest of World' is applied. 2096 RestOfWorld bool `json:"restOfWorld,omitempty"` 2097 } 2098 2099 // A list of ISO 3166-1 alpha-2 country codes or the 'Rest of World'. 2100 type DeliveryCountryCodesOrRestOfWorld struct { 2101 // List of applicable country codes. 2102 CountryCodes []CountryCode `json:"countryCodes,omitempty"` 2103 // Indicates if 'Rest of World' is applied. 2104 RestOfWorld bool `json:"restOfWorld,omitempty"` 2105 } 2106 2107 // Input fields to specify a country. 2108 type DeliveryCountryInput struct { 2109 // The country code of the country. 2110 Code *CountryCode `json:"code,omitempty"` 2111 // Use Rest of World as the country. 2112 RestOfWorld *bool `json:"restOfWorld,omitempty"` 2113 // The regions associated with this country. 2114 Provinces []*DeliveryProvinceInput `json:"provinces,omitempty"` 2115 // Associate all available provinces with this country. 2116 IncludeAllProvinces *bool `json:"includeAllProvinces,omitempty"` 2117 } 2118 2119 // Whether the shop is blocked from converting to full multi-location delivery profiles mode. If the shop is blocked, then the blocking reasons are also returned. 2120 type DeliveryLegacyModeBlocked struct { 2121 // Whether the shop can convert to full multi-location delivery profiles mode. 2122 Blocked bool `json:"blocked,omitempty"` 2123 // The reasons why the shop is blocked from converting to full multi-location delivery profiles mode. 2124 Reasons []DeliveryLegacyModeBlockedReason `json:"reasons,omitempty"` 2125 } 2126 2127 // A location group is a collection of active locations that share zone and delivery methods across delivery profiles. 2128 type DeliveryLocationGroup struct { 2129 // Globally unique identifier. 2130 ID null.String `json:"id,omitempty"` 2131 // List of active locations that are part of this location group. 2132 Locations *LocationConnection `json:"locations,omitempty"` 2133 } 2134 2135 func (DeliveryLocationGroup) IsNode() {} 2136 2137 // Links a location group and zone with the associated method definitions in a delivery profile. 2138 type DeliveryLocationGroupZone struct { 2139 // The number of method definitions in this zone. 2140 MethodDefinitionCounts *DeliveryMethodDefinitionCounts `json:"methodDefinitionCounts,omitempty"` 2141 // The method definitions associated to a zone and location group in a delivery profile. 2142 MethodDefinitions *DeliveryMethodDefinitionConnection `json:"methodDefinitions,omitempty"` 2143 // The zone associated to a location group in a delivery profile. 2144 Zone *DeliveryZone `json:"zone,omitempty"` 2145 } 2146 2147 // An auto-generated type for paginating through multiple DeliveryLocationGroupZones. 2148 type DeliveryLocationGroupZoneConnection struct { 2149 // A list of edges. 2150 Edges []*DeliveryLocationGroupZoneEdge `json:"edges,omitempty"` 2151 // Information to aid in pagination. 2152 PageInfo *PageInfo `json:"pageInfo,omitempty"` 2153 } 2154 2155 // An auto-generated type which holds one DeliveryLocationGroupZone and a cursor during pagination. 2156 type DeliveryLocationGroupZoneEdge struct { 2157 // A cursor for use in pagination. 2158 Cursor null.String `json:"cursor,omitempty"` 2159 // The item at the end of DeliveryLocationGroupZoneEdge. 2160 Node *DeliveryLocationGroupZone `json:"node,omitempty"` 2161 } 2162 2163 // Input fields for a delivery zone associated to a location group and profile. 2164 type DeliveryLocationGroupZoneInput struct { 2165 // Globally unique identifier of the Zone. 2166 ID *null.String `json:"id,omitempty"` 2167 // The name of the zone. 2168 Name *null.String `json:"name,omitempty"` 2169 // Countries to associate with the zone. 2170 Countries []*DeliveryCountryInput `json:"countries,omitempty"` 2171 // Method definitions to create. 2172 MethodDefinitionsToCreate []*DeliveryMethodDefinitionInput `json:"methodDefinitionsToCreate,omitempty"` 2173 // Method definitions to update. 2174 MethodDefinitionsToUpdate []*DeliveryMethodDefinitionInput `json:"methodDefinitionsToUpdate,omitempty"` 2175 } 2176 2177 // Delivery method. 2178 type DeliveryMethod struct { 2179 // Globally unique identifier. 2180 ID null.String `json:"id,omitempty"` 2181 // The type of the delivery method. 2182 MethodType DeliveryMethodType `json:"methodType,omitempty"` 2183 } 2184 2185 func (DeliveryMethod) IsNode() {} 2186 2187 // A method definition describes the delivery rate and the conditions that must be met for the method to be applied. 2188 type DeliveryMethodDefinition struct { 2189 // Whether this method definition is active. 2190 Active bool `json:"active,omitempty"` 2191 // The description of the method definition. 2192 Description *null.String `json:"description,omitempty"` 2193 // Globally unique identifier. 2194 ID null.String `json:"id,omitempty"` 2195 // The method conditions that must pass for this method definition to be applied to an order. 2196 MethodConditions []*DeliveryCondition `json:"methodConditions,omitempty"` 2197 // The name of the method definition. 2198 Name null.String `json:"name,omitempty"` 2199 // Provided rate for this method definition, from a rate definition or participant. 2200 RateProvider DeliveryRateProvider `json:"rateProvider,omitempty"` 2201 } 2202 2203 func (DeliveryMethodDefinition) IsNode() {} 2204 2205 // An auto-generated type for paginating through multiple DeliveryMethodDefinitions. 2206 type DeliveryMethodDefinitionConnection struct { 2207 // A list of edges. 2208 Edges []*DeliveryMethodDefinitionEdge `json:"edges,omitempty"` 2209 // Information to aid in pagination. 2210 PageInfo *PageInfo `json:"pageInfo,omitempty"` 2211 } 2212 2213 // Then number of method definitions in a zone, separated into merchant-owned and participant definitions. 2214 type DeliveryMethodDefinitionCounts struct { 2215 // The number of participant method definitions in the current zone. 2216 ParticipantDefinitionsCount int `json:"participantDefinitionsCount,omitempty"` 2217 // The number of merchant-defined method definitions in the current zone. 2218 RateDefinitionsCount int `json:"rateDefinitionsCount,omitempty"` 2219 } 2220 2221 // An auto-generated type which holds one DeliveryMethodDefinition and a cursor during pagination. 2222 type DeliveryMethodDefinitionEdge struct { 2223 // A cursor for use in pagination. 2224 Cursor null.String `json:"cursor,omitempty"` 2225 // The item at the end of DeliveryMethodDefinitionEdge. 2226 Node *DeliveryMethodDefinition `json:"node,omitempty"` 2227 } 2228 2229 // Input fields for a method definition. 2230 type DeliveryMethodDefinitionInput struct { 2231 // Globally unique identifier of the method definition. Use only when updating a method definiton. 2232 ID *null.String `json:"id,omitempty"` 2233 // The name of the method definition. 2234 Name *null.String `json:"name,omitempty"` 2235 // The description of the method definition. 2236 Description *null.String `json:"description,omitempty"` 2237 // Whether or not to use this method definition during rate calculation. 2238 Active *bool `json:"active,omitempty"` 2239 // A rate definition to apply to the method definition. 2240 RateDefinition *DeliveryRateDefinitionInput `json:"rateDefinition,omitempty"` 2241 // A participant to apply to the method definition. 2242 Participant *DeliveryParticipantInput `json:"participant,omitempty"` 2243 // Weight conditions on the method definition. 2244 WeightConditionsToCreate []*DeliveryWeightConditionInput `json:"weightConditionsToCreate,omitempty"` 2245 // Price conditions on the method definition. 2246 PriceConditionsToCreate []*DeliveryPriceConditionInput `json:"priceConditionsToCreate,omitempty"` 2247 // Conditions on the method definition to update. 2248 ConditionsToUpdate []*DeliveryUpdateConditionInput `json:"conditionsToUpdate,omitempty"` 2249 } 2250 2251 // A carrier-defined rate with possible merchant-defined fixed fee or percentage-of-rate fee. 2252 type DeliveryParticipant struct { 2253 // Flag to indicate if new available services should be included. 2254 AdaptToNewServicesFlag bool `json:"adaptToNewServicesFlag,omitempty"` 2255 // Use this carrier service for this participant. 2256 CarrierService *DeliveryCarrierService `json:"carrierService,omitempty"` 2257 // The merchant-set fixed fee for this participant. 2258 FixedFee *MoneyV2 `json:"fixedFee,omitempty"` 2259 // Globally unique identifier. 2260 ID null.String `json:"id,omitempty"` 2261 // Services offered by the participant and their active status. 2262 ParticipantServices []*DeliveryParticipantService `json:"participantServices,omitempty"` 2263 // The merchant-set percentage-of-rate fee for this participant. 2264 PercentageOfRateFee float64 `json:"percentageOfRateFee,omitempty"` 2265 } 2266 2267 func (DeliveryParticipant) IsNode() {} 2268 func (DeliveryParticipant) IsDeliveryRateProvider() {} 2269 2270 // Input fields for a participant. 2271 type DeliveryParticipantInput struct { 2272 // Globally unique identifier of the participant. 2273 ID *null.String `json:"id,omitempty"` 2274 // Global identifier of the carrier service. 2275 CarrierServiceID *null.String `json:"carrierServiceId,omitempty"` 2276 // The merchant-set fixed fee for this participant. 2277 FixedFee *MoneyInput `json:"fixedFee,omitempty"` 2278 // The merchant-set percentage-of-rate fee for this participant. 2279 PercentageOfRateFee *float64 `json:"percentageOfRateFee,omitempty"` 2280 // Services offered by the participant and their active status. 2281 ParticipantServices []*DeliveryParticipantServiceInput `json:"participantServices,omitempty"` 2282 // Flag to indicate if new available services should be included. 2283 AdaptToNewServices *bool `json:"adaptToNewServices,omitempty"` 2284 } 2285 2286 // A service provided by a participant. 2287 type DeliveryParticipantService struct { 2288 // If the service is active or not. 2289 Active bool `json:"active,omitempty"` 2290 // Name of the service. 2291 Name null.String `json:"name,omitempty"` 2292 } 2293 2294 // Input fields for a service provided by a participant. 2295 type DeliveryParticipantServiceInput struct { 2296 // Name of the service. 2297 Name null.String `json:"name,omitempty"` 2298 // If the service is active or not. 2299 Active bool `json:"active,omitempty"` 2300 } 2301 2302 // Input fields for the price-based conditions of a method definition. 2303 type DeliveryPriceConditionInput struct { 2304 // The criteria for the price. 2305 Criteria *MoneyInput `json:"criteria,omitempty"` 2306 // The operator to use for comparison. 2307 Operator *DeliveryConditionOperator `json:"operator,omitempty"` 2308 } 2309 2310 // How many product variants are in a profile. This count is capped at 500. 2311 type DeliveryProductVariantsCount struct { 2312 // If the count has reached the cap of 500. 2313 Capped bool `json:"capped,omitempty"` 2314 // The product variant count. 2315 Count int `json:"count,omitempty"` 2316 } 2317 2318 // A profile for multi-location, per-product delivery. 2319 type DeliveryProfile struct { 2320 // The number of active shipping rates for the profile. 2321 ActiveMethodDefinitionsCount int `json:"activeMethodDefinitionsCount,omitempty"` 2322 // Whether this is the default profile. 2323 Default bool `json:"default,omitempty"` 2324 // Globally unique identifier. 2325 ID null.String `json:"id,omitempty"` 2326 // Whether this shop has enabled legacy compatibility mode for delivery profiles. 2327 LegacyMode bool `json:"legacyMode,omitempty"` 2328 // The number of locations without rates defined. 2329 LocationsWithoutRatesCount int `json:"locationsWithoutRatesCount,omitempty"` 2330 // The name of the delivery profile. 2331 Name null.String `json:"name,omitempty"` 2332 // The number of active origin locations for the profile. 2333 OriginLocationCount int `json:"originLocationCount,omitempty"` 2334 // The number of product variants for this profile. The count for the default profile is not supported and will return -1. 2335 ProductVariantsCount int `json:"productVariantsCount,omitempty"` 2336 // How many product variants are in this profile. 2337 ProductVariantsCountV2 *DeliveryProductVariantsCount `json:"productVariantsCountV2,omitempty"` 2338 // The products and variants associated with this profile. 2339 ProfileItems *DeliveryProfileItemConnection `json:"profileItems,omitempty"` 2340 // The location groups and associated zones using this profile. 2341 ProfileLocationGroups []*DeliveryProfileLocationGroup `json:"profileLocationGroups,omitempty"` 2342 // Selling Plan Groups associated with the specified Delivery Profile. 2343 SellingPlanGroups *SellingPlanGroupConnection `json:"sellingPlanGroups,omitempty"` 2344 // List of locations that have not been assigned to a location group for this profile. 2345 UnassignedLocations []*Location `json:"unassignedLocations,omitempty"` 2346 // The number of countries with active rates to deliver to. 2347 ZoneCountryCount int `json:"zoneCountryCount,omitempty"` 2348 } 2349 2350 func (DeliveryProfile) IsNode() {} 2351 2352 // An auto-generated type for paginating through multiple DeliveryProfiles. 2353 type DeliveryProfileConnection struct { 2354 // A list of edges. 2355 Edges []*DeliveryProfileEdge `json:"edges,omitempty"` 2356 // Information to aid in pagination. 2357 PageInfo *PageInfo `json:"pageInfo,omitempty"` 2358 } 2359 2360 // An auto-generated type which holds one DeliveryProfile and a cursor during pagination. 2361 type DeliveryProfileEdge struct { 2362 // A cursor for use in pagination. 2363 Cursor null.String `json:"cursor,omitempty"` 2364 // The item at the end of DeliveryProfileEdge. 2365 Node *DeliveryProfile `json:"node,omitempty"` 2366 } 2367 2368 // Input fields for a delivery profile. 2369 type DeliveryProfileInput struct { 2370 // The name of the profile. 2371 Name *null.String `json:"name,omitempty"` 2372 // The location groups associated with the profile. 2373 ProfileLocationGroups []*DeliveryProfileLocationGroupInput `json:"profileLocationGroups,omitempty"` 2374 // The location groups to be created in the profile. 2375 LocationGroupsToCreate []*DeliveryProfileLocationGroupInput `json:"locationGroupsToCreate,omitempty"` 2376 // The location groups to be updated in the profile. 2377 LocationGroupsToUpdate []*DeliveryProfileLocationGroupInput `json:"locationGroupsToUpdate,omitempty"` 2378 // The location groups to be deleted in the profile. 2379 LocationGroupsToDelete []null.String `json:"locationGroupsToDelete,omitempty"` 2380 // The product variant ids to be associated with this profile. 2381 VariantsToAssociate []null.String `json:"variantsToAssociate,omitempty"` 2382 // The product variant ids to be dissociated from this profile and returned to the default profile. 2383 VariantsToDissociate []null.String `json:"variantsToDissociate,omitempty"` 2384 // Zones to delete. 2385 ZonesToDelete []null.String `json:"zonesToDelete,omitempty"` 2386 // Method definitions to delete. 2387 MethodDefinitionsToDelete []null.String `json:"methodDefinitionsToDelete,omitempty"` 2388 // Conditions to delete. 2389 ConditionsToDelete []null.String `json:"conditionsToDelete,omitempty"` 2390 // The selling plan groups to be associated with this profile. 2391 SellingPlanGroupsToAssociate []null.String `json:"sellingPlanGroupsToAssociate,omitempty"` 2392 // The selling plan groups to be dissociated with this profile. 2393 SellingPlanGroupsToDissociate []null.String `json:"sellingPlanGroupsToDissociate,omitempty"` 2394 } 2395 2396 // A product and the subset of associated variants that are part of this delivery profile. 2397 type DeliveryProfileItem struct { 2398 // A product associated with this profile. 2399 Product *Product `json:"product,omitempty"` 2400 // The product variants associated with this delivery profile. 2401 Variants *ProductVariantConnection `json:"variants,omitempty"` 2402 } 2403 2404 // An auto-generated type for paginating through multiple DeliveryProfileItems. 2405 type DeliveryProfileItemConnection struct { 2406 // A list of edges. 2407 Edges []*DeliveryProfileItemEdge `json:"edges,omitempty"` 2408 // Information to aid in pagination. 2409 PageInfo *PageInfo `json:"pageInfo,omitempty"` 2410 } 2411 2412 // An auto-generated type which holds one DeliveryProfileItem and a cursor during pagination. 2413 type DeliveryProfileItemEdge struct { 2414 // A cursor for use in pagination. 2415 Cursor null.String `json:"cursor,omitempty"` 2416 // The item at the end of DeliveryProfileItemEdge. 2417 Node *DeliveryProfileItem `json:"node,omitempty"` 2418 } 2419 2420 // Links a location group with zones associated to a delivery profile. 2421 type DeliveryProfileLocationGroup struct { 2422 // The countries already selected in any zone for the given location group and profile. 2423 CountriesInAnyZone []*DeliveryCountryAndZone `json:"countriesInAnyZone,omitempty"` 2424 // The location group associated to a delivery profile. 2425 LocationGroup *DeliveryLocationGroup `json:"locationGroup,omitempty"` 2426 // The applicable zones associated to a location group and delivery profile. 2427 LocationGroupZones *DeliveryLocationGroupZoneConnection `json:"locationGroupZones,omitempty"` 2428 } 2429 2430 // Input fields for a delivery location group associated to a profile. 2431 type DeliveryProfileLocationGroupInput struct { 2432 // Globally unique identifier of the LocationGroup. 2433 ID *null.String `json:"id,omitempty"` 2434 // The location ids of the locations to be moved to this location group. 2435 Locations []null.String `json:"locations,omitempty"` 2436 // Zones to create. 2437 ZonesToCreate []*DeliveryLocationGroupZoneInput `json:"zonesToCreate,omitempty"` 2438 // Zones to update. 2439 ZonesToUpdate []*DeliveryLocationGroupZoneInput `json:"zonesToUpdate,omitempty"` 2440 } 2441 2442 // A region that is used to define a zone. 2443 type DeliveryProvince struct { 2444 // The code of this region. 2445 Code null.String `json:"code,omitempty"` 2446 // Globally unique identifier. 2447 ID null.String `json:"id,omitempty"` 2448 // The name of the region. 2449 Name null.String `json:"name,omitempty"` 2450 // The name of the region, translated based on the user locale. 2451 TranslatedName null.String `json:"translatedName,omitempty"` 2452 } 2453 2454 func (DeliveryProvince) IsNode() {} 2455 2456 // The input fields to specify a region. 2457 type DeliveryProvinceInput struct { 2458 // The code of the region. 2459 Code null.String `json:"code,omitempty"` 2460 } 2461 2462 // The merchant-defined rate of the DeliveryMethodDefinition. 2463 type DeliveryRateDefinition struct { 2464 // Globally unique identifier. 2465 ID null.String `json:"id,omitempty"` 2466 // The price of this rate. 2467 Price *MoneyV2 `json:"price,omitempty"` 2468 } 2469 2470 func (DeliveryRateDefinition) IsNode() {} 2471 func (DeliveryRateDefinition) IsDeliveryRateProvider() {} 2472 2473 // Input fields for a rate definition. 2474 type DeliveryRateDefinitionInput struct { 2475 // Globally unique identifier of the rate definition. 2476 ID *null.String `json:"id,omitempty"` 2477 // The price of the rate definition. 2478 Price *MoneyInput `json:"price,omitempty"` 2479 } 2480 2481 // Delivery shop-level settings. 2482 type DeliverySetting struct { 2483 // Whether the shop is blocked from converting to full multi-location delivery profiles mode. If the shop is blocked, then the blocking reasons are also returned. 2484 LegacyModeBlocked *DeliveryLegacyModeBlocked `json:"legacyModeBlocked,omitempty"` 2485 // Enables legacy compatability mode for the multi-location delivery profiles feature. 2486 LegacyModeProfiles bool `json:"legacyModeProfiles,omitempty"` 2487 } 2488 2489 // Input fields for shop-level delivery settings. 2490 type DeliverySettingInput struct { 2491 // Enables legacy compatability mode for the multi-location delivery profiles feature. 2492 LegacyModeProfiles *bool `json:"legacyModeProfiles,omitempty"` 2493 } 2494 2495 // Return type for `deliverySettingUpdate` mutation. 2496 type DeliverySettingUpdatePayload struct { 2497 // The updated delivery shop level settings. 2498 Setting *DeliverySetting `json:"setting,omitempty"` 2499 // List of errors that occurred executing the mutation. 2500 UserErrors []*UserError `json:"userErrors,omitempty"` 2501 } 2502 2503 // Return type for `deliveryShippingOriginAssign` mutation. 2504 type DeliveryShippingOriginAssignPayload struct { 2505 // List of errors that occurred executing the mutation. 2506 UserErrors []*UserError `json:"userErrors,omitempty"` 2507 } 2508 2509 // Input fields for updating the conditions of a method definition. 2510 type DeliveryUpdateConditionInput struct { 2511 // Globally unique identifier of the condition. 2512 ID null.String `json:"id,omitempty"` 2513 // The value of the criteria of the condition. 2514 Criteria *float64 `json:"criteria,omitempty"` 2515 // The unit of the criteria of the condition. 2516 CriteriaUnit *null.String `json:"criteriaUnit,omitempty"` 2517 // The field to use, either total_weight or total_price. 2518 Field *DeliveryConditionField `json:"field,omitempty"` 2519 // The operator to use for comparison. 2520 Operator *DeliveryConditionOperator `json:"operator,omitempty"` 2521 } 2522 2523 // Input fields for the weight-based conditions of a method definition. 2524 type DeliveryWeightConditionInput struct { 2525 // The criteria for the weight. 2526 Criteria *WeightInput `json:"criteria,omitempty"` 2527 // The operator to use for comparison. 2528 Operator *DeliveryConditionOperator `json:"operator,omitempty"` 2529 } 2530 2531 // A zone is a geographical area that contains delivery methods within a delivery profile. 2532 type DeliveryZone struct { 2533 // The list of countries within the zone. 2534 Countries []*DeliveryCountry `json:"countries,omitempty"` 2535 // Globally unique identifier. 2536 ID null.String `json:"id,omitempty"` 2537 // The name of the zone. 2538 Name null.String `json:"name,omitempty"` 2539 } 2540 2541 func (DeliveryZone) IsNode() {} 2542 2543 // An amount discounting the line that has been allocated by an associated discount application. 2544 type DiscountAllocation struct { 2545 // Money amount allocated by the discount application. 2546 AllocatedAmount *MoneyV2 `json:"allocatedAmount,omitempty"` 2547 // Money amount allocated by the discount application in shop and presentment currencies. 2548 AllocatedAmountSet *MoneyBag `json:"allocatedAmountSet,omitempty"` 2549 // The discount of which this allocated amount originated from. 2550 DiscountApplication DiscountApplication `json:"discountApplication,omitempty"` 2551 } 2552 2553 // The fixed amount value of a discount. 2554 type DiscountAmount struct { 2555 // The value of the discount. 2556 Amount *MoneyV2 `json:"amount,omitempty"` 2557 // If true, then the discount is applied to each of the entitled items. If false, then the amount is split across all of the entitled items. 2558 AppliesOnEachItem bool `json:"appliesOnEachItem,omitempty"` 2559 } 2560 2561 func (DiscountAmount) IsDiscountCustomerGetsValue() {} 2562 2563 // Specifies the value of the discount and how it is applied. 2564 type DiscountAmountInput struct { 2565 // The value of the discount. 2566 Amount *null.String `json:"amount,omitempty"` 2567 // If true, then the discount is applied to each of the entitled items. If false, then the amount is split across all of the entitled items. 2568 AppliesOnEachItem *bool `json:"appliesOnEachItem,omitempty"` 2569 } 2570 2571 // An auto-generated type for paginating through multiple DiscountApplications. 2572 type DiscountApplicationConnection struct { 2573 // A list of edges. 2574 Edges []*DiscountApplicationEdge `json:"edges,omitempty"` 2575 // Information to aid in pagination. 2576 PageInfo *PageInfo `json:"pageInfo,omitempty"` 2577 } 2578 2579 // An auto-generated type which holds one DiscountApplication and a cursor during pagination. 2580 type DiscountApplicationEdge struct { 2581 // A cursor for use in pagination. 2582 Cursor null.String `json:"cursor,omitempty"` 2583 // The item at the end of DiscountApplicationEdge. 2584 Node DiscountApplication `json:"node,omitempty"` 2585 } 2586 2587 // Return type for `discountAutomaticActivate` mutation. 2588 type DiscountAutomaticActivatePayload struct { 2589 // The activated automatic discount. 2590 AutomaticDiscountNode *DiscountAutomaticNode `json:"automaticDiscountNode,omitempty"` 2591 // List of errors that occurred executing the mutation. 2592 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2593 } 2594 2595 // An automatic basic discount. 2596 type DiscountAutomaticBasic struct { 2597 // The number of times the discount has been used. This value is updated asynchronously and can be different than the actual usage count. 2598 AsyncUsageCount int `json:"asyncUsageCount,omitempty"` 2599 // The date and time when the discount was created. 2600 CreatedAt null.String `json:"createdAt,omitempty"` 2601 // The qualifying items in an order, the quantity of each one, and the total value of the discount. 2602 CustomerGets *DiscountCustomerGets `json:"customerGets,omitempty"` 2603 // The date and time when the discount ends. For open-ended discounts, use `null`. 2604 EndsAt *null.String `json:"endsAt,omitempty"` 2605 // The minimum subtotal or quantity that's required for the discount to be applied. 2606 MinimumRequirement DiscountMinimumRequirement `json:"minimumRequirement,omitempty"` 2607 // A short summary of the discount. 2608 ShortSummary null.String `json:"shortSummary,omitempty"` 2609 // The date and time when the discount starts. 2610 StartsAt null.String `json:"startsAt,omitempty"` 2611 // The status of the discount. 2612 Status DiscountStatus `json:"status,omitempty"` 2613 // A detailed summary of the discount. 2614 Summary null.String `json:"summary,omitempty"` 2615 // The title of the discount. 2616 Title null.String `json:"title,omitempty"` 2617 // The number of times that the discount has been used. 2618 UsageCount int `json:"usageCount,omitempty"` 2619 } 2620 2621 func (DiscountAutomaticBasic) IsDiscountAutomatic() {} 2622 2623 // Return type for `discountAutomaticBasicCreate` mutation. 2624 type DiscountAutomaticBasicCreatePayload struct { 2625 // The created automatic discount. 2626 AutomaticDiscountNode *DiscountAutomaticNode `json:"automaticDiscountNode,omitempty"` 2627 // List of errors that occurred executing the mutation. 2628 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2629 } 2630 2631 // Specifies input field to create or update automatic basic discount. 2632 type DiscountAutomaticBasicInput struct { 2633 // The title of the discount. 2634 Title *null.String `json:"title,omitempty"` 2635 // The date and time when the discount starts. 2636 StartsAt *null.String `json:"startsAt,omitempty"` 2637 // The date and time when the discount ends. For open-ended discounts, use `null`. 2638 EndsAt *null.String `json:"endsAt,omitempty"` 2639 // The minimum subtotal or quantity that's required for the discount to be applied. 2640 MinimumRequirement *DiscountMinimumRequirementInput `json:"minimumRequirement,omitempty"` 2641 // The qualifying items in an order, the quantity of each one, and the total value of the discount. 2642 CustomerGets *DiscountCustomerGetsInput `json:"customerGets,omitempty"` 2643 } 2644 2645 // Return type for `discountAutomaticBasicUpdate` mutation. 2646 type DiscountAutomaticBasicUpdatePayload struct { 2647 // The updated automatic discount. 2648 AutomaticDiscountNode *DiscountAutomaticNode `json:"automaticDiscountNode,omitempty"` 2649 // List of errors that occurred executing the mutation. 2650 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2651 } 2652 2653 // Return type for `discountAutomaticBulkDelete` mutation. 2654 type DiscountAutomaticBulkDeletePayload struct { 2655 // The asynchronous job removing the automatic discounts. 2656 Job *Job `json:"job,omitempty"` 2657 // List of errors that occurred executing the mutation. 2658 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2659 } 2660 2661 // An automatic BXGY discount. 2662 type DiscountAutomaticBxgy struct { 2663 // The number of times the discount has been used. This value is updated asynchronously and can be different than the actual usage count. 2664 AsyncUsageCount int `json:"asyncUsageCount,omitempty"` 2665 // The date and time when the discount was created. 2666 CreatedAt null.String `json:"createdAt,omitempty"` 2667 // The qualifying items and the quantity of each one that the customer has to buy to be eligible for the discount. 2668 CustomerBuys *DiscountCustomerBuys `json:"customerBuys,omitempty"` 2669 // The qualifying items in an order, the quantity of each one, and the total value of the discount. 2670 CustomerGets *DiscountCustomerGets `json:"customerGets,omitempty"` 2671 // The date and time when the discount ends. For open-ended discounts, use `null`. 2672 EndsAt *null.String `json:"endsAt,omitempty"` 2673 // The paginated list of events associated with the host subject. 2674 Events *EventConnection `json:"events,omitempty"` 2675 // A legacy unique identifier for the discount. 2676 ID null.String `json:"id,omitempty"` 2677 // The date and time when the discount starts. 2678 StartsAt null.String `json:"startsAt,omitempty"` 2679 // The status of the discount. 2680 Status DiscountStatus `json:"status,omitempty"` 2681 // A detailed summary of the discount. 2682 Summary null.String `json:"summary,omitempty"` 2683 // The title of the discount. 2684 Title null.String `json:"title,omitempty"` 2685 // The number of times that the discount has been used. 2686 UsageCount int `json:"usageCount,omitempty"` 2687 // The maximum number of times that the discount can be applied to an order. 2688 UsesPerOrderLimit *int `json:"usesPerOrderLimit,omitempty"` 2689 } 2690 2691 func (DiscountAutomaticBxgy) IsDiscountAutomatic() {} 2692 func (DiscountAutomaticBxgy) IsNode() {} 2693 func (DiscountAutomaticBxgy) IsHasEvents() {} 2694 2695 // Return type for `discountAutomaticBxgyCreate` mutation. 2696 type DiscountAutomaticBxgyCreatePayload struct { 2697 // The created automatic discount. 2698 AutomaticDiscountNode *DiscountAutomaticNode `json:"automaticDiscountNode,omitempty"` 2699 // List of errors that occurred executing the mutation. 2700 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2701 } 2702 2703 // Specifies input field to create or update automatic bogo discount. 2704 type DiscountAutomaticBxgyInput struct { 2705 // The date and time when the discount starts. 2706 StartsAt *null.String `json:"startsAt,omitempty"` 2707 // The date and time when the discount ends. For open-ended discounts, use `null`. 2708 EndsAt *null.String `json:"endsAt,omitempty"` 2709 // The title of the discount. 2710 Title *null.String `json:"title,omitempty"` 2711 // The maximum number of times that the discount can be applied to an order. 2712 UsesPerOrderLimit *null.String `json:"usesPerOrderLimit,omitempty"` 2713 // The qualifying items and the quantity of each one that the customer has to buy to be eligible for the discount. 2714 CustomerBuys *DiscountCustomerBuysInput `json:"customerBuys,omitempty"` 2715 // The qualifying items in an order, the quantity of each one, and the total value of the discount. 2716 CustomerGets *DiscountCustomerGetsInput `json:"customerGets,omitempty"` 2717 } 2718 2719 // Return type for `discountAutomaticBxgyUpdate` mutation. 2720 type DiscountAutomaticBxgyUpdatePayload struct { 2721 // The updated automatic discount. 2722 AutomaticDiscountNode *DiscountAutomaticNode `json:"automaticDiscountNode,omitempty"` 2723 // List of errors that occurred executing the mutation. 2724 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2725 } 2726 2727 // An auto-generated type for paginating through multiple DiscountAutomatics. 2728 type DiscountAutomaticConnection struct { 2729 // A list of edges. 2730 Edges []*DiscountAutomaticEdge `json:"edges,omitempty"` 2731 // Information to aid in pagination. 2732 PageInfo *PageInfo `json:"pageInfo,omitempty"` 2733 } 2734 2735 // Return type for `discountAutomaticDeactivate` mutation. 2736 type DiscountAutomaticDeactivatePayload struct { 2737 // The deactivated automatic discount. 2738 AutomaticDiscountNode *DiscountAutomaticNode `json:"automaticDiscountNode,omitempty"` 2739 // List of errors that occurred executing the mutation. 2740 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2741 } 2742 2743 // Return type for `discountAutomaticDelete` mutation. 2744 type DiscountAutomaticDeletePayload struct { 2745 // The deleted automatic discount ID. 2746 DeletedAutomaticDiscountID *null.String `json:"deletedAutomaticDiscountId,omitempty"` 2747 // List of errors that occurred executing the mutation. 2748 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2749 } 2750 2751 // An auto-generated type which holds one DiscountAutomatic and a cursor during pagination. 2752 type DiscountAutomaticEdge struct { 2753 // A cursor for use in pagination. 2754 Cursor null.String `json:"cursor,omitempty"` 2755 // The item at the end of DiscountAutomaticEdge. 2756 Node DiscountAutomatic `json:"node,omitempty"` 2757 } 2758 2759 // An automatic discount wrapper node. 2760 type DiscountAutomaticNode struct { 2761 // An automatic discount. 2762 AutomaticDiscount DiscountAutomatic `json:"automaticDiscount,omitempty"` 2763 // The paginated list of events associated with the host subject. 2764 Events *EventConnection `json:"events,omitempty"` 2765 // Globally unique identifier. 2766 ID null.String `json:"id,omitempty"` 2767 } 2768 2769 func (DiscountAutomaticNode) IsNode() {} 2770 func (DiscountAutomaticNode) IsHasEvents() {} 2771 2772 // An auto-generated type for paginating through multiple DiscountAutomaticNodes. 2773 type DiscountAutomaticNodeConnection struct { 2774 // A list of edges. 2775 Edges []*DiscountAutomaticNodeEdge `json:"edges,omitempty"` 2776 // Information to aid in pagination. 2777 PageInfo *PageInfo `json:"pageInfo,omitempty"` 2778 } 2779 2780 // An auto-generated type which holds one DiscountAutomaticNode and a cursor during pagination. 2781 type DiscountAutomaticNodeEdge struct { 2782 // A cursor for use in pagination. 2783 Cursor null.String `json:"cursor,omitempty"` 2784 // The item at the end of DiscountAutomaticNodeEdge. 2785 Node *DiscountAutomaticNode `json:"node,omitempty"` 2786 } 2787 2788 // Return type for `discountCodeActivate` mutation. 2789 type DiscountCodeActivatePayload struct { 2790 // The activated code discount. 2791 CodeDiscountNode *DiscountCodeNode `json:"codeDiscountNode,omitempty"` 2792 // List of errors that occurred executing the mutation. 2793 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2794 } 2795 2796 // Discount code applications capture the intentions of a discount code at 2797 // the time that it is applied onto an order. 2798 type DiscountCodeApplication struct { 2799 // The method by which the discount's value is allocated to its entitled items. 2800 AllocationMethod DiscountApplicationAllocationMethod `json:"allocationMethod,omitempty"` 2801 // The string identifying the discount code that was used at the time of application. 2802 Code null.String `json:"code,omitempty"` 2803 // An ordered index that can be used to identify the discount application and indicate the precedence 2804 // of the discount application for calculations. 2805 Index int `json:"index,omitempty"` 2806 // How the discount amount is distributed on the discounted lines. 2807 TargetSelection DiscountApplicationTargetSelection `json:"targetSelection,omitempty"` 2808 // Whether the discount is applied on line items or shipping lines. 2809 TargetType DiscountApplicationTargetType `json:"targetType,omitempty"` 2810 // The value of the discount application. 2811 Value PricingValue `json:"value,omitempty"` 2812 } 2813 2814 func (DiscountCodeApplication) IsDiscountApplication() {} 2815 2816 // A basic code discount. 2817 type DiscountCodeBasic struct { 2818 // Whether the discount can be applied only once per customer. 2819 AppliesOncePerCustomer bool `json:"appliesOncePerCustomer,omitempty"` 2820 // The number of times that the discount has been used. 2821 AsyncUsageCount int `json:"asyncUsageCount,omitempty"` 2822 // The number of redeem codes for the discount. 2823 CodeCount int `json:"codeCount,omitempty"` 2824 // A list of redeem codes for the discount. 2825 Codes *DiscountRedeemCodeConnection `json:"codes,omitempty"` 2826 // The date and time when the discount was created. 2827 CreatedAt null.String `json:"createdAt,omitempty"` 2828 // The qualifying items in an order, the quantity of each one, and the total value of the discount. 2829 CustomerGets *DiscountCustomerGets `json:"customerGets,omitempty"` 2830 // The customers that can use the discount. 2831 CustomerSelection DiscountCustomerSelection `json:"customerSelection,omitempty"` 2832 // The date and time when the discount ends. For open-ended discounts, use `null`. 2833 EndsAt *null.String `json:"endsAt,omitempty"` 2834 // Indicates whether there are any timeline comments on the discount. 2835 HasTimelineComment bool `json:"hasTimelineComment,omitempty"` 2836 // The minimum subtotal or quantity that's required for the discount to be applied. 2837 MinimumRequirement DiscountMinimumRequirement `json:"minimumRequirement,omitempty"` 2838 // The number of times a discount applies on recurring purchases (subscriptions). 2839 RecurringCycleLimit *int `json:"recurringCycleLimit,omitempty"` 2840 // URLs that can be used to share the discount. 2841 ShareableUrls []*DiscountShareableURL `json:"shareableUrls,omitempty"` 2842 // A short summary of the discount. 2843 ShortSummary null.String `json:"shortSummary,omitempty"` 2844 // The date and time when the discount starts. 2845 StartsAt null.String `json:"startsAt,omitempty"` 2846 // The status of the discount. 2847 Status DiscountStatus `json:"status,omitempty"` 2848 // A detailed summary of the discount. 2849 Summary null.String `json:"summary,omitempty"` 2850 // The title of the discount. 2851 Title null.String `json:"title,omitempty"` 2852 // The total sales from orders where the discount was used. 2853 TotalSales *MoneyV2 `json:"totalSales,omitempty"` 2854 // The maximum number of times that the discount can be used. 2855 UsageLimit *int `json:"usageLimit,omitempty"` 2856 } 2857 2858 func (DiscountCodeBasic) IsDiscountCode() {} 2859 2860 // Return type for `discountCodeBasicCreate` mutation. 2861 type DiscountCodeBasicCreatePayload struct { 2862 // The created code discount. 2863 CodeDiscountNode *DiscountCodeNode `json:"codeDiscountNode,omitempty"` 2864 // List of errors that occurred executing the mutation. 2865 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2866 } 2867 2868 // Specifies input field to create or update code basic discount. 2869 type DiscountCodeBasicInput struct { 2870 // The title of the discount. 2871 Title *null.String `json:"title,omitempty"` 2872 // The date and time when the discount starts. 2873 StartsAt *null.String `json:"startsAt,omitempty"` 2874 // The date and time when the discount ends. For open-ended discounts, use `null`. 2875 EndsAt *null.String `json:"endsAt,omitempty"` 2876 // The maximum number of times that the discount can be used. For open-ended discounts, use `null`. 2877 UsageLimit *int `json:"usageLimit,omitempty"` 2878 // Whether the discount can be applied only once per customer. 2879 AppliesOncePerCustomer *bool `json:"appliesOncePerCustomer,omitempty"` 2880 // The minimum subtotal or quantity that's required for the discount to be applied. 2881 MinimumRequirement *DiscountMinimumRequirementInput `json:"minimumRequirement,omitempty"` 2882 // The qualifying items in an order, the quantity of each one, and the total value of the discount. 2883 CustomerGets *DiscountCustomerGetsInput `json:"customerGets,omitempty"` 2884 // The customers that can use the discount. 2885 CustomerSelection *DiscountCustomerSelectionInput `json:"customerSelection,omitempty"` 2886 // The code to use the discount. 2887 Code *null.String `json:"code,omitempty"` 2888 // The number of times a discount applies on recurring purchases (subscriptions). 2889 RecurringCycleLimit *int `json:"recurringCycleLimit,omitempty"` 2890 } 2891 2892 // Return type for `discountCodeBasicUpdate` mutation. 2893 type DiscountCodeBasicUpdatePayload struct { 2894 // The updated code discount. 2895 CodeDiscountNode *DiscountCodeNode `json:"codeDiscountNode,omitempty"` 2896 // List of errors that occurred executing the mutation. 2897 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2898 } 2899 2900 // Return type for `discountCodeBulkActivate` mutation. 2901 type DiscountCodeBulkActivatePayload struct { 2902 // The asynchronous job that activates the code discounts. 2903 Job *Job `json:"job,omitempty"` 2904 // List of errors that occurred executing the mutation. 2905 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2906 } 2907 2908 // Return type for `discountCodeBulkDeactivate` mutation. 2909 type DiscountCodeBulkDeactivatePayload struct { 2910 // The asynchronous job that deactivates the code discounts. 2911 Job *Job `json:"job,omitempty"` 2912 // List of errors that occurred executing the mutation. 2913 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2914 } 2915 2916 // Return type for `discountCodeBulkDelete` mutation. 2917 type DiscountCodeBulkDeletePayload struct { 2918 // The asynchronous job that deletes the code discounts. 2919 Job *Job `json:"job,omitempty"` 2920 // List of errors that occurred executing the mutation. 2921 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2922 } 2923 2924 // A BXGY code discount. 2925 type DiscountCodeBxgy struct { 2926 // Whether the discount can be applied only once per customer. 2927 AppliesOncePerCustomer bool `json:"appliesOncePerCustomer,omitempty"` 2928 // The number of times that the discount has been used. 2929 AsyncUsageCount int `json:"asyncUsageCount,omitempty"` 2930 // The number of redeem codes for the discount. 2931 CodeCount int `json:"codeCount,omitempty"` 2932 // A list of redeem codes for the discount. 2933 Codes *DiscountRedeemCodeConnection `json:"codes,omitempty"` 2934 // The date and time when the discount was created. 2935 CreatedAt null.String `json:"createdAt,omitempty"` 2936 // The qualifying items and the quantity of each one that the customer has to buy to be eligible for the discount. 2937 CustomerBuys *DiscountCustomerBuys `json:"customerBuys,omitempty"` 2938 // The qualifying items in an order, the quantity of each one, and the total value of the discount. 2939 CustomerGets *DiscountCustomerGets `json:"customerGets,omitempty"` 2940 // The customers that can use the discount. 2941 CustomerSelection DiscountCustomerSelection `json:"customerSelection,omitempty"` 2942 // The date and time when the discount ends. For open-ended discounts, use `null`. 2943 EndsAt *null.String `json:"endsAt,omitempty"` 2944 // Indicates whether there are any timeline comments on the discount. 2945 HasTimelineComment bool `json:"hasTimelineComment,omitempty"` 2946 // URLs that can be used to share the discount. 2947 ShareableUrls []*DiscountShareableURL `json:"shareableUrls,omitempty"` 2948 // The date and time when the discount starts. 2949 StartsAt null.String `json:"startsAt,omitempty"` 2950 // The status of the discount. 2951 Status DiscountStatus `json:"status,omitempty"` 2952 // A detailed summary of the discount. 2953 Summary null.String `json:"summary,omitempty"` 2954 // The title of the discount. 2955 Title null.String `json:"title,omitempty"` 2956 // The total sales from orders where the discount was used. 2957 TotalSales *MoneyV2 `json:"totalSales,omitempty"` 2958 // The maximum number of times that the discount can be used. 2959 UsageLimit *int `json:"usageLimit,omitempty"` 2960 // The maximum number of times that the discount can be applied to an order. 2961 UsesPerOrderLimit *int `json:"usesPerOrderLimit,omitempty"` 2962 } 2963 2964 func (DiscountCodeBxgy) IsDiscountCode() {} 2965 2966 // Return type for `discountCodeBxgyCreate` mutation. 2967 type DiscountCodeBxgyCreatePayload struct { 2968 // The created code discount. 2969 CodeDiscountNode *DiscountCodeNode `json:"codeDiscountNode,omitempty"` 2970 // List of errors that occurred executing the mutation. 2971 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 2972 } 2973 2974 // Specifies input field to create or update a BXGY code discount. 2975 type DiscountCodeBxgyInput struct { 2976 // The title of the discount. 2977 Title *null.String `json:"title,omitempty"` 2978 // The date and time when the discount starts. 2979 StartsAt *null.String `json:"startsAt,omitempty"` 2980 // The date and time when the discount ends. For open-ended discounts, use `null`. 2981 EndsAt *null.String `json:"endsAt,omitempty"` 2982 // The qualifying items and the quantity of each one that the customer has to buy to be eligible for the discount. 2983 CustomerBuys *DiscountCustomerBuysInput `json:"customerBuys,omitempty"` 2984 // The qualifying items in an order, the quantity of each one, and the total value of the discount. 2985 CustomerGets *DiscountCustomerGetsInput `json:"customerGets,omitempty"` 2986 // The customers that can use the discount. 2987 CustomerSelection *DiscountCustomerSelectionInput `json:"customerSelection,omitempty"` 2988 // The code to use the discount. 2989 Code *null.String `json:"code,omitempty"` 2990 // The maximum number of times that the discount can be used. For open-ended discounts, use `null`. 2991 UsageLimit *int `json:"usageLimit,omitempty"` 2992 // The maximum number of times that the discount can be applied to an order. 2993 UsesPerOrderLimit *int `json:"usesPerOrderLimit,omitempty"` 2994 // Whether the discount can be applied only once per customer. 2995 AppliesOncePerCustomer *bool `json:"appliesOncePerCustomer,omitempty"` 2996 } 2997 2998 // Return type for `discountCodeBxgyUpdate` mutation. 2999 type DiscountCodeBxgyUpdatePayload struct { 3000 // The updated code discount. 3001 CodeDiscountNode *DiscountCodeNode `json:"codeDiscountNode,omitempty"` 3002 // List of errors that occurred executing the mutation. 3003 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 3004 } 3005 3006 // Return type for `discountCodeDeactivate` mutation. 3007 type DiscountCodeDeactivatePayload struct { 3008 // The deactivated code discount. 3009 CodeDiscountNode *DiscountCodeNode `json:"codeDiscountNode,omitempty"` 3010 // List of errors that occurred executing the mutation. 3011 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 3012 } 3013 3014 // Return type for `discountCodeDelete` mutation. 3015 type DiscountCodeDeletePayload struct { 3016 // The deleted code discount ID. 3017 DeletedCodeDiscountID *null.String `json:"deletedCodeDiscountId,omitempty"` 3018 // List of errors that occurred executing the mutation. 3019 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 3020 } 3021 3022 // A free shipping code discount. 3023 type DiscountCodeFreeShipping struct { 3024 // Whether the discount applies on regular one-time-purchase shipping lines. 3025 AppliesOnOneTimePurchase bool `json:"appliesOnOneTimePurchase,omitempty"` 3026 // Whether the discount applies on subscription shipping lines. 3027 AppliesOnSubscription bool `json:"appliesOnSubscription,omitempty"` 3028 // Whether the discount can be applied only once per customer. 3029 AppliesOncePerCustomer bool `json:"appliesOncePerCustomer,omitempty"` 3030 // The number of times that the discount has been used. 3031 AsyncUsageCount int `json:"asyncUsageCount,omitempty"` 3032 // The number of redeem codes for the discount. 3033 CodeCount int `json:"codeCount,omitempty"` 3034 // A list of redeem codes for the discount. 3035 Codes *DiscountRedeemCodeConnection `json:"codes,omitempty"` 3036 // The date and time when the discount was created. 3037 CreatedAt null.String `json:"createdAt,omitempty"` 3038 // The customers that can use the discount. 3039 CustomerSelection DiscountCustomerSelection `json:"customerSelection,omitempty"` 3040 // A shipping destination that qualifies for the discount. 3041 DestinationSelection DiscountShippingDestinationSelection `json:"destinationSelection,omitempty"` 3042 // The date and time when the discount ends. For open-ended discounts, use `null`. 3043 EndsAt *null.String `json:"endsAt,omitempty"` 3044 // Indicates whether there are any timeline comments on the discount. 3045 HasTimelineComment bool `json:"hasTimelineComment,omitempty"` 3046 // The maximum shipping price amount accepted to qualify for the discount. 3047 MaximumShippingPrice *MoneyV2 `json:"maximumShippingPrice,omitempty"` 3048 // The minimum subtotal or quantity that's required for the discount to be applied. 3049 MinimumRequirement DiscountMinimumRequirement `json:"minimumRequirement,omitempty"` 3050 // The number of times a discount applies on recurring purchases (subscriptions). 3051 RecurringCycleLimit *int `json:"recurringCycleLimit,omitempty"` 3052 // URLs that can be used to share the discount. 3053 ShareableUrls []*DiscountShareableURL `json:"shareableUrls,omitempty"` 3054 // A short summary of the discount. 3055 ShortSummary null.String `json:"shortSummary,omitempty"` 3056 // The date and time when the discount starts. 3057 StartsAt null.String `json:"startsAt,omitempty"` 3058 // The status of the discount. 3059 Status DiscountStatus `json:"status,omitempty"` 3060 // A detailed summary of the discount. 3061 Summary null.String `json:"summary,omitempty"` 3062 // The title of the discount. 3063 Title null.String `json:"title,omitempty"` 3064 // The total sales from orders where the discount was used. 3065 TotalSales *MoneyV2 `json:"totalSales,omitempty"` 3066 // The maximum number of times that the discount can be used. 3067 UsageLimit *int `json:"usageLimit,omitempty"` 3068 } 3069 3070 func (DiscountCodeFreeShipping) IsDiscountCode() {} 3071 3072 // Return type for `discountCodeFreeShippingCreate` mutation. 3073 type DiscountCodeFreeShippingCreatePayload struct { 3074 // The created code discount. 3075 CodeDiscountNode *DiscountCodeNode `json:"codeDiscountNode,omitempty"` 3076 // List of errors that occurred executing the mutation. 3077 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 3078 } 3079 3080 // Specifies input field to create or update free shipping code discount. 3081 type DiscountCodeFreeShippingInput struct { 3082 // The title of the discount. 3083 Title *null.String `json:"title,omitempty"` 3084 // The date and time when the discount starts. 3085 StartsAt *null.String `json:"startsAt,omitempty"` 3086 // The date and time when the discount ends. For open-ended discounts, use `null`. 3087 EndsAt *null.String `json:"endsAt,omitempty"` 3088 // The code to use the discount. 3089 Code *null.String `json:"code,omitempty"` 3090 // The maximum number of times that the discount can be used. For open-ended discounts, use `null`. 3091 UsageLimit *int `json:"usageLimit,omitempty"` 3092 // Whether the discount can be applied only once per customer. 3093 AppliesOncePerCustomer *bool `json:"appliesOncePerCustomer,omitempty"` 3094 // The minimum subtotal or quantity that's required for the discount to be applied. 3095 MinimumRequirement *DiscountMinimumRequirementInput `json:"minimumRequirement,omitempty"` 3096 // The customers that can use the discount. 3097 CustomerSelection *DiscountCustomerSelectionInput `json:"customerSelection,omitempty"` 3098 // A list of destinations where the discount will apply. 3099 Destination *DiscountShippingDestinationSelectionInput `json:"destination,omitempty"` 3100 // The maximum shipping price that qualifies for the discount. 3101 MaximumShippingPrice *null.String `json:"maximumShippingPrice,omitempty"` 3102 // The number of times a discount applies on recurring purchases (subscriptions). 3103 RecurringCycleLimit *int `json:"recurringCycleLimit,omitempty"` 3104 // Whether the discount applies on regular one-time-purchase items. 3105 AppliesOnOneTimePurchase *bool `json:"appliesOnOneTimePurchase,omitempty"` 3106 // Whether the discount applies on subscription items. 3107 AppliesOnSubscription *bool `json:"appliesOnSubscription,omitempty"` 3108 } 3109 3110 // Return type for `discountCodeFreeShippingUpdate` mutation. 3111 type DiscountCodeFreeShippingUpdatePayload struct { 3112 // The updated code discount. 3113 CodeDiscountNode *DiscountCodeNode `json:"codeDiscountNode,omitempty"` 3114 // List of errors that occurred executing the mutation. 3115 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 3116 } 3117 3118 // A code discount wrapper node. 3119 type DiscountCodeNode struct { 3120 // A code discount. 3121 CodeDiscount DiscountCode `json:"codeDiscount,omitempty"` 3122 // The paginated list of events associated with the host subject. 3123 Events *EventConnection `json:"events,omitempty"` 3124 // Globally unique identifier. 3125 ID null.String `json:"id,omitempty"` 3126 } 3127 3128 func (DiscountCodeNode) IsNode() {} 3129 func (DiscountCodeNode) IsHasEvents() {} 3130 3131 // An auto-generated type for paginating through multiple DiscountCodeNodes. 3132 type DiscountCodeNodeConnection struct { 3133 // A list of edges. 3134 Edges []*DiscountCodeNodeEdge `json:"edges,omitempty"` 3135 // Information to aid in pagination. 3136 PageInfo *PageInfo `json:"pageInfo,omitempty"` 3137 } 3138 3139 // An auto-generated type which holds one DiscountCodeNode and a cursor during pagination. 3140 type DiscountCodeNodeEdge struct { 3141 // A cursor for use in pagination. 3142 Cursor null.String `json:"cursor,omitempty"` 3143 // The item at the end of DiscountCodeNodeEdge. 3144 Node *DiscountCodeNode `json:"node,omitempty"` 3145 } 3146 3147 // Return type for `discountCodeRedeemCodeBulkDelete` mutation. 3148 type DiscountCodeRedeemCodeBulkDeletePayload struct { 3149 // The asynchronous job that deletes the discount redeem codes. 3150 Job *Job `json:"job,omitempty"` 3151 // List of errors that occurred executing the mutation. 3152 UserErrors []*DiscountUserError `json:"userErrors,omitempty"` 3153 } 3154 3155 // A list of collections that the discount can have as a prerequisite or entitlement. 3156 type DiscountCollections struct { 3157 // A list of collections that the discount can have as a prerequisite or entitlement. 3158 Collections *CollectionConnection `json:"collections,omitempty"` 3159 } 3160 3161 func (DiscountCollections) IsDiscountItems() {} 3162 3163 // Specifies the collections attached to a discount. 3164 type DiscountCollectionsInput struct { 3165 // Specifies list of collection ids to add. 3166 Add []null.String `json:"add,omitempty"` 3167 // Specifies list of collection ids to remove. 3168 Remove []null.String `json:"remove,omitempty"` 3169 } 3170 3171 // The shipping destination where the discount applies. 3172 type DiscountCountries struct { 3173 // The codes for the countries where the discount can be used. 3174 Countries []CountryCode `json:"countries,omitempty"` 3175 // Whether the discount is applicable to countries that have not been defined in the shop's shipping zones. 3176 IncludeRestOfWorld bool `json:"includeRestOfWorld,omitempty"` 3177 } 3178 3179 func (DiscountCountries) IsDiscountShippingDestinationSelection() {} 3180 3181 // Specifies a list of countries to add or remove from the free shipping discount. 3182 type DiscountCountriesInput struct { 3183 // The country codes to add to the list of countries where the discount applies. 3184 Add []CountryCode `json:"add,omitempty"` 3185 // The country codes to remove from the list of countries where the discount applies. 3186 Remove []CountryCode `json:"remove,omitempty"` 3187 // Whether the discount code is applicable to countries that have not been defined in the shop's shipping zones. 3188 IncludeRestOfWorld *bool `json:"includeRestOfWorld,omitempty"` 3189 } 3190 3191 // Whether the discount applies to all countries. 3192 type DiscountCountryAll struct { 3193 // Always true when resolved to this type. 3194 AllCountries bool `json:"allCountries,omitempty"` 3195 } 3196 3197 func (DiscountCountryAll) IsDiscountShippingDestinationSelection() {} 3198 3199 // Whether the discount applies to all customers. 3200 type DiscountCustomerAll struct { 3201 // Always true when resolved to this type. 3202 AllCustomers bool `json:"allCustomers,omitempty"` 3203 } 3204 3205 func (DiscountCustomerAll) IsDiscountCustomerSelection() {} 3206 3207 // The prerequisite items and prerequisite value. 3208 type DiscountCustomerBuys struct { 3209 // The items required for the discount to be applicable. 3210 Items DiscountItems `json:"items,omitempty"` 3211 // The prerequisite value. 3212 Value DiscountCustomerBuysValue `json:"value,omitempty"` 3213 } 3214 3215 // Specifies the prerequisite items and prerequisite quantity. 3216 type DiscountCustomerBuysInput struct { 3217 // The quantity of prerequisite items. 3218 Value *DiscountCustomerBuysValueInput `json:"value,omitempty"` 3219 // The IDs of items that the customer buys. The items can be either collections or products. 3220 Items *DiscountItemsInput `json:"items,omitempty"` 3221 } 3222 3223 // Specifies the prerequisite quantity for the discount. 3224 type DiscountCustomerBuysValueInput struct { 3225 // The quantity of prerequisite items. 3226 Quantity *null.String `json:"quantity,omitempty"` 3227 // The prerequisite purchase amount required for the discount to be applicable. 3228 Amount *null.String `json:"amount,omitempty"` 3229 } 3230 3231 // The qualifying items in an order, the quantity of each one, and the total value of the discount. 3232 type DiscountCustomerGets struct { 3233 // Whether the discount applies on regular one-time-purchase items. 3234 AppliesOnOneTimePurchase bool `json:"appliesOnOneTimePurchase,omitempty"` 3235 // Whether the discount applies on subscription items. 3236 AppliesOnSubscription bool `json:"appliesOnSubscription,omitempty"` 3237 // The items to which the discount applies. 3238 Items DiscountItems `json:"items,omitempty"` 3239 // Entitled quantity and the discount value. 3240 Value DiscountCustomerGetsValue `json:"value,omitempty"` 3241 } 3242 3243 // Specifies the items that will be discounted, the quantity of items that will be discounted, and the value of discount. 3244 type DiscountCustomerGetsInput struct { 3245 // The quantity of items discounted and the discount value. 3246 Value *DiscountCustomerGetsValueInput `json:"value,omitempty"` 3247 // The IDs of the items that the customer gets. The items can be either collections or products. 3248 Items *DiscountItemsInput `json:"items,omitempty"` 3249 // Whether the discount applies on regular one-time-purchase items. 3250 AppliesOnOneTimePurchase *bool `json:"appliesOnOneTimePurchase,omitempty"` 3251 // Whether the discount applies on subscription items. 3252 AppliesOnSubscription *bool `json:"appliesOnSubscription,omitempty"` 3253 } 3254 3255 // Specifies the quantity of items discounted and the discount value. 3256 type DiscountCustomerGetsValueInput struct { 3257 // The quantity of the items that are discounted and the discount value. 3258 DiscountOnQuantity *DiscountOnQuantityInput `json:"discountOnQuantity,omitempty"` 3259 // The percentage value of the discount. Value must be between 0.00 - 1.00. 3260 Percentage *float64 `json:"percentage,omitempty"` 3261 // The value of the discount. 3262 DiscountAmount *DiscountAmountInput `json:"discountAmount,omitempty"` 3263 } 3264 3265 // A list of customer saved searches that contain the customers to whom the discount applies. 3266 type DiscountCustomerSavedSearches struct { 3267 // A list of customer saved searches that contain the customers who can use the discount. 3268 SavedSearches []*SavedSearch `json:"savedSearches,omitempty"` 3269 } 3270 3271 func (DiscountCustomerSavedSearches) IsDiscountCustomerSelection() {} 3272 3273 // Specifies which customer saved searches to add to or remove from the discount. 3274 type DiscountCustomerSavedSearchesInput struct { 3275 // A list of customer saved searches to add to the current list of customer saved searches. 3276 Add []null.String `json:"add,omitempty"` 3277 // A list of customer saved searches to remove from the current list of customer saved searches. 3278 Remove []null.String `json:"remove,omitempty"` 3279 } 3280 3281 // Specifies the customers who can use this discount. 3282 type DiscountCustomerSelectionInput struct { 3283 // Whether all customers can use this discount. 3284 All *bool `json:"all,omitempty"` 3285 // The list of customer IDs to add or remove from the list of customers. 3286 Customers *DiscountCustomersInput `json:"customers,omitempty"` 3287 // The list of customer saved search IDs to add or remove from the list of customer saved searches. 3288 CustomerSavedSearches *DiscountCustomerSavedSearchesInput `json:"customerSavedSearches,omitempty"` 3289 } 3290 3291 // A list of customers to whom the discount applies. 3292 type DiscountCustomers struct { 3293 // A list of the customers that can use the discount. 3294 Customers []*Customer `json:"customers,omitempty"` 3295 } 3296 3297 func (DiscountCustomers) IsDiscountCustomerSelection() {} 3298 3299 // Specifies which customers to add to or remove from the discount. 3300 type DiscountCustomersInput struct { 3301 // A list of customers to add to the current list of customers who can use the discount. 3302 Add []null.String `json:"add,omitempty"` 3303 // A list of customers to remove from the current list of customers who can use the discount. 3304 Remove []null.String `json:"remove,omitempty"` 3305 } 3306 3307 // Specifies how the discount will be applied. Currently, only percentage off is supported. 3308 type DiscountEffectInput struct { 3309 // The percentage value of the discount. Value must be between 0.00 - 1.00. 3310 Percentage *float64 `json:"percentage,omitempty"` 3311 } 3312 3313 // Specifies the items attached to a discount. 3314 type DiscountItemsInput struct { 3315 // The products and product variants that are attached to a discount. 3316 Products *DiscountProductsInput `json:"products,omitempty"` 3317 // The collections that are attached to a discount. 3318 Collections *DiscountCollectionsInput `json:"collections,omitempty"` 3319 // Whether all items should be selected. 3320 All *bool `json:"all,omitempty"` 3321 } 3322 3323 // The minimum quantity of items required for the discount to apply. 3324 type DiscountMinimumQuantity struct { 3325 // The minimum quantity of items that's required for the discount to be applied. 3326 GreaterThanOrEqualToQuantity null.String `json:"greaterThanOrEqualToQuantity,omitempty"` 3327 } 3328 3329 func (DiscountMinimumQuantity) IsDiscountMinimumRequirement() {} 3330 3331 // Specifies the quantity minimum requirements for a discount. 3332 type DiscountMinimumQuantityInput struct { 3333 // The minimum quantity of items that's required for the discount to be applied. 3334 GreaterThanOrEqualToQuantity *null.String `json:"greaterThanOrEqualToQuantity,omitempty"` 3335 } 3336 3337 // Specifies the quantity or subtotal minimum requirements for a discount. 3338 type DiscountMinimumRequirementInput struct { 3339 // The minimum required quantity. 3340 Quantity *DiscountMinimumQuantityInput `json:"quantity,omitempty"` 3341 // The minimum required subtotal. 3342 Subtotal *DiscountMinimumSubtotalInput `json:"subtotal,omitempty"` 3343 } 3344 3345 // The minimum subtotal required for the discount to apply. 3346 type DiscountMinimumSubtotal struct { 3347 // The minimum subtotal that's required for the discount to be applied. 3348 GreaterThanOrEqualToSubtotal *MoneyV2 `json:"greaterThanOrEqualToSubtotal,omitempty"` 3349 } 3350 3351 func (DiscountMinimumSubtotal) IsDiscountMinimumRequirement() {} 3352 3353 // Specifies the subtotal minimum requirements for a discount. 3354 type DiscountMinimumSubtotalInput struct { 3355 // The minimum subtotal that's required for the discount to be applied. 3356 GreaterThanOrEqualToSubtotal *null.String `json:"greaterThanOrEqualToSubtotal,omitempty"` 3357 } 3358 3359 // The quantity of items discounted, the discount value, and how the discount will be applied. 3360 type DiscountOnQuantity struct { 3361 // The discount's effect on qualifying items. 3362 Effect DiscountEffect `json:"effect,omitempty"` 3363 // The number of items being discounted. 3364 Quantity *DiscountQuantity `json:"quantity,omitempty"` 3365 } 3366 3367 func (DiscountOnQuantity) IsDiscountCustomerGetsValue() {} 3368 3369 // Specifies the quantity of items discounted and the discount value. 3370 type DiscountOnQuantityInput struct { 3371 // The quantity of items that are discounted. 3372 Quantity *null.String `json:"quantity,omitempty"` 3373 // The percentage value of the discount. 3374 Effect *DiscountEffectInput `json:"effect,omitempty"` 3375 } 3376 3377 // The percentage value of the discount. 3378 type DiscountPercentage struct { 3379 // The percentage value of the discount. 3380 Percentage float64 `json:"percentage,omitempty"` 3381 } 3382 3383 func (DiscountPercentage) IsDiscountCustomerGetsValue() {} 3384 func (DiscountPercentage) IsDiscountEffect() {} 3385 3386 // The entitled or prerequisite products and product variants for a discount. 3387 type DiscountProducts struct { 3388 // A list of product variants that the discount can have as a prerequisite or entitlement. 3389 ProductVariants *ProductVariantConnection `json:"productVariants,omitempty"` 3390 // A list of products that the discount can have as a prerequisite or entitlement. 3391 Products *ProductConnection `json:"products,omitempty"` 3392 } 3393 3394 func (DiscountProducts) IsDiscountItems() {} 3395 3396 // Specifies the products and product variants attached to a discount. 3397 type DiscountProductsInput struct { 3398 // Specifies list of product ids to add. 3399 ProductsToAdd []null.String `json:"productsToAdd,omitempty"` 3400 // Specifies list of product ids to remove. 3401 ProductsToRemove []null.String `json:"productsToRemove,omitempty"` 3402 // Specifies list of product variant ids to add. 3403 ProductVariantsToAdd []null.String `json:"productVariantsToAdd,omitempty"` 3404 // Specifies list of product variant ids to remove. 3405 ProductVariantsToRemove []null.String `json:"productVariantsToRemove,omitempty"` 3406 } 3407 3408 // The prerequisite purchase amount required for the discount to be applicable. 3409 type DiscountPurchaseAmount struct { 3410 // Decimal money amount. 3411 Amount null.String `json:"amount,omitempty"` 3412 } 3413 3414 func (DiscountPurchaseAmount) IsDiscountCustomerBuysValue() {} 3415 3416 // The quantity of items in discount. 3417 type DiscountQuantity struct { 3418 // The quantity of items. 3419 Quantity null.String `json:"quantity,omitempty"` 3420 } 3421 3422 func (DiscountQuantity) IsDiscountCustomerBuysValue() {} 3423 3424 // A redeem code for a code discount. 3425 type DiscountRedeemCode struct { 3426 // The number of times the discount has been used. This value is updated asynchronously and can be different than the actual usage count. 3427 AsyncUsageCount int `json:"asyncUsageCount,omitempty"` 3428 // The code of a discount. 3429 Code null.String `json:"code,omitempty"` 3430 // The application that created the discount code. 3431 CreatedBy *App `json:"createdBy,omitempty"` 3432 // Globally unique identifier of the discount redeem code. 3433 ID null.String `json:"id,omitempty"` 3434 } 3435 3436 // An auto-generated type for paginating through multiple DiscountRedeemCodes. 3437 type DiscountRedeemCodeConnection struct { 3438 // A list of edges. 3439 Edges []*DiscountRedeemCodeEdge `json:"edges,omitempty"` 3440 // Information to aid in pagination. 3441 PageInfo *PageInfo `json:"pageInfo,omitempty"` 3442 } 3443 3444 // An auto-generated type which holds one DiscountRedeemCode and a cursor during pagination. 3445 type DiscountRedeemCodeEdge struct { 3446 // A cursor for use in pagination. 3447 Cursor null.String `json:"cursor,omitempty"` 3448 // The item at the end of DiscountRedeemCodeEdge. 3449 Node *DiscountRedeemCode `json:"node,omitempty"` 3450 } 3451 3452 // The shareable URL for the discount code. 3453 type DiscountShareableURL struct { 3454 // The image URL of the item (product or collection) to which the discount applies. 3455 TargetItemImage *Image `json:"targetItemImage,omitempty"` 3456 // The type of page that's associated with the URL. 3457 TargetType DiscountShareableURLTargetType `json:"targetType,omitempty"` 3458 // The title of the page that's associated with the URL. 3459 Title null.String `json:"title,omitempty"` 3460 // The URL for the discount code. 3461 URL null.String `json:"url,omitempty"` 3462 } 3463 3464 // Specifies the destinations where the free shipping discount will be applied. 3465 type DiscountShippingDestinationSelectionInput struct { 3466 // Whether the discount code applies to all countries. 3467 All *bool `json:"all,omitempty"` 3468 // A list of countries where the discount code will apply. 3469 Countries *DiscountCountriesInput `json:"countries,omitempty"` 3470 } 3471 3472 // An error that occurs during the execution of a discount mutation. 3473 type DiscountUserError struct { 3474 // Error code to uniquely identify the error. 3475 Code *DiscountErrorCode `json:"code,omitempty"` 3476 // Extra information about this error. 3477 ExtraInfo *null.String `json:"extraInfo,omitempty"` 3478 // Path to the input field which caused the error. 3479 Field []null.String `json:"field,omitempty"` 3480 // The error message. 3481 Message null.String `json:"message,omitempty"` 3482 } 3483 3484 func (DiscountUserError) IsDisplayableError() {} 3485 3486 // A unique string that represents the address of a Shopify store on the Internet. 3487 type Domain struct { 3488 // The host name of the domain (eg: `example.com`). 3489 Host null.String `json:"host,omitempty"` 3490 // Globally unique identifier. 3491 ID null.String `json:"id,omitempty"` 3492 // The localization of the domain, if it does not redirect. 3493 Localization *DomainLocalization `json:"localization,omitempty"` 3494 // Whether SSL is enabled or not. 3495 SslEnabled bool `json:"sslEnabled,omitempty"` 3496 // The URL of the domain (eg: `https://example.com`). 3497 URL null.String `json:"url,omitempty"` 3498 } 3499 3500 func (Domain) IsNode() {} 3501 3502 // The country and language settings assigned to a domain. 3503 type DomainLocalization struct { 3504 // The ISO codes for the domain’s alternate locales. 3505 AlternateLocales []null.String `json:"alternateLocales,omitempty"` 3506 // The ISO code for the country assigned to the domain, or "*" for a domain set to "Rest of world". 3507 Country *null.String `json:"country,omitempty"` 3508 // The ISO code for the domain’s default locale. 3509 DefaultLocale null.String `json:"defaultLocale,omitempty"` 3510 } 3511 3512 // Returns unfulfilled line items grouped by their fulfillment service. Each draft fulfillment contains additional information, such as whether the fulfillment requires shipping and whether a shipping label can be printed for it. 3513 type DraftFulfillment struct { 3514 // Whether a label can be purchased. 3515 AllowLabelPurchase bool `json:"allowLabelPurchase,omitempty"` 3516 // The line items (which might correspond to a variant) that are part of this draft fulfillment. 3517 LineItems []*LineItem `json:"lineItems,omitempty"` 3518 // Whether a fulfillment requires shipping. 3519 RequiresShipping bool `json:"requiresShipping,omitempty"` 3520 // The service responsible for fulfilling the fulfillment. 3521 Service *FulfillmentService `json:"service,omitempty"` 3522 } 3523 3524 // Represents a draft order. Merchants can use draft orders to create orders on behalf of their customers. 3525 type DraftOrder struct { 3526 // Order-level discount applied to the draft order. 3527 AppliedDiscount *DraftOrderAppliedDiscount `json:"appliedDiscount,omitempty"` 3528 // Billing address of the customer. 3529 BillingAddress *MailingAddress `json:"billingAddress,omitempty"` 3530 // Date and time when the draft order converted to a new order, 3531 // and the draft order's status changed to **Completed**. 3532 CompletedAt *null.String `json:"completedAt,omitempty"` 3533 // Date and time when the draft order was created in Shopify. 3534 CreatedAt null.String `json:"createdAt,omitempty"` 3535 // Three letter code for the currency of the store at the time that the invoice is sent. 3536 CurrencyCode CurrencyCode `json:"currencyCode,omitempty"` 3537 // Custom information added to the draft order on behalf of your customer. 3538 CustomAttributes []*Attribute `json:"customAttributes,omitempty"` 3539 // Customer who will be sent an invoice for the draft order, if there is one. 3540 Customer *Customer `json:"customer,omitempty"` 3541 // Email address of the customer, which is used to send notifications to. 3542 Email *null.String `json:"email,omitempty"` 3543 // List of events associated with the draft order. 3544 Events *EventConnection `json:"events,omitempty"` 3545 // Whether the merchant has added timeline comments to the draft order. 3546 HasTimelineComment bool `json:"hasTimelineComment,omitempty"` 3547 // Globally unique identifier. 3548 ID null.String `json:"id,omitempty"` 3549 // Date and time when the invoice was last emailed to the customer. 3550 InvoiceSentAt *null.String `json:"invoiceSentAt,omitempty"` 3551 // Link to the checkout, which is sent to your customer in the invoice email. 3552 InvoiceURL *null.String `json:"invoiceUrl,omitempty"` 3553 // The ID of the corresponding resource in the REST Admin API. 3554 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 3555 // List of the line items in the draft order. 3556 LineItems *DraftOrderLineItemConnection `json:"lineItems,omitempty"` 3557 // List of localization extensions for the resource. 3558 LocalizationExtensions *LocalizationExtensionConnection `json:"localizationExtensions,omitempty"` 3559 // The metafield associated with the resource. 3560 Metafield *Metafield `json:"metafield,omitempty"` 3561 // A paginated list of metafields associated with the resource. 3562 Metafields *MetafieldConnection `json:"metafields,omitempty"` 3563 // Unique identifier for the draft order, which is unique within the store. For example, _#D1223_. 3564 Name null.String `json:"name,omitempty"` 3565 // Text from an optional note attached to the draft order. 3566 Note2 *null.String `json:"note2,omitempty"` 3567 // Order that was created from this draft order. 3568 Order *Order `json:"order,omitempty"` 3569 // Returns a private metafield found by namespace and key. 3570 PrivateMetafield *PrivateMetafield `json:"privateMetafield,omitempty"` 3571 // List of private metafields. 3572 PrivateMetafields *PrivateMetafieldConnection `json:"privateMetafields,omitempty"` 3573 // Whether or not the Draft Order is ready and can be completed. Draft Orders 3574 // may have asynchronous operations that can take time to finish. 3575 Ready bool `json:"ready,omitempty"` 3576 // Shipping mailing address of the customer. 3577 ShippingAddress *MailingAddress `json:"shippingAddress,omitempty"` 3578 // Line item that contains the shipping costs. 3579 ShippingLine *ShippingLine `json:"shippingLine,omitempty"` 3580 // Status of the draft order. 3581 Status DraftOrderStatus `json:"status,omitempty"` 3582 // Subtotal of the line items and their discounts (does not contain shipping charges or shipping discounts, or taxes). 3583 SubtotalPrice null.String `json:"subtotalPrice,omitempty"` 3584 // A comma separated list of tags that have been added to the draft order. 3585 Tags []null.String `json:"tags,omitempty"` 3586 // Whether the draft order is tax exempt. 3587 TaxExempt bool `json:"taxExempt,omitempty"` 3588 // Total amount of taxes charged for each line item and shipping line. 3589 TaxLines []*TaxLine `json:"taxLines,omitempty"` 3590 // Whether the line item prices include taxes. 3591 TaxesIncluded bool `json:"taxesIncluded,omitempty"` 3592 // Total amount of the draft order (includes taxes, shipping charges, and discounts). 3593 TotalPrice null.String `json:"totalPrice,omitempty"` 3594 // Total shipping charge for the draft order. 3595 TotalShippingPrice null.String `json:"totalShippingPrice,omitempty"` 3596 // Total amount of taxes for the draft order. 3597 TotalTax null.String `json:"totalTax,omitempty"` 3598 // Total weight (grams) of the draft order. 3599 TotalWeight null.String `json:"totalWeight,omitempty"` 3600 // Date and time when the draft order was last changed. 3601 // The format is YYYY-MM-DD HH:mm:ss (for example, 2016-02-05 17:04:01). 3602 UpdatedAt null.String `json:"updatedAt,omitempty"` 3603 } 3604 3605 func (DraftOrder) IsCommentEventEmbed() {} 3606 func (DraftOrder) IsNode() {} 3607 func (DraftOrder) IsHasMetafields() {} 3608 func (DraftOrder) IsCommentEventSubject() {} 3609 func (DraftOrder) IsLegacyInteroperability() {} 3610 func (DraftOrder) IsHasEvents() {} 3611 func (DraftOrder) IsHasLocalizationExtensionsForDraftOrders() {} 3612 3613 // The order-level discount applied to a draft order. 3614 type DraftOrderAppliedDiscount struct { 3615 // Amount of the order-level discount that is applied to the draft order. 3616 Amount null.String `json:"amount,omitempty"` 3617 // Amount of money discounted. 3618 AmountV2 *MoneyV2 `json:"amountV2,omitempty"` 3619 // Description of the order-level discount. 3620 Description null.String `json:"description,omitempty"` 3621 // Name of the order-level discount. 3622 Title *null.String `json:"title,omitempty"` 3623 // Amount of the order level discount (when value_type is percentage, 3624 // the value in this field is the percentage discount). 3625 Value float64 `json:"value,omitempty"` 3626 // Type of the order-level discount. 3627 ValueType DraftOrderAppliedDiscountType `json:"valueType,omitempty"` 3628 } 3629 3630 // The input fields for applying an order-level discount to a draft order. 3631 type DraftOrderAppliedDiscountInput struct { 3632 // The applied amount of the discount. 3633 Amount *null.String `json:"amount,omitempty"` 3634 // Reason for the discount. 3635 Description *null.String `json:"description,omitempty"` 3636 // Title of the discount. 3637 Title *null.String `json:"title,omitempty"` 3638 // The value of the discount. 3639 // If the type of the discount is fixed amount, then this is a fixed dollar amount. 3640 // If the type is percentage, then this is the percentage. 3641 Value float64 `json:"value,omitempty"` 3642 // The type of discount. 3643 ValueType DraftOrderAppliedDiscountType `json:"valueType,omitempty"` 3644 } 3645 3646 // Return type for `draftOrderCalculate` mutation. 3647 type DraftOrderCalculatePayload struct { 3648 // The calculated properties for a draft order. 3649 CalculatedDraftOrder *CalculatedDraftOrder `json:"calculatedDraftOrder,omitempty"` 3650 // List of errors that occurred executing the mutation. 3651 UserErrors []*UserError `json:"userErrors,omitempty"` 3652 } 3653 3654 // Return type for `draftOrderComplete` mutation. 3655 type DraftOrderCompletePayload struct { 3656 // The completed draft order. 3657 DraftOrder *DraftOrder `json:"draftOrder,omitempty"` 3658 // List of errors that occurred executing the mutation. 3659 UserErrors []*UserError `json:"userErrors,omitempty"` 3660 } 3661 3662 // An auto-generated type for paginating through multiple DraftOrders. 3663 type DraftOrderConnection struct { 3664 // A list of edges. 3665 Edges []*DraftOrderEdge `json:"edges,omitempty"` 3666 // Information to aid in pagination. 3667 PageInfo *PageInfo `json:"pageInfo,omitempty"` 3668 } 3669 3670 // Return type for `draftOrderCreate` mutation. 3671 type DraftOrderCreatePayload struct { 3672 // The created draft order. 3673 DraftOrder *DraftOrder `json:"draftOrder,omitempty"` 3674 // List of errors that occurred executing the mutation. 3675 UserErrors []*UserError `json:"userErrors,omitempty"` 3676 } 3677 3678 // Specifies the draft order to delete by its ID. 3679 type DraftOrderDeleteInput struct { 3680 // The ID of the draft order to delete. 3681 ID null.String `json:"id,omitempty"` 3682 } 3683 3684 // Return type for `draftOrderDelete` mutation. 3685 type DraftOrderDeletePayload struct { 3686 // The ID of the deleted draft order. 3687 DeletedID *null.String `json:"deletedId,omitempty"` 3688 // List of errors that occurred executing the mutation. 3689 UserErrors []*UserError `json:"userErrors,omitempty"` 3690 } 3691 3692 // An auto-generated type which holds one DraftOrder and a cursor during pagination. 3693 type DraftOrderEdge struct { 3694 // A cursor for use in pagination. 3695 Cursor null.String `json:"cursor,omitempty"` 3696 // The item at the end of DraftOrderEdge. 3697 Node *DraftOrder `json:"node,omitempty"` 3698 } 3699 3700 // The input fields used to create or update a draft order. 3701 type DraftOrderInput struct { 3702 // The discount that will be applied to the draft order. 3703 // A draft order line item can have one discount. A draft order can also have one order-level discount. 3704 AppliedDiscount *DraftOrderAppliedDiscountInput `json:"appliedDiscount,omitempty"` 3705 // The mailing address associated with the payment method. 3706 BillingAddress *MailingAddressInput `json:"billingAddress,omitempty"` 3707 // Customer associated with the draft order. 3708 CustomerID *null.String `json:"customerId,omitempty"` 3709 // Extra information added to the customer. 3710 CustomAttributes []*AttributeInput `json:"customAttributes,omitempty"` 3711 // The customer's email address. 3712 Email *null.String `json:"email,omitempty"` 3713 // Product variant line item or custom line item associated to the draft order. 3714 // Each draft order must include at least one line item. 3715 LineItems []*DraftOrderLineItemInput `json:"lineItems,omitempty"` 3716 // Metafields attached to the draft order. 3717 Metafields []*MetafieldInput `json:"metafields,omitempty"` 3718 // The private metafields attached to the draft order. 3719 PrivateMetafields []*PrivateMetafieldInput `json:"privateMetafields,omitempty"` 3720 // The localization extensions attached to the draft order. For example, Tax IDs. 3721 LocalizationExtensions []*LocalizationExtensionInput `json:"localizationExtensions,omitempty"` 3722 // The text of an optional note that a shop owner can attach to the draft order. 3723 Note *null.String `json:"note,omitempty"` 3724 // The mailing address to where the order will be shipped. 3725 ShippingAddress *MailingAddressInput `json:"shippingAddress,omitempty"` 3726 // A shipping line object, which details the shipping method used. 3727 ShippingLine *ShippingLineInput `json:"shippingLine,omitempty"` 3728 // A comma separated list of tags that have been added to the draft order. 3729 Tags []null.String `json:"tags,omitempty"` 3730 // Whether or not taxes are exempt for the draft order. 3731 // If false, then Shopify will refer to the taxable field for each line item. 3732 // If a customer is applied to the draft order, then Shopify will use the customer's tax exempt field instead. 3733 TaxExempt *bool `json:"taxExempt,omitempty"` 3734 // Sent as part of a draft order object to load customer shipping information. 3735 UseCustomerDefaultAddress *bool `json:"useCustomerDefaultAddress,omitempty"` 3736 } 3737 3738 // Return type for `draftOrderInvoicePreview` mutation. 3739 type DraftOrderInvoicePreviewPayload struct { 3740 // HTML to preview the draft order invoice email. 3741 PreviewHTML *null.String `json:"previewHtml,omitempty"` 3742 // List of errors that occurred executing the mutation. 3743 UserErrors []*UserError `json:"userErrors,omitempty"` 3744 } 3745 3746 // Return type for `draftOrderInvoiceSend` mutation. 3747 type DraftOrderInvoiceSendPayload struct { 3748 // The draft order an invoice email is sent for. 3749 DraftOrder *DraftOrder `json:"draftOrder,omitempty"` 3750 // List of errors that occurred executing the mutation. 3751 UserErrors []*UserError `json:"userErrors,omitempty"` 3752 } 3753 3754 // Represents a line item included in a draft order. 3755 type DraftOrderLineItem struct { 3756 // Discount which will be applied to the line item or the overall order. 3757 AppliedDiscount *DraftOrderAppliedDiscount `json:"appliedDiscount,omitempty"` 3758 // Whether this is a product variant line item, or a custom line item. 3759 // If set to true indicates a custom line item. If set to false indicates a product variant line item. 3760 Custom bool `json:"custom,omitempty"` 3761 // List of additional information (metafields) about the line item. 3762 CustomAttributes []*Attribute `json:"customAttributes,omitempty"` 3763 // Line item price after discounts are applied. 3764 DiscountedTotal null.String `json:"discountedTotal,omitempty"` 3765 // The `discountedTotal` divided by `quantity`, resulting in the value of the discount per unit. 3766 DiscountedUnitPrice null.String `json:"discountedUnitPrice,omitempty"` 3767 // Name of the service provider who fulfilled the order. 3768 // 3769 // Valid values are either **manual** or the name of the provider. 3770 // For example, **amazon**, **shipwire**. 3771 FulfillmentService *FulfillmentService `json:"fulfillmentService,omitempty"` 3772 // Weight in grams. Can only be specified if this is a custom line item. 3773 Grams *int `json:"grams,omitempty"` 3774 // Globally unique identifier. 3775 ID null.String `json:"id,omitempty"` 3776 // Image associated with the draft order line item. 3777 Image *Image `json:"image,omitempty"` 3778 // Whether the line item represents the puchase of a gift card. 3779 IsGiftCard bool `json:"isGiftCard,omitempty"` 3780 // Name of the product. 3781 Name null.String `json:"name,omitempty"` 3782 // Total price (without discounts) of the line item, based on the original unit price of the variant x quantity. 3783 OriginalTotal null.String `json:"originalTotal,omitempty"` 3784 // Variant price without any discounts applied. 3785 OriginalUnitPrice null.String `json:"originalUnitPrice,omitempty"` 3786 // The product corresponding to the line item’s product variant. 3787 Product *Product `json:"product,omitempty"` 3788 // Number of variant items requested in the draft order. 3789 Quantity int `json:"quantity,omitempty"` 3790 // Whether physical shipping is required for the variant. 3791 RequiresShipping bool `json:"requiresShipping,omitempty"` 3792 // Variant SKU number. 3793 Sku *null.String `json:"sku,omitempty"` 3794 // A list of tax line objects, each of which details the total taxes applicable to the order. 3795 TaxLines []*TaxLine `json:"taxLines,omitempty"` 3796 // Whether the variant is taxable. 3797 Taxable bool `json:"taxable,omitempty"` 3798 // Title of the product or variant (this field only applies to custom line items). 3799 Title null.String `json:"title,omitempty"` 3800 // Total value of the discount applied to the line item. 3801 TotalDiscount null.String `json:"totalDiscount,omitempty"` 3802 // Associated variant for the line item. 3803 Variant *ProductVariant `json:"variant,omitempty"` 3804 // Name of the variant. 3805 VariantTitle *null.String `json:"variantTitle,omitempty"` 3806 // Name of the vendor who made the variant. 3807 Vendor *null.String `json:"vendor,omitempty"` 3808 // Weight unit and value for a draft order line item. 3809 Weight *Weight `json:"weight,omitempty"` 3810 } 3811 3812 func (DraftOrderLineItem) IsNode() {} 3813 3814 // An auto-generated type for paginating through multiple DraftOrderLineItems. 3815 type DraftOrderLineItemConnection struct { 3816 // A list of edges. 3817 Edges []*DraftOrderLineItemEdge `json:"edges,omitempty"` 3818 // Information to aid in pagination. 3819 PageInfo *PageInfo `json:"pageInfo,omitempty"` 3820 } 3821 3822 // An auto-generated type which holds one DraftOrderLineItem and a cursor during pagination. 3823 type DraftOrderLineItemEdge struct { 3824 // A cursor for use in pagination. 3825 Cursor null.String `json:"cursor,omitempty"` 3826 // The item at the end of DraftOrderLineItemEdge. 3827 Node *DraftOrderLineItem `json:"node,omitempty"` 3828 } 3829 3830 // The input fields used to create a line item for a draft order. 3831 type DraftOrderLineItemInput struct { 3832 // Discount which will be applied to the line item. 3833 AppliedDiscount *DraftOrderAppliedDiscountInput `json:"appliedDiscount,omitempty"` 3834 // Represents a generic custom attribute using a key value pair. 3835 CustomAttributes []*AttributeInput `json:"customAttributes,omitempty"` 3836 // Ignored when variant ID is provided. This argument is deprecated: Use `weight` instead. 3837 Grams *int `json:"grams,omitempty"` 3838 // Ignored when variant ID is provided. 3839 OriginalUnitPrice *null.String `json:"originalUnitPrice,omitempty"` 3840 // The number of products that were purchased. 3841 Quantity int `json:"quantity,omitempty"` 3842 // Ignored when variant ID is provided. 3843 RequiresShipping *bool `json:"requiresShipping,omitempty"` 3844 // Ignored when variant ID is provided. 3845 Sku *null.String `json:"sku,omitempty"` 3846 // Ignored when variant ID is provided. 3847 Taxable *bool `json:"taxable,omitempty"` 3848 // Ignored when variant ID is provided. 3849 Title *null.String `json:"title,omitempty"` 3850 // The ID of the product variant corresponding to the line item. 3851 // Null if custom line item. Required if product variant line item. 3852 VariantID *null.String `json:"variantId,omitempty"` 3853 // Specifies the weight unit and value inputs. 3854 // Ignored when variant ID is provided. 3855 Weight *WeightInput `json:"weight,omitempty"` 3856 } 3857 3858 // Return type for `draftOrderUpdate` mutation. 3859 type DraftOrderUpdatePayload struct { 3860 // The updated draft order. 3861 DraftOrder *DraftOrder `json:"draftOrder,omitempty"` 3862 // List of errors that occurred executing the mutation. 3863 UserErrors []*UserError `json:"userErrors,omitempty"` 3864 } 3865 3866 // Represents a single duty for a line item. 3867 type Duty struct { 3868 // The ISO code of the country of origin of the line item. 3869 CountryCodeOfOrigin *CountryCode `json:"countryCodeOfOrigin,omitempty"` 3870 // The harmonized system code of the line item. 3871 HarmonizedSystemCode *null.String `json:"harmonizedSystemCode,omitempty"` 3872 // Globally unique identifier. 3873 ID null.String `json:"id,omitempty"` 3874 // The price of the duty for the line item. 3875 Price *MoneyBag `json:"price,omitempty"` 3876 // The TaxLine objects connected to the duty for the line item. 3877 TaxLines []*TaxLine `json:"taxLines,omitempty"` 3878 } 3879 3880 func (Duty) IsNode() {} 3881 3882 // The attribute editable information. 3883 type EditableProperty struct { 3884 // Whether the attribute is locked for editing. 3885 Locked bool `json:"locked,omitempty"` 3886 // The reason the attribute is locked for editing. 3887 Reason *null.String `json:"reason,omitempty"` 3888 } 3889 3890 // Specifies the fields for an email. 3891 type EmailInput struct { 3892 // Specifies the email subject. 3893 Subject *null.String `json:"subject,omitempty"` 3894 // Specifies the email recipient. 3895 To *null.String `json:"to,omitempty"` 3896 // Specifies the email sender. 3897 From *null.String `json:"from,omitempty"` 3898 // Specifies the email body. 3899 Body *null.String `json:"body,omitempty"` 3900 // Specifies any bcc recipients for the email. 3901 Bcc []null.String `json:"bcc,omitempty"` 3902 // Specifies a custom message to include in the email. 3903 CustomMessage *null.String `json:"customMessage,omitempty"` 3904 } 3905 3906 // Return type for `eventBridgeWebhookSubscriptionCreate` mutation. 3907 type EventBridgeWebhookSubscriptionCreatePayload struct { 3908 // List of errors that occurred executing the mutation. 3909 UserErrors []*UserError `json:"userErrors,omitempty"` 3910 // The webhook subscription that was created. 3911 WebhookSubscription *WebhookSubscription `json:"webhookSubscription,omitempty"` 3912 } 3913 3914 // Specifies the input fields for an EventBridge webhook subscription. 3915 type EventBridgeWebhookSubscriptionInput struct { 3916 // ARN of the EventBridge event source. 3917 Arn *null.String `json:"arn,omitempty"` 3918 // The format in which the webhook subscription should send the data. 3919 Format *WebhookSubscriptionFormat `json:"format,omitempty"` 3920 // The list of fields to be included in the webhook subscription. 3921 IncludeFields []null.String `json:"includeFields,omitempty"` 3922 // The list of namespaces for any metafields that should be included in the webhook subscription. 3923 MetafieldNamespaces []null.String `json:"metafieldNamespaces,omitempty"` 3924 } 3925 3926 // Return type for `eventBridgeWebhookSubscriptionUpdate` mutation. 3927 type EventBridgeWebhookSubscriptionUpdatePayload struct { 3928 // List of errors that occurred executing the mutation. 3929 UserErrors []*UserError `json:"userErrors,omitempty"` 3930 // The webhook subscription that was updated. 3931 WebhookSubscription *WebhookSubscription `json:"webhookSubscription,omitempty"` 3932 } 3933 3934 // An auto-generated type for paginating through multiple Events. 3935 type EventConnection struct { 3936 // A list of edges. 3937 Edges []*EventEdge `json:"edges,omitempty"` 3938 // Information to aid in pagination. 3939 PageInfo *PageInfo `json:"pageInfo,omitempty"` 3940 } 3941 3942 // An auto-generated type which holds one Event and a cursor during pagination. 3943 type EventEdge struct { 3944 // A cursor for use in pagination. 3945 Cursor null.String `json:"cursor,omitempty"` 3946 // The item at the end of EventEdge. 3947 Node Event `json:"node,omitempty"` 3948 } 3949 3950 // Represents a video hosted outside of Shopify. 3951 type ExternalVideo struct { 3952 // A word or phrase to share the nature or contents of a media. 3953 Alt *null.String `json:"alt,omitempty"` 3954 // The URL. 3955 EmbeddedURL null.String `json:"embeddedUrl,omitempty"` 3956 // Globally unique identifier. 3957 ID null.String `json:"id,omitempty"` 3958 // The media content type. 3959 MediaContentType MediaContentType `json:"mediaContentType,omitempty"` 3960 // Any errors which have occurred on the media. 3961 MediaErrors []*MediaError `json:"mediaErrors,omitempty"` 3962 // The preview image for the media. 3963 Preview *MediaPreviewImage `json:"preview,omitempty"` 3964 // Current status of the media. 3965 Status MediaStatus `json:"status,omitempty"` 3966 } 3967 3968 func (ExternalVideo) IsNode() {} 3969 func (ExternalVideo) IsMedia() {} 3970 3971 // Requirements that must be met before an app can be installed. 3972 type FailedRequirement struct { 3973 // Action to be taken to resolve a failed requirement, including URL link. 3974 Action *NavigationItem `json:"action,omitempty"` 3975 // A concise set of copy strings to be displayed to merchants, to guide them in resolving problems your app 3976 // encounters when trying to make use of their Shop and its resources. 3977 Message null.String `json:"message,omitempty"` 3978 } 3979 3980 // A filter option is one possible value in a search filter. 3981 type FilterOption struct { 3982 // The filter option's label for display purposes. 3983 Label null.String `json:"label,omitempty"` 3984 // The filter option's value. 3985 Value null.String `json:"value,omitempty"` 3986 } 3987 3988 // Return type for `flowTriggerReceive` mutation. 3989 type FlowTriggerReceivePayload struct { 3990 // List of errors that occurred executing the mutation. 3991 UserErrors []*UserError `json:"userErrors,omitempty"` 3992 } 3993 3994 // Represents a fulfillment. In Shopify, a fulfillment represents a shipment of one or more items in an order. When an order has been completely fulfilled, it means that all the items that are included in the order have been sent to the customer. There can be more than one fulfillment for an order. 3995 type Fulfillment struct { 3996 // The date and time when the fulfillment was created. 3997 CreatedAt null.String `json:"createdAt,omitempty"` 3998 // The date that this fulfillment was delivered. 3999 DeliveredAt *null.String `json:"deliveredAt,omitempty"` 4000 // Human readable display status for this fulfillment. 4001 DisplayStatus *FulfillmentDisplayStatus `json:"displayStatus,omitempty"` 4002 // The estimated date that this fulfillment will arrive. 4003 EstimatedDeliveryAt *null.String `json:"estimatedDeliveryAt,omitempty"` 4004 // The history of events associated with this fulfillment. 4005 // Events *FulfillmentEventConnection `json:"events,omitempty"` 4006 // List of the fulfillment's line items. 4007 // FulfillmentLineItems *FulfillmentLineItemConnection `json:"fulfillmentLineItems,omitempty"` 4008 // A list of fulfillment orders for the fulfillment. 4009 // FulfillmentOrders *FulfillmentOrderConnection `json:"fulfillmentOrders,omitempty"` 4010 // Globally unique identifier. 4011 ID null.String `json:"id,omitempty"` 4012 // The date and time when the fulfillment went into transit. 4013 InTransitAt *null.String `json:"inTransitAt,omitempty"` 4014 // The ID of the corresponding resource in the REST Admin API. 4015 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 4016 // The location that the fulfillment was processed at. 4017 // Location *Location `json:"location,omitempty"` 4018 // Human readable reference identifier for this fulfillment. 4019 Name null.String `json:"name,omitempty"` 4020 // The order for which the fulfillment was created. 4021 // Order *Order `json:"order,omitempty"` 4022 // Whether any of the line items in the fulfillment require shipping. 4023 RequiresShipping bool `json:"requiresShipping,omitempty"` 4024 // Fulfillment service associated with the fulfillment. 4025 // Service *FulfillmentService `json:"service,omitempty"` 4026 // The status of the fulfillment. 4027 Status FulfillmentStatus `json:"status,omitempty"` 4028 // Sum of all line item quantities for the fulfillment. 4029 TotalQuantity int `json:"totalQuantity,omitempty"` 4030 // Tracking information associated with the fulfillment, 4031 // such as the tracking company, tracking number, and tracking URL. 4032 TrackingInfo []*FulfillmentTrackingInfo `json:"trackingInfo,omitempty"` 4033 // The date and time when the fulfillment was last modified. 4034 UpdatedAt null.String `json:"updatedAt,omitempty"` 4035 } 4036 4037 func (Fulfillment) IsLegacyInteroperability() {} 4038 func (Fulfillment) IsNode() {} 4039 4040 // Return type for `fulfillmentCancel` mutation. 4041 type FulfillmentCancelPayload struct { 4042 // The canceled fulfillment. 4043 Fulfillment *Fulfillment `json:"fulfillment,omitempty"` 4044 // List of errors that occurred executing the mutation. 4045 UserErrors []*UserError `json:"userErrors,omitempty"` 4046 } 4047 4048 // An auto-generated type for paginating through multiple Fulfillments. 4049 type FulfillmentConnection struct { 4050 // A list of edges. 4051 Edges []*FulfillmentEdge `json:"edges,omitempty"` 4052 // Information to aid in pagination. 4053 PageInfo *PageInfo `json:"pageInfo,omitempty"` 4054 } 4055 4056 // Return type for `fulfillmentCreate` mutation. 4057 type FulfillmentCreatePayload struct { 4058 // The created fulfillment. 4059 Fulfillment *Fulfillment `json:"fulfillment,omitempty"` 4060 // The order for which the fulfillment is created. 4061 Order *Order `json:"order,omitempty"` 4062 // List of errors that occurred executing the mutation. 4063 UserErrors []*UserError `json:"userErrors,omitempty"` 4064 } 4065 4066 // Return type for `fulfillmentCreateV2` mutation. 4067 type FulfillmentCreateV2Payload struct { 4068 // The created fulfillment. 4069 Fulfillment *Fulfillment `json:"fulfillment,omitempty"` 4070 // List of errors that occurred executing the mutation. 4071 UserErrors []*UserError `json:"userErrors,omitempty"` 4072 } 4073 4074 // An auto-generated type which holds one Fulfillment and a cursor during pagination. 4075 type FulfillmentEdge struct { 4076 // A cursor for use in pagination. 4077 Cursor null.String `json:"cursor,omitempty"` 4078 // The item at the end of FulfillmentEdge. 4079 Node *Fulfillment `json:"node,omitempty"` 4080 } 4081 4082 // An event that describes a fulfillment at a time. 4083 type FulfillmentEvent struct { 4084 // The time at which this fulfillment event happened. 4085 HappenedAt null.String `json:"happenedAt,omitempty"` 4086 // Globally unique identifier. 4087 ID null.String `json:"id,omitempty"` 4088 // The status of this fulfillment event. 4089 Status FulfillmentEventStatus `json:"status,omitempty"` 4090 } 4091 4092 func (FulfillmentEvent) IsNode() {} 4093 4094 // An auto-generated type for paginating through multiple FulfillmentEvents. 4095 type FulfillmentEventConnection struct { 4096 // A list of edges. 4097 Edges []*FulfillmentEventEdge `json:"edges,omitempty"` 4098 // Information to aid in pagination. 4099 PageInfo *PageInfo `json:"pageInfo,omitempty"` 4100 } 4101 4102 // An auto-generated type which holds one FulfillmentEvent and a cursor during pagination. 4103 type FulfillmentEventEdge struct { 4104 // A cursor for use in pagination. 4105 Cursor null.String `json:"cursor,omitempty"` 4106 // The item at the end of FulfillmentEventEdge. 4107 Node *FulfillmentEvent `json:"node,omitempty"` 4108 } 4109 4110 // The input fields used to create a fulfillment. 4111 type FulfillmentInput struct { 4112 // The ID of the order to be fulfilled. 4113 OrderID null.String `json:"orderId,omitempty"` 4114 // The line items to be fulfilled. 4115 LineItems []*FulfillmentLineItemInput `json:"lineItems,omitempty"` 4116 // Tracking numbers associated with the fulfillment. 4117 TrackingNumbers []null.String `json:"trackingNumbers,omitempty"` 4118 // The URLs to track the fulfillment. 4119 TrackingUrls []null.String `json:"trackingUrls,omitempty"` 4120 // The name of the tracking company. 4121 TrackingCompany *null.String `json:"trackingCompany,omitempty"` 4122 // Whether the customer is notified. 4123 // If set to true, a notification is sent when the fulfillment is created. 4124 NotifyCustomer *bool `json:"notifyCustomer,omitempty"` 4125 // A reference to the shipping method, such as `Free Shipping`. 4126 ShippingMethod *null.String `json:"shippingMethod,omitempty"` 4127 // The ID of the location from which the items will be fulfilled. 4128 LocationID null.String `json:"locationId,omitempty"` 4129 } 4130 4131 // Represents a line item from an order that's included in a fulfillment. 4132 type FulfillmentLineItem struct { 4133 // The total price after discounts are applied. 4134 DiscountedTotal null.String `json:"discountedTotal,omitempty"` 4135 // The total price after discounts are applied in shop and presentment currencies. 4136 DiscountedTotalSet *MoneyBag `json:"discountedTotalSet,omitempty"` 4137 // Globally unique identifier. 4138 ID null.String `json:"id,omitempty"` 4139 // The associated order's line item. 4140 LineItem *LineItem `json:"lineItem,omitempty"` 4141 // The total price before discounts are applied. 4142 OriginalTotal null.String `json:"originalTotal,omitempty"` 4143 // The total price before discounts are applied in shop and presentment currencies. 4144 OriginalTotalSet *MoneyBag `json:"originalTotalSet,omitempty"` 4145 // Number of line items in the fulfillment. 4146 Quantity *int `json:"quantity,omitempty"` 4147 } 4148 4149 func (FulfillmentLineItem) IsNode() {} 4150 4151 // An auto-generated type for paginating through multiple FulfillmentLineItems. 4152 type FulfillmentLineItemConnection struct { 4153 // A list of edges. 4154 Edges []*FulfillmentLineItemEdge `json:"edges,omitempty"` 4155 // Information to aid in pagination. 4156 PageInfo *PageInfo `json:"pageInfo,omitempty"` 4157 } 4158 4159 // An auto-generated type which holds one FulfillmentLineItem and a cursor during pagination. 4160 type FulfillmentLineItemEdge struct { 4161 // A cursor for use in pagination. 4162 Cursor null.String `json:"cursor,omitempty"` 4163 // The item at the end of FulfillmentLineItemEdge. 4164 Node *FulfillmentLineItem `json:"node,omitempty"` 4165 } 4166 4167 // The input fields used to include a line item from an order in a fulfillment. 4168 type FulfillmentLineItemInput struct { 4169 // The ID of the line item. 4170 ID null.String `json:"id,omitempty"` 4171 // The quantity of the line item to be fulfilled. 4172 Quantity *int `json:"quantity,omitempty"` 4173 } 4174 4175 // Represents a fulfillment order. In Shopify, a fulfillment order represents a group of one or more items 4176 // in an order that are to be fulfilled from the same location. There can be more than one fulfillment order 4177 // for an order at a given location. 4178 type FulfillmentOrder struct { 4179 // The fulfillment order's assigned location. This is the location expected to perform fulfillment. 4180 AssignedLocation *FulfillmentOrderAssignedLocation `json:"assignedLocation,omitempty"` 4181 // Delivery method of this fulfillment order. 4182 DeliveryMethod *DeliveryMethod `json:"deliveryMethod,omitempty"` 4183 // The destination where the items should be sent. 4184 Destination *FulfillmentOrderDestination `json:"destination,omitempty"` 4185 // The date and time at which the fulfillment order will be fulfillable. 4186 FulfillAt *null.String `json:"fulfillAt,omitempty"` 4187 // A list of fulfillments for the fulfillment order. 4188 Fulfillments *FulfillmentConnection `json:"fulfillments,omitempty"` 4189 // Globally unique identifier. 4190 ID null.String `json:"id,omitempty"` 4191 // A list of the fulfillment order's line items. 4192 LineItems *FulfillmentOrderLineItemConnection `json:"lineItems,omitempty"` 4193 // A list of locations that the fulfillment order can potentially move to. 4194 LocationsForMove *FulfillmentOrderLocationForMoveConnection `json:"locationsForMove,omitempty"` 4195 // A list of requests sent by the merchant to the fulfillment service for this fulfillment order. 4196 MerchantRequests *FulfillmentOrderMerchantRequestConnection `json:"merchantRequests,omitempty"` 4197 // The order that's associated with the fulfillment order. 4198 Order *Order `json:"order,omitempty"` 4199 // The request status of the fulfillment order. 4200 RequestStatus FulfillmentOrderRequestStatus `json:"requestStatus,omitempty"` 4201 // The status of the fulfillment order. 4202 Status FulfillmentOrderStatus `json:"status,omitempty"` 4203 // The actions that can be performed on this fulfillment order. 4204 SupportedActions []*FulfillmentOrderSupportedAction `json:"supportedActions,omitempty"` 4205 } 4206 4207 func (FulfillmentOrder) IsNode() {} 4208 4209 // Return type for `fulfillmentOrderAcceptCancellationRequest` mutation. 4210 type FulfillmentOrderAcceptCancellationRequestPayload struct { 4211 // The fulfillment order whose cancellation request was accepted. 4212 FulfillmentOrder *FulfillmentOrder `json:"fulfillmentOrder,omitempty"` 4213 // List of errors that occurred executing the mutation. 4214 UserErrors []*UserError `json:"userErrors,omitempty"` 4215 } 4216 4217 // Return type for `fulfillmentOrderAcceptFulfillmentRequest` mutation. 4218 type FulfillmentOrderAcceptFulfillmentRequestPayload struct { 4219 // The fulfillment order whose fulfillment request was accepted. 4220 FulfillmentOrder *FulfillmentOrder `json:"fulfillmentOrder,omitempty"` 4221 // List of errors that occurred executing the mutation. 4222 UserErrors []*UserError `json:"userErrors,omitempty"` 4223 } 4224 4225 // Represents the assigned location of a fulfillment order, which is a snapshot of the location 4226 // at which the fulfillment order was created. The assigned location is expected to perform fulfillment. 4227 type FulfillmentOrderAssignedLocation struct { 4228 // The first line of the address for the location. 4229 Address1 *null.String `json:"address1,omitempty"` 4230 // The second line of the address for the location. 4231 Address2 *null.String `json:"address2,omitempty"` 4232 // The city of the location. 4233 City *null.String `json:"city,omitempty"` 4234 // The two-letter country code of the location. 4235 CountryCode CountryCode `json:"countryCode,omitempty"` 4236 // The location where the fulfillment order was created. This can differ from the 4237 // `FulfillmentOrderAssignedLocation` if the location was updated since the fulfillment order 4238 // was closed. 4239 Location *Location `json:"location,omitempty"` 4240 // The name of the location. 4241 Name null.String `json:"name,omitempty"` 4242 // The phone number of the location. 4243 Phone *null.String `json:"phone,omitempty"` 4244 // The province of the location. 4245 Province *null.String `json:"province,omitempty"` 4246 // The ZIP code of the location. 4247 Zip *null.String `json:"zip,omitempty"` 4248 } 4249 4250 // Return type for `fulfillmentOrderCancel` mutation. 4251 type FulfillmentOrderCancelPayload struct { 4252 // The fulfillment order that was marked as canceled. 4253 FulfillmentOrder *FulfillmentOrder `json:"fulfillmentOrder,omitempty"` 4254 // The fulfillment order that was created to replace the canceled fulfillment order. 4255 ReplacementFulfillmentOrder *FulfillmentOrder `json:"replacementFulfillmentOrder,omitempty"` 4256 // List of errors that occurred executing the mutation. 4257 UserErrors []*UserError `json:"userErrors,omitempty"` 4258 } 4259 4260 // Return type for `fulfillmentOrderClose` mutation. 4261 type FulfillmentOrderClosePayload struct { 4262 // The fulfillment order that was marked as incomplete. 4263 FulfillmentOrder *FulfillmentOrder `json:"fulfillmentOrder,omitempty"` 4264 // List of errors that occurred executing the mutation. 4265 UserErrors []*UserError `json:"userErrors,omitempty"` 4266 } 4267 4268 // An auto-generated type for paginating through multiple FulfillmentOrders. 4269 type FulfillmentOrderConnection struct { 4270 // A list of edges. 4271 Edges []*FulfillmentOrderEdge `json:"edges,omitempty"` 4272 // Information to aid in pagination. 4273 PageInfo *PageInfo `json:"pageInfo,omitempty"` 4274 } 4275 4276 // Represents the destination where the items should be sent upon fulfillment. 4277 type FulfillmentOrderDestination struct { 4278 // The first line of the address of the destination. 4279 Address1 *null.String `json:"address1,omitempty"` 4280 // The second line of the address of the destination. 4281 Address2 *null.String `json:"address2,omitempty"` 4282 // The city of the destination. 4283 City *null.String `json:"city,omitempty"` 4284 // The company of the destination. 4285 Company *null.String `json:"company,omitempty"` 4286 // The two-letter country code of the destination. 4287 CountryCode *CountryCode `json:"countryCode,omitempty"` 4288 // The email of the customer at the destination. 4289 Email *null.String `json:"email,omitempty"` 4290 // The first name of the customer at the destination. 4291 FirstName *null.String `json:"firstName,omitempty"` 4292 // Globally unique identifier. 4293 ID null.String `json:"id,omitempty"` 4294 // The last name of the customer at the destination. 4295 LastName *null.String `json:"lastName,omitempty"` 4296 // The phone number of the customer at the destination. 4297 Phone *null.String `json:"phone,omitempty"` 4298 // The province of the destination. 4299 Province *null.String `json:"province,omitempty"` 4300 // The ZIP code of the destination. 4301 Zip *null.String `json:"zip,omitempty"` 4302 } 4303 4304 func (FulfillmentOrderDestination) IsNode() {} 4305 4306 // An auto-generated type which holds one FulfillmentOrder and a cursor during pagination. 4307 type FulfillmentOrderEdge struct { 4308 // A cursor for use in pagination. 4309 Cursor null.String `json:"cursor,omitempty"` 4310 // The item at the end of FulfillmentOrderEdge. 4311 Node *FulfillmentOrder `json:"node,omitempty"` 4312 } 4313 4314 // Represents a line item belonging to a fulfillment order. 4315 type FulfillmentOrderLineItem struct { 4316 // Globally unique identifier. 4317 ID null.String `json:"id,omitempty"` 4318 // The associated order line item. 4319 LineItem *LineItem `json:"lineItem,omitempty"` 4320 // The number of units remaining to be fulfilled. 4321 RemainingQuantity int `json:"remainingQuantity,omitempty"` 4322 // The total number of units to be fulfilled. 4323 TotalQuantity int `json:"totalQuantity,omitempty"` 4324 } 4325 4326 func (FulfillmentOrderLineItem) IsNode() {} 4327 4328 // An auto-generated type for paginating through multiple FulfillmentOrderLineItems. 4329 type FulfillmentOrderLineItemConnection struct { 4330 // A list of edges. 4331 Edges []*FulfillmentOrderLineItemEdge `json:"edges,omitempty"` 4332 // Information to aid in pagination. 4333 PageInfo *PageInfo `json:"pageInfo,omitempty"` 4334 } 4335 4336 // An auto-generated type which holds one FulfillmentOrderLineItem and a cursor during pagination. 4337 type FulfillmentOrderLineItemEdge struct { 4338 // A cursor for use in pagination. 4339 Cursor null.String `json:"cursor,omitempty"` 4340 // The item at the end of FulfillmentOrderLineItemEdge. 4341 Node *FulfillmentOrderLineItem `json:"node,omitempty"` 4342 } 4343 4344 // The input fields used to include a line item from a fulfillment order. 4345 type FulfillmentOrderLineItemInput struct { 4346 // The ID of the fulfillment order line item. 4347 ID null.String `json:"id,omitempty"` 4348 // The quantity of the fulfillment order line item. 4349 Quantity int `json:"quantity,omitempty"` 4350 } 4351 4352 // The input fields used to include the line items of a specified fulfillment order that should be fulfilled. 4353 type FulfillmentOrderLineItemsInput struct { 4354 // The ID of the fulfillment order. 4355 FulfillmentOrderID null.String `json:"fulfillmentOrderId,omitempty"` 4356 // The fulfillment order line items to be fulfilled. 4357 // If left blank, all line items of the fulfillment order will be fulfilled. 4358 FulfillmentOrderLineItems []*FulfillmentOrderLineItemInput `json:"fulfillmentOrderLineItems,omitempty"` 4359 } 4360 4361 // A location that a fulfillment order can potentially move to. 4362 type FulfillmentOrderLocationForMove struct { 4363 // The location being considered as the fulfillment order's new assigned location. 4364 Location *Location `json:"location,omitempty"` 4365 // A human-readable string with the reason why the fulfillment order, or some of its line items, can't be 4366 // moved to the location. 4367 Message *null.String `json:"message,omitempty"` 4368 // Whether the fulfillment order can be moved to the location. 4369 Movable bool `json:"movable,omitempty"` 4370 } 4371 4372 // An auto-generated type for paginating through multiple FulfillmentOrderLocationForMoves. 4373 type FulfillmentOrderLocationForMoveConnection struct { 4374 // A list of edges. 4375 Edges []*FulfillmentOrderLocationForMoveEdge `json:"edges,omitempty"` 4376 // Information to aid in pagination. 4377 PageInfo *PageInfo `json:"pageInfo,omitempty"` 4378 } 4379 4380 // An auto-generated type which holds one FulfillmentOrderLocationForMove and a cursor during pagination. 4381 type FulfillmentOrderLocationForMoveEdge struct { 4382 // A cursor for use in pagination. 4383 Cursor null.String `json:"cursor,omitempty"` 4384 // The item at the end of FulfillmentOrderLocationForMoveEdge. 4385 Node *FulfillmentOrderLocationForMove `json:"node,omitempty"` 4386 } 4387 4388 // Represents a request made by the merchant to a fulfillment service for a fulfillment order. 4389 type FulfillmentOrderMerchantRequest struct { 4390 // Globally unique identifier. 4391 ID null.String `json:"id,omitempty"` 4392 // The kind of request made. 4393 Kind FulfillmentOrderMerchantRequestKind `json:"kind,omitempty"` 4394 // The optional message that the merchant included in the request. 4395 Message *null.String `json:"message,omitempty"` 4396 // Additional options requested by the merchant. These depend on the `kind` of the request. 4397 // For example, for a `FULFILLMENT_REQUEST`, one option is `notify_customer`, which indicates whether the 4398 // merchant intends to notify the customer upon fulfillment. The fulfillment service can then set 4399 // `notifyCustomer` when making calls to `FulfillmentCreateV2`. 4400 RequestOptions *null.String `json:"requestOptions,omitempty"` 4401 // The response from the fulfillment service. 4402 ResponseData *null.String `json:"responseData,omitempty"` 4403 // The timestamp when the request was made. 4404 SentAt null.String `json:"sentAt,omitempty"` 4405 } 4406 4407 func (FulfillmentOrderMerchantRequest) IsNode() {} 4408 4409 // An auto-generated type for paginating through multiple FulfillmentOrderMerchantRequests. 4410 type FulfillmentOrderMerchantRequestConnection struct { 4411 // A list of edges. 4412 Edges []*FulfillmentOrderMerchantRequestEdge `json:"edges,omitempty"` 4413 // Information to aid in pagination. 4414 PageInfo *PageInfo `json:"pageInfo,omitempty"` 4415 } 4416 4417 // An auto-generated type which holds one FulfillmentOrderMerchantRequest and a cursor during pagination. 4418 type FulfillmentOrderMerchantRequestEdge struct { 4419 // A cursor for use in pagination. 4420 Cursor null.String `json:"cursor,omitempty"` 4421 // The item at the end of FulfillmentOrderMerchantRequestEdge. 4422 Node *FulfillmentOrderMerchantRequest `json:"node,omitempty"` 4423 } 4424 4425 // Return type for `fulfillmentOrderMove` mutation. 4426 type FulfillmentOrderMovePayload struct { 4427 // A new fulfillment order representing all items that were able to be moved to the new location. 4428 MovedFulfillmentOrder *FulfillmentOrder `json:"movedFulfillmentOrder,omitempty"` 4429 // The fulfillment order that was moved. On success, this fulfillment order will be closed. 4430 OriginalFulfillmentOrder *FulfillmentOrder `json:"originalFulfillmentOrder,omitempty"` 4431 // A new fulfillment order representing any items still assigned to the original location. 4432 // This is created if all line items on the original fulfillment order could not be moved to the new location 4433 // due to not being stocked there. 4434 RemainingFulfillmentOrder *FulfillmentOrder `json:"remainingFulfillmentOrder,omitempty"` 4435 // List of errors that occurred executing the mutation. 4436 UserErrors []*UserError `json:"userErrors,omitempty"` 4437 } 4438 4439 // Return type for `fulfillmentOrderOpen` mutation. 4440 type FulfillmentOrderOpenPayload struct { 4441 // The fulfillment order that was marked as open. 4442 FulfillmentOrder *FulfillmentOrder `json:"fulfillmentOrder,omitempty"` 4443 // List of errors that occurred executing the mutation. 4444 UserErrors []*UserError `json:"userErrors,omitempty"` 4445 } 4446 4447 // Return type for `fulfillmentOrderRejectCancellationRequest` mutation. 4448 type FulfillmentOrderRejectCancellationRequestPayload struct { 4449 // The fulfillment order whose cancellation request was rejected. 4450 FulfillmentOrder *FulfillmentOrder `json:"fulfillmentOrder,omitempty"` 4451 // List of errors that occurred executing the mutation. 4452 UserErrors []*UserError `json:"userErrors,omitempty"` 4453 } 4454 4455 // Return type for `fulfillmentOrderRejectFulfillmentRequest` mutation. 4456 type FulfillmentOrderRejectFulfillmentRequestPayload struct { 4457 // The fulfillment order whose fulfillment request was rejected. 4458 FulfillmentOrder *FulfillmentOrder `json:"fulfillmentOrder,omitempty"` 4459 // List of errors that occurred executing the mutation. 4460 UserErrors []*UserError `json:"userErrors,omitempty"` 4461 } 4462 4463 // Return type for `fulfillmentOrderReschedule` mutation. 4464 type FulfillmentOrderReschedulePayload struct { 4465 // The fulfillment order that was updated to the new fulfill at date. 4466 FulfillmentOrder *FulfillmentOrder `json:"fulfillmentOrder,omitempty"` 4467 // List of errors that occurred executing the mutation. 4468 UserErrors []*FulfillmentOrderRescheduleUserError `json:"userErrors,omitempty"` 4469 } 4470 4471 // An error that occurs during the execution of FulfillmentOrderReschedule. 4472 type FulfillmentOrderRescheduleUserError struct { 4473 // Error code to uniquely identify the error. 4474 Code *FulfillmentOrderRescheduleUserErrorCode `json:"code,omitempty"` 4475 // Path to the input field which caused the error. 4476 Field []null.String `json:"field,omitempty"` 4477 // The error message. 4478 Message null.String `json:"message,omitempty"` 4479 } 4480 4481 func (FulfillmentOrderRescheduleUserError) IsDisplayableError() {} 4482 4483 // Return type for `fulfillmentOrderSubmitCancellationRequest` mutation. 4484 type FulfillmentOrderSubmitCancellationRequestPayload struct { 4485 // The fulfillment order whose cancellation was requested. 4486 FulfillmentOrder *FulfillmentOrder `json:"fulfillmentOrder,omitempty"` 4487 // List of errors that occurred executing the mutation. 4488 UserErrors []*UserError `json:"userErrors,omitempty"` 4489 } 4490 4491 // Return type for `fulfillmentOrderSubmitFulfillmentRequest` mutation. 4492 type FulfillmentOrderSubmitFulfillmentRequestPayload struct { 4493 // The original fulfillment order intended to request fulfillment for. 4494 OriginalFulfillmentOrder *FulfillmentOrder `json:"originalFulfillmentOrder,omitempty"` 4495 // The fulfillment order that was submitted to the fulfillment service. This will be the same as 4496 // the original fulfillment order field. The exception to this is partial fulfillment requests or 4497 // fulfillment request for cancelled or incomplete fulfillment orders. 4498 SubmittedFulfillmentOrder *FulfillmentOrder `json:"submittedFulfillmentOrder,omitempty"` 4499 // This field will only be present for partial fulfillment requests. This will represent the new 4500 // fulfillment order with the remaining line items not submitted to the fulfillment service. 4501 UnsubmittedFulfillmentOrder *FulfillmentOrder `json:"unsubmittedFulfillmentOrder,omitempty"` 4502 // List of errors that occurred executing the mutation. 4503 UserErrors []*UserError `json:"userErrors,omitempty"` 4504 } 4505 4506 // Represents one of the methods that the fulfillment order supports. 4507 type FulfillmentOrderSupportedAction struct { 4508 // The action value. 4509 Action FulfillmentOrderAction `json:"action,omitempty"` 4510 // The external URL to be used to initiate the fulfillment process outside Shopify. 4511 ExternalURL *null.String `json:"externalUrl,omitempty"` 4512 } 4513 4514 // Represents a fulfillment service. A fulfillment service is a third-party service that prepares and ships orders on behalf of the store owner. 4515 type FulfillmentService struct { 4516 // The callback URL the fulfillment service has registered for requests. 4517 CallbackURL *null.String `json:"callbackUrl,omitempty"` 4518 // Whether the fulfillment service has opted into fulfillment order based requests. 4519 FulfillmentOrdersOptIn bool `json:"fulfillmentOrdersOptIn,omitempty"` 4520 // Human-readable unique identifier for this fulfillment service. 4521 Handle null.String `json:"handle,omitempty"` 4522 // The ID of the fulfillment service. 4523 ID null.String `json:"id,omitempty"` 4524 // Whether the fulfillment service tracks product inventory and provides updates to Shopify. 4525 InventoryManagement bool `json:"inventoryManagement,omitempty"` 4526 // Location associated with the fulfillment service. 4527 // Location *Location `json:"location,omitempty"` 4528 // Whether the fulfillment service supports local deliveries. 4529 ProductBased bool `json:"productBased,omitempty"` 4530 // The name of the fulfillment service as seen by merchants. 4531 ServiceName null.String `json:"serviceName,omitempty"` 4532 // Shipping methods associated with the fulfillment service provider. 4533 ShippingMethods []*ShippingMethod `json:"shippingMethods,omitempty"` 4534 // Type associated with the fulfillment service. 4535 Type FulfillmentServiceType `json:"type,omitempty"` 4536 } 4537 4538 // Return type for `fulfillmentServiceCreate` mutation. 4539 type FulfillmentServiceCreatePayload struct { 4540 // The created fulfillment service. 4541 FulfillmentService *FulfillmentService `json:"fulfillmentService,omitempty"` 4542 // List of errors that occurred executing the mutation. 4543 UserErrors []*UserError `json:"userErrors,omitempty"` 4544 } 4545 4546 // Return type for `fulfillmentServiceDelete` mutation. 4547 type FulfillmentServiceDeletePayload struct { 4548 // The ID of the deleted fulfillment service. 4549 DeletedID *null.String `json:"deletedId,omitempty"` 4550 // List of errors that occurred executing the mutation. 4551 UserErrors []*UserError `json:"userErrors,omitempty"` 4552 } 4553 4554 // Return type for `fulfillmentServiceUpdate` mutation. 4555 type FulfillmentServiceUpdatePayload struct { 4556 // The updated fulfillment service. 4557 FulfillmentService *FulfillmentService `json:"fulfillmentService,omitempty"` 4558 // List of errors that occurred executing the mutation. 4559 UserErrors []*UserError `json:"userErrors,omitempty"` 4560 } 4561 4562 // Represents the tracking information for a fulfillment. 4563 type FulfillmentTrackingInfo struct { 4564 // The name of the tracking company. 4565 Company *null.String `json:"company,omitempty"` 4566 // The tracking number of the fulfillment. 4567 Number *null.String `json:"number,omitempty"` 4568 // The URLs to track the fulfillment. 4569 URL *null.String `json:"url,omitempty"` 4570 } 4571 4572 // Return type for `fulfillmentTrackingInfoUpdate` mutation. 4573 type FulfillmentTrackingInfoUpdatePayload struct { 4574 // The updated fulfillment with tracking information. 4575 Fulfillment *Fulfillment `json:"fulfillment,omitempty"` 4576 // List of errors that occurred executing the mutation. 4577 UserErrors []*UserError `json:"userErrors,omitempty"` 4578 } 4579 4580 // Return type for `fulfillmentTrackingInfoUpdateV2` mutation. 4581 type FulfillmentTrackingInfoUpdateV2Payload struct { 4582 // The updated fulfillment with tracking information. 4583 Fulfillment *Fulfillment `json:"fulfillment,omitempty"` 4584 // List of errors that occurred executing the mutation. 4585 UserErrors []*UserError `json:"userErrors,omitempty"` 4586 } 4587 4588 // The input fields used to specify all possible fields for tracking information. 4589 type FulfillmentTrackingInput struct { 4590 // The tracking number of the fulfillment. 4591 Number *null.String `json:"number,omitempty"` 4592 // The URL to track the fulfillment. 4593 URL *null.String `json:"url,omitempty"` 4594 // The name of the tracking company. 4595 Company *null.String `json:"company,omitempty"` 4596 } 4597 4598 // The input fields used to create a fulfillment from fulfillment orders. 4599 type FulfillmentV2Input struct { 4600 // The fulfillment's tracking information, including a tracking URL, a tracking number, 4601 // and the company associated with the fulfillment. 4602 TrackingInfo *FulfillmentTrackingInput `json:"trackingInfo,omitempty"` 4603 // Whether the customer is notified. 4604 // If set to true, a notification is sent when the fulfillment is created. 4605 NotifyCustomer *bool `json:"notifyCustomer,omitempty"` 4606 // Pairs of `fulfillment_order_id` and `fulfillment_order_line_items` that represent the fulfillment 4607 // order line items that have to be fulfilled for each fulfillment order. For any given pair, if the 4608 // fulfillment order line items are left blank then all the fulfillment order line items of the 4609 // associated fulfillment order ID will be fulfilled. 4610 LineItemsByFulfillmentOrder []*FulfillmentOrderLineItemsInput `json:"lineItemsByFulfillmentOrder,omitempty"` 4611 } 4612 4613 // Represents an image resource. 4614 type Image struct { 4615 // A word or phrase to share the nature or contents of an image. 4616 AltText *null.String `json:"altText,omitempty"` 4617 // The original height of the image in pixels. Returns `null` if the image is not hosted by Shopify. 4618 Height *int `json:"height,omitempty"` 4619 // A unique identifier for the image. 4620 ID *null.String `json:"id,omitempty"` 4621 // The metafield associated with the resource. 4622 Metafield *Metafield `json:"metafield,omitempty"` 4623 // A paginated list of metafields associated with the resource. 4624 Metafields *MetafieldConnection `json:"metafields,omitempty"` 4625 // The location of the original image as a URL. 4626 // 4627 // If there are any existing transformations in the original source URL, they will remain and not be stripped. 4628 OriginalSrc null.String `json:"originalSrc,omitempty"` 4629 // Returns a private metafield found by namespace and key. 4630 PrivateMetafield *PrivateMetafield `json:"privateMetafield,omitempty"` 4631 // List of private metafields. 4632 PrivateMetafields *PrivateMetafieldConnection `json:"privateMetafields,omitempty"` 4633 // The location of the image as a URL. 4634 Src null.String `json:"src,omitempty"` 4635 // The location of the transformed image as a URL. 4636 // 4637 // All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. 4638 // Otherwise any transformations which an image type does not support will be ignored. 4639 TransformedSrc null.String `json:"transformedSrc,omitempty"` 4640 // The original width of the image in pixels. Returns `null` if the image is not hosted by Shopify. 4641 Width *int `json:"width,omitempty"` 4642 } 4643 4644 func (Image) IsHasMetafields() {} 4645 4646 // An auto-generated type for paginating through multiple Images. 4647 type ImageConnection struct { 4648 // A list of edges. 4649 Edges []*ImageEdge `json:"edges,omitempty"` 4650 // Information to aid in pagination. 4651 PageInfo *PageInfo `json:"pageInfo,omitempty"` 4652 } 4653 4654 // An auto-generated type which holds one Image and a cursor during pagination. 4655 type ImageEdge struct { 4656 // A cursor for use in pagination. 4657 Cursor null.String `json:"cursor,omitempty"` 4658 // The item at the end of ImageEdge. 4659 Node *Image `json:"node,omitempty"` 4660 } 4661 4662 // Specifies the input fields for an image. 4663 type ImageInput struct { 4664 // Globally unique identifier. 4665 ID *null.String `json:"id,omitempty"` 4666 // A word or phrase to share the nature or contents of an image. 4667 AltText *null.String `json:"altText,omitempty"` 4668 // The URL of the image. May be a signed upload URL. 4669 Src *null.String `json:"src,omitempty"` 4670 } 4671 4672 // Upload parameter of an image. 4673 type ImageUploadParameter struct { 4674 // Parameter name. 4675 Name null.String `json:"name,omitempty"` 4676 // Parameter value. 4677 Value null.String `json:"value,omitempty"` 4678 } 4679 4680 // Return type for `inventoryActivate` mutation. 4681 type InventoryActivatePayload struct { 4682 // The newly activated inventory level. 4683 InventoryLevel *InventoryLevel `json:"inventoryLevel,omitempty"` 4684 // List of errors that occurred executing the mutation. 4685 UserErrors []*UserError `json:"userErrors,omitempty"` 4686 } 4687 4688 // Specifies the items and their adjustments. 4689 type InventoryAdjustItemInput struct { 4690 // ID of the inventory item to adjust. 4691 InventoryItemID null.String `json:"inventoryItemId,omitempty"` 4692 // Count by which to adjust the available quantity. 4693 AvailableDelta int `json:"availableDelta,omitempty"` 4694 } 4695 4696 // Specifies the fields required to adjust the inventory quantity. 4697 type InventoryAdjustQuantityInput struct { 4698 // ID of the inventory level to adjust. 4699 InventoryLevelID null.String `json:"inventoryLevelId,omitempty"` 4700 // Count by which to adjust the available quantity. 4701 AvailableDelta int `json:"availableDelta,omitempty"` 4702 } 4703 4704 // Return type for `inventoryAdjustQuantity` mutation. 4705 type InventoryAdjustQuantityPayload struct { 4706 // Represents the updated inventory quantity of an inventory item at a specific location. 4707 InventoryLevel *InventoryLevel `json:"inventoryLevel,omitempty"` 4708 // List of errors that occurred executing the mutation. 4709 UserErrors []*UserError `json:"userErrors,omitempty"` 4710 } 4711 4712 // Return type for `inventoryBulkAdjustQuantityAtLocation` mutation. 4713 type InventoryBulkAdjustQuantityAtLocationPayload struct { 4714 // The updated inventory quantities. 4715 InventoryLevels []*InventoryLevel `json:"inventoryLevels,omitempty"` 4716 // List of errors that occurred executing the mutation. 4717 UserErrors []*UserError `json:"userErrors,omitempty"` 4718 } 4719 4720 // Return type for `inventoryDeactivate` mutation. 4721 type InventoryDeactivatePayload struct { 4722 // List of errors that occurred executing the mutation. 4723 UserErrors []*UserError `json:"userErrors,omitempty"` 4724 } 4725 4726 // Represents the goods available to be shipped to a customer. 4727 // It holds essential information about the goods, including SKU and whether it is tracked. 4728 type InventoryItem struct { 4729 // The ISO code of the country of origin. 4730 CountryCodeOfOrigin *CountryCode `json:"countryCodeOfOrigin,omitempty"` 4731 // List of country specific harmonized system codes. 4732 CountryHarmonizedSystemCodes *CountryHarmonizedSystemCodeConnection `json:"countryHarmonizedSystemCodes,omitempty"` 4733 // The date and time when the inventory item was created. 4734 CreatedAt null.String `json:"createdAt,omitempty"` 4735 // The number of inventory items that share the same SKU with this item. 4736 DuplicateSkuCount int `json:"duplicateSkuCount,omitempty"` 4737 // The harmonized system code of the item. 4738 HarmonizedSystemCode *null.String `json:"harmonizedSystemCode,omitempty"` 4739 // Globally unique identifier. 4740 ID null.String `json:"id,omitempty"` 4741 // URL for inventory history web page. 4742 InventoryHistoryURL *null.String `json:"inventoryHistoryUrl,omitempty"` 4743 // Get the inventory level at a specific location. 4744 InventoryLevel *InventoryLevel `json:"inventoryLevel,omitempty"` 4745 // Paginated list of inventory levels for each location that the inventory item is stocked at. 4746 InventoryLevels *InventoryLevelConnection `json:"inventoryLevels,omitempty"` 4747 // The ID of the corresponding resource in the REST Admin API. 4748 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 4749 // The number of locations where this inventory item is stocked. 4750 LocationsCount int `json:"locationsCount,omitempty"` 4751 // The ISO code of the province of origin. 4752 ProvinceCodeOfOrigin *null.String `json:"provinceCodeOfOrigin,omitempty"` 4753 // Whether the item requires shipping or not. 4754 RequiresShipping bool `json:"requiresShipping,omitempty"` 4755 // Inventory item SKU. 4756 Sku *null.String `json:"sku,omitempty"` 4757 // Whether the inventory quantities of inventory levels for the item are tracked or not. 4758 Tracked bool `json:"tracked,omitempty"` 4759 // Whether changes to the inventory item tracked attribute are allowed. 4760 TrackedEditable *EditableProperty `json:"trackedEditable,omitempty"` 4761 // Unit cost associated with the inventory item. 4762 UnitCost *MoneyV2 `json:"unitCost,omitempty"` 4763 // The date and time when the inventory item was updated. 4764 UpdatedAt null.String `json:"updatedAt,omitempty"` 4765 // The variant that owns this inventory item. 4766 Variant *ProductVariant `json:"variant,omitempty"` 4767 } 4768 4769 func (InventoryItem) IsNode() {} 4770 func (InventoryItem) IsLegacyInteroperability() {} 4771 4772 // An auto-generated type for paginating through multiple InventoryItems. 4773 type InventoryItemConnection struct { 4774 // A list of edges. 4775 Edges []*InventoryItemEdge `json:"edges,omitempty"` 4776 // Information to aid in pagination. 4777 PageInfo *PageInfo `json:"pageInfo,omitempty"` 4778 } 4779 4780 // An auto-generated type which holds one InventoryItem and a cursor during pagination. 4781 type InventoryItemEdge struct { 4782 // A cursor for use in pagination. 4783 Cursor null.String `json:"cursor,omitempty"` 4784 // The item at the end of InventoryItemEdge. 4785 Node *InventoryItem `json:"node,omitempty"` 4786 } 4787 4788 // Inventory items. 4789 type InventoryItemInput struct { 4790 // Unit cost associated with the inventory item, the currency is the shop's default currency. 4791 Cost *null.String `json:"cost,omitempty"` 4792 // Whether the inventory item is tracked. 4793 Tracked *bool `json:"tracked,omitempty"` 4794 } 4795 4796 // Inventory items. 4797 type InventoryItemUpdateInput struct { 4798 // Unit cost associated with the inventory item, the currency is the shop's default currency. 4799 Cost *null.String `json:"cost,omitempty"` 4800 // Whether the inventory item is tracked. 4801 Tracked *bool `json:"tracked,omitempty"` 4802 // The ISO code of the country of origin. 4803 CountryCodeOfOrigin *CountryCode `json:"countryCodeOfOrigin,omitempty"` 4804 // The ISO code of the province of origin. 4805 ProvinceCodeOfOrigin *null.String `json:"provinceCodeOfOrigin,omitempty"` 4806 // The harmonized system code of the inventory item. 4807 HarmonizedSystemCode *null.String `json:"harmonizedSystemCode,omitempty"` 4808 // List of country-specific harmonized system codes. 4809 CountryHarmonizedSystemCodes []*CountryHarmonizedSystemCodeInput `json:"countryHarmonizedSystemCodes,omitempty"` 4810 } 4811 4812 // Return type for `inventoryItemUpdate` mutation. 4813 type InventoryItemUpdatePayload struct { 4814 // The updated inventory item. 4815 InventoryItem *InventoryItem `json:"inventoryItem,omitempty"` 4816 // List of errors that occurred executing the mutation. 4817 UserErrors []*UserError `json:"userErrors,omitempty"` 4818 } 4819 4820 // Represents the inventory quantity of an inventory item at a specific location. 4821 type InventoryLevel struct { 4822 // Quantity of items available at the location. 4823 Available int `json:"available,omitempty"` 4824 // Whether inventoryDeactivate is allowed for this inventory level. 4825 CanDeactivate bool `json:"canDeactivate,omitempty"` 4826 // The date and time when the inventory level was created. 4827 CreatedAt null.String `json:"createdAt,omitempty"` 4828 // Reason why canDeactivate is false, or impact of deactivating the inventory level. 4829 DeactivationAlert *null.String `json:"deactivationAlert,omitempty"` 4830 // Reason why canDeactivate is false with URLs linked in HTML, or impact of deactivating the inventory level. 4831 DeactivationAlertHTML *null.String `json:"deactivationAlertHtml,omitempty"` 4832 // Globally unique identifier. 4833 ID null.String `json:"id,omitempty"` 4834 // Quantity of items incoming to the location. 4835 Incoming int `json:"incoming,omitempty"` 4836 // Inventory item associated with the inventory level. 4837 // Item *InventoryItem `json:"item,omitempty"` 4838 // Location associated with the inventory level. 4839 Location *Location `json:"location,omitempty"` 4840 // The date and time when the inventory level was updated. 4841 UpdatedAt null.String `json:"updatedAt,omitempty"` 4842 } 4843 4844 func (InventoryLevel) IsNode() {} 4845 4846 // An auto-generated type for paginating through multiple InventoryLevels. 4847 type InventoryLevelConnection struct { 4848 // A list of edges. 4849 Edges []*InventoryLevelEdge `json:"edges,omitempty"` 4850 // Information to aid in pagination. 4851 PageInfo *PageInfo `json:"pageInfo,omitempty"` 4852 } 4853 4854 // An auto-generated type which holds one InventoryLevel and a cursor during pagination. 4855 type InventoryLevelEdge struct { 4856 // A cursor for use in pagination. 4857 Cursor null.String `json:"cursor,omitempty"` 4858 // The item at the end of InventoryLevelEdge. 4859 Node *InventoryLevel `json:"node,omitempty"` 4860 } 4861 4862 // Inventory quantity at a specific location. 4863 type InventoryLevelInput struct { 4864 // Sets the quantity available at the location. 4865 AvailableQuantity int `json:"availableQuantity,omitempty"` 4866 // ID of the location. 4867 LocationID null.String `json:"locationId,omitempty"` 4868 } 4869 4870 // A job corresponds to some long running task that the client should poll for status. 4871 type Job struct { 4872 // This indicates if the job is still queued or has been run. 4873 Done bool `json:"done,omitempty"` 4874 // Globally unique identifier. 4875 ID null.String `json:"id,omitempty"` 4876 } 4877 4878 // Return type for `kitSkillTriggerRequest` mutation. 4879 type KitSkillTriggerRequestPayload struct { 4880 // Conversation unique identifier sent to Conversation API and returned to app developer. 4881 ConversationUID *null.String `json:"conversationUid,omitempty"` 4882 // List of errors that occurred executing the mutation. 4883 UserErrors []*UserError `json:"userErrors,omitempty"` 4884 } 4885 4886 // The total number of pending orders on a shop if less then a maximum, or that maximum. 4887 // The atMax field indicates when this maximum has been reached. 4888 type LimitedPendingOrderCount struct { 4889 // This is set when the number of pending orders has reached the maximum. 4890 AtMax bool `json:"atMax,omitempty"` 4891 // The number of pendings orders on the shop. 4892 // Limited to a maximum of 10000. 4893 Count int `json:"count,omitempty"` 4894 } 4895 4896 // Represents a single line in a shopping cart. 4897 type LineItem struct { 4898 // Whether the line item's variant has an ID and inventory is managed by Shopify. 4899 CanRestock bool `json:"canRestock,omitempty"` 4900 // The subscription contract associated with this line item. 4901 // Contract *SubscriptionContract `json:"contract,omitempty"` 4902 // The line item's quantity minus the removed quantity. 4903 CurrentQuantity int `json:"currentQuantity,omitempty"` 4904 // List of additional information (metafields) about the line item. 4905 CustomAttributes []*Attribute `json:"customAttributes,omitempty"` 4906 // The discounts that have been allocated onto the line item by discount applications. 4907 DiscountAllocations []*DiscountAllocation `json:"discountAllocations,omitempty"` 4908 // The total line price after discounts are applied. 4909 DiscountedTotal null.String `json:"discountedTotal,omitempty"` 4910 // The total line price after discounts are applied in shop and presentment currencies. 4911 DiscountedTotalSet *MoneyBag `json:"discountedTotalSet,omitempty"` 4912 // The price of a single variant unit after line item discounts are applied. 4913 DiscountedUnitPrice null.String `json:"discountedUnitPrice,omitempty"` 4914 // The price of a single variant unit after line item discounts are applied in shop and presentment currencies. 4915 DiscountedUnitPriceSet *MoneyBag `json:"discountedUnitPriceSet,omitempty"` 4916 // The duties associated with the line item. 4917 Duties []*Duty `json:"duties,omitempty"` 4918 // The total number of units to fulfill. 4919 FulfillableQuantity int `json:"fulfillableQuantity,omitempty"` 4920 // Name of the service provider who fulfilled the order. 4921 // 4922 // Valid values are either **manual** or the name of the provider. 4923 // For example, **amazon**, **shipwire**. 4924 FulfillmentService *FulfillmentService `json:"fulfillmentService,omitempty"` 4925 // The line item's fulfillment status. Returns 'fulfilled' if fulfillableQuantity >= quantity, 4926 // 'partial' if fulfillableQuantity > 0, and 'unfulfilled' otherwise. 4927 FulfillmentStatus null.String `json:"fulfillmentStatus,omitempty"` 4928 // Globally unique identifier. 4929 ID null.String `json:"id,omitempty"` 4930 // The Image object associated to the line item's variant. 4931 Image *Image `json:"image,omitempty"` 4932 // Whether the line item can be edited or not. 4933 MerchantEditable bool `json:"merchantEditable,omitempty"` 4934 // Name of the product. 4935 Name null.String `json:"name,omitempty"` 4936 // A count of the number of line items that cannot be fulfilled. 4937 NonFulfillableQuantity int `json:"nonFulfillableQuantity,omitempty"` 4938 // Total price (without discounts) of the line item, based on the original unit price of the variant x quantity. 4939 OriginalTotal null.String `json:"originalTotal,omitempty"` 4940 // Total price (without discounts) of the line item, based on the original unit price of the variant x quantity in shop and presentment currencies. 4941 OriginalTotalSet *MoneyBag `json:"originalTotalSet,omitempty"` 4942 // Variant price without any discounts applied. 4943 OriginalUnitPrice null.String `json:"originalUnitPrice,omitempty"` 4944 // Variant price without any discounts applied in shop and presentment currencies. 4945 OriginalUnitPriceSet *MoneyBag `json:"originalUnitPriceSet,omitempty"` 4946 // The Product object associated with this line item's variant. 4947 Product *Product `json:"product,omitempty"` 4948 // The number of variant items ordered. 4949 Quantity int `json:"quantity,omitempty"` 4950 // The line item's quantity minus its refundedQuantity. 4951 RefundableQuantity int `json:"refundableQuantity,omitempty"` 4952 // Whether physical shipping is required for the variant. 4953 RequiresShipping bool `json:"requiresShipping,omitempty"` 4954 // Whether the line item's variant has an ID and inventory is managed by Shopify. 4955 Restockable bool `json:"restockable,omitempty"` 4956 // The selling plan details associated with the line item. 4957 SellingPlan *LineItemSellingPlan `json:"sellingPlan,omitempty"` 4958 // Variant SKU number. 4959 Sku *null.String `json:"sku,omitempty"` 4960 // The TaxLine object connected to this line item. 4961 TaxLines []*TaxLine `json:"taxLines,omitempty"` 4962 // Whether the variant is taxable. 4963 Taxable bool `json:"taxable,omitempty"` 4964 // Title of the product or variant (this field only applies to custom line items). 4965 Title null.String `json:"title,omitempty"` 4966 // The sum of all AppliedDiscounts on this line item. 4967 TotalDiscount null.String `json:"totalDiscount,omitempty"` 4968 // The sum of all AppliedDiscounts on this line item in shop and presentment currencies. 4969 TotalDiscountSet *MoneyBag `json:"totalDiscountSet,omitempty"` 4970 // The total discounted value of unfulfilled units. 4971 UnfulfilledDiscountedTotal null.String `json:"unfulfilledDiscountedTotal,omitempty"` 4972 // The total discounted value of unfulfilled units in shop and presentment currencies. 4973 UnfulfilledDiscountedTotalSet *MoneyBag `json:"unfulfilledDiscountedTotalSet,omitempty"` 4974 // The total value before discount of all unfulfilled units. 4975 UnfulfilledOriginalTotal null.String `json:"unfulfilledOriginalTotal,omitempty"` 4976 // The total value before discount of all unfulfilled units in shop and presentment currencies. 4977 UnfulfilledOriginalTotalSet *MoneyBag `json:"unfulfilledOriginalTotalSet,omitempty"` 4978 // The number of units not yet fulfilled. 4979 UnfulfilledQuantity int `json:"unfulfilledQuantity,omitempty"` 4980 // The Variant object associated with this line item. 4981 Variant *ProductVariant `json:"variant,omitempty"` 4982 // Name of the variant. 4983 VariantTitle *null.String `json:"variantTitle,omitempty"` 4984 // Name of the vendor who made the variant. 4985 Vendor *null.String `json:"vendor,omitempty"` 4986 } 4987 4988 func (LineItem) IsNode() {} 4989 4990 // An auto-generated type for paginating through multiple LineItems. 4991 type LineItemConnection struct { 4992 // A list of edges. 4993 Edges []*LineItemEdge `json:"edges,omitempty"` 4994 // Information to aid in pagination. 4995 PageInfo *PageInfo `json:"pageInfo,omitempty"` 4996 } 4997 4998 // An auto-generated type which holds one LineItem and a cursor during pagination. 4999 type LineItemEdge struct { 5000 // A cursor for use in pagination. 5001 Cursor null.String `json:"cursor,omitempty"` 5002 // The item at the end of LineItemEdge. 5003 Node *LineItem `json:"node,omitempty"` 5004 } 5005 5006 // Represents a single line in a shopping cart. 5007 type LineItemMutable struct { 5008 // Whether the line item's variant has an ID and inventory is managed by Shopify. 5009 CanRestock bool `json:"canRestock,omitempty"` 5010 // List of additional information (metafields) about the line item. 5011 CustomAttributes []*Attribute `json:"customAttributes,omitempty"` 5012 // The discounts that have been allocated onto the line item by discount applications. 5013 DiscountAllocations []*DiscountAllocation `json:"discountAllocations,omitempty"` 5014 // The total line price after discounts are applied. 5015 DiscountedTotal null.String `json:"discountedTotal,omitempty"` 5016 // The total line price after discounts are applied in shop and presentment currencies. 5017 DiscountedTotalSet *MoneyBag `json:"discountedTotalSet,omitempty"` 5018 // The price of a single variant unit after line item discounts are applied. 5019 DiscountedUnitPrice null.String `json:"discountedUnitPrice,omitempty"` 5020 // The price of a single variant unit after line item discounts are applied in shop and presentment currencies. 5021 DiscountedUnitPriceSet *MoneyBag `json:"discountedUnitPriceSet,omitempty"` 5022 // The total number of units to fulfill. 5023 FulfillableQuantity int `json:"fulfillableQuantity,omitempty"` 5024 // Name of the service provider who fulfilled the order. 5025 // 5026 // Valid values are either **manual** or the name of the provider. 5027 // For example, **amazon**, **shipwire**. 5028 FulfillmentService *FulfillmentService `json:"fulfillmentService,omitempty"` 5029 // The line item's fulfillment status. Returns 'fulfilled' if fulfillableQuantity >= quantity, 5030 // 'partial' if fulfillableQuantity > 0, and 'unfulfilled' otherwise. 5031 FulfillmentStatus null.String `json:"fulfillmentStatus,omitempty"` 5032 // Globally unique identifier. 5033 ID null.String `json:"id,omitempty"` 5034 // The Image object associated to the line item's variant. 5035 Image *Image `json:"image,omitempty"` 5036 // Whether the line item can be edited or not. 5037 MerchantEditable bool `json:"merchantEditable,omitempty"` 5038 // Name of the product. 5039 Name null.String `json:"name,omitempty"` 5040 // A count of the number of line items that cannot be fulfilled. 5041 NonFulfillableQuantity int `json:"nonFulfillableQuantity,omitempty"` 5042 // Total price (without discounts) of the line item, based on the original unit price of the variant x quantity. 5043 OriginalTotal null.String `json:"originalTotal,omitempty"` 5044 // Total price (without discounts) of the line item, based on the original unit price of the variant x quantity in shop and presentment currencies. 5045 OriginalTotalSet *MoneyBag `json:"originalTotalSet,omitempty"` 5046 // Variant price without any discounts applied. 5047 OriginalUnitPrice null.String `json:"originalUnitPrice,omitempty"` 5048 // Variant price without any discounts applied in shop and presentment currencies. 5049 OriginalUnitPriceSet *MoneyBag `json:"originalUnitPriceSet,omitempty"` 5050 // The Product object associated with this line item's variant. 5051 Product *Product `json:"product,omitempty"` 5052 // Number of variant items ordered. 5053 Quantity int `json:"quantity,omitempty"` 5054 // The line item's quantity minus its refundedQuantity. 5055 RefundableQuantity int `json:"refundableQuantity,omitempty"` 5056 // Whether physical shipping is required for the variant. 5057 RequiresShipping bool `json:"requiresShipping,omitempty"` 5058 // Whether the line item's variant has an ID and inventory is managed by Shopify. 5059 Restockable bool `json:"restockable,omitempty"` 5060 // Variant SKU number. 5061 Sku *null.String `json:"sku,omitempty"` 5062 // The TaxLine object connected to this line item. 5063 TaxLines []*TaxLine `json:"taxLines,omitempty"` 5064 // Whether the variant is taxable. 5065 Taxable bool `json:"taxable,omitempty"` 5066 // Title of the product or variant (this field only applies to custom line items). 5067 Title null.String `json:"title,omitempty"` 5068 // The sum of all AppliedDiscounts on this line item. 5069 TotalDiscount null.String `json:"totalDiscount,omitempty"` 5070 // The sum of all AppliedDiscounts on this line item in shop and presentment currencies. 5071 TotalDiscountSet *MoneyBag `json:"totalDiscountSet,omitempty"` 5072 // The total discounted value of unfulfilled units. 5073 UnfulfilledDiscountedTotal null.String `json:"unfulfilledDiscountedTotal,omitempty"` 5074 // The total discounted value of unfulfilled units in shop and presentment currencies. 5075 UnfulfilledDiscountedTotalSet *MoneyBag `json:"unfulfilledDiscountedTotalSet,omitempty"` 5076 // The total value before discount of all unfulfilled units. 5077 UnfulfilledOriginalTotal null.String `json:"unfulfilledOriginalTotal,omitempty"` 5078 // The total value before discount of all unfulfilled units in shop and presentment currencies. 5079 UnfulfilledOriginalTotalSet *MoneyBag `json:"unfulfilledOriginalTotalSet,omitempty"` 5080 // The number of units not yet fulfilled. 5081 UnfulfilledQuantity int `json:"unfulfilledQuantity,omitempty"` 5082 // The Variant object associated with this line item. 5083 Variant *ProductVariant `json:"variant,omitempty"` 5084 // Name of the variant. 5085 VariantTitle *null.String `json:"variantTitle,omitempty"` 5086 // Name of the vendor who made the variant. 5087 Vendor *null.String `json:"vendor,omitempty"` 5088 } 5089 5090 func (LineItemMutable) IsNode() {} 5091 5092 // An auto-generated type for paginating through multiple LineItemMutables. 5093 type LineItemMutableConnection struct { 5094 // A list of edges. 5095 Edges []*LineItemMutableEdge `json:"edges,omitempty"` 5096 // Information to aid in pagination. 5097 PageInfo *PageInfo `json:"pageInfo,omitempty"` 5098 } 5099 5100 // An auto-generated type which holds one LineItemMutable and a cursor during pagination. 5101 type LineItemMutableEdge struct { 5102 // A cursor for use in pagination. 5103 Cursor null.String `json:"cursor,omitempty"` 5104 // The item at the end of LineItemMutableEdge. 5105 Node *LineItemMutable `json:"node,omitempty"` 5106 } 5107 5108 // Represents the selling plan for a line item. 5109 type LineItemSellingPlan struct { 5110 // The name of the selling plan for display purposes. 5111 Name null.String `json:"name,omitempty"` 5112 } 5113 5114 // A link to direct users to. 5115 type Link struct { 5116 // A context-sensitive label for the link. 5117 Label null.String `json:"label,omitempty"` 5118 // The translations associated with the resource. 5119 Translations []*PublishedTranslation `json:"translations,omitempty"` 5120 // The URL that the link visits. 5121 URL null.String `json:"url,omitempty"` 5122 } 5123 5124 func (Link) IsHasPublishedTranslations() {} 5125 5126 // A locale. 5127 type Locale struct { 5128 // Locale ISO code. 5129 IsoCode null.String `json:"isoCode,omitempty"` 5130 // Locale name. 5131 Name null.String `json:"name,omitempty"` 5132 } 5133 5134 // Represents the value captured by a localization extension, like a tax id. 5135 type LocalizationExtension struct { 5136 // Country ISO 3166-1 alpha-2 code. 5137 CountryCode CountryCode `json:"countryCode,omitempty"` 5138 // The localized extension keys that are allowed. 5139 Key LocalizationExtensionKey `json:"key,omitempty"` 5140 // The purpose of this localization extension. 5141 Purpose LocalizationExtensionPurpose `json:"purpose,omitempty"` 5142 // The localized extension title. 5143 Title null.String `json:"title,omitempty"` 5144 // The value of the field. 5145 Value null.String `json:"value,omitempty"` 5146 } 5147 5148 // An auto-generated type for paginating through multiple LocalizationExtensions. 5149 type LocalizationExtensionConnection struct { 5150 // A list of edges. 5151 Edges []*LocalizationExtensionEdge `json:"edges,omitempty"` 5152 // Information to aid in pagination. 5153 PageInfo *PageInfo `json:"pageInfo,omitempty"` 5154 } 5155 5156 // An auto-generated type which holds one LocalizationExtension and a cursor during pagination. 5157 type LocalizationExtensionEdge struct { 5158 // A cursor for use in pagination. 5159 Cursor null.String `json:"cursor,omitempty"` 5160 // The item at the end of LocalizationExtensionEdge. 5161 Node *LocalizationExtension `json:"node,omitempty"` 5162 } 5163 5164 // Specifies the input fields for a LocalizationExtensionInput. 5165 type LocalizationExtensionInput struct { 5166 // The key for the localization extension. 5167 Key LocalizationExtensionKey `json:"key,omitempty"` 5168 // The localization extension value. 5169 Value null.String `json:"value,omitempty"` 5170 } 5171 5172 // Represents the location where the physical good resides. 5173 type Location struct { 5174 // Whether this location can be reactivated. 5175 Activatable bool `json:"activatable,omitempty"` 5176 // The LocationAddress object for location. 5177 Address *LocationAddress `json:"address,omitempty"` 5178 // Whether the location address has been verified. 5179 AddressVerified bool `json:"addressVerified,omitempty"` 5180 // Whether this location can be deactivated. 5181 Deactivatable bool `json:"deactivatable,omitempty"` 5182 // Date and time the location was deactivated (null if location is still active). Following UTC ISO8601 format, e.g.: "2019-04-24T13:42:24Z". 5183 DeactivatedAt *null.String `json:"deactivatedAt,omitempty"` 5184 // Whether this location can be deleted. 5185 Deletable bool `json:"deletable,omitempty"` 5186 // Name of the service provider that fulfills from this location. 5187 // FulfillmentService *FulfillmentService `json:"fulfillmentService,omitempty"` 5188 // Indicates whether this location can fulfill online orders. 5189 FulfillsOnlineOrders bool `json:"fulfillsOnlineOrders,omitempty"` 5190 // Indicates whether or not this location has active inventory. 5191 HasActiveInventory bool `json:"hasActiveInventory,omitempty"` 5192 // Indicates whether or not this location has unfulfilled orders. 5193 HasUnfulfilledOrders bool `json:"hasUnfulfilledOrders,omitempty"` 5194 // Globally unique identifier. 5195 ID null.String `json:"id,omitempty"` 5196 // A single inventory level for the given inventory item. 5197 InventoryLevel *InventoryLevel `json:"inventoryLevel,omitempty"` 5198 // Paginated list of inventory levels for inventory items stocked at the location. 5199 InventoryLevels *InventoryLevelConnection `json:"inventoryLevels,omitempty"` 5200 // Whether the location is active. 5201 IsActive bool `json:"isActive,omitempty"` 5202 // Whether the location is your primary location for shipping inventory. 5203 IsPrimary bool `json:"isPrimary,omitempty"` 5204 // The ID of the corresponding resource in the REST Admin API. 5205 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 5206 // The name of the location. 5207 Name null.String `json:"name,omitempty"` 5208 // Indicates whether or not this location is used for calculating shipping rates. 5209 ShipsInventory bool `json:"shipsInventory,omitempty"` 5210 // List of suggested addresses for this location (empty if none). 5211 SuggestedAddresses []*LocationSuggestedAddress `json:"suggestedAddresses,omitempty"` 5212 } 5213 5214 func (Location) IsNode() {} 5215 func (Location) IsLegacyInteroperability() {} 5216 5217 // Represents the address of the location. 5218 type LocationAddress struct { 5219 // The first line of the address for the location. 5220 Address1 *null.String `json:"address1,omitempty"` 5221 // The second line of the address for the location. 5222 Address2 *null.String `json:"address2,omitempty"` 5223 // The city of the location. 5224 City *null.String `json:"city,omitempty"` 5225 // The country of the location. 5226 Country *null.String `json:"country,omitempty"` 5227 // The two-letter country code of the location. 5228 CountryCode *null.String `json:"countryCode,omitempty"` 5229 // A formatted version of the location address. 5230 Formatted []null.String `json:"formatted,omitempty"` 5231 // The latitude coordinates of the location. 5232 Latitude *float64 `json:"latitude,omitempty"` 5233 // The longitude coordinates of the location. 5234 Longitude *float64 `json:"longitude,omitempty"` 5235 // The phone number of the location. 5236 Phone *null.String `json:"phone,omitempty"` 5237 // The province of the location. 5238 Province *null.String `json:"province,omitempty"` 5239 // The code for the region of the address, such as the province, state, or district. 5240 // For example QC for Quebec, Canada. 5241 ProvinceCode *null.String `json:"provinceCode,omitempty"` 5242 // The ZIP code of the location. 5243 Zip *null.String `json:"zip,omitempty"` 5244 } 5245 5246 // An auto-generated type for paginating through multiple Locations. 5247 type LocationConnection struct { 5248 // A list of edges. 5249 Edges []*LocationEdge `json:"edges,omitempty"` 5250 // Information to aid in pagination. 5251 PageInfo *PageInfo `json:"pageInfo,omitempty"` 5252 } 5253 5254 // An auto-generated type which holds one Location and a cursor during pagination. 5255 type LocationEdge struct { 5256 // A cursor for use in pagination. 5257 Cursor null.String `json:"cursor,omitempty"` 5258 // The item at the end of LocationEdge. 5259 Node *Location `json:"node,omitempty"` 5260 } 5261 5262 // Represents a suggested address for a location. 5263 type LocationSuggestedAddress struct { 5264 // The first line of the suggested address. 5265 Address1 *null.String `json:"address1,omitempty"` 5266 // The second line of the suggested address. 5267 Address2 *null.String `json:"address2,omitempty"` 5268 // The city of the suggested address. 5269 City *null.String `json:"city,omitempty"` 5270 // The country of the suggested address. 5271 Country *null.String `json:"country,omitempty"` 5272 // The country code of the suggested address. 5273 CountryCode *CountryCode `json:"countryCode,omitempty"` 5274 // A formatted version of the suggested address. 5275 Formatted []null.String `json:"formatted,omitempty"` 5276 // The province of the suggested address. 5277 Province *null.String `json:"province,omitempty"` 5278 // The province code of the suggested address. 5279 ProvinceCode *null.String `json:"provinceCode,omitempty"` 5280 // The ZIP code of the suggested address. 5281 Zip *null.String `json:"zip,omitempty"` 5282 } 5283 5284 // Represents a customer mailing address. 5285 // 5286 // For example, a customer's default address and an order's billing address are both mailling addresses. 5287 type MailingAddress struct { 5288 // The first line of the address. Typically the street address or PO Box number. 5289 Address1 *null.String `json:"address1,omitempty"` 5290 // The second line of the address. Typically the number of the apartment, suite, or unit. 5291 Address2 *null.String `json:"address2,omitempty"` 5292 // The name of the city, district, village, or town. 5293 City *null.String `json:"city,omitempty"` 5294 // The name of the customer's company or organization. 5295 Company *null.String `json:"company,omitempty"` 5296 // The name of the country. 5297 Country *null.String `json:"country,omitempty"` 5298 // The two-letter code for the country of the address. 5299 // 5300 // For example, US. 5301 CountryCode *null.String `json:"countryCode,omitempty"` 5302 // The two-letter code for the country of the address. 5303 // 5304 // For example, US. 5305 CountryCodeV2 *CountryCode `json:"countryCodeV2,omitempty"` 5306 // The first name of the customer. 5307 FirstName *null.String `json:"firstName,omitempty"` 5308 // A formatted version of the address, customized by the provided arguments. 5309 Formatted []null.String `json:"formatted,omitempty"` 5310 // A comma-separated list of the values for city, province, and country. 5311 FormattedArea *null.String `json:"formattedArea,omitempty"` 5312 // Globally unique identifier. 5313 ID null.String `json:"id,omitempty"` 5314 // The last name of the customer. 5315 LastName *null.String `json:"lastName,omitempty"` 5316 // The latitude coordinate of the customer address. 5317 Latitude *float64 `json:"latitude,omitempty"` 5318 // The longitude coordinate of the customer address. 5319 Longitude *float64 `json:"longitude,omitempty"` 5320 // The full name of the customer, based on firstName and lastName. 5321 Name *null.String `json:"name,omitempty"` 5322 // A unique phone number for the customer. 5323 // 5324 // Formatted using E.164 standard. For example, _+16135551111_. 5325 Phone *null.String `json:"phone,omitempty"` 5326 // The region of the address, such as the province, state, or district. 5327 Province *null.String `json:"province,omitempty"` 5328 // The two-letter code for the region. 5329 // 5330 // For example, ON. 5331 ProvinceCode *null.String `json:"provinceCode,omitempty"` 5332 // The zip or postal code of the address. 5333 Zip *null.String `json:"zip,omitempty"` 5334 } 5335 5336 func (MailingAddress) IsNode() {} 5337 5338 // The fields used to create or update a mailing address. 5339 type MailingAddressInput struct { 5340 // The first line of the address. Typically the street address or PO Box number. 5341 Address1 *null.String `json:"address1,omitempty"` 5342 // The second line of the address. Typically the number of the apartment, suite, or unit. 5343 Address2 *null.String `json:"address2,omitempty"` 5344 // The name of the city, district, village, or town. 5345 City *null.String `json:"city,omitempty"` 5346 // The name of the customer's company or organization. 5347 Company *null.String `json:"company,omitempty"` 5348 // The name of the country. This argument is deprecated: Use `countryCode` instead. 5349 Country *null.String `json:"country,omitempty"` 5350 // The two-letter code for the country of the address. 5351 CountryCode *CountryCode `json:"countryCode,omitempty"` 5352 // The first name of the customer. 5353 FirstName *null.String `json:"firstName,omitempty"` 5354 // This argument is deprecated: Not needed for 90% of mutations, and provided separately where it is needed. 5355 ID *null.String `json:"id,omitempty"` 5356 // The last name of the customer. 5357 LastName *null.String `json:"lastName,omitempty"` 5358 // A unique phone number for the customer. 5359 // 5360 // Formatted using E.164 standard. For example, _+16135551111_. 5361 Phone *null.String `json:"phone,omitempty"` 5362 // The region of the address, such as the province, state, or district. This argument is deprecated: Use `provinceCode` instead. 5363 Province *null.String `json:"province,omitempty"` 5364 // The code for the region of the address, such as the province, state, or district. 5365 // For example QC for Quebec, Canada. 5366 ProvinceCode *null.String `json:"provinceCode,omitempty"` 5367 // The zip or postal code of the address. 5368 Zip *null.String `json:"zip,omitempty"` 5369 } 5370 5371 // Manual discount applications capture the intentions of a discount that was manually created for an order. 5372 type ManualDiscountApplication struct { 5373 // The method by which the discount's value is allocated to its entitled items. 5374 AllocationMethod DiscountApplicationAllocationMethod `json:"allocationMethod,omitempty"` 5375 // The description of the discount application. 5376 Description *null.String `json:"description,omitempty"` 5377 // An ordered index that can be used to identify the discount application and indicate the precedence 5378 // of the discount application for calculations. 5379 Index int `json:"index,omitempty"` 5380 // How the discount amount is distributed on the discounted lines. 5381 TargetSelection DiscountApplicationTargetSelection `json:"targetSelection,omitempty"` 5382 // Whether the discount is applied on line items or shipping lines. 5383 TargetType DiscountApplicationTargetType `json:"targetType,omitempty"` 5384 // The title of the discount application. 5385 Title null.String `json:"title,omitempty"` 5386 // The value of the discount application. 5387 Value PricingValue `json:"value,omitempty"` 5388 } 5389 5390 func (ManualDiscountApplication) IsDiscountApplication() {} 5391 5392 // A marketing activity represents marketing created by an app on behalf of the merchant. 5393 type MarketingActivity struct { 5394 // The url of the activity listing page of this marketing activity in the marketing section. 5395 ActivityListURL *null.String `json:"activityListUrl,omitempty"` 5396 // Amount spent on this marketing activity. 5397 AdSpend *MoneyV2 `json:"adSpend,omitempty"` 5398 // The app which created this marketing activity. 5399 App *App `json:"app,omitempty"` 5400 // Errors generated when app was trying to complete this activity. 5401 AppErrors *MarketingActivityExtensionAppErrors `json:"appErrors,omitempty"` 5402 // The budget for this marketing activity. 5403 Budget *MarketingBudget `json:"budget,omitempty"` 5404 // The date and time when the marketing activity was created. 5405 CreatedAt null.String `json:"createdAt,omitempty"` 5406 // The form data of the marketing activity. 5407 FormData *null.String `json:"formData,omitempty"` 5408 // Globally unique identifier. 5409 ID null.String `json:"id,omitempty"` 5410 // The broad category of marketing, used for reporting aggregation. 5411 MarketingChannel MarketingChannel `json:"marketingChannel,omitempty"` 5412 // Associated marketing event of this marketing activity. 5413 MarketingEvent *MarketingEvent `json:"marketingEvent,omitempty"` 5414 // A contextual description of the marketing activity based on the platform and tactic used. 5415 SourceAndMedium null.String `json:"sourceAndMedium,omitempty"` 5416 // Status helps to identify if this marketing activity has been completed, queued, failed etc. 5417 Status MarketingActivityStatus `json:"status,omitempty"` 5418 // StatusBadgeType helps to identify the color of the status badge. 5419 StatusBadgeType *MarketingActivityStatusBadgeType `json:"statusBadgeType,omitempty"` 5420 // Status label to describe the status of the marketing activity. 5421 StatusLabel null.String `json:"statusLabel,omitempty"` 5422 // The [date and time]( 5423 // https://help.shopify.com/https://en.wikipedia.org/wiki/ISO_8601 5424 // ) when the activity's status last changed. 5425 StatusTransitionedAt *null.String `json:"statusTransitionedAt,omitempty"` 5426 // The method of marketing used for this marketing activity. 5427 Tactic MarketingTactic `json:"tactic,omitempty"` 5428 // Expected status set by app in prior to an asynchronous operation. 5429 TargetStatus *MarketingActivityStatus `json:"targetStatus,omitempty"` 5430 // Title of this marketing activity. 5431 Title null.String `json:"title,omitempty"` 5432 // The date and time when the marketing activity was updated. 5433 UpdatedAt null.String `json:"updatedAt,omitempty"` 5434 // The set of UTM parameters being tracked for this marketing activity. 5435 UtmParameters *UTMParameters `json:"utmParameters,omitempty"` 5436 } 5437 5438 func (MarketingActivity) IsNode() {} 5439 5440 // This type combines budget amount and its marketing budget type. 5441 type MarketingActivityBudgetInput struct { 5442 // Budget type for marketing activity. 5443 BudgetType *MarketingBudgetBudgetType `json:"budgetType,omitempty"` 5444 // Amount of budget for the marketing activity. 5445 Total *MoneyInput `json:"total,omitempty"` 5446 } 5447 5448 // An auto-generated type for paginating through multiple MarketingActivities. 5449 type MarketingActivityConnection struct { 5450 // A list of edges. 5451 Edges []*MarketingActivityEdge `json:"edges,omitempty"` 5452 // Information to aid in pagination. 5453 PageInfo *PageInfo `json:"pageInfo,omitempty"` 5454 } 5455 5456 // Specifies the input fields required to create a marketing activity. 5457 type MarketingActivityCreateInput struct { 5458 // The title of the marketing activity. 5459 MarketingActivityTitle *null.String `json:"marketingActivityTitle,omitempty"` 5460 // The form data in JSON serialized as a string. 5461 FormData *null.String `json:"formData,omitempty"` 5462 // The ID of the marketing activity extension. 5463 MarketingActivityExtensionID null.String `json:"marketingActivityExtensionId,omitempty"` 5464 // Encoded context containing marketing campaign id. 5465 Context *null.String `json:"context,omitempty"` 5466 // Specifies the 5467 // [Urchin Traffic Module (UTM) parameters](https://en.wikipedia.org/wiki/UTM_parameters) 5468 // that are associated with a related marketing campaign. UTMInput is required for all Marketing 5469 // tactics except Storefront App. 5470 Utm *UTMInput `json:"utm,omitempty"` 5471 // The current state of the marketing activity. 5472 Status MarketingActivityStatus `json:"status,omitempty"` 5473 // The budget for this marketing activity. 5474 Budget *MarketingActivityBudgetInput `json:"budget,omitempty"` 5475 } 5476 5477 // Return type for `marketingActivityCreate` mutation. 5478 type MarketingActivityCreatePayload struct { 5479 // The created marketing activity. 5480 MarketingActivity *MarketingActivity `json:"marketingActivity,omitempty"` 5481 // The path to return back to shopify admin from embedded editor. 5482 RedirectPath *null.String `json:"redirectPath,omitempty"` 5483 // List of errors that occurred executing the mutation. 5484 UserErrors []*UserError `json:"userErrors,omitempty"` 5485 } 5486 5487 // An auto-generated type which holds one MarketingActivity and a cursor during pagination. 5488 type MarketingActivityEdge struct { 5489 // A cursor for use in pagination. 5490 Cursor null.String `json:"cursor,omitempty"` 5491 // The item at the end of MarketingActivityEdge. 5492 Node *MarketingActivity `json:"node,omitempty"` 5493 } 5494 5495 // Represents errors returned from apps when using the marketing activity extension. 5496 type MarketingActivityExtensionAppErrors struct { 5497 // The app error type. 5498 Code MarketingActivityExtensionAppErrorCode `json:"code,omitempty"` 5499 // The list of errors returned by the app. 5500 UserErrors []*UserError `json:"userErrors,omitempty"` 5501 } 5502 5503 // Specifies the input fields required to update a marketing activity. 5504 type MarketingActivityUpdateInput struct { 5505 // The id for this marketing activity. 5506 ID null.String `json:"id,omitempty"` 5507 // The ID of the recommendation this marketing activity was created from, if one exists. 5508 MarketingRecommendationID *null.String `json:"marketingRecommendationId,omitempty"` 5509 // The title of this marketing activity. 5510 Title *null.String `json:"title,omitempty"` 5511 // The budget for this marketing activity. 5512 Budget *MarketingActivityBudgetInput `json:"budget,omitempty"` 5513 // The cumulative amount spent on this marketing activity. This argument is deprecated: Use `MarketingEngagementCreate.MarketingEngagementInput.adSpend` GraphQL to send the ad spend. 5514 AdSpend *MoneyInput `json:"adSpend,omitempty"` 5515 // The current state of the marketing activity. 5516 Status *MarketingActivityStatus `json:"status,omitempty"` 5517 // The target state of the marketing activity. 5518 TargetStatus *MarketingActivityStatus `json:"targetStatus,omitempty"` 5519 // The form data of the marketing activity. 5520 FormData *null.String `json:"formData,omitempty"` 5521 // Specifies the 5522 // [Urchin Traffic Module (UTM) parameters](https://en.wikipedia.org/wiki/UTM_parameters) 5523 // that are associated with a related marketing campaign. UTMInput is required for all Marketing 5524 // tactics except Storefront App. This utm param can be only set once and never modified. 5525 Utm *UTMInput `json:"utm,omitempty"` 5526 // A list of the items that were marketed in this marketing activity. Valid types for these items are: 5527 // * `Product` 5528 // * `Shop` (Must be your current shop). 5529 MarketedResources []null.String `json:"marketedResources,omitempty"` 5530 // Encoded context provided by Shopify during the update marketing activity callback. This argument is deprecated: This context is no longer needed by Shopify in the callback. 5531 Context *null.String `json:"context,omitempty"` 5532 // Error messages generated when app was trying to complete this activity. 5533 Errors *null.String `json:"errors,omitempty"` 5534 } 5535 5536 // Return type for `marketingActivityUpdate` mutation. 5537 type MarketingActivityUpdatePayload struct { 5538 // The updated marketing activity. 5539 MarketingActivity *MarketingActivity `json:"marketingActivity,omitempty"` 5540 // The path to return back to shopify admin from embedded editor. 5541 RedirectPath *null.String `json:"redirectPath,omitempty"` 5542 // List of errors that occurred executing the mutation. 5543 UserErrors []*UserError `json:"userErrors,omitempty"` 5544 } 5545 5546 // This type combines budget amount and its marketing budget type. 5547 type MarketingBudget struct { 5548 // The budget type for a marketing activity. 5549 BudgetType MarketingBudgetBudgetType `json:"budgetType,omitempty"` 5550 // The amount of budget for marketing activity. 5551 Total *MoneyV2 `json:"total,omitempty"` 5552 } 5553 5554 // Marketing engagement represents customer activity taken on a marketing event. 5555 type MarketingEngagement struct { 5556 // The total ad spend for the day, if the marketing event is a paid ad with a daily spend. 5557 AdSpend *MoneyV2 `json:"adSpend,omitempty"` 5558 // The total number of clicks on the marketing event for the day. 5559 ClicksCount *int `json:"clicksCount,omitempty"` 5560 // The total number of comments for the day. 5561 CommentsCount *int `json:"commentsCount,omitempty"` 5562 // The total number of complaints for the day. 5563 ComplaintsCount *int `json:"complaintsCount,omitempty"` 5564 // The total number of fails for the day. 5565 FailsCount *int `json:"failsCount,omitempty"` 5566 // The total number of favorites for the day. 5567 FavoritesCount *int `json:"favoritesCount,omitempty"` 5568 // The date time at which the data was fetched. 5569 FetchedAt *null.String `json:"fetchedAt,omitempty"` 5570 // The total number of impressions for the day. 5571 ImpressionsCount *int `json:"impressionsCount,omitempty"` 5572 // Whether the engagements are reported as lifetime values rather than daily totals. 5573 IsCumulative *bool `json:"isCumulative,omitempty"` 5574 // The marketing activity related to this engagement. 5575 MarketingActivity *MarketingActivity `json:"marketingActivity,omitempty"` 5576 // The date that these engagements occurred on. 5577 OccurredOn null.String `json:"occurredOn,omitempty"` 5578 // The total number of sends for the day. 5579 SendsCount *int `json:"sendsCount,omitempty"` 5580 // The total number of shares for the day. 5581 SharesCount *int `json:"sharesCount,omitempty"` 5582 // The total number of unique clicks for the day. 5583 UniqueClicksCount *int `json:"uniqueClicksCount,omitempty"` 5584 // The total number of unique views for the day. 5585 UniqueViewsCount *int `json:"uniqueViewsCount,omitempty"` 5586 // The total number of unsubscribes for the day. 5587 UnsubscribesCount *int `json:"unsubscribesCount,omitempty"` 5588 // The UTC Offset that the app is using to determine which date to allocate spend to. 5589 UtcOffset *null.String `json:"utcOffset,omitempty"` 5590 // The total number of views for the day. 5591 ViewsCount *int `json:"viewsCount,omitempty"` 5592 } 5593 5594 // Return type for `marketingEngagementCreate` mutation. 5595 type MarketingEngagementCreatePayload struct { 5596 // The marketing engagement that was created. 5597 MarketingEngagement *MarketingEngagement `json:"marketingEngagement,omitempty"` 5598 // List of errors that occurred executing the mutation. 5599 UserErrors []*UserError `json:"userErrors,omitempty"` 5600 } 5601 5602 // This object represents marketing engagement input fields for a marketing engagement. 5603 type MarketingEngagementInput struct { 5604 // The date that these engagements occurred on. 5605 OccurredOn null.String `json:"occurredOn,omitempty"` 5606 // The total number of impressions for the day. 5607 ImpressionsCount *int `json:"impressionsCount,omitempty"` 5608 // The total number of views for the day. 5609 ViewsCount *int `json:"viewsCount,omitempty"` 5610 // The total number of clicks on the marketing event for the day. 5611 ClicksCount *int `json:"clicksCount,omitempty"` 5612 // The total number of shares for the day. 5613 SharesCount *int `json:"sharesCount,omitempty"` 5614 // The total number of favorites for the day. 5615 FavoritesCount *int `json:"favoritesCount,omitempty"` 5616 // The total number of comments for the day. 5617 CommentsCount *int `json:"commentsCount,omitempty"` 5618 // The total number of unsubscribes for the day. 5619 UnsubscribesCount *int `json:"unsubscribesCount,omitempty"` 5620 // The total number of complaints for the day. 5621 ComplaintsCount *int `json:"complaintsCount,omitempty"` 5622 // The total number of fails for the day. 5623 FailsCount *int `json:"failsCount,omitempty"` 5624 // The total number of sends for the day. 5625 SendsCount *int `json:"sendsCount,omitempty"` 5626 // The total number of unique views for the day. 5627 UniqueViewsCount *int `json:"uniqueViewsCount,omitempty"` 5628 // The total number of unique clicks for the day. 5629 UniqueClicksCount *int `json:"uniqueClicksCount,omitempty"` 5630 // The total ad spend for the day, if the marketing event is a paid ad with a daily spend. 5631 AdSpend *MoneyInput `json:"adSpend,omitempty"` 5632 // Whether the engagements are reported as lifetime values rather than daily totals. 5633 IsCumulative *bool `json:"isCumulative,omitempty"` 5634 // The UTC Offset that the app is using to determine which date to allocate spend to. 5635 UtcOffset *null.String `json:"utcOffset,omitempty"` 5636 // The date time at which the data was fetched. 5637 FetchedAt *null.String `json:"fetchedAt,omitempty"` 5638 } 5639 5640 // Represents actions that market a merchant's store or products. 5641 type MarketingEvent struct { 5642 // The app that the marketing event is attributed to. 5643 App *App `json:"app,omitempty"` 5644 // The marketing channel used by the marketing event. 5645 Channel *MarketingChannel `json:"channel,omitempty"` 5646 // A human-readable description of the marketing event. 5647 Description *null.String `json:"description,omitempty"` 5648 // The date and time when the marketing event ended. 5649 EndedAt *null.String `json:"endedAt,omitempty"` 5650 // Globally unique identifier. 5651 ID null.String `json:"id,omitempty"` 5652 // The ID of the corresponding resource in the REST Admin API. 5653 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 5654 // The URL where the marketing event can be managed. 5655 ManageURL *null.String `json:"manageUrl,omitempty"` 5656 // The URL where the marketing event can be previewed. 5657 PreviewURL *null.String `json:"previewUrl,omitempty"` 5658 // An optional ID that helps Shopify validate engagement data. 5659 RemoteID *null.String `json:"remoteId,omitempty"` 5660 // The date and time when the marketing event is scheduled to end. 5661 ScheduledToEndAt *null.String `json:"scheduledToEndAt,omitempty"` 5662 // Where the `MarketingEvent` occurred and what kind of content was used. 5663 // Because `utmSource` and `utmMedium` are often used interchangeably, this is 5664 // based on a combination of `marketingChannel`, `referringDomain`, and `type` to 5665 // provide a consistent representation for any given piece of marketing 5666 // regardless of the app that created it. 5667 SourceAndMedium null.String `json:"sourceAndMedium,omitempty"` 5668 // The date and time when the marketing event started. 5669 StartedAt null.String `json:"startedAt,omitempty"` 5670 // The display text for the marketing event type. 5671 TargetTypeDisplayText null.String `json:"targetTypeDisplayText,omitempty"` 5672 // The marketing event type. 5673 Type MarketingTactic `json:"type,omitempty"` 5674 // The name of the marketing campaign. 5675 UtmCampaign *null.String `json:"utmCampaign,omitempty"` 5676 // The medium that the marketing campaign is using. Example values: `cpc`, `banner`. 5677 UtmMedium *null.String `json:"utmMedium,omitempty"` 5678 // The referrer of the marketing event. Example values: `google`, `newsletter`. 5679 UtmSource *null.String `json:"utmSource,omitempty"` 5680 } 5681 5682 func (MarketingEvent) IsNode() {} 5683 func (MarketingEvent) IsLegacyInteroperability() {} 5684 5685 // An auto-generated type for paginating through multiple MarketingEvents. 5686 type MarketingEventConnection struct { 5687 // A list of edges. 5688 Edges []*MarketingEventEdge `json:"edges,omitempty"` 5689 // Information to aid in pagination. 5690 PageInfo *PageInfo `json:"pageInfo,omitempty"` 5691 } 5692 5693 // An auto-generated type which holds one MarketingEvent and a cursor during pagination. 5694 type MarketingEventEdge struct { 5695 // A cursor for use in pagination. 5696 Cursor null.String `json:"cursor,omitempty"` 5697 // The item at the end of MarketingEventEdge. 5698 Node *MarketingEvent `json:"node,omitempty"` 5699 } 5700 5701 // An auto-generated type for paginating through multiple Media. 5702 type MediaConnection struct { 5703 // A list of edges. 5704 Edges []*MediaEdge `json:"edges,omitempty"` 5705 // Information to aid in pagination. 5706 PageInfo *PageInfo `json:"pageInfo,omitempty"` 5707 } 5708 5709 // An auto-generated type which holds one Media and a cursor during pagination. 5710 type MediaEdge struct { 5711 // A cursor for use in pagination. 5712 Cursor null.String `json:"cursor,omitempty"` 5713 // The item at the end of MediaEdge. 5714 Node Media `json:"node,omitempty"` 5715 } 5716 5717 // Represents a media error. 5718 type MediaError struct { 5719 // Code representing the type of error. 5720 Code MediaErrorCode `json:"code,omitempty"` 5721 // Additional details regarding the error. 5722 Details *null.String `json:"details,omitempty"` 5723 // Translated error message. 5724 Message null.String `json:"message,omitempty"` 5725 } 5726 5727 // Represents a Shopify hosted image. 5728 type MediaImage struct { 5729 // A word or phrase to share the nature or contents of a media. 5730 Alt *null.String `json:"alt,omitempty"` 5731 // Globally unique identifier. 5732 ID null.String `json:"id,omitempty"` 5733 // The image for the media. 5734 Image *Image `json:"image,omitempty"` 5735 // The media content type. 5736 MediaContentType MediaContentType `json:"mediaContentType,omitempty"` 5737 // Any errors which have occurred on the media. 5738 MediaErrors []*MediaError `json:"mediaErrors,omitempty"` 5739 // The MIME type of the image. 5740 MimeType *null.String `json:"mimeType,omitempty"` 5741 // The preview image for the media. 5742 Preview *MediaPreviewImage `json:"preview,omitempty"` 5743 // Current status of the media. 5744 Status MediaStatus `json:"status,omitempty"` 5745 } 5746 5747 func (MediaImage) IsNode() {} 5748 func (MediaImage) IsMedia() {} 5749 5750 // Represents the preview image for a media. 5751 type MediaPreviewImage struct { 5752 // The preview image for the media. 5753 Image *Image `json:"image,omitempty"` 5754 // Current status of the preview image. 5755 Status MediaPreviewImageStatus `json:"status,omitempty"` 5756 } 5757 5758 // Represents an error that happens during execution of a Media query or mutation. 5759 type MediaUserError struct { 5760 // Error code to uniquely identify the error. 5761 Code *MediaUserErrorCode `json:"code,omitempty"` 5762 // Path to the input field which caused the error. 5763 Field []null.String `json:"field,omitempty"` 5764 // The error message. 5765 Message null.String `json:"message,omitempty"` 5766 } 5767 5768 func (MediaUserError) IsDisplayableError() {} 5769 5770 // Metafields represent custom metadata attached to a resource. Metafields can be sorted into namespaces and are 5771 // composed of keys, values, and value types. 5772 type Metafield struct { 5773 // The date and time when the metafield was created. 5774 CreatedAt null.String `json:"createdAt,omitempty"` 5775 // The description of a metafield. 5776 Description *null.String `json:"description,omitempty"` 5777 // Globally unique identifier. 5778 ID null.String `json:"id,omitempty"` 5779 // The key name for a metafield. 5780 Key null.String `json:"key,omitempty"` 5781 // The ID of the corresponding resource in the REST Admin API. 5782 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 5783 // The namespace for a metafield. 5784 Namespace null.String `json:"namespace,omitempty"` 5785 // Owner type of a metafield visible to the Storefront API. 5786 OwnerType MetafieldOwnerType `json:"ownerType,omitempty"` 5787 // The date and time when the metafield was updated. 5788 UpdatedAt null.String `json:"updatedAt,omitempty"` 5789 // The value of a metafield. 5790 Value null.String `json:"value,omitempty"` 5791 // Represents the metafield value type. 5792 ValueType MetafieldValueType `json:"valueType,omitempty"` 5793 } 5794 5795 func (Metafield) IsNode() {} 5796 func (Metafield) IsLegacyInteroperability() {} 5797 5798 // An auto-generated type for paginating through multiple Metafields. 5799 type MetafieldConnection struct { 5800 // A list of edges. 5801 Edges []*MetafieldEdge `json:"edges,omitempty"` 5802 // Information to aid in pagination. 5803 PageInfo *PageInfo `json:"pageInfo,omitempty"` 5804 } 5805 5806 // Specifies the input fields to delete a metafield. 5807 type MetafieldDeleteInput struct { 5808 // The ID of the metafield to delete. 5809 ID null.String `json:"id,omitempty"` 5810 } 5811 5812 // Return type for `metafieldDelete` mutation. 5813 type MetafieldDeletePayload struct { 5814 // The ID of the deleted metafield. 5815 DeletedID *null.String `json:"deletedId,omitempty"` 5816 // List of errors that occurred executing the mutation. 5817 UserErrors []*UserError `json:"userErrors,omitempty"` 5818 } 5819 5820 // An auto-generated type which holds one Metafield and a cursor during pagination. 5821 type MetafieldEdge struct { 5822 // A cursor for use in pagination. 5823 Cursor null.String `json:"cursor,omitempty"` 5824 // The item at the end of MetafieldEdge. 5825 Node *Metafield `json:"node,omitempty"` 5826 } 5827 5828 // Specifies the input fields for a metafield. 5829 type MetafieldInput struct { 5830 // The description of the metafield . 5831 Description *null.String `json:"description,omitempty"` 5832 // The unique ID of the metafield. 5833 ID *null.String `json:"id,omitempty"` 5834 // The key name of the metafield. 5835 Key *null.String `json:"key,omitempty"` 5836 // The namespace for a metafield. 5837 Namespace *null.String `json:"namespace,omitempty"` 5838 // The value of a metafield. 5839 Value *null.String `json:"value,omitempty"` 5840 // The value type of a metafield. 5841 ValueType *MetafieldValueType `json:"valueType,omitempty"` 5842 } 5843 5844 // Represents an allowlist record that enables a metafield to be visible to the storefront. 5845 type MetafieldStorefrontVisibility struct { 5846 // The date and time when the allowlist record was created. 5847 CreatedAt null.String `json:"createdAt,omitempty"` 5848 // Globally unique identifier. 5849 ID null.String `json:"id,omitempty"` 5850 // Key of a metafield in the visibility allowlist. 5851 Key null.String `json:"key,omitempty"` 5852 // The ID of the corresponding resource in the REST Admin API. 5853 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 5854 // Namespace of a metafield in the visibility allowlist. 5855 Namespace null.String `json:"namespace,omitempty"` 5856 // Owner type of a metafield in the visibility allowlist. 5857 OwnerType MetafieldOwnerType `json:"ownerType,omitempty"` 5858 // The date and time when the allowlist record was updated. 5859 UpdatedAt null.String `json:"updatedAt,omitempty"` 5860 } 5861 5862 func (MetafieldStorefrontVisibility) IsNode() {} 5863 func (MetafieldStorefrontVisibility) IsLegacyInteroperability() {} 5864 5865 // An auto-generated type for paginating through multiple MetafieldStorefrontVisibilities. 5866 type MetafieldStorefrontVisibilityConnection struct { 5867 // A list of edges. 5868 Edges []*MetafieldStorefrontVisibilityEdge `json:"edges,omitempty"` 5869 // Information to aid in pagination. 5870 PageInfo *PageInfo `json:"pageInfo,omitempty"` 5871 } 5872 5873 // Return type for `metafieldStorefrontVisibilityCreate` mutation. 5874 type MetafieldStorefrontVisibilityCreatePayload struct { 5875 // The metafield storefront visibility that was created. 5876 MetafieldStorefrontVisibility *MetafieldStorefrontVisibility `json:"metafieldStorefrontVisibility,omitempty"` 5877 // List of errors that occurred executing the mutation. 5878 UserErrors []*UserError `json:"userErrors,omitempty"` 5879 } 5880 5881 // Return type for `metafieldStorefrontVisibilityDelete` mutation. 5882 type MetafieldStorefrontVisibilityDeletePayload struct { 5883 // The ID of the deleted metafield storefront visibility. 5884 DeletedMetafieldStorefrontVisibilityID *null.String `json:"deletedMetafieldStorefrontVisibilityId,omitempty"` 5885 // List of errors that occurred executing the mutation. 5886 UserErrors []*UserError `json:"userErrors,omitempty"` 5887 } 5888 5889 // An auto-generated type which holds one MetafieldStorefrontVisibility and a cursor during pagination. 5890 type MetafieldStorefrontVisibilityEdge struct { 5891 // A cursor for use in pagination. 5892 Cursor null.String `json:"cursor,omitempty"` 5893 // The item at the end of MetafieldStorefrontVisibilityEdge. 5894 Node *MetafieldStorefrontVisibility `json:"node,omitempty"` 5895 } 5896 5897 // Specifies the input fields for a MetafieldStorefrontVisibilityInput. 5898 type MetafieldStorefrontVisibilityInput struct { 5899 // The namespace of the metafield to be visible to the storefront api. 5900 Namespace null.String `json:"namespace,omitempty"` 5901 // The key of the metafield to be visible to the storefront api. 5902 Key null.String `json:"key,omitempty"` 5903 // The core resource ( e.g.: Product ) that owns this metafield. 5904 OwnerType MetafieldOwnerType `json:"ownerType,omitempty"` 5905 } 5906 5907 // Represents a Shopify hosted 3D model. 5908 type Model3d struct { 5909 // A word or phrase to share the nature or contents of a media. 5910 Alt *null.String `json:"alt,omitempty"` 5911 // The filename of the 3d model. 5912 Filename null.String `json:"filename,omitempty"` 5913 // Globally unique identifier. 5914 ID null.String `json:"id,omitempty"` 5915 // The media content type. 5916 MediaContentType MediaContentType `json:"mediaContentType,omitempty"` 5917 // Any errors which have occurred on the media. 5918 MediaErrors []*MediaError `json:"mediaErrors,omitempty"` 5919 // The original source for a 3d model. 5920 OriginalSource *Model3dSource `json:"originalSource,omitempty"` 5921 // The preview image for the media. 5922 Preview *MediaPreviewImage `json:"preview,omitempty"` 5923 // The sources for a 3d model. 5924 Sources []*Model3dSource `json:"sources,omitempty"` 5925 // Current status of the media. 5926 Status MediaStatus `json:"status,omitempty"` 5927 } 5928 5929 func (Model3d) IsNode() {} 5930 func (Model3d) IsMedia() {} 5931 5932 // Represents a source for a Shopify hosted 3d model. 5933 type Model3dSource struct { 5934 // The filesize of the 3d model. 5935 Filesize int `json:"filesize,omitempty"` 5936 // The format of the 3d model. 5937 Format null.String `json:"format,omitempty"` 5938 // The MIME type of the 3d model. 5939 MimeType null.String `json:"mimeType,omitempty"` 5940 // The URL of the 3d model. 5941 URL null.String `json:"url,omitempty"` 5942 } 5943 5944 // A collection of monetary values in their respective currencies. 5945 type MoneyBag struct { 5946 // Amount in presentment currency. 5947 PresentmentMoney *MoneyV2 `json:"presentmentMoney,omitempty"` 5948 // Amount in shop currency. 5949 ShopMoney *MoneyV2 `json:"shopMoney,omitempty"` 5950 } 5951 5952 // Specifies the fields for a monetary value with currency. 5953 type MoneyInput struct { 5954 // Decimal money amount. 5955 Amount null.String `json:"amount,omitempty"` 5956 // Currency of the money. 5957 CurrencyCode CurrencyCode `json:"currencyCode,omitempty"` 5958 } 5959 5960 // A monetary value with currency. 5961 // 5962 // To format currencies, combine this type's amount and currencyCode fields with your client's locale. 5963 // 5964 // For example, in JavaScript you could use Intl.NumberFormat: 5965 // 5966 // ```js 5967 // new Intl.NumberFormat(locale, { 5968 // style: 'currency', 5969 // currency: currencyCode 5970 // }).format(amount); 5971 // ``` 5972 // 5973 // Other formatting libraries include: 5974 // 5975 // * iOS - [NumberFormatter](https://developer.apple.com/documentation/foundation/numberformatter) 5976 // * Android - [NumberFormat](https://developer.android.com/reference/java/text/NumberFormat.html) 5977 // * PHP - [NumberFormatter](http://php.net/manual/en/class.numberformatter.php) 5978 // 5979 // For a more general solution, the [Unicode CLDR number formatting database] is available with many implementations 5980 // (such as [TwitterCldr](https://github.com/twitter/twitter-cldr-rb)). 5981 type MoneyV2 struct { 5982 // Decimal money amount. 5983 Amount null.String `json:"amount,omitempty"` 5984 // Currency of the money. 5985 CurrencyCode CurrencyCode `json:"currencyCode,omitempty"` 5986 } 5987 5988 func (MoneyV2) IsDeliveryConditionCriteria() {} 5989 func (MoneyV2) IsPricingValue() {} 5990 func (MoneyV2) IsSellingPlanPricingPolicyAdjustmentValue() {} 5991 5992 // An individual move to perform of an object to a position. 5993 type MoveInput struct { 5994 // The ID of the object to be moved. 5995 ID null.String `json:"id,omitempty"` 5996 // The new position of the object in the set, using a 0 based index. 5997 NewPosition null.String `json:"newPosition,omitempty"` 5998 } 5999 6000 // A signed upload parameter for uploading an asset to Shopify. 6001 type MutationsStagedUploadTargetGenerateUploadParameter struct { 6002 // The upload parameter name. 6003 Name null.String `json:"name,omitempty"` 6004 // The upload parameter value. 6005 Value null.String `json:"value,omitempty"` 6006 } 6007 6008 // A navigation item, holding basic link attributes. 6009 type NavigationItem struct { 6010 // The unique identifier of the navigation item. 6011 ID null.String `json:"id,omitempty"` 6012 // The name of the navigation item. 6013 Title null.String `json:"title,omitempty"` 6014 // The URL of the page that the navigation item links to. 6015 URL null.String `json:"url,omitempty"` 6016 } 6017 6018 // Represents an article in an OnlineStoreBlog object. Articles appear in reverse chronological order, with the 6019 // most recent entry at the top of the blog's page. A blog can contain any number of articles. 6020 type OnlineStoreArticle struct { 6021 // A default cursor for use in pagination. 6022 DefaultCursor null.String `json:"defaultCursor,omitempty"` 6023 // Globally unique identifier. 6024 ID null.String `json:"id,omitempty"` 6025 // The translations associated with the resource. 6026 Translations []*PublishedTranslation `json:"translations,omitempty"` 6027 } 6028 6029 func (OnlineStoreArticle) IsNode() {} 6030 func (OnlineStoreArticle) IsNavigable() {} 6031 func (OnlineStoreArticle) IsHasPublishedTranslations() {} 6032 6033 // Shopify stores come with a built-in blogging engine, allowing a shop to have one or more blogs. Blogs are meant 6034 // to be used as a type of magazine or newsletter for the shop, with content that changes over time. 6035 type OnlineStoreBlog struct { 6036 // Globally unique identifier. 6037 ID null.String `json:"id,omitempty"` 6038 // The translations associated with the resource. 6039 Translations []*PublishedTranslation `json:"translations,omitempty"` 6040 } 6041 6042 func (OnlineStoreBlog) IsNode() {} 6043 func (OnlineStoreBlog) IsHasPublishedTranslations() {} 6044 6045 // A custom page on the Online Store. 6046 type OnlineStorePage struct { 6047 // A default cursor for use in pagination. 6048 DefaultCursor null.String `json:"defaultCursor,omitempty"` 6049 // Globally unique identifier. 6050 ID null.String `json:"id,omitempty"` 6051 // The translations associated with the resource. 6052 Translations []*PublishedTranslation `json:"translations,omitempty"` 6053 } 6054 6055 func (OnlineStorePage) IsNode() {} 6056 func (OnlineStorePage) IsNavigable() {} 6057 func (OnlineStorePage) IsHasPublishedTranslations() {} 6058 6059 // An order represents an agreement to do business between a customer and a merchant. 6060 type Order struct { 6061 // Generated messages that appear at the top of an order page in the Shopify admin. 6062 // For example, _this is a test order_. 6063 Alerts []*ResourceAlert `json:"alerts,omitempty"` 6064 // Mailing address provided by the customer. 6065 // Not all orders have mailing addresses. 6066 BillingAddress *MailingAddress `json:"billingAddress,omitempty"` 6067 // Whether the billing address matches the shipping address. 6068 BillingAddressMatchesShippingAddress bool `json:"billingAddressMatchesShippingAddress,omitempty"` 6069 // Whether the order can be manually marked as paid. 6070 CanMarkAsPaid bool `json:"canMarkAsPaid,omitempty"` 6071 // Whether notifications can be sent to the customer or not. 6072 CanNotifyCustomer bool `json:"canNotifyCustomer,omitempty"` 6073 // Reason the order was canceled. 6074 // Returns null if the order wasn't canceled. 6075 CancelReason *OrderCancelReason `json:"cancelReason,omitempty"` 6076 // Date and time when the order was canceled. 6077 // Returns null if the order wasn't canceled. 6078 CancelledAt *null.String `json:"cancelledAt,omitempty"` 6079 // Whether payment for the order can be captured. 6080 // Returns true when the customer's credit card has been authorized for payment and the authorization period has not expired. 6081 Capturable bool `json:"capturable,omitempty"` 6082 // Amount of the order-level discount (does not contain any line item discounts). 6083 CartDiscountAmount *null.String `json:"cartDiscountAmount,omitempty"` 6084 // Amount of the order-level discount (does not contain any line item discounts) in shop and presentment currencies. 6085 CartDiscountAmountSet *MoneyBag `json:"cartDiscountAmountSet,omitempty"` 6086 // Channel that created the order. 6087 Channel *Channel `json:"channel,omitempty"` 6088 // The ip address of the client that is associated with this order. 6089 ClientIP *null.String `json:"clientIp,omitempty"` 6090 // Whether the order is closed. 6091 Closed bool `json:"closed,omitempty"` 6092 // Date and time when the order closed. 6093 // If the order is not closed, then this field is null. 6094 ClosedAt *null.String `json:"closedAt,omitempty"` 6095 // Whether inventory has been reserved for the order. 6096 Confirmed bool `json:"confirmed,omitempty"` 6097 // Date and time when the order was created in Shopify. 6098 CreatedAt null.String `json:"createdAt,omitempty"` 6099 // The currency of the store at the time of the order. 6100 // If payment hasn't occurred, then this field is null. 6101 CurrencyCode CurrencyCode `json:"currencyCode,omitempty"` 6102 // The amount of the order-level discount minus the amounts for line items that have been returned. This doesn't include line item discounts. 6103 CurrentCartDiscountAmountSet *MoneyBag `json:"currentCartDiscountAmountSet,omitempty"` 6104 // The sum of the quantities for the line items that contribute to the order's subtotal. 6105 CurrentSubtotalLineItemsQuantity int `json:"currentSubtotalLineItemsQuantity,omitempty"` 6106 // The subtotal of line items and their discounts minus the line items that have been returned. This includes order-level discounts, unless the argument with_cart_discount is set to false. This doesn't include shipping costs and shipping discounts. Taxes are not included unless the order is a taxes-included order. 6107 CurrentSubtotalPriceSet *MoneyBag `json:"currentSubtotalPriceSet,omitempty"` 6108 // The taxes charged for the order minus the taxes for line items that have been returned. 6109 CurrentTaxLines []*TaxLine `json:"currentTaxLines,omitempty"` 6110 // The total amount discounted from the order (including order-level and line item discounts) minus the amounts for items that have been returned. 6111 CurrentTotalDiscountsSet *MoneyBag `json:"currentTotalDiscountsSet,omitempty"` 6112 // The total amount of duties for the order. If duties aren't applicable, then this value is `null`. 6113 CurrentTotalDutiesSet *MoneyBag `json:"currentTotalDutiesSet,omitempty"` 6114 // The total amount of the order (including taxes and discounts) minus the amounts for line items that have been returned. 6115 CurrentTotalPriceSet *MoneyBag `json:"currentTotalPriceSet,omitempty"` 6116 // The total of all taxes applied to the order minus the taxes for line items that have been returned. 6117 CurrentTotalTaxSet *MoneyBag `json:"currentTotalTaxSet,omitempty"` 6118 // The total weight (grams) of the order minus the weights for line items that have been returned. 6119 CurrentTotalWeight null.String `json:"currentTotalWeight,omitempty"` 6120 // Custom information added to the order by your customer 6121 // (Also referred to as note attributes). 6122 CustomAttributes []*Attribute `json:"customAttributes,omitempty"` 6123 // Unique identifier of the customer who placed the order. 6124 // Not all orders have customers associated with them. 6125 Customer *Customer `json:"customer,omitempty"` 6126 // Whether the customer agreed to receive marketing materials. 6127 CustomerAcceptsMarketing bool `json:"customerAcceptsMarketing,omitempty"` 6128 // Description of the customer's experience with the store leading up to the order. 6129 CustomerJourney *CustomerJourney `json:"customerJourney,omitempty"` 6130 // Description of the customer's experience with the store leading up to the order. 6131 // Loaded asynchronously, consumers should poll until the 'ready' field resolves to true. 6132 CustomerJourneySummary *CustomerJourneySummary `json:"customerJourneySummary,omitempty"` 6133 // A two-letter or three-letter language code, optionally followed by a region modifier. 6134 // Example values could be 'en', 'en-CA', 'en-PIRATE'. 6135 CustomerLocale *null.String `json:"customerLocale,omitempty"` 6136 // Discounts that have been applied on the order. 6137 DiscountApplications *DiscountApplicationConnection `json:"discountApplications,omitempty"` 6138 // Discount code provided by the customer. 6139 DiscountCode *null.String `json:"discountCode,omitempty"` 6140 // Primary address of the customer, which is shown on the order. 6141 DisplayAddress *MailingAddress `json:"displayAddress,omitempty"` 6142 // Financial status of the order that can be shown to the merchant. 6143 // This field does not capture all the possible details of an order's financial state and should only be used for display summary purposes. 6144 DisplayFinancialStatus *OrderDisplayFinancialStatus `json:"displayFinancialStatus,omitempty"` 6145 // Fulfillment status for the order that can be shown to the merchant. 6146 // This field does not capture all the possible details of an order's fulfillment state. It should only be used for display summary purposes. 6147 DisplayFulfillmentStatus OrderDisplayFulfillmentStatus `json:"displayFulfillmentStatus,omitempty"` 6148 // Summary of each dispute associated with the order. Sorted in ascending (ASC) order by ID. 6149 Disputes []*OrderDisputeSummary `json:"disputes,omitempty"` 6150 // List of possible fulfilments that can be made for the order (includes line items that can be partially fulfilled). 6151 DraftFulfillments []*DraftFulfillment `json:"draftFulfillments,omitempty"` 6152 // Whether the order has had any edits applied or not. 6153 Edited bool `json:"edited,omitempty"` 6154 // Email address provided by the customer. 6155 Email *null.String `json:"email,omitempty"` 6156 // List of internal events associated with the order. 6157 Events *EventConnection `json:"events,omitempty"` 6158 // Whether there are items that can be fulfilled. 6159 // After an order is completely fulfilled (or completely refunded without any fulfillments) then this field returns false. 6160 Fulfillable bool `json:"fulfillable,omitempty"` 6161 // List of fulfillment orders with pagination. 6162 FulfillmentOrders *FulfillmentOrderConnection `json:"fulfillmentOrders,omitempty"` 6163 // List of shipments for the order. 6164 // Fulfillments []*Fulfillment `json:"fulfillments,omitempty"` 6165 // Whether the order has been paid in full. 6166 FullyPaid bool `json:"fullyPaid,omitempty"` 6167 // Whether the merchant added timeline comments to the order. 6168 HasTimelineComment bool `json:"hasTimelineComment,omitempty"` 6169 // Globally unique identifier. 6170 ID null.String `json:"id,omitempty"` 6171 // First page of the online store that the customer visited before they submitted the order, for displaying to humans. 6172 LandingPageDisplayText *null.String `json:"landingPageDisplayText,omitempty"` 6173 // First page of the online store that the customer visited before they submitted the order. 6174 LandingPageURL *null.String `json:"landingPageUrl,omitempty"` 6175 // The ID of the corresponding resource in the REST Admin API. 6176 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 6177 // List of the order's line items. 6178 LineItems *LineItemConnection `json:"lineItems,omitempty"` 6179 // List of the order's line items after any edits. Only available on Developer Preview. 6180 LineItemsMutable *LineItemMutableConnection `json:"lineItemsMutable,omitempty"` 6181 // List of localization extensions for the resource. 6182 LocalizationExtensions *LocalizationExtensionConnection `json:"localizationExtensions,omitempty"` 6183 // If the order was processed using Shopify POS, then this is its location as provided by the merchant. 6184 Location *null.String `json:"location,omitempty"` 6185 // Whether the order can be edited or not. 6186 MerchantEditable bool `json:"merchantEditable,omitempty"` 6187 // A list of reasons of why the order cannot be edited. 6188 MerchantEditableErrors []null.String `json:"merchantEditableErrors,omitempty"` 6189 // The metafield associated with the resource. 6190 Metafield *Metafield `json:"metafield,omitempty"` 6191 // A paginated list of metafields associated with the resource. 6192 Metafields *MetafieldConnection `json:"metafields,omitempty"` 6193 // Unique identifier for the order that appears on the order. 6194 // For example, _#1000_ or _Store1001. 6195 // This value is not unique across multiple stores. 6196 Name null.String `json:"name,omitempty"` 6197 // Net payment for the order, based on the total amount received - total amount refunded. 6198 NetPayment null.String `json:"netPayment,omitempty"` 6199 // Net payment for the order, based on the total amount received - total amount refunded in shop and presentment currencies. 6200 NetPaymentSet *MoneyBag `json:"netPaymentSet,omitempty"` 6201 // Line items that can't be fulfilled. 6202 // For example, because some or all of the items have been refunded, or the item is not one which can be fulfilled, such as a tip. 6203 // These line items would be 'lost' if you only considered the line items in draft fulfillments or fulfillments. 6204 NonFulfillableLineItems *LineItemConnection `json:"nonFulfillableLineItems,omitempty"` 6205 // Contents of the note associated with the order. 6206 Note *null.String `json:"note,omitempty"` 6207 // The total amount of duties prior to any applied edits for the order. If duties aren't applicable, then this value is `null`. 6208 OriginalTotalDutiesSet *MoneyBag `json:"originalTotalDutiesSet,omitempty"` 6209 // Total price of the order prior to any applied edits in shop and presentment currencies. 6210 OriginalTotalPriceSet *MoneyBag `json:"originalTotalPriceSet,omitempty"` 6211 // The payment collection details for an order requiring additional payment. 6212 PaymentCollectionDetails *OrderPaymentCollectionDetails `json:"paymentCollectionDetails,omitempty"` 6213 // List of all payment gateways used for the order. 6214 // For example, _authorize_net_ and _Cash on Delivery (COD)_. 6215 PaymentGatewayNames []null.String `json:"paymentGatewayNames,omitempty"` 6216 // Phone number provided by the customer. 6217 Phone *null.String `json:"phone,omitempty"` 6218 // If the order was processed using Shopify POS, then this is its location as provided by the merchant. 6219 PhysicalLocation *Location `json:"physicalLocation,omitempty"` 6220 // The payment currency of the customer for this order. 6221 PresentmentCurrencyCode CurrencyCode `json:"presentmentCurrencyCode,omitempty"` 6222 // Returns a private metafield found by namespace and key. 6223 PrivateMetafield *PrivateMetafield `json:"privateMetafield,omitempty"` 6224 // List of private metafields. 6225 PrivateMetafields *PrivateMetafieldConnection `json:"privateMetafields,omitempty"` 6226 // Date and time when the order was processed. 6227 // When orders are imported from an app, this date and time may not match the date and time when the order was created. 6228 ProcessedAt null.String `json:"processedAt,omitempty"` 6229 // Publication that created the order. 6230 Publication *Publication `json:"publication,omitempty"` 6231 // Marketing referral code from the link that the customer clicked to visit your store. 6232 // Supports the following URL attributes: _ref_, _source_, or _r_. For example, if the URL is myshopifystore.com/products/slide?ref=j2tj1tn2, then this value is j2tj1tn2. 6233 ReferralCode *null.String `json:"referralCode,omitempty"` 6234 // Website that sent the customer to your online store. 6235 ReferrerDisplayText *null.String `json:"referrerDisplayText,omitempty"` 6236 // Webpage where the customer clicked a link that sent them to your online store. 6237 // For example, _Google_ or _randomblog.com/page1_. 6238 ReferrerURL *null.String `json:"referrerUrl,omitempty"` 6239 // The difference between suggested and actual refund amounts. A positive value indicates a difference in the merchants favor and a negative value indicates a difference in the customers favor. 6240 RefundDiscrepancySet *MoneyBag `json:"refundDiscrepancySet,omitempty"` 6241 // Whether the order can be refunded. 6242 Refundable bool `json:"refundable,omitempty"` 6243 // List of refunds that have been applied to the order. 6244 Refunds []*Refund `json:"refunds,omitempty"` 6245 // Whether any line item in the order requires physical shipping. 6246 RequiresShipping bool `json:"requiresShipping,omitempty"` 6247 // Whether the order can be restocked. 6248 Restockable bool `json:"restockable,omitempty"` 6249 // Fraud risk level of the order. 6250 RiskLevel OrderRiskLevel `json:"riskLevel,omitempty"` 6251 // The order risks associated with this order. 6252 Risks []*OrderRisk `json:"risks,omitempty"` 6253 // Mailing address for shipping provided by the customer. 6254 ShippingAddress *MailingAddress `json:"shippingAddress,omitempty"` 6255 // Line item that contains the shipping costs. 6256 ShippingLine *ShippingLine `json:"shippingLine,omitempty"` 6257 // List of line items that contains the shipping costs. 6258 ShippingLines *ShippingLineConnection `json:"shippingLines,omitempty"` 6259 // The sum of the quantities for the line items that contribute to the order's subtotal. 6260 SubtotalLineItemsQuantity int `json:"subtotalLineItemsQuantity,omitempty"` 6261 // Subtotal of the line items and their discounts (does not contain shipping costs and shipping discounts). 6262 SubtotalPrice *null.String `json:"subtotalPrice,omitempty"` 6263 // Subtotal of the line items and their discounts (does not contain shipping costs and shipping discounts) in shop and presentment currencies. 6264 SubtotalPriceSet *MoneyBag `json:"subtotalPriceSet,omitempty"` 6265 // The details of the suggested refund. This response can be used to submit a RefundCreate mutation. 6266 SuggestedRefund *SuggestedRefund `json:"suggestedRefund,omitempty"` 6267 // A comma separated list of tags that have been added to the order. 6268 Tags []null.String `json:"tags,omitempty"` 6269 // Taxes charged for the line item. 6270 TaxLines []*TaxLine `json:"taxLines,omitempty"` 6271 // Whether taxes are included in the subtotal price of the order. 6272 TaxesIncluded bool `json:"taxesIncluded,omitempty"` 6273 // Whether the order is a test. 6274 // Test orders are made using the Shopify Bogus Gateway or a payment provider with test mode enabled. 6275 Test bool `json:"test,omitempty"` 6276 // Amount authorized for the order, that is uncaptured or undercaptured. 6277 TotalCapturable null.String `json:"totalCapturable,omitempty"` 6278 // Amount authorized for the order, that is uncaptured or undercaptured in shop and presentment currencies. 6279 TotalCapturableSet *MoneyBag `json:"totalCapturableSet,omitempty"` 6280 // Total amount discounted from the order (includes order-level and line item discounts). 6281 TotalDiscounts *null.String `json:"totalDiscounts,omitempty"` 6282 // Total amount discounted from the order (includes order-level and line item discounts) in shop and presentment currencies. 6283 TotalDiscountsSet *MoneyBag `json:"totalDiscountsSet,omitempty"` 6284 // Total amount of money not yet authorized for the order. 6285 TotalOutstandingSet *MoneyBag `json:"totalOutstandingSet,omitempty"` 6286 // Total amount of the order (includes taxes and discounts). 6287 TotalPrice null.String `json:"totalPrice,omitempty"` 6288 // Total amount of the order (includes taxes and discounts) in shop and presentment currencies. 6289 TotalPriceSet *MoneyBag `json:"totalPriceSet,omitempty"` 6290 // Total amount received by the customer for the order. 6291 TotalReceived null.String `json:"totalReceived,omitempty"` 6292 // Total amount received by the customer for the order in shop and presentment currencies. 6293 TotalReceivedSet *MoneyBag `json:"totalReceivedSet,omitempty"` 6294 // Total amount refunded for the order. 6295 TotalRefunded null.String `json:"totalRefunded,omitempty"` 6296 // Total amount refunded for the order in shop and presentment currencies. 6297 TotalRefundedSet *MoneyBag `json:"totalRefundedSet,omitempty"` 6298 // Total amount refunded for shipping in shop and presentment currencies. 6299 TotalRefundedShippingSet *MoneyBag `json:"totalRefundedShippingSet,omitempty"` 6300 // Total amount charged for shipping the order. 6301 TotalShippingPrice null.String `json:"totalShippingPrice,omitempty"` 6302 // Total amount charged for shipping the order in shop and presentment currencies. 6303 TotalShippingPriceSet *MoneyBag `json:"totalShippingPriceSet,omitempty"` 6304 // Total of all taxes applied to the order. 6305 TotalTax *null.String `json:"totalTax,omitempty"` 6306 // Total of all taxes applied to the order in shop and presentment currencies. 6307 TotalTaxSet *MoneyBag `json:"totalTaxSet,omitempty"` 6308 // Total tip amount received for the order. 6309 TotalTipReceived *MoneyV2 `json:"totalTipReceived,omitempty"` 6310 // Total tip received for the order in shop and presentment currencies. 6311 TotalTipReceivedSet *MoneyBag `json:"totalTipReceivedSet,omitempty"` 6312 // Total weight (grams) of the order. 6313 TotalWeight *null.String `json:"totalWeight,omitempty"` 6314 // List of all transactions associated with the order. 6315 Transactions []*OrderTransaction `json:"transactions,omitempty"` 6316 // Whether no payments have been made for the order. 6317 // If no payments have been made for the order, then this returns true. 6318 Unpaid bool `json:"unpaid,omitempty"` 6319 // Date and time when the order was last modified. 6320 UpdatedAt null.String `json:"updatedAt,omitempty"` 6321 } 6322 6323 func (Order) IsCommentEventEmbed() {} 6324 func (Order) IsNode() {} 6325 func (Order) IsCommentEventSubject() {} 6326 func (Order) IsHasMetafields() {} 6327 func (Order) IsLegacyInteroperability() {} 6328 func (Order) IsHasEvents() {} 6329 func (Order) IsHasLocalizationExtensions() {} 6330 6331 // Specifies the authorized transaction to capture and the total amount to capture from it. 6332 type OrderCaptureInput struct { 6333 // The ID of the order to capture. 6334 ID null.String `json:"id,omitempty"` 6335 // The ID of the authorized transaction to capture. 6336 ParentTransactionID null.String `json:"parentTransactionId,omitempty"` 6337 // The amount to capture. 6338 Amount null.String `json:"amount,omitempty"` 6339 // The currency (in ISO format) that is used to capture the order. This must be the presentment currency (the currency used by the customer) and is a required field for orders where the currency and presentment currency differ. 6340 Currency *CurrencyCode `json:"currency,omitempty"` 6341 } 6342 6343 // Return type for `orderCapture` mutation. 6344 type OrderCapturePayload struct { 6345 // The transaction of the capture. 6346 Transaction *OrderTransaction `json:"transaction,omitempty"` 6347 // List of errors that occurred executing the mutation. 6348 UserErrors []*UserError `json:"userErrors,omitempty"` 6349 } 6350 6351 // Specifies an open order to close. 6352 type OrderCloseInput struct { 6353 // The ID of the order to close. 6354 ID null.String `json:"id,omitempty"` 6355 } 6356 6357 // Return type for `orderClose` mutation. 6358 type OrderClosePayload struct { 6359 // The closed order. 6360 Order *Order `json:"order,omitempty"` 6361 // List of errors that occurred executing the mutation. 6362 UserErrors []*UserError `json:"userErrors,omitempty"` 6363 } 6364 6365 // An auto-generated type for paginating through multiple Orders. 6366 type OrderConnection struct { 6367 // A list of edges. 6368 Edges []*OrderEdge `json:"edges,omitempty"` 6369 // Information to aid in pagination. 6370 PageInfo *PageInfo `json:"pageInfo,omitempty"` 6371 } 6372 6373 // A summary of the important details for a dispute on an order. 6374 type OrderDisputeSummary struct { 6375 // Globally unique identifier. 6376 ID null.String `json:"id,omitempty"` 6377 // The type that the dispute was initiated as. 6378 InitiatedAs DisputeType `json:"initiatedAs,omitempty"` 6379 // The current status of the dispute. 6380 Status DisputeStatus `json:"status,omitempty"` 6381 } 6382 6383 func (OrderDisputeSummary) IsNode() {} 6384 6385 // An auto-generated type which holds one Order and a cursor during pagination. 6386 type OrderEdge struct { 6387 // A cursor for use in pagination. 6388 Cursor null.String `json:"cursor,omitempty"` 6389 // The item at the end of OrderEdge. 6390 Node *Order `json:"node,omitempty"` 6391 } 6392 6393 // Return type for `orderEditAddCustomItem` mutation. 6394 type OrderEditAddCustomItemPayload struct { 6395 // The added line item. 6396 CalculatedLineItem *CalculatedLineItem `json:"calculatedLineItem,omitempty"` 6397 // An order with the edits calculated. 6398 CalculatedOrder *CalculatedOrder `json:"calculatedOrder,omitempty"` 6399 // List of errors that occurred executing the mutation. 6400 UserErrors []*UserError `json:"userErrors,omitempty"` 6401 } 6402 6403 // Return type for `orderEditAddLineItemDiscount` mutation. 6404 type OrderEditAddLineItemDiscountPayload struct { 6405 // The staged change produced by this mutation. 6406 AddedDiscountStagedChange *OrderStagedChangeAddLineItemDiscount `json:"addedDiscountStagedChange,omitempty"` 6407 // The line item with the discount applied. 6408 CalculatedLineItem *CalculatedLineItem `json:"calculatedLineItem,omitempty"` 6409 // An order with the edits calculated. 6410 CalculatedOrder *CalculatedOrder `json:"calculatedOrder,omitempty"` 6411 // List of errors that occurred executing the mutation. 6412 UserErrors []*UserError `json:"userErrors,omitempty"` 6413 } 6414 6415 // Return type for `orderEditAddVariant` mutation. 6416 type OrderEditAddVariantPayload struct { 6417 // The added line item. 6418 CalculatedLineItem *CalculatedLineItem `json:"calculatedLineItem,omitempty"` 6419 // An order with the edits calculated. 6420 CalculatedOrder *CalculatedOrder `json:"calculatedOrder,omitempty"` 6421 // List of errors that occurred executing the mutation. 6422 UserErrors []*UserError `json:"userErrors,omitempty"` 6423 } 6424 6425 // The input fields used to add a discount during an order edit. 6426 type OrderEditAppliedDiscountInput struct { 6427 // The description of the discount. 6428 Description *null.String `json:"description,omitempty"` 6429 // The value of the discount as a fixed amount. 6430 FixedValue *MoneyInput `json:"fixedValue,omitempty"` 6431 // The value of the discount as a percentage. 6432 PercentValue *float64 `json:"percentValue,omitempty"` 6433 } 6434 6435 // Return type for `orderEditBegin` mutation. 6436 type OrderEditBeginPayload struct { 6437 // The order that will be edited. 6438 CalculatedOrder *CalculatedOrder `json:"calculatedOrder,omitempty"` 6439 // List of errors that occurred executing the mutation. 6440 UserErrors []*UserError `json:"userErrors,omitempty"` 6441 } 6442 6443 // Return type for `orderEditCommit` mutation. 6444 type OrderEditCommitPayload struct { 6445 // The order with changes applied. 6446 Order *Order `json:"order,omitempty"` 6447 // List of errors that occurred executing the mutation. 6448 UserErrors []*UserError `json:"userErrors,omitempty"` 6449 } 6450 6451 // Return type for `orderEditRemoveLineItemDiscount` mutation. 6452 type OrderEditRemoveLineItemDiscountPayload struct { 6453 // The line item with the discount removed. 6454 CalculatedLineItem *CalculatedLineItem `json:"calculatedLineItem,omitempty"` 6455 // An order with the edits calculated. 6456 CalculatedOrder *CalculatedOrder `json:"calculatedOrder,omitempty"` 6457 // List of errors that occurred executing the mutation. 6458 UserErrors []*UserError `json:"userErrors,omitempty"` 6459 } 6460 6461 // Return type for `orderEditSetQuantity` mutation. 6462 type OrderEditSetQuantityPayload struct { 6463 // The line item with changes calculated. 6464 CalculatedLineItem *CalculatedLineItem `json:"calculatedLineItem,omitempty"` 6465 // An order with the edits calculated. 6466 CalculatedOrder *CalculatedOrder `json:"calculatedOrder,omitempty"` 6467 // List of errors that occurred executing the mutation. 6468 UserErrors []*UserError `json:"userErrors,omitempty"` 6469 } 6470 6471 // Specifies the information to be updated on the requested order. 6472 type OrderInput struct { 6473 // The email address associated with the order. 6474 Email *null.String `json:"email,omitempty"` 6475 // The ID of the order to update. 6476 ID null.String `json:"id,omitempty"` 6477 // The order note. 6478 Note *null.String `json:"note,omitempty"` 6479 // A comma separated list of tags that have been added to the order. 6480 Tags []null.String `json:"tags,omitempty"` 6481 // The shipping address associated with the order. 6482 ShippingAddress *MailingAddressInput `json:"shippingAddress,omitempty"` 6483 // Custom information to add to the order, represented as a key value pair. Also referred to as note attributes. 6484 CustomAttributes []*AttributeInput `json:"customAttributes,omitempty"` 6485 // The metafields to associate with this order. 6486 Metafields []*MetafieldInput `json:"metafields,omitempty"` 6487 // The localization extensions attached to the order. For example, Tax IDs. 6488 LocalizationExtensions []*LocalizationExtensionInput `json:"localizationExtensions,omitempty"` 6489 } 6490 6491 // Specifies the order to mark as paid. 6492 type OrderMarkAsPaidInput struct { 6493 // The ID of the order to mark as paid. 6494 ID null.String `json:"id,omitempty"` 6495 } 6496 6497 // Return type for `orderMarkAsPaid` mutation. 6498 type OrderMarkAsPaidPayload struct { 6499 // The order marked as paid. 6500 Order *Order `json:"order,omitempty"` 6501 // List of errors that occurred executing the mutation. 6502 UserErrors []*UserError `json:"userErrors,omitempty"` 6503 } 6504 6505 // Specifies a closed order to open. 6506 type OrderOpenInput struct { 6507 // The ID of the order to open. 6508 ID null.String `json:"id,omitempty"` 6509 } 6510 6511 // Return type for `orderOpen` mutation. 6512 type OrderOpenPayload struct { 6513 // The opened order. 6514 Order *Order `json:"order,omitempty"` 6515 // List of errors that occurred executing the mutation. 6516 UserErrors []*UserError `json:"userErrors,omitempty"` 6517 } 6518 6519 // The payment collection details for an order requiring additional payment. 6520 type OrderPaymentCollectionDetails struct { 6521 // URL allowing additional payments to be collected on the order. 6522 AdditionalPaymentCollectionURL *null.String `json:"additionalPaymentCollectionUrl,omitempty"` 6523 } 6524 6525 // Represents a fraud check on an order. 6526 type OrderRisk struct { 6527 // Whether the risk level is shown in the Shopify admin. If false, then this order risk is ignored when Shopify determines the overall risk level for the order. 6528 Display bool `json:"display,omitempty"` 6529 // The likelihood that an order is fraudulent, based on this order risk. 6530 // 6531 // The level can be set by Shopify risk analysis or by an app. 6532 Level *OrderRiskLevel `json:"level,omitempty"` 6533 // The risk message that's shown to the merchant in the Shopify admin. 6534 Message *null.String `json:"message,omitempty"` 6535 } 6536 6537 // A newly created custom item. 6538 type OrderStagedChangeAddCustomItem struct { 6539 // The price of an individual item without any discounts applied. 6540 OriginalUnitPrice *MoneyV2 `json:"originalUnitPrice,omitempty"` 6541 // The number of items. 6542 Quantity int `json:"quantity,omitempty"` 6543 // The title of the item. 6544 Title null.String `json:"title,omitempty"` 6545 } 6546 6547 func (OrderStagedChangeAddCustomItem) IsOrderStagedChange() {} 6548 6549 // A discount application added as part of an order edit. 6550 type OrderStagedChangeAddLineItemDiscount struct { 6551 // The description of the discount. 6552 Description null.String `json:"description,omitempty"` 6553 // A globally unique identifier. 6554 ID null.String `json:"id,omitempty"` 6555 // The amount of the discount. 6556 Value PricingValue `json:"value,omitempty"` 6557 } 6558 6559 func (OrderStagedChangeAddLineItemDiscount) IsOrderStagedChange() {} 6560 6561 // A new shipping line added as part of an order edit. 6562 type OrderStagedChangeAddShippingLine struct { 6563 // Shipping line phone number. 6564 Phone *null.String `json:"phone,omitempty"` 6565 // The presentment title of the shipping line. 6566 PresentmentTitle *null.String `json:"presentmentTitle,omitempty"` 6567 // Price of shipping line. 6568 Price *MoneyV2 `json:"price,omitempty"` 6569 // The title of the shipping line. 6570 Title *null.String `json:"title,omitempty"` 6571 } 6572 6573 func (OrderStagedChangeAddShippingLine) IsOrderStagedChange() {} 6574 6575 // A new item created from an existing product variant. 6576 type OrderStagedChangeAddVariant struct { 6577 // The number of items. 6578 Quantity int `json:"quantity,omitempty"` 6579 // The product variant of the added item. 6580 Variant *ProductVariant `json:"variant,omitempty"` 6581 } 6582 6583 func (OrderStagedChangeAddVariant) IsOrderStagedChange() {} 6584 6585 // An auto-generated type for paginating through multiple OrderStagedChanges. 6586 type OrderStagedChangeConnection struct { 6587 // A list of edges. 6588 Edges []*OrderStagedChangeEdge `json:"edges,omitempty"` 6589 // Information to aid in pagination. 6590 PageInfo *PageInfo `json:"pageInfo,omitempty"` 6591 } 6592 6593 // An removal of items from an existing line item on the order. 6594 type OrderStagedChangeDecrementItem struct { 6595 // The number of items removed. 6596 Delta int `json:"delta,omitempty"` 6597 // The original line item. 6598 LineItem *LineItem `json:"lineItem,omitempty"` 6599 // The intention to restock the removed items. 6600 Restock bool `json:"restock,omitempty"` 6601 } 6602 6603 func (OrderStagedChangeDecrementItem) IsOrderStagedChange() {} 6604 6605 // An auto-generated type which holds one OrderStagedChange and a cursor during pagination. 6606 type OrderStagedChangeEdge struct { 6607 // A cursor for use in pagination. 6608 Cursor null.String `json:"cursor,omitempty"` 6609 // The item at the end of OrderStagedChangeEdge. 6610 Node OrderStagedChange `json:"node,omitempty"` 6611 } 6612 6613 // An addition of items to an existing line item on the order. 6614 type OrderStagedChangeIncrementItem struct { 6615 // The number of items added. 6616 Delta int `json:"delta,omitempty"` 6617 // The original line item. 6618 LineItem *LineItem `json:"lineItem,omitempty"` 6619 } 6620 6621 func (OrderStagedChangeIncrementItem) IsOrderStagedChange() {} 6622 6623 // A transaction represents an exchange of money as part of an order. 6624 type OrderTransaction struct { 6625 // The masked account number associated with the payment method. 6626 AccountNumber *null.String `json:"accountNumber,omitempty"` 6627 // The amount of money. 6628 Amount null.String `json:"amount,omitempty"` 6629 // The amount and currency of the transaction in shop and presentment currencies. 6630 AmountSet *MoneyBag `json:"amountSet,omitempty"` 6631 // The amount and currency of the transaction. 6632 AmountV2 *MoneyV2 `json:"amountV2,omitempty"` 6633 // Authorization code associated with the transaction. 6634 AuthorizationCode *null.String `json:"authorizationCode,omitempty"` 6635 // The time when the authorization expires. This field is available only to stores on a Shopify Plus plan and is populated only for Shopify Payments authorizations. 6636 AuthorizationExpiresAt *null.String `json:"authorizationExpiresAt,omitempty"` 6637 // Date and time when the transaction was created. 6638 CreatedAt null.String `json:"createdAt,omitempty"` 6639 // A standardized error code, independent of the payment provider. 6640 ErrorCode *OrderTransactionErrorCode `json:"errorCode,omitempty"` 6641 // The transaction fees charged on the order transaction. 6642 Fees []*TransactionFee `json:"fees,omitempty"` 6643 // The human-readable payment gateway name used to process the transaction. 6644 FormattedGateway *null.String `json:"formattedGateway,omitempty"` 6645 // The payment gateway used to process the transaction. 6646 Gateway *null.String `json:"gateway,omitempty"` 6647 // Globally unique identifier. 6648 ID null.String `json:"id,omitempty"` 6649 // The kind of transaction. 6650 Kind OrderTransactionKind `json:"kind,omitempty"` 6651 // Whether the transaction can be manually captured. 6652 ManuallyCapturable bool `json:"manuallyCapturable,omitempty"` 6653 // Specifies the available amount to refund on the gateway. Only available within SuggestedRefund. 6654 MaximumRefundable *null.String `json:"maximumRefundable,omitempty"` 6655 // Specifies the available amount with currency to refund on the gateway. 6656 // Only available within SuggestedRefund. 6657 MaximumRefundableV2 *MoneyV2 `json:"maximumRefundableV2,omitempty"` 6658 // The associated order. 6659 Order *Order `json:"order,omitempty"` 6660 // The associated parent transaction, for example the authorization of a capture. 6661 ParentTransaction *OrderTransaction `json:"parentTransaction,omitempty"` 6662 // Specifies the payment icon to display for this transaction. 6663 PaymentIcon *Image `json:"paymentIcon,omitempty"` 6664 // Specifies the credit card company used to pay for this transaction. 6665 PaymentMethod *PaymentMethods `json:"paymentMethod,omitempty"` 6666 // Date and time when the transaction was processed. 6667 ProcessedAt *null.String `json:"processedAt,omitempty"` 6668 // A transaction receipt attached to the transaction by the gateway. 6669 // The value of this field depends on which gateway processed the transaction. 6670 Receipt *null.String `json:"receipt,omitempty"` 6671 // The settlement currency. 6672 SettlementCurrency *CurrencyCode `json:"settlementCurrency,omitempty"` 6673 // The rate used when converting the transaction amount to settlement currency. 6674 SettlementCurrencyRate *null.String `json:"settlementCurrencyRate,omitempty"` 6675 // Contains all Shopify Payments information related to an order transaction. This field is available only to stores on a Shopify Plus plan. 6676 ShopifyPaymentsSet *ShopifyPaymentsTransactionSet `json:"shopifyPaymentsSet,omitempty"` 6677 // The status of this transaction. 6678 Status OrderTransactionStatus `json:"status,omitempty"` 6679 // Whether the transaction is a test transaction. 6680 Test bool `json:"test,omitempty"` 6681 // Specifies the available amount to capture on the gateway. 6682 // Only available when an amount is capturable or manually mark as paid. 6683 TotalUnsettled *null.String `json:"totalUnsettled,omitempty"` 6684 // Specifies the available amount with currency to capture on the gateway in shop and presentment currencies. 6685 // Only available when an amount is capturable or manually mark as paid. 6686 TotalUnsettledSet *MoneyBag `json:"totalUnsettledSet,omitempty"` 6687 // Specifies the available amount with currency to capture on the gateway. 6688 // Only available when an amount is capturable or manually mark as paid. 6689 TotalUnsettledV2 *MoneyV2 `json:"totalUnsettledV2,omitempty"` 6690 } 6691 6692 func (OrderTransaction) IsNode() {} 6693 6694 // An auto-generated type for paginating through multiple OrderTransactions. 6695 type OrderTransactionConnection struct { 6696 // A list of edges. 6697 Edges []*OrderTransactionEdge `json:"edges,omitempty"` 6698 // Information to aid in pagination. 6699 PageInfo *PageInfo `json:"pageInfo,omitempty"` 6700 } 6701 6702 // An auto-generated type which holds one OrderTransaction and a cursor during pagination. 6703 type OrderTransactionEdge struct { 6704 // A cursor for use in pagination. 6705 Cursor null.String `json:"cursor,omitempty"` 6706 // The item at the end of OrderTransactionEdge. 6707 Node *OrderTransaction `json:"node,omitempty"` 6708 } 6709 6710 // Specifies the information needed to create an order transaction. 6711 type OrderTransactionInput struct { 6712 // The amount of money for this transaction. 6713 Amount null.String `json:"amount,omitempty"` 6714 // The payment gateway to use for this transaction. 6715 Gateway null.String `json:"gateway,omitempty"` 6716 // The kind of transaction. 6717 Kind OrderTransactionKind `json:"kind,omitempty"` 6718 // The ID of the order associated with the transaction. 6719 OrderID null.String `json:"orderId,omitempty"` 6720 // The ID of the optional parent transaction, for example the authorization of a capture. 6721 ParentID *null.String `json:"parentId,omitempty"` 6722 } 6723 6724 // Return type for `orderUpdate` mutation. 6725 type OrderUpdatePayload struct { 6726 // The updated order. 6727 Order *Order `json:"order,omitempty"` 6728 // List of errors that occurred executing the mutation. 6729 UserErrors []*UserError `json:"userErrors,omitempty"` 6730 } 6731 6732 // Information about pagination in a connection. 6733 type PageInfo struct { 6734 // Indicates if there are more pages to fetch. 6735 HasNextPage bool `json:"hasNextPage,omitempty"` 6736 // Indicates if there are any pages prior to the current page. 6737 HasPreviousPage bool `json:"hasPreviousPage,omitempty"` 6738 } 6739 6740 // Represents a payment session. 6741 type PaymentSession struct { 6742 // A globally unique identifier. 6743 ID null.String `json:"id,omitempty"` 6744 // The url of the Checkout to redirect the buyer to. 6745 RedirectURL null.String `json:"redirectUrl,omitempty"` 6746 // The payment status. 6747 Status *PaymentSessionStatus `json:"status,omitempty"` 6748 } 6749 6750 // Return type for `paymentSessionReject` mutation. 6751 type PaymentSessionRejectPayload struct { 6752 // The updated payment session. 6753 PaymentSession *PaymentSession `json:"paymentSession,omitempty"` 6754 // List of errors that occurred executing the mutation. 6755 UserErrors []*UserError `json:"userErrors,omitempty"` 6756 } 6757 6758 // Reason of the payment status. 6759 type PaymentSessionRejectionReasonInput struct { 6760 // The reason code. 6761 Code PaymentSessionStatusReasonRejectionCode `json:"code,omitempty"` 6762 // A custom, localized message for the merchant. 6763 MerchantMessage *null.String `json:"merchantMessage,omitempty"` 6764 } 6765 6766 // Return type for `paymentSessionResolve` mutation. 6767 type PaymentSessionResolvePayload struct { 6768 // The updated payment session. 6769 PaymentSession *PaymentSession `json:"paymentSession,omitempty"` 6770 // List of errors that occurred executing the mutation. 6771 UserErrors []*UserError `json:"userErrors,omitempty"` 6772 } 6773 6774 // Represents a payment status. 6775 type PaymentSessionStatus struct { 6776 // The payment status code. 6777 Code PaymentSessionStatusCode `json:"code,omitempty"` 6778 // The payment status reason (if applicable). 6779 Reason *PaymentSessionStatusReason `json:"reason,omitempty"` 6780 } 6781 6782 // Payment status reason. 6783 type PaymentSessionStatusReason struct { 6784 // The reason code. 6785 Code PaymentSessionStatusReasonRejectionCode `json:"code,omitempty"` 6786 // The custom, localized message for the merchant. 6787 MerchantMessage *null.String `json:"merchantMessage,omitempty"` 6788 } 6789 6790 // Settings related to payments. 6791 type PaymentSettings struct { 6792 // List of the digital wallets which the shop supports. 6793 SupportedDigitalWallets []DigitalWallet `json:"supportedDigitalWallets,omitempty"` 6794 } 6795 6796 // The production configuration of the payments app. 6797 type PaymentsAppConfiguration struct { 6798 // Handle used by the provider. 6799 ExternalHandle *null.String `json:"externalHandle,omitempty"` 6800 // The provider is ready to process merchant's payments. 6801 Ready bool `json:"ready,omitempty"` 6802 } 6803 6804 // Return type for `paymentsAppConfigure` mutation. 6805 type PaymentsAppConfigurePayload struct { 6806 // The production configuration of the payments app. 6807 PaymentsAppConfiguration *PaymentsAppConfiguration `json:"paymentsAppConfiguration,omitempty"` 6808 // List of errors that occurred executing the mutation. 6809 UserErrors []*UserError `json:"userErrors,omitempty"` 6810 } 6811 6812 // Price rules are a set of conditions, including entitlements and prerequisites, that must be met in order for a discount code to apply. 6813 type PriceRule struct { 6814 // The maximum number of times that the price rule can be allocated onto an order. 6815 AllocationLimit *int `json:"allocationLimit,omitempty"` 6816 // The method by which the price rule's value is allocated to its entitled items. 6817 AllocationMethod PriceRuleAllocationMethod `json:"allocationMethod,omitempty"` 6818 // The application that created the price rule. 6819 App *App `json:"app,omitempty"` 6820 // The date and time when the price rule was created. 6821 CreatedAt null.String `json:"createdAt,omitempty"` 6822 // The customers that can use this price rule. 6823 CustomerSelection *PriceRuleCustomerSelection `json:"customerSelection,omitempty"` 6824 // List of the price rule's discount codes. 6825 DiscountCodes *PriceRuleDiscountCodeConnection `json:"discountCodes,omitempty"` 6826 // How many discount codes associated with the price rule. 6827 DiscountCodesCount int `json:"discountCodesCount,omitempty"` 6828 // The date and time when the price rule ends. For open-ended price rules, use `null`. 6829 EndsAt *null.String `json:"endsAt,omitempty"` 6830 // Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. 6831 EntitlementToPrerequisiteQuantityRatio *PriceRuleEntitlementToPrerequisiteQuantityRatio `json:"entitlementToPrerequisiteQuantityRatio,omitempty"` 6832 // The paginated list of events associated with the price rule. 6833 Events *EventConnection `json:"events,omitempty"` 6834 // A list of the price rule's features. 6835 Features []PriceRuleFeature `json:"features,omitempty"` 6836 // Indicates whether there are any timeline comments on the price rule. 6837 HasTimelineComment bool `json:"hasTimelineComment,omitempty"` 6838 // Globally unique identifier. 6839 ID null.String `json:"id,omitempty"` 6840 // The items to which the price rule applies. 6841 ItemEntitlements *PriceRuleItemEntitlements `json:"itemEntitlements,omitempty"` 6842 // The items required for the price rule to be applicable. 6843 ItemPrerequisites *PriceRuleLineItemPrerequisites `json:"itemPrerequisites,omitempty"` 6844 // The ID of the corresponding resource in the REST Admin API. 6845 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 6846 // Whether the price rule can be applied only once per customer. 6847 OncePerCustomer bool `json:"oncePerCustomer,omitempty"` 6848 // The number of the entitled items must fall within this range for the price rule to be applicable. 6849 PrerequisiteQuantityRange *PriceRuleQuantityRange `json:"prerequisiteQuantityRange,omitempty"` 6850 // The shipping cost must fall within this range for the price rule to be applicable. 6851 PrerequisiteShippingPriceRange *PriceRuleMoneyRange `json:"prerequisiteShippingPriceRange,omitempty"` 6852 // The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable. 6853 PrerequisiteSubtotalRange *PriceRuleMoneyRange `json:"prerequisiteSubtotalRange,omitempty"` 6854 // Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. 6855 PrerequisiteToEntitlementQuantityRatio *PriceRulePrerequisiteToEntitlementQuantityRatio `json:"prerequisiteToEntitlementQuantityRatio,omitempty"` 6856 // URLs that can be used to share the discount. 6857 ShareableUrls []*PriceRuleShareableURL `json:"shareableUrls,omitempty"` 6858 // The shipping lines to which the price rule applies. 6859 ShippingEntitlements *PriceRuleShippingLineEntitlements `json:"shippingEntitlements,omitempty"` 6860 // The date and time when the price rule starts. 6861 StartsAt null.String `json:"startsAt,omitempty"` 6862 // The status of the price rule. 6863 Status PriceRuleStatus `json:"status,omitempty"` 6864 // A detailed summary of the price rule. 6865 Summary *null.String `json:"summary,omitempty"` 6866 // The type of lines (line_item or shipping_line) to which the price rule applies. 6867 Target PriceRuleTarget `json:"target,omitempty"` 6868 // The title of the price rule. 6869 Title null.String `json:"title,omitempty"` 6870 // The total sales from orders where the price rule was used. 6871 TotalSales *MoneyV2 `json:"totalSales,omitempty"` 6872 // A list of the price rule's features. 6873 Traits []PriceRuleTrait `json:"traits,omitempty"` 6874 // The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count. 6875 UsageCount int `json:"usageCount,omitempty"` 6876 // The maximum number of times that the price rule can be used in total. 6877 UsageLimit *int `json:"usageLimit,omitempty"` 6878 // A time period during which a price rule is applicable. 6879 ValidityPeriod *PriceRuleValidityPeriod `json:"validityPeriod,omitempty"` 6880 // The value of the price rule. 6881 Value PriceRuleValue `json:"value,omitempty"` 6882 // The value of the price rule. 6883 ValueV2 PricingValue `json:"valueV2,omitempty"` 6884 } 6885 6886 func (PriceRule) IsNode() {} 6887 func (PriceRule) IsCommentEventSubject() {} 6888 func (PriceRule) IsLegacyInteroperability() {} 6889 func (PriceRule) IsHasEvents() {} 6890 6891 // Return type for `priceRuleActivate` mutation. 6892 type PriceRuleActivatePayload struct { 6893 // The activated price rule. 6894 PriceRule *PriceRule `json:"priceRule,omitempty"` 6895 // List of errors that occurred executing the mutation. 6896 PriceRuleUserErrors []*PriceRuleUserError `json:"priceRuleUserErrors,omitempty"` 6897 // List of errors that occurred executing the mutation. 6898 UserErrors []*UserError `json:"userErrors,omitempty"` 6899 } 6900 6901 // An auto-generated type for paginating through multiple PriceRules. 6902 type PriceRuleConnection struct { 6903 // A list of edges. 6904 Edges []*PriceRuleEdge `json:"edges,omitempty"` 6905 // Information to aid in pagination. 6906 PageInfo *PageInfo `json:"pageInfo,omitempty"` 6907 } 6908 6909 // Return type for `priceRuleCreate` mutation. 6910 type PriceRuleCreatePayload struct { 6911 // The newly created price rule. 6912 PriceRule *PriceRule `json:"priceRule,omitempty"` 6913 // The newly created discount code. 6914 PriceRuleDiscountCode *PriceRuleDiscountCode `json:"priceRuleDiscountCode,omitempty"` 6915 // List of errors that occurred executing the mutation. 6916 PriceRuleUserErrors []*PriceRuleUserError `json:"priceRuleUserErrors,omitempty"` 6917 // List of errors that occurred executing the mutation. 6918 UserErrors []*UserError `json:"userErrors,omitempty"` 6919 } 6920 6921 // A selection of customers for whom the price rule applies. 6922 type PriceRuleCustomerSelection struct { 6923 // List of customers to whom the price rule applies. 6924 Customers *CustomerConnection `json:"customers,omitempty"` 6925 // Whether the price rule applies to all customers. 6926 ForAllCustomers bool `json:"forAllCustomers,omitempty"` 6927 // A list of customer saved searches that contain the customers who can use the price rule. 6928 SavedSearches []*SavedSearch `json:"savedSearches,omitempty"` 6929 } 6930 6931 // Specifies the input fields to update a price rule customer selection. 6932 type PriceRuleCustomerSelectionInput struct { 6933 // Whether the price rule applies to all customers. 6934 ForAllCustomers *bool `json:"forAllCustomers,omitempty"` 6935 // List of customer saved searches that contain the customers to whom the price rule applies. No single customer IDs may be present. 6936 SavedSearchIds []null.String `json:"savedSearchIds,omitempty"` 6937 // List of customers to add to the current list of customers to whom the price rule applies. `savedSearchIds` must be empty. 6938 CustomerIdsToAdd []null.String `json:"customerIdsToAdd,omitempty"` 6939 // A list of customers to remove from the current list of customers to whom the price rule applies. 6940 CustomerIdsToRemove []null.String `json:"customerIdsToRemove,omitempty"` 6941 } 6942 6943 // Return type for `priceRuleDeactivate` mutation. 6944 type PriceRuleDeactivatePayload struct { 6945 // The deactivated price rule. 6946 PriceRule *PriceRule `json:"priceRule,omitempty"` 6947 // List of errors that occurred executing the mutation. 6948 PriceRuleUserErrors []*PriceRuleUserError `json:"priceRuleUserErrors,omitempty"` 6949 // List of errors that occurred executing the mutation. 6950 UserErrors []*UserError `json:"userErrors,omitempty"` 6951 } 6952 6953 // Return type for `priceRuleDelete` mutation. 6954 type PriceRuleDeletePayload struct { 6955 // The id price of the deleted price rule. 6956 DeletedPriceRuleID *null.String `json:"deletedPriceRuleId,omitempty"` 6957 // List of errors that occurred executing the mutation. 6958 PriceRuleUserErrors []*PriceRuleUserError `json:"priceRuleUserErrors,omitempty"` 6959 // The shop of the deleted price rule. 6960 Shop *Shop `json:"shop,omitempty"` 6961 // List of errors that occurred executing the mutation. 6962 UserErrors []*UserError `json:"userErrors,omitempty"` 6963 } 6964 6965 // A discount code of a price rule. 6966 type PriceRuleDiscountCode struct { 6967 // The application that created the discount code. 6968 App *App `json:"app,omitempty"` 6969 // The code to use the discount. 6970 Code null.String `json:"code,omitempty"` 6971 // Globally unique identifier. 6972 ID null.String `json:"id,omitempty"` 6973 // The number of times that the price rule has been used. This value is updated asynchronously and can be different than the actual usage count. 6974 UsageCount int `json:"usageCount,omitempty"` 6975 } 6976 6977 func (PriceRuleDiscountCode) IsNode() {} 6978 6979 // An auto-generated type for paginating through multiple PriceRuleDiscountCodes. 6980 type PriceRuleDiscountCodeConnection struct { 6981 // A list of edges. 6982 Edges []*PriceRuleDiscountCodeEdge `json:"edges,omitempty"` 6983 // Information to aid in pagination. 6984 PageInfo *PageInfo `json:"pageInfo,omitempty"` 6985 } 6986 6987 // Return type for `priceRuleDiscountCodeCreate` mutation. 6988 type PriceRuleDiscountCodeCreatePayload struct { 6989 // The updated price rule. 6990 PriceRule *PriceRule `json:"priceRule,omitempty"` 6991 // The newly created discount code. 6992 PriceRuleDiscountCode *PriceRuleDiscountCode `json:"priceRuleDiscountCode,omitempty"` 6993 // List of errors that occurred executing the mutation. 6994 PriceRuleUserErrors []*PriceRuleUserError `json:"priceRuleUserErrors,omitempty"` 6995 // List of errors that occurred executing the mutation. 6996 UserErrors []*UserError `json:"userErrors,omitempty"` 6997 } 6998 6999 // An auto-generated type which holds one PriceRuleDiscountCode and a cursor during pagination. 7000 type PriceRuleDiscountCodeEdge struct { 7001 // A cursor for use in pagination. 7002 Cursor null.String `json:"cursor,omitempty"` 7003 // The item at the end of PriceRuleDiscountCodeEdge. 7004 Node *PriceRuleDiscountCode `json:"node,omitempty"` 7005 } 7006 7007 // Specifies the input fields to manipulate a discount code. 7008 type PriceRuleDiscountCodeInput struct { 7009 // The code to use the discount. 7010 Code *null.String `json:"code,omitempty"` 7011 } 7012 7013 // Return type for `priceRuleDiscountCodeUpdate` mutation. 7014 type PriceRuleDiscountCodeUpdatePayload struct { 7015 // The updated price rule. 7016 PriceRule *PriceRule `json:"priceRule,omitempty"` 7017 // The updated discount code. 7018 PriceRuleDiscountCode *PriceRuleDiscountCode `json:"priceRuleDiscountCode,omitempty"` 7019 // List of errors that occurred executing the mutation. 7020 PriceRuleUserErrors []*PriceRuleUserError `json:"priceRuleUserErrors,omitempty"` 7021 // List of errors that occurred executing the mutation. 7022 UserErrors []*UserError `json:"userErrors,omitempty"` 7023 } 7024 7025 // An auto-generated type which holds one PriceRule and a cursor during pagination. 7026 type PriceRuleEdge struct { 7027 // A cursor for use in pagination. 7028 Cursor null.String `json:"cursor,omitempty"` 7029 // The item at the end of PriceRuleEdge. 7030 Node *PriceRule `json:"node,omitempty"` 7031 } 7032 7033 // Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. 7034 type PriceRuleEntitlementToPrerequisiteQuantityRatio struct { 7035 // The quantity of entitlements in the ratio. 7036 EntitlementQuantity int `json:"entitlementQuantity,omitempty"` 7037 // The quantity of prerequisites in the ratio. 7038 PrerequisiteQuantity int `json:"prerequisiteQuantity,omitempty"` 7039 } 7040 7041 // Specifies the quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. 7042 type PriceRuleEntitlementToPrerequisiteQuantityRatioInput struct { 7043 // The quantity of entitlements in the ratio. 7044 EntitlementQuantity *int `json:"entitlementQuantity,omitempty"` 7045 // The quantity of prerequisites in the ratio. 7046 PrerequisiteQuantity *int `json:"prerequisiteQuantity,omitempty"` 7047 } 7048 7049 // The value of a fixed amount price rule. 7050 type PriceRuleFixedAmountValue struct { 7051 // The monetary value of the price rule. 7052 Amount null.String `json:"amount,omitempty"` 7053 } 7054 7055 func (PriceRuleFixedAmountValue) IsPriceRuleValue() {} 7056 7057 // Specifies the input fields to manipulate a price rule. 7058 type PriceRuleInput struct { 7059 // PriceRuleValidityPeriod for the price rule. 7060 ValidityPeriod *PriceRuleValidityPeriodInput `json:"validityPeriod,omitempty"` 7061 // Whether the price rule can be applied only once per customer. 7062 OncePerCustomer *bool `json:"oncePerCustomer,omitempty"` 7063 // The customers that can use this price rule. 7064 CustomerSelection *PriceRuleCustomerSelectionInput `json:"customerSelection,omitempty"` 7065 // The maximum number of times that the price rule can be used in total. 7066 UsageLimit *int `json:"usageLimit,omitempty"` 7067 // Title of the price rule. 7068 Title *null.String `json:"title,omitempty"` 7069 // The maximum number of times that the price rule can be allocated onto an order. 7070 AllocationLimit *int `json:"allocationLimit,omitempty"` 7071 // The method by which the price rule's value is allocated to its entitled items. 7072 AllocationMethod *PriceRuleAllocationMethod `json:"allocationMethod,omitempty"` 7073 // The value of the price rule. 7074 Value *PriceRuleValueInput `json:"value,omitempty"` 7075 // The type of lines (line_item or shipping_line) to which the price rule applies. 7076 Target *PriceRuleTarget `json:"target,omitempty"` 7077 // The sum of the entitled items subtotal prices must fall within this range for the price rule to be applicable. 7078 PrerequisiteSubtotalRange *PriceRuleMoneyRangeInput `json:"prerequisiteSubtotalRange,omitempty"` 7079 // The number of the entitled items must fall within this range for the price rule to be applicable. 7080 PrerequisiteQuantityRange *PriceRuleQuantityRangeInput `json:"prerequisiteQuantityRange,omitempty"` 7081 // The shipping cost must fall within this range for the price rule to be applicable. 7082 PrerequisiteShippingPriceRange *PriceRuleMoneyRangeInput `json:"prerequisiteShippingPriceRange,omitempty"` 7083 // The items to which the price rule applies. 7084 ItemEntitlements *PriceRuleItemEntitlementsInput `json:"itemEntitlements,omitempty"` 7085 // The items required for the price rule to be applicable. 7086 ItemPrerequisites *PriceRuleItemPrerequisitesInput `json:"itemPrerequisites,omitempty"` 7087 // The shipping lines to which the price rule applies. 7088 ShippingEntitlements *PriceRuleShippingEntitlementsInput `json:"shippingEntitlements,omitempty"` 7089 // Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. This argument is deprecated: Use `prerequisiteToEntitlementQuantityRatio` instead. 7090 EntitlementToPrerequisiteQuantityRatio *PriceRuleEntitlementToPrerequisiteQuantityRatioInput `json:"entitlementToPrerequisiteQuantityRatio,omitempty"` 7091 // Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. 7092 PrerequisiteToEntitlementQuantityRatio *PriceRulePrerequisiteToEntitlementQuantityRatioInput `json:"prerequisiteToEntitlementQuantityRatio,omitempty"` 7093 } 7094 7095 // The items to which this price rule applies. This may be multiple products, product variants, collections or combinations of the aforementioned. 7096 type PriceRuleItemEntitlements struct { 7097 // The collections to which the price rule applies. 7098 Collections *CollectionConnection `json:"collections,omitempty"` 7099 // The product variants to which the price rule applies. 7100 ProductVariants *ProductVariantConnection `json:"productVariants,omitempty"` 7101 // The products to which the price rule applies. 7102 Products *ProductConnection `json:"products,omitempty"` 7103 // Whether the price rule applies to all line items. 7104 TargetAllLineItems bool `json:"targetAllLineItems,omitempty"` 7105 } 7106 7107 // Specifies the input fields to update a price rule line item entitlement. 7108 type PriceRuleItemEntitlementsInput struct { 7109 // Whether the price rule applies to all items. 7110 TargetAllLineItems *bool `json:"targetAllLineItems,omitempty"` 7111 // The products to which the price rule applies. 7112 ProductIds []null.String `json:"productIds,omitempty"` 7113 // The product variants to which the price rule applies. 7114 ProductVariantIds []null.String `json:"productVariantIds,omitempty"` 7115 // The collections to which the price rule applies. 7116 CollectionIds []null.String `json:"collectionIds,omitempty"` 7117 } 7118 7119 // Specifies the input fields to update a price rule's item prerequisites. 7120 type PriceRuleItemPrerequisitesInput struct { 7121 // The products needed for the price rule to be applied. 7122 ProductIds []null.String `json:"productIds,omitempty"` 7123 // The product variants needed for the price rule to be applied. 7124 ProductVariantIds []null.String `json:"productVariantIds,omitempty"` 7125 // The collections needed for the price rule to be applied. 7126 CollectionIds []null.String `json:"collectionIds,omitempty"` 7127 } 7128 7129 // Single or multiple line item products, product variants or collections required for the price rule to be applicable, can also be provided in combination. 7130 type PriceRuleLineItemPrerequisites struct { 7131 // The collections required for the price rule to be applicable. 7132 Collections *CollectionConnection `json:"collections,omitempty"` 7133 // The product variants required for the price rule to be applicable. 7134 ProductVariants *ProductVariantConnection `json:"productVariants,omitempty"` 7135 // The products required for the price rule to be applicable. 7136 Products *ProductConnection `json:"products,omitempty"` 7137 } 7138 7139 // A money range within which the price rule is applicable. 7140 type PriceRuleMoneyRange struct { 7141 // The lower bound of the money range. 7142 GreaterThan *null.String `json:"greaterThan,omitempty"` 7143 // The lower bound or equal of the money range. 7144 GreaterThanOrEqualTo *null.String `json:"greaterThanOrEqualTo,omitempty"` 7145 // The upper bound of the money range. 7146 LessThan *null.String `json:"lessThan,omitempty"` 7147 // The upper bound or equal of the money range. 7148 LessThanOrEqualTo *null.String `json:"lessThanOrEqualTo,omitempty"` 7149 } 7150 7151 // Specifies the input fields to update the money range within which the price rule is applicable. 7152 type PriceRuleMoneyRangeInput struct { 7153 // The upper bound of the money range. 7154 LessThan *null.String `json:"lessThan,omitempty"` 7155 // The upper or equal bound of the money range. 7156 LessThanOrEqualTo *null.String `json:"lessThanOrEqualTo,omitempty"` 7157 // The lower bound of the money range. 7158 GreaterThan *null.String `json:"greaterThan,omitempty"` 7159 // The lower or equal bound of the money range. 7160 GreaterThanOrEqualTo *null.String `json:"greaterThanOrEqualTo,omitempty"` 7161 } 7162 7163 // The value of a percent price rule. 7164 type PriceRulePercentValue struct { 7165 // The percent value of the price rule. 7166 Percentage float64 `json:"percentage,omitempty"` 7167 } 7168 7169 func (PriceRulePercentValue) IsPriceRuleValue() {} 7170 7171 // Quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. 7172 type PriceRulePrerequisiteToEntitlementQuantityRatio struct { 7173 // The quantity of entitlements in the ratio. 7174 EntitlementQuantity int `json:"entitlementQuantity,omitempty"` 7175 // The quantity of prerequisites in the ratio. 7176 PrerequisiteQuantity int `json:"prerequisiteQuantity,omitempty"` 7177 } 7178 7179 // Specifies the quantity of prerequisite items required for the price rule to be applicable, compared to quantity of entitled items. 7180 type PriceRulePrerequisiteToEntitlementQuantityRatioInput struct { 7181 // The quantity of entitlements in the ratio. 7182 EntitlementQuantity *int `json:"entitlementQuantity,omitempty"` 7183 // The quantity of prerequisites in the ratio. 7184 PrerequisiteQuantity *int `json:"prerequisiteQuantity,omitempty"` 7185 } 7186 7187 // A quantity range within which the price rule is applicable. 7188 type PriceRuleQuantityRange struct { 7189 // The lower bound of the quantity range. 7190 GreaterThan *int `json:"greaterThan,omitempty"` 7191 // The lower bound or equal of the quantity range. 7192 GreaterThanOrEqualTo *int `json:"greaterThanOrEqualTo,omitempty"` 7193 // The upper bound of the quantity range. 7194 LessThan *int `json:"lessThan,omitempty"` 7195 // The upper bound or equal of the quantity range. 7196 LessThanOrEqualTo *int `json:"lessThanOrEqualTo,omitempty"` 7197 } 7198 7199 // Specifies the input fields to update the quantity range within which the price rule is applicable. 7200 type PriceRuleQuantityRangeInput struct { 7201 // The upper bound of the quantity range. 7202 LessThan *int `json:"lessThan,omitempty"` 7203 // The upper or equal bound of the quantity range. 7204 LessThanOrEqualTo *int `json:"lessThanOrEqualTo,omitempty"` 7205 // The lower bound of the quantity range. 7206 GreaterThan *int `json:"greaterThan,omitempty"` 7207 // The lower or equal bound of the quantity range. 7208 GreaterThanOrEqualTo *int `json:"greaterThanOrEqualTo,omitempty"` 7209 } 7210 7211 // Shareable URL for the discount code associated with the price rule. 7212 type PriceRuleShareableURL struct { 7213 // The image URL of the item (product or collection) to which the discount applies. 7214 TargetItemImage *Image `json:"targetItemImage,omitempty"` 7215 // The type of page that's associated with the URL. 7216 TargetType PriceRuleShareableURLTargetType `json:"targetType,omitempty"` 7217 // The title of the page that's associated with the URL. 7218 Title null.String `json:"title,omitempty"` 7219 // The URL for the discount code. 7220 URL null.String `json:"url,omitempty"` 7221 } 7222 7223 // Specifies the input fields to update a price rule shipping entitlement. 7224 type PriceRuleShippingEntitlementsInput struct { 7225 // Whether the price rule applies to all shipping lines. 7226 TargetAllShippingLines *bool `json:"targetAllShippingLines,omitempty"` 7227 // The codes for the countries to which the price rule applies to. 7228 CountryCodes []CountryCode `json:"countryCodes,omitempty"` 7229 // Whether the price rule is applicable to countries that have not been defined in the shop's shipping zones. 7230 IncludeRestOfWorld *bool `json:"includeRestOfWorld,omitempty"` 7231 } 7232 7233 // The shipping lines to which the price rule applies to. 7234 type PriceRuleShippingLineEntitlements struct { 7235 // The codes for the countries to which the price rule applies to. 7236 CountryCodes []CountryCode `json:"countryCodes,omitempty"` 7237 // Whether the price rule is applicable to countries that have not been defined in the shop's shipping zones. 7238 IncludeRestOfWorld bool `json:"includeRestOfWorld,omitempty"` 7239 // Whether the price rule applies to all shipping lines. 7240 TargetAllShippingLines bool `json:"targetAllShippingLines,omitempty"` 7241 } 7242 7243 // Return type for `priceRuleUpdate` mutation. 7244 type PriceRuleUpdatePayload struct { 7245 // The updated price rule. 7246 PriceRule *PriceRule `json:"priceRule,omitempty"` 7247 // The updated discount code. 7248 PriceRuleDiscountCode *PriceRuleDiscountCode `json:"priceRuleDiscountCode,omitempty"` 7249 // List of errors that occurred executing the mutation. 7250 PriceRuleUserErrors []*PriceRuleUserError `json:"priceRuleUserErrors,omitempty"` 7251 // List of errors that occurred executing the mutation. 7252 UserErrors []*UserError `json:"userErrors,omitempty"` 7253 } 7254 7255 // Represents an error that happens during execution of a price rule mutation. 7256 type PriceRuleUserError struct { 7257 // Error code to uniquely identify the error. 7258 Code *PriceRuleErrorCode `json:"code,omitempty"` 7259 // Path to the input field which caused the error. 7260 Field []null.String `json:"field,omitempty"` 7261 // The error message. 7262 Message null.String `json:"message,omitempty"` 7263 } 7264 7265 func (PriceRuleUserError) IsDisplayableError() {} 7266 7267 // A time period during which a price rule is applicable. 7268 type PriceRuleValidityPeriod struct { 7269 // The time after which the price rule becomes invalid. 7270 End *null.String `json:"end,omitempty"` 7271 // The time after which the price rule is valid. 7272 Start null.String `json:"start,omitempty"` 7273 } 7274 7275 // Specifies the input fields to update the validity period of a price rule. 7276 type PriceRuleValidityPeriodInput struct { 7277 // The time after which the price rule is valid. 7278 Start null.String `json:"start,omitempty"` 7279 // The time after which the price rule becomes invalid. 7280 End *null.String `json:"end,omitempty"` 7281 } 7282 7283 // Specifies the input fields to update a price rule. 7284 type PriceRuleValueInput struct { 7285 // The percentage value of the price rule. 7286 PercentageValue *float64 `json:"percentageValue,omitempty"` 7287 // The fixed amount value of the price rule. 7288 FixedAmountValue *null.String `json:"fixedAmountValue,omitempty"` 7289 } 7290 7291 // The value of the percentage pricing object. 7292 type PricingPercentageValue struct { 7293 // The percentage value of the object. 7294 Percentage float64 `json:"percentage,omitempty"` 7295 } 7296 7297 func (PricingPercentageValue) IsPricingValue() {} 7298 7299 // Private metafields represent custom metadata that is attached to a resource. 7300 // Private metafields are private to the application that creates them on a shop's resources. 7301 type PrivateMetafield struct { 7302 // The date and time when the private metafield was created. 7303 CreatedAt null.String `json:"createdAt,omitempty"` 7304 // The id of the private metafield. 7305 ID null.String `json:"id,omitempty"` 7306 // The key name for a private metafield. 7307 Key null.String `json:"key,omitempty"` 7308 // The namespace for a private metafield. 7309 Namespace null.String `json:"namespace,omitempty"` 7310 // The date and time when the private metafield was updated. 7311 UpdatedAt null.String `json:"updatedAt,omitempty"` 7312 // The value of a private metafield. 7313 Value null.String `json:"value,omitempty"` 7314 // Represents the private metafield value type. 7315 ValueType PrivateMetafieldValueType `json:"valueType,omitempty"` 7316 } 7317 7318 func (PrivateMetafield) IsNode() {} 7319 7320 // An auto-generated type for paginating through multiple PrivateMetafields. 7321 type PrivateMetafieldConnection struct { 7322 // A list of edges. 7323 Edges []*PrivateMetafieldEdge `json:"edges,omitempty"` 7324 // Information to aid in pagination. 7325 PageInfo *PageInfo `json:"pageInfo,omitempty"` 7326 } 7327 7328 // Specifies the input fields for a PrivateMetafield. 7329 type PrivateMetafieldDeleteInput struct { 7330 // The ID of the owning resource. 7331 Owner *null.String `json:"owner,omitempty"` 7332 // The namespace for the private metafield. 7333 Namespace null.String `json:"namespace,omitempty"` 7334 // The key for the private metafield. 7335 Key null.String `json:"key,omitempty"` 7336 } 7337 7338 // Return type for `privateMetafieldDelete` mutation. 7339 type PrivateMetafieldDeletePayload struct { 7340 // The ID of private metafield that was deleted. 7341 DeletedPrivateMetafieldID *null.String `json:"deletedPrivateMetafieldId,omitempty"` 7342 // List of errors that occurred executing the mutation. 7343 UserErrors []*UserError `json:"userErrors,omitempty"` 7344 } 7345 7346 // An auto-generated type which holds one PrivateMetafield and a cursor during pagination. 7347 type PrivateMetafieldEdge struct { 7348 // A cursor for use in pagination. 7349 Cursor null.String `json:"cursor,omitempty"` 7350 // The item at the end of PrivateMetafieldEdge. 7351 Node *PrivateMetafield `json:"node,omitempty"` 7352 } 7353 7354 // Specifies the input fields for a PrivateMetafield. 7355 type PrivateMetafieldInput struct { 7356 // The owning resource. 7357 Owner *null.String `json:"owner,omitempty"` 7358 // The namespace for the private metafield. 7359 Namespace null.String `json:"namespace,omitempty"` 7360 // The key for the private metafield. 7361 Key null.String `json:"key,omitempty"` 7362 // The value and value type of the metafield, wrapped in a ValueInput object. 7363 ValueInput *PrivateMetafieldValueInput `json:"valueInput,omitempty"` 7364 } 7365 7366 // Return type for `privateMetafieldUpsert` mutation. 7367 type PrivateMetafieldUpsertPayload struct { 7368 // The private metafield that was created or updated. 7369 PrivateMetafield *PrivateMetafield `json:"privateMetafield,omitempty"` 7370 // List of errors that occurred executing the mutation. 7371 UserErrors []*UserError `json:"userErrors,omitempty"` 7372 } 7373 7374 // Value Input wraps two fields of Private Metafields into one. Those fields are value and value_type. 7375 type PrivateMetafieldValueInput struct { 7376 // The value of a private metafield. 7377 Value null.String `json:"value,omitempty"` 7378 // Represents the private metafield value type. 7379 ValueType PrivateMetafieldValueType `json:"valueType,omitempty"` 7380 } 7381 7382 // Represents a product, including information about related collections and product variants. 7383 type Product struct { 7384 // The number of publications a resource is published to without feedback errors. 7385 AvailablePublicationCount int `json:"availablePublicationCount,omitempty"` 7386 // The description of the product, complete with HTML formatting. 7387 BodyHTML *null.String `json:"bodyHtml,omitempty"` 7388 // A list of the collections that include the product. 7389 Collections *CollectionConnection `json:"collections,omitempty"` 7390 // The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the product was created. 7391 CreatedAt null.String `json:"createdAt,omitempty"` 7392 // A default cursor for use in pagination. 7393 DefaultCursor null.String `json:"defaultCursor,omitempty"` 7394 // A stripped description of the product, single line with HTML tags removed. 7395 Description null.String `json:"description,omitempty"` 7396 // The description of the product, complete with HTML formatting. 7397 DescriptionHTML null.String `json:"descriptionHtml,omitempty"` 7398 // Stripped description of the product, single line with HTML tags removed. 7399 // Truncated to 60 characters. 7400 DescriptionPlainSummary null.String `json:"descriptionPlainSummary,omitempty"` 7401 // The featured image for the product. 7402 FeaturedImage *Image `json:"featuredImage,omitempty"` 7403 // The featured media for the product. 7404 FeaturedMedia Media `json:"featuredMedia,omitempty"` 7405 // Information about the product that's provided through resource feedback. 7406 Feedback *ResourceFeedback `json:"feedback,omitempty"` 7407 // The theme template used when viewing the gift card in a store. 7408 GiftCardTemplateSuffix *null.String `json:"giftCardTemplateSuffix,omitempty"` 7409 // A unique human-friendly string of the product's title. 7410 Handle null.String `json:"handle,omitempty"` 7411 // Whether the product has only a single variant with the default option and value. 7412 HasOnlyDefaultVariant bool `json:"hasOnlyDefaultVariant,omitempty"` 7413 // Whether the product has out of stock variants. 7414 HasOutOfStockVariants bool `json:"hasOutOfStockVariants,omitempty"` 7415 // Globally unique identifier. 7416 ID null.String `json:"id,omitempty"` 7417 // The images associated with the product. 7418 Images *ImageConnection `json:"images,omitempty"` 7419 // Whether the product is in a given collection. 7420 InCollection bool `json:"inCollection,omitempty"` 7421 // Whether the product is a gift card. 7422 IsGiftCard bool `json:"isGiftCard,omitempty"` 7423 // The ID of the corresponding resource in the REST Admin API. 7424 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 7425 // The media associated with the product. 7426 Media *MediaConnection `json:"media,omitempty"` 7427 // Total count of media belonging to a product. 7428 MediaCount int `json:"mediaCount,omitempty"` 7429 // The metafield associated with the resource. 7430 Metafield *Metafield `json:"metafield,omitempty"` 7431 // A paginated list of metafields associated with the resource. 7432 Metafields *MetafieldConnection `json:"metafields,omitempty"` 7433 // The online store preview URL. 7434 OnlineStorePreviewURL *null.String `json:"onlineStorePreviewUrl,omitempty"` 7435 // The online store URL for the product. 7436 // A value of `null` indicates that the product is not published to the Online Store sales channel. 7437 OnlineStoreURL *null.String `json:"onlineStoreUrl,omitempty"` 7438 // A list of product options. The limit is specified by Shop.resourceLimits.maxProductOptions. 7439 Options []*ProductOption `json:"options,omitempty"` 7440 // The price range of the product. 7441 PriceRange *ProductPriceRange `json:"priceRange,omitempty"` 7442 // The price range of the product with prices formatted as decimals. 7443 PriceRangeV2 *ProductPriceRangeV2 `json:"priceRangeV2,omitempty"` 7444 // Returns a private metafield found by namespace and key. 7445 PrivateMetafield *PrivateMetafield `json:"privateMetafield,omitempty"` 7446 // List of private metafields. 7447 PrivateMetafields *PrivateMetafieldConnection `json:"privateMetafields,omitempty"` 7448 // A list of the channels where the product is published. 7449 ProductPublications *ProductPublicationConnection `json:"productPublications,omitempty"` 7450 // The product type specified by the merchant. 7451 ProductType null.String `json:"productType,omitempty"` 7452 // The number of publications a resource is published on. 7453 PublicationCount int `json:"publicationCount,omitempty"` 7454 // A list of the channels where the product is published. 7455 Publications *ProductPublicationConnection `json:"publications,omitempty"` 7456 // The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the product was published to the Online Store. 7457 PublishedAt *null.String `json:"publishedAt,omitempty"` 7458 // Check to see whether the resource is published to a given channel. 7459 PublishedOnChannel bool `json:"publishedOnChannel,omitempty"` 7460 // Check to see whether the resource is published to the calling app's channel. 7461 PublishedOnCurrentChannel bool `json:"publishedOnCurrentChannel,omitempty"` 7462 // Check to see whether the resource is published to the calling app's publication. 7463 PublishedOnCurrentPublication bool `json:"publishedOnCurrentPublication,omitempty"` 7464 // Check to see whether the resource is published to a given publication. 7465 PublishedOnPublication bool `json:"publishedOnPublication,omitempty"` 7466 // Whether the product can only be purchased with a selling plan. 7467 RequiresSellingPlan bool `json:"requiresSellingPlan,omitempty"` 7468 // The list of resources that are published to a publication. 7469 ResourcePublications *ResourcePublicationConnection `json:"resourcePublications,omitempty"` 7470 // The list of resources that are either published or staged to be published to a publication. 7471 ResourcePublicationsV2 *ResourcePublicationV2Connection `json:"resourcePublicationsV2,omitempty"` 7472 // Count of selling plan groups associated with the product. 7473 SellingPlanGroupCount int `json:"sellingPlanGroupCount,omitempty"` 7474 // SEO information of the product. 7475 Seo *Seo `json:"seo,omitempty"` 7476 // The product status. 7477 Status ProductStatus `json:"status,omitempty"` 7478 // The storefront ID of the product. 7479 StorefrontID null.String `json:"storefrontId,omitempty"` 7480 // A comma separated list of tags that have been added to the product. 7481 Tags []null.String `json:"tags,omitempty"` 7482 // The theme template used when viewing the product in a store. 7483 TemplateSuffix *null.String `json:"templateSuffix,omitempty"` 7484 // The title of the product. 7485 Title null.String `json:"title,omitempty"` 7486 // The quantity of inventory in stock. 7487 TotalInventory int `json:"totalInventory,omitempty"` 7488 // The number of variants that are associated with the product. 7489 TotalVariants int `json:"totalVariants,omitempty"` 7490 // Whether inventory tracking has been enabled for the product. 7491 TracksInventory bool `json:"tracksInventory,omitempty"` 7492 // The translations associated with the resource. 7493 Translations []*PublishedTranslation `json:"translations,omitempty"` 7494 // The list of channels that the resource is not published to. 7495 UnpublishedChannels *ChannelConnection `json:"unpublishedChannels,omitempty"` 7496 // The list of publications that the resource is not published to. 7497 UnpublishedPublications *PublicationConnection `json:"unpublishedPublications,omitempty"` 7498 // The date and time when the product was last modified. 7499 // A product's `updatedAt` value can change for different reasons. For example, if an order 7500 // is placed for a product that has inventory tracking set up, then the inventory adjustment 7501 // is counted as an update. 7502 UpdatedAt null.String `json:"updatedAt,omitempty"` 7503 // A list of variants associated with the product. 7504 Variants *ProductVariantConnection `json:"variants,omitempty"` 7505 // The name of the product's vendor. 7506 Vendor null.String `json:"vendor,omitempty"` 7507 } 7508 7509 func (Product) IsCommentEventEmbed() {} 7510 func (Product) IsNode() {} 7511 func (Product) IsNavigable() {} 7512 func (Product) IsHasMetafields() {} 7513 func (Product) IsHasPublishedTranslations() {} 7514 func (Product) IsPublishable() {} 7515 func (Product) IsOnlineStorePreviewable() {} 7516 func (Product) IsLegacyInteroperability() {} 7517 7518 // Specifies product images to append. 7519 type ProductAppendImagesInput struct { 7520 // The ID of the product. 7521 ID null.String `json:"id,omitempty"` 7522 // The images to be appended to the product. 7523 Images []*ImageInput `json:"images,omitempty"` 7524 } 7525 7526 // Return type for `productAppendImages` mutation. 7527 type ProductAppendImagesPayload struct { 7528 // List of new images appended to the product. 7529 NewImages []*Image `json:"newImages,omitempty"` 7530 // The product object. 7531 Product *Product `json:"product,omitempty"` 7532 // List of errors that occurred executing the mutation. 7533 UserErrors []*UserError `json:"userErrors,omitempty"` 7534 } 7535 7536 // Return type for `productChangeStatus` mutation. 7537 type ProductChangeStatusPayload struct { 7538 // The product object. 7539 Product *Product `json:"product,omitempty"` 7540 // List of errors that occurred executing the mutation. 7541 UserErrors []*ProductChangeStatusUserError `json:"userErrors,omitempty"` 7542 } 7543 7544 // An error that occurs during the execution of ProductChangeStatus. 7545 type ProductChangeStatusUserError struct { 7546 // Error code to uniquely identify the error. 7547 Code *ProductChangeStatusUserErrorCode `json:"code,omitempty"` 7548 // Path to the input field which caused the error. 7549 Field []null.String `json:"field,omitempty"` 7550 // The error message. 7551 Message null.String `json:"message,omitempty"` 7552 } 7553 7554 func (ProductChangeStatusUserError) IsDisplayableError() {} 7555 7556 // An auto-generated type for paginating through multiple Products. 7557 type ProductConnection struct { 7558 // A list of edges. 7559 Edges []*ProductEdge `json:"edges,omitempty"` 7560 // Information to aid in pagination. 7561 PageInfo *PageInfo `json:"pageInfo,omitempty"` 7562 } 7563 7564 // Return type for `productCreateMedia` mutation. 7565 type ProductCreateMediaPayload struct { 7566 // The newly created media. 7567 Media []Media `json:"media,omitempty"` 7568 // List of errors that occurred executing the mutation. 7569 MediaUserErrors []*MediaUserError `json:"mediaUserErrors,omitempty"` 7570 // The product associated with the media. 7571 Product *Product `json:"product,omitempty"` 7572 // List of errors that occurred executing the mutation. 7573 UserErrors []*UserError `json:"userErrors,omitempty"` 7574 } 7575 7576 // Return type for `productCreate` mutation. 7577 type ProductCreatePayload struct { 7578 // The product object. 7579 Product *Product `json:"product,omitempty"` 7580 // The shop associated with the product. 7581 Shop *Shop `json:"shop,omitempty"` 7582 // List of errors that occurred executing the mutation. 7583 UserErrors []*UserError `json:"userErrors,omitempty"` 7584 } 7585 7586 // Return type for `productDeleteImages` mutation. 7587 type ProductDeleteImagesPayload struct { 7588 // This is an array of IDs of images to delete. 7589 DeletedImageIds []null.String `json:"deletedImageIds,omitempty"` 7590 // This is the product object. 7591 Product *Product `json:"product,omitempty"` 7592 // List of errors that occurred executing the mutation. 7593 UserErrors []*UserError `json:"userErrors,omitempty"` 7594 } 7595 7596 // Specifies the product to delete. 7597 type ProductDeleteInput struct { 7598 // The ID of the product. 7599 ID null.String `json:"id,omitempty"` 7600 } 7601 7602 // Return type for `productDeleteMedia` mutation. 7603 type ProductDeleteMediaPayload struct { 7604 // List of media IDs which were deleted. 7605 DeletedMediaIds []null.String `json:"deletedMediaIds,omitempty"` 7606 // List of product image IDs which were deleted. 7607 DeletedProductImageIds []null.String `json:"deletedProductImageIds,omitempty"` 7608 // List of errors that occurred executing the mutation. 7609 MediaUserErrors []*MediaUserError `json:"mediaUserErrors,omitempty"` 7610 // The product which media was deleted from. 7611 Product *Product `json:"product,omitempty"` 7612 // List of errors that occurred executing the mutation. 7613 UserErrors []*UserError `json:"userErrors,omitempty"` 7614 } 7615 7616 // Return type for `productDelete` mutation. 7617 type ProductDeletePayload struct { 7618 // The ID of the deleted product. 7619 DeletedProductID *null.String `json:"deletedProductId,omitempty"` 7620 // The shop associated with the product. 7621 Shop *Shop `json:"shop,omitempty"` 7622 // List of errors that occurred executing the mutation. 7623 UserErrors []*UserError `json:"userErrors,omitempty"` 7624 } 7625 7626 // Return type for `productDuplicate` mutation. 7627 type ProductDuplicatePayload struct { 7628 // The asynchronous job duplicating the product images. 7629 ImageJob *Job `json:"imageJob,omitempty"` 7630 // The duplicated product. 7631 NewProduct *Product `json:"newProduct,omitempty"` 7632 // The user's shop. 7633 Shop *Shop `json:"shop,omitempty"` 7634 // List of errors that occurred executing the mutation. 7635 UserErrors []*UserError `json:"userErrors,omitempty"` 7636 } 7637 7638 // An auto-generated type which holds one Product and a cursor during pagination. 7639 type ProductEdge struct { 7640 // A cursor for use in pagination. 7641 Cursor null.String `json:"cursor,omitempty"` 7642 // The item at the end of ProductEdge. 7643 Node *Product `json:"node,omitempty"` 7644 } 7645 7646 // Return type for `productImageUpdate` mutation. 7647 type ProductImageUpdatePayload struct { 7648 // Image updated. 7649 Image *Image `json:"image,omitempty"` 7650 // List of errors that occurred executing the mutation. 7651 UserErrors []*UserError `json:"userErrors,omitempty"` 7652 } 7653 7654 // Specifies the input fields required to create a product. 7655 type ProductInput struct { 7656 // The description of the product, complete with HTML formatting. 7657 DescriptionHTML *null.String `json:"descriptionHtml,omitempty"` 7658 // A unique human-friendly string for the product. Automatically generated from the product's title. 7659 Handle *null.String `json:"handle,omitempty"` 7660 // Whether a redirect is required after a new handle has been provided. 7661 // If true, then the old handle is redirected to the new one automatically. 7662 RedirectNewHandle *bool `json:"redirectNewHandle,omitempty"` 7663 // The SEO information associated with the product. 7664 Seo *SEOInput `json:"seo,omitempty"` 7665 // The product type specified by the merchant. 7666 ProductType *null.String `json:"productType,omitempty"` 7667 // A comma separated list tags that have been added to the product. 7668 Tags []null.String `json:"tags,omitempty"` 7669 // The theme template used when viewing the product in a store. 7670 TemplateSuffix *null.String `json:"templateSuffix,omitempty"` 7671 // Whether the product is a gift card. 7672 GiftCard *bool `json:"giftCard,omitempty"` 7673 // The theme template used when viewing the gift card in a store. 7674 GiftCardTemplateSuffix *null.String `json:"giftCardTemplateSuffix,omitempty"` 7675 // The title of the product. 7676 Title *null.String `json:"title,omitempty"` 7677 // The name of the product's vendor. 7678 Vendor *null.String `json:"vendor,omitempty"` 7679 // A description of the product. Supports HTML formatting. This argument is deprecated: Use `descriptionHtml` instead. 7680 BodyHTML *null.String `json:"bodyHtml,omitempty"` 7681 // The IDs of the collections that this product will be added to. 7682 CollectionsToJoin []null.String `json:"collectionsToJoin,omitempty"` 7683 // The IDs of collections that will no longer include the product. 7684 CollectionsToLeave []null.String `json:"collectionsToLeave,omitempty"` 7685 // Specifies the product to update in productUpdate or creates a new product if absent in productCreate. 7686 ID *null.String `json:"id,omitempty"` 7687 // The images to associate with the product. 7688 Images []*ImageInput `json:"images,omitempty"` 7689 // The metafields to associate with this product. 7690 Metafields []*MetafieldInput `json:"metafields,omitempty"` 7691 // The private metafields to associated with this product. 7692 PrivateMetafields []*PrivateMetafieldInput `json:"privateMetafields,omitempty"` 7693 // List of custom product options (maximum of 3 per product). 7694 Options []null.String `json:"options,omitempty"` 7695 // A list of the channels where the product is published. This argument is deprecated: Use `PublishablePublish` instead. 7696 ProductPublications []*ProductPublicationInput `json:"productPublications,omitempty"` 7697 // A list of the channels where the product is published. This argument is deprecated: Use `PublishablePublish` instead. 7698 Publications []*ProductPublicationInput `json:"publications,omitempty"` 7699 // Only products with an active status can be published. This argument is deprecated: Use `PublishablePublish` instead. 7700 PublishDate *null.String `json:"publishDate,omitempty"` 7701 // Only products with an active status can be published. This argument is deprecated: Use `PublishablePublish` instead. 7702 PublishOn *null.String `json:"publishOn,omitempty"` 7703 // Only products with an active status can be published. This argument is deprecated: Use `PublishablePublish` instead. 7704 Published *bool `json:"published,omitempty"` 7705 // Only products with an active status can be published. This argument is deprecated: Use `PublishablePublish` instead. 7706 PublishedAt *null.String `json:"publishedAt,omitempty"` 7707 // A list of variants associated with the product. 7708 Variants []*ProductVariantInput `json:"variants,omitempty"` 7709 // The status of the product. 7710 Status *ProductStatus `json:"status,omitempty"` 7711 // Whether the product can only be purchased with a selling plan. If set to `true` on an already existing product, then the product will be marked unavailable on channels that don't support subscriptions. 7712 RequiresSellingPlan *bool `json:"requiresSellingPlan,omitempty"` 7713 } 7714 7715 // Return type for `productJoinSellingPlanGroups` mutation. 7716 type ProductJoinSellingPlanGroupsPayload struct { 7717 // The product object. 7718 Product *Product `json:"product,omitempty"` 7719 // List of errors that occurred executing the mutation. 7720 UserErrors []*SellingPlanGroupUserError `json:"userErrors,omitempty"` 7721 } 7722 7723 // Return type for `productLeaveSellingPlanGroups` mutation. 7724 type ProductLeaveSellingPlanGroupsPayload struct { 7725 // The product object. 7726 Product *Product `json:"product,omitempty"` 7727 // List of errors that occurred executing the mutation. 7728 UserErrors []*SellingPlanGroupUserError `json:"userErrors,omitempty"` 7729 } 7730 7731 // Product property names like "Size", "Color", and "Material". 7732 // Variants are selected based on permutations of these options. 7733 // 255 characters limit each. 7734 type ProductOption struct { 7735 // Globally unique identifier. 7736 ID null.String `json:"id,omitempty"` 7737 // The product option’s name. 7738 Name null.String `json:"name,omitempty"` 7739 // The product option's position. 7740 Position int `json:"position,omitempty"` 7741 // The translations associated with the resource. 7742 Translations []*PublishedTranslation `json:"translations,omitempty"` 7743 // The corresponding value to the product option name. 7744 Values []null.String `json:"values,omitempty"` 7745 } 7746 7747 func (ProductOption) IsNode() {} 7748 func (ProductOption) IsHasPublishedTranslations() {} 7749 7750 // The price range of the product. 7751 type ProductPriceRange struct { 7752 // The highest variant's price. 7753 MaxVariantPrice *MoneyV2 `json:"maxVariantPrice,omitempty"` 7754 // The lowest variant's price. 7755 MinVariantPrice *MoneyV2 `json:"minVariantPrice,omitempty"` 7756 } 7757 7758 // The price range of the product. 7759 type ProductPriceRangeV2 struct { 7760 // The highest variant's price. 7761 MaxVariantPrice *MoneyV2 `json:"maxVariantPrice,omitempty"` 7762 // The lowest variant's price. 7763 MinVariantPrice *MoneyV2 `json:"minVariantPrice,omitempty"` 7764 } 7765 7766 // Represents the channels where a product is published. 7767 type ProductPublication struct { 7768 // The channel where the product was or is published. 7769 Channel *Channel `json:"channel,omitempty"` 7770 // Whether the publication is published or not. 7771 IsPublished bool `json:"isPublished,omitempty"` 7772 // The product that was or is going to be published on the channel. 7773 Product *Product `json:"product,omitempty"` 7774 // The date that the product was or is going to be published on the channel. 7775 PublishDate *null.String `json:"publishDate,omitempty"` 7776 } 7777 7778 // An auto-generated type for paginating through multiple ProductPublications. 7779 type ProductPublicationConnection struct { 7780 // A list of edges. 7781 Edges []*ProductPublicationEdge `json:"edges,omitempty"` 7782 // Information to aid in pagination. 7783 PageInfo *PageInfo `json:"pageInfo,omitempty"` 7784 } 7785 7786 // An auto-generated type which holds one ProductPublication and a cursor during pagination. 7787 type ProductPublicationEdge struct { 7788 // A cursor for use in pagination. 7789 Cursor null.String `json:"cursor,omitempty"` 7790 // The item at the end of ProductPublicationEdge. 7791 Node *ProductPublication `json:"node,omitempty"` 7792 } 7793 7794 // Specifies a publication to which a product will be published. 7795 type ProductPublicationInput struct { 7796 // ID of the publication. 7797 PublicationID *null.String `json:"publicationId,omitempty"` 7798 // ID of the channel. This argument is deprecated: Use publicationId instead. 7799 ChannelID *null.String `json:"channelId,omitempty"` 7800 // This argument is deprecated: Use publicationId instead. 7801 ChannelHandle *null.String `json:"channelHandle,omitempty"` 7802 // The date and time that the product was (or will be) published. 7803 PublishDate *null.String `json:"publishDate,omitempty"` 7804 } 7805 7806 // Specifies a product to publish and the channels to publish it to. 7807 type ProductPublishInput struct { 7808 // The product to create or update publications for. 7809 ID null.String `json:"id,omitempty"` 7810 // The publication that the product is published to. 7811 ProductPublications []*ProductPublicationInput `json:"productPublications,omitempty"` 7812 } 7813 7814 // Return type for `productPublish` mutation. 7815 type ProductPublishPayload struct { 7816 // The product that has been published. 7817 Product *Product `json:"product,omitempty"` 7818 // The channels where the product is published. 7819 ProductPublications []*ProductPublication `json:"productPublications,omitempty"` 7820 // The user's shop. 7821 Shop *Shop `json:"shop,omitempty"` 7822 // List of errors that occurred executing the mutation. 7823 UserErrors []*UserError `json:"userErrors,omitempty"` 7824 } 7825 7826 // Return type for `productReorderImages` mutation. 7827 type ProductReorderImagesPayload struct { 7828 // The asynchronous job reordering the images. 7829 Job *Job `json:"job,omitempty"` 7830 // List of errors that occurred executing the mutation. 7831 UserErrors []*UserError `json:"userErrors,omitempty"` 7832 } 7833 7834 // Return type for `productReorderMedia` mutation. 7835 type ProductReorderMediaPayload struct { 7836 // The asynchronous job reordering the media. 7837 Job *Job `json:"job,omitempty"` 7838 // List of errors that occurred executing the mutation. 7839 MediaUserErrors []*MediaUserError `json:"mediaUserErrors,omitempty"` 7840 // List of errors that occurred executing the mutation. 7841 UserErrors []*UserError `json:"userErrors,omitempty"` 7842 } 7843 7844 // Specifies a product to unpublish from a channel and the sales channels to unpublish it from. 7845 type ProductUnpublishInput struct { 7846 // The ID of the product to create or update publications for. 7847 ID null.String `json:"id,omitempty"` 7848 // The channels to unpublish the product from. 7849 ProductPublications []*ProductPublicationInput `json:"productPublications,omitempty"` 7850 } 7851 7852 // Return type for `productUnpublish` mutation. 7853 type ProductUnpublishPayload struct { 7854 // The product that has been unpublished. 7855 Product *Product `json:"product,omitempty"` 7856 // The user's shop. 7857 Shop *Shop `json:"shop,omitempty"` 7858 // List of errors that occurred executing the mutation. 7859 UserErrors []*UserError `json:"userErrors,omitempty"` 7860 } 7861 7862 // Return type for `productUpdateMedia` mutation. 7863 type ProductUpdateMediaPayload struct { 7864 // The updated media. 7865 Media []Media `json:"media,omitempty"` 7866 // List of errors that occurred executing the mutation. 7867 MediaUserErrors []*MediaUserError `json:"mediaUserErrors,omitempty"` 7868 // The product which media was updated on. 7869 Product *Product `json:"product,omitempty"` 7870 // List of errors that occurred executing the mutation. 7871 UserErrors []*UserError `json:"userErrors,omitempty"` 7872 } 7873 7874 // Return type for `productUpdate` mutation. 7875 type ProductUpdatePayload struct { 7876 // The updated product. 7877 Product *Product `json:"product,omitempty"` 7878 // List of errors that occurred executing the mutation. 7879 UserErrors []*UserError `json:"userErrors,omitempty"` 7880 } 7881 7882 // Represents a product variant. 7883 type ProductVariant struct { 7884 // Whether the product variant is available for sale. 7885 AvailableForSale bool `json:"availableForSale,omitempty"` 7886 // The value of the barcode associated with the product. 7887 Barcode *null.String `json:"barcode,omitempty"` 7888 // The compare-at price of the variant in the default shop currency. 7889 CompareAtPrice *null.String `json:"compareAtPrice,omitempty"` 7890 // The date and time when the variant was created. 7891 CreatedAt null.String `json:"createdAt,omitempty"` 7892 // A default cursor for use in pagination. 7893 DefaultCursor null.String `json:"defaultCursor,omitempty"` 7894 // The delivery profile for the variant. 7895 DeliveryProfile *DeliveryProfile `json:"deliveryProfile,omitempty"` 7896 // Display name of the variant, based on product's title + variant's title. 7897 DisplayName null.String `json:"displayName,omitempty"` 7898 // The fulfillment service associated with the product. 7899 FulfillmentService *FulfillmentService `json:"fulfillmentService,omitempty"` 7900 // Whether changes to the fulfillment service for the product variant are allowed. 7901 FulfillmentServiceEditable *EditableProperty `json:"fulfillmentServiceEditable,omitempty"` 7902 // The Harmonized System Code (or HS Tariff Code) for the variant. 7903 HarmonizedSystemCode *null.String `json:"harmonizedSystemCode,omitempty"` 7904 // Globally unique identifier. 7905 ID null.String `json:"id,omitempty"` 7906 // The featured image for the variant. 7907 Image *Image `json:"image,omitempty"` 7908 // The inventory item, which is used to query for inventory information. 7909 InventoryItem *InventoryItem `json:"inventoryItem,omitempty"` 7910 // The fulfillment service that tracks the number of items in stock for the product variant. 7911 InventoryManagement ProductVariantInventoryManagement `json:"inventoryManagement,omitempty"` 7912 // Whether customers are allowed to place an order for the product variant when it's out of stock. 7913 InventoryPolicy ProductVariantInventoryPolicy `json:"inventoryPolicy,omitempty"` 7914 // The total sellable quantity of the variant. 7915 InventoryQuantity *int `json:"inventoryQuantity,omitempty"` 7916 // The ID of the corresponding resource in the REST Admin API. 7917 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 7918 // The media associated with the product variant. 7919 Media *MediaConnection `json:"media,omitempty"` 7920 // The metafield associated with the resource. 7921 Metafield *Metafield `json:"metafield,omitempty"` 7922 // A paginated list of metafields associated with the resource. 7923 Metafields *MetafieldConnection `json:"metafields,omitempty"` 7924 // The order of the product variant in the list of product variants. The first position in the list is 1. 7925 Position int `json:"position,omitempty"` 7926 // List of prices and compare-at prices in the presentment currencies for this shop. 7927 PresentmentPrices *ProductVariantPricePairConnection `json:"presentmentPrices,omitempty"` 7928 // The price of the product variant in the default shop currency. 7929 Price null.String `json:"price,omitempty"` 7930 // Returns a private metafield found by namespace and key. 7931 PrivateMetafield *PrivateMetafield `json:"privateMetafield,omitempty"` 7932 // List of private metafields. 7933 PrivateMetafields *PrivateMetafieldConnection `json:"privateMetafields,omitempty"` 7934 // The product that this variant belongs to. 7935 Product *Product `json:"product,omitempty"` 7936 // Whether a customer needs to provide a shipping address when placing an order for the product variant. 7937 RequiresShipping bool `json:"requiresShipping,omitempty"` 7938 // List of product options applied to the variant. 7939 SelectedOptions []*SelectedOption `json:"selectedOptions,omitempty"` 7940 // Count of selling plan groups associated with the product variant. 7941 SellingPlanGroupCount int `json:"sellingPlanGroupCount,omitempty"` 7942 // An identifier for the product variant in the shop. Required in order to connect to a fulfillment service. 7943 Sku *null.String `json:"sku,omitempty"` 7944 // The storefront ID of the product variant. 7945 StorefrontID null.String `json:"storefrontId,omitempty"` 7946 // The tax code for the product variant. 7947 TaxCode *null.String `json:"taxCode,omitempty"` 7948 // Whether a tax is charged when the product variant is sold. 7949 Taxable bool `json:"taxable,omitempty"` 7950 // The title of the product variant. 7951 Title null.String `json:"title,omitempty"` 7952 // The translations associated with the resource. 7953 Translations []*PublishedTranslation `json:"translations,omitempty"` 7954 // The date and time (ISO 8601 format) when the product variant was last modified. 7955 UpdatedAt null.String `json:"updatedAt,omitempty"` 7956 // The weight of the product variant in the unit system specified with weight_unit. 7957 Weight *float64 `json:"weight,omitempty"` 7958 // The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: `g`, `kg`, `oz`, `lb`. 7959 WeightUnit WeightUnit `json:"weightUnit,omitempty"` 7960 } 7961 7962 func (ProductVariant) IsCommentEventEmbed() {} 7963 func (ProductVariant) IsNode() {} 7964 func (ProductVariant) IsHasMetafields() {} 7965 func (ProductVariant) IsHasPublishedTranslations() {} 7966 func (ProductVariant) IsNavigable() {} 7967 func (ProductVariant) IsLegacyInteroperability() {} 7968 7969 // Specifies the input fields required to append media to a single variant. 7970 type ProductVariantAppendMediaInput struct { 7971 // Specifies the variant to which media will be appended. 7972 VariantID null.String `json:"variantId,omitempty"` 7973 // Specifies the media to append to the variant. 7974 MediaIds []null.String `json:"mediaIds,omitempty"` 7975 } 7976 7977 // Return type for `productVariantAppendMedia` mutation. 7978 type ProductVariantAppendMediaPayload struct { 7979 // The product associated with the variants and media. 7980 Product *Product `json:"product,omitempty"` 7981 // The product variants that were updated. 7982 ProductVariants []*ProductVariant `json:"productVariants,omitempty"` 7983 // List of errors that occurred executing the mutation. 7984 UserErrors []*MediaUserError `json:"userErrors,omitempty"` 7985 } 7986 7987 // An auto-generated type for paginating through multiple ProductVariants. 7988 type ProductVariantConnection struct { 7989 // A list of edges. 7990 Edges []*ProductVariantEdge `json:"edges,omitempty"` 7991 // Information to aid in pagination. 7992 PageInfo *PageInfo `json:"pageInfo,omitempty"` 7993 } 7994 7995 // Return type for `productVariantCreate` mutation. 7996 type ProductVariantCreatePayload struct { 7997 // The product associated with the variant. 7998 Product *Product `json:"product,omitempty"` 7999 // The successfully created variant. 8000 ProductVariant *ProductVariant `json:"productVariant,omitempty"` 8001 // List of errors that occurred executing the mutation. 8002 UserErrors []*UserError `json:"userErrors,omitempty"` 8003 } 8004 8005 // Return type for `productVariantDelete` mutation. 8006 type ProductVariantDeletePayload struct { 8007 // ID of the deleted product variant. 8008 DeletedProductVariantID *null.String `json:"deletedProductVariantId,omitempty"` 8009 // Product of the deleted product variant. 8010 Product *Product `json:"product,omitempty"` 8011 // List of errors that occurred executing the mutation. 8012 UserErrors []*UserError `json:"userErrors,omitempty"` 8013 } 8014 8015 // Specifies the input fields required to detach media from a single variant. 8016 type ProductVariantDetachMediaInput struct { 8017 // Specifies the variant from which media will be detached. 8018 VariantID null.String `json:"variantId,omitempty"` 8019 // Specifies the media to detach from the variant. 8020 MediaIds []null.String `json:"mediaIds,omitempty"` 8021 } 8022 8023 // Return type for `productVariantDetachMedia` mutation. 8024 type ProductVariantDetachMediaPayload struct { 8025 // The product associated with the variants and media. 8026 Product *Product `json:"product,omitempty"` 8027 // The product variants that were updated. 8028 ProductVariants []*ProductVariant `json:"productVariants,omitempty"` 8029 // List of errors that occurred executing the mutation. 8030 UserErrors []*MediaUserError `json:"userErrors,omitempty"` 8031 } 8032 8033 // An auto-generated type which holds one ProductVariant and a cursor during pagination. 8034 type ProductVariantEdge struct { 8035 // A cursor for use in pagination. 8036 Cursor null.String `json:"cursor,omitempty"` 8037 // The item at the end of ProductVariantEdge. 8038 Node *ProductVariant `json:"node,omitempty"` 8039 } 8040 8041 // Specifies a product variant to create or update. 8042 type ProductVariantInput struct { 8043 // The value of the barcode associated with the product. 8044 Barcode *null.String `json:"barcode,omitempty"` 8045 // The compare-at price of the variant. 8046 CompareAtPrice *null.String `json:"compareAtPrice,omitempty"` 8047 // The ID of the fulfillment service associated with the variant. 8048 FulfillmentServiceID *null.String `json:"fulfillmentServiceId,omitempty"` 8049 // The Harmonized System Code (or HS Tariff Code) for the variant. 8050 HarmonizedSystemCode *null.String `json:"harmonizedSystemCode,omitempty"` 8051 // Specifies the product variant to update or create a new variant if absent. 8052 ID *null.String `json:"id,omitempty"` 8053 // The ID of the image that's associated with the variant. 8054 ImageID *null.String `json:"imageId,omitempty"` 8055 // The URL of an image to associate with the variant. This field can only be used through mutations that create product images and must match one of the URLs being created on the product. 8056 ImageSrc *null.String `json:"imageSrc,omitempty"` 8057 // The URL of the media to associate with the variant. This field can only be used in mutations that create media images and must match one of the URLs being created on the product. This field only accepts one value. 8058 MediaSrc []null.String `json:"mediaSrc,omitempty"` 8059 // The fulfillment service that tracks the number of items in stock for the product variant. If you track the inventory yourself using the admin, then set the value to `shopify`. Valid values: `shopify` or the handle of a fulfillment service that has inventory management enabled. 8060 // This argument is deprecated: Use tracked attribute on `inventoryItem` instead. 8061 InventoryManagement *ProductVariantInventoryManagement `json:"inventoryManagement,omitempty"` 8062 // Whether customers are allowed to place an order for the product variant when it's out of stock. 8063 InventoryPolicy *ProductVariantInventoryPolicy `json:"inventoryPolicy,omitempty"` 8064 // Create only field. The inventory quantities at each location where the variant is stocked. 8065 InventoryQuantities []*InventoryLevelInput `json:"inventoryQuantities,omitempty"` 8066 // Inventory Item associated with the variant, used for unit cost. 8067 InventoryItem *InventoryItemInput `json:"inventoryItem,omitempty"` 8068 // Additional customizable information about the product variant. 8069 Metafields []*MetafieldInput `json:"metafields,omitempty"` 8070 // The private metafields to associated with this product. 8071 PrivateMetafields []*PrivateMetafieldInput `json:"privateMetafields,omitempty"` 8072 // The custom properties that a shop owner uses to define product variants. 8073 Options []null.String `json:"options,omitempty"` 8074 // The order of the product variant in the list of product variants. The first position in the list is 1. 8075 Position *int `json:"position,omitempty"` 8076 // The price of the variant. 8077 Price *null.String `json:"price,omitempty"` 8078 // Create only required field. Specifies the product on which to create the variant. 8079 ProductID *null.String `json:"productId,omitempty"` 8080 // Whether the variant requires shipping. 8081 RequiresShipping *bool `json:"requiresShipping,omitempty"` 8082 // The SKU for the variant. 8083 Sku *null.String `json:"sku,omitempty"` 8084 // Whether the variant is taxable. 8085 Taxable *bool `json:"taxable,omitempty"` 8086 // This argument is deprecated: Variant title is not a writable field; it is generated from the selected variant options. 8087 Title *null.String `json:"title,omitempty"` 8088 // The tax code associated with the variant. 8089 TaxCode *null.String `json:"taxCode,omitempty"` 8090 // The weight of the variant. 8091 Weight *float64 `json:"weight,omitempty"` 8092 // The unit of weight that's used to measure the variant. 8093 WeightUnit *WeightUnit `json:"weightUnit,omitempty"` 8094 } 8095 8096 // Return type for `productVariantJoinSellingPlanGroups` mutation. 8097 type ProductVariantJoinSellingPlanGroupsPayload struct { 8098 // The product variant object. 8099 ProductVariant *ProductVariant `json:"productVariant,omitempty"` 8100 // List of errors that occurred executing the mutation. 8101 UserErrors []*SellingPlanGroupUserError `json:"userErrors,omitempty"` 8102 } 8103 8104 // Return type for `productVariantLeaveSellingPlanGroups` mutation. 8105 type ProductVariantLeaveSellingPlanGroupsPayload struct { 8106 // The product variant object. 8107 ProductVariant *ProductVariant `json:"productVariant,omitempty"` 8108 // List of errors that occurred executing the mutation. 8109 UserErrors []*SellingPlanGroupUserError `json:"userErrors,omitempty"` 8110 } 8111 8112 // The compare-at price and price of a variant sharing a currency. 8113 type ProductVariantPricePair struct { 8114 // The compare-at price of the variant with associated currency. 8115 CompareAtPrice *MoneyV2 `json:"compareAtPrice,omitempty"` 8116 // The price of the variant with associated currency. 8117 Price *MoneyV2 `json:"price,omitempty"` 8118 } 8119 8120 // An auto-generated type for paginating through multiple ProductVariantPricePairs. 8121 type ProductVariantPricePairConnection struct { 8122 // A list of edges. 8123 Edges []*ProductVariantPricePairEdge `json:"edges,omitempty"` 8124 // Information to aid in pagination. 8125 PageInfo *PageInfo `json:"pageInfo,omitempty"` 8126 } 8127 8128 // An auto-generated type which holds one ProductVariantPricePair and a cursor during pagination. 8129 type ProductVariantPricePairEdge struct { 8130 // A cursor for use in pagination. 8131 Cursor null.String `json:"cursor,omitempty"` 8132 // The item at the end of ProductVariantPricePairEdge. 8133 Node *ProductVariantPricePair `json:"node,omitempty"` 8134 } 8135 8136 // Return type for `productVariantUpdate` mutation. 8137 type ProductVariantUpdatePayload struct { 8138 // The product associated with the variant. 8139 Product *Product `json:"product,omitempty"` 8140 // The updated variant. 8141 ProductVariant *ProductVariant `json:"productVariant,omitempty"` 8142 // List of errors that occurred executing the mutation. 8143 UserErrors []*UserError `json:"userErrors,omitempty"` 8144 } 8145 8146 // A publication is a group of products and collections that is published to an app. 8147 type Publication struct { 8148 // The app associated with the publication. 8149 App *App `json:"app,omitempty"` 8150 // The collection publications for the list of collections published to the publication. 8151 CollectionPublicationsV3 *ResourcePublicationConnection `json:"collectionPublicationsV3,omitempty"` 8152 // The list of collections published to the publication. 8153 Collections *CollectionConnection `json:"collections,omitempty"` 8154 // Whether the collection is available to the publication. 8155 HasCollection bool `json:"hasCollection,omitempty"` 8156 // Globally unique identifier. 8157 ID null.String `json:"id,omitempty"` 8158 // Name of the publication. 8159 Name null.String `json:"name,omitempty"` 8160 // The product publications for the list of products published to the publication. 8161 ProductPublicationsV3 *ResourcePublicationConnection `json:"productPublicationsV3,omitempty"` 8162 // The list of products published to the publication. 8163 Products *ProductConnection `json:"products,omitempty"` 8164 // Whether or not this publication supports future publishing. 8165 SupportsFuturePublishing bool `json:"supportsFuturePublishing,omitempty"` 8166 } 8167 8168 func (Publication) IsNode() {} 8169 8170 // An auto-generated type for paginating through multiple Publications. 8171 type PublicationConnection struct { 8172 // A list of edges. 8173 Edges []*PublicationEdge `json:"edges,omitempty"` 8174 // Information to aid in pagination. 8175 PageInfo *PageInfo `json:"pageInfo,omitempty"` 8176 } 8177 8178 // An auto-generated type which holds one Publication and a cursor during pagination. 8179 type PublicationEdge struct { 8180 // A cursor for use in pagination. 8181 Cursor null.String `json:"cursor,omitempty"` 8182 // The item at the end of PublicationEdge. 8183 Node *Publication `json:"node,omitempty"` 8184 } 8185 8186 // Specifies the input fields required to publish a resource. 8187 type PublicationInput struct { 8188 // ID of the channel. This argument is deprecated: Use publicationId instead. 8189 ChannelID *null.String `json:"channelId,omitempty"` 8190 // ID of the publication. 8191 PublicationID *null.String `json:"publicationId,omitempty"` 8192 // The date and time that the resource was published. Setting this to a date in the future will schedule 8193 // the resource to be published. Only online store channels support future publishing. 8194 PublishDate *null.String `json:"publishDate,omitempty"` 8195 } 8196 8197 // Return type for `publishablePublish` mutation. 8198 type PublishablePublishPayload struct { 8199 // Resource that has been published. 8200 Publishable Publishable `json:"publishable,omitempty"` 8201 // The user's shop. 8202 Shop *Shop `json:"shop,omitempty"` 8203 // List of errors that occurred executing the mutation. 8204 UserErrors []*UserError `json:"userErrors,omitempty"` 8205 } 8206 8207 // Return type for `publishablePublishToCurrentChannel` mutation. 8208 type PublishablePublishToCurrentChannelPayload struct { 8209 // Resource that has been published. 8210 Publishable Publishable `json:"publishable,omitempty"` 8211 // The user's shop. 8212 Shop *Shop `json:"shop,omitempty"` 8213 // List of errors that occurred executing the mutation. 8214 UserErrors []*UserError `json:"userErrors,omitempty"` 8215 } 8216 8217 // Return type for `publishableUnpublish` mutation. 8218 type PublishableUnpublishPayload struct { 8219 // Resource that has been unpublished. 8220 Publishable Publishable `json:"publishable,omitempty"` 8221 // The user's shop. 8222 Shop *Shop `json:"shop,omitempty"` 8223 // List of errors that occurred executing the mutation. 8224 UserErrors []*UserError `json:"userErrors,omitempty"` 8225 } 8226 8227 // Return type for `publishableUnpublishToCurrentChannel` mutation. 8228 type PublishableUnpublishToCurrentChannelPayload struct { 8229 // Resource that has been unpublished. 8230 Publishable Publishable `json:"publishable,omitempty"` 8231 // The user's shop. 8232 Shop *Shop `json:"shop,omitempty"` 8233 // List of errors that occurred executing the mutation. 8234 UserErrors []*UserError `json:"userErrors,omitempty"` 8235 } 8236 8237 // Published translation of a field of a resource. 8238 type PublishedTranslation struct { 8239 // Translation key. 8240 Key null.String `json:"key,omitempty"` 8241 // Translation locale. 8242 Locale null.String `json:"locale,omitempty"` 8243 // Translation value. 8244 Value *null.String `json:"value,omitempty"` 8245 } 8246 8247 // Represents a refund of items or transactions in an order. 8248 type Refund struct { 8249 // When the refund was created. 8250 CreatedAt *null.String `json:"createdAt,omitempty"` 8251 // A list of the order's refunded duties. 8252 Duties []*RefundDuty `json:"duties,omitempty"` 8253 // Globally unique identifier. 8254 ID null.String `json:"id,omitempty"` 8255 // The ID of the corresponding resource in the REST Admin API. 8256 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 8257 // Note associated with the refund. 8258 Note *null.String `json:"note,omitempty"` 8259 // The order associated with the refund. 8260 Order *Order `json:"order,omitempty"` 8261 // The RefundLineItem resources attached to the refund. 8262 RefundLineItems *RefundLineItemConnection `json:"refundLineItems,omitempty"` 8263 // Total amount refunded across all the transactions for this refund. 8264 TotalRefunded *MoneyV2 `json:"totalRefunded,omitempty"` 8265 // Total amount refunded across all the transactions for this refund in shop and presentment currencies. 8266 TotalRefundedSet *MoneyBag `json:"totalRefundedSet,omitempty"` 8267 // Transactions associated with the refund. 8268 Transactions *OrderTransactionConnection `json:"transactions,omitempty"` 8269 // When the refund was last updated. 8270 UpdatedAt null.String `json:"updatedAt,omitempty"` 8271 } 8272 8273 func (Refund) IsNode() {} 8274 func (Refund) IsLegacyInteroperability() {} 8275 8276 // Return type for `refundCreate` mutation. 8277 type RefundCreatePayload struct { 8278 // The order associated with the created refund. 8279 Order *Order `json:"order,omitempty"` 8280 // The created refund. 8281 Refund *Refund `json:"refund,omitempty"` 8282 // List of errors that occurred executing the mutation. 8283 UserErrors []*UserError `json:"userErrors,omitempty"` 8284 } 8285 8286 // Represents a refunded duty. 8287 type RefundDuty struct { 8288 // Returns the amount of a refunded duty in shop and presentment currencies. 8289 AmountSet *MoneyBag `json:"amountSet,omitempty"` 8290 // Returns a Duty resource. This represents the Duty in the non-refund context. 8291 OriginalDuty *Duty `json:"originalDuty,omitempty"` 8292 } 8293 8294 // Specifies the fields required to return duties on a refund. 8295 type RefundDutyInput struct { 8296 // The ID of the duty in the refund. 8297 DutyID null.String `json:"dutyId,omitempty"` 8298 // The type of refund for this duty. 8299 RefundType *RefundDutyRefundType `json:"refundType,omitempty"` 8300 } 8301 8302 // Specifies the fields to create a refund. 8303 type RefundInput struct { 8304 // The currency (in ISO format) that is used to refund the order. This must be the presentment currency (the currency used by the customer) and is a required field for orders where the currency and presentment currency differ. 8305 Currency *CurrencyCode `json:"currency,omitempty"` 8306 // Order ID for which the refund is created. 8307 OrderID null.String `json:"orderId,omitempty"` 8308 // An optional note attached to a refund. 8309 Note *null.String `json:"note,omitempty"` 8310 // Whether to send a refund notification to the customer. 8311 Notify *bool `json:"notify,omitempty"` 8312 // Specifies how much of the shipping cost to refund. 8313 Shipping *ShippingRefundInput `json:"shipping,omitempty"` 8314 // A list of line items to refund. 8315 RefundLineItems []*RefundLineItemInput `json:"refundLineItems,omitempty"` 8316 // A list of duties to refund. 8317 RefundDuties []*RefundDutyInput `json:"refundDuties,omitempty"` 8318 // A list of transactions involved in the refund. 8319 Transactions []*OrderTransactionInput `json:"transactions,omitempty"` 8320 } 8321 8322 // Represents the details about a refunded line item. 8323 type RefundLineItem struct { 8324 // Returns a LineItem resource. This represents the LineItem in the non-refund context. 8325 LineItem *LineItem `json:"lineItem,omitempty"` 8326 // The inventory restock location. 8327 Location *Location `json:"location,omitempty"` 8328 // Returns the price of a refunded line item. 8329 Price null.String `json:"price,omitempty"` 8330 // Returns the price of a refunded line item in shop and presentment currencies. 8331 PriceSet *MoneyBag `json:"priceSet,omitempty"` 8332 // Returns the quantity of a refunded line item. 8333 Quantity int `json:"quantity,omitempty"` 8334 // Represents the type of restock for the refunded line item. 8335 RestockType RefundLineItemRestockType `json:"restockType,omitempty"` 8336 // Whether the refunded line item was restocked. Not applicable in the context of a SuggestedRefund. 8337 Restocked bool `json:"restocked,omitempty"` 8338 // Returns the subtotal price of a refunded line item. 8339 Subtotal null.String `json:"subtotal,omitempty"` 8340 // Returns the subtotal price of a refunded line item in shop and presentment currencies. 8341 SubtotalSet *MoneyBag `json:"subtotalSet,omitempty"` 8342 // Returns the total tax charged on a refunded line item. 8343 TotalTax null.String `json:"totalTax,omitempty"` 8344 // Returns the total tax charged on a refunded line item in shop and presentment currencies. 8345 TotalTaxSet *MoneyBag `json:"totalTaxSet,omitempty"` 8346 } 8347 8348 // An auto-generated type for paginating through multiple RefundLineItems. 8349 type RefundLineItemConnection struct { 8350 // A list of edges. 8351 Edges []*RefundLineItemEdge `json:"edges,omitempty"` 8352 // Information to aid in pagination. 8353 PageInfo *PageInfo `json:"pageInfo,omitempty"` 8354 } 8355 8356 // An auto-generated type which holds one RefundLineItem and a cursor during pagination. 8357 type RefundLineItemEdge struct { 8358 // A cursor for use in pagination. 8359 Cursor null.String `json:"cursor,omitempty"` 8360 // The item at the end of RefundLineItemEdge. 8361 Node *RefundLineItem `json:"node,omitempty"` 8362 } 8363 8364 // Specifies the fields required to return line items on a refund. 8365 type RefundLineItemInput struct { 8366 // The ID of the line item in the refund. 8367 LineItemID null.String `json:"lineItemId,omitempty"` 8368 // The quantity of the associated line item that was returned. 8369 Quantity int `json:"quantity,omitempty"` 8370 // The type of restock for this line item. 8371 RestockType *RefundLineItemRestockType `json:"restockType,omitempty"` 8372 // The intended location for restocking if `refundType` is not `NO_RESTOCK` 8373 LocationID *null.String `json:"locationId,omitempty"` 8374 } 8375 8376 // Presents information or problems to merchants, with 1 or more actions that they can take. 8377 // They can optionally have a specific icon and be dismissed by merchants. 8378 type ResourceAlert struct { 8379 // Buttons in the alert that link to related information. 8380 // For example, _View risk assessment_. 8381 Actions []*ResourceAlertAction `json:"actions,omitempty"` 8382 // Details about the alert. 8383 Content null.String `json:"content,omitempty"` 8384 // Unique identifier that appears when an alert is manually closed by the merchant. 8385 // Most alerts cannot be manually closed. 8386 DismissibleHandle *null.String `json:"dismissibleHandle,omitempty"` 8387 // Icon that displays with the alert. 8388 Icon *ResourceAlertIcon `json:"icon,omitempty"` 8389 // Indication of how important the alert is. 8390 Severity ResourceAlertSeverity `json:"severity,omitempty"` 8391 // The name of the alert. 8392 Title null.String `json:"title,omitempty"` 8393 } 8394 8395 // An action associated to a resource alert. 8396 type ResourceAlertAction struct { 8397 // Whether the action is primary or not. 8398 Primary bool `json:"primary,omitempty"` 8399 // Resource for the action to show. 8400 Show *null.String `json:"show,omitempty"` 8401 // Action title. 8402 Title null.String `json:"title,omitempty"` 8403 // Action target URL. 8404 URL null.String `json:"url,omitempty"` 8405 } 8406 8407 // Represents feedback from apps about a resource, and the steps required to set up the apps on the shop. 8408 type ResourceFeedback struct { 8409 // Feedback from an app about the steps a merchant needs to take to set up the app on their store. 8410 AppFeedback []*AppFeedback `json:"appFeedback,omitempty"` 8411 // List of AppFeedback detailing issues regarding a resource. 8412 Details []*AppFeedback `json:"details,omitempty"` 8413 // Summary of resource feedback pertaining to the resource. 8414 Summary null.String `json:"summary,omitempty"` 8415 } 8416 8417 // A resource limit represents the limits that the resource has. 8418 type ResourceLimit struct { 8419 // Whether or not the resource is available. 8420 Available bool `json:"available,omitempty"` 8421 // Quantity available. If null the quantity available is unlimited. 8422 QuantityAvailable *int `json:"quantityAvailable,omitempty"` 8423 // Quantity limit of the resource. If null the quantity is unlimited. 8424 QuantityLimit *int `json:"quantityLimit,omitempty"` 8425 // Quantity used of the resource. If null the quantity used cannot be retrieved. 8426 QuantityUsed *int `json:"quantityUsed,omitempty"` 8427 } 8428 8429 // A resource publication represents that a resource has been published to a publication. 8430 type ResourcePublication struct { 8431 // The channel the resource publication is published to. 8432 Channel *Channel `json:"channel,omitempty"` 8433 // Whether the resource publication is published. Also returns true if the resource publication is scheduled to be published. 8434 // If false, then the resource publication is neither published nor scheduled to be published. 8435 IsPublished bool `json:"isPublished,omitempty"` 8436 // The publication the resource publication is published to. 8437 Publication *Publication `json:"publication,omitempty"` 8438 // The date that the resource publication was or is going to be published to the publication. 8439 PublishDate null.String `json:"publishDate,omitempty"` 8440 // The resource published to the publication. 8441 Publishable Publishable `json:"publishable,omitempty"` 8442 } 8443 8444 // An auto-generated type for paginating through multiple ResourcePublications. 8445 type ResourcePublicationConnection struct { 8446 // A list of edges. 8447 Edges []*ResourcePublicationEdge `json:"edges,omitempty"` 8448 // Information to aid in pagination. 8449 PageInfo *PageInfo `json:"pageInfo,omitempty"` 8450 } 8451 8452 // An auto-generated type which holds one ResourcePublication and a cursor during pagination. 8453 type ResourcePublicationEdge struct { 8454 // A cursor for use in pagination. 8455 Cursor null.String `json:"cursor,omitempty"` 8456 // The item at the end of ResourcePublicationEdge. 8457 Node *ResourcePublication `json:"node,omitempty"` 8458 } 8459 8460 // A resource publication represents that a resource either has been published or will be published to a publication. 8461 type ResourcePublicationV2 struct { 8462 // Whether the resource publication is published. If true, then the resource publication is published to the publication. 8463 // If false, then the resource publication is staged to be published to the publication. 8464 IsPublished bool `json:"isPublished,omitempty"` 8465 // The publication the resource publication is published to. 8466 Publication *Publication `json:"publication,omitempty"` 8467 // The date that the resource publication was or is going to be published to the publication. 8468 PublishDate *null.String `json:"publishDate,omitempty"` 8469 // The resource published to the publication. 8470 Publishable Publishable `json:"publishable,omitempty"` 8471 } 8472 8473 // An auto-generated type for paginating through multiple ResourcePublicationV2s. 8474 type ResourcePublicationV2Connection struct { 8475 // A list of edges. 8476 Edges []*ResourcePublicationV2Edge `json:"edges,omitempty"` 8477 // Information to aid in pagination. 8478 PageInfo *PageInfo `json:"pageInfo,omitempty"` 8479 } 8480 8481 // An auto-generated type which holds one ResourcePublicationV2 and a cursor during pagination. 8482 type ResourcePublicationV2Edge struct { 8483 // A cursor for use in pagination. 8484 Cursor null.String `json:"cursor,omitempty"` 8485 // The item at the end of ResourcePublicationV2Edge. 8486 Node *ResourcePublicationV2 `json:"node,omitempty"` 8487 } 8488 8489 // SEO information. 8490 type Seo struct { 8491 // SEO Description. 8492 Description *null.String `json:"description,omitempty"` 8493 // SEO Title. 8494 Title *null.String `json:"title,omitempty"` 8495 } 8496 8497 // SEO information. 8498 type SEOInput struct { 8499 // SEO title of the product. 8500 Title *null.String `json:"title,omitempty"` 8501 // SEO description of the product. 8502 Description *null.String `json:"description,omitempty"` 8503 } 8504 8505 // A saved search is a representation of a search query saved in the admin. 8506 type SavedSearch struct { 8507 // The filters of a saved search. 8508 Filters []*SearchFilter `json:"filters,omitempty"` 8509 // Globally unique identifier. 8510 ID null.String `json:"id,omitempty"` 8511 // The ID of the corresponding resource in the REST Admin API. 8512 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 8513 // The name of a saved search. 8514 Name null.String `json:"name,omitempty"` 8515 // The query string of a saved search. This includes search terms and filters. 8516 Query null.String `json:"query,omitempty"` 8517 // The type of resource this saved search is searching in. 8518 ResourceType SearchResultType `json:"resourceType,omitempty"` 8519 // The search terms of a saved search. 8520 SearchTerms null.String `json:"searchTerms,omitempty"` 8521 } 8522 8523 func (SavedSearch) IsNode() {} 8524 func (SavedSearch) IsLegacyInteroperability() {} 8525 8526 // An auto-generated type for paginating through multiple SavedSearches. 8527 type SavedSearchConnection struct { 8528 // A list of edges. 8529 Edges []*SavedSearchEdge `json:"edges,omitempty"` 8530 // Information to aid in pagination. 8531 PageInfo *PageInfo `json:"pageInfo,omitempty"` 8532 } 8533 8534 // Specifies the fields required to create a saved search. 8535 type SavedSearchCreateInput struct { 8536 // The type of resouce this saved search is searching in. 8537 ResourceType SearchResultType `json:"resourceType,omitempty"` 8538 // A descriptive name of the saved search. 8539 Name null.String `json:"name,omitempty"` 8540 // The query string of a saved search. This includes search terms and filters. 8541 Query null.String `json:"query,omitempty"` 8542 } 8543 8544 // Return type for `savedSearchCreate` mutation. 8545 type SavedSearchCreatePayload struct { 8546 // The saved search that was created. 8547 SavedSearch *SavedSearch `json:"savedSearch,omitempty"` 8548 // List of errors that occurred executing the mutation. 8549 UserErrors []*UserError `json:"userErrors,omitempty"` 8550 } 8551 8552 // Specifies the fields to delete a saved search. 8553 type SavedSearchDeleteInput struct { 8554 // ID of the saved search to delete. 8555 ID null.String `json:"id,omitempty"` 8556 } 8557 8558 // Return type for `savedSearchDelete` mutation. 8559 type SavedSearchDeletePayload struct { 8560 // The id of the saved search that was deleted. 8561 DeletedSavedSearchID *null.String `json:"deletedSavedSearchId,omitempty"` 8562 // The shop of the saved search that was deleted. 8563 Shop *Shop `json:"shop,omitempty"` 8564 // List of errors that occurred executing the mutation. 8565 UserErrors []*UserError `json:"userErrors,omitempty"` 8566 } 8567 8568 // An auto-generated type which holds one SavedSearch and a cursor during pagination. 8569 type SavedSearchEdge struct { 8570 // A cursor for use in pagination. 8571 Cursor null.String `json:"cursor,omitempty"` 8572 // The item at the end of SavedSearchEdge. 8573 Node *SavedSearch `json:"node,omitempty"` 8574 } 8575 8576 // Specifies the fields required to update a saved search. 8577 type SavedSearchUpdateInput struct { 8578 // ID of the saved search to update. 8579 ID null.String `json:"id,omitempty"` 8580 // A descriptive name of the saved search. 8581 Name *null.String `json:"name,omitempty"` 8582 // The query string of a saved search. This included search terms and filters. 8583 Query *null.String `json:"query,omitempty"` 8584 } 8585 8586 // Return type for `savedSearchUpdate` mutation. 8587 type SavedSearchUpdatePayload struct { 8588 // The saved search that was updated. 8589 SavedSearch *SavedSearch `json:"savedSearch,omitempty"` 8590 // List of errors that occurred executing the mutation. 8591 UserErrors []*UserError `json:"userErrors,omitempty"` 8592 } 8593 8594 // Script discount applications capture the intentions of a discount that 8595 // was created by a Shopify Script for an order's line item or shipping line. 8596 type ScriptDiscountApplication struct { 8597 // The method by which the discount's value is allocated to its entitled items. 8598 AllocationMethod DiscountApplicationAllocationMethod `json:"allocationMethod,omitempty"` 8599 // The description of the application as defined by the Script. 8600 Description null.String `json:"description,omitempty"` 8601 // An ordered index that can be used to identify the discount application and indicate the precedence 8602 // of the discount application for calculations. 8603 Index int `json:"index,omitempty"` 8604 // How the discount amount is distributed on the discounted lines. 8605 TargetSelection DiscountApplicationTargetSelection `json:"targetSelection,omitempty"` 8606 // Whether the discount is applied on line items or shipping lines. 8607 TargetType DiscountApplicationTargetType `json:"targetType,omitempty"` 8608 // The title of the application as defined by the Script. 8609 Title null.String `json:"title,omitempty"` 8610 // The value of the discount application. 8611 Value PricingValue `json:"value,omitempty"` 8612 } 8613 8614 func (ScriptDiscountApplication) IsDiscountApplication() {} 8615 8616 // A script tag represents remote JavaScript code that is loaded into the pages of a shop's storefront or the order status page of checkout. 8617 type ScriptTag struct { 8618 // Whether the Shopify CDN can cache and serve the script tag. 8619 // If `true`, then the script will be cached and served by the CDN. 8620 // The cache expires 15 minutes after the script tag is successfully returned. 8621 // If `false`, then the script will be served as is. 8622 Cache bool `json:"cache,omitempty"` 8623 // The date and time when the script tag was created. 8624 CreatedAt null.String `json:"createdAt,omitempty"` 8625 // The page or pages on the online store that the script should be included. 8626 DisplayScope ScriptTagDisplayScope `json:"displayScope,omitempty"` 8627 // Globally unique identifier. 8628 ID null.String `json:"id,omitempty"` 8629 // The ID of the corresponding resource in the REST Admin API. 8630 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 8631 // The URL to the remote script. 8632 Src null.String `json:"src,omitempty"` 8633 // The date and time when the script tag was last updated. 8634 UpdatedAt null.String `json:"updatedAt,omitempty"` 8635 } 8636 8637 func (ScriptTag) IsNode() {} 8638 func (ScriptTag) IsLegacyInteroperability() {} 8639 8640 // An auto-generated type for paginating through multiple ScriptTags. 8641 type ScriptTagConnection struct { 8642 // A list of edges. 8643 Edges []*ScriptTagEdge `json:"edges,omitempty"` 8644 // Information to aid in pagination. 8645 PageInfo *PageInfo `json:"pageInfo,omitempty"` 8646 } 8647 8648 // Return type for `scriptTagCreate` mutation. 8649 type ScriptTagCreatePayload struct { 8650 // The script tag that was created. 8651 ScriptTag *ScriptTag `json:"scriptTag,omitempty"` 8652 // List of errors that occurred executing the mutation. 8653 UserErrors []*UserError `json:"userErrors,omitempty"` 8654 } 8655 8656 // Return type for `scriptTagDelete` mutation. 8657 type ScriptTagDeletePayload struct { 8658 // The ID of the deleted script tag. 8659 DeletedScriptTagID *null.String `json:"deletedScriptTagId,omitempty"` 8660 // List of errors that occurred executing the mutation. 8661 UserErrors []*UserError `json:"userErrors,omitempty"` 8662 } 8663 8664 // An auto-generated type which holds one ScriptTag and a cursor during pagination. 8665 type ScriptTagEdge struct { 8666 // A cursor for use in pagination. 8667 Cursor null.String `json:"cursor,omitempty"` 8668 // The item at the end of ScriptTagEdge. 8669 Node *ScriptTag `json:"node,omitempty"` 8670 } 8671 8672 // Specifies the input fields for a script tag. 8673 type ScriptTagInput struct { 8674 // The URL of the remote script. 8675 Src *null.String `json:"src,omitempty"` 8676 // The page or pages on the online store where the script should be included. 8677 DisplayScope *ScriptTagDisplayScope `json:"displayScope,omitempty"` 8678 // Whether the Shopify CDN can cache and serve the script tag. 8679 // If `true`, then the script will be cached and served by the CDN. 8680 // The cache expires 15 minutes after the script tag is successfully returned. 8681 // If `false`, then the script will be served as is. 8682 Cache *bool `json:"cache,omitempty"` 8683 } 8684 8685 // Return type for `scriptTagUpdate` mutation. 8686 type ScriptTagUpdatePayload struct { 8687 // The script tag that was updated. 8688 ScriptTag *ScriptTag `json:"scriptTag,omitempty"` 8689 // List of errors that occurred executing the mutation. 8690 UserErrors []*UserError `json:"userErrors,omitempty"` 8691 } 8692 8693 // A filter in a search query represented by a key value pair. 8694 type SearchFilter struct { 8695 // The key of the search filter. 8696 Key null.String `json:"key,omitempty"` 8697 // The value of the search filter. 8698 Value null.String `json:"value,omitempty"` 8699 } 8700 8701 // A list of search filters along with their specific options in value and label pair for filtering. 8702 type SearchFilterOptions struct { 8703 // A list of options that can be use to filter product availability. 8704 ProductAvailability []*FilterOption `json:"productAvailability,omitempty"` 8705 } 8706 8707 // Represents an individual result returned from a search. 8708 type SearchResult struct { 8709 // Returns the search result description text. 8710 Description *null.String `json:"description,omitempty"` 8711 // Returns the Image resource presented to accompany a search result. 8712 Image *Image `json:"image,omitempty"` 8713 // Returns the ID of the resource returned in the search result. 8714 Reference Node `json:"reference,omitempty"` 8715 // Returns the resource title. 8716 Title null.String `json:"title,omitempty"` 8717 // Returns the absolute URL to the resource in the search result. 8718 URL null.String `json:"url,omitempty"` 8719 } 8720 8721 // The connection type for SearchResult. 8722 type SearchResultConnection struct { 8723 // A list of edges. 8724 Edges []*SearchResultEdge `json:"edges,omitempty"` 8725 // Information to aid in pagination. 8726 PageInfo *PageInfo `json:"pageInfo,omitempty"` 8727 // Information to aid in pagination. 8728 ResultsAfterCount int `json:"resultsAfterCount,omitempty"` 8729 } 8730 8731 // An auto-generated type which holds one SearchResult and a cursor during pagination. 8732 type SearchResultEdge struct { 8733 // A cursor for use in pagination. 8734 Cursor null.String `json:"cursor,omitempty"` 8735 // The item at the end of SearchResultEdge. 8736 Node *SearchResult `json:"node,omitempty"` 8737 } 8738 8739 // Properties used by customers to select a product variant. 8740 // Products can have multiple options, like different sizes or colors. 8741 type SelectedOption struct { 8742 // The product option’s name. 8743 Name null.String `json:"name,omitempty"` 8744 // The product option’s value. 8745 Value null.String `json:"value,omitempty"` 8746 } 8747 8748 // Represents how a product can be sold and purchased. Selling plans and associated records (selling plan groups 8749 // and policies) are deleted 48 hours after a merchant uninstalls their subscriptions app. We recommend backing 8750 // up these records if you need to restore them later. 8751 type SellingPlan struct { 8752 // Selling plan policy which describes the billing details. 8753 BillingPolicy SellingPlanBillingPolicy `json:"billingPolicy,omitempty"` 8754 // The date and time when the selling plan was created. 8755 CreatedAt null.String `json:"createdAt,omitempty"` 8756 // Selling plan policy which describes the delivery details. 8757 DeliveryPolicy SellingPlanDeliveryPolicy `json:"deliveryPolicy,omitempty"` 8758 // Buyer facing string which describes the selling plan commitment. 8759 Description *null.String `json:"description,omitempty"` 8760 // Globally unique identifier. 8761 ID null.String `json:"id,omitempty"` 8762 // Buyer facing string which describes the selling plan content. 8763 Name null.String `json:"name,omitempty"` 8764 // The values of all options available on the selling plan. Selling plans are grouped together in Liquid when they are created by the same app, and have the same `selling_plan_group.name` and `selling_plan_group.options` values. 8765 Options []null.String `json:"options,omitempty"` 8766 // Relative position of the selling plan for display. A lower position will be displayed before a higher position. 8767 Position *int `json:"position,omitempty"` 8768 // Selling plan pricing details. 8769 PricingPolicies []SellingPlanPricingPolicy `json:"pricingPolicies,omitempty"` 8770 } 8771 8772 func (SellingPlan) IsNode() {} 8773 8774 // Represents a selling plan policy anchor. 8775 type SellingPlanAnchor struct { 8776 // The day of the anchor. 8777 // 8778 // If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets 8779 // the days of the week according to ISO 8601, where 1 is Monday. 8780 // 8781 // If `type` is not WEEKDAY, then the value must be between 1-31. 8782 Day int `json:"day,omitempty"` 8783 // The month of the anchor. If type is different than YEARDAY, this field must be null, otherwise it must be 8784 // between 1-12. 8785 Month *int `json:"month,omitempty"` 8786 // Represents the anchor type, it can be one one of WEEKDAY, MONTHDAY, YEARDAY. 8787 Type SellingPlanAnchorType `json:"type,omitempty"` 8788 } 8789 8790 // Specifies the input fields required to create or update a selling plan anchor. 8791 type SellingPlanAnchorInput struct { 8792 // Represents the anchor type, must be one of WEEKDAY, MONTHDAY, YEARDAY. 8793 Type *SellingPlanAnchorType `json:"type,omitempty"` 8794 // The day of the anchor. 8795 // 8796 // If `type` is WEEKDAY, then the value must be between 1-7. Shopify interprets 8797 // the days of the week according to ISO 8601, where 1 is Monday. 8798 // 8799 // If `type` is not WEEKDAY, then the value must be between 1-31. 8800 Day *int `json:"day,omitempty"` 8801 // The month of the anchor. If type is different than YEARDAY, this field must be null, otherwise it must be 8802 // between 1-12. 8803 Month *int `json:"month,omitempty"` 8804 } 8805 8806 // Specifies the input fields required to create or update a billing policy type. 8807 type SellingPlanBillingPolicyInput struct { 8808 // Recurring billing policy details. 8809 Recurring *SellingPlanRecurringBillingPolicyInput `json:"recurring,omitempty"` 8810 } 8811 8812 // An auto-generated type for paginating through multiple SellingPlans. 8813 type SellingPlanConnection struct { 8814 // A list of edges. 8815 Edges []*SellingPlanEdge `json:"edges,omitempty"` 8816 // Information to aid in pagination. 8817 PageInfo *PageInfo `json:"pageInfo,omitempty"` 8818 } 8819 8820 // Specifies the input fields to create or update a delivery policy. 8821 type SellingPlanDeliveryPolicyInput struct { 8822 // Recurring delivery policy details. 8823 Recurring *SellingPlanRecurringDeliveryPolicyInput `json:"recurring,omitempty"` 8824 } 8825 8826 // An auto-generated type which holds one SellingPlan and a cursor during pagination. 8827 type SellingPlanEdge struct { 8828 // A cursor for use in pagination. 8829 Cursor null.String `json:"cursor,omitempty"` 8830 // The item at the end of SellingPlanEdge. 8831 Node *SellingPlan `json:"node,omitempty"` 8832 } 8833 8834 // Represents a fixed selling plan pricing policy. 8835 type SellingPlanFixedPricingPolicy struct { 8836 // The price adjustment type. 8837 AdjustmentType SellingPlanPricingPolicyAdjustmentType `json:"adjustmentType,omitempty"` 8838 // The price adjustment value. 8839 AdjustmentValue SellingPlanPricingPolicyAdjustmentValue `json:"adjustmentValue,omitempty"` 8840 // The date and time when the fixed selling plan pricing policy was created. 8841 CreatedAt null.String `json:"createdAt,omitempty"` 8842 } 8843 8844 func (SellingPlanFixedPricingPolicy) IsSellingPlanPricingPolicyBase() {} 8845 func (SellingPlanFixedPricingPolicy) IsSellingPlanPricingPolicy() {} 8846 8847 // Specifies the input fields required to create or update a fixed selling plan pricing policy. 8848 type SellingPlanFixedPricingPolicyInput struct { 8849 // ID of the pricing policy. 8850 ID *null.String `json:"id,omitempty"` 8851 // Price adjustment type defined by the policy. 8852 AdjustmentType *SellingPlanPricingPolicyAdjustmentType `json:"adjustmentType,omitempty"` 8853 // Price adjustment value defined by the policy. 8854 AdjustmentValue *SellingPlanPricingPolicyValueInput `json:"adjustmentValue,omitempty"` 8855 } 8856 8857 // Represents a selling method (for example, "Subscribe and save" or "Pre-paid"). Selling plan groups 8858 // and associated records (selling plans and policies) are deleted 48 hours after a merchant 8859 // uninstalls their subscriptions app. We recommend backing up these records if you need to restore them later. 8860 type SellingPlanGroup struct { 8861 // The identifier for app, exposed in Liquid and product JSON. 8862 AppID *null.String `json:"appId,omitempty"` 8863 // Whether the given product is directly associated to the selling plan group. 8864 AppliesToProduct bool `json:"appliesToProduct,omitempty"` 8865 // Whether the given product variant is directly associated to the selling plan group. 8866 AppliesToProductVariant bool `json:"appliesToProductVariant,omitempty"` 8867 // Whether any of the product variants of the given product are associated to the selling plan group. 8868 AppliesToProductVariants bool `json:"appliesToProductVariants,omitempty"` 8869 // The date and time when the selling plan group was created. 8870 CreatedAt null.String `json:"createdAt,omitempty"` 8871 // The merchant-facing description of the selling plan group. 8872 Description *null.String `json:"description,omitempty"` 8873 // Globally unique identifier. 8874 ID null.String `json:"id,omitempty"` 8875 // The merchant-facing label of the selling plan group. 8876 MerchantCode null.String `json:"merchantCode,omitempty"` 8877 // The buyer-facing label of the selling plan group. 8878 Name null.String `json:"name,omitempty"` 8879 // The values of all options available on the selling plan group. Selling plans are grouped together in Liquid when they are created by the same app, and have the same `selling_plan_group.name` and `selling_plan_group.options` values. 8880 Options []null.String `json:"options,omitempty"` 8881 // The relative position of the selling plan group for display. 8882 Position *int `json:"position,omitempty"` 8883 // A count of products associated to the selling plan group. 8884 ProductCount int `json:"productCount,omitempty"` 8885 // A count of product variants associated to the selling plan group. 8886 ProductVariantCount int `json:"productVariantCount,omitempty"` 8887 // Product variants associated to the selling plan group. 8888 ProductVariants *ProductVariantConnection `json:"productVariants,omitempty"` 8889 // Products associated to the selling plan group. 8890 Products *ProductConnection `json:"products,omitempty"` 8891 // Selling plans associated to the selling plan group. 8892 SellingPlans *SellingPlanConnection `json:"sellingPlans,omitempty"` 8893 // A summary of the policies associated to the selling plan group. 8894 Summary *null.String `json:"summary,omitempty"` 8895 } 8896 8897 func (SellingPlanGroup) IsNode() {} 8898 8899 // Return type for `sellingPlanGroupAddProductVariants` mutation. 8900 type SellingPlanGroupAddProductVariantsPayload struct { 8901 // The updated selling plan group. 8902 SellingPlanGroup *SellingPlanGroup `json:"sellingPlanGroup,omitempty"` 8903 // List of errors that occurred executing the mutation. 8904 UserErrors []*SellingPlanGroupUserError `json:"userErrors,omitempty"` 8905 } 8906 8907 // Return type for `sellingPlanGroupAddProducts` mutation. 8908 type SellingPlanGroupAddProductsPayload struct { 8909 // The updated selling plan group. 8910 SellingPlanGroup *SellingPlanGroup `json:"sellingPlanGroup,omitempty"` 8911 // List of errors that occurred executing the mutation. 8912 UserErrors []*SellingPlanGroupUserError `json:"userErrors,omitempty"` 8913 } 8914 8915 // An auto-generated type for paginating through multiple SellingPlanGroups. 8916 type SellingPlanGroupConnection struct { 8917 // A list of edges. 8918 Edges []*SellingPlanGroupEdge `json:"edges,omitempty"` 8919 // Information to aid in pagination. 8920 PageInfo *PageInfo `json:"pageInfo,omitempty"` 8921 } 8922 8923 // Return type for `sellingPlanGroupCreate` mutation. 8924 type SellingPlanGroupCreatePayload struct { 8925 // The created selling plan group object. 8926 SellingPlanGroup *SellingPlanGroup `json:"sellingPlanGroup,omitempty"` 8927 // List of errors that occurred executing the mutation. 8928 UserErrors []*SellingPlanGroupUserError `json:"userErrors,omitempty"` 8929 } 8930 8931 // Return type for `sellingPlanGroupDelete` mutation. 8932 type SellingPlanGroupDeletePayload struct { 8933 // The id of the deleted selling plan group object. 8934 DeletedSellingPlanGroupID *null.String `json:"deletedSellingPlanGroupId,omitempty"` 8935 // List of errors that occurred executing the mutation. 8936 UserErrors []*SellingPlanGroupUserError `json:"userErrors,omitempty"` 8937 } 8938 8939 // An auto-generated type which holds one SellingPlanGroup and a cursor during pagination. 8940 type SellingPlanGroupEdge struct { 8941 // A cursor for use in pagination. 8942 Cursor null.String `json:"cursor,omitempty"` 8943 // The item at the end of SellingPlanGroupEdge. 8944 Node *SellingPlanGroup `json:"node,omitempty"` 8945 } 8946 8947 // Specifies the input fields required to create or update a selling plan group. 8948 type SellingPlanGroupInput struct { 8949 // Buyer facing label of the selling plan group. 8950 Name *null.String `json:"name,omitempty"` 8951 // Identifier for app, exposed in Liquid and product JSON. 8952 AppID *null.String `json:"appId,omitempty"` 8953 // Merchant facing label of the selling plan group. 8954 MerchantCode *null.String `json:"merchantCode,omitempty"` 8955 // Merchant facing description of the selling plan group. 8956 Description *null.String `json:"description,omitempty"` 8957 // List of selling plans to create. 8958 SellingPlansToCreate []*SellingPlanInput `json:"sellingPlansToCreate,omitempty"` 8959 // List of selling plans to update. 8960 SellingPlansToUpdate []*SellingPlanInput `json:"sellingPlansToUpdate,omitempty"` 8961 // List of selling plans ids to delete. 8962 SellingPlansToDelete []null.String `json:"sellingPlansToDelete,omitempty"` 8963 // The values of all options available on the selling plan group. Selling plans are grouped together in Liquid when they are created by the same app, and have the same `selling_plan_group.name` and `selling_plan_group.options` values. 8964 Options []null.String `json:"options,omitempty"` 8965 // Relative value for display purposes of the selling plan group. A lower position will be displayed before a higher one. 8966 Position *int `json:"position,omitempty"` 8967 } 8968 8969 // Return type for `sellingPlanGroupRemoveProductVariants` mutation. 8970 type SellingPlanGroupRemoveProductVariantsPayload struct { 8971 // The removed product variant ids. 8972 RemovedProductVariantIds []null.String `json:"removedProductVariantIds,omitempty"` 8973 // List of errors that occurred executing the mutation. 8974 UserErrors []*SellingPlanGroupUserError `json:"userErrors,omitempty"` 8975 } 8976 8977 // Return type for `sellingPlanGroupRemoveProducts` mutation. 8978 type SellingPlanGroupRemoveProductsPayload struct { 8979 // The removed product ids. 8980 RemovedProductIds []null.String `json:"removedProductIds,omitempty"` 8981 // List of errors that occurred executing the mutation. 8982 UserErrors []*SellingPlanGroupUserError `json:"userErrors,omitempty"` 8983 } 8984 8985 // Specifies resource association with a Selling Plan Group. 8986 type SellingPlanGroupResourceInput struct { 8987 // The IDs of the Variants to add to the Selling Plan Group. 8988 ProductVariantIds []null.String `json:"productVariantIds,omitempty"` 8989 // The IDs of the Products to add to the Selling Plan Group. 8990 ProductIds []null.String `json:"productIds,omitempty"` 8991 } 8992 8993 // Return type for `sellingPlanGroupUpdate` mutation. 8994 type SellingPlanGroupUpdatePayload struct { 8995 // The IDs of the deleted Subscription Plans. 8996 DeletedSellingPlanIds []null.String `json:"deletedSellingPlanIds,omitempty"` 8997 // The updated Selling Plan Group. 8998 SellingPlanGroup *SellingPlanGroup `json:"sellingPlanGroup,omitempty"` 8999 // List of errors that occurred executing the mutation. 9000 UserErrors []*SellingPlanGroupUserError `json:"userErrors,omitempty"` 9001 } 9002 9003 // Represents a selling plan group custom error. 9004 type SellingPlanGroupUserError struct { 9005 // Error code to uniquely identify the error. 9006 Code *SellingPlanGroupUserErrorCode `json:"code,omitempty"` 9007 // Path to the input field which caused the error. 9008 Field []null.String `json:"field,omitempty"` 9009 // The error message. 9010 Message null.String `json:"message,omitempty"` 9011 } 9012 9013 func (SellingPlanGroupUserError) IsDisplayableError() {} 9014 9015 // Specifies the input fields to create or update a selling plan. 9016 type SellingPlanInput struct { 9017 // ID of the selling plan. 9018 ID *null.String `json:"id,omitempty"` 9019 // Buyer facing string which describes the selling plan content. 9020 Name *null.String `json:"name,omitempty"` 9021 // Buyer facing string which describes the selling plan commitment. 9022 Description *null.String `json:"description,omitempty"` 9023 // Selling plan policy which describes the billing details. 9024 BillingPolicy *SellingPlanBillingPolicyInput `json:"billingPolicy,omitempty"` 9025 // Selling plan policy which describes the delivery details. 9026 DeliveryPolicy *SellingPlanDeliveryPolicyInput `json:"deliveryPolicy,omitempty"` 9027 // Pricing policies which describe the pricing details. Each selling plan 9028 // can only contain a maximum of 2 pricing policies. 9029 PricingPolicies []*SellingPlanPricingPolicyInput `json:"pricingPolicies,omitempty"` 9030 // The values of all options available on the selling plan. Selling plans are grouped together in Liquid when they are created by the same app, and have the same `selling_plan_group.name` and `selling_plan_group.options` values. 9031 Options []null.String `json:"options,omitempty"` 9032 // Relative value for display purposes of this plan. A lower position will be displayed before a higher one. 9033 Position *int `json:"position,omitempty"` 9034 } 9035 9036 // Specifies the input fields required to create or update a selling plan pricing policy. 9037 type SellingPlanPricingPolicyInput struct { 9038 // Recurring pricing policy details. 9039 Recurring *SellingPlanRecurringPricingPolicyInput `json:"recurring,omitempty"` 9040 // Fixed pricing policy details. 9041 Fixed *SellingPlanFixedPricingPolicyInput `json:"fixed,omitempty"` 9042 } 9043 9044 // Represents the percentage value of a selling plan pricing policy percentage type. 9045 type SellingPlanPricingPolicyPercentageValue struct { 9046 // The percentage value. 9047 Percentage float64 `json:"percentage,omitempty"` 9048 } 9049 9050 func (SellingPlanPricingPolicyPercentageValue) IsSellingPlanPricingPolicyAdjustmentValue() {} 9051 9052 // Specifies the input fields required to create or update a pricing policy adjustment value. 9053 type SellingPlanPricingPolicyValueInput struct { 9054 // Defines percentage value. 9055 Percentage *float64 `json:"percentage,omitempty"` 9056 // Defines fixed value for an fixed amount off or a new policy price. 9057 FixedValue *null.String `json:"fixedValue,omitempty"` 9058 } 9059 9060 // Represents a recurring selling plan billing policy. 9061 type SellingPlanRecurringBillingPolicy struct { 9062 // Specific anchor dates upon which the billing interval calculations should be made. 9063 Anchors []*SellingPlanAnchor `json:"anchors,omitempty"` 9064 // The date and time when the selling plan billing policy was created. 9065 CreatedAt null.String `json:"createdAt,omitempty"` 9066 // The billing frequency, it can be either: day, week, month or year. 9067 Interval SellingPlanInterval `json:"interval,omitempty"` 9068 // The number of intervals between billings. 9069 IntervalCount int `json:"intervalCount,omitempty"` 9070 // Maximum number of billing iterations. 9071 MaxCycles *int `json:"maxCycles,omitempty"` 9072 // Minimum number of billing iterations. 9073 MinCycles *int `json:"minCycles,omitempty"` 9074 } 9075 9076 func (SellingPlanRecurringBillingPolicy) IsSellingPlanBillingPolicy() {} 9077 9078 // Specifies the input fields required to create or update a recurring billing policy. 9079 type SellingPlanRecurringBillingPolicyInput struct { 9080 // The billing frequency, it can be either: day, week, month or year. 9081 Interval *SellingPlanInterval `json:"interval,omitempty"` 9082 // The number of intervals between billings. 9083 IntervalCount *int `json:"intervalCount,omitempty"` 9084 // Specific anchor dates upon which the billing interval calculations should be made. 9085 Anchors []*SellingPlanAnchorInput `json:"anchors,omitempty"` 9086 // Minimum number of billing iterations. 9087 MinCycles *int `json:"minCycles,omitempty"` 9088 // Maximum number of billing iterations. 9089 MaxCycles *int `json:"maxCycles,omitempty"` 9090 } 9091 9092 // Represents a recurring selling plan delivery policy. 9093 type SellingPlanRecurringDeliveryPolicy struct { 9094 // Specific anchor dates upon which the delivery interval calculations should be made. 9095 Anchors []*SellingPlanAnchor `json:"anchors,omitempty"` 9096 // The date and time when the selling plan delivery policy was created. 9097 CreatedAt null.String `json:"createdAt,omitempty"` 9098 // A buffer period for orders to be included in a cycle. 9099 Cutoff *int `json:"cutoff,omitempty"` 9100 // Specifies if the delivery policy is merchant or buyer-centric. 9101 // Buyer-centric delivery policies state the time when the buyer will receive the goods. 9102 // Merchant-centric delivery policies state the time when the fulfillment should be started. 9103 // Currently, only merchant-centric delivery policies are supported. 9104 Intent SellingPlanRecurringDeliveryPolicyIntent `json:"intent,omitempty"` 9105 // The delivery frequency, it can be either: day, week, month or year. 9106 Interval SellingPlanInterval `json:"interval,omitempty"` 9107 // The number of intervals between deliveries. 9108 IntervalCount int `json:"intervalCount,omitempty"` 9109 // Fulfillment or delivery behavior of the first fulfillment when the order is placed before the anchor. The default value for this field is `ASAP`. 9110 PreAnchorBehavior SellingPlanRecurringDeliveryPolicyPreAnchorBehavior `json:"preAnchorBehavior,omitempty"` 9111 } 9112 9113 func (SellingPlanRecurringDeliveryPolicy) IsSellingPlanDeliveryPolicy() {} 9114 9115 // Specifies the input fields to create or update a recurring delivery policy. 9116 type SellingPlanRecurringDeliveryPolicyInput struct { 9117 // The delivery frequency, it can be either: day, week, month or year. 9118 Interval *SellingPlanInterval `json:"interval,omitempty"` 9119 // The number of intervals between deliveries. 9120 IntervalCount *int `json:"intervalCount,omitempty"` 9121 // Specific anchor dates upon which the delivery interval calculations should be made. 9122 Anchors []*SellingPlanAnchorInput `json:"anchors,omitempty"` 9123 // A buffer period for orders to be included in a cycle. 9124 Cutoff *int `json:"cutoff,omitempty"` 9125 // Intention of this delivery policy, it can be either: delivery or fulfillment. 9126 Intent *SellingPlanRecurringDeliveryPolicyIntent `json:"intent,omitempty"` 9127 // The pre anchor behavior. It can be either: asap or next. 9128 PreAnchorBehavior *SellingPlanRecurringDeliveryPolicyPreAnchorBehavior `json:"preAnchorBehavior,omitempty"` 9129 } 9130 9131 // Represents a recurring selling plan pricing policy. 9132 type SellingPlanRecurringPricingPolicy struct { 9133 // The price adjustment type. 9134 AdjustmentType SellingPlanPricingPolicyAdjustmentType `json:"adjustmentType,omitempty"` 9135 // The price adjustment value. 9136 AdjustmentValue SellingPlanPricingPolicyAdjustmentValue `json:"adjustmentValue,omitempty"` 9137 // Cycle after which this pricing policy applies. 9138 AfterCycle *int `json:"afterCycle,omitempty"` 9139 // The date and time when the recurring selling plan pricing policy was created. 9140 CreatedAt null.String `json:"createdAt,omitempty"` 9141 } 9142 9143 func (SellingPlanRecurringPricingPolicy) IsSellingPlanPricingPolicy() {} 9144 func (SellingPlanRecurringPricingPolicy) IsSellingPlanPricingPolicyBase() {} 9145 9146 // Specifies the input fields required to create or update a recurring selling plan pricing policy. 9147 type SellingPlanRecurringPricingPolicyInput struct { 9148 // ID of the pricing policy. 9149 ID *null.String `json:"id,omitempty"` 9150 // Price adjustment type defined by the policy. 9151 AdjustmentType *SellingPlanPricingPolicyAdjustmentType `json:"adjustmentType,omitempty"` 9152 // Price adjustment value defined by the policy. 9153 AdjustmentValue *SellingPlanPricingPolicyValueInput `json:"adjustmentValue,omitempty"` 9154 // Cycle after which the pricing policy applies. If not provided the policy will be applicable from the first cycle. 9155 AfterCycle int `json:"afterCycle,omitempty"` 9156 } 9157 9158 // Represents the shipping details that the customer chose for their order. 9159 type ShippingLine struct { 9160 // A reference to the carrier service that provided the rate. 9161 // Present when the rate was computed by a third-party carrier service. 9162 CarrierIdentifier *null.String `json:"carrierIdentifier,omitempty"` 9163 // A reference to the shipping method. 9164 Code *null.String `json:"code,omitempty"` 9165 // Whether the shipping line is custom or not. 9166 Custom bool `json:"custom,omitempty"` 9167 // The general classification of the delivery method. 9168 DeliveryCategory *null.String `json:"deliveryCategory,omitempty"` 9169 // The discounts that have been allocated to the shipping line. 9170 DiscountAllocations []*DiscountAllocation `json:"discountAllocations,omitempty"` 9171 // The pre-tax shipping price with discounts applied. 9172 DiscountedPrice *MoneyV2 `json:"discountedPrice,omitempty"` 9173 // The pre-tax shipping price with discounts applied. 9174 DiscountedPriceSet *MoneyBag `json:"discountedPriceSet,omitempty"` 9175 // Globally unique identifier. 9176 ID *null.String `json:"id,omitempty"` 9177 // The pre-tax shipping price without any discounts applied. 9178 OriginalPrice *MoneyV2 `json:"originalPrice,omitempty"` 9179 // The pre-tax shipping price without any discounts applied. 9180 OriginalPriceSet *MoneyBag `json:"originalPriceSet,omitempty"` 9181 // The phone number at the shipping address. 9182 Phone *null.String `json:"phone,omitempty"` 9183 // Returns the price of the shipping line. 9184 Price null.String `json:"price,omitempty"` 9185 // The fulfillment service requested for the shipping method. 9186 // Present if the shipping method requires processing by a third party fulfillment service. 9187 RequestedFulfillmentService *FulfillmentService `json:"requestedFulfillmentService,omitempty"` 9188 // A unique identifier for the shipping rate. The format can change without notice and is not meant to be shown to users. 9189 ShippingRateHandle *null.String `json:"shippingRateHandle,omitempty"` 9190 // Returns the rate source for the shipping line. 9191 Source *null.String `json:"source,omitempty"` 9192 // The TaxLine objects connected to this shipping line. 9193 TaxLines []*TaxLine `json:"taxLines,omitempty"` 9194 // Returns the title of the shipping line. 9195 Title null.String `json:"title,omitempty"` 9196 } 9197 9198 // An auto-generated type for paginating through multiple ShippingLines. 9199 type ShippingLineConnection struct { 9200 // A list of edges. 9201 Edges []*ShippingLineEdge `json:"edges,omitempty"` 9202 // Information to aid in pagination. 9203 PageInfo *PageInfo `json:"pageInfo,omitempty"` 9204 } 9205 9206 // An auto-generated type which holds one ShippingLine and a cursor during pagination. 9207 type ShippingLineEdge struct { 9208 // A cursor for use in pagination. 9209 Cursor null.String `json:"cursor,omitempty"` 9210 // The item at the end of ShippingLineEdge. 9211 Node *ShippingLine `json:"node,omitempty"` 9212 } 9213 9214 // Specifies the shipping details for the order. 9215 type ShippingLineInput struct { 9216 // Price of the shipping rate. 9217 Price *null.String `json:"price,omitempty"` 9218 // A unique identifier for the shipping rate. 9219 ShippingRateHandle *null.String `json:"shippingRateHandle,omitempty"` 9220 // Title of the shipping rate. 9221 Title *null.String `json:"title,omitempty"` 9222 } 9223 9224 // The shipping method for the delivery. 9225 type ShippingMethod struct { 9226 // A unique code associated with the rate. For example: `expedited_mail` 9227 Code null.String `json:"code,omitempty"` 9228 // A description of the rate, which customers will see at checkout. 9229 // For example: `Includes tracking and insurance`. 9230 Label null.String `json:"label,omitempty"` 9231 } 9232 9233 // Return type for `shippingPackageDelete` mutation. 9234 type ShippingPackageDeletePayload struct { 9235 // The ID of the deleted shipping package. 9236 DeletedID *null.String `json:"deletedId,omitempty"` 9237 // List of errors that occurred executing the mutation. 9238 UserErrors []*UserError `json:"userErrors,omitempty"` 9239 } 9240 9241 // Return type for `shippingPackageMakeDefault` mutation. 9242 type ShippingPackageMakeDefaultPayload struct { 9243 // List of errors that occurred executing the mutation. 9244 UserErrors []*UserError `json:"userErrors,omitempty"` 9245 } 9246 9247 // Return type for `shippingPackageUpdate` mutation. 9248 type ShippingPackageUpdatePayload struct { 9249 // List of errors that occurred executing the mutation. 9250 UserErrors []*UserError `json:"userErrors,omitempty"` 9251 } 9252 9253 // A shipping rate to be applied to an order. 9254 type ShippingRate struct { 9255 // Human-readable unique identifier for this shipping rate. 9256 Handle null.String `json:"handle,omitempty"` 9257 // Price of this shipping rate. 9258 Price *MoneyV2 `json:"price,omitempty"` 9259 // Title of this shipping rate. 9260 Title null.String `json:"title,omitempty"` 9261 } 9262 9263 // Represents the shipping costs refunded on the Refund. 9264 type ShippingRefund struct { 9265 // The monetary value of the shipping fees to be returned. 9266 Amount null.String `json:"amount,omitempty"` 9267 // The monetary value of the shipping fees to be returned in shop and presentment currencies. 9268 AmountSet *MoneyBag `json:"amountSet,omitempty"` 9269 // The maximum amount of shipping fees currently refundable. 9270 MaximumRefundable null.String `json:"maximumRefundable,omitempty"` 9271 // The maximum amount of shipping fees currently refundable in shop and presentment currencies. 9272 MaximumRefundableSet *MoneyBag `json:"maximumRefundableSet,omitempty"` 9273 // The monetary value of the tax allocated to shipping fees to be returned. 9274 Tax null.String `json:"tax,omitempty"` 9275 // The monetary value of the tax allocated to shipping fees to be returned in shop and presentment currencies. 9276 TaxSet *MoneyBag `json:"taxSet,omitempty"` 9277 } 9278 9279 // Specifies the fields required to return shipping costs on a Refund. 9280 type ShippingRefundInput struct { 9281 // The monetary value of the shipping fees to be returned. 9282 Amount *null.String `json:"amount,omitempty"` 9283 // Whether a full refund is provided. 9284 FullRefund *bool `json:"fullRefund,omitempty"` 9285 } 9286 9287 // Represents the shop object. 9288 type Shop struct { 9289 // Alert message that appears in the Shopify admin. 9290 Alerts []*ShopAlert `json:"alerts,omitempty"` 9291 // The token required to query the shop's reports or dashboards. 9292 AnalyticsToken null.String `json:"analyticsToken,omitempty"` 9293 // Paginated list of fulfillment orders assigned to fulfillment services. 9294 AssignedFulfillmentOrders *FulfillmentOrderConnection `json:"assignedFulfillmentOrders,omitempty"` 9295 // List of sales channels not currently installed on the shop. 9296 AvailableChannelApps *AppConnection `json:"availableChannelApps,omitempty"` 9297 // The shop's billing address information. 9298 BillingAddress *MailingAddress `json:"billingAddress,omitempty"` 9299 // Exposes the number of channels. 9300 ChannelCount int `json:"channelCount,omitempty"` 9301 // List of the shop's active sales channels. 9302 Channels *ChannelConnection `json:"channels,omitempty"` 9303 // Specifies whether the shop supports checkouts via Checkout API. 9304 CheckoutAPISupported bool `json:"checkoutApiSupported,omitempty"` 9305 // Return a collection by its handle. 9306 CollectionByHandle *Collection `json:"collectionByHandle,omitempty"` 9307 // List of the shop's collection saved searches. 9308 CollectionSavedSearches *SavedSearchConnection `json:"collectionSavedSearches,omitempty"` 9309 // List of the shop's collections. 9310 Collections *CollectionConnection `json:"collections,omitempty"` 9311 // The public-facing contact email address for the shop. 9312 // Customers will use this email to communicate with the shop owner. 9313 ContactEmail null.String `json:"contactEmail,omitempty"` 9314 // Countries that have been defined in shipping zones for the shop. 9315 CountriesInShippingZones *CountriesInShippingZones `json:"countriesInShippingZones,omitempty"` 9316 // The three letter code for the shop's currency. 9317 CurrencyCode CurrencyCode `json:"currencyCode,omitempty"` 9318 // How currencies are displayed on your store. 9319 CurrencyFormats *CurrencyFormats `json:"currencyFormats,omitempty"` 9320 // The currency settings for the shop. 9321 CurrencySettings *CurrencySettingConnection `json:"currencySettings,omitempty"` 9322 // The shop's customer account requirement preference. 9323 CustomerAccounts ShopCustomerAccountsSetting `json:"customerAccounts,omitempty"` 9324 // List of the shop's customer saved searches. 9325 CustomerSavedSearches *SavedSearchConnection `json:"customerSavedSearches,omitempty"` 9326 // A list of tags that have been added to customer accounts. 9327 CustomerTags *StringConnection `json:"customerTags,omitempty"` 9328 // Customer accounts associated to the shop. 9329 Customers *CustomerConnection `json:"customers,omitempty"` 9330 // The shop's meta description used in search engine results. 9331 Description *null.String `json:"description,omitempty"` 9332 // The domains configured for the shop. 9333 Domains []*Domain `json:"domains,omitempty"` 9334 // List of the shop's draft order saved searches. 9335 DraftOrderSavedSearches *SavedSearchConnection `json:"draftOrderSavedSearches,omitempty"` 9336 // A list of tags that have been added to draft orders. 9337 DraftOrderTags *StringConnection `json:"draftOrderTags,omitempty"` 9338 // List of saved draft orders on the shop. 9339 DraftOrders *DraftOrderConnection `json:"draftOrders,omitempty"` 9340 // The shop owner's email address. 9341 // Shopify will use this email address to communicate with the shop owner. 9342 Email null.String `json:"email,omitempty"` 9343 // The presentment currencies enabled for the shop. 9344 EnabledPresentmentCurrencies []CurrencyCode `json:"enabledPresentmentCurrencies,omitempty"` 9345 // The shop's features. 9346 Features *ShopFeatures `json:"features,omitempty"` 9347 // Paginated list of merchant-managed and third-party fulfillment orders. 9348 FulfillmentOrders *FulfillmentOrderConnection `json:"fulfillmentOrders,omitempty"` 9349 // List of the shop's installed fulfillment services. 9350 FulfillmentServices []*FulfillmentService `json:"fulfillmentServices,omitempty"` 9351 // The shop's time zone as defined by the IANA. 9352 IanaTimezone null.String `json:"ianaTimezone,omitempty"` 9353 // Globally unique identifier. 9354 ID null.String `json:"id,omitempty"` 9355 // List of the shop's inventory items. 9356 InventoryItems *InventoryItemConnection `json:"inventoryItems,omitempty"` 9357 // The number of pendings orders on the shop. 9358 // Limited to a maximum of 10000. 9359 LimitedPendingOrderCount *LimitedPendingOrderCount `json:"limitedPendingOrderCount,omitempty"` 9360 // List of active locations of the shop. 9361 Locations *LocationConnection `json:"locations,omitempty"` 9362 // List of a shop's marketing events. 9363 MarketingEvents *MarketingEventConnection `json:"marketingEvents,omitempty"` 9364 // The metafield associated with the resource. 9365 Metafield *Metafield `json:"metafield,omitempty"` 9366 // A paginated list of metafields associated with the resource. 9367 Metafields *MetafieldConnection `json:"metafields,omitempty"` 9368 // The shop's .myshopify.com domain name. 9369 MyshopifyDomain null.String `json:"myshopifyDomain,omitempty"` 9370 // The shop's name. 9371 Name null.String `json:"name,omitempty"` 9372 // The navigation settings of the shop. 9373 NavigationSettings []*NavigationItem `json:"navigationSettings,omitempty"` 9374 // The prefix that appears before order numbers. 9375 OrderNumberFormatPrefix null.String `json:"orderNumberFormatPrefix,omitempty"` 9376 // The suffix that appears after order numbers. 9377 OrderNumberFormatSuffix null.String `json:"orderNumberFormatSuffix,omitempty"` 9378 // List of the shop's order saved searches. 9379 OrderSavedSearches *SavedSearchConnection `json:"orderSavedSearches,omitempty"` 9380 // A list of tags that have been added to orders. 9381 OrderTags *StringConnection `json:"orderTags,omitempty"` 9382 // List of orders placed on the shop. 9383 Orders *OrderConnection `json:"orders,omitempty"` 9384 // Settings related to payments. 9385 PaymentSettings *PaymentSettings `json:"paymentSettings,omitempty"` 9386 // Number of pending orders on the shop. 9387 PendingOrderCount int `json:"pendingOrderCount,omitempty"` 9388 // The shop's plan. 9389 Plan *ShopPlan `json:"plan,omitempty"` 9390 // List of the shop's price rule saved searches. 9391 PriceRuleSavedSearches *SavedSearchConnection `json:"priceRuleSavedSearches,omitempty"` 9392 // List of the shop’s price rules. 9393 PriceRules *PriceRuleConnection `json:"priceRules,omitempty"` 9394 // The shop's primary domain name. 9395 PrimaryDomain *Domain `json:"primaryDomain,omitempty"` 9396 // Returns a private metafield found by namespace and key. 9397 PrivateMetafield *PrivateMetafield `json:"privateMetafield,omitempty"` 9398 // List of private metafields. 9399 PrivateMetafields *PrivateMetafieldConnection `json:"privateMetafields,omitempty"` 9400 // Return a product by its handle. 9401 ProductByHandle *Product `json:"productByHandle,omitempty"` 9402 // All images of all products of the shop. 9403 ProductImages *ImageConnection `json:"productImages,omitempty"` 9404 // List of the shop's product saved searches. 9405 ProductSavedSearches *SavedSearchConnection `json:"productSavedSearches,omitempty"` 9406 // A list of tags that have been added to products. 9407 ProductTags *StringConnection `json:"productTags,omitempty"` 9408 // Types added to products. 9409 ProductTypes *StringConnection `json:"productTypes,omitempty"` 9410 // List of the shop's product variants. 9411 ProductVariants *ProductVariantConnection `json:"productVariants,omitempty"` 9412 // Vendors added to products. 9413 ProductVendors *StringConnection `json:"productVendors,omitempty"` 9414 // List of the shop's products. 9415 Products *ProductConnection `json:"products,omitempty"` 9416 // Exposes the number of publications. 9417 PublicationCount int `json:"publicationCount,omitempty"` 9418 // Resource limits of a shop. 9419 ResourceLimits *ShopResourceLimits `json:"resourceLimits,omitempty"` 9420 // The URL of the rich text editor. 9421 RichTextEditorURL null.String `json:"richTextEditorUrl,omitempty"` 9422 // Return admin search results. 9423 Search *SearchResultConnection `json:"search,omitempty"` 9424 // List of search filter options. 9425 SearchFilters *SearchFilterOptions `json:"searchFilters,omitempty"` 9426 // Whether the shop has outstanding setup steps. 9427 SetupRequired bool `json:"setupRequired,omitempty"` 9428 // Countries that the shop ships to. 9429 ShipsToCountries []CountryCode `json:"shipsToCountries,omitempty"` 9430 // A list of all policies associated with a shop. 9431 ShopPolicies []*ShopPolicy `json:"shopPolicies,omitempty"` 9432 // Shopify Payments account information, including balances and payouts. 9433 ShopifyPaymentsAccount *ShopifyPaymentsAccount `json:"shopifyPaymentsAccount,omitempty"` 9434 // Storefront access token of a private application. Scoped per-application. 9435 StorefrontAccessTokens *StorefrontAccessTokenConnection `json:"storefrontAccessTokens,omitempty"` 9436 // The URL of the shop's storefront. 9437 StorefrontURL null.String `json:"storefrontUrl,omitempty"` 9438 // Specifies whether or not taxes are charged for shipping. 9439 TaxShipping bool `json:"taxShipping,omitempty"` 9440 // The setting for whether applicable taxes are included in product prices. 9441 TaxesIncluded bool `json:"taxesIncluded,omitempty"` 9442 // The shop's time zone abbreviation. 9443 TimezoneAbbreviation null.String `json:"timezoneAbbreviation,omitempty"` 9444 // The shop's time zone offset. 9445 TimezoneOffset null.String `json:"timezoneOffset,omitempty"` 9446 // The shop's time zone offset expressed in number of minutes. 9447 TimezoneOffsetMinutes int `json:"timezoneOffsetMinutes,omitempty"` 9448 // The translations associated with the resource. 9449 Translations []*PublishedTranslation `json:"translations,omitempty"` 9450 // The shop's unit system. 9451 UnitSystem UnitSystem `json:"unitSystem,omitempty"` 9452 // All images uploaded to the shop. 9453 UploadedImages *ImageConnection `json:"uploadedImages,omitempty"` 9454 // Fetch list of images uploaded to shop by ids. 9455 UploadedImagesByIds []*Image `json:"uploadedImagesByIds,omitempty"` 9456 // The URL of the shop's storefront. 9457 URL null.String `json:"url,omitempty"` 9458 // The shop's primary unit of weight for products and shipping. 9459 WeightUnit WeightUnit `json:"weightUnit,omitempty"` 9460 } 9461 9462 func (Shop) IsNode() {} 9463 func (Shop) IsHasPublishedTranslations() {} 9464 func (Shop) IsHasMetafields() {} 9465 9466 // Alert message that appears in the Shopify admin. 9467 type ShopAlert struct { 9468 // Button in the alert that links to related information. 9469 Action *ShopAlertAction `json:"action,omitempty"` 9470 // Description of the alert. 9471 Description null.String `json:"description,omitempty"` 9472 } 9473 9474 // An action associated to a shop alert. 9475 type ShopAlertAction struct { 9476 // Action title. 9477 Title null.String `json:"title,omitempty"` 9478 // Action target URL. 9479 URL null.String `json:"url,omitempty"` 9480 } 9481 9482 // Represents the feature set available to the shop. 9483 type ShopFeatures struct { 9484 // Whether a shop has access to avalara avatax. 9485 AvalaraAvatax bool `json:"avalaraAvatax,omitempty"` 9486 // Branding of the shop. 9487 Branding ShopBranding `json:"branding,omitempty"` 9488 // Whether a shop's storefront can have CAPTCHA protection. 9489 Captcha bool `json:"captcha,omitempty"` 9490 // Whether a shop's storefront can have CAPTCHA protection for domains not managed by Shopify. 9491 CaptchaExternalDomains bool `json:"captchaExternalDomains,omitempty"` 9492 // Whether the delivery profiles functionality is enabled for this shop. 9493 DeliveryProfiles bool `json:"deliveryProfiles,omitempty"` 9494 // Whether a shop has access to the dynamic remarketing feature. 9495 DynamicRemarketing bool `json:"dynamicRemarketing,omitempty"` 9496 // Whether a shop can be migrated to use Shopify subscriptions. 9497 EligibleForSubscriptionMigration bool `json:"eligibleForSubscriptionMigration,omitempty"` 9498 // Whether a shop is configured properly to sell subscriptions. 9499 EligibleForSubscriptions bool `json:"eligibleForSubscriptions,omitempty"` 9500 // Whether a shop can create gift cards. 9501 GiftCards bool `json:"giftCards,omitempty"` 9502 // Display Harmonized System codes on products. Used for customs when shipping cross-border. 9503 HarmonizedSystemCode bool `json:"harmonizedSystemCode,omitempty"` 9504 // Whether a shop can enable international domains. 9505 InternationalDomains bool `json:"internationalDomains,omitempty"` 9506 // Whether a shop can enable international price overrides. 9507 InternationalPriceOverrides bool `json:"internationalPriceOverrides,omitempty"` 9508 // Whether a shop can enable international price rules. 9509 InternationalPriceRules bool `json:"internationalPriceRules,omitempty"` 9510 // Whether a shop has enabled a legacy subscription gateway to handle older subscriptions. 9511 LegacySubscriptionGatewayEnabled bool `json:"legacySubscriptionGatewayEnabled,omitempty"` 9512 // Whether to show the live view. Live view is hidden from merchants that are on a trial or don't have a storefront. 9513 LiveView bool `json:"liveView,omitempty"` 9514 // Whether the multi-location functionality is enabled for this shop. 9515 MultiLocation bool `json:"multiLocation,omitempty"` 9516 // Whether a shop has access to the onboarding visual. 9517 OnboardingVisual bool `json:"onboardingVisual,omitempty"` 9518 // Whether a shop has access to all reporting features. 9519 Reports bool `json:"reports,omitempty"` 9520 // Whether the shop has ever had subscription products. 9521 SellsSubscriptions bool `json:"sellsSubscriptions,omitempty"` 9522 // Whether the shop has a Shopify Plus subscription. 9523 ShopifyPlus bool `json:"shopifyPlus,omitempty"` 9524 // Whether to show metrics. Metrics are hidden for new merchants until they become meaningful. 9525 ShowMetrics bool `json:"showMetrics,omitempty"` 9526 // Whether the shop has an online storefront. 9527 Storefront bool `json:"storefront,omitempty"` 9528 } 9529 9530 // Available locale for a shop. 9531 type ShopLocale struct { 9532 // Locale identifier. 9533 Locale null.String `json:"locale,omitempty"` 9534 // Locale name. 9535 Name null.String `json:"name,omitempty"` 9536 // Whether or not this is the default locale for the shop. 9537 Primary bool `json:"primary,omitempty"` 9538 // Whether or not the locale is published. 9539 Published bool `json:"published,omitempty"` 9540 } 9541 9542 // Return type for `shopLocaleDisable` mutation. 9543 type ShopLocaleDisablePayload struct { 9544 // The locale identifier that was disabled. 9545 Locale *null.String `json:"locale,omitempty"` 9546 // List of errors that occurred executing the mutation. 9547 UserErrors []*UserError `json:"userErrors,omitempty"` 9548 } 9549 9550 // Return type for `shopLocaleEnable` mutation. 9551 type ShopLocaleEnablePayload struct { 9552 // The locale that was enabled. 9553 ShopLocale *ShopLocale `json:"shopLocale,omitempty"` 9554 // List of errors that occurred executing the mutation. 9555 UserErrors []*UserError `json:"userErrors,omitempty"` 9556 } 9557 9558 // Specifies the input fields for a shop locale. 9559 type ShopLocaleInput struct { 9560 // Specifies the publication state of the locale. 9561 Published *bool `json:"published,omitempty"` 9562 } 9563 9564 // Return type for `shopLocaleUpdate` mutation. 9565 type ShopLocaleUpdatePayload struct { 9566 // The locale that was updated. 9567 ShopLocale *ShopLocale `json:"shopLocale,omitempty"` 9568 // List of errors that occurred executing the mutation. 9569 UserErrors []*UserError `json:"userErrors,omitempty"` 9570 } 9571 9572 // Represents the billing plan of the shop. 9573 type ShopPlan struct { 9574 // The name of the shop's billing plan. 9575 DisplayName null.String `json:"displayName,omitempty"` 9576 // Whether the shop is a partner development shop for testing purposes. 9577 PartnerDevelopment bool `json:"partnerDevelopment,omitempty"` 9578 // Whether the shop has a Shopify Plus subscription. 9579 ShopifyPlus bool `json:"shopifyPlus,omitempty"` 9580 } 9581 9582 // Policy that a merchant has configured for their store, such as their refund or privacy policy. 9583 type ShopPolicy struct { 9584 // The text of the policy. The maximum size is 512kb. 9585 Body null.String `json:"body,omitempty"` 9586 // Globally unique identifier. 9587 ID null.String `json:"id,omitempty"` 9588 // The translations associated with the resource. 9589 Translations []*PublishedTranslation `json:"translations,omitempty"` 9590 // The shop policy type. 9591 Type ShopPolicyType `json:"type,omitempty"` 9592 // The public URL of the policy. 9593 URL null.String `json:"url,omitempty"` 9594 } 9595 9596 func (ShopPolicy) IsNode() {} 9597 func (ShopPolicy) IsHasPublishedTranslations() {} 9598 9599 // Specifies the input fields required to update a policy. 9600 type ShopPolicyInput struct { 9601 // The shop policy type. 9602 Type ShopPolicyType `json:"type,omitempty"` 9603 // Policy text, maximum size of 512kb. 9604 Body null.String `json:"body,omitempty"` 9605 } 9606 9607 // Return type for `shopPolicyUpdate` mutation. 9608 type ShopPolicyUpdatePayload struct { 9609 // The shop policy that has been updated. 9610 ShopPolicy *ShopPolicy `json:"shopPolicy,omitempty"` 9611 // List of errors that occurred executing the mutation. 9612 UserErrors []*ShopPolicyUserError `json:"userErrors,omitempty"` 9613 } 9614 9615 // An error that occurs during the execution of a shop policy mutation. 9616 type ShopPolicyUserError struct { 9617 // Error code to uniquely identify the error. 9618 Code *ShopPolicyErrorCode `json:"code,omitempty"` 9619 // Path to the input field which caused the error. 9620 Field []null.String `json:"field,omitempty"` 9621 // The error message. 9622 Message null.String `json:"message,omitempty"` 9623 } 9624 9625 func (ShopPolicyUserError) IsDisplayableError() {} 9626 9627 // Resource limits of a shop. 9628 type ShopResourceLimits struct { 9629 // Maximum number of locations allowed. 9630 LocationLimit int `json:"locationLimit,omitempty"` 9631 // Maximum number of product options allowed. 9632 MaxProductOptions int `json:"maxProductOptions,omitempty"` 9633 // The maximum number of variants allowed per product. 9634 MaxProductVariants int `json:"maxProductVariants,omitempty"` 9635 // Whether the shop has reached the limit of the number of URL redirects it can make for resources. 9636 RedirectLimitReached bool `json:"redirectLimitReached,omitempty"` 9637 // The maximum number of variants allowed per shop. If the shop has unlimited SKUs, then the quantity used cannot be retrieved. 9638 SkuResourceLimits *ResourceLimit `json:"skuResourceLimits,omitempty"` 9639 } 9640 9641 // Balance and payout information for a 9642 // [Shopify Payments](https://help.shopify.com/manual/payments/shopify-payments/getting-paid-with-shopify-payments) 9643 // account. Balance includes all balances for the currencies supported by the shop. 9644 // You can also query for a list of payouts, where each payout includes the corresponding currencyCode field. 9645 type ShopifyPaymentsAccount struct { 9646 // Whether the Shopify Payments setup is completed. 9647 Activated bool `json:"activated,omitempty"` 9648 // Current balances in all currencies for the account. 9649 Balance []*MoneyV2 `json:"balance,omitempty"` 9650 // All bank accounts configured for the Shopify Payments account. 9651 BankAccounts *ShopifyPaymentsBankAccountConnection `json:"bankAccounts,omitempty"` 9652 // Statement descriptor used for charges. 9653 // 9654 // This is what buyers will see on their credit card or bank statements when making a purchase. 9655 ChargeStatementDescriptor *null.String `json:"chargeStatementDescriptor,omitempty"` 9656 // Statement descriptors used for charges. 9657 // 9658 // This is what buyers will see on their credit card or bank statements when making a purchase. 9659 ChargeStatementDescriptors ShopifyPaymentsChargeStatementDescriptor `json:"chargeStatementDescriptors,omitempty"` 9660 // The Shopify Payments account country. 9661 Country null.String `json:"country,omitempty"` 9662 // The default payout currency for the Shopify Payments account. 9663 DefaultCurrency CurrencyCode `json:"defaultCurrency,omitempty"` 9664 // All disputes related to the Shopify Payments account. 9665 Disputes *ShopifyPaymentsDisputeConnection `json:"disputes,omitempty"` 9666 // The fraud settings of the Shopify Payments account. 9667 FraudSettings *ShopifyPaymentsFraudSettings `json:"fraudSettings,omitempty"` 9668 // Globally unique identifier. 9669 ID null.String `json:"id,omitempty"` 9670 // The notifications settings for the account. 9671 NotificationSettings *ShopifyPaymentsNotificationSettings `json:"notificationSettings,omitempty"` 9672 // Whether the Shopify Payments account can be onboarded. 9673 Onboardable bool `json:"onboardable,omitempty"` 9674 // Payout schedule for the account. 9675 PayoutSchedule *ShopifyPaymentsPayoutSchedule `json:"payoutSchedule,omitempty"` 9676 // Descriptor used for payouts. 9677 // 9678 // This is what merchants will see on their bank statement when receiving a payout. 9679 PayoutStatementDescriptor *null.String `json:"payoutStatementDescriptor,omitempty"` 9680 // All current and previous payouts made between the account and the bank account. 9681 Payouts *ShopifyPaymentsPayoutConnection `json:"payouts,omitempty"` 9682 // The permitted documents for identity verification. 9683 PermittedVerificationDocuments []*ShopifyPaymentsVerificationDocument `json:"permittedVerificationDocuments,omitempty"` 9684 // The verifications necessary for this account. 9685 Verifications []*ShopifyPaymentsVerification `json:"verifications,omitempty"` 9686 } 9687 9688 func (ShopifyPaymentsAccount) IsNode() {} 9689 9690 // A bank account that can receive payouts. 9691 type ShopifyPaymentsBankAccount struct { 9692 // The account number of the bank account. 9693 AccountNumber null.String `json:"accountNumber,omitempty"` 9694 // The last digits of the account number (the rest is redacted). 9695 AccountNumberLastDigits null.String `json:"accountNumberLastDigits,omitempty"` 9696 // The name of the bank. 9697 BankName *null.String `json:"bankName,omitempty"` 9698 // The country of the bank. 9699 Country CountryCode `json:"country,omitempty"` 9700 // The date that the bank account was created. 9701 CreatedAt null.String `json:"createdAt,omitempty"` 9702 // The currency of the bank account. 9703 Currency CurrencyCode `json:"currency,omitempty"` 9704 // Globally unique identifier. 9705 ID null.String `json:"id,omitempty"` 9706 // All current and previous payouts made between the account and the bank account. 9707 Payouts *ShopifyPaymentsPayoutConnection `json:"payouts,omitempty"` 9708 // The routing number of the bank account. 9709 RoutingNumber null.String `json:"routingNumber,omitempty"` 9710 // The status of the bank account. 9711 Status ShopifyPaymentsBankAccountStatus `json:"status,omitempty"` 9712 } 9713 9714 func (ShopifyPaymentsBankAccount) IsNode() {} 9715 9716 // An auto-generated type for paginating through multiple ShopifyPaymentsBankAccounts. 9717 type ShopifyPaymentsBankAccountConnection struct { 9718 // A list of edges. 9719 Edges []*ShopifyPaymentsBankAccountEdge `json:"edges,omitempty"` 9720 // Information to aid in pagination. 9721 PageInfo *PageInfo `json:"pageInfo,omitempty"` 9722 } 9723 9724 // An auto-generated type which holds one ShopifyPaymentsBankAccount and a cursor during pagination. 9725 type ShopifyPaymentsBankAccountEdge struct { 9726 // A cursor for use in pagination. 9727 Cursor null.String `json:"cursor,omitempty"` 9728 // The item at the end of ShopifyPaymentsBankAccountEdge. 9729 Node *ShopifyPaymentsBankAccount `json:"node,omitempty"` 9730 } 9731 9732 // The charge descriptors for a payments account. 9733 type ShopifyPaymentsDefaultChargeStatementDescriptor struct { 9734 // The default charge statement descriptor. 9735 Default *null.String `json:"default,omitempty"` 9736 // The prefix of the statement descriptor. 9737 Prefix null.String `json:"prefix,omitempty"` 9738 } 9739 9740 func (ShopifyPaymentsDefaultChargeStatementDescriptor) IsShopifyPaymentsChargeStatementDescriptor() {} 9741 9742 // A dispute occurs when a buyer questions the legitimacy of a charge with their financial institution. 9743 type ShopifyPaymentsDispute struct { 9744 // The total amount disputed by the cardholder. 9745 Amount *MoneyV2 `json:"amount,omitempty"` 9746 // The deadline for evidence submission. 9747 EvidenceDueBy *null.String `json:"evidenceDueBy,omitempty"` 9748 // The date when evidence was sent. Returns null if evidence has not yet been sent. 9749 EvidenceSentOn *null.String `json:"evidenceSentOn,omitempty"` 9750 // The date when this dispute was resolved. Returns null if the dispute is not yet resolved. 9751 FinalizedOn *null.String `json:"finalizedOn,omitempty"` 9752 // Globally unique identifier. 9753 ID null.String `json:"id,omitempty"` 9754 // The date when this dispute was initiated. 9755 InitiatedAt null.String `json:"initiatedAt,omitempty"` 9756 // The ID of the corresponding resource in the REST Admin API. 9757 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 9758 // The order that contains the charge that is under dispute. 9759 Order *Order `json:"order,omitempty"` 9760 // The reason of the dispute. 9761 ReasonDetails *ShopifyPaymentsDisputeReasonDetails `json:"reasonDetails,omitempty"` 9762 // The current state of the dispute. 9763 Status DisputeStatus `json:"status,omitempty"` 9764 // Indicates if this dispute is still in the inquiry phase or has turned into a chargeback. 9765 Type DisputeType `json:"type,omitempty"` 9766 } 9767 9768 func (ShopifyPaymentsDispute) IsLegacyInteroperability() {} 9769 func (ShopifyPaymentsDispute) IsNode() {} 9770 9771 // An auto-generated type for paginating through multiple ShopifyPaymentsDisputes. 9772 type ShopifyPaymentsDisputeConnection struct { 9773 // A list of edges. 9774 Edges []*ShopifyPaymentsDisputeEdge `json:"edges,omitempty"` 9775 // Information to aid in pagination. 9776 PageInfo *PageInfo `json:"pageInfo,omitempty"` 9777 } 9778 9779 // An auto-generated type which holds one ShopifyPaymentsDispute and a cursor during pagination. 9780 type ShopifyPaymentsDisputeEdge struct { 9781 // A cursor for use in pagination. 9782 Cursor null.String `json:"cursor,omitempty"` 9783 // The item at the end of ShopifyPaymentsDisputeEdge. 9784 Node *ShopifyPaymentsDispute `json:"node,omitempty"` 9785 } 9786 9787 // Details regarding a dispute reason. 9788 type ShopifyPaymentsDisputeReasonDetails struct { 9789 // The raw code provided by the payment network. 9790 NetworkReasonCode *null.String `json:"networkReasonCode,omitempty"` 9791 // The reason for the dispute provided by the cardholder's banks. 9792 Reason ShopifyPaymentsDisputeReason `json:"reason,omitempty"` 9793 } 9794 9795 // Presents all Shopify Payments information related to an extended authorization. 9796 type ShopifyPaymentsExtendedAuthorization struct { 9797 // The time after which the extended authorization expires. After the expiry, the merchant is unable to capture the payment. 9798 ExtendedAuthorizationExpiresAt null.String `json:"extendedAuthorizationExpiresAt,omitempty"` 9799 // The time after which capture will incur an additional fee. 9800 StandardAuthorizationExpiresAt null.String `json:"standardAuthorizationExpiresAt,omitempty"` 9801 } 9802 9803 // The fraud settings of a payments account. 9804 type ShopifyPaymentsFraudSettings struct { 9805 // Decline a charge if there is an AVS failure. 9806 DeclineChargeOnAvsFailure bool `json:"declineChargeOnAvsFailure,omitempty"` 9807 // Decline a charge if there is an CVC failure. 9808 DeclineChargeOnCvcFailure bool `json:"declineChargeOnCvcFailure,omitempty"` 9809 } 9810 9811 // The charge descriptors for a Japanese payments account. 9812 type ShopifyPaymentsJpChargeStatementDescriptor struct { 9813 // The default charge statement descriptor. 9814 Default *null.String `json:"default,omitempty"` 9815 // The charge statement descriptor in kana. 9816 Kana *null.String `json:"kana,omitempty"` 9817 // The charge statement descriptor in kanji. 9818 Kanji *null.String `json:"kanji,omitempty"` 9819 // The prefix of the statement descriptor. 9820 Prefix null.String `json:"prefix,omitempty"` 9821 } 9822 9823 func (ShopifyPaymentsJpChargeStatementDescriptor) IsShopifyPaymentsChargeStatementDescriptor() {} 9824 9825 // The notification settings for the account. 9826 type ShopifyPaymentsNotificationSettings struct { 9827 // Receive email notifications when new payouts are sent or payouts fail. 9828 Payouts bool `json:"payouts,omitempty"` 9829 } 9830 9831 // Payouts represent the movement of money between a merchant's Shopify 9832 // Payments balance and their bank account. 9833 type ShopifyPaymentsPayout struct { 9834 // The bank account for the payout. 9835 BankAccount *ShopifyPaymentsBankAccount `json:"bankAccount,omitempty"` 9836 // The total amount and currency of the payout. 9837 Gross *MoneyV2 `json:"gross,omitempty"` 9838 // Globally unique identifier. 9839 ID null.String `json:"id,omitempty"` 9840 // The exact time when the payout was issued. The payout only contains 9841 // balance transactions that were available at this time. 9842 IssuedAt null.String `json:"issuedAt,omitempty"` 9843 // The ID of the corresponding resource in the REST Admin API. 9844 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 9845 // The total amount and currency of the payout. 9846 Net *MoneyV2 `json:"net,omitempty"` 9847 // The transfer status of the payout. 9848 Status ShopifyPaymentsPayoutStatus `json:"status,omitempty"` 9849 // The summary of the payout. 9850 Summary *ShopifyPaymentsPayoutSummary `json:"summary,omitempty"` 9851 // The direction of the payout. 9852 TransactionType ShopifyPaymentsPayoutTransactionType `json:"transactionType,omitempty"` 9853 } 9854 9855 func (ShopifyPaymentsPayout) IsLegacyInteroperability() {} 9856 func (ShopifyPaymentsPayout) IsNode() {} 9857 9858 // An auto-generated type for paginating through multiple ShopifyPaymentsPayouts. 9859 type ShopifyPaymentsPayoutConnection struct { 9860 // A list of edges. 9861 Edges []*ShopifyPaymentsPayoutEdge `json:"edges,omitempty"` 9862 // Information to aid in pagination. 9863 PageInfo *PageInfo `json:"pageInfo,omitempty"` 9864 } 9865 9866 // An auto-generated type which holds one ShopifyPaymentsPayout and a cursor during pagination. 9867 type ShopifyPaymentsPayoutEdge struct { 9868 // A cursor for use in pagination. 9869 Cursor null.String `json:"cursor,omitempty"` 9870 // The item at the end of ShopifyPaymentsPayoutEdge. 9871 Node *ShopifyPaymentsPayout `json:"node,omitempty"` 9872 } 9873 9874 // The payment schedule for a payments account. 9875 type ShopifyPaymentsPayoutSchedule struct { 9876 // The interval at which payouts are sent to the connected bank account. 9877 Interval ShopifyPaymentsPayoutInterval `json:"interval,omitempty"` 9878 // The day of the month funds will be paid out. 9879 // 9880 // The value can be any day of the month from the 1st to the 31st. 9881 // If the payment interval is set to monthly, this value will be used. 9882 // Payouts scheduled between 29-31st of the month are sent on the last day of shorter months. 9883 MonthlyAnchor *int `json:"monthlyAnchor,omitempty"` 9884 // The day of the week funds will be paid out. 9885 // 9886 // The value can be any weekday from Monday to Friday. 9887 // If the payment interval is set to weekly, this value will be used. 9888 WeeklyAnchor *DayOfTheWeek `json:"weeklyAnchor,omitempty"` 9889 } 9890 9891 // Breakdown of the total fees and gross of each of the different types of transactions associated 9892 // with the payout. 9893 type ShopifyPaymentsPayoutSummary struct { 9894 // Total fees for all adjustments including disputes. 9895 AdjustmentsFee *MoneyV2 `json:"adjustmentsFee,omitempty"` 9896 // Total gross amount for all adjustments including disputes. 9897 AdjustmentsGross *MoneyV2 `json:"adjustmentsGross,omitempty"` 9898 // Total fees for all charges. 9899 ChargesFee *MoneyV2 `json:"chargesFee,omitempty"` 9900 // Total gross amount for all charges. 9901 ChargesGross *MoneyV2 `json:"chargesGross,omitempty"` 9902 // Total fees for all refunds. 9903 RefundsFee *MoneyV2 `json:"refundsFee,omitempty"` 9904 // Total gross amount for all refunds. 9905 RefundsFeeGross *MoneyV2 `json:"refundsFeeGross,omitempty"` 9906 // Total fees for all reserved funds. 9907 ReservedFundsFee *MoneyV2 `json:"reservedFundsFee,omitempty"` 9908 // Total gross amount for all reserved funds. 9909 ReservedFundsGross *MoneyV2 `json:"reservedFundsGross,omitempty"` 9910 // Total fees for all retried payouts. 9911 RetriedPayoutsFee *MoneyV2 `json:"retriedPayoutsFee,omitempty"` 9912 // Total gross amount for all retried payouts. 9913 RetriedPayoutsGross *MoneyV2 `json:"retriedPayoutsGross,omitempty"` 9914 } 9915 9916 // Presents all Shopify Payments specific information related to an order transaction. 9917 type ShopifyPaymentsTransactionSet struct { 9918 // Contains all fields related to an extended authorization. 9919 ExtendedAuthorizationSet *ShopifyPaymentsExtendedAuthorization `json:"extendedAuthorizationSet,omitempty"` 9920 } 9921 9922 // Each subject (individual) of an account has a verification object giving 9923 // information about the verification state. 9924 type ShopifyPaymentsVerification struct { 9925 // Globally unique identifier. 9926 ID null.String `json:"id,omitempty"` 9927 // The status of the verification. 9928 Status ShopifyPaymentsVerificationStatus `json:"status,omitempty"` 9929 // The subject/individual who has to be verified. 9930 Subject *ShopifyPaymentsVerificationSubject `json:"subject,omitempty"` 9931 } 9932 9933 func (ShopifyPaymentsVerification) IsNode() {} 9934 9935 // A document which can be used to verify an individual. 9936 type ShopifyPaymentsVerificationDocument struct { 9937 // True if the back side of the document is required. 9938 BackRequired bool `json:"backRequired,omitempty"` 9939 // True if the front side of the document is required. 9940 FrontRequired bool `json:"frontRequired,omitempty"` 9941 // The type of the document which can be used for verification. 9942 Type ShopifyPaymentsVerificationDocumentType `json:"type,omitempty"` 9943 } 9944 9945 // The verification subject represents an individual that has to be verified. 9946 type ShopifyPaymentsVerificationSubject struct { 9947 // The family name of the individual to verify. 9948 FamilyName null.String `json:"familyName,omitempty"` 9949 // The given name of the individual to verify. 9950 GivenName null.String `json:"givenName,omitempty"` 9951 } 9952 9953 // Image to be uploaded. 9954 type StageImageInput struct { 9955 // Image resource. 9956 Resource StagedUploadTargetGenerateUploadResource `json:"resource,omitempty"` 9957 // Image filename. 9958 Filename null.String `json:"filename,omitempty"` 9959 // Image MIME type. 9960 MimeType null.String `json:"mimeType,omitempty"` 9961 // HTTP method to be used by the Staged Upload. 9962 HTTPMethod *StagedUploadHTTPMethodType `json:"httpMethod,omitempty"` 9963 } 9964 9965 // Staged media target information. 9966 type StagedMediaUploadTarget struct { 9967 // Parameters of the media to be uploaded. 9968 Parameters []*StagedUploadParameter `json:"parameters,omitempty"` 9969 // The url to be passed as the original_source for the product create media mutation input. 9970 ResourceURL *null.String `json:"resourceUrl,omitempty"` 9971 // Media URL. 9972 URL *null.String `json:"url,omitempty"` 9973 } 9974 9975 // Media to be uploaded. 9976 type StagedUploadInput struct { 9977 // Media resource. 9978 Resource StagedUploadTargetGenerateUploadResource `json:"resource,omitempty"` 9979 // Media filename. 9980 Filename null.String `json:"filename,omitempty"` 9981 // Media MIME type. 9982 MimeType null.String `json:"mimeType,omitempty"` 9983 // HTTP method to be used by the Staged Upload. 9984 HTTPMethod *StagedUploadHTTPMethodType `json:"httpMethod,omitempty"` 9985 // Size of the file to upload, in bytes. This is required for VIDEO and MODEL_3D resources. 9986 FileSize *null.String `json:"fileSize,omitempty"` 9987 } 9988 9989 // Upload parameter of a Media. 9990 type StagedUploadParameter struct { 9991 // Parameter name. 9992 Name null.String `json:"name,omitempty"` 9993 // Parameter value. 9994 Value null.String `json:"value,omitempty"` 9995 } 9996 9997 // Staged target information. 9998 type StagedUploadTarget struct { 9999 // Parameters of an image to be uploaded. 10000 Parameters []*ImageUploadParameter `json:"parameters,omitempty"` 10001 // Image URL. 10002 URL null.String `json:"url,omitempty"` 10003 } 10004 10005 // Specifies the fields required to generate the URL and parameters needed to upload an asset to Shopify. 10006 type StagedUploadTargetGenerateInput struct { 10007 // The resource type being uploaded. 10008 Resource StagedUploadTargetGenerateUploadResource `json:"resource,omitempty"` 10009 // The filename of the asset being uploaded. 10010 Filename null.String `json:"filename,omitempty"` 10011 // The MIME type of the asset being uploaded. 10012 MimeType null.String `json:"mimeType,omitempty"` 10013 // The HTTP method to be used by the staged upload. 10014 HTTPMethod *StagedUploadHTTPMethodType `json:"httpMethod,omitempty"` 10015 // The size of the file to upload, in bytes. 10016 FileSize *null.String `json:"fileSize,omitempty"` 10017 } 10018 10019 // Return type for `stagedUploadTargetGenerate` mutation. 10020 type StagedUploadTargetGeneratePayload struct { 10021 // The signed parameters that can be used to upload the asset. 10022 Parameters []*MutationsStagedUploadTargetGenerateUploadParameter `json:"parameters,omitempty"` 10023 // The signed URL where the asset can be uploaded. 10024 URL null.String `json:"url,omitempty"` 10025 // List of errors that occurred executing the mutation. 10026 UserErrors []*UserError `json:"userErrors,omitempty"` 10027 } 10028 10029 // Return type for `stagedUploadTargetsGenerate` mutation. 10030 type StagedUploadTargetsGeneratePayload struct { 10031 // The staged upload targets that were generated. 10032 Urls []*StagedUploadTarget `json:"urls,omitempty"` 10033 // List of errors that occurred executing the mutation. 10034 UserErrors []*UserError `json:"userErrors,omitempty"` 10035 } 10036 10037 // Return type for `stagedUploadsCreate` mutation. 10038 type StagedUploadsCreatePayload struct { 10039 // The staged upload targets that were generated. 10040 StagedTargets []*StagedMediaUploadTarget `json:"stagedTargets,omitempty"` 10041 // List of errors that occurred executing the mutation. 10042 UserErrors []*UserError `json:"userErrors,omitempty"` 10043 } 10044 10045 // Token used to delegate unauthenticated access scopes to clients that need to access the unautheticated Storefront API. 10046 type StorefrontAccessToken struct { 10047 // List of permissions associated with the token. 10048 AccessScopes []*AccessScope `json:"accessScopes,omitempty"` 10049 // The issued public access token. 10050 AccessToken null.String `json:"accessToken,omitempty"` 10051 // The date and time when the public access token was created. 10052 CreatedAt null.String `json:"createdAt,omitempty"` 10053 // Globally unique identifier. 10054 ID null.String `json:"id,omitempty"` 10055 // An arbitrary title for each token determined by the developer, used for reference purposes. 10056 Title null.String `json:"title,omitempty"` 10057 // The date and time when the storefront access token was updated. 10058 UpdatedAt null.String `json:"updatedAt,omitempty"` 10059 } 10060 10061 func (StorefrontAccessToken) IsNode() {} 10062 10063 // An auto-generated type for paginating through multiple StorefrontAccessTokens. 10064 type StorefrontAccessTokenConnection struct { 10065 // A list of edges. 10066 Edges []*StorefrontAccessTokenEdge `json:"edges,omitempty"` 10067 // Information to aid in pagination. 10068 PageInfo *PageInfo `json:"pageInfo,omitempty"` 10069 } 10070 10071 // Return type for `storefrontAccessTokenCreate` mutation. 10072 type StorefrontAccessTokenCreatePayload struct { 10073 // The user's shop. 10074 Shop *Shop `json:"shop,omitempty"` 10075 // The storefront access token. 10076 StorefrontAccessToken *StorefrontAccessToken `json:"storefrontAccessToken,omitempty"` 10077 // List of errors that occurred executing the mutation. 10078 UserErrors []*UserError `json:"userErrors,omitempty"` 10079 } 10080 10081 // Specifies the input fields to delete a storefront access token. 10082 type StorefrontAccessTokenDeleteInput struct { 10083 // The ID of the storefront access token to delete. 10084 ID null.String `json:"id,omitempty"` 10085 } 10086 10087 // Return type for `storefrontAccessTokenDelete` mutation. 10088 type StorefrontAccessTokenDeletePayload struct { 10089 // The ID of the deleted storefront access token. 10090 DeletedStorefrontAccessTokenID *null.String `json:"deletedStorefrontAccessTokenId,omitempty"` 10091 // List of errors that occurred executing the mutation. 10092 UserErrors []*UserError `json:"userErrors,omitempty"` 10093 } 10094 10095 // An auto-generated type which holds one StorefrontAccessToken and a cursor during pagination. 10096 type StorefrontAccessTokenEdge struct { 10097 // A cursor for use in pagination. 10098 Cursor null.String `json:"cursor,omitempty"` 10099 // The item at the end of StorefrontAccessTokenEdge. 10100 Node *StorefrontAccessToken `json:"node,omitempty"` 10101 } 10102 10103 // Specifies the input fields for a storefront access token. 10104 type StorefrontAccessTokenInput struct { 10105 // A title for the storefront access token. 10106 Title null.String `json:"title,omitempty"` 10107 } 10108 10109 // An auto-generated type for paginating through multiple Strings. 10110 type StringConnection struct { 10111 // A list of edges. 10112 Edges []*StringEdge `json:"edges,omitempty"` 10113 // Information to aid in pagination. 10114 PageInfo *PageInfo `json:"pageInfo,omitempty"` 10115 } 10116 10117 // An auto-generated type which holds one String and a cursor during pagination. 10118 type StringEdge struct { 10119 // A cursor for use in pagination. 10120 Cursor null.String `json:"cursor,omitempty"` 10121 // The item at the end of StringEdge. 10122 Node null.String `json:"node,omitempty"` 10123 } 10124 10125 // Represents an applied code discount. 10126 type SubscriptionAppliedCodeDiscount struct { 10127 // The unique identifier. 10128 ID null.String `json:"id,omitempty"` 10129 // The redeem code of the discount that applies on the subscription. 10130 RedeemCode null.String `json:"redeemCode,omitempty"` 10131 // The reason that the discount on the subscription draft is rejected. 10132 RejectionReason *SubscriptionDiscountRejectionReason `json:"rejectionReason,omitempty"` 10133 } 10134 10135 func (SubscriptionAppliedCodeDiscount) IsSubscriptionDiscount() {} 10136 10137 // Record of an execution of the subscription billing schedule. 10138 type SubscriptionBillingAttempt struct { 10139 // The date and time when the billing attempt was completed. 10140 CompletedAt *null.String `json:"completedAt,omitempty"` 10141 // The date and time when the billing attempt was created. 10142 CreatedAt null.String `json:"createdAt,omitempty"` 10143 // A code corresponding to a payment error during processing. 10144 ErrorCode *SubscriptionBillingAttemptErrorCode `json:"errorCode,omitempty"` 10145 // A message describing a payment error during processing. 10146 ErrorMessage *null.String `json:"errorMessage,omitempty"` 10147 // Globally unique identifier. 10148 ID null.String `json:"id,omitempty"` 10149 // A unique key generated by the client to avoid duplicate payments. 10150 IdempotencyKey null.String `json:"idempotencyKey,omitempty"` 10151 // The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow. 10152 NextActionURL *null.String `json:"nextActionUrl,omitempty"` 10153 // The result of this billing attempt if completed successfully. 10154 Order *Order `json:"order,omitempty"` 10155 // Whether or not the billing attempt is still processing. 10156 Ready bool `json:"ready,omitempty"` 10157 // The subscription contract. 10158 SubscriptionContract *SubscriptionContract `json:"subscriptionContract,omitempty"` 10159 } 10160 10161 func (SubscriptionBillingAttempt) IsNode() {} 10162 10163 // An auto-generated type for paginating through multiple SubscriptionBillingAttempts. 10164 type SubscriptionBillingAttemptConnection struct { 10165 // A list of edges. 10166 Edges []*SubscriptionBillingAttemptEdge `json:"edges,omitempty"` 10167 // Information to aid in pagination. 10168 PageInfo *PageInfo `json:"pageInfo,omitempty"` 10169 } 10170 10171 // Return type for `subscriptionBillingAttemptCreate` mutation. 10172 type SubscriptionBillingAttemptCreatePayload struct { 10173 // The subscription billing attempt. 10174 SubscriptionBillingAttempt *SubscriptionBillingAttempt `json:"subscriptionBillingAttempt,omitempty"` 10175 // List of errors that occurred executing the mutation. 10176 UserErrors []*BillingAttemptUserError `json:"userErrors,omitempty"` 10177 } 10178 10179 // An auto-generated type which holds one SubscriptionBillingAttempt and a cursor during pagination. 10180 type SubscriptionBillingAttemptEdge struct { 10181 // A cursor for use in pagination. 10182 Cursor null.String `json:"cursor,omitempty"` 10183 // The item at the end of SubscriptionBillingAttemptEdge. 10184 Node *SubscriptionBillingAttempt `json:"node,omitempty"` 10185 } 10186 10187 // Specifies the fields required to complete a subscription billing attempt. 10188 type SubscriptionBillingAttemptInput struct { 10189 // A unique key generated by the client to avoid duplicate payments. 10190 IdempotencyKey null.String `json:"idempotencyKey,omitempty"` 10191 } 10192 10193 // Represents a Subscription Billing Policy. 10194 type SubscriptionBillingPolicy struct { 10195 // Specific anchor dates upon which the billing interval calculations should be made. 10196 Anchors []*SellingPlanAnchor `json:"anchors,omitempty"` 10197 // The kind of interval that is associated with this schedule (e.g. Monthly, Weekly, etc). 10198 Interval SellingPlanInterval `json:"interval,omitempty"` 10199 // The number of billing intervals between invoices. 10200 IntervalCount int `json:"intervalCount,omitempty"` 10201 // Maximum amount of cycles after which the subscription ends. 10202 MaxCycles *int `json:"maxCycles,omitempty"` 10203 // Minimum amount of cycles required in the subscription. 10204 MinCycles *int `json:"minCycles,omitempty"` 10205 } 10206 10207 // Specifies the input fields for a Subscription Billing Policy. 10208 type SubscriptionBillingPolicyInput struct { 10209 // The kind of interval that is associated with this schedule (e.g. Monthly, Weekly, etc). 10210 Interval SellingPlanInterval `json:"interval,omitempty"` 10211 // The number of billing intervals between invoices. 10212 IntervalCount int `json:"intervalCount,omitempty"` 10213 // Minimum amount of cycles required in the subscription. 10214 MinCycles *int `json:"minCycles,omitempty"` 10215 // Maximum amount of cycles required in the subscription. 10216 MaxCycles *int `json:"maxCycles,omitempty"` 10217 // Specific anchor dates upon which the billing interval calculations should be made. 10218 Anchors []*SellingPlanAnchorInput `json:"anchors,omitempty"` 10219 } 10220 10221 // Represents a Subscription Contract. 10222 type SubscriptionContract struct { 10223 // The subscription app that this subscription contract is registered to. 10224 App *App `json:"app,omitempty"` 10225 // URL of the subscription contract page on the subscription app. 10226 AppAdminURL *null.String `json:"appAdminUrl,omitempty"` 10227 // The list of billing attempts associated with the subscription contract. 10228 BillingAttempts *SubscriptionBillingAttemptConnection `json:"billingAttempts,omitempty"` 10229 // The billing policy associated with the subscription contract. 10230 BillingPolicy *SubscriptionBillingPolicy `json:"billingPolicy,omitempty"` 10231 // The date and time when the subscription contract was created. 10232 CreatedAt null.String `json:"createdAt,omitempty"` 10233 // The currency used for the subscription contract. 10234 CurrencyCode CurrencyCode `json:"currencyCode,omitempty"` 10235 // The customer to whom the subscription contract belongs. 10236 Customer *Customer `json:"customer,omitempty"` 10237 // The customer payment method used for the subscription contract. 10238 CustomerPaymentMethod *CustomerPaymentMethod `json:"customerPaymentMethod,omitempty"` 10239 // The delivery method for each billing of the subscription contract. 10240 DeliveryMethod SubscriptionDeliveryMethod `json:"deliveryMethod,omitempty"` 10241 // The delivery policy associated with the subscription contract. 10242 DeliveryPolicy *SubscriptionDeliveryPolicy `json:"deliveryPolicy,omitempty"` 10243 // The delivery price for each billing of the subscription contract. 10244 DeliveryPrice *MoneyV2 `json:"deliveryPrice,omitempty"` 10245 // The list of subscription discounts associated with the subscription contract. 10246 Discounts *SubscriptionManualDiscountConnection `json:"discounts,omitempty"` 10247 // Globally unique identifier. 10248 ID null.String `json:"id,omitempty"` 10249 // The current status of the last payment. 10250 LastPaymentStatus *SubscriptionContractLastPaymentStatus `json:"lastPaymentStatus,omitempty"` 10251 // The number of lines associated with the subscription contract. 10252 LineCount int `json:"lineCount,omitempty"` 10253 // The list of subscription lines associated with the subscription contract. 10254 Lines *SubscriptionLineConnection `json:"lines,omitempty"` 10255 // The next billing date for the subscription contract. 10256 NextBillingDate *null.String `json:"nextBillingDate,omitempty"` 10257 // The list of orders associated with the subscription contract. 10258 Orders *OrderConnection `json:"orders,omitempty"` 10259 // The order from which this contract originated. 10260 OriginOrder *Order `json:"originOrder,omitempty"` 10261 // The current status of the subscription contract. 10262 Status SubscriptionContractSubscriptionStatus `json:"status,omitempty"` 10263 // The date and time when the subscription contract was updated. 10264 UpdatedAt null.String `json:"updatedAt,omitempty"` 10265 } 10266 10267 func (SubscriptionContract) IsNode() {} 10268 10269 // An auto-generated type for paginating through multiple SubscriptionContracts. 10270 type SubscriptionContractConnection struct { 10271 // A list of edges. 10272 Edges []*SubscriptionContractEdge `json:"edges,omitempty"` 10273 // Information to aid in pagination. 10274 PageInfo *PageInfo `json:"pageInfo,omitempty"` 10275 } 10276 10277 // Specifies the input fields required to create a Subscription Contract. 10278 type SubscriptionContractCreateInput struct { 10279 // The ID of the customer to associate with the subscription contract. 10280 CustomerID null.String `json:"customerId,omitempty"` 10281 // The next billing date for the subscription contract. 10282 NextBillingDate null.String `json:"nextBillingDate,omitempty"` 10283 // The currency used for the subscription contract. 10284 CurrencyCode CurrencyCode `json:"currencyCode,omitempty"` 10285 // The attributes used as input for the Subscription Draft. 10286 Contract *SubscriptionDraftInput `json:"contract,omitempty"` 10287 } 10288 10289 // Return type for `subscriptionContractCreate` mutation. 10290 type SubscriptionContractCreatePayload struct { 10291 // The Subscription Contract object. 10292 Draft *SubscriptionDraft `json:"draft,omitempty"` 10293 // List of errors that occurred executing the mutation. 10294 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10295 } 10296 10297 // An auto-generated type which holds one SubscriptionContract and a cursor during pagination. 10298 type SubscriptionContractEdge struct { 10299 // A cursor for use in pagination. 10300 Cursor null.String `json:"cursor,omitempty"` 10301 // The item at the end of SubscriptionContractEdge. 10302 Node *SubscriptionContract `json:"node,omitempty"` 10303 } 10304 10305 // Return type for `subscriptionContractSetNextBillingDate` mutation. 10306 type SubscriptionContractSetNextBillingDatePayload struct { 10307 // The updated Subscription Contract object. 10308 Contract *SubscriptionContract `json:"contract,omitempty"` 10309 // List of errors that occurred executing the mutation. 10310 UserErrors []*SubscriptionContractUserError `json:"userErrors,omitempty"` 10311 } 10312 10313 // Return type for `subscriptionContractUpdate` mutation. 10314 type SubscriptionContractUpdatePayload struct { 10315 // The Subscription Contract object. 10316 Draft *SubscriptionDraft `json:"draft,omitempty"` 10317 // List of errors that occurred executing the mutation. 10318 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10319 } 10320 10321 // Represents a Subscription Contract error. 10322 type SubscriptionContractUserError struct { 10323 // Error code to uniquely identify the error. 10324 Code *SubscriptionContractErrorCode `json:"code,omitempty"` 10325 // Path to the input field which caused the error. 10326 Field []null.String `json:"field,omitempty"` 10327 // The error message. 10328 Message null.String `json:"message,omitempty"` 10329 } 10330 10331 func (SubscriptionContractUserError) IsDisplayableError() {} 10332 10333 // Represents a Subscription Line Pricing Cycle Adjustment. 10334 type SubscriptionCyclePriceAdjustment struct { 10335 // Price adjustment type. 10336 AdjustmentType SellingPlanPricingPolicyAdjustmentType `json:"adjustmentType,omitempty"` 10337 // Price adjustment value. 10338 AdjustmentValue SellingPlanPricingPolicyAdjustmentValue `json:"adjustmentValue,omitempty"` 10339 // The number of cycles required before this pricing policy applies. 10340 AfterCycle int `json:"afterCycle,omitempty"` 10341 // The computed price after the adjustments applied. 10342 ComputedPrice *MoneyV2 `json:"computedPrice,omitempty"` 10343 } 10344 10345 // Specifies delivery method fields for a subscription draft. 10346 // This is an input union: one, and only one, field can be provided. 10347 // The field provided will determine which delivery method is to be used. 10348 // 10349 // Note: Only `shipping` is supported for now, but other inputs will be 10350 // added as they become supported in subscriptions. 10351 type SubscriptionDeliveryMethodInput struct { 10352 // Shipping delivery method input. 10353 Shipping *SubscriptionDeliveryMethodShippingInput `json:"shipping,omitempty"` 10354 } 10355 10356 // Represents a shipping delivery method: a mailing address and a shipping option. 10357 type SubscriptionDeliveryMethodShipping struct { 10358 // The address to ship to. 10359 Address *SubscriptionMailingAddress `json:"address,omitempty"` 10360 // The details of the shipping method to use. 10361 ShippingOption *SubscriptionDeliveryMethodShippingOption `json:"shippingOption,omitempty"` 10362 } 10363 10364 func (SubscriptionDeliveryMethodShipping) IsSubscriptionDeliveryMethod() {} 10365 10366 // Specifies shipping delivery method fields. 10367 // 10368 // This input accepts partial input. When a field is not provided, 10369 // its prior value is left unchanged. 10370 type SubscriptionDeliveryMethodShippingInput struct { 10371 // The address to ship to. 10372 Address *MailingAddressInput `json:"address,omitempty"` 10373 // The details of the shipping method to use. 10374 ShippingOption *SubscriptionDeliveryMethodShippingOptionInput `json:"shippingOption,omitempty"` 10375 } 10376 10377 // Represents the selected shipping option on a subscription contract. 10378 type SubscriptionDeliveryMethodShippingOption struct { 10379 // The carrier service of the shipping option. 10380 CarrierService *DeliveryCarrierService `json:"carrierService,omitempty"` 10381 // The code of the shipping option. 10382 Code *null.String `json:"code,omitempty"` 10383 // The description of the shipping option. 10384 Description *null.String `json:"description,omitempty"` 10385 // The presentment title of the shipping option. 10386 PresentmentTitle *null.String `json:"presentmentTitle,omitempty"` 10387 // The title of the shipping option. 10388 Title *null.String `json:"title,omitempty"` 10389 } 10390 10391 // Specifies shipping option fields. 10392 type SubscriptionDeliveryMethodShippingOptionInput struct { 10393 // The title of the shipping option. 10394 Title *null.String `json:"title,omitempty"` 10395 // The presentment title of the shipping option. 10396 PresentmentTitle *null.String `json:"presentmentTitle,omitempty"` 10397 // The description of the shipping option. 10398 Description *null.String `json:"description,omitempty"` 10399 // The code of the shipping option. 10400 Code *null.String `json:"code,omitempty"` 10401 // The carrier service ID of the shipping option. 10402 CarrierServiceID *null.String `json:"carrierServiceId,omitempty"` 10403 } 10404 10405 // Represents a Subscription Delivery Policy. 10406 type SubscriptionDeliveryPolicy struct { 10407 // Specific anchor dates upon which the delivery interval calculations should be made. 10408 Anchors []*SellingPlanAnchor `json:"anchors,omitempty"` 10409 // The kind of interval that is associated with this schedule (e.g. Monthly, Weekly, etc). 10410 Interval SellingPlanInterval `json:"interval,omitempty"` 10411 // The number of delivery intervals between deliveries. 10412 IntervalCount int `json:"intervalCount,omitempty"` 10413 } 10414 10415 // Specifies the input fields for a Subscription Delivery Policy. 10416 type SubscriptionDeliveryPolicyInput struct { 10417 // The kind of interval that is associated with this schedule (e.g. Monthly, Weekly, etc). 10418 Interval SellingPlanInterval `json:"interval,omitempty"` 10419 // The number of billing intervals between invoices. 10420 IntervalCount int `json:"intervalCount,omitempty"` 10421 // Specific anchor dates upon which the delivery interval calculations should be made. 10422 Anchors []*SellingPlanAnchorInput `json:"anchors,omitempty"` 10423 } 10424 10425 // Represents what a particular discount reduces from a line price. 10426 type SubscriptionDiscountAllocation struct { 10427 // Allocation amount. 10428 Amount *MoneyV2 `json:"amount,omitempty"` 10429 // Discount that created the allocation. 10430 Discount SubscriptionDiscount `json:"discount,omitempty"` 10431 } 10432 10433 // An auto-generated type for paginating through multiple SubscriptionDiscounts. 10434 type SubscriptionDiscountConnection struct { 10435 // A list of edges. 10436 Edges []*SubscriptionDiscountEdge `json:"edges,omitempty"` 10437 // Information to aid in pagination. 10438 PageInfo *PageInfo `json:"pageInfo,omitempty"` 10439 } 10440 10441 // An auto-generated type which holds one SubscriptionDiscount and a cursor during pagination. 10442 type SubscriptionDiscountEdge struct { 10443 // A cursor for use in pagination. 10444 Cursor null.String `json:"cursor,omitempty"` 10445 // The item at the end of SubscriptionDiscountEdge. 10446 Node SubscriptionDiscount `json:"node,omitempty"` 10447 } 10448 10449 // Represents the subscription lines the discount applies on. 10450 type SubscriptionDiscountEntitledLines struct { 10451 // Specify whether the subscription discount will apply on all subscription lines. 10452 All bool `json:"all,omitempty"` 10453 // The list of subscription lines associated with the subscription discount. 10454 Lines *SubscriptionLineConnection `json:"lines,omitempty"` 10455 } 10456 10457 // The value of the discount and how it will be applied. 10458 type SubscriptionDiscountFixedAmountValue struct { 10459 // The fixed amount value of the discount. 10460 Amount *MoneyV2 `json:"amount,omitempty"` 10461 // Whether the amount is applied per item. 10462 AppliesOnEachItem bool `json:"appliesOnEachItem,omitempty"` 10463 } 10464 10465 func (SubscriptionDiscountFixedAmountValue) IsSubscriptionDiscountValue() {} 10466 10467 // The percentage value of the discount. 10468 type SubscriptionDiscountPercentageValue struct { 10469 // The percentage value of the discount. 10470 Percentage int `json:"percentage,omitempty"` 10471 } 10472 10473 func (SubscriptionDiscountPercentageValue) IsSubscriptionDiscountValue() {} 10474 10475 // Represents a Subscription Draft. 10476 type SubscriptionDraft struct { 10477 // The billing policy for the subscription contract. 10478 BillingPolicy *SubscriptionBillingPolicy `json:"billingPolicy,omitempty"` 10479 // The currency used for the subscription contract. 10480 CurrencyCode CurrencyCode `json:"currencyCode,omitempty"` 10481 // The customer to whom the subscription contract belongs. 10482 Customer *Customer `json:"customer,omitempty"` 10483 // The customer payment method used for the subscription contract. 10484 CustomerPaymentMethod *CustomerPaymentMethod `json:"customerPaymentMethod,omitempty"` 10485 // The delivery method for each billing of the subscription contract. 10486 DeliveryMethod SubscriptionDeliveryMethod `json:"deliveryMethod,omitempty"` 10487 // The delivery policy for the subscription contract. 10488 DeliveryPolicy *SubscriptionDeliveryPolicy `json:"deliveryPolicy,omitempty"` 10489 // The delivery price for each billing the subscription contract. 10490 DeliveryPrice *MoneyV2 `json:"deliveryPrice,omitempty"` 10491 // The list of subscription discounts which will be associated with the subscription contract. 10492 Discounts *SubscriptionDiscountConnection `json:"discounts,omitempty"` 10493 // The list of subscription discounts to be added to the subscription contract. 10494 DiscountsAdded *SubscriptionDiscountConnection `json:"discountsAdded,omitempty"` 10495 // The list of subscription discounts to be removed from the subscription contract. 10496 DiscountsRemoved *SubscriptionDiscountConnection `json:"discountsRemoved,omitempty"` 10497 // The list of subscription discounts to be updated on the subscription contract. 10498 DiscountsUpdated *SubscriptionDiscountConnection `json:"discountsUpdated,omitempty"` 10499 // Globally unique identifier. 10500 ID null.String `json:"id,omitempty"` 10501 // The list of subscription lines which will be associated with the subscription contract. 10502 Lines *SubscriptionLineConnection `json:"lines,omitempty"` 10503 // The list of subscription lines to be added to the subscription contract. 10504 LinesAdded *SubscriptionLineConnection `json:"linesAdded,omitempty"` 10505 // The list of subscription lines to be removed from the subscription contract. 10506 LinesRemoved *SubscriptionLineConnection `json:"linesRemoved,omitempty"` 10507 // The next billing date for the subscription contract. 10508 NextBillingDate *null.String `json:"nextBillingDate,omitempty"` 10509 // The original subscription contract. 10510 OriginalContract *SubscriptionContract `json:"originalContract,omitempty"` 10511 // Available Shipping Options for a given delivery address. Returns NULL for pending requests. 10512 ShippingOptions SubscriptionShippingOptionResult `json:"shippingOptions,omitempty"` 10513 // The current status of the subscription contract. 10514 Status *SubscriptionContractSubscriptionStatus `json:"status,omitempty"` 10515 } 10516 10517 func (SubscriptionDraft) IsNode() {} 10518 10519 // Return type for `subscriptionDraftCommit` mutation. 10520 type SubscriptionDraftCommitPayload struct { 10521 // The updated Subscription Contract object. 10522 Contract *SubscriptionContract `json:"contract,omitempty"` 10523 // List of errors that occurred executing the mutation. 10524 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10525 } 10526 10527 // Return type for `subscriptionDraftDiscountAdd` mutation. 10528 type SubscriptionDraftDiscountAddPayload struct { 10529 // The added Subscription Discount. 10530 DiscountAdded *SubscriptionManualDiscount `json:"discountAdded,omitempty"` 10531 // The Subscription Contract draft object. 10532 Draft *SubscriptionDraft `json:"draft,omitempty"` 10533 // List of errors that occurred executing the mutation. 10534 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10535 } 10536 10537 // Return type for `subscriptionDraftDiscountCodeApply` mutation. 10538 type SubscriptionDraftDiscountCodeApplyPayload struct { 10539 // The added subscription discount. 10540 AppliedDiscount *SubscriptionAppliedCodeDiscount `json:"appliedDiscount,omitempty"` 10541 // The subscription contract draft object. 10542 Draft *SubscriptionDraft `json:"draft,omitempty"` 10543 // List of errors that occurred executing the mutation. 10544 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10545 } 10546 10547 // Return type for `subscriptionDraftDiscountRemove` mutation. 10548 type SubscriptionDraftDiscountRemovePayload struct { 10549 // The removed subscription draft discount. 10550 DiscountRemoved SubscriptionDiscount `json:"discountRemoved,omitempty"` 10551 // The subscription contract draft object. 10552 Draft *SubscriptionDraft `json:"draft,omitempty"` 10553 // List of errors that occurred executing the mutation. 10554 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10555 } 10556 10557 // Return type for `subscriptionDraftDiscountUpdate` mutation. 10558 type SubscriptionDraftDiscountUpdatePayload struct { 10559 // The updated Subscription Discount. 10560 DiscountUpdated *SubscriptionManualDiscount `json:"discountUpdated,omitempty"` 10561 // The Subscription Contract draft object. 10562 Draft *SubscriptionDraft `json:"draft,omitempty"` 10563 // List of errors that occurred executing the mutation. 10564 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10565 } 10566 10567 // Return type for `subscriptionDraftFreeShippingDiscountAdd` mutation. 10568 type SubscriptionDraftFreeShippingDiscountAddPayload struct { 10569 // The added subscription free shipping discount. 10570 DiscountAdded *SubscriptionManualDiscount `json:"discountAdded,omitempty"` 10571 // The subscription contract draft object. 10572 Draft *SubscriptionDraft `json:"draft,omitempty"` 10573 // List of errors that occurred executing the mutation. 10574 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10575 } 10576 10577 // Return type for `subscriptionDraftFreeShippingDiscountUpdate` mutation. 10578 type SubscriptionDraftFreeShippingDiscountUpdatePayload struct { 10579 // The updated Subscription Discount. 10580 DiscountUpdated *SubscriptionManualDiscount `json:"discountUpdated,omitempty"` 10581 // The Subscription Contract draft object. 10582 Draft *SubscriptionDraft `json:"draft,omitempty"` 10583 // List of errors that occurred executing the mutation. 10584 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10585 } 10586 10587 // Specifies the input fields required to create a Subscription Draft. 10588 type SubscriptionDraftInput struct { 10589 // The current status of the subscription contract. 10590 Status *SubscriptionContractSubscriptionStatus `json:"status,omitempty"` 10591 // The ID of the payment method to be used for the subscription contract. 10592 PaymentMethodID *null.String `json:"paymentMethodId,omitempty"` 10593 // The next billing date for the subscription contract. 10594 NextBillingDate *null.String `json:"nextBillingDate,omitempty"` 10595 // The billing policy for the subscription contract. 10596 BillingPolicy *SubscriptionBillingPolicyInput `json:"billingPolicy,omitempty"` 10597 // The delivery policy for the subscription contract. 10598 DeliveryPolicy *SubscriptionDeliveryPolicyInput `json:"deliveryPolicy,omitempty"` 10599 // The shipping price for each renewal the subscription contract. 10600 DeliveryPrice *null.String `json:"deliveryPrice,omitempty"` 10601 // The delivery method for the subscription contract. 10602 DeliveryMethod *SubscriptionDeliveryMethodInput `json:"deliveryMethod,omitempty"` 10603 } 10604 10605 // Return type for `subscriptionDraftLineAdd` mutation. 10606 type SubscriptionDraftLineAddPayload struct { 10607 // The Subscription Contract draft object. 10608 Draft *SubscriptionDraft `json:"draft,omitempty"` 10609 // The added Subscription Line. 10610 LineAdded *SubscriptionLine `json:"lineAdded,omitempty"` 10611 // List of errors that occurred executing the mutation. 10612 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10613 } 10614 10615 // Return type for `subscriptionDraftLineRemove` mutation. 10616 type SubscriptionDraftLineRemovePayload struct { 10617 // The list of updated subscription discounts impacted by the removed line. 10618 DiscountsUpdated []*SubscriptionManualDiscount `json:"discountsUpdated,omitempty"` 10619 // The Subscription Contract draft object. 10620 Draft *SubscriptionDraft `json:"draft,omitempty"` 10621 // The removed Subscription Line. 10622 LineRemoved *SubscriptionLine `json:"lineRemoved,omitempty"` 10623 // List of errors that occurred executing the mutation. 10624 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10625 } 10626 10627 // Return type for `subscriptionDraftLineUpdate` mutation. 10628 type SubscriptionDraftLineUpdatePayload struct { 10629 // The Subscription Contract draft object. 10630 Draft *SubscriptionDraft `json:"draft,omitempty"` 10631 // The updated Subscription Line. 10632 LineUpdated *SubscriptionLine `json:"lineUpdated,omitempty"` 10633 // List of errors that occurred executing the mutation. 10634 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10635 } 10636 10637 // Return type for `subscriptionDraftUpdate` mutation. 10638 type SubscriptionDraftUpdatePayload struct { 10639 // The Subscription Draft object. 10640 Draft *SubscriptionDraft `json:"draft,omitempty"` 10641 // List of errors that occurred executing the mutation. 10642 UserErrors []*SubscriptionDraftUserError `json:"userErrors,omitempty"` 10643 } 10644 10645 // Represents a Subscription Draft error. 10646 type SubscriptionDraftUserError struct { 10647 // Error code to uniquely identify the error. 10648 Code *SubscriptionDraftErrorCode `json:"code,omitempty"` 10649 // Path to the input field which caused the error. 10650 Field []null.String `json:"field,omitempty"` 10651 // The error message. 10652 Message null.String `json:"message,omitempty"` 10653 } 10654 10655 func (SubscriptionDraftUserError) IsDisplayableError() {} 10656 10657 // Specifies the input fields of a subscription free shipping discount on a contract. 10658 type SubscriptionFreeShippingDiscountInput struct { 10659 // The title associated with the subscription free shipping discount. 10660 Title *null.String `json:"title,omitempty"` 10661 // The maximum number of times the subscription free shipping discount will be applied on orders. 10662 RecurringCycleLimit *int `json:"recurringCycleLimit,omitempty"` 10663 } 10664 10665 // Represents a Subscription Line. 10666 type SubscriptionLine struct { 10667 // The price per unit for the subscription line in the contract's currency. 10668 CurrentPrice *MoneyV2 `json:"currentPrice,omitempty"` 10669 // List of custom attributes associated to the line item. 10670 CustomAttributes []*Attribute `json:"customAttributes,omitempty"` 10671 // Discount allocations. 10672 DiscountAllocations []*SubscriptionDiscountAllocation `json:"discountAllocations,omitempty"` 10673 // The unique identifier. 10674 ID null.String `json:"id,omitempty"` 10675 // Total line price including all discounts. 10676 LineDiscountedPrice *MoneyV2 `json:"lineDiscountedPrice,omitempty"` 10677 // Describe the price changes of the line over time. 10678 PricingPolicy *SubscriptionPricingPolicy `json:"pricingPolicy,omitempty"` 10679 // The product id associated with the subscription line. 10680 ProductID *null.String `json:"productId,omitempty"` 10681 // The quantity of the unit selected for the subscription line. 10682 Quantity int `json:"quantity,omitempty"` 10683 // Whether physical shipping is required for the variant. 10684 RequiresShipping bool `json:"requiresShipping,omitempty"` 10685 // The selling plan ID associated to the line. 10686 // 10687 // Indicates which selling plan was used to create this 10688 // contract line initially. The selling plan ID is also used to 10689 // find the associated delivery profile. 10690 // 10691 // The subscription contract, subscription line, or selling plan might have 10692 // changed. As a result, the selling plan's attributes might not 10693 // match the information on the contract. 10694 SellingPlanID *null.String `json:"sellingPlanId,omitempty"` 10695 // The selling plan name associated to the line. This name describes 10696 // the order line items created from this subscription line 10697 // for both merchants and customers. 10698 // 10699 // The value can be different from the selling plan's name, because both 10700 // the selling plan's name and the subscription line's selling_plan_name 10701 // attribute can be updated independently. 10702 SellingPlanName *null.String `json:"sellingPlanName,omitempty"` 10703 // Variant SKU number of the item associated with the subscription line. 10704 Sku *null.String `json:"sku,omitempty"` 10705 // Whether the variant is taxable. 10706 Taxable bool `json:"taxable,omitempty"` 10707 // Product title of the item associated with the subscription line. 10708 Title null.String `json:"title,omitempty"` 10709 // The product variant id associated with the subscription line. 10710 VariantID *null.String `json:"variantId,omitempty"` 10711 // The image associated with the line item's variant or product. 10712 VariantImage *Image `json:"variantImage,omitempty"` 10713 // Product variant title of the item associated with the subscription line. 10714 VariantTitle *null.String `json:"variantTitle,omitempty"` 10715 } 10716 10717 // An auto-generated type for paginating through multiple SubscriptionLines. 10718 type SubscriptionLineConnection struct { 10719 // A list of edges. 10720 Edges []*SubscriptionLineEdge `json:"edges,omitempty"` 10721 // Information to aid in pagination. 10722 PageInfo *PageInfo `json:"pageInfo,omitempty"` 10723 } 10724 10725 // An auto-generated type which holds one SubscriptionLine and a cursor during pagination. 10726 type SubscriptionLineEdge struct { 10727 // A cursor for use in pagination. 10728 Cursor null.String `json:"cursor,omitempty"` 10729 // The item at the end of SubscriptionLineEdge. 10730 Node *SubscriptionLine `json:"node,omitempty"` 10731 } 10732 10733 // Specifies the input fields required to add a new subscription line to a contract. 10734 type SubscriptionLineInput struct { 10735 // The ID of the product variant the subscription line refers to. 10736 ProductVariantID null.String `json:"productVariantId,omitempty"` 10737 // The quantity of the product. 10738 Quantity int `json:"quantity,omitempty"` 10739 // The price of the product. 10740 CurrentPrice null.String `json:"currentPrice,omitempty"` 10741 // The custom attributes for this subscription line. 10742 CustomAttributes []*AttributeInput `json:"customAttributes,omitempty"` 10743 // The selling plan for the subscription line. 10744 SellingPlanID *null.String `json:"sellingPlanId,omitempty"` 10745 // The selling plan name for the subscription line. 10746 // 10747 // Defaults to using the selling plan's current name when not specified. 10748 SellingPlanName *null.String `json:"sellingPlanName,omitempty"` 10749 // Describes expected price changes of the subscription line over time. 10750 PricingPolicy *SubscriptionPricingPolicyInput `json:"pricingPolicy,omitempty"` 10751 } 10752 10753 // Specifies the input fields required to update a subscription line on a contract. 10754 type SubscriptionLineUpdateInput struct { 10755 // The ID of the product variant the subscription line refers to. 10756 ProductVariantID *null.String `json:"productVariantId,omitempty"` 10757 // The quantity of the product. 10758 Quantity *int `json:"quantity,omitempty"` 10759 // The selling plan for the subscription line. 10760 SellingPlanID *null.String `json:"sellingPlanId,omitempty"` 10761 // The selling plan name for the subscription line. 10762 SellingPlanName *null.String `json:"sellingPlanName,omitempty"` 10763 // The price of the product. 10764 CurrentPrice *null.String `json:"currentPrice,omitempty"` 10765 // The custom attributes for this subscription line. 10766 CustomAttributes []*AttributeInput `json:"customAttributes,omitempty"` 10767 // Describes expected price changes of the subscription line over time. 10768 PricingPolicy *SubscriptionPricingPolicyInput `json:"pricingPolicy,omitempty"` 10769 } 10770 10771 // Represents a Mailing Address on a Subscription. 10772 type SubscriptionMailingAddress struct { 10773 // The first line of the address. Typically the street address or PO Box number. 10774 Address1 *null.String `json:"address1,omitempty"` 10775 // The second line of the address. Typically the number of the apartment, suite, or unit. 10776 Address2 *null.String `json:"address2,omitempty"` 10777 // The name of the city, district, village, or town. 10778 City *null.String `json:"city,omitempty"` 10779 // The name of the customer's company or organization. 10780 Company *null.String `json:"company,omitempty"` 10781 // The name of the country. 10782 Country *null.String `json:"country,omitempty"` 10783 // The two-letter code for the country of the address. 10784 // 10785 // For example, US. 10786 CountryCode *CountryCode `json:"countryCode,omitempty"` 10787 // The first name of the customer. 10788 FirstName *null.String `json:"firstName,omitempty"` 10789 // The last name of the customer. 10790 LastName *null.String `json:"lastName,omitempty"` 10791 // The full name of the customer, based on firstName and lastName. 10792 Name *null.String `json:"name,omitempty"` 10793 // A unique phone number for the customer. Formatted using E.164 standard. For example, _+16135551111_. 10794 Phone *null.String `json:"phone,omitempty"` 10795 // The region of the address, such as the province, state, or district. 10796 Province *null.String `json:"province,omitempty"` 10797 // The two-letter code for the region. 10798 // 10799 // For example, ON. 10800 ProvinceCode *null.String `json:"provinceCode,omitempty"` 10801 // The zip or postal code of the address. 10802 Zip *null.String `json:"zip,omitempty"` 10803 } 10804 10805 // Custom subscription discount. 10806 type SubscriptionManualDiscount struct { 10807 // Entitled line items used to apply the subscription discount on. 10808 EntitledLines *SubscriptionDiscountEntitledLines `json:"entitledLines,omitempty"` 10809 // The unique identifier. 10810 ID null.String `json:"id,omitempty"` 10811 // The maximum number of times the subscription discount will be applied on orders. 10812 RecurringCycleLimit *int `json:"recurringCycleLimit,omitempty"` 10813 // The reason that the discount on the subscription draft is rejected. 10814 RejectionReason *SubscriptionDiscountRejectionReason `json:"rejectionReason,omitempty"` 10815 // Type of line the discount applies on. 10816 TargetType DiscountTargetType `json:"targetType,omitempty"` 10817 // The title associated with the subscription discount. 10818 Title *null.String `json:"title,omitempty"` 10819 // The type of the subscription discount. 10820 Type DiscountType `json:"type,omitempty"` 10821 // The number of times the discount was applied. 10822 UsageCount int `json:"usageCount,omitempty"` 10823 // The value of the subscription discount. 10824 Value SubscriptionDiscountValue `json:"value,omitempty"` 10825 } 10826 10827 func (SubscriptionManualDiscount) IsSubscriptionDiscount() {} 10828 10829 // An auto-generated type for paginating through multiple SubscriptionManualDiscounts. 10830 type SubscriptionManualDiscountConnection struct { 10831 // A list of edges. 10832 Edges []*SubscriptionManualDiscountEdge `json:"edges,omitempty"` 10833 // Information to aid in pagination. 10834 PageInfo *PageInfo `json:"pageInfo,omitempty"` 10835 } 10836 10837 // An auto-generated type which holds one SubscriptionManualDiscount and a cursor during pagination. 10838 type SubscriptionManualDiscountEdge struct { 10839 // A cursor for use in pagination. 10840 Cursor null.String `json:"cursor,omitempty"` 10841 // The item at the end of SubscriptionManualDiscountEdge. 10842 Node *SubscriptionManualDiscount `json:"node,omitempty"` 10843 } 10844 10845 // Represents the subscription lines the discount applies on. 10846 type SubscriptionManualDiscountEntitledLinesInput struct { 10847 // Specify whether the subscription discount will apply on all subscription lines. 10848 All *bool `json:"all,omitempty"` 10849 // The ID of the lines to add to or remove from the subscription discount. 10850 Lines *SubscriptionManualDiscountLinesInput `json:"lines,omitempty"` 10851 } 10852 10853 // Specifies the fixed amount value of the discount and distribution on the lines. 10854 type SubscriptionManualDiscountFixedAmountInput struct { 10855 // Fixed amount value. 10856 Amount *float64 `json:"amount,omitempty"` 10857 // Whether the amount is intended per line item or once per subscription. 10858 AppliesOnEachItem *bool `json:"appliesOnEachItem,omitempty"` 10859 } 10860 10861 // Specifies the input fields of a subscription discount on a contract. 10862 type SubscriptionManualDiscountInput struct { 10863 // The title associated with the subscription discount. 10864 Title *null.String `json:"title,omitempty"` 10865 // Percentage or fixed amount value of the discount. 10866 Value *SubscriptionManualDiscountValueInput `json:"value,omitempty"` 10867 // The maximum number of times the subscription discount will be applied on orders. 10868 RecurringCycleLimit *int `json:"recurringCycleLimit,omitempty"` 10869 // Entitled line items used to apply the subscription discount on. 10870 EntitledLines *SubscriptionManualDiscountEntitledLinesInput `json:"entitledLines,omitempty"` 10871 } 10872 10873 // Line items that a the discount refers to. 10874 type SubscriptionManualDiscountLinesInput struct { 10875 // The ID of the lines to add to the subscription discount. 10876 Add []null.String `json:"add,omitempty"` 10877 // The ID of the lines to remove from the subscription discount. 10878 Remove []null.String `json:"remove,omitempty"` 10879 } 10880 10881 // Specifies the discount value and its distribution. 10882 type SubscriptionManualDiscountValueInput struct { 10883 // The percentage value of the discount. Value must be between 0 - 100. 10884 Percentage *int `json:"percentage,omitempty"` 10885 // Fixed amount input in the currency defined by the subscription. 10886 FixedAmount *SubscriptionManualDiscountFixedAmountInput `json:"fixedAmount,omitempty"` 10887 } 10888 10889 // Represents a Subscription Line Pricing Policy. 10890 type SubscriptionPricingPolicy struct { 10891 // The base price per unit for the subscription line in the contract's currency. 10892 BasePrice *MoneyV2 `json:"basePrice,omitempty"` 10893 // The adjustments per cycle for the subscription line. 10894 CycleDiscounts []*SubscriptionCyclePriceAdjustment `json:"cycleDiscounts,omitempty"` 10895 } 10896 10897 // An array containing all pricing changes for each billing cycle. 10898 type SubscriptionPricingPolicyCycleDiscountsInput struct { 10899 // The cycle after which the pricing policy applies. 10900 AfterCycle int `json:"afterCycle,omitempty"` 10901 // The price adjustment type. 10902 AdjustmentType SellingPlanPricingPolicyAdjustmentType `json:"adjustmentType,omitempty"` 10903 // The price adjustment value. 10904 AdjustmentValue *SellingPlanPricingPolicyValueInput `json:"adjustmentValue,omitempty"` 10905 // The computed price after the adjustments are applied. 10906 ComputedPrice null.String `json:"computedPrice,omitempty"` 10907 } 10908 10909 // Describes expected price changes of the subscription line over time. 10910 type SubscriptionPricingPolicyInput struct { 10911 // The base price per unit for the subscription line in the contract's currency. 10912 BasePrice null.String `json:"basePrice,omitempty"` 10913 // An array containing all pricing changes for each billing cycle. 10914 CycleDiscounts []*SubscriptionPricingPolicyCycleDiscountsInput `json:"cycleDiscounts,omitempty"` 10915 } 10916 10917 // A shipping option to deliver a subscription contract. 10918 type SubscriptionShippingOption struct { 10919 // The carrier service that is providing this shipping option. 10920 // This field isn't currently supported and returns null. 10921 CarrierService *DeliveryCarrierService `json:"carrierService,omitempty"` 10922 // The code of the shipping option. 10923 Code null.String `json:"code,omitempty"` 10924 // The description of the shipping option. 10925 Description *null.String `json:"description,omitempty"` 10926 // If a phone number is required for the shipping option. 10927 PhoneRequired *bool `json:"phoneRequired,omitempty"` 10928 // The presentment title of the shipping option. 10929 PresentmentTitle *null.String `json:"presentmentTitle,omitempty"` 10930 // The price of the shipping option. 10931 Price *MoneyV2 `json:"price,omitempty"` 10932 // The title of the shipping option. 10933 Title null.String `json:"title,omitempty"` 10934 } 10935 10936 // Failure determining available shipping options for delivery of a subscription contract. 10937 type SubscriptionShippingOptionResultFailure struct { 10938 // Failure reason. 10939 Message *null.String `json:"message,omitempty"` 10940 } 10941 10942 func (SubscriptionShippingOptionResultFailure) IsSubscriptionShippingOptionResult() {} 10943 10944 // A shipping option for delivery of a subscription contract. 10945 type SubscriptionShippingOptionResultSuccess struct { 10946 // Available shipping options. 10947 ShippingOptions []*SubscriptionShippingOption `json:"shippingOptions,omitempty"` 10948 } 10949 10950 func (SubscriptionShippingOptionResultSuccess) IsSubscriptionShippingOptionResult() {} 10951 10952 // Represents a suggested transaction. 10953 type SuggestedOrderTransaction struct { 10954 // The masked account number associated with the payment method. 10955 AccountNumber *null.String `json:"accountNumber,omitempty"` 10956 // The amount of the transaction. 10957 Amount null.String `json:"amount,omitempty"` 10958 // The amount on the order transaction in applicable currencies. 10959 AmountSet *MoneyBag `json:"amountSet,omitempty"` 10960 // The human-readable payment gateway name used to process the transaction. 10961 FormattedGateway *null.String `json:"formattedGateway,omitempty"` 10962 // The payment gateway used to process the transaction. 10963 Gateway *null.String `json:"gateway,omitempty"` 10964 // Specifies the kind of the suggested order transaction. 10965 Kind SuggestedOrderTransactionKind `json:"kind,omitempty"` 10966 // Specifies the available amount to refund on the gateway. Only available within SuggestedRefund. 10967 MaximumRefundable *null.String `json:"maximumRefundable,omitempty"` 10968 // Specifies the available amount to refund on the gateway in shop and presentment currencies. Only available within SuggestedRefund. 10969 MaximumRefundableSet *MoneyBag `json:"maximumRefundableSet,omitempty"` 10970 // The associated parent transaction, for example the authorization of a capture. 10971 ParentTransaction *OrderTransaction `json:"parentTransaction,omitempty"` 10972 } 10973 10974 // Represents the suggested refund to be submitted based on the items being returned. 10975 type SuggestedRefund struct { 10976 // The total monetary value to be refunded. 10977 Amount null.String `json:"amount,omitempty"` 10978 // The total monetary value to be refunded in shop and presentment currencies. 10979 AmountSet *MoneyBag `json:"amountSet,omitempty"` 10980 // The sum of all the discounted prices of the line items being refunded. 10981 DiscountedSubtotalSet *MoneyBag `json:"discountedSubtotalSet,omitempty"` 10982 // The total monetary value available to refund. 10983 MaximumRefundable null.String `json:"maximumRefundable,omitempty"` 10984 // The total monetary value available to refund in shop and presentment currencies. 10985 MaximumRefundableSet *MoneyBag `json:"maximumRefundableSet,omitempty"` 10986 // An array of duties that will be refunded to the customer. 10987 RefundDuties []*RefundDuty `json:"refundDuties,omitempty"` 10988 // An array of line items that will be returned to the customer. 10989 RefundLineItems []*RefundLineItem `json:"refundLineItems,omitempty"` 10990 // Refund details for shipping costs paid by customer. 10991 Shipping *ShippingRefund `json:"shipping,omitempty"` 10992 // The sum of all the prices of the line items being refunded. 10993 Subtotal null.String `json:"subtotal,omitempty"` 10994 // The sum of all the prices of the line items being refunded in shop and presentment currencies. 10995 SubtotalSet *MoneyBag `json:"subtotalSet,omitempty"` 10996 // Array of SuggestedOrderTransaction items. 10997 SuggestedTransactions []*SuggestedOrderTransaction `json:"suggestedTransactions,omitempty"` 10998 // The total cart discount amount that was applied to all line items in this refund. 10999 TotalCartDiscountAmountSet *MoneyBag `json:"totalCartDiscountAmountSet,omitempty"` 11000 // The sum of all the duties being refunded from the order in shop and presentment currencies. Must be positive. 11001 TotalDutiesSet *MoneyBag `json:"totalDutiesSet,omitempty"` 11002 // The sum of all the taxes being refunded from the order (must be positive) in shop and presentment currencies. 11003 TotalTaxSet *MoneyBag `json:"totalTaxSet,omitempty"` 11004 // The sum of all the taxes being refunded from the order (must be positive). 11005 TotalTaxes null.String `json:"totalTaxes,omitempty"` 11006 } 11007 11008 // Return type for `tagsAdd` mutation. 11009 type TagsAddPayload struct { 11010 // The object that was updated. 11011 Node Node `json:"node,omitempty"` 11012 // List of errors that occurred executing the mutation. 11013 UserErrors []*UserError `json:"userErrors,omitempty"` 11014 } 11015 11016 // Return type for `tagsRemove` mutation. 11017 type TagsRemovePayload struct { 11018 // The object that was updated. 11019 Node Node `json:"node,omitempty"` 11020 // List of errors that occurred executing the mutation. 11021 UserErrors []*UserError `json:"userErrors,omitempty"` 11022 } 11023 11024 // Represents the information about the tax charged on the associated line item. 11025 type TaxLine struct { 11026 // The amount of tax to be charged. 11027 Price null.String `json:"price,omitempty"` 11028 // The amount of tax to be charged in shop and presentment currencies. 11029 PriceSet *MoneyBag `json:"priceSet,omitempty"` 11030 // The tax rate to be applied. 11031 Rate *float64 `json:"rate,omitempty"` 11032 // The percentage of the price that the tax rate represents. 11033 RatePercentage *float64 `json:"ratePercentage,omitempty"` 11034 // The name of the tax. 11035 Title null.String `json:"title,omitempty"` 11036 } 11037 11038 // A tender transaction represents a transaction which modifies the shop's balance. 11039 type TenderTransaction struct { 11040 // The amount and currency of the tender transaction. 11041 Amount *MoneyV2 `json:"amount,omitempty"` 11042 // Globally unique identifier. 11043 ID null.String `json:"id,omitempty"` 11044 // Information about the payment method used for this transaction. 11045 PaymentMethod *null.String `json:"paymentMethod,omitempty"` 11046 // Date and time when the transaction was processed. 11047 ProcessedAt *null.String `json:"processedAt,omitempty"` 11048 // The remote gateway reference associated with the tender transaction. 11049 RemoteReference *null.String `json:"remoteReference,omitempty"` 11050 // Whether the transaction is a test transaction. 11051 Test bool `json:"test,omitempty"` 11052 // Information about the payment instrument used for this transaction. 11053 TransactionDetails TenderTransactionDetails `json:"transactionDetails,omitempty"` 11054 } 11055 11056 func (TenderTransaction) IsNode() {} 11057 11058 // An auto-generated type for paginating through multiple TenderTransactions. 11059 type TenderTransactionConnection struct { 11060 // A list of edges. 11061 Edges []*TenderTransactionEdge `json:"edges,omitempty"` 11062 // Information to aid in pagination. 11063 PageInfo *PageInfo `json:"pageInfo,omitempty"` 11064 } 11065 11066 // Information about the credit card used for this transaction. 11067 type TenderTransactionCreditCardDetails struct { 11068 // The name of the company that issued the customer's credit card. 11069 CreditCardCompany *null.String `json:"creditCardCompany,omitempty"` 11070 // The customer's credit card number, with most of the leading digits redacted. 11071 CreditCardNumber *null.String `json:"creditCardNumber,omitempty"` 11072 } 11073 11074 func (TenderTransactionCreditCardDetails) IsTenderTransactionDetails() {} 11075 11076 // An auto-generated type which holds one TenderTransaction and a cursor during pagination. 11077 type TenderTransactionEdge struct { 11078 // A cursor for use in pagination. 11079 Cursor null.String `json:"cursor,omitempty"` 11080 // The item at the end of TenderTransactionEdge. 11081 Node *TenderTransaction `json:"node,omitempty"` 11082 } 11083 11084 // Specifies the fields for tracking information. 11085 type TrackingInfoInput struct { 11086 // The tracking number of the fulfillment. 11087 Number *null.String `json:"number,omitempty"` 11088 // The URL to track the fulfillment. 11089 URL *null.String `json:"url,omitempty"` 11090 } 11091 11092 // Specifies all possible fields for updating tracking information. 11093 type TrackingInfoUpdateInput struct { 11094 // Tracking information consisting of one or more tracking URLs and numbers associated with the fulfillment. 11095 TrackingDetails []*TrackingInfoInput `json:"trackingDetails,omitempty"` 11096 // The name of the tracking company. 11097 TrackingCompany *null.String `json:"trackingCompany,omitempty"` 11098 // Indicates whether the customer will be notified of this update and future updates for this fulfillment. 11099 NotifyCustomer *bool `json:"notifyCustomer,omitempty"` 11100 } 11101 11102 // Transaction fee related to an order transaction. 11103 type TransactionFee struct { 11104 // Amount of the fee. 11105 Amount *MoneyV2 `json:"amount,omitempty"` 11106 // Flat rate charge for a transaction. 11107 FlatFee *MoneyV2 `json:"flatFee,omitempty"` 11108 // Name of the credit card flat fee. 11109 FlatFeeName *null.String `json:"flatFeeName,omitempty"` 11110 // Globally unique identifier. 11111 ID null.String `json:"id,omitempty"` 11112 // Percentage charge. 11113 Rate null.String `json:"rate,omitempty"` 11114 // Name of the credit card rate. 11115 RateName *null.String `json:"rateName,omitempty"` 11116 // Tax amount charged on the fee. 11117 TaxAmount *MoneyV2 `json:"taxAmount,omitempty"` 11118 // Name of the type of fee. 11119 Type null.String `json:"type,omitempty"` 11120 } 11121 11122 func (TransactionFee) IsNode() {} 11123 11124 // Translatable content of a resource's field. 11125 type TranslatableContent struct { 11126 // Digest (hash) of the content. 11127 Digest *null.String `json:"digest,omitempty"` 11128 // Content key. 11129 Key null.String `json:"key,omitempty"` 11130 // Content locale. 11131 Locale null.String `json:"locale,omitempty"` 11132 // Content value. 11133 Value *null.String `json:"value,omitempty"` 11134 } 11135 11136 // A resource that has translatable fields. 11137 type TranslatableResource struct { 11138 // GID of the resource. 11139 ResourceID null.String `json:"resourceId,omitempty"` 11140 // Translatable content. 11141 TranslatableContent []*TranslatableContent `json:"translatableContent,omitempty"` 11142 // Translatable content translations. 11143 Translations []*Translation `json:"translations,omitempty"` 11144 } 11145 11146 // An auto-generated type for paginating through multiple TranslatableResources. 11147 type TranslatableResourceConnection struct { 11148 // A list of edges. 11149 Edges []*TranslatableResourceEdge `json:"edges,omitempty"` 11150 // Information to aid in pagination. 11151 PageInfo *PageInfo `json:"pageInfo,omitempty"` 11152 } 11153 11154 // An auto-generated type which holds one TranslatableResource and a cursor during pagination. 11155 type TranslatableResourceEdge struct { 11156 // A cursor for use in pagination. 11157 Cursor null.String `json:"cursor,omitempty"` 11158 // The item at the end of TranslatableResourceEdge. 11159 Node *TranslatableResource `json:"node,omitempty"` 11160 } 11161 11162 // Translation of a field of a resource. 11163 type Translation struct { 11164 // Translation key. 11165 Key null.String `json:"key,omitempty"` 11166 // Translation locale. 11167 Locale null.String `json:"locale,omitempty"` 11168 // Marked as outdated. 11169 Outdated bool `json:"outdated,omitempty"` 11170 // Translation value. 11171 Value *null.String `json:"value,omitempty"` 11172 } 11173 11174 // Provides the fields and values to use when creating or updating a translation. 11175 type TranslationInput struct { 11176 // The locale of the translation. 11177 Locale null.String `json:"locale,omitempty"` 11178 // The key of the translation. 11179 Key null.String `json:"key,omitempty"` 11180 // The value of the translation. 11181 Value null.String `json:"value,omitempty"` 11182 // The digest (hash) of the content being translated. 11183 TranslatableContentDigest null.String `json:"translatableContentDigest,omitempty"` 11184 } 11185 11186 // Represents an error that happens during the execution of a translation mutation. 11187 type TranslationUserError struct { 11188 // Error code to uniquely identify the error. 11189 Code *TranslationErrorCode `json:"code,omitempty"` 11190 // Path to the input field which caused the error. 11191 Field []null.String `json:"field,omitempty"` 11192 // The error message. 11193 Message null.String `json:"message,omitempty"` 11194 } 11195 11196 func (TranslationUserError) IsDisplayableError() {} 11197 11198 // Return type for `translationsRegister` mutation. 11199 type TranslationsRegisterPayload struct { 11200 // The translations that were created or updated. 11201 Translations []*Translation `json:"translations,omitempty"` 11202 // List of errors that occurred executing the mutation. 11203 UserErrors []*TranslationUserError `json:"userErrors,omitempty"` 11204 } 11205 11206 // Return type for `translationsRemove` mutation. 11207 type TranslationsRemovePayload struct { 11208 // The translations that were deleted. 11209 Translations []*Translation `json:"translations,omitempty"` 11210 // List of errors that occurred executing the mutation. 11211 UserErrors []*TranslationUserError `json:"userErrors,omitempty"` 11212 } 11213 11214 // Specifies the 11215 // [Urchin Traffic Module (UTM) parameters](https://en.wikipedia.org/wiki/UTM_parameters) 11216 // that are associated with a related marketing campaign. 11217 type UTMInput struct { 11218 // The name of the UTM campaign. 11219 Campaign null.String `json:"campaign,omitempty"` 11220 // The name of the website or application where the referral link exists. 11221 Source null.String `json:"source,omitempty"` 11222 // The UTM campaign medium. 11223 Medium null.String `json:"medium,omitempty"` 11224 } 11225 11226 // Represents a set of UTM parameters. 11227 type UTMParameters struct { 11228 // The name of a marketing campaign. 11229 Campaign *null.String `json:"campaign,omitempty"` 11230 // Identifies specific content in a marketing campaign. Used to differentiate between similar content or links in a marketing campaign to determine which is the most effective. 11231 Content *null.String `json:"content,omitempty"` 11232 // The medium of a marketing campaign, such as a banner or email newsletter. 11233 Medium *null.String `json:"medium,omitempty"` 11234 // The source of traffic to the merchant's store, such as Google or an email newsletter. 11235 Source *null.String `json:"source,omitempty"` 11236 // Paid search terms used by a marketing campaign. 11237 Term *null.String `json:"term,omitempty"` 11238 } 11239 11240 // Specifies the input fields required to update a media object. 11241 type UpdateMediaInput struct { 11242 // Specifies the media to update. 11243 ID null.String `json:"id,omitempty"` 11244 // The source from which to update the media preview image. May be an external URL or signed upload URL. 11245 PreviewImageSource *null.String `json:"previewImageSource,omitempty"` 11246 // The alt text associated to the media. 11247 Alt *null.String `json:"alt,omitempty"` 11248 } 11249 11250 // Represents an error in the input of a mutation. 11251 type UserError struct { 11252 // Path to the input field which caused the error. 11253 Field []null.String `json:"field,omitempty"` 11254 // The error message. 11255 Message null.String `json:"message,omitempty"` 11256 } 11257 11258 func (UserError) IsDisplayableError() {} 11259 11260 // Represents a Shopify hosted video. 11261 type Video struct { 11262 // A word or phrase to share the nature or contents of a media. 11263 Alt *null.String `json:"alt,omitempty"` 11264 // The filename of the video. 11265 Filename null.String `json:"filename,omitempty"` 11266 // Globally unique identifier. 11267 ID null.String `json:"id,omitempty"` 11268 // The media content type. 11269 MediaContentType MediaContentType `json:"mediaContentType,omitempty"` 11270 // Any errors which have occurred on the media. 11271 MediaErrors []*MediaError `json:"mediaErrors,omitempty"` 11272 // The original source for a video. 11273 OriginalSource *VideoSource `json:"originalSource,omitempty"` 11274 // The preview image for the media. 11275 Preview *MediaPreviewImage `json:"preview,omitempty"` 11276 // The sources for a video. 11277 Sources []*VideoSource `json:"sources,omitempty"` 11278 // Current status of the media. 11279 Status MediaStatus `json:"status,omitempty"` 11280 } 11281 11282 func (Video) IsNode() {} 11283 func (Video) IsMedia() {} 11284 11285 // Represents a source for a Shopify hosted video. 11286 type VideoSource struct { 11287 // The format of the video source. 11288 Format null.String `json:"format,omitempty"` 11289 // The height of the video. 11290 Height int `json:"height,omitempty"` 11291 // The video MIME type. 11292 MimeType null.String `json:"mimeType,omitempty"` 11293 // The URL of the video. 11294 URL null.String `json:"url,omitempty"` 11295 // The width of the video. 11296 Width int `json:"width,omitempty"` 11297 } 11298 11299 // Amazon EventBridge event source. 11300 type WebhookEventBridgeEndpoint struct { 11301 // ARN of this EventBridge event source. 11302 Arn null.String `json:"arn,omitempty"` 11303 } 11304 11305 // HTTP endpoint where POST requests will be made to. 11306 type WebhookHTTPEndpoint struct { 11307 // URL of webhook endpoint to deliver webhooks to. 11308 CallbackURL null.String `json:"callbackUrl,omitempty"` 11309 } 11310 11311 // Represents a subscription to a webhook. 11312 type WebhookSubscription struct { 11313 // URL where the webhook subscription should send the POST request when the event occurs. 11314 CallbackURL null.String `json:"callbackUrl,omitempty"` 11315 // The date and time when the webhook subscription was created. 11316 CreatedAt null.String `json:"createdAt,omitempty"` 11317 // Endpoint where webhooks will be delivered to. 11318 Endpoint WebhookSubscriptionEndpoint `json:"endpoint,omitempty"` 11319 // The format in which the webhook subscription should send the data. 11320 Format WebhookSubscriptionFormat `json:"format,omitempty"` 11321 // Globally unique identifier. 11322 ID null.String `json:"id,omitempty"` 11323 // The list of fields to be included in the webhook subscription. 11324 IncludeFields []null.String `json:"includeFields,omitempty"` 11325 // The ID of the corresponding resource in the REST Admin API. 11326 LegacyResourceID null.String `json:"legacyResourceId,omitempty"` 11327 // The list of namespaces for any metafields that should be included in the webhook subscription. 11328 MetafieldNamespaces []null.String `json:"metafieldNamespaces,omitempty"` 11329 // The type of event that triggers the webhook. 11330 Topic WebhookSubscriptionTopic `json:"topic,omitempty"` 11331 // The date and time when the webhook subscription was updated. 11332 UpdatedAt null.String `json:"updatedAt,omitempty"` 11333 } 11334 11335 func (WebhookSubscription) IsNode() {} 11336 func (WebhookSubscription) IsLegacyInteroperability() {} 11337 11338 // An auto-generated type for paginating through multiple WebhookSubscriptions. 11339 type WebhookSubscriptionConnection struct { 11340 // A list of edges. 11341 Edges []*WebhookSubscriptionEdge `json:"edges,omitempty"` 11342 // Information to aid in pagination. 11343 PageInfo *PageInfo `json:"pageInfo,omitempty"` 11344 } 11345 11346 // Return type for `webhookSubscriptionCreate` mutation. 11347 type WebhookSubscriptionCreatePayload struct { 11348 // List of errors that occurred executing the mutation. 11349 UserErrors []*UserError `json:"userErrors,omitempty"` 11350 // The webhook subscription that was created. 11351 WebhookSubscription *WebhookSubscription `json:"webhookSubscription,omitempty"` 11352 } 11353 11354 // Return type for `webhookSubscriptionDelete` mutation. 11355 type WebhookSubscriptionDeletePayload struct { 11356 // The ID of the deleted webhook subscription. 11357 DeletedWebhookSubscriptionID *null.String `json:"deletedWebhookSubscriptionId,omitempty"` 11358 // List of errors that occurred executing the mutation. 11359 UserErrors []*UserError `json:"userErrors,omitempty"` 11360 } 11361 11362 // An auto-generated type which holds one WebhookSubscription and a cursor during pagination. 11363 type WebhookSubscriptionEdge struct { 11364 // A cursor for use in pagination. 11365 Cursor null.String `json:"cursor,omitempty"` 11366 // The item at the end of WebhookSubscriptionEdge. 11367 Node *WebhookSubscription `json:"node,omitempty"` 11368 } 11369 11370 // Specifies the input fields for a webhook subscription. 11371 type WebhookSubscriptionInput struct { 11372 // URL where the webhook subscription should send the POST request when the event occurs. 11373 CallbackURL *null.String `json:"callbackUrl,omitempty"` 11374 // The format in which the webhook subscription should send the data. 11375 Format *WebhookSubscriptionFormat `json:"format,omitempty"` 11376 // The list of fields to be included in the webhook subscription. 11377 IncludeFields []null.String `json:"includeFields,omitempty"` 11378 // The list of namespaces for any metafields that should be included in the webhook subscription. 11379 MetafieldNamespaces []null.String `json:"metafieldNamespaces,omitempty"` 11380 } 11381 11382 // Return type for `webhookSubscriptionUpdate` mutation. 11383 type WebhookSubscriptionUpdatePayload struct { 11384 // List of errors that occurred executing the mutation. 11385 UserErrors []*UserError `json:"userErrors,omitempty"` 11386 // The webhook subscription that was updated. 11387 WebhookSubscription *WebhookSubscription `json:"webhookSubscription,omitempty"` 11388 } 11389 11390 // Represents weight unit and value. 11391 type Weight struct { 11392 // Unit of measurement for `value`. 11393 Unit WeightUnit `json:"unit,omitempty"` 11394 // The weight using the unit system specified with `unit`. 11395 Value float64 `json:"value,omitempty"` 11396 } 11397 11398 func (Weight) IsDeliveryConditionCriteria() {} 11399 11400 // Specifies the weight unit and value inputs. 11401 type WeightInput struct { 11402 // The weight value using the unit system specified with `weight_unit`. 11403 Value float64 `json:"value,omitempty"` 11404 // Unit of measurement for `value`. 11405 Unit WeightUnit `json:"unit,omitempty"` 11406 } 11407 11408 // Return type for `deliveryProfileCreate` mutation. 11409 type DeliveryProfileCreatePayload struct { 11410 // The delivery profile that was created. 11411 Profile *DeliveryProfile `json:"profile,omitempty"` 11412 // List of errors that occurred executing the mutation. 11413 UserErrors []*UserError `json:"userErrors,omitempty"` 11414 } 11415 11416 // Return type for `deliveryProfileRemove` mutation. 11417 type DeliveryProfileRemovePayload struct { 11418 // The profile deletion job triggered by the mutation. 11419 Job *Job `json:"job,omitempty"` 11420 // List of errors that occurred executing the mutation. 11421 UserErrors []*UserError `json:"userErrors,omitempty"` 11422 } 11423 11424 // Return type for `deliveryProfileUpdate` mutation. 11425 type DeliveryProfileUpdatePayload struct { 11426 // The delivery profile that was updated. 11427 Profile *DeliveryProfile `json:"profile,omitempty"` 11428 // List of errors that occurred executing the mutation. 11429 UserErrors []*UserError `json:"userErrors,omitempty"` 11430 } 11431 11432 // Possible categories of an app installation. 11433 type AppInstallationCategory string 11434 11435 const ( 11436 // Sales channel apps. 11437 AppInstallationCategoryChannel AppInstallationCategory = "CHANNEL" 11438 // Apps that can be used in the POS mobile client. 11439 AppInstallationCategoryPosEmbedded AppInstallationCategory = "POS_EMBEDDED" 11440 ) 11441 11442 var AllAppInstallationCategory = []AppInstallationCategory{ 11443 AppInstallationCategoryChannel, 11444 AppInstallationCategoryPosEmbedded, 11445 } 11446 11447 func (e AppInstallationCategory) IsValid() bool { 11448 switch e { 11449 case AppInstallationCategoryChannel, AppInstallationCategoryPosEmbedded: 11450 return true 11451 } 11452 return false 11453 } 11454 11455 func (e AppInstallationCategory) String() string { 11456 return string(e) 11457 } 11458 11459 func (e *AppInstallationCategory) UnmarshalGQL(v interface{}) error { 11460 str, ok := v.(string) 11461 if !ok { 11462 return fmt.Errorf("enums must be strings") 11463 } 11464 11465 *e = AppInstallationCategory(str) 11466 if !e.IsValid() { 11467 return fmt.Errorf("%s is not a valid AppInstallationCategory", str) 11468 } 11469 return nil 11470 } 11471 11472 func (e AppInstallationCategory) MarshalGQL(w io.Writer) { 11473 fmt.Fprint(w, strconv.Quote(e.String())) 11474 } 11475 11476 // Possible privacy types of an app installation. 11477 type AppInstallationPrivacy string 11478 11479 const ( 11480 AppInstallationPrivacyPublic AppInstallationPrivacy = "PUBLIC" 11481 AppInstallationPrivacyPrivate AppInstallationPrivacy = "PRIVATE" 11482 ) 11483 11484 var AllAppInstallationPrivacy = []AppInstallationPrivacy{ 11485 AppInstallationPrivacyPublic, 11486 AppInstallationPrivacyPrivate, 11487 } 11488 11489 func (e AppInstallationPrivacy) IsValid() bool { 11490 switch e { 11491 case AppInstallationPrivacyPublic, AppInstallationPrivacyPrivate: 11492 return true 11493 } 11494 return false 11495 } 11496 11497 func (e AppInstallationPrivacy) String() string { 11498 return string(e) 11499 } 11500 11501 func (e *AppInstallationPrivacy) UnmarshalGQL(v interface{}) error { 11502 str, ok := v.(string) 11503 if !ok { 11504 return fmt.Errorf("enums must be strings") 11505 } 11506 11507 *e = AppInstallationPrivacy(str) 11508 if !e.IsValid() { 11509 return fmt.Errorf("%s is not a valid AppInstallationPrivacy", str) 11510 } 11511 return nil 11512 } 11513 11514 func (e AppInstallationPrivacy) MarshalGQL(w io.Writer) { 11515 fmt.Fprint(w, strconv.Quote(e.String())) 11516 } 11517 11518 // The set of valid sort keys for the AppInstallation query. 11519 type AppInstallationSortKeys string 11520 11521 const ( 11522 // Sort by the `installed_at` value. 11523 AppInstallationSortKeysInstalledAt AppInstallationSortKeys = "INSTALLED_AT" 11524 // Sort by the `app_title` value. 11525 AppInstallationSortKeysAppTitle AppInstallationSortKeys = "APP_TITLE" 11526 // Sort by the `id` value. 11527 AppInstallationSortKeysID AppInstallationSortKeys = "ID" 11528 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 11529 // results by relevance to the search term(s). When no search query is specified, this sort key is not 11530 // deterministic and should not be used. 11531 AppInstallationSortKeysRelevance AppInstallationSortKeys = "RELEVANCE" 11532 ) 11533 11534 var AllAppInstallationSortKeys = []AppInstallationSortKeys{ 11535 AppInstallationSortKeysInstalledAt, 11536 AppInstallationSortKeysAppTitle, 11537 AppInstallationSortKeysID, 11538 AppInstallationSortKeysRelevance, 11539 } 11540 11541 func (e AppInstallationSortKeys) IsValid() bool { 11542 switch e { 11543 case AppInstallationSortKeysInstalledAt, AppInstallationSortKeysAppTitle, AppInstallationSortKeysID, AppInstallationSortKeysRelevance: 11544 return true 11545 } 11546 return false 11547 } 11548 11549 func (e AppInstallationSortKeys) String() string { 11550 return string(e) 11551 } 11552 11553 func (e *AppInstallationSortKeys) UnmarshalGQL(v interface{}) error { 11554 str, ok := v.(string) 11555 if !ok { 11556 return fmt.Errorf("enums must be strings") 11557 } 11558 11559 *e = AppInstallationSortKeys(str) 11560 if !e.IsValid() { 11561 return fmt.Errorf("%s is not a valid AppInstallationSortKeys", str) 11562 } 11563 return nil 11564 } 11565 11566 func (e AppInstallationSortKeys) MarshalGQL(w io.Writer) { 11567 fmt.Fprint(w, strconv.Quote(e.String())) 11568 } 11569 11570 // The billing frequency for the app. 11571 type AppPricingInterval string 11572 11573 const ( 11574 // The merchant is billed for this app annually. 11575 AppPricingIntervalAnnual AppPricingInterval = "ANNUAL" 11576 // The merchant is billed for this app every 30 days. 11577 AppPricingIntervalEvery30Days AppPricingInterval = "EVERY_30_DAYS" 11578 ) 11579 11580 var AllAppPricingInterval = []AppPricingInterval{ 11581 AppPricingIntervalAnnual, 11582 AppPricingIntervalEvery30Days, 11583 } 11584 11585 func (e AppPricingInterval) IsValid() bool { 11586 switch e { 11587 case AppPricingIntervalAnnual, AppPricingIntervalEvery30Days: 11588 return true 11589 } 11590 return false 11591 } 11592 11593 func (e AppPricingInterval) String() string { 11594 return string(e) 11595 } 11596 11597 func (e *AppPricingInterval) UnmarshalGQL(v interface{}) error { 11598 str, ok := v.(string) 11599 if !ok { 11600 return fmt.Errorf("enums must be strings") 11601 } 11602 11603 *e = AppPricingInterval(str) 11604 if !e.IsValid() { 11605 return fmt.Errorf("%s is not a valid AppPricingInterval", str) 11606 } 11607 return nil 11608 } 11609 11610 func (e AppPricingInterval) MarshalGQL(w io.Writer) { 11611 fmt.Fprint(w, strconv.Quote(e.String())) 11612 } 11613 11614 // The status of the purchase. 11615 type AppPurchaseStatus string 11616 11617 const ( 11618 // The app purchase has been approved by the merchant and is ready to be activated by the app. App purchases created through the GraphQL Admin API are activated upon approval. 11619 AppPurchaseStatusAccepted AppPurchaseStatus = "ACCEPTED" 11620 // The app purchase has been activated by the app. Active app purchases are charged to the store and partners receive payouts for active app purchase. 11621 AppPurchaseStatusActive AppPurchaseStatus = "ACTIVE" 11622 // The app purchase was declined by the merchant. 11623 AppPurchaseStatusDeclined AppPurchaseStatus = "DECLINED" 11624 // The app purchase was not accepted within 2 days of being created. 11625 AppPurchaseStatusExpired AppPurchaseStatus = "EXPIRED" 11626 // The app purchase is pending approval by the merchant. 11627 AppPurchaseStatusPending AppPurchaseStatus = "PENDING" 11628 ) 11629 11630 var AllAppPurchaseStatus = []AppPurchaseStatus{ 11631 AppPurchaseStatusAccepted, 11632 AppPurchaseStatusActive, 11633 AppPurchaseStatusDeclined, 11634 AppPurchaseStatusExpired, 11635 AppPurchaseStatusPending, 11636 } 11637 11638 func (e AppPurchaseStatus) IsValid() bool { 11639 switch e { 11640 case AppPurchaseStatusAccepted, AppPurchaseStatusActive, AppPurchaseStatusDeclined, AppPurchaseStatusExpired, AppPurchaseStatusPending: 11641 return true 11642 } 11643 return false 11644 } 11645 11646 func (e AppPurchaseStatus) String() string { 11647 return string(e) 11648 } 11649 11650 func (e *AppPurchaseStatus) UnmarshalGQL(v interface{}) error { 11651 str, ok := v.(string) 11652 if !ok { 11653 return fmt.Errorf("enums must be strings") 11654 } 11655 11656 *e = AppPurchaseStatus(str) 11657 if !e.IsValid() { 11658 return fmt.Errorf("%s is not a valid AppPurchaseStatus", str) 11659 } 11660 return nil 11661 } 11662 11663 func (e AppPurchaseStatus) MarshalGQL(w io.Writer) { 11664 fmt.Fprint(w, strconv.Quote(e.String())) 11665 } 11666 11667 // The set of valid sort keys for the AppSubscription query. 11668 type AppSubscriptionSortKeys string 11669 11670 const ( 11671 // Sort by the `created_at` value. 11672 AppSubscriptionSortKeysCreatedAt AppSubscriptionSortKeys = "CREATED_AT" 11673 // Sort by the `id` value. 11674 AppSubscriptionSortKeysID AppSubscriptionSortKeys = "ID" 11675 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 11676 // results by relevance to the search term(s). When no search query is specified, this sort key is not 11677 // deterministic and should not be used. 11678 AppSubscriptionSortKeysRelevance AppSubscriptionSortKeys = "RELEVANCE" 11679 ) 11680 11681 var AllAppSubscriptionSortKeys = []AppSubscriptionSortKeys{ 11682 AppSubscriptionSortKeysCreatedAt, 11683 AppSubscriptionSortKeysID, 11684 AppSubscriptionSortKeysRelevance, 11685 } 11686 11687 func (e AppSubscriptionSortKeys) IsValid() bool { 11688 switch e { 11689 case AppSubscriptionSortKeysCreatedAt, AppSubscriptionSortKeysID, AppSubscriptionSortKeysRelevance: 11690 return true 11691 } 11692 return false 11693 } 11694 11695 func (e AppSubscriptionSortKeys) String() string { 11696 return string(e) 11697 } 11698 11699 func (e *AppSubscriptionSortKeys) UnmarshalGQL(v interface{}) error { 11700 str, ok := v.(string) 11701 if !ok { 11702 return fmt.Errorf("enums must be strings") 11703 } 11704 11705 *e = AppSubscriptionSortKeys(str) 11706 if !e.IsValid() { 11707 return fmt.Errorf("%s is not a valid AppSubscriptionSortKeys", str) 11708 } 11709 return nil 11710 } 11711 11712 func (e AppSubscriptionSortKeys) MarshalGQL(w io.Writer) { 11713 fmt.Fprint(w, strconv.Quote(e.String())) 11714 } 11715 11716 // The status of the app subscription. 11717 type AppSubscriptionStatus string 11718 11719 const ( 11720 // The app subscription is pending approval by the merchant. 11721 AppSubscriptionStatusPending AppSubscriptionStatus = "PENDING" 11722 // The app subscription has been approved by the merchant and is ready to be activated by the app. App subscriptions created through the GraphQL Admin API are activated upon approval. 11723 AppSubscriptionStatusAccepted AppSubscriptionStatus = "ACCEPTED" 11724 // The app subscription has been activated by the app. Active app subscriptions are charged to the store and partners recieve payouts for active app subscriptions. 11725 AppSubscriptionStatusActive AppSubscriptionStatus = "ACTIVE" 11726 // The app subscription was declined by the merchant. 11727 AppSubscriptionStatusDeclined AppSubscriptionStatus = "DECLINED" 11728 // The app subscription was not accepted within 2 days of being created. 11729 AppSubscriptionStatusExpired AppSubscriptionStatus = "EXPIRED" 11730 // The app subscription is on hold due to a store subscription non-payment. The charge will re-activate once subscription payments resume. 11731 AppSubscriptionStatusFrozen AppSubscriptionStatus = "FROZEN" 11732 // The app subscription was cancelled by the app. 11733 AppSubscriptionStatusCancelled AppSubscriptionStatus = "CANCELLED" 11734 ) 11735 11736 var AllAppSubscriptionStatus = []AppSubscriptionStatus{ 11737 AppSubscriptionStatusPending, 11738 AppSubscriptionStatusAccepted, 11739 AppSubscriptionStatusActive, 11740 AppSubscriptionStatusDeclined, 11741 AppSubscriptionStatusExpired, 11742 AppSubscriptionStatusFrozen, 11743 AppSubscriptionStatusCancelled, 11744 } 11745 11746 func (e AppSubscriptionStatus) IsValid() bool { 11747 switch e { 11748 case AppSubscriptionStatusPending, AppSubscriptionStatusAccepted, AppSubscriptionStatusActive, AppSubscriptionStatusDeclined, AppSubscriptionStatusExpired, AppSubscriptionStatusFrozen, AppSubscriptionStatusCancelled: 11749 return true 11750 } 11751 return false 11752 } 11753 11754 func (e AppSubscriptionStatus) String() string { 11755 return string(e) 11756 } 11757 11758 func (e *AppSubscriptionStatus) UnmarshalGQL(v interface{}) error { 11759 str, ok := v.(string) 11760 if !ok { 11761 return fmt.Errorf("enums must be strings") 11762 } 11763 11764 *e = AppSubscriptionStatus(str) 11765 if !e.IsValid() { 11766 return fmt.Errorf("%s is not a valid AppSubscriptionStatus", str) 11767 } 11768 return nil 11769 } 11770 11771 func (e AppSubscriptionStatus) MarshalGQL(w io.Writer) { 11772 fmt.Fprint(w, strconv.Quote(e.String())) 11773 } 11774 11775 // The set of valid sort keys for the AppTransaction query. 11776 type AppTransactionSortKeys string 11777 11778 const ( 11779 // Sort by the `created_at` value. 11780 AppTransactionSortKeysCreatedAt AppTransactionSortKeys = "CREATED_AT" 11781 // Sort by the `id` value. 11782 AppTransactionSortKeysID AppTransactionSortKeys = "ID" 11783 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 11784 // results by relevance to the search term(s). When no search query is specified, this sort key is not 11785 // deterministic and should not be used. 11786 AppTransactionSortKeysRelevance AppTransactionSortKeys = "RELEVANCE" 11787 ) 11788 11789 var AllAppTransactionSortKeys = []AppTransactionSortKeys{ 11790 AppTransactionSortKeysCreatedAt, 11791 AppTransactionSortKeysID, 11792 AppTransactionSortKeysRelevance, 11793 } 11794 11795 func (e AppTransactionSortKeys) IsValid() bool { 11796 switch e { 11797 case AppTransactionSortKeysCreatedAt, AppTransactionSortKeysID, AppTransactionSortKeysRelevance: 11798 return true 11799 } 11800 return false 11801 } 11802 11803 func (e AppTransactionSortKeys) String() string { 11804 return string(e) 11805 } 11806 11807 func (e *AppTransactionSortKeys) UnmarshalGQL(v interface{}) error { 11808 str, ok := v.(string) 11809 if !ok { 11810 return fmt.Errorf("enums must be strings") 11811 } 11812 11813 *e = AppTransactionSortKeys(str) 11814 if !e.IsValid() { 11815 return fmt.Errorf("%s is not a valid AppTransactionSortKeys", str) 11816 } 11817 return nil 11818 } 11819 11820 func (e AppTransactionSortKeys) MarshalGQL(w io.Writer) { 11821 fmt.Fprint(w, strconv.Quote(e.String())) 11822 } 11823 11824 // The set of valid sort keys for the AppUsageRecord query. 11825 type AppUsageRecordSortKeys string 11826 11827 const ( 11828 // Sort by the `created_at` value. 11829 AppUsageRecordSortKeysCreatedAt AppUsageRecordSortKeys = "CREATED_AT" 11830 // Sort by the `id` value. 11831 AppUsageRecordSortKeysID AppUsageRecordSortKeys = "ID" 11832 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 11833 // results by relevance to the search term(s). When no search query is specified, this sort key is not 11834 // deterministic and should not be used. 11835 AppUsageRecordSortKeysRelevance AppUsageRecordSortKeys = "RELEVANCE" 11836 ) 11837 11838 var AllAppUsageRecordSortKeys = []AppUsageRecordSortKeys{ 11839 AppUsageRecordSortKeysCreatedAt, 11840 AppUsageRecordSortKeysID, 11841 AppUsageRecordSortKeysRelevance, 11842 } 11843 11844 func (e AppUsageRecordSortKeys) IsValid() bool { 11845 switch e { 11846 case AppUsageRecordSortKeysCreatedAt, AppUsageRecordSortKeysID, AppUsageRecordSortKeysRelevance: 11847 return true 11848 } 11849 return false 11850 } 11851 11852 func (e AppUsageRecordSortKeys) String() string { 11853 return string(e) 11854 } 11855 11856 func (e *AppUsageRecordSortKeys) UnmarshalGQL(v interface{}) error { 11857 str, ok := v.(string) 11858 if !ok { 11859 return fmt.Errorf("enums must be strings") 11860 } 11861 11862 *e = AppUsageRecordSortKeys(str) 11863 if !e.IsValid() { 11864 return fmt.Errorf("%s is not a valid AppUsageRecordSortKeys", str) 11865 } 11866 return nil 11867 } 11868 11869 func (e AppUsageRecordSortKeys) MarshalGQL(w io.Writer) { 11870 fmt.Fprint(w, strconv.Quote(e.String())) 11871 } 11872 11873 // The set of valid sort keys for the AutomaticDiscount query. 11874 type AutomaticDiscountSortKeys string 11875 11876 const ( 11877 // Sort by the `created_at` value. 11878 AutomaticDiscountSortKeysCreatedAt AutomaticDiscountSortKeys = "CREATED_AT" 11879 // Sort by the `id` value. 11880 AutomaticDiscountSortKeysID AutomaticDiscountSortKeys = "ID" 11881 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 11882 // results by relevance to the search term(s). When no search query is specified, this sort key is not 11883 // deterministic and should not be used. 11884 AutomaticDiscountSortKeysRelevance AutomaticDiscountSortKeys = "RELEVANCE" 11885 ) 11886 11887 var AllAutomaticDiscountSortKeys = []AutomaticDiscountSortKeys{ 11888 AutomaticDiscountSortKeysCreatedAt, 11889 AutomaticDiscountSortKeysID, 11890 AutomaticDiscountSortKeysRelevance, 11891 } 11892 11893 func (e AutomaticDiscountSortKeys) IsValid() bool { 11894 switch e { 11895 case AutomaticDiscountSortKeysCreatedAt, AutomaticDiscountSortKeysID, AutomaticDiscountSortKeysRelevance: 11896 return true 11897 } 11898 return false 11899 } 11900 11901 func (e AutomaticDiscountSortKeys) String() string { 11902 return string(e) 11903 } 11904 11905 func (e *AutomaticDiscountSortKeys) UnmarshalGQL(v interface{}) error { 11906 str, ok := v.(string) 11907 if !ok { 11908 return fmt.Errorf("enums must be strings") 11909 } 11910 11911 *e = AutomaticDiscountSortKeys(str) 11912 if !e.IsValid() { 11913 return fmt.Errorf("%s is not a valid AutomaticDiscountSortKeys", str) 11914 } 11915 return nil 11916 } 11917 11918 func (e AutomaticDiscountSortKeys) MarshalGQL(w io.Writer) { 11919 fmt.Fprint(w, strconv.Quote(e.String())) 11920 } 11921 11922 // Possible error codes that could be returned by BillingAttemptUserError. 11923 type BillingAttemptUserErrorCode string 11924 11925 const ( 11926 // Input value is invalid. 11927 BillingAttemptUserErrorCodeInvalid BillingAttemptUserErrorCode = "INVALID" 11928 // Input value is blank. 11929 BillingAttemptUserErrorCodeBlank BillingAttemptUserErrorCode = "BLANK" 11930 // Subscription contract does not exist. 11931 BillingAttemptUserErrorCodeContractNotFound BillingAttemptUserErrorCode = "CONTRACT_NOT_FOUND" 11932 ) 11933 11934 var AllBillingAttemptUserErrorCode = []BillingAttemptUserErrorCode{ 11935 BillingAttemptUserErrorCodeInvalid, 11936 BillingAttemptUserErrorCodeBlank, 11937 BillingAttemptUserErrorCodeContractNotFound, 11938 } 11939 11940 func (e BillingAttemptUserErrorCode) IsValid() bool { 11941 switch e { 11942 case BillingAttemptUserErrorCodeInvalid, BillingAttemptUserErrorCodeBlank, BillingAttemptUserErrorCodeContractNotFound: 11943 return true 11944 } 11945 return false 11946 } 11947 11948 func (e BillingAttemptUserErrorCode) String() string { 11949 return string(e) 11950 } 11951 11952 func (e *BillingAttemptUserErrorCode) UnmarshalGQL(v interface{}) error { 11953 str, ok := v.(string) 11954 if !ok { 11955 return fmt.Errorf("enums must be strings") 11956 } 11957 11958 *e = BillingAttemptUserErrorCode(str) 11959 if !e.IsValid() { 11960 return fmt.Errorf("%s is not a valid BillingAttemptUserErrorCode", str) 11961 } 11962 return nil 11963 } 11964 11965 func (e BillingAttemptUserErrorCode) MarshalGQL(w io.Writer) { 11966 fmt.Fprint(w, strconv.Quote(e.String())) 11967 } 11968 11969 // Error codes for failed bulk operations. 11970 type BulkOperationErrorCode string 11971 11972 const ( 11973 // The provided operation `query` returned access denied due to missing 11974 // [access scopes](https://help.shopify.com/api/getting-started/authentication/oauth/scopes). 11975 // Review the requested object permissions and execute the query as a normal non-bulk GraphQL request to see more details. 11976 BulkOperationErrorCodeAccessDenied BulkOperationErrorCode = "ACCESS_DENIED" 11977 // Operation resulted in partial or incomplete data due to internal server errors during execution. 11978 BulkOperationErrorCodeInternalServerError BulkOperationErrorCode = "INTERNAL_SERVER_ERROR" 11979 // Operation resulted in partial or incomplete data due to query timeouts during execution. 11980 // In some cases, timeouts can be avoided by modifying your `query` to select fewer fields. 11981 BulkOperationErrorCodeTimeout BulkOperationErrorCode = "TIMEOUT" 11982 ) 11983 11984 var AllBulkOperationErrorCode = []BulkOperationErrorCode{ 11985 BulkOperationErrorCodeAccessDenied, 11986 BulkOperationErrorCodeInternalServerError, 11987 BulkOperationErrorCodeTimeout, 11988 } 11989 11990 func (e BulkOperationErrorCode) IsValid() bool { 11991 switch e { 11992 case BulkOperationErrorCodeAccessDenied, BulkOperationErrorCodeInternalServerError, BulkOperationErrorCodeTimeout: 11993 return true 11994 } 11995 return false 11996 } 11997 11998 func (e BulkOperationErrorCode) String() string { 11999 return string(e) 12000 } 12001 12002 func (e *BulkOperationErrorCode) UnmarshalGQL(v interface{}) error { 12003 str, ok := v.(string) 12004 if !ok { 12005 return fmt.Errorf("enums must be strings") 12006 } 12007 12008 *e = BulkOperationErrorCode(str) 12009 if !e.IsValid() { 12010 return fmt.Errorf("%s is not a valid BulkOperationErrorCode", str) 12011 } 12012 return nil 12013 } 12014 12015 func (e BulkOperationErrorCode) MarshalGQL(w io.Writer) { 12016 fmt.Fprint(w, strconv.Quote(e.String())) 12017 } 12018 12019 // Statuses of a bulk operation. 12020 type BulkOperationStatus string 12021 12022 const ( 12023 // Operation created. 12024 BulkOperationStatusCreated BulkOperationStatus = "CREATED" 12025 // Operation running. 12026 BulkOperationStatusRunning BulkOperationStatus = "RUNNING" 12027 // Operation completed. 12028 BulkOperationStatusCompleted BulkOperationStatus = "COMPLETED" 12029 // Operation canceling. 12030 BulkOperationStatusCanceling BulkOperationStatus = "CANCELING" 12031 // Operation canceled. 12032 BulkOperationStatusCanceled BulkOperationStatus = "CANCELED" 12033 // Operation failed. 12034 BulkOperationStatusFailed BulkOperationStatus = "FAILED" 12035 // Operation URL has expired. 12036 BulkOperationStatusExpired BulkOperationStatus = "EXPIRED" 12037 ) 12038 12039 var AllBulkOperationStatus = []BulkOperationStatus{ 12040 BulkOperationStatusCreated, 12041 BulkOperationStatusRunning, 12042 BulkOperationStatusCompleted, 12043 BulkOperationStatusCanceling, 12044 BulkOperationStatusCanceled, 12045 BulkOperationStatusFailed, 12046 BulkOperationStatusExpired, 12047 } 12048 12049 func (e BulkOperationStatus) IsValid() bool { 12050 switch e { 12051 case BulkOperationStatusCreated, BulkOperationStatusRunning, BulkOperationStatusCompleted, BulkOperationStatusCanceling, BulkOperationStatusCanceled, BulkOperationStatusFailed, BulkOperationStatusExpired: 12052 return true 12053 } 12054 return false 12055 } 12056 12057 func (e BulkOperationStatus) String() string { 12058 return string(e) 12059 } 12060 12061 func (e *BulkOperationStatus) UnmarshalGQL(v interface{}) error { 12062 str, ok := v.(string) 12063 if !ok { 12064 return fmt.Errorf("enums must be strings") 12065 } 12066 12067 *e = BulkOperationStatus(str) 12068 if !e.IsValid() { 12069 return fmt.Errorf("%s is not a valid BulkOperationStatus", str) 12070 } 12071 return nil 12072 } 12073 12074 func (e BulkOperationStatus) MarshalGQL(w io.Writer) { 12075 fmt.Fprint(w, strconv.Quote(e.String())) 12076 } 12077 12078 // The set of valid sort keys for the CodeDiscount query. 12079 type CodeDiscountSortKeys string 12080 12081 const ( 12082 // Sort by the `starts_at` value. 12083 CodeDiscountSortKeysStartsAt CodeDiscountSortKeys = "STARTS_AT" 12084 // Sort by the `ends_at` value. 12085 CodeDiscountSortKeysEndsAt CodeDiscountSortKeys = "ENDS_AT" 12086 // Sort by the `title` value. 12087 CodeDiscountSortKeysTitle CodeDiscountSortKeys = "TITLE" 12088 // Sort by the `created_at` value. 12089 CodeDiscountSortKeysCreatedAt CodeDiscountSortKeys = "CREATED_AT" 12090 // Sort by the `updated_at` value. 12091 CodeDiscountSortKeysUpdatedAt CodeDiscountSortKeys = "UPDATED_AT" 12092 // Sort by the `id` value. 12093 CodeDiscountSortKeysID CodeDiscountSortKeys = "ID" 12094 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 12095 // results by relevance to the search term(s). When no search query is specified, this sort key is not 12096 // deterministic and should not be used. 12097 CodeDiscountSortKeysRelevance CodeDiscountSortKeys = "RELEVANCE" 12098 ) 12099 12100 var AllCodeDiscountSortKeys = []CodeDiscountSortKeys{ 12101 CodeDiscountSortKeysStartsAt, 12102 CodeDiscountSortKeysEndsAt, 12103 CodeDiscountSortKeysTitle, 12104 CodeDiscountSortKeysCreatedAt, 12105 CodeDiscountSortKeysUpdatedAt, 12106 CodeDiscountSortKeysID, 12107 CodeDiscountSortKeysRelevance, 12108 } 12109 12110 func (e CodeDiscountSortKeys) IsValid() bool { 12111 switch e { 12112 case CodeDiscountSortKeysStartsAt, CodeDiscountSortKeysEndsAt, CodeDiscountSortKeysTitle, CodeDiscountSortKeysCreatedAt, CodeDiscountSortKeysUpdatedAt, CodeDiscountSortKeysID, CodeDiscountSortKeysRelevance: 12113 return true 12114 } 12115 return false 12116 } 12117 12118 func (e CodeDiscountSortKeys) String() string { 12119 return string(e) 12120 } 12121 12122 func (e *CodeDiscountSortKeys) UnmarshalGQL(v interface{}) error { 12123 str, ok := v.(string) 12124 if !ok { 12125 return fmt.Errorf("enums must be strings") 12126 } 12127 12128 *e = CodeDiscountSortKeys(str) 12129 if !e.IsValid() { 12130 return fmt.Errorf("%s is not a valid CodeDiscountSortKeys", str) 12131 } 12132 return nil 12133 } 12134 12135 func (e CodeDiscountSortKeys) MarshalGQL(w io.Writer) { 12136 fmt.Fprint(w, strconv.Quote(e.String())) 12137 } 12138 12139 // Specifies the property of a product being used to populate the smart collection. 12140 type CollectionRuleColumn string 12141 12142 const ( 12143 // The `tag` attribute. 12144 CollectionRuleColumnTag CollectionRuleColumn = "TAG" 12145 // The `title` attribute. 12146 CollectionRuleColumnTitle CollectionRuleColumn = "TITLE" 12147 // The `type` attribute. 12148 CollectionRuleColumnType CollectionRuleColumn = "TYPE" 12149 // The `vendor` attribute. 12150 CollectionRuleColumnVendor CollectionRuleColumn = "VENDOR" 12151 // The `variant_price` attribute. 12152 CollectionRuleColumnVariantPrice CollectionRuleColumn = "VARIANT_PRICE" 12153 // The `is_price_reduced` attribute. 12154 CollectionRuleColumnIsPriceReduced CollectionRuleColumn = "IS_PRICE_REDUCED" 12155 // The `variant_compare_at_price` attribute. 12156 CollectionRuleColumnVariantCompareAtPrice CollectionRuleColumn = "VARIANT_COMPARE_AT_PRICE" 12157 // The `variant_weight` attribute. 12158 CollectionRuleColumnVariantWeight CollectionRuleColumn = "VARIANT_WEIGHT" 12159 // The `variant_inventory` attribute. 12160 CollectionRuleColumnVariantInventory CollectionRuleColumn = "VARIANT_INVENTORY" 12161 // The `variant_title` attribute. 12162 CollectionRuleColumnVariantTitle CollectionRuleColumn = "VARIANT_TITLE" 12163 ) 12164 12165 var AllCollectionRuleColumn = []CollectionRuleColumn{ 12166 CollectionRuleColumnTag, 12167 CollectionRuleColumnTitle, 12168 CollectionRuleColumnType, 12169 CollectionRuleColumnVendor, 12170 CollectionRuleColumnVariantPrice, 12171 CollectionRuleColumnIsPriceReduced, 12172 CollectionRuleColumnVariantCompareAtPrice, 12173 CollectionRuleColumnVariantWeight, 12174 CollectionRuleColumnVariantInventory, 12175 CollectionRuleColumnVariantTitle, 12176 } 12177 12178 func (e CollectionRuleColumn) IsValid() bool { 12179 switch e { 12180 case CollectionRuleColumnTag, CollectionRuleColumnTitle, CollectionRuleColumnType, CollectionRuleColumnVendor, CollectionRuleColumnVariantPrice, CollectionRuleColumnIsPriceReduced, CollectionRuleColumnVariantCompareAtPrice, CollectionRuleColumnVariantWeight, CollectionRuleColumnVariantInventory, CollectionRuleColumnVariantTitle: 12181 return true 12182 } 12183 return false 12184 } 12185 12186 func (e CollectionRuleColumn) String() string { 12187 return string(e) 12188 } 12189 12190 func (e *CollectionRuleColumn) UnmarshalGQL(v interface{}) error { 12191 str, ok := v.(string) 12192 if !ok { 12193 return fmt.Errorf("enums must be strings") 12194 } 12195 12196 *e = CollectionRuleColumn(str) 12197 if !e.IsValid() { 12198 return fmt.Errorf("%s is not a valid CollectionRuleColumn", str) 12199 } 12200 return nil 12201 } 12202 12203 func (e CollectionRuleColumn) MarshalGQL(w io.Writer) { 12204 fmt.Fprint(w, strconv.Quote(e.String())) 12205 } 12206 12207 // Specifies the relationship between the `column` and the condition. 12208 type CollectionRuleRelation string 12209 12210 const ( 12211 // The attribute contains the condition. 12212 CollectionRuleRelationContains CollectionRuleRelation = "CONTAINS" 12213 // The attribute ends with the condition. 12214 CollectionRuleRelationEndsWith CollectionRuleRelation = "ENDS_WITH" 12215 // The attribute is equal to the condition. 12216 CollectionRuleRelationEquals CollectionRuleRelation = "EQUALS" 12217 // The attribute is greater than the condition. 12218 CollectionRuleRelationGreaterThan CollectionRuleRelation = "GREATER_THAN" 12219 // The attribute is not set. 12220 CollectionRuleRelationIsNotSet CollectionRuleRelation = "IS_NOT_SET" 12221 // The attribute is set. 12222 CollectionRuleRelationIsSet CollectionRuleRelation = "IS_SET" 12223 // The attribute is less than the condition. 12224 CollectionRuleRelationLessThan CollectionRuleRelation = "LESS_THAN" 12225 // The attribute does not contain the condition. 12226 CollectionRuleRelationNotContains CollectionRuleRelation = "NOT_CONTAINS" 12227 // The attribute does not equal the condition. 12228 CollectionRuleRelationNotEquals CollectionRuleRelation = "NOT_EQUALS" 12229 // The attribute starts with the condition. 12230 CollectionRuleRelationStartsWith CollectionRuleRelation = "STARTS_WITH" 12231 ) 12232 12233 var AllCollectionRuleRelation = []CollectionRuleRelation{ 12234 CollectionRuleRelationContains, 12235 CollectionRuleRelationEndsWith, 12236 CollectionRuleRelationEquals, 12237 CollectionRuleRelationGreaterThan, 12238 CollectionRuleRelationIsNotSet, 12239 CollectionRuleRelationIsSet, 12240 CollectionRuleRelationLessThan, 12241 CollectionRuleRelationNotContains, 12242 CollectionRuleRelationNotEquals, 12243 CollectionRuleRelationStartsWith, 12244 } 12245 12246 func (e CollectionRuleRelation) IsValid() bool { 12247 switch e { 12248 case CollectionRuleRelationContains, CollectionRuleRelationEndsWith, CollectionRuleRelationEquals, CollectionRuleRelationGreaterThan, CollectionRuleRelationIsNotSet, CollectionRuleRelationIsSet, CollectionRuleRelationLessThan, CollectionRuleRelationNotContains, CollectionRuleRelationNotEquals, CollectionRuleRelationStartsWith: 12249 return true 12250 } 12251 return false 12252 } 12253 12254 func (e CollectionRuleRelation) String() string { 12255 return string(e) 12256 } 12257 12258 func (e *CollectionRuleRelation) UnmarshalGQL(v interface{}) error { 12259 str, ok := v.(string) 12260 if !ok { 12261 return fmt.Errorf("enums must be strings") 12262 } 12263 12264 *e = CollectionRuleRelation(str) 12265 if !e.IsValid() { 12266 return fmt.Errorf("%s is not a valid CollectionRuleRelation", str) 12267 } 12268 return nil 12269 } 12270 12271 func (e CollectionRuleRelation) MarshalGQL(w io.Writer) { 12272 fmt.Fprint(w, strconv.Quote(e.String())) 12273 } 12274 12275 // The set of valid sort keys for the Collection query. 12276 type CollectionSortKeys string 12277 12278 const ( 12279 // Sort by the `title` value. 12280 CollectionSortKeysTitle CollectionSortKeys = "TITLE" 12281 // Sort by the `updated_at` value. 12282 CollectionSortKeysUpdatedAt CollectionSortKeys = "UPDATED_AT" 12283 // Sort by the `id` value. 12284 CollectionSortKeysID CollectionSortKeys = "ID" 12285 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 12286 // results by relevance to the search term(s). When no search query is specified, this sort key is not 12287 // deterministic and should not be used. 12288 CollectionSortKeysRelevance CollectionSortKeys = "RELEVANCE" 12289 ) 12290 12291 var AllCollectionSortKeys = []CollectionSortKeys{ 12292 CollectionSortKeysTitle, 12293 CollectionSortKeysUpdatedAt, 12294 CollectionSortKeysID, 12295 CollectionSortKeysRelevance, 12296 } 12297 12298 func (e CollectionSortKeys) IsValid() bool { 12299 switch e { 12300 case CollectionSortKeysTitle, CollectionSortKeysUpdatedAt, CollectionSortKeysID, CollectionSortKeysRelevance: 12301 return true 12302 } 12303 return false 12304 } 12305 12306 func (e CollectionSortKeys) String() string { 12307 return string(e) 12308 } 12309 12310 func (e *CollectionSortKeys) UnmarshalGQL(v interface{}) error { 12311 str, ok := v.(string) 12312 if !ok { 12313 return fmt.Errorf("enums must be strings") 12314 } 12315 12316 *e = CollectionSortKeys(str) 12317 if !e.IsValid() { 12318 return fmt.Errorf("%s is not a valid CollectionSortKeys", str) 12319 } 12320 return nil 12321 } 12322 12323 func (e CollectionSortKeys) MarshalGQL(w io.Writer) { 12324 fmt.Fprint(w, strconv.Quote(e.String())) 12325 } 12326 12327 // Specifies the sort order for the products in the collection. 12328 type CollectionSortOrder string 12329 12330 const ( 12331 // Alphabetically, in ascending order (A - Z). 12332 CollectionSortOrderAlphaAsc CollectionSortOrder = "ALPHA_ASC" 12333 // Alphabetically, in descending order (Z - A). 12334 CollectionSortOrderAlphaDesc CollectionSortOrder = "ALPHA_DESC" 12335 // By best-selling products. 12336 CollectionSortOrderBestSelling CollectionSortOrder = "BEST_SELLING" 12337 // By date created, in ascending order (oldest - newest). 12338 CollectionSortOrderCreated CollectionSortOrder = "CREATED" 12339 // By date created, in descending order (newest - oldest). 12340 CollectionSortOrderCreatedDesc CollectionSortOrder = "CREATED_DESC" 12341 // In the order set manually by the merchant. 12342 CollectionSortOrderManual CollectionSortOrder = "MANUAL" 12343 // By price, in ascending order (lowest - highest). 12344 CollectionSortOrderPriceAsc CollectionSortOrder = "PRICE_ASC" 12345 // By price, in descending order (highest - lowest). 12346 CollectionSortOrderPriceDesc CollectionSortOrder = "PRICE_DESC" 12347 ) 12348 12349 var AllCollectionSortOrder = []CollectionSortOrder{ 12350 CollectionSortOrderAlphaAsc, 12351 CollectionSortOrderAlphaDesc, 12352 CollectionSortOrderBestSelling, 12353 CollectionSortOrderCreated, 12354 CollectionSortOrderCreatedDesc, 12355 CollectionSortOrderManual, 12356 CollectionSortOrderPriceAsc, 12357 CollectionSortOrderPriceDesc, 12358 } 12359 12360 func (e CollectionSortOrder) IsValid() bool { 12361 switch e { 12362 case CollectionSortOrderAlphaAsc, CollectionSortOrderAlphaDesc, CollectionSortOrderBestSelling, CollectionSortOrderCreated, CollectionSortOrderCreatedDesc, CollectionSortOrderManual, CollectionSortOrderPriceAsc, CollectionSortOrderPriceDesc: 12363 return true 12364 } 12365 return false 12366 } 12367 12368 func (e CollectionSortOrder) String() string { 12369 return string(e) 12370 } 12371 12372 func (e *CollectionSortOrder) UnmarshalGQL(v interface{}) error { 12373 str, ok := v.(string) 12374 if !ok { 12375 return fmt.Errorf("enums must be strings") 12376 } 12377 12378 *e = CollectionSortOrder(str) 12379 if !e.IsValid() { 12380 return fmt.Errorf("%s is not a valid CollectionSortOrder", str) 12381 } 12382 return nil 12383 } 12384 12385 func (e CollectionSortOrder) MarshalGQL(w io.Writer) { 12386 fmt.Fprint(w, strconv.Quote(e.String())) 12387 } 12388 12389 // ISO 3166-1 alpha-2 country codes with some differences. 12390 type CountryCode string 12391 12392 const ( 12393 // Afghanistan. 12394 CountryCodeAf CountryCode = "AF" 12395 // Ã…land Islands. 12396 CountryCodeAx CountryCode = "AX" 12397 // Albania. 12398 CountryCodeAl CountryCode = "AL" 12399 // Algeria. 12400 CountryCodeDz CountryCode = "DZ" 12401 // Andorra. 12402 CountryCodeAd CountryCode = "AD" 12403 // Angola. 12404 CountryCodeAo CountryCode = "AO" 12405 // Anguilla. 12406 CountryCodeAi CountryCode = "AI" 12407 // Antigua & Barbuda. 12408 CountryCodeAg CountryCode = "AG" 12409 // Argentina. 12410 CountryCodeAr CountryCode = "AR" 12411 // Armenia. 12412 CountryCodeAm CountryCode = "AM" 12413 // Aruba. 12414 CountryCodeAw CountryCode = "AW" 12415 // Ascension Island. 12416 CountryCodeAc CountryCode = "AC" 12417 // Australia. 12418 CountryCodeAu CountryCode = "AU" 12419 // Austria. 12420 CountryCodeAt CountryCode = "AT" 12421 // Azerbaijan. 12422 CountryCodeAz CountryCode = "AZ" 12423 // Bahamas. 12424 CountryCodeBs CountryCode = "BS" 12425 // Bahrain. 12426 CountryCodeBh CountryCode = "BH" 12427 // Bangladesh. 12428 CountryCodeBd CountryCode = "BD" 12429 // Barbados. 12430 CountryCodeBb CountryCode = "BB" 12431 // Belarus. 12432 CountryCodeBy CountryCode = "BY" 12433 // Belgium. 12434 CountryCodeBe CountryCode = "BE" 12435 // Belize. 12436 CountryCodeBz CountryCode = "BZ" 12437 // Benin. 12438 CountryCodeBj CountryCode = "BJ" 12439 // Bermuda. 12440 CountryCodeBm CountryCode = "BM" 12441 // Bhutan. 12442 CountryCodeBt CountryCode = "BT" 12443 // Bolivia. 12444 CountryCodeBo CountryCode = "BO" 12445 // Bosnia & Herzegovina. 12446 CountryCodeBa CountryCode = "BA" 12447 // Botswana. 12448 CountryCodeBw CountryCode = "BW" 12449 // Bouvet Island. 12450 CountryCodeBv CountryCode = "BV" 12451 // Brazil. 12452 CountryCodeBr CountryCode = "BR" 12453 // British Indian Ocean Territory. 12454 CountryCodeIo CountryCode = "IO" 12455 // Brunei. 12456 CountryCodeBn CountryCode = "BN" 12457 // Bulgaria. 12458 CountryCodeBg CountryCode = "BG" 12459 // Burkina Faso. 12460 CountryCodeBf CountryCode = "BF" 12461 // Burundi. 12462 CountryCodeBi CountryCode = "BI" 12463 // Cambodia. 12464 CountryCodeKh CountryCode = "KH" 12465 // Canada. 12466 CountryCodeCa CountryCode = "CA" 12467 // Cape Verde. 12468 CountryCodeCv CountryCode = "CV" 12469 // Caribbean Netherlands. 12470 CountryCodeBq CountryCode = "BQ" 12471 // Cayman Islands. 12472 CountryCodeKy CountryCode = "KY" 12473 // Central African Republic. 12474 CountryCodeCf CountryCode = "CF" 12475 // Chad. 12476 CountryCodeTd CountryCode = "TD" 12477 // Chile. 12478 CountryCodeCl CountryCode = "CL" 12479 // China. 12480 CountryCodeCn CountryCode = "CN" 12481 // Christmas Island. 12482 CountryCodeCx CountryCode = "CX" 12483 // Cocos (Keeling) Islands. 12484 CountryCodeCc CountryCode = "CC" 12485 // Colombia. 12486 CountryCodeCo CountryCode = "CO" 12487 // Comoros. 12488 CountryCodeKm CountryCode = "KM" 12489 // Congo - Brazzaville. 12490 CountryCodeCg CountryCode = "CG" 12491 // Congo - Kinshasa. 12492 CountryCodeCd CountryCode = "CD" 12493 // Cook Islands. 12494 CountryCodeCk CountryCode = "CK" 12495 // Costa Rica. 12496 CountryCodeCr CountryCode = "CR" 12497 // Croatia. 12498 CountryCodeHr CountryCode = "HR" 12499 // Cuba. 12500 CountryCodeCu CountryCode = "CU" 12501 // Curaçao. 12502 CountryCodeCw CountryCode = "CW" 12503 // Cyprus. 12504 CountryCodeCy CountryCode = "CY" 12505 // Czechia. 12506 CountryCodeCz CountryCode = "CZ" 12507 // Côte d’Ivoire. 12508 CountryCodeCi CountryCode = "CI" 12509 // Denmark. 12510 CountryCodeDk CountryCode = "DK" 12511 // Djibouti. 12512 CountryCodeDj CountryCode = "DJ" 12513 // Dominica. 12514 CountryCodeDm CountryCode = "DM" 12515 // Dominican Republic. 12516 CountryCodeDo CountryCode = "DO" 12517 // Ecuador. 12518 CountryCodeEc CountryCode = "EC" 12519 // Egypt. 12520 CountryCodeEg CountryCode = "EG" 12521 // El Salvador. 12522 CountryCodeSv CountryCode = "SV" 12523 // Equatorial Guinea. 12524 CountryCodeGq CountryCode = "GQ" 12525 // Eritrea. 12526 CountryCodeEr CountryCode = "ER" 12527 // Estonia. 12528 CountryCodeEe CountryCode = "EE" 12529 // Eswatini. 12530 CountryCodeSz CountryCode = "SZ" 12531 // Ethiopia. 12532 CountryCodeEt CountryCode = "ET" 12533 // Falkland Islands. 12534 CountryCodeFk CountryCode = "FK" 12535 // Faroe Islands. 12536 CountryCodeFo CountryCode = "FO" 12537 // Fiji. 12538 CountryCodeFj CountryCode = "FJ" 12539 // Finland. 12540 CountryCodeFi CountryCode = "FI" 12541 // France. 12542 CountryCodeFr CountryCode = "FR" 12543 // French Guiana. 12544 CountryCodeGf CountryCode = "GF" 12545 // French Polynesia. 12546 CountryCodePf CountryCode = "PF" 12547 // French Southern Territories. 12548 CountryCodeTf CountryCode = "TF" 12549 // Gabon. 12550 CountryCodeGa CountryCode = "GA" 12551 // Gambia. 12552 CountryCodeGm CountryCode = "GM" 12553 // Georgia. 12554 CountryCodeGe CountryCode = "GE" 12555 // Germany. 12556 CountryCodeDe CountryCode = "DE" 12557 // Ghana. 12558 CountryCodeGh CountryCode = "GH" 12559 // Gibraltar. 12560 CountryCodeGi CountryCode = "GI" 12561 // Greece. 12562 CountryCodeGr CountryCode = "GR" 12563 // Greenland. 12564 CountryCodeGl CountryCode = "GL" 12565 // Grenada. 12566 CountryCodeGd CountryCode = "GD" 12567 // Guadeloupe. 12568 CountryCodeGp CountryCode = "GP" 12569 // Guatemala. 12570 CountryCodeGt CountryCode = "GT" 12571 // Guernsey. 12572 CountryCodeGg CountryCode = "GG" 12573 // Guinea. 12574 CountryCodeGn CountryCode = "GN" 12575 // Guinea-Bissau. 12576 CountryCodeGw CountryCode = "GW" 12577 // Guyana. 12578 CountryCodeGy CountryCode = "GY" 12579 // Haiti. 12580 CountryCodeHt CountryCode = "HT" 12581 // Heard & McDonald Islands. 12582 CountryCodeHm CountryCode = "HM" 12583 // Vatican City. 12584 CountryCodeVa CountryCode = "VA" 12585 // Honduras. 12586 CountryCodeHn CountryCode = "HN" 12587 // Hong Kong SAR. 12588 CountryCodeHk CountryCode = "HK" 12589 // Hungary. 12590 CountryCodeHu CountryCode = "HU" 12591 // Iceland. 12592 CountryCodeIs CountryCode = "IS" 12593 // India. 12594 CountryCodeIn CountryCode = "IN" 12595 // Indonesia. 12596 CountryCodeID CountryCode = "ID" 12597 // Iran. 12598 CountryCodeIr CountryCode = "IR" 12599 // Iraq. 12600 CountryCodeIq CountryCode = "IQ" 12601 // Ireland. 12602 CountryCodeIe CountryCode = "IE" 12603 // Isle of Man. 12604 CountryCodeIm CountryCode = "IM" 12605 // Israel. 12606 CountryCodeIl CountryCode = "IL" 12607 // Italy. 12608 CountryCodeIt CountryCode = "IT" 12609 // Jamaica. 12610 CountryCodeJm CountryCode = "JM" 12611 // Japan. 12612 CountryCodeJp CountryCode = "JP" 12613 // Jersey. 12614 CountryCodeJe CountryCode = "JE" 12615 // Jordan. 12616 CountryCodeJo CountryCode = "JO" 12617 // Kazakhstan. 12618 CountryCodeKz CountryCode = "KZ" 12619 // Kenya. 12620 CountryCodeKe CountryCode = "KE" 12621 // Kiribati. 12622 CountryCodeKi CountryCode = "KI" 12623 // North Korea. 12624 CountryCodeKp CountryCode = "KP" 12625 // Kosovo. 12626 CountryCodeXk CountryCode = "XK" 12627 // Kuwait. 12628 CountryCodeKw CountryCode = "KW" 12629 // Kyrgyzstan. 12630 CountryCodeKg CountryCode = "KG" 12631 // Laos. 12632 CountryCodeLa CountryCode = "LA" 12633 // Latvia. 12634 CountryCodeLv CountryCode = "LV" 12635 // Lebanon. 12636 CountryCodeLb CountryCode = "LB" 12637 // Lesotho. 12638 CountryCodeLs CountryCode = "LS" 12639 // Liberia. 12640 CountryCodeLr CountryCode = "LR" 12641 // Libya. 12642 CountryCodeLy CountryCode = "LY" 12643 // Liechtenstein. 12644 CountryCodeLi CountryCode = "LI" 12645 // Lithuania. 12646 CountryCodeLt CountryCode = "LT" 12647 // Luxembourg. 12648 CountryCodeLu CountryCode = "LU" 12649 // Macao SAR. 12650 CountryCodeMo CountryCode = "MO" 12651 // Madagascar. 12652 CountryCodeMg CountryCode = "MG" 12653 // Malawi. 12654 CountryCodeMw CountryCode = "MW" 12655 // Malaysia. 12656 CountryCodeMy CountryCode = "MY" 12657 // Maldives. 12658 CountryCodeMv CountryCode = "MV" 12659 // Mali. 12660 CountryCodeMl CountryCode = "ML" 12661 // Malta. 12662 CountryCodeMt CountryCode = "MT" 12663 // Martinique. 12664 CountryCodeMq CountryCode = "MQ" 12665 // Mauritania. 12666 CountryCodeMr CountryCode = "MR" 12667 // Mauritius. 12668 CountryCodeMu CountryCode = "MU" 12669 // Mayotte. 12670 CountryCodeYt CountryCode = "YT" 12671 // Mexico. 12672 CountryCodeMx CountryCode = "MX" 12673 // Moldova. 12674 CountryCodeMd CountryCode = "MD" 12675 // Monaco. 12676 CountryCodeMc CountryCode = "MC" 12677 // Mongolia. 12678 CountryCodeMn CountryCode = "MN" 12679 // Montenegro. 12680 CountryCodeMe CountryCode = "ME" 12681 // Montserrat. 12682 CountryCodeMs CountryCode = "MS" 12683 // Morocco. 12684 CountryCodeMa CountryCode = "MA" 12685 // Mozambique. 12686 CountryCodeMz CountryCode = "MZ" 12687 // Myanmar (Burma). 12688 CountryCodeMm CountryCode = "MM" 12689 // Namibia. 12690 CountryCodeNa CountryCode = "NA" 12691 // Nauru. 12692 CountryCodeNr CountryCode = "NR" 12693 // Nepal. 12694 CountryCodeNp CountryCode = "NP" 12695 // Netherlands. 12696 CountryCodeNl CountryCode = "NL" 12697 // Netherlands Antilles. 12698 CountryCodeAn CountryCode = "AN" 12699 // New Caledonia. 12700 CountryCodeNc CountryCode = "NC" 12701 // New Zealand. 12702 CountryCodeNz CountryCode = "NZ" 12703 // Nicaragua. 12704 CountryCodeNi CountryCode = "NI" 12705 // Niger. 12706 CountryCodeNe CountryCode = "NE" 12707 // Nigeria. 12708 CountryCodeNg CountryCode = "NG" 12709 // Niue. 12710 CountryCodeNu CountryCode = "NU" 12711 // Norfolk Island. 12712 CountryCodeNf CountryCode = "NF" 12713 // North Macedonia. 12714 CountryCodeMk CountryCode = "MK" 12715 // Norway. 12716 CountryCodeNo CountryCode = "NO" 12717 // Oman. 12718 CountryCodeOm CountryCode = "OM" 12719 // Pakistan. 12720 CountryCodePk CountryCode = "PK" 12721 // Palestinian Territories. 12722 CountryCodePs CountryCode = "PS" 12723 // Panama. 12724 CountryCodePa CountryCode = "PA" 12725 // Papua New Guinea. 12726 CountryCodePg CountryCode = "PG" 12727 // Paraguay. 12728 CountryCodePy CountryCode = "PY" 12729 // Peru. 12730 CountryCodePe CountryCode = "PE" 12731 // Philippines. 12732 CountryCodePh CountryCode = "PH" 12733 // Pitcairn Islands. 12734 CountryCodePn CountryCode = "PN" 12735 // Poland. 12736 CountryCodePl CountryCode = "PL" 12737 // Portugal. 12738 CountryCodePt CountryCode = "PT" 12739 // Qatar. 12740 CountryCodeQa CountryCode = "QA" 12741 // Cameroon. 12742 CountryCodeCm CountryCode = "CM" 12743 // Réunion. 12744 CountryCodeRe CountryCode = "RE" 12745 // Romania. 12746 CountryCodeRo CountryCode = "RO" 12747 // Russia. 12748 CountryCodeRu CountryCode = "RU" 12749 // Rwanda. 12750 CountryCodeRw CountryCode = "RW" 12751 // St. Barthélemy. 12752 CountryCodeBl CountryCode = "BL" 12753 // St. Helena. 12754 CountryCodeSh CountryCode = "SH" 12755 // St. Kitts & Nevis. 12756 CountryCodeKn CountryCode = "KN" 12757 // St. Lucia. 12758 CountryCodeLc CountryCode = "LC" 12759 // St. Martin. 12760 CountryCodeMf CountryCode = "MF" 12761 // St. Pierre & Miquelon. 12762 CountryCodePm CountryCode = "PM" 12763 // Samoa. 12764 CountryCodeWs CountryCode = "WS" 12765 // San Marino. 12766 CountryCodeSm CountryCode = "SM" 12767 // São Tomé & PrÃncipe. 12768 CountryCodeSt CountryCode = "ST" 12769 // Saudi Arabia. 12770 CountryCodeSa CountryCode = "SA" 12771 // Senegal. 12772 CountryCodeSn CountryCode = "SN" 12773 // Serbia. 12774 CountryCodeRs CountryCode = "RS" 12775 // Seychelles. 12776 CountryCodeSc CountryCode = "SC" 12777 // Sierra Leone. 12778 CountryCodeSl CountryCode = "SL" 12779 // Singapore. 12780 CountryCodeSg CountryCode = "SG" 12781 // Sint Maarten. 12782 CountryCodeSx CountryCode = "SX" 12783 // Slovakia. 12784 CountryCodeSk CountryCode = "SK" 12785 // Slovenia. 12786 CountryCodeSi CountryCode = "SI" 12787 // Solomon Islands. 12788 CountryCodeSb CountryCode = "SB" 12789 // Somalia. 12790 CountryCodeSo CountryCode = "SO" 12791 // South Africa. 12792 CountryCodeZa CountryCode = "ZA" 12793 // South Georgia & South Sandwich Islands. 12794 CountryCodeGs CountryCode = "GS" 12795 // South Korea. 12796 CountryCodeKr CountryCode = "KR" 12797 // South Sudan. 12798 CountryCodeSs CountryCode = "SS" 12799 // Spain. 12800 CountryCodeEs CountryCode = "ES" 12801 // Sri Lanka. 12802 CountryCodeLk CountryCode = "LK" 12803 // St. Vincent & Grenadines. 12804 CountryCodeVc CountryCode = "VC" 12805 // Sudan. 12806 CountryCodeSd CountryCode = "SD" 12807 // Suriname. 12808 CountryCodeSr CountryCode = "SR" 12809 // Svalbard & Jan Mayen. 12810 CountryCodeSj CountryCode = "SJ" 12811 // Sweden. 12812 CountryCodeSe CountryCode = "SE" 12813 // Switzerland. 12814 CountryCodeCh CountryCode = "CH" 12815 // Syria. 12816 CountryCodeSy CountryCode = "SY" 12817 // Taiwan. 12818 CountryCodeTw CountryCode = "TW" 12819 // Tajikistan. 12820 CountryCodeTj CountryCode = "TJ" 12821 // Tanzania. 12822 CountryCodeTz CountryCode = "TZ" 12823 // Thailand. 12824 CountryCodeTh CountryCode = "TH" 12825 // Timor-Leste. 12826 CountryCodeTl CountryCode = "TL" 12827 // Togo. 12828 CountryCodeTg CountryCode = "TG" 12829 // Tokelau. 12830 CountryCodeTk CountryCode = "TK" 12831 // Tonga. 12832 CountryCodeTo CountryCode = "TO" 12833 // Trinidad & Tobago. 12834 CountryCodeTt CountryCode = "TT" 12835 // Tristan da Cunha. 12836 CountryCodeTa CountryCode = "TA" 12837 // Tunisia. 12838 CountryCodeTn CountryCode = "TN" 12839 // Turkey. 12840 CountryCodeTr CountryCode = "TR" 12841 // Turkmenistan. 12842 CountryCodeTm CountryCode = "TM" 12843 // Turks & Caicos Islands. 12844 CountryCodeTc CountryCode = "TC" 12845 // Tuvalu. 12846 CountryCodeTv CountryCode = "TV" 12847 // Uganda. 12848 CountryCodeUg CountryCode = "UG" 12849 // Ukraine. 12850 CountryCodeUa CountryCode = "UA" 12851 // United Arab Emirates. 12852 CountryCodeAe CountryCode = "AE" 12853 // United Kingdom. 12854 CountryCodeGb CountryCode = "GB" 12855 // United States. 12856 CountryCodeUs CountryCode = "US" 12857 // U.S. Outlying Islands. 12858 CountryCodeUm CountryCode = "UM" 12859 // Uruguay. 12860 CountryCodeUy CountryCode = "UY" 12861 // Uzbekistan. 12862 CountryCodeUz CountryCode = "UZ" 12863 // Vanuatu. 12864 CountryCodeVu CountryCode = "VU" 12865 // Venezuela. 12866 CountryCodeVe CountryCode = "VE" 12867 // Vietnam. 12868 CountryCodeVn CountryCode = "VN" 12869 // British Virgin Islands. 12870 CountryCodeVg CountryCode = "VG" 12871 // Wallis & Futuna. 12872 CountryCodeWf CountryCode = "WF" 12873 // Western Sahara. 12874 CountryCodeEh CountryCode = "EH" 12875 // Yemen. 12876 CountryCodeYe CountryCode = "YE" 12877 // Zambia. 12878 CountryCodeZm CountryCode = "ZM" 12879 // Zimbabwe. 12880 CountryCodeZw CountryCode = "ZW" 12881 ) 12882 12883 var AllCountryCode = []CountryCode{ 12884 CountryCodeAf, 12885 CountryCodeAx, 12886 CountryCodeAl, 12887 CountryCodeDz, 12888 CountryCodeAd, 12889 CountryCodeAo, 12890 CountryCodeAi, 12891 CountryCodeAg, 12892 CountryCodeAr, 12893 CountryCodeAm, 12894 CountryCodeAw, 12895 CountryCodeAc, 12896 CountryCodeAu, 12897 CountryCodeAt, 12898 CountryCodeAz, 12899 CountryCodeBs, 12900 CountryCodeBh, 12901 CountryCodeBd, 12902 CountryCodeBb, 12903 CountryCodeBy, 12904 CountryCodeBe, 12905 CountryCodeBz, 12906 CountryCodeBj, 12907 CountryCodeBm, 12908 CountryCodeBt, 12909 CountryCodeBo, 12910 CountryCodeBa, 12911 CountryCodeBw, 12912 CountryCodeBv, 12913 CountryCodeBr, 12914 CountryCodeIo, 12915 CountryCodeBn, 12916 CountryCodeBg, 12917 CountryCodeBf, 12918 CountryCodeBi, 12919 CountryCodeKh, 12920 CountryCodeCa, 12921 CountryCodeCv, 12922 CountryCodeBq, 12923 CountryCodeKy, 12924 CountryCodeCf, 12925 CountryCodeTd, 12926 CountryCodeCl, 12927 CountryCodeCn, 12928 CountryCodeCx, 12929 CountryCodeCc, 12930 CountryCodeCo, 12931 CountryCodeKm, 12932 CountryCodeCg, 12933 CountryCodeCd, 12934 CountryCodeCk, 12935 CountryCodeCr, 12936 CountryCodeHr, 12937 CountryCodeCu, 12938 CountryCodeCw, 12939 CountryCodeCy, 12940 CountryCodeCz, 12941 CountryCodeCi, 12942 CountryCodeDk, 12943 CountryCodeDj, 12944 CountryCodeDm, 12945 CountryCodeDo, 12946 CountryCodeEc, 12947 CountryCodeEg, 12948 CountryCodeSv, 12949 CountryCodeGq, 12950 CountryCodeEr, 12951 CountryCodeEe, 12952 CountryCodeSz, 12953 CountryCodeEt, 12954 CountryCodeFk, 12955 CountryCodeFo, 12956 CountryCodeFj, 12957 CountryCodeFi, 12958 CountryCodeFr, 12959 CountryCodeGf, 12960 CountryCodePf, 12961 CountryCodeTf, 12962 CountryCodeGa, 12963 CountryCodeGm, 12964 CountryCodeGe, 12965 CountryCodeDe, 12966 CountryCodeGh, 12967 CountryCodeGi, 12968 CountryCodeGr, 12969 CountryCodeGl, 12970 CountryCodeGd, 12971 CountryCodeGp, 12972 CountryCodeGt, 12973 CountryCodeGg, 12974 CountryCodeGn, 12975 CountryCodeGw, 12976 CountryCodeGy, 12977 CountryCodeHt, 12978 CountryCodeHm, 12979 CountryCodeVa, 12980 CountryCodeHn, 12981 CountryCodeHk, 12982 CountryCodeHu, 12983 CountryCodeIs, 12984 CountryCodeIn, 12985 CountryCodeID, 12986 CountryCodeIr, 12987 CountryCodeIq, 12988 CountryCodeIe, 12989 CountryCodeIm, 12990 CountryCodeIl, 12991 CountryCodeIt, 12992 CountryCodeJm, 12993 CountryCodeJp, 12994 CountryCodeJe, 12995 CountryCodeJo, 12996 CountryCodeKz, 12997 CountryCodeKe, 12998 CountryCodeKi, 12999 CountryCodeKp, 13000 CountryCodeXk, 13001 CountryCodeKw, 13002 CountryCodeKg, 13003 CountryCodeLa, 13004 CountryCodeLv, 13005 CountryCodeLb, 13006 CountryCodeLs, 13007 CountryCodeLr, 13008 CountryCodeLy, 13009 CountryCodeLi, 13010 CountryCodeLt, 13011 CountryCodeLu, 13012 CountryCodeMo, 13013 CountryCodeMg, 13014 CountryCodeMw, 13015 CountryCodeMy, 13016 CountryCodeMv, 13017 CountryCodeMl, 13018 CountryCodeMt, 13019 CountryCodeMq, 13020 CountryCodeMr, 13021 CountryCodeMu, 13022 CountryCodeYt, 13023 CountryCodeMx, 13024 CountryCodeMd, 13025 CountryCodeMc, 13026 CountryCodeMn, 13027 CountryCodeMe, 13028 CountryCodeMs, 13029 CountryCodeMa, 13030 CountryCodeMz, 13031 CountryCodeMm, 13032 CountryCodeNa, 13033 CountryCodeNr, 13034 CountryCodeNp, 13035 CountryCodeNl, 13036 CountryCodeAn, 13037 CountryCodeNc, 13038 CountryCodeNz, 13039 CountryCodeNi, 13040 CountryCodeNe, 13041 CountryCodeNg, 13042 CountryCodeNu, 13043 CountryCodeNf, 13044 CountryCodeMk, 13045 CountryCodeNo, 13046 CountryCodeOm, 13047 CountryCodePk, 13048 CountryCodePs, 13049 CountryCodePa, 13050 CountryCodePg, 13051 CountryCodePy, 13052 CountryCodePe, 13053 CountryCodePh, 13054 CountryCodePn, 13055 CountryCodePl, 13056 CountryCodePt, 13057 CountryCodeQa, 13058 CountryCodeCm, 13059 CountryCodeRe, 13060 CountryCodeRo, 13061 CountryCodeRu, 13062 CountryCodeRw, 13063 CountryCodeBl, 13064 CountryCodeSh, 13065 CountryCodeKn, 13066 CountryCodeLc, 13067 CountryCodeMf, 13068 CountryCodePm, 13069 CountryCodeWs, 13070 CountryCodeSm, 13071 CountryCodeSt, 13072 CountryCodeSa, 13073 CountryCodeSn, 13074 CountryCodeRs, 13075 CountryCodeSc, 13076 CountryCodeSl, 13077 CountryCodeSg, 13078 CountryCodeSx, 13079 CountryCodeSk, 13080 CountryCodeSi, 13081 CountryCodeSb, 13082 CountryCodeSo, 13083 CountryCodeZa, 13084 CountryCodeGs, 13085 CountryCodeKr, 13086 CountryCodeSs, 13087 CountryCodeEs, 13088 CountryCodeLk, 13089 CountryCodeVc, 13090 CountryCodeSd, 13091 CountryCodeSr, 13092 CountryCodeSj, 13093 CountryCodeSe, 13094 CountryCodeCh, 13095 CountryCodeSy, 13096 CountryCodeTw, 13097 CountryCodeTj, 13098 CountryCodeTz, 13099 CountryCodeTh, 13100 CountryCodeTl, 13101 CountryCodeTg, 13102 CountryCodeTk, 13103 CountryCodeTo, 13104 CountryCodeTt, 13105 CountryCodeTa, 13106 CountryCodeTn, 13107 CountryCodeTr, 13108 CountryCodeTm, 13109 CountryCodeTc, 13110 CountryCodeTv, 13111 CountryCodeUg, 13112 CountryCodeUa, 13113 CountryCodeAe, 13114 CountryCodeGb, 13115 CountryCodeUs, 13116 CountryCodeUm, 13117 CountryCodeUy, 13118 CountryCodeUz, 13119 CountryCodeVu, 13120 CountryCodeVe, 13121 CountryCodeVn, 13122 CountryCodeVg, 13123 CountryCodeWf, 13124 CountryCodeEh, 13125 CountryCodeYe, 13126 CountryCodeZm, 13127 CountryCodeZw, 13128 } 13129 13130 func (e CountryCode) IsValid() bool { 13131 switch e { 13132 case CountryCodeAf, CountryCodeAx, CountryCodeAl, CountryCodeDz, CountryCodeAd, CountryCodeAo, CountryCodeAi, CountryCodeAg, CountryCodeAr, CountryCodeAm, CountryCodeAw, CountryCodeAc, CountryCodeAu, CountryCodeAt, CountryCodeAz, CountryCodeBs, CountryCodeBh, CountryCodeBd, CountryCodeBb, CountryCodeBy, CountryCodeBe, CountryCodeBz, CountryCodeBj, CountryCodeBm, CountryCodeBt, CountryCodeBo, CountryCodeBa, CountryCodeBw, CountryCodeBv, CountryCodeBr, CountryCodeIo, CountryCodeBn, CountryCodeBg, CountryCodeBf, CountryCodeBi, CountryCodeKh, CountryCodeCa, CountryCodeCv, CountryCodeBq, CountryCodeKy, CountryCodeCf, CountryCodeTd, CountryCodeCl, CountryCodeCn, CountryCodeCx, CountryCodeCc, CountryCodeCo, CountryCodeKm, CountryCodeCg, CountryCodeCd, CountryCodeCk, CountryCodeCr, CountryCodeHr, CountryCodeCu, CountryCodeCw, CountryCodeCy, CountryCodeCz, CountryCodeCi, CountryCodeDk, CountryCodeDj, CountryCodeDm, CountryCodeDo, CountryCodeEc, CountryCodeEg, CountryCodeSv, CountryCodeGq, CountryCodeEr, CountryCodeEe, CountryCodeSz, CountryCodeEt, CountryCodeFk, CountryCodeFo, CountryCodeFj, CountryCodeFi, CountryCodeFr, CountryCodeGf, CountryCodePf, CountryCodeTf, CountryCodeGa, CountryCodeGm, CountryCodeGe, CountryCodeDe, CountryCodeGh, CountryCodeGi, CountryCodeGr, CountryCodeGl, CountryCodeGd, CountryCodeGp, CountryCodeGt, CountryCodeGg, CountryCodeGn, CountryCodeGw, CountryCodeGy, CountryCodeHt, CountryCodeHm, CountryCodeVa, CountryCodeHn, CountryCodeHk, CountryCodeHu, CountryCodeIs, CountryCodeIn, CountryCodeID, CountryCodeIr, CountryCodeIq, CountryCodeIe, CountryCodeIm, CountryCodeIl, CountryCodeIt, CountryCodeJm, CountryCodeJp, CountryCodeJe, CountryCodeJo, CountryCodeKz, CountryCodeKe, CountryCodeKi, CountryCodeKp, CountryCodeXk, CountryCodeKw, CountryCodeKg, CountryCodeLa, CountryCodeLv, CountryCodeLb, CountryCodeLs, CountryCodeLr, CountryCodeLy, CountryCodeLi, CountryCodeLt, CountryCodeLu, CountryCodeMo, CountryCodeMg, CountryCodeMw, CountryCodeMy, CountryCodeMv, CountryCodeMl, CountryCodeMt, CountryCodeMq, CountryCodeMr, CountryCodeMu, CountryCodeYt, CountryCodeMx, CountryCodeMd, CountryCodeMc, CountryCodeMn, CountryCodeMe, CountryCodeMs, CountryCodeMa, CountryCodeMz, CountryCodeMm, CountryCodeNa, CountryCodeNr, CountryCodeNp, CountryCodeNl, CountryCodeAn, CountryCodeNc, CountryCodeNz, CountryCodeNi, CountryCodeNe, CountryCodeNg, CountryCodeNu, CountryCodeNf, CountryCodeMk, CountryCodeNo, CountryCodeOm, CountryCodePk, CountryCodePs, CountryCodePa, CountryCodePg, CountryCodePy, CountryCodePe, CountryCodePh, CountryCodePn, CountryCodePl, CountryCodePt, CountryCodeQa, CountryCodeCm, CountryCodeRe, CountryCodeRo, CountryCodeRu, CountryCodeRw, CountryCodeBl, CountryCodeSh, CountryCodeKn, CountryCodeLc, CountryCodeMf, CountryCodePm, CountryCodeWs, CountryCodeSm, CountryCodeSt, CountryCodeSa, CountryCodeSn, CountryCodeRs, CountryCodeSc, CountryCodeSl, CountryCodeSg, CountryCodeSx, CountryCodeSk, CountryCodeSi, CountryCodeSb, CountryCodeSo, CountryCodeZa, CountryCodeGs, CountryCodeKr, CountryCodeSs, CountryCodeEs, CountryCodeLk, CountryCodeVc, CountryCodeSd, CountryCodeSr, CountryCodeSj, CountryCodeSe, CountryCodeCh, CountryCodeSy, CountryCodeTw, CountryCodeTj, CountryCodeTz, CountryCodeTh, CountryCodeTl, CountryCodeTg, CountryCodeTk, CountryCodeTo, CountryCodeTt, CountryCodeTa, CountryCodeTn, CountryCodeTr, CountryCodeTm, CountryCodeTc, CountryCodeTv, CountryCodeUg, CountryCodeUa, CountryCodeAe, CountryCodeGb, CountryCodeUs, CountryCodeUm, CountryCodeUy, CountryCodeUz, CountryCodeVu, CountryCodeVe, CountryCodeVn, CountryCodeVg, CountryCodeWf, CountryCodeEh, CountryCodeYe, CountryCodeZm, CountryCodeZw: 13133 return true 13134 } 13135 return false 13136 } 13137 13138 func (e CountryCode) String() string { 13139 return string(e) 13140 } 13141 13142 func (e *CountryCode) UnmarshalGQL(v interface{}) error { 13143 str, ok := v.(string) 13144 if !ok { 13145 return fmt.Errorf("enums must be strings") 13146 } 13147 13148 *e = CountryCode(str) 13149 if !e.IsValid() { 13150 return fmt.Errorf("%s is not a valid CountryCode", str) 13151 } 13152 return nil 13153 } 13154 13155 func (e CountryCode) MarshalGQL(w io.Writer) { 13156 fmt.Fprint(w, strconv.Quote(e.String())) 13157 } 13158 13159 // The part of the image that should remain after cropping. 13160 type CropRegion string 13161 13162 const ( 13163 // Keep the center of the image. 13164 CropRegionCenter CropRegion = "CENTER" 13165 // Keep the top of the image. 13166 CropRegionTop CropRegion = "TOP" 13167 // Keep the bottom of the image. 13168 CropRegionBottom CropRegion = "BOTTOM" 13169 // Keep the left of the image. 13170 CropRegionLeft CropRegion = "LEFT" 13171 // Keep the right of the image. 13172 CropRegionRight CropRegion = "RIGHT" 13173 ) 13174 13175 var AllCropRegion = []CropRegion{ 13176 CropRegionCenter, 13177 CropRegionTop, 13178 CropRegionBottom, 13179 CropRegionLeft, 13180 CropRegionRight, 13181 } 13182 13183 func (e CropRegion) IsValid() bool { 13184 switch e { 13185 case CropRegionCenter, CropRegionTop, CropRegionBottom, CropRegionLeft, CropRegionRight: 13186 return true 13187 } 13188 return false 13189 } 13190 13191 func (e CropRegion) String() string { 13192 return string(e) 13193 } 13194 13195 func (e *CropRegion) UnmarshalGQL(v interface{}) error { 13196 str, ok := v.(string) 13197 if !ok { 13198 return fmt.Errorf("enums must be strings") 13199 } 13200 13201 *e = CropRegion(str) 13202 if !e.IsValid() { 13203 return fmt.Errorf("%s is not a valid CropRegion", str) 13204 } 13205 return nil 13206 } 13207 13208 func (e CropRegion) MarshalGQL(w io.Writer) { 13209 fmt.Fprint(w, strconv.Quote(e.String())) 13210 } 13211 13212 // Currency codes. 13213 type CurrencyCode string 13214 13215 const ( 13216 // United States Dollars (USD). 13217 CurrencyCodeUsd CurrencyCode = "USD" 13218 // Euro (EUR). 13219 CurrencyCodeEur CurrencyCode = "EUR" 13220 // United Kingdom Pounds (GBP). 13221 CurrencyCodeGbp CurrencyCode = "GBP" 13222 // Canadian Dollars (CAD). 13223 CurrencyCodeCad CurrencyCode = "CAD" 13224 // Afghan Afghani (AFN). 13225 CurrencyCodeAfn CurrencyCode = "AFN" 13226 // Albanian Lek (ALL). 13227 CurrencyCodeAll CurrencyCode = "ALL" 13228 // Algerian Dinar (DZD). 13229 CurrencyCodeDzd CurrencyCode = "DZD" 13230 // Angolan Kwanza (AOA). 13231 CurrencyCodeAoa CurrencyCode = "AOA" 13232 // Argentine Pesos (ARS). 13233 CurrencyCodeArs CurrencyCode = "ARS" 13234 // Armenian Dram (AMD). 13235 CurrencyCodeAmd CurrencyCode = "AMD" 13236 // Aruban Florin (AWG). 13237 CurrencyCodeAwg CurrencyCode = "AWG" 13238 // Australian Dollars (AUD). 13239 CurrencyCodeAud CurrencyCode = "AUD" 13240 // Barbadian Dollar (BBD). 13241 CurrencyCodeBbd CurrencyCode = "BBD" 13242 // Azerbaijani Manat (AZN). 13243 CurrencyCodeAzn CurrencyCode = "AZN" 13244 // Bangladesh Taka (BDT). 13245 CurrencyCodeBdt CurrencyCode = "BDT" 13246 // Bahamian Dollar (BSD). 13247 CurrencyCodeBsd CurrencyCode = "BSD" 13248 // Bahraini Dinar (BHD). 13249 CurrencyCodeBhd CurrencyCode = "BHD" 13250 // Burundian Franc (BIF). 13251 CurrencyCodeBif CurrencyCode = "BIF" 13252 // Belize Dollar (BZD). 13253 CurrencyCodeBzd CurrencyCode = "BZD" 13254 // Bermudian Dollar (BMD). 13255 CurrencyCodeBmd CurrencyCode = "BMD" 13256 // Bhutanese Ngultrum (BTN). 13257 CurrencyCodeBtn CurrencyCode = "BTN" 13258 // Bosnia and Herzegovina Convertible Mark (BAM). 13259 CurrencyCodeBam CurrencyCode = "BAM" 13260 // Brazilian Real (BRL). 13261 CurrencyCodeBrl CurrencyCode = "BRL" 13262 // Bolivian Boliviano (BOB). 13263 CurrencyCodeBob CurrencyCode = "BOB" 13264 // Botswana Pula (BWP). 13265 CurrencyCodeBwp CurrencyCode = "BWP" 13266 // Brunei Dollar (BND). 13267 CurrencyCodeBnd CurrencyCode = "BND" 13268 // Bulgarian Lev (BGN). 13269 CurrencyCodeBgn CurrencyCode = "BGN" 13270 // Burmese Kyat (MMK). 13271 CurrencyCodeMmk CurrencyCode = "MMK" 13272 // Cambodian Riel. 13273 CurrencyCodeKhr CurrencyCode = "KHR" 13274 // Cape Verdean escudo (CVE). 13275 CurrencyCodeCve CurrencyCode = "CVE" 13276 // Cayman Dollars (KYD). 13277 CurrencyCodeKyd CurrencyCode = "KYD" 13278 // Central African CFA Franc (XAF). 13279 CurrencyCodeXaf CurrencyCode = "XAF" 13280 // Chilean Peso (CLP). 13281 CurrencyCodeClp CurrencyCode = "CLP" 13282 // Chinese Yuan Renminbi (CNY). 13283 CurrencyCodeCny CurrencyCode = "CNY" 13284 // Colombian Peso (COP). 13285 CurrencyCodeCop CurrencyCode = "COP" 13286 // Comorian Franc (KMF). 13287 CurrencyCodeKmf CurrencyCode = "KMF" 13288 // Congolese franc (CDF). 13289 CurrencyCodeCdf CurrencyCode = "CDF" 13290 // Costa Rican Colones (CRC). 13291 CurrencyCodeCrc CurrencyCode = "CRC" 13292 // Croatian Kuna (HRK). 13293 CurrencyCodeHrk CurrencyCode = "HRK" 13294 // Czech Koruny (CZK). 13295 CurrencyCodeCzk CurrencyCode = "CZK" 13296 // Danish Kroner (DKK). 13297 CurrencyCodeDkk CurrencyCode = "DKK" 13298 // Dominican Peso (DOP). 13299 CurrencyCodeDop CurrencyCode = "DOP" 13300 // East Caribbean Dollar (XCD). 13301 CurrencyCodeXcd CurrencyCode = "XCD" 13302 // Egyptian Pound (EGP). 13303 CurrencyCodeEgp CurrencyCode = "EGP" 13304 // Ethiopian Birr (ETB). 13305 CurrencyCodeEtb CurrencyCode = "ETB" 13306 // CFP Franc (XPF). 13307 CurrencyCodeXpf CurrencyCode = "XPF" 13308 // Fijian Dollars (FJD). 13309 CurrencyCodeFjd CurrencyCode = "FJD" 13310 // Gambian Dalasi (GMD). 13311 CurrencyCodeGmd CurrencyCode = "GMD" 13312 // Ghanaian Cedi (GHS). 13313 CurrencyCodeGhs CurrencyCode = "GHS" 13314 // Guatemalan Quetzal (GTQ). 13315 CurrencyCodeGtq CurrencyCode = "GTQ" 13316 // Guyanese Dollar (GYD). 13317 CurrencyCodeGyd CurrencyCode = "GYD" 13318 // Georgian Lari (GEL). 13319 CurrencyCodeGel CurrencyCode = "GEL" 13320 // Haitian Gourde (HTG). 13321 CurrencyCodeHtg CurrencyCode = "HTG" 13322 // Honduran Lempira (HNL). 13323 CurrencyCodeHnl CurrencyCode = "HNL" 13324 // Hong Kong Dollars (HKD). 13325 CurrencyCodeHkd CurrencyCode = "HKD" 13326 // Hungarian Forint (HUF). 13327 CurrencyCodeHuf CurrencyCode = "HUF" 13328 // Icelandic Kronur (ISK). 13329 CurrencyCodeIsk CurrencyCode = "ISK" 13330 // Indian Rupees (INR). 13331 CurrencyCodeInr CurrencyCode = "INR" 13332 // Indonesian Rupiah (IDR). 13333 CurrencyCodeIDR CurrencyCode = "IDR" 13334 // Israeli New Shekel (NIS). 13335 CurrencyCodeIls CurrencyCode = "ILS" 13336 // Iraqi Dinar (IQD). 13337 CurrencyCodeIqd CurrencyCode = "IQD" 13338 // Jamaican Dollars (JMD). 13339 CurrencyCodeJmd CurrencyCode = "JMD" 13340 // Japanese Yen (JPY). 13341 CurrencyCodeJpy CurrencyCode = "JPY" 13342 // Jersey Pound. 13343 CurrencyCodeJep CurrencyCode = "JEP" 13344 // Jordanian Dinar (JOD). 13345 CurrencyCodeJod CurrencyCode = "JOD" 13346 // Kazakhstani Tenge (KZT). 13347 CurrencyCodeKzt CurrencyCode = "KZT" 13348 // Kenyan Shilling (KES). 13349 CurrencyCodeKes CurrencyCode = "KES" 13350 // Kuwaiti Dinar (KWD). 13351 CurrencyCodeKwd CurrencyCode = "KWD" 13352 // Kyrgyzstani Som (KGS). 13353 CurrencyCodeKgs CurrencyCode = "KGS" 13354 // Laotian Kip (LAK). 13355 CurrencyCodeLak CurrencyCode = "LAK" 13356 // Latvian Lati (LVL). 13357 CurrencyCodeLvl CurrencyCode = "LVL" 13358 // Lebanese Pounds (LBP). 13359 CurrencyCodeLbp CurrencyCode = "LBP" 13360 // Lesotho Loti (LSL). 13361 CurrencyCodeLsl CurrencyCode = "LSL" 13362 // Liberian Dollar (LRD). 13363 CurrencyCodeLrd CurrencyCode = "LRD" 13364 // Lithuanian Litai (LTL). 13365 CurrencyCodeLtl CurrencyCode = "LTL" 13366 // Malagasy Ariary (MGA). 13367 CurrencyCodeMga CurrencyCode = "MGA" 13368 // Macedonia Denar (MKD). 13369 CurrencyCodeMkd CurrencyCode = "MKD" 13370 // Macanese Pataca (MOP). 13371 CurrencyCodeMop CurrencyCode = "MOP" 13372 // Malawian Kwacha (MWK). 13373 CurrencyCodeMwk CurrencyCode = "MWK" 13374 // Maldivian Rufiyaa (MVR). 13375 CurrencyCodeMvr CurrencyCode = "MVR" 13376 // Mexican Pesos (MXN). 13377 CurrencyCodeMxn CurrencyCode = "MXN" 13378 // Malaysian Ringgits (MYR). 13379 CurrencyCodeMyr CurrencyCode = "MYR" 13380 // Mauritian Rupee (MUR). 13381 CurrencyCodeMur CurrencyCode = "MUR" 13382 // Moldovan Leu (MDL). 13383 CurrencyCodeMdl CurrencyCode = "MDL" 13384 // Moroccan Dirham. 13385 CurrencyCodeMad CurrencyCode = "MAD" 13386 // Mongolian Tugrik. 13387 CurrencyCodeMnt CurrencyCode = "MNT" 13388 // Mozambican Metical. 13389 CurrencyCodeMzn CurrencyCode = "MZN" 13390 // Namibian Dollar. 13391 CurrencyCodeNad CurrencyCode = "NAD" 13392 // Nepalese Rupee (NPR). 13393 CurrencyCodeNpr CurrencyCode = "NPR" 13394 // Netherlands Antillean Guilder. 13395 CurrencyCodeAng CurrencyCode = "ANG" 13396 // New Zealand Dollars (NZD). 13397 CurrencyCodeNzd CurrencyCode = "NZD" 13398 // Nicaraguan Córdoba (NIO). 13399 CurrencyCodeNio CurrencyCode = "NIO" 13400 // Nigerian Naira (NGN). 13401 CurrencyCodeNgn CurrencyCode = "NGN" 13402 // Norwegian Kroner (NOK). 13403 CurrencyCodeNok CurrencyCode = "NOK" 13404 // Omani Rial (OMR). 13405 CurrencyCodeOmr CurrencyCode = "OMR" 13406 // Panamian Balboa (PAB). 13407 CurrencyCodePab CurrencyCode = "PAB" 13408 // Pakistani Rupee (PKR). 13409 CurrencyCodePkr CurrencyCode = "PKR" 13410 // Papua New Guinean Kina (PGK). 13411 CurrencyCodePgk CurrencyCode = "PGK" 13412 // Paraguayan Guarani (PYG). 13413 CurrencyCodePyg CurrencyCode = "PYG" 13414 // Peruvian Nuevo Sol (PEN). 13415 CurrencyCodePen CurrencyCode = "PEN" 13416 // Philippine Peso (PHP). 13417 CurrencyCodePhp CurrencyCode = "PHP" 13418 // Polish Zlotych (PLN). 13419 CurrencyCodePln CurrencyCode = "PLN" 13420 // Qatari Rial (QAR). 13421 CurrencyCodeQar CurrencyCode = "QAR" 13422 // Romanian Lei (RON). 13423 CurrencyCodeRon CurrencyCode = "RON" 13424 // Russian Rubles (RUB). 13425 CurrencyCodeRub CurrencyCode = "RUB" 13426 // Rwandan Franc (RWF). 13427 CurrencyCodeRwf CurrencyCode = "RWF" 13428 // Samoan Tala (WST). 13429 CurrencyCodeWst CurrencyCode = "WST" 13430 // Saudi Riyal (SAR). 13431 CurrencyCodeSar CurrencyCode = "SAR" 13432 // Sao Tome And Principe Dobra (STD). 13433 CurrencyCodeStd CurrencyCode = "STD" 13434 // Serbian dinar (RSD). 13435 CurrencyCodeRsd CurrencyCode = "RSD" 13436 // Seychellois Rupee (SCR). 13437 CurrencyCodeScr CurrencyCode = "SCR" 13438 // Singapore Dollars (SGD). 13439 CurrencyCodeSgd CurrencyCode = "SGD" 13440 // Sudanese Pound (SDG). 13441 CurrencyCodeSdg CurrencyCode = "SDG" 13442 // Syrian Pound (SYP). 13443 CurrencyCodeSyp CurrencyCode = "SYP" 13444 // South African Rand (ZAR). 13445 CurrencyCodeZar CurrencyCode = "ZAR" 13446 // South Korean Won (KRW). 13447 CurrencyCodeKrw CurrencyCode = "KRW" 13448 // South Sudanese Pound (SSP). 13449 CurrencyCodeSsp CurrencyCode = "SSP" 13450 // Solomon Islands Dollar (SBD). 13451 CurrencyCodeSbd CurrencyCode = "SBD" 13452 // Sri Lankan Rupees (LKR). 13453 CurrencyCodeLkr CurrencyCode = "LKR" 13454 // Surinamese Dollar (SRD). 13455 CurrencyCodeSrd CurrencyCode = "SRD" 13456 // Swazi Lilangeni (SZL). 13457 CurrencyCodeSzl CurrencyCode = "SZL" 13458 // Swedish Kronor (SEK). 13459 CurrencyCodeSek CurrencyCode = "SEK" 13460 // Swiss Francs (CHF). 13461 CurrencyCodeChf CurrencyCode = "CHF" 13462 // Taiwan Dollars (TWD). 13463 CurrencyCodeTwd CurrencyCode = "TWD" 13464 // Thai baht (THB). 13465 CurrencyCodeThb CurrencyCode = "THB" 13466 // Tanzanian Shilling (TZS). 13467 CurrencyCodeTzs CurrencyCode = "TZS" 13468 // Trinidad and Tobago Dollars (TTD). 13469 CurrencyCodeTtd CurrencyCode = "TTD" 13470 // Tunisian Dinar (TND). 13471 CurrencyCodeTnd CurrencyCode = "TND" 13472 // Turkish Lira (TRY). 13473 CurrencyCodeTry CurrencyCode = "TRY" 13474 // Turkmenistani Manat (TMT). 13475 CurrencyCodeTmt CurrencyCode = "TMT" 13476 // Ugandan Shilling (UGX). 13477 CurrencyCodeUgx CurrencyCode = "UGX" 13478 // Ukrainian Hryvnia (UAH). 13479 CurrencyCodeUah CurrencyCode = "UAH" 13480 // United Arab Emirates Dirham (AED). 13481 CurrencyCodeAed CurrencyCode = "AED" 13482 // Uruguayan Pesos (UYU). 13483 CurrencyCodeUyu CurrencyCode = "UYU" 13484 // Uzbekistan som (UZS). 13485 CurrencyCodeUzs CurrencyCode = "UZS" 13486 // Vanuatu Vatu (VUV). 13487 CurrencyCodeVuv CurrencyCode = "VUV" 13488 // Vietnamese đồng (VND). 13489 CurrencyCodeVnd CurrencyCode = "VND" 13490 // West African CFA franc (XOF). 13491 CurrencyCodeXof CurrencyCode = "XOF" 13492 // Yemeni Rial (YER). 13493 CurrencyCodeYer CurrencyCode = "YER" 13494 // Zambian Kwacha (ZMW). 13495 CurrencyCodeZmw CurrencyCode = "ZMW" 13496 // Belarusian Ruble (BYN). 13497 CurrencyCodeByn CurrencyCode = "BYN" 13498 // Belarusian Ruble (BYR). 13499 CurrencyCodeByr CurrencyCode = "BYR" 13500 // Djiboutian Franc (DJF). 13501 CurrencyCodeDjf CurrencyCode = "DJF" 13502 // Eritrean Nakfa (ERN). 13503 CurrencyCodeErn CurrencyCode = "ERN" 13504 // Falkland Islands Pounds (FKP). 13505 CurrencyCodeFkp CurrencyCode = "FKP" 13506 // Gibraltar Pounds (GIP). 13507 CurrencyCodeGip CurrencyCode = "GIP" 13508 // Guinean Franc (GNF). 13509 CurrencyCodeGnf CurrencyCode = "GNF" 13510 // Iranian Rial (IRR). 13511 CurrencyCodeIrr CurrencyCode = "IRR" 13512 // Kiribati Dollar (KID). 13513 CurrencyCodeKid CurrencyCode = "KID" 13514 // Libyan Dinar (LYD). 13515 CurrencyCodeLyd CurrencyCode = "LYD" 13516 // Mauritanian Ouguiya (MRU). 13517 CurrencyCodeMru CurrencyCode = "MRU" 13518 // Sierra Leonean Leone (SLL). 13519 CurrencyCodeSll CurrencyCode = "SLL" 13520 // Saint Helena Pounds (SHP). 13521 CurrencyCodeShp CurrencyCode = "SHP" 13522 // Somali Shilling (SOS). 13523 CurrencyCodeSos CurrencyCode = "SOS" 13524 // Tajikistani Somoni (TJS). 13525 CurrencyCodeTjs CurrencyCode = "TJS" 13526 // Tongan Pa'anga (TOP). 13527 CurrencyCodeTop CurrencyCode = "TOP" 13528 // Venezuelan Bolivares (VEF). 13529 CurrencyCodeVef CurrencyCode = "VEF" 13530 // Venezuelan Bolivares (VES). 13531 CurrencyCodeVes CurrencyCode = "VES" 13532 ) 13533 13534 var AllCurrencyCode = []CurrencyCode{ 13535 CurrencyCodeUsd, 13536 CurrencyCodeEur, 13537 CurrencyCodeGbp, 13538 CurrencyCodeCad, 13539 CurrencyCodeAfn, 13540 CurrencyCodeAll, 13541 CurrencyCodeDzd, 13542 CurrencyCodeAoa, 13543 CurrencyCodeArs, 13544 CurrencyCodeAmd, 13545 CurrencyCodeAwg, 13546 CurrencyCodeAud, 13547 CurrencyCodeBbd, 13548 CurrencyCodeAzn, 13549 CurrencyCodeBdt, 13550 CurrencyCodeBsd, 13551 CurrencyCodeBhd, 13552 CurrencyCodeBif, 13553 CurrencyCodeBzd, 13554 CurrencyCodeBmd, 13555 CurrencyCodeBtn, 13556 CurrencyCodeBam, 13557 CurrencyCodeBrl, 13558 CurrencyCodeBob, 13559 CurrencyCodeBwp, 13560 CurrencyCodeBnd, 13561 CurrencyCodeBgn, 13562 CurrencyCodeMmk, 13563 CurrencyCodeKhr, 13564 CurrencyCodeCve, 13565 CurrencyCodeKyd, 13566 CurrencyCodeXaf, 13567 CurrencyCodeClp, 13568 CurrencyCodeCny, 13569 CurrencyCodeCop, 13570 CurrencyCodeKmf, 13571 CurrencyCodeCdf, 13572 CurrencyCodeCrc, 13573 CurrencyCodeHrk, 13574 CurrencyCodeCzk, 13575 CurrencyCodeDkk, 13576 CurrencyCodeDop, 13577 CurrencyCodeXcd, 13578 CurrencyCodeEgp, 13579 CurrencyCodeEtb, 13580 CurrencyCodeXpf, 13581 CurrencyCodeFjd, 13582 CurrencyCodeGmd, 13583 CurrencyCodeGhs, 13584 CurrencyCodeGtq, 13585 CurrencyCodeGyd, 13586 CurrencyCodeGel, 13587 CurrencyCodeHtg, 13588 CurrencyCodeHnl, 13589 CurrencyCodeHkd, 13590 CurrencyCodeHuf, 13591 CurrencyCodeIsk, 13592 CurrencyCodeInr, 13593 CurrencyCodeIDR, 13594 CurrencyCodeIls, 13595 CurrencyCodeIqd, 13596 CurrencyCodeJmd, 13597 CurrencyCodeJpy, 13598 CurrencyCodeJep, 13599 CurrencyCodeJod, 13600 CurrencyCodeKzt, 13601 CurrencyCodeKes, 13602 CurrencyCodeKwd, 13603 CurrencyCodeKgs, 13604 CurrencyCodeLak, 13605 CurrencyCodeLvl, 13606 CurrencyCodeLbp, 13607 CurrencyCodeLsl, 13608 CurrencyCodeLrd, 13609 CurrencyCodeLtl, 13610 CurrencyCodeMga, 13611 CurrencyCodeMkd, 13612 CurrencyCodeMop, 13613 CurrencyCodeMwk, 13614 CurrencyCodeMvr, 13615 CurrencyCodeMxn, 13616 CurrencyCodeMyr, 13617 CurrencyCodeMur, 13618 CurrencyCodeMdl, 13619 CurrencyCodeMad, 13620 CurrencyCodeMnt, 13621 CurrencyCodeMzn, 13622 CurrencyCodeNad, 13623 CurrencyCodeNpr, 13624 CurrencyCodeAng, 13625 CurrencyCodeNzd, 13626 CurrencyCodeNio, 13627 CurrencyCodeNgn, 13628 CurrencyCodeNok, 13629 CurrencyCodeOmr, 13630 CurrencyCodePab, 13631 CurrencyCodePkr, 13632 CurrencyCodePgk, 13633 CurrencyCodePyg, 13634 CurrencyCodePen, 13635 CurrencyCodePhp, 13636 CurrencyCodePln, 13637 CurrencyCodeQar, 13638 CurrencyCodeRon, 13639 CurrencyCodeRub, 13640 CurrencyCodeRwf, 13641 CurrencyCodeWst, 13642 CurrencyCodeSar, 13643 CurrencyCodeStd, 13644 CurrencyCodeRsd, 13645 CurrencyCodeScr, 13646 CurrencyCodeSgd, 13647 CurrencyCodeSdg, 13648 CurrencyCodeSyp, 13649 CurrencyCodeZar, 13650 CurrencyCodeKrw, 13651 CurrencyCodeSsp, 13652 CurrencyCodeSbd, 13653 CurrencyCodeLkr, 13654 CurrencyCodeSrd, 13655 CurrencyCodeSzl, 13656 CurrencyCodeSek, 13657 CurrencyCodeChf, 13658 CurrencyCodeTwd, 13659 CurrencyCodeThb, 13660 CurrencyCodeTzs, 13661 CurrencyCodeTtd, 13662 CurrencyCodeTnd, 13663 CurrencyCodeTry, 13664 CurrencyCodeTmt, 13665 CurrencyCodeUgx, 13666 CurrencyCodeUah, 13667 CurrencyCodeAed, 13668 CurrencyCodeUyu, 13669 CurrencyCodeUzs, 13670 CurrencyCodeVuv, 13671 CurrencyCodeVnd, 13672 CurrencyCodeXof, 13673 CurrencyCodeYer, 13674 CurrencyCodeZmw, 13675 CurrencyCodeByn, 13676 CurrencyCodeByr, 13677 CurrencyCodeDjf, 13678 CurrencyCodeErn, 13679 CurrencyCodeFkp, 13680 CurrencyCodeGip, 13681 CurrencyCodeGnf, 13682 CurrencyCodeIrr, 13683 CurrencyCodeKid, 13684 CurrencyCodeLyd, 13685 CurrencyCodeMru, 13686 CurrencyCodeSll, 13687 CurrencyCodeShp, 13688 CurrencyCodeSos, 13689 CurrencyCodeTjs, 13690 CurrencyCodeTop, 13691 CurrencyCodeVef, 13692 CurrencyCodeVes, 13693 } 13694 13695 func (e CurrencyCode) IsValid() bool { 13696 switch e { 13697 case CurrencyCodeUsd, CurrencyCodeEur, CurrencyCodeGbp, CurrencyCodeCad, CurrencyCodeAfn, CurrencyCodeAll, CurrencyCodeDzd, CurrencyCodeAoa, CurrencyCodeArs, CurrencyCodeAmd, CurrencyCodeAwg, CurrencyCodeAud, CurrencyCodeBbd, CurrencyCodeAzn, CurrencyCodeBdt, CurrencyCodeBsd, CurrencyCodeBhd, CurrencyCodeBif, CurrencyCodeBzd, CurrencyCodeBmd, CurrencyCodeBtn, CurrencyCodeBam, CurrencyCodeBrl, CurrencyCodeBob, CurrencyCodeBwp, CurrencyCodeBnd, CurrencyCodeBgn, CurrencyCodeMmk, CurrencyCodeKhr, CurrencyCodeCve, CurrencyCodeKyd, CurrencyCodeXaf, CurrencyCodeClp, CurrencyCodeCny, CurrencyCodeCop, CurrencyCodeKmf, CurrencyCodeCdf, CurrencyCodeCrc, CurrencyCodeHrk, CurrencyCodeCzk, CurrencyCodeDkk, CurrencyCodeDop, CurrencyCodeXcd, CurrencyCodeEgp, CurrencyCodeEtb, CurrencyCodeXpf, CurrencyCodeFjd, CurrencyCodeGmd, CurrencyCodeGhs, CurrencyCodeGtq, CurrencyCodeGyd, CurrencyCodeGel, CurrencyCodeHtg, CurrencyCodeHnl, CurrencyCodeHkd, CurrencyCodeHuf, CurrencyCodeIsk, CurrencyCodeInr, CurrencyCodeIDR, CurrencyCodeIls, CurrencyCodeIqd, CurrencyCodeJmd, CurrencyCodeJpy, CurrencyCodeJep, CurrencyCodeJod, CurrencyCodeKzt, CurrencyCodeKes, CurrencyCodeKwd, CurrencyCodeKgs, CurrencyCodeLak, CurrencyCodeLvl, CurrencyCodeLbp, CurrencyCodeLsl, CurrencyCodeLrd, CurrencyCodeLtl, CurrencyCodeMga, CurrencyCodeMkd, CurrencyCodeMop, CurrencyCodeMwk, CurrencyCodeMvr, CurrencyCodeMxn, CurrencyCodeMyr, CurrencyCodeMur, CurrencyCodeMdl, CurrencyCodeMad, CurrencyCodeMnt, CurrencyCodeMzn, CurrencyCodeNad, CurrencyCodeNpr, CurrencyCodeAng, CurrencyCodeNzd, CurrencyCodeNio, CurrencyCodeNgn, CurrencyCodeNok, CurrencyCodeOmr, CurrencyCodePab, CurrencyCodePkr, CurrencyCodePgk, CurrencyCodePyg, CurrencyCodePen, CurrencyCodePhp, CurrencyCodePln, CurrencyCodeQar, CurrencyCodeRon, CurrencyCodeRub, CurrencyCodeRwf, CurrencyCodeWst, CurrencyCodeSar, CurrencyCodeStd, CurrencyCodeRsd, CurrencyCodeScr, CurrencyCodeSgd, CurrencyCodeSdg, CurrencyCodeSyp, CurrencyCodeZar, CurrencyCodeKrw, CurrencyCodeSsp, CurrencyCodeSbd, CurrencyCodeLkr, CurrencyCodeSrd, CurrencyCodeSzl, CurrencyCodeSek, CurrencyCodeChf, CurrencyCodeTwd, CurrencyCodeThb, CurrencyCodeTzs, CurrencyCodeTtd, CurrencyCodeTnd, CurrencyCodeTry, CurrencyCodeTmt, CurrencyCodeUgx, CurrencyCodeUah, CurrencyCodeAed, CurrencyCodeUyu, CurrencyCodeUzs, CurrencyCodeVuv, CurrencyCodeVnd, CurrencyCodeXof, CurrencyCodeYer, CurrencyCodeZmw, CurrencyCodeByn, CurrencyCodeByr, CurrencyCodeDjf, CurrencyCodeErn, CurrencyCodeFkp, CurrencyCodeGip, CurrencyCodeGnf, CurrencyCodeIrr, CurrencyCodeKid, CurrencyCodeLyd, CurrencyCodeMru, CurrencyCodeSll, CurrencyCodeShp, CurrencyCodeSos, CurrencyCodeTjs, CurrencyCodeTop, CurrencyCodeVef, CurrencyCodeVes: 13698 return true 13699 } 13700 return false 13701 } 13702 13703 func (e CurrencyCode) String() string { 13704 return string(e) 13705 } 13706 13707 func (e *CurrencyCode) UnmarshalGQL(v interface{}) error { 13708 str, ok := v.(string) 13709 if !ok { 13710 return fmt.Errorf("enums must be strings") 13711 } 13712 13713 *e = CurrencyCode(str) 13714 if !e.IsValid() { 13715 return fmt.Errorf("%s is not a valid CurrencyCode", str) 13716 } 13717 return nil 13718 } 13719 13720 func (e CurrencyCode) MarshalGQL(w io.Writer) { 13721 fmt.Fprint(w, strconv.Quote(e.String())) 13722 } 13723 13724 // The valid values for the marketing subscription opt-in active at the time the customer consented to email 13725 // marketing. 13726 // 13727 // The levels are defined by [the M3AAWG best practices guideline 13728 // document](https://www.m3aawg.org/sites/maawg/files/news/M3AAWG_Senders_BCP_Ver3-2015-02.pdf). 13729 type CustomerMarketingOptInLevel string 13730 13731 const ( 13732 // The customer started receiving marketing email(s) after providing their email address, without any 13733 // intermediate steps. 13734 CustomerMarketingOptInLevelSingleOptIn CustomerMarketingOptInLevel = "SINGLE_OPT_IN" 13735 // After providing their email address, the customer received a confirmation email which required them to 13736 // perform a prescribed action before receiving marketing emails. 13737 CustomerMarketingOptInLevelConfirmedOptIn CustomerMarketingOptInLevel = "CONFIRMED_OPT_IN" 13738 // The customer receives marketing emails, but the original opt-in process is unknown. 13739 CustomerMarketingOptInLevelUnknown CustomerMarketingOptInLevel = "UNKNOWN" 13740 ) 13741 13742 var AllCustomerMarketingOptInLevel = []CustomerMarketingOptInLevel{ 13743 CustomerMarketingOptInLevelSingleOptIn, 13744 CustomerMarketingOptInLevelConfirmedOptIn, 13745 CustomerMarketingOptInLevelUnknown, 13746 } 13747 13748 func (e CustomerMarketingOptInLevel) IsValid() bool { 13749 switch e { 13750 case CustomerMarketingOptInLevelSingleOptIn, CustomerMarketingOptInLevelConfirmedOptIn, CustomerMarketingOptInLevelUnknown: 13751 return true 13752 } 13753 return false 13754 } 13755 13756 func (e CustomerMarketingOptInLevel) String() string { 13757 return string(e) 13758 } 13759 13760 func (e *CustomerMarketingOptInLevel) UnmarshalGQL(v interface{}) error { 13761 str, ok := v.(string) 13762 if !ok { 13763 return fmt.Errorf("enums must be strings") 13764 } 13765 13766 *e = CustomerMarketingOptInLevel(str) 13767 if !e.IsValid() { 13768 return fmt.Errorf("%s is not a valid CustomerMarketingOptInLevel", str) 13769 } 13770 return nil 13771 } 13772 13773 func (e CustomerMarketingOptInLevel) MarshalGQL(w io.Writer) { 13774 fmt.Fprint(w, strconv.Quote(e.String())) 13775 } 13776 13777 // Possible error codes that could be returned by CustomerPaymentMethodUserError. 13778 type CustomerPaymentMethodUserErrorCode string 13779 13780 const ( 13781 // Input value is invalid. 13782 CustomerPaymentMethodUserErrorCodeInvalid CustomerPaymentMethodUserErrorCode = "INVALID" 13783 // Input value is not present. 13784 CustomerPaymentMethodUserErrorCodePresent CustomerPaymentMethodUserErrorCode = "PRESENT" 13785 // Input value is already taken. 13786 CustomerPaymentMethodUserErrorCodeTaken CustomerPaymentMethodUserErrorCode = "TAKEN" 13787 ) 13788 13789 var AllCustomerPaymentMethodUserErrorCode = []CustomerPaymentMethodUserErrorCode{ 13790 CustomerPaymentMethodUserErrorCodeInvalid, 13791 CustomerPaymentMethodUserErrorCodePresent, 13792 CustomerPaymentMethodUserErrorCodeTaken, 13793 } 13794 13795 func (e CustomerPaymentMethodUserErrorCode) IsValid() bool { 13796 switch e { 13797 case CustomerPaymentMethodUserErrorCodeInvalid, CustomerPaymentMethodUserErrorCodePresent, CustomerPaymentMethodUserErrorCodeTaken: 13798 return true 13799 } 13800 return false 13801 } 13802 13803 func (e CustomerPaymentMethodUserErrorCode) String() string { 13804 return string(e) 13805 } 13806 13807 func (e *CustomerPaymentMethodUserErrorCode) UnmarshalGQL(v interface{}) error { 13808 str, ok := v.(string) 13809 if !ok { 13810 return fmt.Errorf("enums must be strings") 13811 } 13812 13813 *e = CustomerPaymentMethodUserErrorCode(str) 13814 if !e.IsValid() { 13815 return fmt.Errorf("%s is not a valid CustomerPaymentMethodUserErrorCode", str) 13816 } 13817 return nil 13818 } 13819 13820 func (e CustomerPaymentMethodUserErrorCode) MarshalGQL(w io.Writer) { 13821 fmt.Fprint(w, strconv.Quote(e.String())) 13822 } 13823 13824 // Possible subscriber states of a customer defined by their subscription contracts. 13825 type CustomerProductSubscriberStatus string 13826 13827 const ( 13828 // The customer has at least one active subscription contract. 13829 CustomerProductSubscriberStatusActive CustomerProductSubscriberStatus = "ACTIVE" 13830 // The customer's last subscription contract was cancelled and there are no other active or paused 13831 // subscription contracts. 13832 CustomerProductSubscriberStatusCancelled CustomerProductSubscriberStatus = "CANCELLED" 13833 // The customer's last subscription contract expired and there are no other active or paused 13834 // subscription contracts. 13835 CustomerProductSubscriberStatusExpired CustomerProductSubscriberStatus = "EXPIRED" 13836 // The customer's last subscription contract failed and there are no other active or paused 13837 // subscription contracts. 13838 CustomerProductSubscriberStatusFailed CustomerProductSubscriberStatus = "FAILED" 13839 // The customer has never had a subscription contract. 13840 CustomerProductSubscriberStatusNeverSubscribed CustomerProductSubscriberStatus = "NEVER_SUBSCRIBED" 13841 // The customer has at least one paused subscription contract and there are no other active 13842 // subscription contracts. 13843 CustomerProductSubscriberStatusPaused CustomerProductSubscriberStatus = "PAUSED" 13844 ) 13845 13846 var AllCustomerProductSubscriberStatus = []CustomerProductSubscriberStatus{ 13847 CustomerProductSubscriberStatusActive, 13848 CustomerProductSubscriberStatusCancelled, 13849 CustomerProductSubscriberStatusExpired, 13850 CustomerProductSubscriberStatusFailed, 13851 CustomerProductSubscriberStatusNeverSubscribed, 13852 CustomerProductSubscriberStatusPaused, 13853 } 13854 13855 func (e CustomerProductSubscriberStatus) IsValid() bool { 13856 switch e { 13857 case CustomerProductSubscriberStatusActive, CustomerProductSubscriberStatusCancelled, CustomerProductSubscriberStatusExpired, CustomerProductSubscriberStatusFailed, CustomerProductSubscriberStatusNeverSubscribed, CustomerProductSubscriberStatusPaused: 13858 return true 13859 } 13860 return false 13861 } 13862 13863 func (e CustomerProductSubscriberStatus) String() string { 13864 return string(e) 13865 } 13866 13867 func (e *CustomerProductSubscriberStatus) UnmarshalGQL(v interface{}) error { 13868 str, ok := v.(string) 13869 if !ok { 13870 return fmt.Errorf("enums must be strings") 13871 } 13872 13873 *e = CustomerProductSubscriberStatus(str) 13874 if !e.IsValid() { 13875 return fmt.Errorf("%s is not a valid CustomerProductSubscriberStatus", str) 13876 } 13877 return nil 13878 } 13879 13880 func (e CustomerProductSubscriberStatus) MarshalGQL(w io.Writer) { 13881 fmt.Fprint(w, strconv.Quote(e.String())) 13882 } 13883 13884 // The set of valid sort keys for the CustomerSavedSearch query. 13885 type CustomerSavedSearchSortKeys string 13886 13887 const ( 13888 // Sort by the `name` value. 13889 CustomerSavedSearchSortKeysName CustomerSavedSearchSortKeys = "NAME" 13890 // Sort by the `id` value. 13891 CustomerSavedSearchSortKeysID CustomerSavedSearchSortKeys = "ID" 13892 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 13893 // results by relevance to the search term(s). When no search query is specified, this sort key is not 13894 // deterministic and should not be used. 13895 CustomerSavedSearchSortKeysRelevance CustomerSavedSearchSortKeys = "RELEVANCE" 13896 ) 13897 13898 var AllCustomerSavedSearchSortKeys = []CustomerSavedSearchSortKeys{ 13899 CustomerSavedSearchSortKeysName, 13900 CustomerSavedSearchSortKeysID, 13901 CustomerSavedSearchSortKeysRelevance, 13902 } 13903 13904 func (e CustomerSavedSearchSortKeys) IsValid() bool { 13905 switch e { 13906 case CustomerSavedSearchSortKeysName, CustomerSavedSearchSortKeysID, CustomerSavedSearchSortKeysRelevance: 13907 return true 13908 } 13909 return false 13910 } 13911 13912 func (e CustomerSavedSearchSortKeys) String() string { 13913 return string(e) 13914 } 13915 13916 func (e *CustomerSavedSearchSortKeys) UnmarshalGQL(v interface{}) error { 13917 str, ok := v.(string) 13918 if !ok { 13919 return fmt.Errorf("enums must be strings") 13920 } 13921 13922 *e = CustomerSavedSearchSortKeys(str) 13923 if !e.IsValid() { 13924 return fmt.Errorf("%s is not a valid CustomerSavedSearchSortKeys", str) 13925 } 13926 return nil 13927 } 13928 13929 func (e CustomerSavedSearchSortKeys) MarshalGQL(w io.Writer) { 13930 fmt.Fprint(w, strconv.Quote(e.String())) 13931 } 13932 13933 // The set of valid sort keys for the Customer query. 13934 type CustomerSortKeys string 13935 13936 const ( 13937 // Sort by the `name` value. 13938 CustomerSortKeysName CustomerSortKeys = "NAME" 13939 // Sort by the `location` value. 13940 CustomerSortKeysLocation CustomerSortKeys = "LOCATION" 13941 // Sort by the `orders_count` value. 13942 CustomerSortKeysOrdersCount CustomerSortKeys = "ORDERS_COUNT" 13943 // Sort by the `last_order_date` value. 13944 CustomerSortKeysLastOrderDate CustomerSortKeys = "LAST_ORDER_DATE" 13945 // Sort by the `total_spent` value. 13946 CustomerSortKeysTotalSpent CustomerSortKeys = "TOTAL_SPENT" 13947 // Sort by the `updated_at` value. 13948 CustomerSortKeysUpdatedAt CustomerSortKeys = "UPDATED_AT" 13949 // Sort by the `id` value. 13950 CustomerSortKeysID CustomerSortKeys = "ID" 13951 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 13952 // results by relevance to the search term(s). When no search query is specified, this sort key is not 13953 // deterministic and should not be used. 13954 CustomerSortKeysRelevance CustomerSortKeys = "RELEVANCE" 13955 ) 13956 13957 var AllCustomerSortKeys = []CustomerSortKeys{ 13958 CustomerSortKeysName, 13959 CustomerSortKeysLocation, 13960 CustomerSortKeysOrdersCount, 13961 CustomerSortKeysLastOrderDate, 13962 CustomerSortKeysTotalSpent, 13963 CustomerSortKeysUpdatedAt, 13964 CustomerSortKeysID, 13965 CustomerSortKeysRelevance, 13966 } 13967 13968 func (e CustomerSortKeys) IsValid() bool { 13969 switch e { 13970 case CustomerSortKeysName, CustomerSortKeysLocation, CustomerSortKeysOrdersCount, CustomerSortKeysLastOrderDate, CustomerSortKeysTotalSpent, CustomerSortKeysUpdatedAt, CustomerSortKeysID, CustomerSortKeysRelevance: 13971 return true 13972 } 13973 return false 13974 } 13975 13976 func (e CustomerSortKeys) String() string { 13977 return string(e) 13978 } 13979 13980 func (e *CustomerSortKeys) UnmarshalGQL(v interface{}) error { 13981 str, ok := v.(string) 13982 if !ok { 13983 return fmt.Errorf("enums must be strings") 13984 } 13985 13986 *e = CustomerSortKeys(str) 13987 if !e.IsValid() { 13988 return fmt.Errorf("%s is not a valid CustomerSortKeys", str) 13989 } 13990 return nil 13991 } 13992 13993 func (e CustomerSortKeys) MarshalGQL(w io.Writer) { 13994 fmt.Fprint(w, strconv.Quote(e.String())) 13995 } 13996 13997 // The valid values for the state of a customer's account with a shop. 13998 type CustomerState string 13999 14000 const ( 14001 // The customer declined the email invite to create an account. 14002 CustomerStateDeclined CustomerState = "DECLINED" 14003 // The customer doesn't have an active account. Customer accounts can be disabled from the Shopify admin at any time. 14004 CustomerStateDisabled CustomerState = "DISABLED" 14005 // The customer has created an account. 14006 CustomerStateEnabled CustomerState = "ENABLED" 14007 // The customer has received an email invite to create an account. 14008 CustomerStateInvited CustomerState = "INVITED" 14009 ) 14010 14011 var AllCustomerState = []CustomerState{ 14012 CustomerStateDeclined, 14013 CustomerStateDisabled, 14014 CustomerStateEnabled, 14015 CustomerStateInvited, 14016 } 14017 14018 func (e CustomerState) IsValid() bool { 14019 switch e { 14020 case CustomerStateDeclined, CustomerStateDisabled, CustomerStateEnabled, CustomerStateInvited: 14021 return true 14022 } 14023 return false 14024 } 14025 14026 func (e CustomerState) String() string { 14027 return string(e) 14028 } 14029 14030 func (e *CustomerState) UnmarshalGQL(v interface{}) error { 14031 str, ok := v.(string) 14032 if !ok { 14033 return fmt.Errorf("enums must be strings") 14034 } 14035 14036 *e = CustomerState(str) 14037 if !e.IsValid() { 14038 return fmt.Errorf("%s is not a valid CustomerState", str) 14039 } 14040 return nil 14041 } 14042 14043 func (e CustomerState) MarshalGQL(w io.Writer) { 14044 fmt.Fprint(w, strconv.Quote(e.String())) 14045 } 14046 14047 // Days of the week from Monday to Sunday. 14048 type DayOfTheWeek string 14049 14050 const ( 14051 // Monday. 14052 DayOfTheWeekMonday DayOfTheWeek = "MONDAY" 14053 // Tuesday. 14054 DayOfTheWeekTuesday DayOfTheWeek = "TUESDAY" 14055 // Wednesday. 14056 DayOfTheWeekWednesday DayOfTheWeek = "WEDNESDAY" 14057 // Thursday. 14058 DayOfTheWeekThursday DayOfTheWeek = "THURSDAY" 14059 // Friday. 14060 DayOfTheWeekFriday DayOfTheWeek = "FRIDAY" 14061 // Saturday. 14062 DayOfTheWeekSaturday DayOfTheWeek = "SATURDAY" 14063 // Sunday. 14064 DayOfTheWeekSunday DayOfTheWeek = "SUNDAY" 14065 ) 14066 14067 var AllDayOfTheWeek = []DayOfTheWeek{ 14068 DayOfTheWeekMonday, 14069 DayOfTheWeekTuesday, 14070 DayOfTheWeekWednesday, 14071 DayOfTheWeekThursday, 14072 DayOfTheWeekFriday, 14073 DayOfTheWeekSaturday, 14074 DayOfTheWeekSunday, 14075 } 14076 14077 func (e DayOfTheWeek) IsValid() bool { 14078 switch e { 14079 case DayOfTheWeekMonday, DayOfTheWeekTuesday, DayOfTheWeekWednesday, DayOfTheWeekThursday, DayOfTheWeekFriday, DayOfTheWeekSaturday, DayOfTheWeekSunday: 14080 return true 14081 } 14082 return false 14083 } 14084 14085 func (e DayOfTheWeek) String() string { 14086 return string(e) 14087 } 14088 14089 func (e *DayOfTheWeek) UnmarshalGQL(v interface{}) error { 14090 str, ok := v.(string) 14091 if !ok { 14092 return fmt.Errorf("enums must be strings") 14093 } 14094 14095 *e = DayOfTheWeek(str) 14096 if !e.IsValid() { 14097 return fmt.Errorf("%s is not a valid DayOfTheWeek", str) 14098 } 14099 return nil 14100 } 14101 14102 func (e DayOfTheWeek) MarshalGQL(w io.Writer) { 14103 fmt.Fprint(w, strconv.Quote(e.String())) 14104 } 14105 14106 // The set of valid sort keys for the DeletionEvent query. 14107 type DeletionEventSortKeys string 14108 14109 const ( 14110 // Sort by the `created_at` value. 14111 DeletionEventSortKeysCreatedAt DeletionEventSortKeys = "CREATED_AT" 14112 // Sort by the `id` value. 14113 DeletionEventSortKeysID DeletionEventSortKeys = "ID" 14114 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 14115 // results by relevance to the search term(s). When no search query is specified, this sort key is not 14116 // deterministic and should not be used. 14117 DeletionEventSortKeysRelevance DeletionEventSortKeys = "RELEVANCE" 14118 ) 14119 14120 var AllDeletionEventSortKeys = []DeletionEventSortKeys{ 14121 DeletionEventSortKeysCreatedAt, 14122 DeletionEventSortKeysID, 14123 DeletionEventSortKeysRelevance, 14124 } 14125 14126 func (e DeletionEventSortKeys) IsValid() bool { 14127 switch e { 14128 case DeletionEventSortKeysCreatedAt, DeletionEventSortKeysID, DeletionEventSortKeysRelevance: 14129 return true 14130 } 14131 return false 14132 } 14133 14134 func (e DeletionEventSortKeys) String() string { 14135 return string(e) 14136 } 14137 14138 func (e *DeletionEventSortKeys) UnmarshalGQL(v interface{}) error { 14139 str, ok := v.(string) 14140 if !ok { 14141 return fmt.Errorf("enums must be strings") 14142 } 14143 14144 *e = DeletionEventSortKeys(str) 14145 if !e.IsValid() { 14146 return fmt.Errorf("%s is not a valid DeletionEventSortKeys", str) 14147 } 14148 return nil 14149 } 14150 14151 func (e DeletionEventSortKeys) MarshalGQL(w io.Writer) { 14152 fmt.Fprint(w, strconv.Quote(e.String())) 14153 } 14154 14155 // The supported subject types of deletion events. 14156 type DeletionEventSubjectType string 14157 14158 const ( 14159 DeletionEventSubjectTypeCollection DeletionEventSubjectType = "COLLECTION" 14160 DeletionEventSubjectTypeProduct DeletionEventSubjectType = "PRODUCT" 14161 ) 14162 14163 var AllDeletionEventSubjectType = []DeletionEventSubjectType{ 14164 DeletionEventSubjectTypeCollection, 14165 DeletionEventSubjectTypeProduct, 14166 } 14167 14168 func (e DeletionEventSubjectType) IsValid() bool { 14169 switch e { 14170 case DeletionEventSubjectTypeCollection, DeletionEventSubjectTypeProduct: 14171 return true 14172 } 14173 return false 14174 } 14175 14176 func (e DeletionEventSubjectType) String() string { 14177 return string(e) 14178 } 14179 14180 func (e *DeletionEventSubjectType) UnmarshalGQL(v interface{}) error { 14181 str, ok := v.(string) 14182 if !ok { 14183 return fmt.Errorf("enums must be strings") 14184 } 14185 14186 *e = DeletionEventSubjectType(str) 14187 if !e.IsValid() { 14188 return fmt.Errorf("%s is not a valid DeletionEventSubjectType", str) 14189 } 14190 return nil 14191 } 14192 14193 func (e DeletionEventSubjectType) MarshalGQL(w io.Writer) { 14194 fmt.Fprint(w, strconv.Quote(e.String())) 14195 } 14196 14197 // The field type that the condition will be applied to. 14198 type DeliveryConditionField string 14199 14200 const ( 14201 // Condition will check against the total weight of the order. 14202 DeliveryConditionFieldTotalWeight DeliveryConditionField = "TOTAL_WEIGHT" 14203 // Condition will check against the total price of the order. 14204 DeliveryConditionFieldTotalPrice DeliveryConditionField = "TOTAL_PRICE" 14205 ) 14206 14207 var AllDeliveryConditionField = []DeliveryConditionField{ 14208 DeliveryConditionFieldTotalWeight, 14209 DeliveryConditionFieldTotalPrice, 14210 } 14211 14212 func (e DeliveryConditionField) IsValid() bool { 14213 switch e { 14214 case DeliveryConditionFieldTotalWeight, DeliveryConditionFieldTotalPrice: 14215 return true 14216 } 14217 return false 14218 } 14219 14220 func (e DeliveryConditionField) String() string { 14221 return string(e) 14222 } 14223 14224 func (e *DeliveryConditionField) UnmarshalGQL(v interface{}) error { 14225 str, ok := v.(string) 14226 if !ok { 14227 return fmt.Errorf("enums must be strings") 14228 } 14229 14230 *e = DeliveryConditionField(str) 14231 if !e.IsValid() { 14232 return fmt.Errorf("%s is not a valid DeliveryConditionField", str) 14233 } 14234 return nil 14235 } 14236 14237 func (e DeliveryConditionField) MarshalGQL(w io.Writer) { 14238 fmt.Fprint(w, strconv.Quote(e.String())) 14239 } 14240 14241 // The operator to use to determine if the condition passes. 14242 type DeliveryConditionOperator string 14243 14244 const ( 14245 // The condition will check if the field is greater than or equal to the criteria. 14246 DeliveryConditionOperatorGreaterThanOrEqualTo DeliveryConditionOperator = "GREATER_THAN_OR_EQUAL_TO" 14247 // The condition will check if the field is less than or equal to the criteria. 14248 DeliveryConditionOperatorLessThanOrEqualTo DeliveryConditionOperator = "LESS_THAN_OR_EQUAL_TO" 14249 ) 14250 14251 var AllDeliveryConditionOperator = []DeliveryConditionOperator{ 14252 DeliveryConditionOperatorGreaterThanOrEqualTo, 14253 DeliveryConditionOperatorLessThanOrEqualTo, 14254 } 14255 14256 func (e DeliveryConditionOperator) IsValid() bool { 14257 switch e { 14258 case DeliveryConditionOperatorGreaterThanOrEqualTo, DeliveryConditionOperatorLessThanOrEqualTo: 14259 return true 14260 } 14261 return false 14262 } 14263 14264 func (e DeliveryConditionOperator) String() string { 14265 return string(e) 14266 } 14267 14268 func (e *DeliveryConditionOperator) UnmarshalGQL(v interface{}) error { 14269 str, ok := v.(string) 14270 if !ok { 14271 return fmt.Errorf("enums must be strings") 14272 } 14273 14274 *e = DeliveryConditionOperator(str) 14275 if !e.IsValid() { 14276 return fmt.Errorf("%s is not a valid DeliveryConditionOperator", str) 14277 } 14278 return nil 14279 } 14280 14281 func (e DeliveryConditionOperator) MarshalGQL(w io.Writer) { 14282 fmt.Fprint(w, strconv.Quote(e.String())) 14283 } 14284 14285 // Reasons the shop is blocked from converting to full multi-location delivery profiles mode. 14286 type DeliveryLegacyModeBlockedReason string 14287 14288 const ( 14289 // Multi-Location is disabled. 14290 DeliveryLegacyModeBlockedReasonMultiLocationDisabled DeliveryLegacyModeBlockedReason = "MULTI_LOCATION_DISABLED" 14291 // No locations that can fulfill online orders. 14292 DeliveryLegacyModeBlockedReasonNoLocationsFulfillingOnlineOrders DeliveryLegacyModeBlockedReason = "NO_LOCATIONS_FULFILLING_ONLINE_ORDERS" 14293 ) 14294 14295 var AllDeliveryLegacyModeBlockedReason = []DeliveryLegacyModeBlockedReason{ 14296 DeliveryLegacyModeBlockedReasonMultiLocationDisabled, 14297 DeliveryLegacyModeBlockedReasonNoLocationsFulfillingOnlineOrders, 14298 } 14299 14300 func (e DeliveryLegacyModeBlockedReason) IsValid() bool { 14301 switch e { 14302 case DeliveryLegacyModeBlockedReasonMultiLocationDisabled, DeliveryLegacyModeBlockedReasonNoLocationsFulfillingOnlineOrders: 14303 return true 14304 } 14305 return false 14306 } 14307 14308 func (e DeliveryLegacyModeBlockedReason) String() string { 14309 return string(e) 14310 } 14311 14312 func (e *DeliveryLegacyModeBlockedReason) UnmarshalGQL(v interface{}) error { 14313 str, ok := v.(string) 14314 if !ok { 14315 return fmt.Errorf("enums must be strings") 14316 } 14317 14318 *e = DeliveryLegacyModeBlockedReason(str) 14319 if !e.IsValid() { 14320 return fmt.Errorf("%s is not a valid DeliveryLegacyModeBlockedReason", str) 14321 } 14322 return nil 14323 } 14324 14325 func (e DeliveryLegacyModeBlockedReason) MarshalGQL(w io.Writer) { 14326 fmt.Fprint(w, strconv.Quote(e.String())) 14327 } 14328 14329 // The different types of method definitions to filter by. 14330 type DeliveryMethodDefinitionType string 14331 14332 const ( 14333 // Static mechant-defined rates. 14334 DeliveryMethodDefinitionTypeMerchant DeliveryMethodDefinitionType = "MERCHANT" 14335 // Dynamic participant rates. 14336 DeliveryMethodDefinitionTypeParticipant DeliveryMethodDefinitionType = "PARTICIPANT" 14337 ) 14338 14339 var AllDeliveryMethodDefinitionType = []DeliveryMethodDefinitionType{ 14340 DeliveryMethodDefinitionTypeMerchant, 14341 DeliveryMethodDefinitionTypeParticipant, 14342 } 14343 14344 func (e DeliveryMethodDefinitionType) IsValid() bool { 14345 switch e { 14346 case DeliveryMethodDefinitionTypeMerchant, DeliveryMethodDefinitionTypeParticipant: 14347 return true 14348 } 14349 return false 14350 } 14351 14352 func (e DeliveryMethodDefinitionType) String() string { 14353 return string(e) 14354 } 14355 14356 func (e *DeliveryMethodDefinitionType) UnmarshalGQL(v interface{}) error { 14357 str, ok := v.(string) 14358 if !ok { 14359 return fmt.Errorf("enums must be strings") 14360 } 14361 14362 *e = DeliveryMethodDefinitionType(str) 14363 if !e.IsValid() { 14364 return fmt.Errorf("%s is not a valid DeliveryMethodDefinitionType", str) 14365 } 14366 return nil 14367 } 14368 14369 func (e DeliveryMethodDefinitionType) MarshalGQL(w io.Writer) { 14370 fmt.Fprint(w, strconv.Quote(e.String())) 14371 } 14372 14373 // Possible method types that a delivery method can have. 14374 type DeliveryMethodType string 14375 14376 const ( 14377 // Shipping delivery method. 14378 DeliveryMethodTypeShipping DeliveryMethodType = "SHIPPING" 14379 // Pick-up delivery method. 14380 DeliveryMethodTypePickUp DeliveryMethodType = "PICK_UP" 14381 // No delivery method. 14382 DeliveryMethodTypeNone DeliveryMethodType = "NONE" 14383 // Retail delivery method represents items delivered immediately in a retail store. 14384 DeliveryMethodTypeRetail DeliveryMethodType = "RETAIL" 14385 // Local delivery method. 14386 DeliveryMethodTypeLocal DeliveryMethodType = "LOCAL" 14387 ) 14388 14389 var AllDeliveryMethodType = []DeliveryMethodType{ 14390 DeliveryMethodTypeShipping, 14391 DeliveryMethodTypePickUp, 14392 DeliveryMethodTypeNone, 14393 DeliveryMethodTypeRetail, 14394 DeliveryMethodTypeLocal, 14395 } 14396 14397 func (e DeliveryMethodType) IsValid() bool { 14398 switch e { 14399 case DeliveryMethodTypeShipping, DeliveryMethodTypePickUp, DeliveryMethodTypeNone, DeliveryMethodTypeRetail, DeliveryMethodTypeLocal: 14400 return true 14401 } 14402 return false 14403 } 14404 14405 func (e DeliveryMethodType) String() string { 14406 return string(e) 14407 } 14408 14409 func (e *DeliveryMethodType) UnmarshalGQL(v interface{}) error { 14410 str, ok := v.(string) 14411 if !ok { 14412 return fmt.Errorf("enums must be strings") 14413 } 14414 14415 *e = DeliveryMethodType(str) 14416 if !e.IsValid() { 14417 return fmt.Errorf("%s is not a valid DeliveryMethodType", str) 14418 } 14419 return nil 14420 } 14421 14422 func (e DeliveryMethodType) MarshalGQL(w io.Writer) { 14423 fmt.Fprint(w, strconv.Quote(e.String())) 14424 } 14425 14426 // Digital wallet, such as Apple Pay, which can be used for accelerated checkouts. 14427 type DigitalWallet string 14428 14429 const ( 14430 // Apple Pay. 14431 DigitalWalletApplePay DigitalWallet = "APPLE_PAY" 14432 // Android Pay. 14433 DigitalWalletAndroidPay DigitalWallet = "ANDROID_PAY" 14434 // Google Pay. 14435 DigitalWalletGooglePay DigitalWallet = "GOOGLE_PAY" 14436 // Shopify Pay. 14437 DigitalWalletShopifyPay DigitalWallet = "SHOPIFY_PAY" 14438 ) 14439 14440 var AllDigitalWallet = []DigitalWallet{ 14441 DigitalWalletApplePay, 14442 DigitalWalletAndroidPay, 14443 DigitalWalletGooglePay, 14444 DigitalWalletShopifyPay, 14445 } 14446 14447 func (e DigitalWallet) IsValid() bool { 14448 switch e { 14449 case DigitalWalletApplePay, DigitalWalletAndroidPay, DigitalWalletGooglePay, DigitalWalletShopifyPay: 14450 return true 14451 } 14452 return false 14453 } 14454 14455 func (e DigitalWallet) String() string { 14456 return string(e) 14457 } 14458 14459 func (e *DigitalWallet) UnmarshalGQL(v interface{}) error { 14460 str, ok := v.(string) 14461 if !ok { 14462 return fmt.Errorf("enums must be strings") 14463 } 14464 14465 *e = DigitalWallet(str) 14466 if !e.IsValid() { 14467 return fmt.Errorf("%s is not a valid DigitalWallet", str) 14468 } 14469 return nil 14470 } 14471 14472 func (e DigitalWallet) MarshalGQL(w io.Writer) { 14473 fmt.Fprint(w, strconv.Quote(e.String())) 14474 } 14475 14476 // The method by which the discount's value is allocated onto its entitled lines. 14477 type DiscountApplicationAllocationMethod string 14478 14479 const ( 14480 // The value is spread across all entitled lines. 14481 DiscountApplicationAllocationMethodAcross DiscountApplicationAllocationMethod = "ACROSS" 14482 // The value is applied onto every entitled line. 14483 DiscountApplicationAllocationMethodEach DiscountApplicationAllocationMethod = "EACH" 14484 // The value is specifically applied onto a particular line. 14485 DiscountApplicationAllocationMethodOne DiscountApplicationAllocationMethod = "ONE" 14486 ) 14487 14488 var AllDiscountApplicationAllocationMethod = []DiscountApplicationAllocationMethod{ 14489 DiscountApplicationAllocationMethodAcross, 14490 DiscountApplicationAllocationMethodEach, 14491 DiscountApplicationAllocationMethodOne, 14492 } 14493 14494 func (e DiscountApplicationAllocationMethod) IsValid() bool { 14495 switch e { 14496 case DiscountApplicationAllocationMethodAcross, DiscountApplicationAllocationMethodEach, DiscountApplicationAllocationMethodOne: 14497 return true 14498 } 14499 return false 14500 } 14501 14502 func (e DiscountApplicationAllocationMethod) String() string { 14503 return string(e) 14504 } 14505 14506 func (e *DiscountApplicationAllocationMethod) UnmarshalGQL(v interface{}) error { 14507 str, ok := v.(string) 14508 if !ok { 14509 return fmt.Errorf("enums must be strings") 14510 } 14511 14512 *e = DiscountApplicationAllocationMethod(str) 14513 if !e.IsValid() { 14514 return fmt.Errorf("%s is not a valid DiscountApplicationAllocationMethod", str) 14515 } 14516 return nil 14517 } 14518 14519 func (e DiscountApplicationAllocationMethod) MarshalGQL(w io.Writer) { 14520 fmt.Fprint(w, strconv.Quote(e.String())) 14521 } 14522 14523 // The method by which the discount's value is allocated onto its entitled lines. 14524 type DiscountApplicationLevel string 14525 14526 const ( 14527 // The discount was applied at the order level. 14528 // Order level discounts are not factored into the discountedUnitPriceSet on line items. 14529 DiscountApplicationLevelOrder DiscountApplicationLevel = "ORDER" 14530 // The discount was applied at the line level. 14531 // Line level discounts are factored into the discountedUnitPriceSet on line items. 14532 DiscountApplicationLevelLine DiscountApplicationLevel = "LINE" 14533 ) 14534 14535 var AllDiscountApplicationLevel = []DiscountApplicationLevel{ 14536 DiscountApplicationLevelOrder, 14537 DiscountApplicationLevelLine, 14538 } 14539 14540 func (e DiscountApplicationLevel) IsValid() bool { 14541 switch e { 14542 case DiscountApplicationLevelOrder, DiscountApplicationLevelLine: 14543 return true 14544 } 14545 return false 14546 } 14547 14548 func (e DiscountApplicationLevel) String() string { 14549 return string(e) 14550 } 14551 14552 func (e *DiscountApplicationLevel) UnmarshalGQL(v interface{}) error { 14553 str, ok := v.(string) 14554 if !ok { 14555 return fmt.Errorf("enums must be strings") 14556 } 14557 14558 *e = DiscountApplicationLevel(str) 14559 if !e.IsValid() { 14560 return fmt.Errorf("%s is not a valid DiscountApplicationLevel", str) 14561 } 14562 return nil 14563 } 14564 14565 func (e DiscountApplicationLevel) MarshalGQL(w io.Writer) { 14566 fmt.Fprint(w, strconv.Quote(e.String())) 14567 } 14568 14569 // Which lines on the order that the discount is allocated over, of the type 14570 // defined by the Discount Application's target_type. 14571 type DiscountApplicationTargetSelection string 14572 14573 const ( 14574 // The discount is allocated onto all the lines. 14575 DiscountApplicationTargetSelectionAll DiscountApplicationTargetSelection = "ALL" 14576 // The discount is allocated onto only the lines it is entitled for. 14577 DiscountApplicationTargetSelectionEntitled DiscountApplicationTargetSelection = "ENTITLED" 14578 // The discount is allocated onto explicitly chosen lines. 14579 DiscountApplicationTargetSelectionExplicit DiscountApplicationTargetSelection = "EXPLICIT" 14580 ) 14581 14582 var AllDiscountApplicationTargetSelection = []DiscountApplicationTargetSelection{ 14583 DiscountApplicationTargetSelectionAll, 14584 DiscountApplicationTargetSelectionEntitled, 14585 DiscountApplicationTargetSelectionExplicit, 14586 } 14587 14588 func (e DiscountApplicationTargetSelection) IsValid() bool { 14589 switch e { 14590 case DiscountApplicationTargetSelectionAll, DiscountApplicationTargetSelectionEntitled, DiscountApplicationTargetSelectionExplicit: 14591 return true 14592 } 14593 return false 14594 } 14595 14596 func (e DiscountApplicationTargetSelection) String() string { 14597 return string(e) 14598 } 14599 14600 func (e *DiscountApplicationTargetSelection) UnmarshalGQL(v interface{}) error { 14601 str, ok := v.(string) 14602 if !ok { 14603 return fmt.Errorf("enums must be strings") 14604 } 14605 14606 *e = DiscountApplicationTargetSelection(str) 14607 if !e.IsValid() { 14608 return fmt.Errorf("%s is not a valid DiscountApplicationTargetSelection", str) 14609 } 14610 return nil 14611 } 14612 14613 func (e DiscountApplicationTargetSelection) MarshalGQL(w io.Writer) { 14614 fmt.Fprint(w, strconv.Quote(e.String())) 14615 } 14616 14617 // The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. 14618 type DiscountApplicationTargetType string 14619 14620 const ( 14621 // The discount applies onto line items. 14622 DiscountApplicationTargetTypeLineItem DiscountApplicationTargetType = "LINE_ITEM" 14623 // The discount applies onto shipping lines. 14624 DiscountApplicationTargetTypeShippingLine DiscountApplicationTargetType = "SHIPPING_LINE" 14625 ) 14626 14627 var AllDiscountApplicationTargetType = []DiscountApplicationTargetType{ 14628 DiscountApplicationTargetTypeLineItem, 14629 DiscountApplicationTargetTypeShippingLine, 14630 } 14631 14632 func (e DiscountApplicationTargetType) IsValid() bool { 14633 switch e { 14634 case DiscountApplicationTargetTypeLineItem, DiscountApplicationTargetTypeShippingLine: 14635 return true 14636 } 14637 return false 14638 } 14639 14640 func (e DiscountApplicationTargetType) String() string { 14641 return string(e) 14642 } 14643 14644 func (e *DiscountApplicationTargetType) UnmarshalGQL(v interface{}) error { 14645 str, ok := v.(string) 14646 if !ok { 14647 return fmt.Errorf("enums must be strings") 14648 } 14649 14650 *e = DiscountApplicationTargetType(str) 14651 if !e.IsValid() { 14652 return fmt.Errorf("%s is not a valid DiscountApplicationTargetType", str) 14653 } 14654 return nil 14655 } 14656 14657 func (e DiscountApplicationTargetType) MarshalGQL(w io.Writer) { 14658 fmt.Fprint(w, strconv.Quote(e.String())) 14659 } 14660 14661 // The set of valid sort keys for the DiscountCode query. 14662 type DiscountCodeSortKeys string 14663 14664 const ( 14665 // Sort by the `code` value. 14666 DiscountCodeSortKeysCode DiscountCodeSortKeys = "CODE" 14667 // Sort by the `created_at` value. 14668 DiscountCodeSortKeysCreatedAt DiscountCodeSortKeys = "CREATED_AT" 14669 // Sort by the `id` value. 14670 DiscountCodeSortKeysID DiscountCodeSortKeys = "ID" 14671 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 14672 // results by relevance to the search term(s). When no search query is specified, this sort key is not 14673 // deterministic and should not be used. 14674 DiscountCodeSortKeysRelevance DiscountCodeSortKeys = "RELEVANCE" 14675 ) 14676 14677 var AllDiscountCodeSortKeys = []DiscountCodeSortKeys{ 14678 DiscountCodeSortKeysCode, 14679 DiscountCodeSortKeysCreatedAt, 14680 DiscountCodeSortKeysID, 14681 DiscountCodeSortKeysRelevance, 14682 } 14683 14684 func (e DiscountCodeSortKeys) IsValid() bool { 14685 switch e { 14686 case DiscountCodeSortKeysCode, DiscountCodeSortKeysCreatedAt, DiscountCodeSortKeysID, DiscountCodeSortKeysRelevance: 14687 return true 14688 } 14689 return false 14690 } 14691 14692 func (e DiscountCodeSortKeys) String() string { 14693 return string(e) 14694 } 14695 14696 func (e *DiscountCodeSortKeys) UnmarshalGQL(v interface{}) error { 14697 str, ok := v.(string) 14698 if !ok { 14699 return fmt.Errorf("enums must be strings") 14700 } 14701 14702 *e = DiscountCodeSortKeys(str) 14703 if !e.IsValid() { 14704 return fmt.Errorf("%s is not a valid DiscountCodeSortKeys", str) 14705 } 14706 return nil 14707 } 14708 14709 func (e DiscountCodeSortKeys) MarshalGQL(w io.Writer) { 14710 fmt.Fprint(w, strconv.Quote(e.String())) 14711 } 14712 14713 // Possible error codes that could be returned by DiscountUserError. 14714 type DiscountErrorCode string 14715 14716 const ( 14717 // Input value is blank. 14718 DiscountErrorCodeBlank DiscountErrorCode = "BLANK" 14719 // Input value is not present. 14720 DiscountErrorCodePresent DiscountErrorCode = "PRESENT" 14721 // Input value should be equal to allowed value. 14722 DiscountErrorCodeEqualTo DiscountErrorCode = "EQUAL_TO" 14723 // Input value should be greater than minimum allowed value. 14724 DiscountErrorCodeGreaterThan DiscountErrorCode = "GREATER_THAN" 14725 // Input value should be greater than or equal to minimum allowed value. 14726 DiscountErrorCodeGreaterThanOrEqualTo DiscountErrorCode = "GREATER_THAN_OR_EQUAL_TO" 14727 // Input value is invalid. 14728 DiscountErrorCodeInvalid DiscountErrorCode = "INVALID" 14729 // Input value should be less or equal to maximum allowed value. 14730 DiscountErrorCodeLessThanOrEqualTo DiscountErrorCode = "LESS_THAN_OR_EQUAL_TO" 14731 // Input value should be less than maximum allowed value. 14732 DiscountErrorCodeLessThan DiscountErrorCode = "LESS_THAN" 14733 // Input value is already taken. 14734 DiscountErrorCodeTaken DiscountErrorCode = "TAKEN" 14735 // Input value is too long. 14736 DiscountErrorCodeTooLong DiscountErrorCode = "TOO_LONG" 14737 // Input value is too short. 14738 DiscountErrorCodeTooShort DiscountErrorCode = "TOO_SHORT" 14739 // Unexpected internal error happened. 14740 DiscountErrorCodeInternalError DiscountErrorCode = "INTERNAL_ERROR" 14741 // Too many arguments provided. 14742 DiscountErrorCodeTooManyArguments DiscountErrorCode = "TOO_MANY_ARGUMENTS" 14743 // Missing a required argument. 14744 DiscountErrorCodeMissingArgument DiscountErrorCode = "MISSING_ARGUMENT" 14745 // Value is outside allowed range. 14746 DiscountErrorCodeValueOutsideRange DiscountErrorCode = "VALUE_OUTSIDE_RANGE" 14747 // Cannot have both minimum subtotal and quantity present. 14748 DiscountErrorCodeMinimumSubtotalAndQuantityRangeBothPresent DiscountErrorCode = "MINIMUM_SUBTOTAL_AND_QUANTITY_RANGE_BOTH_PRESENT" 14749 // Exceeded maximum allowed value. 14750 DiscountErrorCodeExceededMax DiscountErrorCode = "EXCEEDED_MAX" 14751 // Active period overlaps with other automatic discounts. At any given time, only one automatic discount can be active. 14752 DiscountErrorCodeActivePeriodOverlap DiscountErrorCode = "ACTIVE_PERIOD_OVERLAP" 14753 // Attribute selection contains conflicting settings. 14754 DiscountErrorCodeConflict DiscountErrorCode = "CONFLICT" 14755 // Value is already present through another selection. 14756 DiscountErrorCodeImplicitDuplicate DiscountErrorCode = "IMPLICIT_DUPLICATE" 14757 // Input value is already present. 14758 DiscountErrorCodeDuplicate DiscountErrorCode = "DUPLICATE" 14759 // Input value is not included in the list. 14760 DiscountErrorCodeInclusion DiscountErrorCode = "INCLUSION" 14761 ) 14762 14763 var AllDiscountErrorCode = []DiscountErrorCode{ 14764 DiscountErrorCodeBlank, 14765 DiscountErrorCodePresent, 14766 DiscountErrorCodeEqualTo, 14767 DiscountErrorCodeGreaterThan, 14768 DiscountErrorCodeGreaterThanOrEqualTo, 14769 DiscountErrorCodeInvalid, 14770 DiscountErrorCodeLessThanOrEqualTo, 14771 DiscountErrorCodeLessThan, 14772 DiscountErrorCodeTaken, 14773 DiscountErrorCodeTooLong, 14774 DiscountErrorCodeTooShort, 14775 DiscountErrorCodeInternalError, 14776 DiscountErrorCodeTooManyArguments, 14777 DiscountErrorCodeMissingArgument, 14778 DiscountErrorCodeValueOutsideRange, 14779 DiscountErrorCodeMinimumSubtotalAndQuantityRangeBothPresent, 14780 DiscountErrorCodeExceededMax, 14781 DiscountErrorCodeActivePeriodOverlap, 14782 DiscountErrorCodeConflict, 14783 DiscountErrorCodeImplicitDuplicate, 14784 DiscountErrorCodeDuplicate, 14785 DiscountErrorCodeInclusion, 14786 } 14787 14788 func (e DiscountErrorCode) IsValid() bool { 14789 switch e { 14790 case DiscountErrorCodeBlank, DiscountErrorCodePresent, DiscountErrorCodeEqualTo, DiscountErrorCodeGreaterThan, DiscountErrorCodeGreaterThanOrEqualTo, DiscountErrorCodeInvalid, DiscountErrorCodeLessThanOrEqualTo, DiscountErrorCodeLessThan, DiscountErrorCodeTaken, DiscountErrorCodeTooLong, DiscountErrorCodeTooShort, DiscountErrorCodeInternalError, DiscountErrorCodeTooManyArguments, DiscountErrorCodeMissingArgument, DiscountErrorCodeValueOutsideRange, DiscountErrorCodeMinimumSubtotalAndQuantityRangeBothPresent, DiscountErrorCodeExceededMax, DiscountErrorCodeActivePeriodOverlap, DiscountErrorCodeConflict, DiscountErrorCodeImplicitDuplicate, DiscountErrorCodeDuplicate, DiscountErrorCodeInclusion: 14791 return true 14792 } 14793 return false 14794 } 14795 14796 func (e DiscountErrorCode) String() string { 14797 return string(e) 14798 } 14799 14800 func (e *DiscountErrorCode) UnmarshalGQL(v interface{}) error { 14801 str, ok := v.(string) 14802 if !ok { 14803 return fmt.Errorf("enums must be strings") 14804 } 14805 14806 *e = DiscountErrorCode(str) 14807 if !e.IsValid() { 14808 return fmt.Errorf("%s is not a valid DiscountErrorCode", str) 14809 } 14810 return nil 14811 } 14812 14813 func (e DiscountErrorCode) MarshalGQL(w io.Writer) { 14814 fmt.Fprint(w, strconv.Quote(e.String())) 14815 } 14816 14817 // The page type where shareable URL lands. 14818 type DiscountShareableURLTargetType string 14819 14820 const ( 14821 // The home page type. 14822 DiscountShareableURLTargetTypeHome DiscountShareableURLTargetType = "HOME" 14823 // The product page type. 14824 DiscountShareableURLTargetTypeProduct DiscountShareableURLTargetType = "PRODUCT" 14825 // The collection page type. 14826 DiscountShareableURLTargetTypeCollection DiscountShareableURLTargetType = "COLLECTION" 14827 ) 14828 14829 var AllDiscountShareableURLTargetType = []DiscountShareableURLTargetType{ 14830 DiscountShareableURLTargetTypeHome, 14831 DiscountShareableURLTargetTypeProduct, 14832 DiscountShareableURLTargetTypeCollection, 14833 } 14834 14835 func (e DiscountShareableURLTargetType) IsValid() bool { 14836 switch e { 14837 case DiscountShareableURLTargetTypeHome, DiscountShareableURLTargetTypeProduct, DiscountShareableURLTargetTypeCollection: 14838 return true 14839 } 14840 return false 14841 } 14842 14843 func (e DiscountShareableURLTargetType) String() string { 14844 return string(e) 14845 } 14846 14847 func (e *DiscountShareableURLTargetType) UnmarshalGQL(v interface{}) error { 14848 str, ok := v.(string) 14849 if !ok { 14850 return fmt.Errorf("enums must be strings") 14851 } 14852 14853 *e = DiscountShareableURLTargetType(str) 14854 if !e.IsValid() { 14855 return fmt.Errorf("%s is not a valid DiscountShareableUrlTargetType", str) 14856 } 14857 return nil 14858 } 14859 14860 func (e DiscountShareableURLTargetType) MarshalGQL(w io.Writer) { 14861 fmt.Fprint(w, strconv.Quote(e.String())) 14862 } 14863 14864 // The status of the discount. 14865 type DiscountStatus string 14866 14867 const ( 14868 // The discount is active. 14869 DiscountStatusActive DiscountStatus = "ACTIVE" 14870 // The discount is expired. 14871 DiscountStatusExpired DiscountStatus = "EXPIRED" 14872 // The discount is scheduled. 14873 DiscountStatusScheduled DiscountStatus = "SCHEDULED" 14874 ) 14875 14876 var AllDiscountStatus = []DiscountStatus{ 14877 DiscountStatusActive, 14878 DiscountStatusExpired, 14879 DiscountStatusScheduled, 14880 } 14881 14882 func (e DiscountStatus) IsValid() bool { 14883 switch e { 14884 case DiscountStatusActive, DiscountStatusExpired, DiscountStatusScheduled: 14885 return true 14886 } 14887 return false 14888 } 14889 14890 func (e DiscountStatus) String() string { 14891 return string(e) 14892 } 14893 14894 func (e *DiscountStatus) UnmarshalGQL(v interface{}) error { 14895 str, ok := v.(string) 14896 if !ok { 14897 return fmt.Errorf("enums must be strings") 14898 } 14899 14900 *e = DiscountStatus(str) 14901 if !e.IsValid() { 14902 return fmt.Errorf("%s is not a valid DiscountStatus", str) 14903 } 14904 return nil 14905 } 14906 14907 func (e DiscountStatus) MarshalGQL(w io.Writer) { 14908 fmt.Fprint(w, strconv.Quote(e.String())) 14909 } 14910 14911 // The type of line a subscription discount is applied on. 14912 type DiscountTargetType string 14913 14914 const ( 14915 // Line item. 14916 DiscountTargetTypeLineItem DiscountTargetType = "LINE_ITEM" 14917 // Shipping line. 14918 DiscountTargetTypeShippingLine DiscountTargetType = "SHIPPING_LINE" 14919 ) 14920 14921 var AllDiscountTargetType = []DiscountTargetType{ 14922 DiscountTargetTypeLineItem, 14923 DiscountTargetTypeShippingLine, 14924 } 14925 14926 func (e DiscountTargetType) IsValid() bool { 14927 switch e { 14928 case DiscountTargetTypeLineItem, DiscountTargetTypeShippingLine: 14929 return true 14930 } 14931 return false 14932 } 14933 14934 func (e DiscountTargetType) String() string { 14935 return string(e) 14936 } 14937 14938 func (e *DiscountTargetType) UnmarshalGQL(v interface{}) error { 14939 str, ok := v.(string) 14940 if !ok { 14941 return fmt.Errorf("enums must be strings") 14942 } 14943 14944 *e = DiscountTargetType(str) 14945 if !e.IsValid() { 14946 return fmt.Errorf("%s is not a valid DiscountTargetType", str) 14947 } 14948 return nil 14949 } 14950 14951 func (e DiscountTargetType) MarshalGQL(w io.Writer) { 14952 fmt.Fprint(w, strconv.Quote(e.String())) 14953 } 14954 14955 // The original type of the discount. 14956 type DiscountType string 14957 14958 const ( 14959 // Manual discount type. 14960 DiscountTypeManual DiscountType = "MANUAL" 14961 // Code discount type. 14962 DiscountTypeCodeDiscount DiscountType = "CODE_DISCOUNT" 14963 ) 14964 14965 var AllDiscountType = []DiscountType{ 14966 DiscountTypeManual, 14967 DiscountTypeCodeDiscount, 14968 } 14969 14970 func (e DiscountType) IsValid() bool { 14971 switch e { 14972 case DiscountTypeManual, DiscountTypeCodeDiscount: 14973 return true 14974 } 14975 return false 14976 } 14977 14978 func (e DiscountType) String() string { 14979 return string(e) 14980 } 14981 14982 func (e *DiscountType) UnmarshalGQL(v interface{}) error { 14983 str, ok := v.(string) 14984 if !ok { 14985 return fmt.Errorf("enums must be strings") 14986 } 14987 14988 *e = DiscountType(str) 14989 if !e.IsValid() { 14990 return fmt.Errorf("%s is not a valid DiscountType", str) 14991 } 14992 return nil 14993 } 14994 14995 func (e DiscountType) MarshalGQL(w io.Writer) { 14996 fmt.Fprint(w, strconv.Quote(e.String())) 14997 } 14998 14999 // The possible statuses of a dispute. 15000 type DisputeStatus string 15001 15002 const ( 15003 DisputeStatusNeedsResponse DisputeStatus = "NEEDS_RESPONSE" 15004 DisputeStatusUnderReview DisputeStatus = "UNDER_REVIEW" 15005 DisputeStatusChargeRefunded DisputeStatus = "CHARGE_REFUNDED" 15006 DisputeStatusAccepted DisputeStatus = "ACCEPTED" 15007 DisputeStatusWon DisputeStatus = "WON" 15008 DisputeStatusLost DisputeStatus = "LOST" 15009 ) 15010 15011 var AllDisputeStatus = []DisputeStatus{ 15012 DisputeStatusNeedsResponse, 15013 DisputeStatusUnderReview, 15014 DisputeStatusChargeRefunded, 15015 DisputeStatusAccepted, 15016 DisputeStatusWon, 15017 DisputeStatusLost, 15018 } 15019 15020 func (e DisputeStatus) IsValid() bool { 15021 switch e { 15022 case DisputeStatusNeedsResponse, DisputeStatusUnderReview, DisputeStatusChargeRefunded, DisputeStatusAccepted, DisputeStatusWon, DisputeStatusLost: 15023 return true 15024 } 15025 return false 15026 } 15027 15028 func (e DisputeStatus) String() string { 15029 return string(e) 15030 } 15031 15032 func (e *DisputeStatus) UnmarshalGQL(v interface{}) error { 15033 str, ok := v.(string) 15034 if !ok { 15035 return fmt.Errorf("enums must be strings") 15036 } 15037 15038 *e = DisputeStatus(str) 15039 if !e.IsValid() { 15040 return fmt.Errorf("%s is not a valid DisputeStatus", str) 15041 } 15042 return nil 15043 } 15044 15045 func (e DisputeStatus) MarshalGQL(w io.Writer) { 15046 fmt.Fprint(w, strconv.Quote(e.String())) 15047 } 15048 15049 // The possible types for a dispute. 15050 type DisputeType string 15051 15052 const ( 15053 // The dispute has turned into a chargeback. 15054 DisputeTypeChargeback DisputeType = "CHARGEBACK" 15055 // The dispute is in the inquiry phase. 15056 DisputeTypeInquiry DisputeType = "INQUIRY" 15057 ) 15058 15059 var AllDisputeType = []DisputeType{ 15060 DisputeTypeChargeback, 15061 DisputeTypeInquiry, 15062 } 15063 15064 func (e DisputeType) IsValid() bool { 15065 switch e { 15066 case DisputeTypeChargeback, DisputeTypeInquiry: 15067 return true 15068 } 15069 return false 15070 } 15071 15072 func (e DisputeType) String() string { 15073 return string(e) 15074 } 15075 15076 func (e *DisputeType) UnmarshalGQL(v interface{}) error { 15077 str, ok := v.(string) 15078 if !ok { 15079 return fmt.Errorf("enums must be strings") 15080 } 15081 15082 *e = DisputeType(str) 15083 if !e.IsValid() { 15084 return fmt.Errorf("%s is not a valid DisputeType", str) 15085 } 15086 return nil 15087 } 15088 15089 func (e DisputeType) MarshalGQL(w io.Writer) { 15090 fmt.Fprint(w, strconv.Quote(e.String())) 15091 } 15092 15093 // The valid discount types that can be applied to a draft order. 15094 type DraftOrderAppliedDiscountType string 15095 15096 const ( 15097 // A fixed amount in the store's currency. 15098 DraftOrderAppliedDiscountTypeFixedAmount DraftOrderAppliedDiscountType = "FIXED_AMOUNT" 15099 // A percentage of the order subtotal. 15100 DraftOrderAppliedDiscountTypePercentage DraftOrderAppliedDiscountType = "PERCENTAGE" 15101 ) 15102 15103 var AllDraftOrderAppliedDiscountType = []DraftOrderAppliedDiscountType{ 15104 DraftOrderAppliedDiscountTypeFixedAmount, 15105 DraftOrderAppliedDiscountTypePercentage, 15106 } 15107 15108 func (e DraftOrderAppliedDiscountType) IsValid() bool { 15109 switch e { 15110 case DraftOrderAppliedDiscountTypeFixedAmount, DraftOrderAppliedDiscountTypePercentage: 15111 return true 15112 } 15113 return false 15114 } 15115 15116 func (e DraftOrderAppliedDiscountType) String() string { 15117 return string(e) 15118 } 15119 15120 func (e *DraftOrderAppliedDiscountType) UnmarshalGQL(v interface{}) error { 15121 str, ok := v.(string) 15122 if !ok { 15123 return fmt.Errorf("enums must be strings") 15124 } 15125 15126 *e = DraftOrderAppliedDiscountType(str) 15127 if !e.IsValid() { 15128 return fmt.Errorf("%s is not a valid DraftOrderAppliedDiscountType", str) 15129 } 15130 return nil 15131 } 15132 15133 func (e DraftOrderAppliedDiscountType) MarshalGQL(w io.Writer) { 15134 fmt.Fprint(w, strconv.Quote(e.String())) 15135 } 15136 15137 // The set of valid sort keys for the DraftOrder query. 15138 type DraftOrderSortKeys string 15139 15140 const ( 15141 // Sort by the `number` value. 15142 DraftOrderSortKeysNumber DraftOrderSortKeys = "NUMBER" 15143 // Sort by the `updated_at` value. 15144 DraftOrderSortKeysUpdatedAt DraftOrderSortKeys = "UPDATED_AT" 15145 // Sort by the `status` value. 15146 DraftOrderSortKeysStatus DraftOrderSortKeys = "STATUS" 15147 // Sort by the `total_price` value. 15148 DraftOrderSortKeysTotalPrice DraftOrderSortKeys = "TOTAL_PRICE" 15149 // Sort by the `customer_name` value. 15150 DraftOrderSortKeysCustomerName DraftOrderSortKeys = "CUSTOMER_NAME" 15151 // Sort by the `id` value. 15152 DraftOrderSortKeysID DraftOrderSortKeys = "ID" 15153 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 15154 // results by relevance to the search term(s). When no search query is specified, this sort key is not 15155 // deterministic and should not be used. 15156 DraftOrderSortKeysRelevance DraftOrderSortKeys = "RELEVANCE" 15157 ) 15158 15159 var AllDraftOrderSortKeys = []DraftOrderSortKeys{ 15160 DraftOrderSortKeysNumber, 15161 DraftOrderSortKeysUpdatedAt, 15162 DraftOrderSortKeysStatus, 15163 DraftOrderSortKeysTotalPrice, 15164 DraftOrderSortKeysCustomerName, 15165 DraftOrderSortKeysID, 15166 DraftOrderSortKeysRelevance, 15167 } 15168 15169 func (e DraftOrderSortKeys) IsValid() bool { 15170 switch e { 15171 case DraftOrderSortKeysNumber, DraftOrderSortKeysUpdatedAt, DraftOrderSortKeysStatus, DraftOrderSortKeysTotalPrice, DraftOrderSortKeysCustomerName, DraftOrderSortKeysID, DraftOrderSortKeysRelevance: 15172 return true 15173 } 15174 return false 15175 } 15176 15177 func (e DraftOrderSortKeys) String() string { 15178 return string(e) 15179 } 15180 15181 func (e *DraftOrderSortKeys) UnmarshalGQL(v interface{}) error { 15182 str, ok := v.(string) 15183 if !ok { 15184 return fmt.Errorf("enums must be strings") 15185 } 15186 15187 *e = DraftOrderSortKeys(str) 15188 if !e.IsValid() { 15189 return fmt.Errorf("%s is not a valid DraftOrderSortKeys", str) 15190 } 15191 return nil 15192 } 15193 15194 func (e DraftOrderSortKeys) MarshalGQL(w io.Writer) { 15195 fmt.Fprint(w, strconv.Quote(e.String())) 15196 } 15197 15198 // The valid statuses for a draft order. 15199 type DraftOrderStatus string 15200 15201 const ( 15202 // The draft order has been paid. 15203 DraftOrderStatusCompleted DraftOrderStatus = "COMPLETED" 15204 // An invoice for the draft order has been sent to the customer. 15205 DraftOrderStatusInvoiceSent DraftOrderStatus = "INVOICE_SENT" 15206 // The draft order is open. It has not been paid, and an invoice hasn't been sent. 15207 DraftOrderStatusOpen DraftOrderStatus = "OPEN" 15208 ) 15209 15210 var AllDraftOrderStatus = []DraftOrderStatus{ 15211 DraftOrderStatusCompleted, 15212 DraftOrderStatusInvoiceSent, 15213 DraftOrderStatusOpen, 15214 } 15215 15216 func (e DraftOrderStatus) IsValid() bool { 15217 switch e { 15218 case DraftOrderStatusCompleted, DraftOrderStatusInvoiceSent, DraftOrderStatusOpen: 15219 return true 15220 } 15221 return false 15222 } 15223 15224 func (e DraftOrderStatus) String() string { 15225 return string(e) 15226 } 15227 15228 func (e *DraftOrderStatus) UnmarshalGQL(v interface{}) error { 15229 str, ok := v.(string) 15230 if !ok { 15231 return fmt.Errorf("enums must be strings") 15232 } 15233 15234 *e = DraftOrderStatus(str) 15235 if !e.IsValid() { 15236 return fmt.Errorf("%s is not a valid DraftOrderStatus", str) 15237 } 15238 return nil 15239 } 15240 15241 func (e DraftOrderStatus) MarshalGQL(w io.Writer) { 15242 fmt.Fprint(w, strconv.Quote(e.String())) 15243 } 15244 15245 // The set of valid sort keys for the Event query. 15246 type EventSortKeys string 15247 15248 const ( 15249 // Sort by the `created_at` value. 15250 EventSortKeysCreatedAt EventSortKeys = "CREATED_AT" 15251 // Sort by the `id` value. 15252 EventSortKeysID EventSortKeys = "ID" 15253 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 15254 // results by relevance to the search term(s). When no search query is specified, this sort key is not 15255 // deterministic and should not be used. 15256 EventSortKeysRelevance EventSortKeys = "RELEVANCE" 15257 ) 15258 15259 var AllEventSortKeys = []EventSortKeys{ 15260 EventSortKeysCreatedAt, 15261 EventSortKeysID, 15262 EventSortKeysRelevance, 15263 } 15264 15265 func (e EventSortKeys) IsValid() bool { 15266 switch e { 15267 case EventSortKeysCreatedAt, EventSortKeysID, EventSortKeysRelevance: 15268 return true 15269 } 15270 return false 15271 } 15272 15273 func (e EventSortKeys) String() string { 15274 return string(e) 15275 } 15276 15277 func (e *EventSortKeys) UnmarshalGQL(v interface{}) error { 15278 str, ok := v.(string) 15279 if !ok { 15280 return fmt.Errorf("enums must be strings") 15281 } 15282 15283 *e = EventSortKeys(str) 15284 if !e.IsValid() { 15285 return fmt.Errorf("%s is not a valid EventSortKeys", str) 15286 } 15287 return nil 15288 } 15289 15290 func (e EventSortKeys) MarshalGQL(w io.Writer) { 15291 fmt.Fprint(w, strconv.Quote(e.String())) 15292 } 15293 15294 // The display status of a fulfillment. 15295 type FulfillmentDisplayStatus string 15296 15297 const ( 15298 // Displayed as **Attempted delivery**. 15299 FulfillmentDisplayStatusAttemptedDelivery FulfillmentDisplayStatus = "ATTEMPTED_DELIVERY" 15300 // Displayed as **Canceled**. 15301 FulfillmentDisplayStatusCanceled FulfillmentDisplayStatus = "CANCELED" 15302 // Displayed as **Confirmed**. 15303 FulfillmentDisplayStatusConfirmed FulfillmentDisplayStatus = "CONFIRMED" 15304 // Displayed as **Delivered**. 15305 FulfillmentDisplayStatusDelivered FulfillmentDisplayStatus = "DELIVERED" 15306 // Displayed as **Failure**. 15307 FulfillmentDisplayStatusFailure FulfillmentDisplayStatus = "FAILURE" 15308 // Displayed as **Fulfilled**. 15309 FulfillmentDisplayStatusFulfilled FulfillmentDisplayStatus = "FULFILLED" 15310 // Displayed as **In transit**. 15311 FulfillmentDisplayStatusInTransit FulfillmentDisplayStatus = "IN_TRANSIT" 15312 // Displayed as **Label printed**. 15313 FulfillmentDisplayStatusLabelPrinted FulfillmentDisplayStatus = "LABEL_PRINTED" 15314 // Displayed as **Label purchased**. 15315 FulfillmentDisplayStatusLabelPurchased FulfillmentDisplayStatus = "LABEL_PURCHASED" 15316 // Displayed as **Label voided**. 15317 FulfillmentDisplayStatusLabelVoided FulfillmentDisplayStatus = "LABEL_VOIDED" 15318 // Displayed as **Marked as fulfilled**. 15319 FulfillmentDisplayStatusMarkedAsFulfilled FulfillmentDisplayStatus = "MARKED_AS_FULFILLED" 15320 // Displayed as **Not delivered**. 15321 FulfillmentDisplayStatusNotDelivered FulfillmentDisplayStatus = "NOT_DELIVERED" 15322 // Displayed as **Out for delivery**. 15323 FulfillmentDisplayStatusOutForDelivery FulfillmentDisplayStatus = "OUT_FOR_DELIVERY" 15324 // Displayed as **Ready for pickup**. 15325 FulfillmentDisplayStatusReadyForPickup FulfillmentDisplayStatus = "READY_FOR_PICKUP" 15326 // Displayed as **Picked up**. 15327 FulfillmentDisplayStatusPickedUp FulfillmentDisplayStatus = "PICKED_UP" 15328 // Displayed as **Submitted**. 15329 FulfillmentDisplayStatusSubmitted FulfillmentDisplayStatus = "SUBMITTED" 15330 ) 15331 15332 var AllFulfillmentDisplayStatus = []FulfillmentDisplayStatus{ 15333 FulfillmentDisplayStatusAttemptedDelivery, 15334 FulfillmentDisplayStatusCanceled, 15335 FulfillmentDisplayStatusConfirmed, 15336 FulfillmentDisplayStatusDelivered, 15337 FulfillmentDisplayStatusFailure, 15338 FulfillmentDisplayStatusFulfilled, 15339 FulfillmentDisplayStatusInTransit, 15340 FulfillmentDisplayStatusLabelPrinted, 15341 FulfillmentDisplayStatusLabelPurchased, 15342 FulfillmentDisplayStatusLabelVoided, 15343 FulfillmentDisplayStatusMarkedAsFulfilled, 15344 FulfillmentDisplayStatusNotDelivered, 15345 FulfillmentDisplayStatusOutForDelivery, 15346 FulfillmentDisplayStatusReadyForPickup, 15347 FulfillmentDisplayStatusPickedUp, 15348 FulfillmentDisplayStatusSubmitted, 15349 } 15350 15351 func (e FulfillmentDisplayStatus) IsValid() bool { 15352 switch e { 15353 case FulfillmentDisplayStatusAttemptedDelivery, FulfillmentDisplayStatusCanceled, FulfillmentDisplayStatusConfirmed, FulfillmentDisplayStatusDelivered, FulfillmentDisplayStatusFailure, FulfillmentDisplayStatusFulfilled, FulfillmentDisplayStatusInTransit, FulfillmentDisplayStatusLabelPrinted, FulfillmentDisplayStatusLabelPurchased, FulfillmentDisplayStatusLabelVoided, FulfillmentDisplayStatusMarkedAsFulfilled, FulfillmentDisplayStatusNotDelivered, FulfillmentDisplayStatusOutForDelivery, FulfillmentDisplayStatusReadyForPickup, FulfillmentDisplayStatusPickedUp, FulfillmentDisplayStatusSubmitted: 15354 return true 15355 } 15356 return false 15357 } 15358 15359 func (e FulfillmentDisplayStatus) String() string { 15360 return string(e) 15361 } 15362 15363 func (e *FulfillmentDisplayStatus) UnmarshalGQL(v interface{}) error { 15364 str, ok := v.(string) 15365 if !ok { 15366 return fmt.Errorf("enums must be strings") 15367 } 15368 15369 *e = FulfillmentDisplayStatus(str) 15370 if !e.IsValid() { 15371 return fmt.Errorf("%s is not a valid FulfillmentDisplayStatus", str) 15372 } 15373 return nil 15374 } 15375 15376 func (e FulfillmentDisplayStatus) MarshalGQL(w io.Writer) { 15377 fmt.Fprint(w, strconv.Quote(e.String())) 15378 } 15379 15380 // The set of valid sort keys for the FulfillmentEvent query. 15381 type FulfillmentEventSortKeys string 15382 15383 const ( 15384 // Sort by the `happened_at` value. 15385 FulfillmentEventSortKeysHappenedAt FulfillmentEventSortKeys = "HAPPENED_AT" 15386 // Sort by the `id` value. 15387 FulfillmentEventSortKeysID FulfillmentEventSortKeys = "ID" 15388 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 15389 // results by relevance to the search term(s). When no search query is specified, this sort key is not 15390 // deterministic and should not be used. 15391 FulfillmentEventSortKeysRelevance FulfillmentEventSortKeys = "RELEVANCE" 15392 ) 15393 15394 var AllFulfillmentEventSortKeys = []FulfillmentEventSortKeys{ 15395 FulfillmentEventSortKeysHappenedAt, 15396 FulfillmentEventSortKeysID, 15397 FulfillmentEventSortKeysRelevance, 15398 } 15399 15400 func (e FulfillmentEventSortKeys) IsValid() bool { 15401 switch e { 15402 case FulfillmentEventSortKeysHappenedAt, FulfillmentEventSortKeysID, FulfillmentEventSortKeysRelevance: 15403 return true 15404 } 15405 return false 15406 } 15407 15408 func (e FulfillmentEventSortKeys) String() string { 15409 return string(e) 15410 } 15411 15412 func (e *FulfillmentEventSortKeys) UnmarshalGQL(v interface{}) error { 15413 str, ok := v.(string) 15414 if !ok { 15415 return fmt.Errorf("enums must be strings") 15416 } 15417 15418 *e = FulfillmentEventSortKeys(str) 15419 if !e.IsValid() { 15420 return fmt.Errorf("%s is not a valid FulfillmentEventSortKeys", str) 15421 } 15422 return nil 15423 } 15424 15425 func (e FulfillmentEventSortKeys) MarshalGQL(w io.Writer) { 15426 fmt.Fprint(w, strconv.Quote(e.String())) 15427 } 15428 15429 // Event status' describe the status of a fulfillment. 15430 type FulfillmentEventStatus string 15431 15432 const ( 15433 // A shipping label has been purchased. 15434 FulfillmentEventStatusLabelPurchased FulfillmentEventStatus = "LABEL_PURCHASED" 15435 // A purchased shipping label has been printed. 15436 FulfillmentEventStatusLabelPrinted FulfillmentEventStatus = "LABEL_PRINTED" 15437 // The fulfillment is ready to be picked up. 15438 FulfillmentEventStatusReadyForPickup FulfillmentEventStatus = "READY_FOR_PICKUP" 15439 // The fulfillment is confirmed. 15440 FulfillmentEventStatusConfirmed FulfillmentEventStatus = "CONFIRMED" 15441 // The fulfillment is in transit. 15442 FulfillmentEventStatusInTransit FulfillmentEventStatus = "IN_TRANSIT" 15443 // The fulfillment is out for delivery. 15444 FulfillmentEventStatusOutForDelivery FulfillmentEventStatus = "OUT_FOR_DELIVERY" 15445 // A delivery was attempted. 15446 FulfillmentEventStatusAttemptedDelivery FulfillmentEventStatus = "ATTEMPTED_DELIVERY" 15447 // The fulfillment was successfully delivered. 15448 FulfillmentEventStatusDelivered FulfillmentEventStatus = "DELIVERED" 15449 // The fulfillment request failed. 15450 FulfillmentEventStatusFailure FulfillmentEventStatus = "FAILURE" 15451 ) 15452 15453 var AllFulfillmentEventStatus = []FulfillmentEventStatus{ 15454 FulfillmentEventStatusLabelPurchased, 15455 FulfillmentEventStatusLabelPrinted, 15456 FulfillmentEventStatusReadyForPickup, 15457 FulfillmentEventStatusConfirmed, 15458 FulfillmentEventStatusInTransit, 15459 FulfillmentEventStatusOutForDelivery, 15460 FulfillmentEventStatusAttemptedDelivery, 15461 FulfillmentEventStatusDelivered, 15462 FulfillmentEventStatusFailure, 15463 } 15464 15465 func (e FulfillmentEventStatus) IsValid() bool { 15466 switch e { 15467 case FulfillmentEventStatusLabelPurchased, FulfillmentEventStatusLabelPrinted, FulfillmentEventStatusReadyForPickup, FulfillmentEventStatusConfirmed, FulfillmentEventStatusInTransit, FulfillmentEventStatusOutForDelivery, FulfillmentEventStatusAttemptedDelivery, FulfillmentEventStatusDelivered, FulfillmentEventStatusFailure: 15468 return true 15469 } 15470 return false 15471 } 15472 15473 func (e FulfillmentEventStatus) String() string { 15474 return string(e) 15475 } 15476 15477 func (e *FulfillmentEventStatus) UnmarshalGQL(v interface{}) error { 15478 str, ok := v.(string) 15479 if !ok { 15480 return fmt.Errorf("enums must be strings") 15481 } 15482 15483 *e = FulfillmentEventStatus(str) 15484 if !e.IsValid() { 15485 return fmt.Errorf("%s is not a valid FulfillmentEventStatus", str) 15486 } 15487 return nil 15488 } 15489 15490 func (e FulfillmentEventStatus) MarshalGQL(w io.Writer) { 15491 fmt.Fprint(w, strconv.Quote(e.String())) 15492 } 15493 15494 // The actions that can be taken on a fulfillment order. 15495 type FulfillmentOrderAction string 15496 15497 const ( 15498 // Create a fulfillment for selected line items in the fulfillment order. The corresponding mutation for this action is FulfillmentCreateV2. 15499 FulfillmentOrderActionCreateFulfillment FulfillmentOrderAction = "CREATE_FULFILLMENT" 15500 // Send a request for fulfilling selected line items in a fulfillment order to a fulfillment service. The corresponding mutation for this action is FulfillmentOrderSubmitFulfillmentRequest. 15501 FulfillmentOrderActionRequestFulfillment FulfillmentOrderAction = "REQUEST_FULFILLMENT" 15502 // Cancel a fulfillment order. The corresponding mutation for this action is FulfillmentOrderCancel. 15503 FulfillmentOrderActionCancelFulfillmentOrder FulfillmentOrderAction = "CANCEL_FULFILLMENT_ORDER" 15504 // Move a fulfillment order. The corresponding mutation for this action is FulfillmentOrderMove. 15505 FulfillmentOrderActionMove FulfillmentOrderAction = "MOVE" 15506 // Send a cancellation request to the fulfillment service of a fulfillment order. The corresponding mutation for this action is FulfillmentOrderSubmitCancellationRequest. 15507 FulfillmentOrderActionRequestCancellation FulfillmentOrderAction = "REQUEST_CANCELLATION" 15508 // Mark the fulfillment order as open. 15509 FulfillmentOrderActionMarkAsOpen FulfillmentOrderAction = "MARK_AS_OPEN" 15510 // Open an external URL to initiate the fulfillment process outside Shopify. 15511 FulfillmentOrderActionExternal FulfillmentOrderAction = "EXTERNAL" 15512 ) 15513 15514 var AllFulfillmentOrderAction = []FulfillmentOrderAction{ 15515 FulfillmentOrderActionCreateFulfillment, 15516 FulfillmentOrderActionRequestFulfillment, 15517 FulfillmentOrderActionCancelFulfillmentOrder, 15518 FulfillmentOrderActionMove, 15519 FulfillmentOrderActionRequestCancellation, 15520 FulfillmentOrderActionMarkAsOpen, 15521 FulfillmentOrderActionExternal, 15522 } 15523 15524 func (e FulfillmentOrderAction) IsValid() bool { 15525 switch e { 15526 case FulfillmentOrderActionCreateFulfillment, FulfillmentOrderActionRequestFulfillment, FulfillmentOrderActionCancelFulfillmentOrder, FulfillmentOrderActionMove, FulfillmentOrderActionRequestCancellation, FulfillmentOrderActionMarkAsOpen, FulfillmentOrderActionExternal: 15527 return true 15528 } 15529 return false 15530 } 15531 15532 func (e FulfillmentOrderAction) String() string { 15533 return string(e) 15534 } 15535 15536 func (e *FulfillmentOrderAction) UnmarshalGQL(v interface{}) error { 15537 str, ok := v.(string) 15538 if !ok { 15539 return fmt.Errorf("enums must be strings") 15540 } 15541 15542 *e = FulfillmentOrderAction(str) 15543 if !e.IsValid() { 15544 return fmt.Errorf("%s is not a valid FulfillmentOrderAction", str) 15545 } 15546 return nil 15547 } 15548 15549 func (e FulfillmentOrderAction) MarshalGQL(w io.Writer) { 15550 fmt.Fprint(w, strconv.Quote(e.String())) 15551 } 15552 15553 // The assigment status to be used to filter fulfillment orders. 15554 type FulfillmentOrderAssignmentStatus string 15555 15556 const ( 15557 // Fulfillment orders for which the merchant has requested cancellation of 15558 // the previously accepted fulfillment request. 15559 FulfillmentOrderAssignmentStatusCancellationRequested FulfillmentOrderAssignmentStatus = "CANCELLATION_REQUESTED" 15560 // Fulfillment orders for which the merchant has requested fulfillment. 15561 FulfillmentOrderAssignmentStatusFulfillmentRequested FulfillmentOrderAssignmentStatus = "FULFILLMENT_REQUESTED" 15562 // Fulfillment orders for which the merchant's fulfillment request has been accepted. 15563 // Any number of fulfillments can be created on these fulfillment orders 15564 // to completely fulfill the requested items. 15565 FulfillmentOrderAssignmentStatusFulfillmentAccepted FulfillmentOrderAssignmentStatus = "FULFILLMENT_ACCEPTED" 15566 ) 15567 15568 var AllFulfillmentOrderAssignmentStatus = []FulfillmentOrderAssignmentStatus{ 15569 FulfillmentOrderAssignmentStatusCancellationRequested, 15570 FulfillmentOrderAssignmentStatusFulfillmentRequested, 15571 FulfillmentOrderAssignmentStatusFulfillmentAccepted, 15572 } 15573 15574 func (e FulfillmentOrderAssignmentStatus) IsValid() bool { 15575 switch e { 15576 case FulfillmentOrderAssignmentStatusCancellationRequested, FulfillmentOrderAssignmentStatusFulfillmentRequested, FulfillmentOrderAssignmentStatusFulfillmentAccepted: 15577 return true 15578 } 15579 return false 15580 } 15581 15582 func (e FulfillmentOrderAssignmentStatus) String() string { 15583 return string(e) 15584 } 15585 15586 func (e *FulfillmentOrderAssignmentStatus) UnmarshalGQL(v interface{}) error { 15587 str, ok := v.(string) 15588 if !ok { 15589 return fmt.Errorf("enums must be strings") 15590 } 15591 15592 *e = FulfillmentOrderAssignmentStatus(str) 15593 if !e.IsValid() { 15594 return fmt.Errorf("%s is not a valid FulfillmentOrderAssignmentStatus", str) 15595 } 15596 return nil 15597 } 15598 15599 func (e FulfillmentOrderAssignmentStatus) MarshalGQL(w io.Writer) { 15600 fmt.Fprint(w, strconv.Quote(e.String())) 15601 } 15602 15603 // The kinds of request merchants can make to a fulfillment service. 15604 type FulfillmentOrderMerchantRequestKind string 15605 15606 const ( 15607 // The merchant requested fulfillment for a fulfillment order. 15608 FulfillmentOrderMerchantRequestKindFulfillmentRequest FulfillmentOrderMerchantRequestKind = "FULFILLMENT_REQUEST" 15609 // The merchant requested cancellation of an accepted or in-progress fulfillment order. 15610 FulfillmentOrderMerchantRequestKindCancellationRequest FulfillmentOrderMerchantRequestKind = "CANCELLATION_REQUEST" 15611 ) 15612 15613 var AllFulfillmentOrderMerchantRequestKind = []FulfillmentOrderMerchantRequestKind{ 15614 FulfillmentOrderMerchantRequestKindFulfillmentRequest, 15615 FulfillmentOrderMerchantRequestKindCancellationRequest, 15616 } 15617 15618 func (e FulfillmentOrderMerchantRequestKind) IsValid() bool { 15619 switch e { 15620 case FulfillmentOrderMerchantRequestKindFulfillmentRequest, FulfillmentOrderMerchantRequestKindCancellationRequest: 15621 return true 15622 } 15623 return false 15624 } 15625 15626 func (e FulfillmentOrderMerchantRequestKind) String() string { 15627 return string(e) 15628 } 15629 15630 func (e *FulfillmentOrderMerchantRequestKind) UnmarshalGQL(v interface{}) error { 15631 str, ok := v.(string) 15632 if !ok { 15633 return fmt.Errorf("enums must be strings") 15634 } 15635 15636 *e = FulfillmentOrderMerchantRequestKind(str) 15637 if !e.IsValid() { 15638 return fmt.Errorf("%s is not a valid FulfillmentOrderMerchantRequestKind", str) 15639 } 15640 return nil 15641 } 15642 15643 func (e FulfillmentOrderMerchantRequestKind) MarshalGQL(w io.Writer) { 15644 fmt.Fprint(w, strconv.Quote(e.String())) 15645 } 15646 15647 // The request status of a fulfillment order. 15648 type FulfillmentOrderRequestStatus string 15649 15650 const ( 15651 // The initial request status for the newly created fulfillment orders. This is the only valid 15652 // request status for fulfillment orders that aren't assigned to a fulfillment service. 15653 FulfillmentOrderRequestStatusUnsubmitted FulfillmentOrderRequestStatus = "UNSUBMITTED" 15654 // The merchant requested fulfillment for this fulfillment order. 15655 FulfillmentOrderRequestStatusSubmitted FulfillmentOrderRequestStatus = "SUBMITTED" 15656 // The fulfillment service accepted the merchant's fulfillment request. 15657 FulfillmentOrderRequestStatusAccepted FulfillmentOrderRequestStatus = "ACCEPTED" 15658 // The fulfillment service rejected the merchant's fulfillment request. 15659 FulfillmentOrderRequestStatusRejected FulfillmentOrderRequestStatus = "REJECTED" 15660 // The merchant requested a cancellation of the fulfillment request for this fulfillment order. 15661 FulfillmentOrderRequestStatusCancellationRequested FulfillmentOrderRequestStatus = "CANCELLATION_REQUESTED" 15662 // The fulfillment service accepted the merchant's fulfillment cancellation request. 15663 FulfillmentOrderRequestStatusCancellationAccepted FulfillmentOrderRequestStatus = "CANCELLATION_ACCEPTED" 15664 // The fulfillment service rejected the merchant's fulfillment cancellation request. 15665 FulfillmentOrderRequestStatusCancellationRejected FulfillmentOrderRequestStatus = "CANCELLATION_REJECTED" 15666 // The fulfillment service closed the fulfillment order without completing it. 15667 FulfillmentOrderRequestStatusClosed FulfillmentOrderRequestStatus = "CLOSED" 15668 ) 15669 15670 var AllFulfillmentOrderRequestStatus = []FulfillmentOrderRequestStatus{ 15671 FulfillmentOrderRequestStatusUnsubmitted, 15672 FulfillmentOrderRequestStatusSubmitted, 15673 FulfillmentOrderRequestStatusAccepted, 15674 FulfillmentOrderRequestStatusRejected, 15675 FulfillmentOrderRequestStatusCancellationRequested, 15676 FulfillmentOrderRequestStatusCancellationAccepted, 15677 FulfillmentOrderRequestStatusCancellationRejected, 15678 FulfillmentOrderRequestStatusClosed, 15679 } 15680 15681 func (e FulfillmentOrderRequestStatus) IsValid() bool { 15682 switch e { 15683 case FulfillmentOrderRequestStatusUnsubmitted, FulfillmentOrderRequestStatusSubmitted, FulfillmentOrderRequestStatusAccepted, FulfillmentOrderRequestStatusRejected, FulfillmentOrderRequestStatusCancellationRequested, FulfillmentOrderRequestStatusCancellationAccepted, FulfillmentOrderRequestStatusCancellationRejected, FulfillmentOrderRequestStatusClosed: 15684 return true 15685 } 15686 return false 15687 } 15688 15689 func (e FulfillmentOrderRequestStatus) String() string { 15690 return string(e) 15691 } 15692 15693 func (e *FulfillmentOrderRequestStatus) UnmarshalGQL(v interface{}) error { 15694 str, ok := v.(string) 15695 if !ok { 15696 return fmt.Errorf("enums must be strings") 15697 } 15698 15699 *e = FulfillmentOrderRequestStatus(str) 15700 if !e.IsValid() { 15701 return fmt.Errorf("%s is not a valid FulfillmentOrderRequestStatus", str) 15702 } 15703 return nil 15704 } 15705 15706 func (e FulfillmentOrderRequestStatus) MarshalGQL(w io.Writer) { 15707 fmt.Fprint(w, strconv.Quote(e.String())) 15708 } 15709 15710 // Possible error codes that could be returned by FulfillmentOrderRescheduleUserError. 15711 type FulfillmentOrderRescheduleUserErrorCode string 15712 15713 const ( 15714 // Fulfillment order could not be found. 15715 FulfillmentOrderRescheduleUserErrorCodeFulfillmentOrderNotFound FulfillmentOrderRescheduleUserErrorCode = "FULFILLMENT_ORDER_NOT_FOUND" 15716 ) 15717 15718 var AllFulfillmentOrderRescheduleUserErrorCode = []FulfillmentOrderRescheduleUserErrorCode{ 15719 FulfillmentOrderRescheduleUserErrorCodeFulfillmentOrderNotFound, 15720 } 15721 15722 func (e FulfillmentOrderRescheduleUserErrorCode) IsValid() bool { 15723 switch e { 15724 case FulfillmentOrderRescheduleUserErrorCodeFulfillmentOrderNotFound: 15725 return true 15726 } 15727 return false 15728 } 15729 15730 func (e FulfillmentOrderRescheduleUserErrorCode) String() string { 15731 return string(e) 15732 } 15733 15734 func (e *FulfillmentOrderRescheduleUserErrorCode) UnmarshalGQL(v interface{}) error { 15735 str, ok := v.(string) 15736 if !ok { 15737 return fmt.Errorf("enums must be strings") 15738 } 15739 15740 *e = FulfillmentOrderRescheduleUserErrorCode(str) 15741 if !e.IsValid() { 15742 return fmt.Errorf("%s is not a valid FulfillmentOrderRescheduleUserErrorCode", str) 15743 } 15744 return nil 15745 } 15746 15747 func (e FulfillmentOrderRescheduleUserErrorCode) MarshalGQL(w io.Writer) { 15748 fmt.Fprint(w, strconv.Quote(e.String())) 15749 } 15750 15751 // The set of valid sort keys for the FulfillmentOrder query. 15752 type FulfillmentOrderSortKeys string 15753 15754 const ( 15755 // Sort by the `id` value. 15756 FulfillmentOrderSortKeysID FulfillmentOrderSortKeys = "ID" 15757 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 15758 // results by relevance to the search term(s). When no search query is specified, this sort key is not 15759 // deterministic and should not be used. 15760 FulfillmentOrderSortKeysRelevance FulfillmentOrderSortKeys = "RELEVANCE" 15761 ) 15762 15763 var AllFulfillmentOrderSortKeys = []FulfillmentOrderSortKeys{ 15764 FulfillmentOrderSortKeysID, 15765 FulfillmentOrderSortKeysRelevance, 15766 } 15767 15768 func (e FulfillmentOrderSortKeys) IsValid() bool { 15769 switch e { 15770 case FulfillmentOrderSortKeysID, FulfillmentOrderSortKeysRelevance: 15771 return true 15772 } 15773 return false 15774 } 15775 15776 func (e FulfillmentOrderSortKeys) String() string { 15777 return string(e) 15778 } 15779 15780 func (e *FulfillmentOrderSortKeys) UnmarshalGQL(v interface{}) error { 15781 str, ok := v.(string) 15782 if !ok { 15783 return fmt.Errorf("enums must be strings") 15784 } 15785 15786 *e = FulfillmentOrderSortKeys(str) 15787 if !e.IsValid() { 15788 return fmt.Errorf("%s is not a valid FulfillmentOrderSortKeys", str) 15789 } 15790 return nil 15791 } 15792 15793 func (e FulfillmentOrderSortKeys) MarshalGQL(w io.Writer) { 15794 fmt.Fprint(w, strconv.Quote(e.String())) 15795 } 15796 15797 // The status of a fulfillment order. 15798 type FulfillmentOrderStatus string 15799 15800 const ( 15801 // The fulfillment order has been opened. 15802 FulfillmentOrderStatusOpen FulfillmentOrderStatus = "OPEN" 15803 // The fulfillment order is being processed. 15804 FulfillmentOrderStatusInProgress FulfillmentOrderStatus = "IN_PROGRESS" 15805 // The fulfillment order has been cancelled by the merchant. 15806 FulfillmentOrderStatusCancelled FulfillmentOrderStatus = "CANCELLED" 15807 // The fulfillment order cannot be completed as requested. 15808 FulfillmentOrderStatusIncomplete FulfillmentOrderStatus = "INCOMPLETE" 15809 // The fulfillment order has been completed and closed. 15810 FulfillmentOrderStatusClosed FulfillmentOrderStatus = "CLOSED" 15811 // The fulfillment order is scheduled for fulfillment. 15812 FulfillmentOrderStatusScheduled FulfillmentOrderStatus = "SCHEDULED" 15813 ) 15814 15815 var AllFulfillmentOrderStatus = []FulfillmentOrderStatus{ 15816 FulfillmentOrderStatusOpen, 15817 FulfillmentOrderStatusInProgress, 15818 FulfillmentOrderStatusCancelled, 15819 FulfillmentOrderStatusIncomplete, 15820 FulfillmentOrderStatusClosed, 15821 FulfillmentOrderStatusScheduled, 15822 } 15823 15824 func (e FulfillmentOrderStatus) IsValid() bool { 15825 switch e { 15826 case FulfillmentOrderStatusOpen, FulfillmentOrderStatusInProgress, FulfillmentOrderStatusCancelled, FulfillmentOrderStatusIncomplete, FulfillmentOrderStatusClosed, FulfillmentOrderStatusScheduled: 15827 return true 15828 } 15829 return false 15830 } 15831 15832 func (e FulfillmentOrderStatus) String() string { 15833 return string(e) 15834 } 15835 15836 func (e *FulfillmentOrderStatus) UnmarshalGQL(v interface{}) error { 15837 str, ok := v.(string) 15838 if !ok { 15839 return fmt.Errorf("enums must be strings") 15840 } 15841 15842 *e = FulfillmentOrderStatus(str) 15843 if !e.IsValid() { 15844 return fmt.Errorf("%s is not a valid FulfillmentOrderStatus", str) 15845 } 15846 return nil 15847 } 15848 15849 func (e FulfillmentOrderStatus) MarshalGQL(w io.Writer) { 15850 fmt.Fprint(w, strconv.Quote(e.String())) 15851 } 15852 15853 // The type of a fulfillment service. 15854 type FulfillmentServiceType string 15855 15856 const ( 15857 // Fulfillment by gift card. 15858 FulfillmentServiceTypeGiftCard FulfillmentServiceType = "GIFT_CARD" 15859 // Manual fulfillment by the merchant. 15860 FulfillmentServiceTypeManual FulfillmentServiceType = "MANUAL" 15861 // Fullfillment by a third-party fulfillment service. 15862 FulfillmentServiceTypeThirdParty FulfillmentServiceType = "THIRD_PARTY" 15863 ) 15864 15865 var AllFulfillmentServiceType = []FulfillmentServiceType{ 15866 FulfillmentServiceTypeGiftCard, 15867 FulfillmentServiceTypeManual, 15868 FulfillmentServiceTypeThirdParty, 15869 } 15870 15871 func (e FulfillmentServiceType) IsValid() bool { 15872 switch e { 15873 case FulfillmentServiceTypeGiftCard, FulfillmentServiceTypeManual, FulfillmentServiceTypeThirdParty: 15874 return true 15875 } 15876 return false 15877 } 15878 15879 func (e FulfillmentServiceType) String() string { 15880 return string(e) 15881 } 15882 15883 func (e *FulfillmentServiceType) UnmarshalGQL(v interface{}) error { 15884 str, ok := v.(string) 15885 if !ok { 15886 return fmt.Errorf("enums must be strings") 15887 } 15888 15889 *e = FulfillmentServiceType(str) 15890 if !e.IsValid() { 15891 return fmt.Errorf("%s is not a valid FulfillmentServiceType", str) 15892 } 15893 return nil 15894 } 15895 15896 func (e FulfillmentServiceType) MarshalGQL(w io.Writer) { 15897 fmt.Fprint(w, strconv.Quote(e.String())) 15898 } 15899 15900 // The status of a fulfillment. 15901 type FulfillmentStatus string 15902 15903 const ( 15904 // Shopify has created the fulfillment and is waiting for the third-party fulfillment service to transition it to `open` or `success`. 15905 FulfillmentStatusPending FulfillmentStatus = "PENDING" 15906 // The third-party fulfillment service has acknowledged the fulfilment and is processing it. 15907 FulfillmentStatusOpen FulfillmentStatus = "OPEN" 15908 // The fulfillment was completed successfully. 15909 FulfillmentStatusSuccess FulfillmentStatus = "SUCCESS" 15910 // The fulfillment was canceled. 15911 FulfillmentStatusCancelled FulfillmentStatus = "CANCELLED" 15912 // There was an error with the fulfillment request. 15913 FulfillmentStatusError FulfillmentStatus = "ERROR" 15914 // The fulfillment request failed. 15915 FulfillmentStatusFailure FulfillmentStatus = "FAILURE" 15916 ) 15917 15918 var AllFulfillmentStatus = []FulfillmentStatus{ 15919 FulfillmentStatusPending, 15920 FulfillmentStatusOpen, 15921 FulfillmentStatusSuccess, 15922 FulfillmentStatusCancelled, 15923 FulfillmentStatusError, 15924 FulfillmentStatusFailure, 15925 } 15926 15927 func (e FulfillmentStatus) IsValid() bool { 15928 switch e { 15929 case FulfillmentStatusPending, FulfillmentStatusOpen, FulfillmentStatusSuccess, FulfillmentStatusCancelled, FulfillmentStatusError, FulfillmentStatusFailure: 15930 return true 15931 } 15932 return false 15933 } 15934 15935 func (e FulfillmentStatus) String() string { 15936 return string(e) 15937 } 15938 15939 func (e *FulfillmentStatus) UnmarshalGQL(v interface{}) error { 15940 str, ok := v.(string) 15941 if !ok { 15942 return fmt.Errorf("enums must be strings") 15943 } 15944 15945 *e = FulfillmentStatus(str) 15946 if !e.IsValid() { 15947 return fmt.Errorf("%s is not a valid FulfillmentStatus", str) 15948 } 15949 return nil 15950 } 15951 15952 func (e FulfillmentStatus) MarshalGQL(w io.Writer) { 15953 fmt.Fprint(w, strconv.Quote(e.String())) 15954 } 15955 15956 // List of supported image content types. 15957 type ImageContentType string 15958 15959 const ( 15960 // A PNG image. 15961 ImageContentTypePng ImageContentType = "PNG" 15962 // A JPG image. 15963 ImageContentTypeJpg ImageContentType = "JPG" 15964 // A WEBP image. 15965 ImageContentTypeWebp ImageContentType = "WEBP" 15966 ) 15967 15968 var AllImageContentType = []ImageContentType{ 15969 ImageContentTypePng, 15970 ImageContentTypeJpg, 15971 ImageContentTypeWebp, 15972 } 15973 15974 func (e ImageContentType) IsValid() bool { 15975 switch e { 15976 case ImageContentTypePng, ImageContentTypeJpg, ImageContentTypeWebp: 15977 return true 15978 } 15979 return false 15980 } 15981 15982 func (e ImageContentType) String() string { 15983 return string(e) 15984 } 15985 15986 func (e *ImageContentType) UnmarshalGQL(v interface{}) error { 15987 str, ok := v.(string) 15988 if !ok { 15989 return fmt.Errorf("enums must be strings") 15990 } 15991 15992 *e = ImageContentType(str) 15993 if !e.IsValid() { 15994 return fmt.Errorf("%s is not a valid ImageContentType", str) 15995 } 15996 return nil 15997 } 15998 15999 func (e ImageContentType) MarshalGQL(w io.Writer) { 16000 fmt.Fprint(w, strconv.Quote(e.String())) 16001 } 16002 16003 // The locale language allowed for Kit Skill. 16004 type KitSkillLocale string 16005 16006 const ( 16007 // English language. 16008 KitSkillLocaleEn KitSkillLocale = "EN" 16009 ) 16010 16011 var AllKitSkillLocale = []KitSkillLocale{ 16012 KitSkillLocaleEn, 16013 } 16014 16015 func (e KitSkillLocale) IsValid() bool { 16016 switch e { 16017 case KitSkillLocaleEn: 16018 return true 16019 } 16020 return false 16021 } 16022 16023 func (e KitSkillLocale) String() string { 16024 return string(e) 16025 } 16026 16027 func (e *KitSkillLocale) UnmarshalGQL(v interface{}) error { 16028 str, ok := v.(string) 16029 if !ok { 16030 return fmt.Errorf("enums must be strings") 16031 } 16032 16033 *e = KitSkillLocale(str) 16034 if !e.IsValid() { 16035 return fmt.Errorf("%s is not a valid KitSkillLocale", str) 16036 } 16037 return nil 16038 } 16039 16040 func (e KitSkillLocale) MarshalGQL(w io.Writer) { 16041 fmt.Fprint(w, strconv.Quote(e.String())) 16042 } 16043 16044 // The key of a localization extension. 16045 type LocalizationExtensionKey string 16046 16047 const ( 16048 // Extension key 'tax_credential_br' for country BR. 16049 LocalizationExtensionKeyTaxCredentialBr LocalizationExtensionKey = "TAX_CREDENTIAL_BR" 16050 // Extension key 'shipping_credential_br' for country BR. 16051 LocalizationExtensionKeyShippingCredentialBr LocalizationExtensionKey = "SHIPPING_CREDENTIAL_BR" 16052 // Extension key 'shipping_credential_cn' for country CN. 16053 LocalizationExtensionKeyShippingCredentialCn LocalizationExtensionKey = "SHIPPING_CREDENTIAL_CN" 16054 // Extension key 'tax_credential_it' for country IT. 16055 LocalizationExtensionKeyTaxCredentialIt LocalizationExtensionKey = "TAX_CREDENTIAL_IT" 16056 // Extension key 'tax_email_it' for country IT. 16057 LocalizationExtensionKeyTaxEmailIt LocalizationExtensionKey = "TAX_EMAIL_IT" 16058 // Extension key 'shipping_credential_kr' for country KR. 16059 LocalizationExtensionKeyShippingCredentialKr LocalizationExtensionKey = "SHIPPING_CREDENTIAL_KR" 16060 ) 16061 16062 var AllLocalizationExtensionKey = []LocalizationExtensionKey{ 16063 LocalizationExtensionKeyTaxCredentialBr, 16064 LocalizationExtensionKeyShippingCredentialBr, 16065 LocalizationExtensionKeyShippingCredentialCn, 16066 LocalizationExtensionKeyTaxCredentialIt, 16067 LocalizationExtensionKeyTaxEmailIt, 16068 LocalizationExtensionKeyShippingCredentialKr, 16069 } 16070 16071 func (e LocalizationExtensionKey) IsValid() bool { 16072 switch e { 16073 case LocalizationExtensionKeyTaxCredentialBr, LocalizationExtensionKeyShippingCredentialBr, LocalizationExtensionKeyShippingCredentialCn, LocalizationExtensionKeyTaxCredentialIt, LocalizationExtensionKeyTaxEmailIt, LocalizationExtensionKeyShippingCredentialKr: 16074 return true 16075 } 16076 return false 16077 } 16078 16079 func (e LocalizationExtensionKey) String() string { 16080 return string(e) 16081 } 16082 16083 func (e *LocalizationExtensionKey) UnmarshalGQL(v interface{}) error { 16084 str, ok := v.(string) 16085 if !ok { 16086 return fmt.Errorf("enums must be strings") 16087 } 16088 16089 *e = LocalizationExtensionKey(str) 16090 if !e.IsValid() { 16091 return fmt.Errorf("%s is not a valid LocalizationExtensionKey", str) 16092 } 16093 return nil 16094 } 16095 16096 func (e LocalizationExtensionKey) MarshalGQL(w io.Writer) { 16097 fmt.Fprint(w, strconv.Quote(e.String())) 16098 } 16099 16100 // The purpose of a localization extension. 16101 type LocalizationExtensionPurpose string 16102 16103 const ( 16104 // Extensions that are used for shipping purposes, for example, customs clearance. 16105 LocalizationExtensionPurposeShipping LocalizationExtensionPurpose = "SHIPPING" 16106 // Extensions that are used for taxes purposes, for example, invoicing. 16107 LocalizationExtensionPurposeTax LocalizationExtensionPurpose = "TAX" 16108 ) 16109 16110 var AllLocalizationExtensionPurpose = []LocalizationExtensionPurpose{ 16111 LocalizationExtensionPurposeShipping, 16112 LocalizationExtensionPurposeTax, 16113 } 16114 16115 func (e LocalizationExtensionPurpose) IsValid() bool { 16116 switch e { 16117 case LocalizationExtensionPurposeShipping, LocalizationExtensionPurposeTax: 16118 return true 16119 } 16120 return false 16121 } 16122 16123 func (e LocalizationExtensionPurpose) String() string { 16124 return string(e) 16125 } 16126 16127 func (e *LocalizationExtensionPurpose) UnmarshalGQL(v interface{}) error { 16128 str, ok := v.(string) 16129 if !ok { 16130 return fmt.Errorf("enums must be strings") 16131 } 16132 16133 *e = LocalizationExtensionPurpose(str) 16134 if !e.IsValid() { 16135 return fmt.Errorf("%s is not a valid LocalizationExtensionPurpose", str) 16136 } 16137 return nil 16138 } 16139 16140 func (e LocalizationExtensionPurpose) MarshalGQL(w io.Writer) { 16141 fmt.Fprint(w, strconv.Quote(e.String())) 16142 } 16143 16144 // The set of valid sort keys for the Location query. 16145 type LocationSortKeys string 16146 16147 const ( 16148 // Sort by the `name` value. 16149 LocationSortKeysName LocationSortKeys = "NAME" 16150 // Sort by the `id` value. 16151 LocationSortKeysID LocationSortKeys = "ID" 16152 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 16153 // results by relevance to the search term(s). When no search query is specified, this sort key is not 16154 // deterministic and should not be used. 16155 LocationSortKeysRelevance LocationSortKeys = "RELEVANCE" 16156 ) 16157 16158 var AllLocationSortKeys = []LocationSortKeys{ 16159 LocationSortKeysName, 16160 LocationSortKeysID, 16161 LocationSortKeysRelevance, 16162 } 16163 16164 func (e LocationSortKeys) IsValid() bool { 16165 switch e { 16166 case LocationSortKeysName, LocationSortKeysID, LocationSortKeysRelevance: 16167 return true 16168 } 16169 return false 16170 } 16171 16172 func (e LocationSortKeys) String() string { 16173 return string(e) 16174 } 16175 16176 func (e *LocationSortKeys) UnmarshalGQL(v interface{}) error { 16177 str, ok := v.(string) 16178 if !ok { 16179 return fmt.Errorf("enums must be strings") 16180 } 16181 16182 *e = LocationSortKeys(str) 16183 if !e.IsValid() { 16184 return fmt.Errorf("%s is not a valid LocationSortKeys", str) 16185 } 16186 return nil 16187 } 16188 16189 func (e LocationSortKeys) MarshalGQL(w io.Writer) { 16190 fmt.Fprint(w, strconv.Quote(e.String())) 16191 } 16192 16193 // The error code resulted from the marketing activity extension integration. 16194 type MarketingActivityExtensionAppErrorCode string 16195 16196 const ( 16197 // The shop/user must be onboarded to use the app. 16198 MarketingActivityExtensionAppErrorCodeNotOnboardedError MarketingActivityExtensionAppErrorCode = "NOT_ONBOARDED_ERROR" 16199 // The app has returned validation errors. 16200 MarketingActivityExtensionAppErrorCodeValidationError MarketingActivityExtensionAppErrorCode = "VALIDATION_ERROR" 16201 // The app is not responding or returning unexpected data. 16202 MarketingActivityExtensionAppErrorCodeAPIError MarketingActivityExtensionAppErrorCode = "API_ERROR" 16203 // The app has returned an error when invoking the platform. 16204 MarketingActivityExtensionAppErrorCodePlatformError MarketingActivityExtensionAppErrorCode = "PLATFORM_ERROR" 16205 // The app needs to be installed. 16206 MarketingActivityExtensionAppErrorCodeInstallRequiredError MarketingActivityExtensionAppErrorCode = "INSTALL_REQUIRED_ERROR" 16207 ) 16208 16209 var AllMarketingActivityExtensionAppErrorCode = []MarketingActivityExtensionAppErrorCode{ 16210 MarketingActivityExtensionAppErrorCodeNotOnboardedError, 16211 MarketingActivityExtensionAppErrorCodeValidationError, 16212 MarketingActivityExtensionAppErrorCodeAPIError, 16213 MarketingActivityExtensionAppErrorCodePlatformError, 16214 MarketingActivityExtensionAppErrorCodeInstallRequiredError, 16215 } 16216 16217 func (e MarketingActivityExtensionAppErrorCode) IsValid() bool { 16218 switch e { 16219 case MarketingActivityExtensionAppErrorCodeNotOnboardedError, MarketingActivityExtensionAppErrorCodeValidationError, MarketingActivityExtensionAppErrorCodeAPIError, MarketingActivityExtensionAppErrorCodePlatformError, MarketingActivityExtensionAppErrorCodeInstallRequiredError: 16220 return true 16221 } 16222 return false 16223 } 16224 16225 func (e MarketingActivityExtensionAppErrorCode) String() string { 16226 return string(e) 16227 } 16228 16229 func (e *MarketingActivityExtensionAppErrorCode) UnmarshalGQL(v interface{}) error { 16230 str, ok := v.(string) 16231 if !ok { 16232 return fmt.Errorf("enums must be strings") 16233 } 16234 16235 *e = MarketingActivityExtensionAppErrorCode(str) 16236 if !e.IsValid() { 16237 return fmt.Errorf("%s is not a valid MarketingActivityExtensionAppErrorCode", str) 16238 } 16239 return nil 16240 } 16241 16242 func (e MarketingActivityExtensionAppErrorCode) MarshalGQL(w io.Writer) { 16243 fmt.Fprint(w, strconv.Quote(e.String())) 16244 } 16245 16246 // The set of valid sort keys for the MarketingActivity query. 16247 type MarketingActivitySortKeys string 16248 16249 const ( 16250 // Sort by the `title` value. 16251 MarketingActivitySortKeysTitle MarketingActivitySortKeys = "TITLE" 16252 // Sort by the `created_at` value. 16253 MarketingActivitySortKeysCreatedAt MarketingActivitySortKeys = "CREATED_AT" 16254 // Sort by the `id` value. 16255 MarketingActivitySortKeysID MarketingActivitySortKeys = "ID" 16256 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 16257 // results by relevance to the search term(s). When no search query is specified, this sort key is not 16258 // deterministic and should not be used. 16259 MarketingActivitySortKeysRelevance MarketingActivitySortKeys = "RELEVANCE" 16260 ) 16261 16262 var AllMarketingActivitySortKeys = []MarketingActivitySortKeys{ 16263 MarketingActivitySortKeysTitle, 16264 MarketingActivitySortKeysCreatedAt, 16265 MarketingActivitySortKeysID, 16266 MarketingActivitySortKeysRelevance, 16267 } 16268 16269 func (e MarketingActivitySortKeys) IsValid() bool { 16270 switch e { 16271 case MarketingActivitySortKeysTitle, MarketingActivitySortKeysCreatedAt, MarketingActivitySortKeysID, MarketingActivitySortKeysRelevance: 16272 return true 16273 } 16274 return false 16275 } 16276 16277 func (e MarketingActivitySortKeys) String() string { 16278 return string(e) 16279 } 16280 16281 func (e *MarketingActivitySortKeys) UnmarshalGQL(v interface{}) error { 16282 str, ok := v.(string) 16283 if !ok { 16284 return fmt.Errorf("enums must be strings") 16285 } 16286 16287 *e = MarketingActivitySortKeys(str) 16288 if !e.IsValid() { 16289 return fmt.Errorf("%s is not a valid MarketingActivitySortKeys", str) 16290 } 16291 return nil 16292 } 16293 16294 func (e MarketingActivitySortKeys) MarshalGQL(w io.Writer) { 16295 fmt.Fprint(w, strconv.Quote(e.String())) 16296 } 16297 16298 // Status helps to identify if this marketing activity has been completed, queued, failed etc. 16299 type MarketingActivityStatus string 16300 16301 const ( 16302 // This marketing activity is currently running. 16303 MarketingActivityStatusActive MarketingActivityStatus = "ACTIVE" 16304 // This marketing activity is permanently unavailable. 16305 MarketingActivityStatusDeleted MarketingActivityStatus = "DELETED" 16306 // This marketing activity was deleted and it was triggered from outside of Shopify. 16307 MarketingActivityStatusDeletedExternally MarketingActivityStatus = "DELETED_EXTERNALLY" 16308 // This marketing activity is disconnected and no longer editable. 16309 MarketingActivityStatusDisconnected MarketingActivityStatus = "DISCONNECTED" 16310 // This marketing activity is started but not yet created. 16311 MarketingActivityStatusDraft MarketingActivityStatus = "DRAFT" 16312 // This marketing activity is unable to run. 16313 MarketingActivityStatusFailed MarketingActivityStatus = "FAILED" 16314 // This marketing activity has completed running. 16315 MarketingActivityStatusInactive MarketingActivityStatus = "INACTIVE" 16316 // This marketing activity is currently not running. 16317 MarketingActivityStatusPaused MarketingActivityStatus = "PAUSED" 16318 // This marketing activity is pending creation on the app's platform. 16319 MarketingActivityStatusPending MarketingActivityStatus = "PENDING" 16320 // This marketing activity is scheduled to run. 16321 MarketingActivityStatusScheduled MarketingActivityStatus = "SCHEDULED" 16322 // There is no defined status for external marketing activities. 16323 MarketingActivityStatusUndefined MarketingActivityStatus = "UNDEFINED" 16324 ) 16325 16326 var AllMarketingActivityStatus = []MarketingActivityStatus{ 16327 MarketingActivityStatusActive, 16328 MarketingActivityStatusDeleted, 16329 MarketingActivityStatusDeletedExternally, 16330 MarketingActivityStatusDisconnected, 16331 MarketingActivityStatusDraft, 16332 MarketingActivityStatusFailed, 16333 MarketingActivityStatusInactive, 16334 MarketingActivityStatusPaused, 16335 MarketingActivityStatusPending, 16336 MarketingActivityStatusScheduled, 16337 MarketingActivityStatusUndefined, 16338 } 16339 16340 func (e MarketingActivityStatus) IsValid() bool { 16341 switch e { 16342 case MarketingActivityStatusActive, MarketingActivityStatusDeleted, MarketingActivityStatusDeletedExternally, MarketingActivityStatusDisconnected, MarketingActivityStatusDraft, MarketingActivityStatusFailed, MarketingActivityStatusInactive, MarketingActivityStatusPaused, MarketingActivityStatusPending, MarketingActivityStatusScheduled, MarketingActivityStatusUndefined: 16343 return true 16344 } 16345 return false 16346 } 16347 16348 func (e MarketingActivityStatus) String() string { 16349 return string(e) 16350 } 16351 16352 func (e *MarketingActivityStatus) UnmarshalGQL(v interface{}) error { 16353 str, ok := v.(string) 16354 if !ok { 16355 return fmt.Errorf("enums must be strings") 16356 } 16357 16358 *e = MarketingActivityStatus(str) 16359 if !e.IsValid() { 16360 return fmt.Errorf("%s is not a valid MarketingActivityStatus", str) 16361 } 16362 return nil 16363 } 16364 16365 func (e MarketingActivityStatus) MarshalGQL(w io.Writer) { 16366 fmt.Fprint(w, strconv.Quote(e.String())) 16367 } 16368 16369 // StatusBadgeType helps to identify the color of the status badge. 16370 type MarketingActivityStatusBadgeType string 16371 16372 const ( 16373 // This status badge has type default. 16374 MarketingActivityStatusBadgeTypeDefault MarketingActivityStatusBadgeType = "DEFAULT" 16375 // This status badge has type success. 16376 MarketingActivityStatusBadgeTypeSuccess MarketingActivityStatusBadgeType = "SUCCESS" 16377 // This status badge has type attention. 16378 MarketingActivityStatusBadgeTypeAttention MarketingActivityStatusBadgeType = "ATTENTION" 16379 // This status badge has type warning. 16380 MarketingActivityStatusBadgeTypeWarning MarketingActivityStatusBadgeType = "WARNING" 16381 // This status badge has type info. 16382 MarketingActivityStatusBadgeTypeInfo MarketingActivityStatusBadgeType = "INFO" 16383 ) 16384 16385 var AllMarketingActivityStatusBadgeType = []MarketingActivityStatusBadgeType{ 16386 MarketingActivityStatusBadgeTypeDefault, 16387 MarketingActivityStatusBadgeTypeSuccess, 16388 MarketingActivityStatusBadgeTypeAttention, 16389 MarketingActivityStatusBadgeTypeWarning, 16390 MarketingActivityStatusBadgeTypeInfo, 16391 } 16392 16393 func (e MarketingActivityStatusBadgeType) IsValid() bool { 16394 switch e { 16395 case MarketingActivityStatusBadgeTypeDefault, MarketingActivityStatusBadgeTypeSuccess, MarketingActivityStatusBadgeTypeAttention, MarketingActivityStatusBadgeTypeWarning, MarketingActivityStatusBadgeTypeInfo: 16396 return true 16397 } 16398 return false 16399 } 16400 16401 func (e MarketingActivityStatusBadgeType) String() string { 16402 return string(e) 16403 } 16404 16405 func (e *MarketingActivityStatusBadgeType) UnmarshalGQL(v interface{}) error { 16406 str, ok := v.(string) 16407 if !ok { 16408 return fmt.Errorf("enums must be strings") 16409 } 16410 16411 *e = MarketingActivityStatusBadgeType(str) 16412 if !e.IsValid() { 16413 return fmt.Errorf("%s is not a valid MarketingActivityStatusBadgeType", str) 16414 } 16415 return nil 16416 } 16417 16418 func (e MarketingActivityStatusBadgeType) MarshalGQL(w io.Writer) { 16419 fmt.Fprint(w, strconv.Quote(e.String())) 16420 } 16421 16422 // The budget type for a marketing activity. 16423 type MarketingBudgetBudgetType string 16424 16425 const ( 16426 // A daily budget. 16427 MarketingBudgetBudgetTypeDaily MarketingBudgetBudgetType = "DAILY" 16428 // A budget for the lifetime of a marketing activity. 16429 MarketingBudgetBudgetTypeLifetime MarketingBudgetBudgetType = "LIFETIME" 16430 ) 16431 16432 var AllMarketingBudgetBudgetType = []MarketingBudgetBudgetType{ 16433 MarketingBudgetBudgetTypeDaily, 16434 MarketingBudgetBudgetTypeLifetime, 16435 } 16436 16437 func (e MarketingBudgetBudgetType) IsValid() bool { 16438 switch e { 16439 case MarketingBudgetBudgetTypeDaily, MarketingBudgetBudgetTypeLifetime: 16440 return true 16441 } 16442 return false 16443 } 16444 16445 func (e MarketingBudgetBudgetType) String() string { 16446 return string(e) 16447 } 16448 16449 func (e *MarketingBudgetBudgetType) UnmarshalGQL(v interface{}) error { 16450 str, ok := v.(string) 16451 if !ok { 16452 return fmt.Errorf("enums must be strings") 16453 } 16454 16455 *e = MarketingBudgetBudgetType(str) 16456 if !e.IsValid() { 16457 return fmt.Errorf("%s is not a valid MarketingBudgetBudgetType", str) 16458 } 16459 return nil 16460 } 16461 16462 func (e MarketingBudgetBudgetType) MarshalGQL(w io.Writer) { 16463 fmt.Fprint(w, strconv.Quote(e.String())) 16464 } 16465 16466 // The available marketing channels for a marketing activity or event. A marketing channel is broad category of marketing, used for reporting aggregation. 16467 type MarketingChannel string 16468 16469 const ( 16470 // Paid search. 16471 MarketingChannelSearch MarketingChannel = "SEARCH" 16472 // Displayed ads. 16473 MarketingChannelDisplay MarketingChannel = "DISPLAY" 16474 // Social media. 16475 MarketingChannelSocial MarketingChannel = "SOCIAL" 16476 // Email. 16477 MarketingChannelEmail MarketingChannel = "EMAIL" 16478 // Referral links. 16479 MarketingChannelReferral MarketingChannel = "REFERRAL" 16480 ) 16481 16482 var AllMarketingChannel = []MarketingChannel{ 16483 MarketingChannelSearch, 16484 MarketingChannelDisplay, 16485 MarketingChannelSocial, 16486 MarketingChannelEmail, 16487 MarketingChannelReferral, 16488 } 16489 16490 func (e MarketingChannel) IsValid() bool { 16491 switch e { 16492 case MarketingChannelSearch, MarketingChannelDisplay, MarketingChannelSocial, MarketingChannelEmail, MarketingChannelReferral: 16493 return true 16494 } 16495 return false 16496 } 16497 16498 func (e MarketingChannel) String() string { 16499 return string(e) 16500 } 16501 16502 func (e *MarketingChannel) UnmarshalGQL(v interface{}) error { 16503 str, ok := v.(string) 16504 if !ok { 16505 return fmt.Errorf("enums must be strings") 16506 } 16507 16508 *e = MarketingChannel(str) 16509 if !e.IsValid() { 16510 return fmt.Errorf("%s is not a valid MarketingChannel", str) 16511 } 16512 return nil 16513 } 16514 16515 func (e MarketingChannel) MarshalGQL(w io.Writer) { 16516 fmt.Fprint(w, strconv.Quote(e.String())) 16517 } 16518 16519 // The set of valid sort keys for the MarketingEvent query. 16520 type MarketingEventSortKeys string 16521 16522 const ( 16523 // Sort by the `started_at` value. 16524 MarketingEventSortKeysStartedAt MarketingEventSortKeys = "STARTED_AT" 16525 // Sort by the `id` value. 16526 MarketingEventSortKeysID MarketingEventSortKeys = "ID" 16527 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 16528 // results by relevance to the search term(s). When no search query is specified, this sort key is not 16529 // deterministic and should not be used. 16530 MarketingEventSortKeysRelevance MarketingEventSortKeys = "RELEVANCE" 16531 ) 16532 16533 var AllMarketingEventSortKeys = []MarketingEventSortKeys{ 16534 MarketingEventSortKeysStartedAt, 16535 MarketingEventSortKeysID, 16536 MarketingEventSortKeysRelevance, 16537 } 16538 16539 func (e MarketingEventSortKeys) IsValid() bool { 16540 switch e { 16541 case MarketingEventSortKeysStartedAt, MarketingEventSortKeysID, MarketingEventSortKeysRelevance: 16542 return true 16543 } 16544 return false 16545 } 16546 16547 func (e MarketingEventSortKeys) String() string { 16548 return string(e) 16549 } 16550 16551 func (e *MarketingEventSortKeys) UnmarshalGQL(v interface{}) error { 16552 str, ok := v.(string) 16553 if !ok { 16554 return fmt.Errorf("enums must be strings") 16555 } 16556 16557 *e = MarketingEventSortKeys(str) 16558 if !e.IsValid() { 16559 return fmt.Errorf("%s is not a valid MarketingEventSortKeys", str) 16560 } 16561 return nil 16562 } 16563 16564 func (e MarketingEventSortKeys) MarshalGQL(w io.Writer) { 16565 fmt.Fprint(w, strconv.Quote(e.String())) 16566 } 16567 16568 // The available types of marketing event. 16569 type MarketingTactic string 16570 16571 const ( 16572 // An abandoned cart recovery email. 16573 MarketingTacticAbandonedCart MarketingTactic = "ABANDONED_CART" 16574 // An ad, such as a Facebook ad. 16575 MarketingTacticAd MarketingTactic = "AD" 16576 // An affiliate link. 16577 MarketingTacticAffiliate MarketingTactic = "AFFILIATE" 16578 // A link. 16579 MarketingTacticLink MarketingTactic = "LINK" 16580 // A loyalty program. 16581 MarketingTacticLoyalty MarketingTactic = "LOYALTY" 16582 // A messaging app, such as Facebook Messenger. 16583 MarketingTacticMessage MarketingTactic = "MESSAGE" 16584 // A newsletter. 16585 MarketingTacticNewsletter MarketingTactic = "NEWSLETTER" 16586 // A notification in the Shopify admin. 16587 MarketingTacticNotification MarketingTactic = "NOTIFICATION" 16588 // A blog post. 16589 MarketingTacticPost MarketingTactic = "POST" 16590 // A retargeting ad. 16591 MarketingTacticRetargeting MarketingTactic = "RETARGETING" 16592 // A transactional email. 16593 MarketingTacticTransactional MarketingTactic = "TRANSACTIONAL" 16594 // Search engine optimization. 16595 MarketingTacticSeo MarketingTactic = "SEO" 16596 // A direct visit to the online store. 16597 MarketingTacticDirect MarketingTactic = "DIRECT" 16598 // Popup on merchant's store. 16599 MarketingTacticStorefrontApp MarketingTactic = "STOREFRONT_APP" 16600 // A display ad. 16601 MarketingTacticDisplay MarketingTactic = "DISPLAY" 16602 // Paid search. 16603 MarketingTacticSearch MarketingTactic = "SEARCH" 16604 // A follow-up email. 16605 MarketingTacticFollowUp MarketingTactic = "FOLLOW_UP" 16606 // A promotional receipt. 16607 MarketingTacticReceipt MarketingTactic = "RECEIPT" 16608 ) 16609 16610 var AllMarketingTactic = []MarketingTactic{ 16611 MarketingTacticAbandonedCart, 16612 MarketingTacticAd, 16613 MarketingTacticAffiliate, 16614 MarketingTacticLink, 16615 MarketingTacticLoyalty, 16616 MarketingTacticMessage, 16617 MarketingTacticNewsletter, 16618 MarketingTacticNotification, 16619 MarketingTacticPost, 16620 MarketingTacticRetargeting, 16621 MarketingTacticTransactional, 16622 MarketingTacticSeo, 16623 MarketingTacticDirect, 16624 MarketingTacticStorefrontApp, 16625 MarketingTacticDisplay, 16626 MarketingTacticSearch, 16627 MarketingTacticFollowUp, 16628 MarketingTacticReceipt, 16629 } 16630 16631 func (e MarketingTactic) IsValid() bool { 16632 switch e { 16633 case MarketingTacticAbandonedCart, MarketingTacticAd, MarketingTacticAffiliate, MarketingTacticLink, MarketingTacticLoyalty, MarketingTacticMessage, MarketingTacticNewsletter, MarketingTacticNotification, MarketingTacticPost, MarketingTacticRetargeting, MarketingTacticTransactional, MarketingTacticSeo, MarketingTacticDirect, MarketingTacticStorefrontApp, MarketingTacticDisplay, MarketingTacticSearch, MarketingTacticFollowUp, MarketingTacticReceipt: 16634 return true 16635 } 16636 return false 16637 } 16638 16639 func (e MarketingTactic) String() string { 16640 return string(e) 16641 } 16642 16643 func (e *MarketingTactic) UnmarshalGQL(v interface{}) error { 16644 str, ok := v.(string) 16645 if !ok { 16646 return fmt.Errorf("enums must be strings") 16647 } 16648 16649 *e = MarketingTactic(str) 16650 if !e.IsValid() { 16651 return fmt.Errorf("%s is not a valid MarketingTactic", str) 16652 } 16653 return nil 16654 } 16655 16656 func (e MarketingTactic) MarshalGQL(w io.Writer) { 16657 fmt.Fprint(w, strconv.Quote(e.String())) 16658 } 16659 16660 // The possible content types for a media object. 16661 type MediaContentType string 16662 16663 const ( 16664 // A Shopify hosted video. 16665 MediaContentTypeVideo MediaContentType = "VIDEO" 16666 // An externally hosted video. 16667 MediaContentTypeExternalVideo MediaContentType = "EXTERNAL_VIDEO" 16668 // A 3d model. 16669 MediaContentTypeModel3d MediaContentType = "MODEL_3D" 16670 // A Shopify hosted image. 16671 MediaContentTypeImage MediaContentType = "IMAGE" 16672 ) 16673 16674 var AllMediaContentType = []MediaContentType{ 16675 MediaContentTypeVideo, 16676 MediaContentTypeExternalVideo, 16677 MediaContentTypeModel3d, 16678 MediaContentTypeImage, 16679 } 16680 16681 func (e MediaContentType) IsValid() bool { 16682 switch e { 16683 case MediaContentTypeVideo, MediaContentTypeExternalVideo, MediaContentTypeModel3d, MediaContentTypeImage: 16684 return true 16685 } 16686 return false 16687 } 16688 16689 func (e MediaContentType) String() string { 16690 return string(e) 16691 } 16692 16693 func (e *MediaContentType) UnmarshalGQL(v interface{}) error { 16694 str, ok := v.(string) 16695 if !ok { 16696 return fmt.Errorf("enums must be strings") 16697 } 16698 16699 *e = MediaContentType(str) 16700 if !e.IsValid() { 16701 return fmt.Errorf("%s is not a valid MediaContentType", str) 16702 } 16703 return nil 16704 } 16705 16706 func (e MediaContentType) MarshalGQL(w io.Writer) { 16707 fmt.Fprint(w, strconv.Quote(e.String())) 16708 } 16709 16710 // Error types for media. 16711 type MediaErrorCode string 16712 16713 const ( 16714 // Media error has occured for unknown reason. 16715 MediaErrorCodeUnknown MediaErrorCode = "UNKNOWN" 16716 // Media could not be processed because the signed url was invalid. 16717 MediaErrorCodeInvalidSignedURL MediaErrorCode = "INVALID_SIGNED_URL" 16718 // Media could not be processed because the image could not be downloaded. 16719 MediaErrorCodeImageDownloadFailure MediaErrorCode = "IMAGE_DOWNLOAD_FAILURE" 16720 // Media could not be processed because the image could not be processed. 16721 MediaErrorCodeImageProcessingFailure MediaErrorCode = "IMAGE_PROCESSING_FAILURE" 16722 // Media timed out because it is currently being modified by another operation. 16723 MediaErrorCodeMediaTimeoutError MediaErrorCode = "MEDIA_TIMEOUT_ERROR" 16724 // Media could not be created because the external video could not be found. 16725 MediaErrorCodeExternalVideoNotFound MediaErrorCode = "EXTERNAL_VIDEO_NOT_FOUND" 16726 // Media could not be created because the external video is not listed or is private. 16727 MediaErrorCodeExternalVideoUnlisted MediaErrorCode = "EXTERNAL_VIDEO_UNLISTED" 16728 // Media could not be created because the external video has an invalid aspect ratio. 16729 MediaErrorCodeExternalVideoInvalidAspectRatio MediaErrorCode = "EXTERNAL_VIDEO_INVALID_ASPECT_RATIO" 16730 // Media could not be created because the metadata could not be read. 16731 MediaErrorCodeVideoMetadataReadError MediaErrorCode = "VIDEO_METADATA_READ_ERROR" 16732 // Media could not be created because it has an invalid file type. 16733 MediaErrorCodeVideoInvalidFiletypeError MediaErrorCode = "VIDEO_INVALID_FILETYPE_ERROR" 16734 // Media could not be created because it does not meet the minimum width requirement. 16735 MediaErrorCodeVideoMinWidthError MediaErrorCode = "VIDEO_MIN_WIDTH_ERROR" 16736 // Media could not be created because it does not meet the maximum width requirement. 16737 MediaErrorCodeVideoMaxWidthError MediaErrorCode = "VIDEO_MAX_WIDTH_ERROR" 16738 // Media could not be created because it does not meet the minimum height requirement. 16739 MediaErrorCodeVideoMinHeightError MediaErrorCode = "VIDEO_MIN_HEIGHT_ERROR" 16740 // Media could not be created because it does not meet the maximum height requirement. 16741 MediaErrorCodeVideoMaxHeightError MediaErrorCode = "VIDEO_MAX_HEIGHT_ERROR" 16742 // Media could not be created because it does not meet the minimum duration requirement. 16743 MediaErrorCodeVideoMinDurationError MediaErrorCode = "VIDEO_MIN_DURATION_ERROR" 16744 // Media could not be created because it does not meet the maximum duration requirement. 16745 MediaErrorCodeVideoMaxDurationError MediaErrorCode = "VIDEO_MAX_DURATION_ERROR" 16746 // Video failed validation. 16747 MediaErrorCodeVideoValidationError MediaErrorCode = "VIDEO_VALIDATION_ERROR" 16748 // Model failed validation. 16749 MediaErrorCodeModel3dValidationError MediaErrorCode = "MODEL3D_VALIDATION_ERROR" 16750 // Media could not be created because the model's thumbnail generation failed. 16751 MediaErrorCodeModel3dThumbnailGenerationError MediaErrorCode = "MODEL3D_THUMBNAIL_GENERATION_ERROR" 16752 // Media could not be created because the model can't be converted to USDZ format. 16753 MediaErrorCodeModel3dGlbToUsdzConversionError MediaErrorCode = "MODEL3D_GLB_TO_USDZ_CONVERSION_ERROR" 16754 // Media could not be created because the model file failed processing. 16755 MediaErrorCodeModel3dGlbOutputCreationError MediaErrorCode = "MODEL3D_GLB_OUTPUT_CREATION_ERROR" 16756 // Media could not be created because the image is an unsupported file type. 16757 MediaErrorCodeUnsupportedImageFileType MediaErrorCode = "UNSUPPORTED_IMAGE_FILE_TYPE" 16758 // Media could not be created because the image size is too large. 16759 MediaErrorCodeInvalidImageFileSize MediaErrorCode = "INVALID_IMAGE_FILE_SIZE" 16760 ) 16761 16762 var AllMediaErrorCode = []MediaErrorCode{ 16763 MediaErrorCodeUnknown, 16764 MediaErrorCodeInvalidSignedURL, 16765 MediaErrorCodeImageDownloadFailure, 16766 MediaErrorCodeImageProcessingFailure, 16767 MediaErrorCodeMediaTimeoutError, 16768 MediaErrorCodeExternalVideoNotFound, 16769 MediaErrorCodeExternalVideoUnlisted, 16770 MediaErrorCodeExternalVideoInvalidAspectRatio, 16771 MediaErrorCodeVideoMetadataReadError, 16772 MediaErrorCodeVideoInvalidFiletypeError, 16773 MediaErrorCodeVideoMinWidthError, 16774 MediaErrorCodeVideoMaxWidthError, 16775 MediaErrorCodeVideoMinHeightError, 16776 MediaErrorCodeVideoMaxHeightError, 16777 MediaErrorCodeVideoMinDurationError, 16778 MediaErrorCodeVideoMaxDurationError, 16779 MediaErrorCodeVideoValidationError, 16780 MediaErrorCodeModel3dValidationError, 16781 MediaErrorCodeModel3dThumbnailGenerationError, 16782 MediaErrorCodeModel3dGlbToUsdzConversionError, 16783 MediaErrorCodeModel3dGlbOutputCreationError, 16784 MediaErrorCodeUnsupportedImageFileType, 16785 MediaErrorCodeInvalidImageFileSize, 16786 } 16787 16788 func (e MediaErrorCode) IsValid() bool { 16789 switch e { 16790 case MediaErrorCodeUnknown, MediaErrorCodeInvalidSignedURL, MediaErrorCodeImageDownloadFailure, MediaErrorCodeImageProcessingFailure, MediaErrorCodeMediaTimeoutError, MediaErrorCodeExternalVideoNotFound, MediaErrorCodeExternalVideoUnlisted, MediaErrorCodeExternalVideoInvalidAspectRatio, MediaErrorCodeVideoMetadataReadError, MediaErrorCodeVideoInvalidFiletypeError, MediaErrorCodeVideoMinWidthError, MediaErrorCodeVideoMaxWidthError, MediaErrorCodeVideoMinHeightError, MediaErrorCodeVideoMaxHeightError, MediaErrorCodeVideoMinDurationError, MediaErrorCodeVideoMaxDurationError, MediaErrorCodeVideoValidationError, MediaErrorCodeModel3dValidationError, MediaErrorCodeModel3dThumbnailGenerationError, MediaErrorCodeModel3dGlbToUsdzConversionError, MediaErrorCodeModel3dGlbOutputCreationError, MediaErrorCodeUnsupportedImageFileType, MediaErrorCodeInvalidImageFileSize: 16791 return true 16792 } 16793 return false 16794 } 16795 16796 func (e MediaErrorCode) String() string { 16797 return string(e) 16798 } 16799 16800 func (e *MediaErrorCode) UnmarshalGQL(v interface{}) error { 16801 str, ok := v.(string) 16802 if !ok { 16803 return fmt.Errorf("enums must be strings") 16804 } 16805 16806 *e = MediaErrorCode(str) 16807 if !e.IsValid() { 16808 return fmt.Errorf("%s is not a valid MediaErrorCode", str) 16809 } 16810 return nil 16811 } 16812 16813 func (e MediaErrorCode) MarshalGQL(w io.Writer) { 16814 fmt.Fprint(w, strconv.Quote(e.String())) 16815 } 16816 16817 // The possible statuses for a media preview image. 16818 type MediaPreviewImageStatus string 16819 16820 const ( 16821 // Preview image is uploaded but not yet processed. 16822 MediaPreviewImageStatusUploaded MediaPreviewImageStatus = "UPLOADED" 16823 // Preview image is being processed. 16824 MediaPreviewImageStatusProcessing MediaPreviewImageStatus = "PROCESSING" 16825 // Preview image is ready to be displayed. 16826 MediaPreviewImageStatusReady MediaPreviewImageStatus = "READY" 16827 // Preview image processing has failed. 16828 MediaPreviewImageStatusFailed MediaPreviewImageStatus = "FAILED" 16829 ) 16830 16831 var AllMediaPreviewImageStatus = []MediaPreviewImageStatus{ 16832 MediaPreviewImageStatusUploaded, 16833 MediaPreviewImageStatusProcessing, 16834 MediaPreviewImageStatusReady, 16835 MediaPreviewImageStatusFailed, 16836 } 16837 16838 func (e MediaPreviewImageStatus) IsValid() bool { 16839 switch e { 16840 case MediaPreviewImageStatusUploaded, MediaPreviewImageStatusProcessing, MediaPreviewImageStatusReady, MediaPreviewImageStatusFailed: 16841 return true 16842 } 16843 return false 16844 } 16845 16846 func (e MediaPreviewImageStatus) String() string { 16847 return string(e) 16848 } 16849 16850 func (e *MediaPreviewImageStatus) UnmarshalGQL(v interface{}) error { 16851 str, ok := v.(string) 16852 if !ok { 16853 return fmt.Errorf("enums must be strings") 16854 } 16855 16856 *e = MediaPreviewImageStatus(str) 16857 if !e.IsValid() { 16858 return fmt.Errorf("%s is not a valid MediaPreviewImageStatus", str) 16859 } 16860 return nil 16861 } 16862 16863 func (e MediaPreviewImageStatus) MarshalGQL(w io.Writer) { 16864 fmt.Fprint(w, strconv.Quote(e.String())) 16865 } 16866 16867 // The possible statuses for a media object. 16868 type MediaStatus string 16869 16870 const ( 16871 // Media has been uploaded but not yet processed. 16872 MediaStatusUploaded MediaStatus = "UPLOADED" 16873 // Media is being processed. 16874 MediaStatusProcessing MediaStatus = "PROCESSING" 16875 // Media is ready to be displayed. 16876 MediaStatusReady MediaStatus = "READY" 16877 // Media processing has failed. 16878 MediaStatusFailed MediaStatus = "FAILED" 16879 ) 16880 16881 var AllMediaStatus = []MediaStatus{ 16882 MediaStatusUploaded, 16883 MediaStatusProcessing, 16884 MediaStatusReady, 16885 MediaStatusFailed, 16886 } 16887 16888 func (e MediaStatus) IsValid() bool { 16889 switch e { 16890 case MediaStatusUploaded, MediaStatusProcessing, MediaStatusReady, MediaStatusFailed: 16891 return true 16892 } 16893 return false 16894 } 16895 16896 func (e MediaStatus) String() string { 16897 return string(e) 16898 } 16899 16900 func (e *MediaStatus) UnmarshalGQL(v interface{}) error { 16901 str, ok := v.(string) 16902 if !ok { 16903 return fmt.Errorf("enums must be strings") 16904 } 16905 16906 *e = MediaStatus(str) 16907 if !e.IsValid() { 16908 return fmt.Errorf("%s is not a valid MediaStatus", str) 16909 } 16910 return nil 16911 } 16912 16913 func (e MediaStatus) MarshalGQL(w io.Writer) { 16914 fmt.Fprint(w, strconv.Quote(e.String())) 16915 } 16916 16917 // Possible error codes that could be returned by MediaUserError. 16918 type MediaUserErrorCode string 16919 16920 const ( 16921 // Input value is invalid. 16922 MediaUserErrorCodeInvalid MediaUserErrorCode = "INVALID" 16923 // Input value is blank. 16924 MediaUserErrorCodeBlank MediaUserErrorCode = "BLANK" 16925 // Video validation failed. 16926 MediaUserErrorCodeVideoValidationError MediaUserErrorCode = "VIDEO_VALIDATION_ERROR" 16927 // Model validation failed. 16928 MediaUserErrorCodeModel3dValidationError MediaUserErrorCode = "MODEL3D_VALIDATION_ERROR" 16929 // Video creation throttle was exceeded. 16930 MediaUserErrorCodeVideoThrottleExceeded MediaUserErrorCode = "VIDEO_THROTTLE_EXCEEDED" 16931 // Model3d creation throttle was exceeded. 16932 MediaUserErrorCodeModel3dThrottleExceeded MediaUserErrorCode = "MODEL3D_THROTTLE_EXCEEDED" 16933 // Exceeded the limit of media per product. 16934 MediaUserErrorCodeProductMediaLimitExceeded MediaUserErrorCode = "PRODUCT_MEDIA_LIMIT_EXCEEDED" 16935 // Exceeded the limit of media per shop. 16936 MediaUserErrorCodeShopMediaLimitExceeded MediaUserErrorCode = "SHOP_MEDIA_LIMIT_EXCEEDED" 16937 // Product does not exist. 16938 MediaUserErrorCodeProductDoesNotExist MediaUserErrorCode = "PRODUCT_DOES_NOT_EXIST" 16939 // Media does not exist. 16940 MediaUserErrorCodeMediaDoesNotExist MediaUserErrorCode = "MEDIA_DOES_NOT_EXIST" 16941 // Media does not exist on the given product. 16942 MediaUserErrorCodeMediaDoesNotExistOnProduct MediaUserErrorCode = "MEDIA_DOES_NOT_EXIST_ON_PRODUCT" 16943 // Only one mediaId is allowed per variant-media input pair. 16944 MediaUserErrorCodeTooManyMediaPerInputPair MediaUserErrorCode = "TOO_MANY_MEDIA_PER_INPUT_PAIR" 16945 // Exceeded the maximum number of 100 variant-media pairs per mutation call. 16946 MediaUserErrorCodeMaximumVariantMediaPairsExceeded MediaUserErrorCode = "MAXIMUM_VARIANT_MEDIA_PAIRS_EXCEEDED" 16947 // Invalid media type. 16948 MediaUserErrorCodeInvalidMediaType MediaUserErrorCode = "INVALID_MEDIA_TYPE" 16949 // Variant specified in more than one pair. 16950 MediaUserErrorCodeProductVariantSpecifiedMultipleTimes MediaUserErrorCode = "PRODUCT_VARIANT_SPECIFIED_MULTIPLE_TIMES" 16951 // Variant does not exist on the given product. 16952 MediaUserErrorCodeProductVariantDoesNotExistOnProduct MediaUserErrorCode = "PRODUCT_VARIANT_DOES_NOT_EXIST_ON_PRODUCT" 16953 // Non-ready media are not supported. 16954 MediaUserErrorCodeNonReadyMedia MediaUserErrorCode = "NON_READY_MEDIA" 16955 // Product variant already has attached media. 16956 MediaUserErrorCodeProductVariantAlreadyHasMedia MediaUserErrorCode = "PRODUCT_VARIANT_ALREADY_HAS_MEDIA" 16957 // The specified media is not attached to the specified variant. 16958 MediaUserErrorCodeMediaIsNotAttachedToVariant MediaUserErrorCode = "MEDIA_IS_NOT_ATTACHED_TO_VARIANT" 16959 // Media cannot be modified. It is currently being modified by another operation. 16960 MediaUserErrorCodeMediaCannotBeModified MediaUserErrorCode = "MEDIA_CANNOT_BE_MODIFIED" 16961 ) 16962 16963 var AllMediaUserErrorCode = []MediaUserErrorCode{ 16964 MediaUserErrorCodeInvalid, 16965 MediaUserErrorCodeBlank, 16966 MediaUserErrorCodeVideoValidationError, 16967 MediaUserErrorCodeModel3dValidationError, 16968 MediaUserErrorCodeVideoThrottleExceeded, 16969 MediaUserErrorCodeModel3dThrottleExceeded, 16970 MediaUserErrorCodeProductMediaLimitExceeded, 16971 MediaUserErrorCodeShopMediaLimitExceeded, 16972 MediaUserErrorCodeProductDoesNotExist, 16973 MediaUserErrorCodeMediaDoesNotExist, 16974 MediaUserErrorCodeMediaDoesNotExistOnProduct, 16975 MediaUserErrorCodeTooManyMediaPerInputPair, 16976 MediaUserErrorCodeMaximumVariantMediaPairsExceeded, 16977 MediaUserErrorCodeInvalidMediaType, 16978 MediaUserErrorCodeProductVariantSpecifiedMultipleTimes, 16979 MediaUserErrorCodeProductVariantDoesNotExistOnProduct, 16980 MediaUserErrorCodeNonReadyMedia, 16981 MediaUserErrorCodeProductVariantAlreadyHasMedia, 16982 MediaUserErrorCodeMediaIsNotAttachedToVariant, 16983 MediaUserErrorCodeMediaCannotBeModified, 16984 } 16985 16986 func (e MediaUserErrorCode) IsValid() bool { 16987 switch e { 16988 case MediaUserErrorCodeInvalid, MediaUserErrorCodeBlank, MediaUserErrorCodeVideoValidationError, MediaUserErrorCodeModel3dValidationError, MediaUserErrorCodeVideoThrottleExceeded, MediaUserErrorCodeModel3dThrottleExceeded, MediaUserErrorCodeProductMediaLimitExceeded, MediaUserErrorCodeShopMediaLimitExceeded, MediaUserErrorCodeProductDoesNotExist, MediaUserErrorCodeMediaDoesNotExist, MediaUserErrorCodeMediaDoesNotExistOnProduct, MediaUserErrorCodeTooManyMediaPerInputPair, MediaUserErrorCodeMaximumVariantMediaPairsExceeded, MediaUserErrorCodeInvalidMediaType, MediaUserErrorCodeProductVariantSpecifiedMultipleTimes, MediaUserErrorCodeProductVariantDoesNotExistOnProduct, MediaUserErrorCodeNonReadyMedia, MediaUserErrorCodeProductVariantAlreadyHasMedia, MediaUserErrorCodeMediaIsNotAttachedToVariant, MediaUserErrorCodeMediaCannotBeModified: 16989 return true 16990 } 16991 return false 16992 } 16993 16994 func (e MediaUserErrorCode) String() string { 16995 return string(e) 16996 } 16997 16998 func (e *MediaUserErrorCode) UnmarshalGQL(v interface{}) error { 16999 str, ok := v.(string) 17000 if !ok { 17001 return fmt.Errorf("enums must be strings") 17002 } 17003 17004 *e = MediaUserErrorCode(str) 17005 if !e.IsValid() { 17006 return fmt.Errorf("%s is not a valid MediaUserErrorCode", str) 17007 } 17008 return nil 17009 } 17010 17011 func (e MediaUserErrorCode) MarshalGQL(w io.Writer) { 17012 fmt.Fprint(w, strconv.Quote(e.String())) 17013 } 17014 17015 // Metafield owner types. 17016 type MetafieldOwnerType string 17017 17018 const ( 17019 // A metafield owner type. 17020 MetafieldOwnerTypeArticle MetafieldOwnerType = "ARTICLE" 17021 // A metafield owner type. 17022 MetafieldOwnerTypeBlog MetafieldOwnerType = "BLOG" 17023 // A metafield owner type. 17024 MetafieldOwnerTypeCollection MetafieldOwnerType = "COLLECTION" 17025 // A metafield owner type. 17026 MetafieldOwnerTypeCustomer MetafieldOwnerType = "CUSTOMER" 17027 // A metafield owner type. 17028 MetafieldOwnerTypeDraftorder MetafieldOwnerType = "DRAFTORDER" 17029 // A metafield owner type. 17030 MetafieldOwnerTypeOrder MetafieldOwnerType = "ORDER" 17031 // A metafield owner type. 17032 MetafieldOwnerTypePage MetafieldOwnerType = "PAGE" 17033 // A metafield owner type. 17034 MetafieldOwnerTypeProduct MetafieldOwnerType = "PRODUCT" 17035 // A metafield owner type. 17036 MetafieldOwnerTypeProductimage MetafieldOwnerType = "PRODUCTIMAGE" 17037 // A metafield owner type. 17038 MetafieldOwnerTypeProductvariant MetafieldOwnerType = "PRODUCTVARIANT" 17039 // A metafield owner type. 17040 MetafieldOwnerTypeShop MetafieldOwnerType = "SHOP" 17041 ) 17042 17043 var AllMetafieldOwnerType = []MetafieldOwnerType{ 17044 MetafieldOwnerTypeArticle, 17045 MetafieldOwnerTypeBlog, 17046 MetafieldOwnerTypeCollection, 17047 MetafieldOwnerTypeCustomer, 17048 MetafieldOwnerTypeDraftorder, 17049 MetafieldOwnerTypeOrder, 17050 MetafieldOwnerTypePage, 17051 MetafieldOwnerTypeProduct, 17052 MetafieldOwnerTypeProductimage, 17053 MetafieldOwnerTypeProductvariant, 17054 MetafieldOwnerTypeShop, 17055 } 17056 17057 func (e MetafieldOwnerType) IsValid() bool { 17058 switch e { 17059 case MetafieldOwnerTypeArticle, MetafieldOwnerTypeBlog, MetafieldOwnerTypeCollection, MetafieldOwnerTypeCustomer, MetafieldOwnerTypeDraftorder, MetafieldOwnerTypeOrder, MetafieldOwnerTypePage, MetafieldOwnerTypeProduct, MetafieldOwnerTypeProductimage, MetafieldOwnerTypeProductvariant, MetafieldOwnerTypeShop: 17060 return true 17061 } 17062 return false 17063 } 17064 17065 func (e MetafieldOwnerType) String() string { 17066 return string(e) 17067 } 17068 17069 func (e *MetafieldOwnerType) UnmarshalGQL(v interface{}) error { 17070 str, ok := v.(string) 17071 if !ok { 17072 return fmt.Errorf("enums must be strings") 17073 } 17074 17075 *e = MetafieldOwnerType(str) 17076 if !e.IsValid() { 17077 return fmt.Errorf("%s is not a valid MetafieldOwnerType", str) 17078 } 17079 return nil 17080 } 17081 17082 func (e MetafieldOwnerType) MarshalGQL(w io.Writer) { 17083 fmt.Fprint(w, strconv.Quote(e.String())) 17084 } 17085 17086 // Metafield value types. 17087 type MetafieldValueType string 17088 17089 const ( 17090 // A string. 17091 MetafieldValueTypeString MetafieldValueType = "STRING" 17092 // An integer. 17093 MetafieldValueTypeInteger MetafieldValueType = "INTEGER" 17094 // A JSON string. 17095 MetafieldValueTypeJSONString MetafieldValueType = "JSON_STRING" 17096 ) 17097 17098 var AllMetafieldValueType = []MetafieldValueType{ 17099 MetafieldValueTypeString, 17100 MetafieldValueTypeInteger, 17101 MetafieldValueTypeJSONString, 17102 } 17103 17104 func (e MetafieldValueType) IsValid() bool { 17105 switch e { 17106 case MetafieldValueTypeString, MetafieldValueTypeInteger, MetafieldValueTypeJSONString: 17107 return true 17108 } 17109 return false 17110 } 17111 17112 func (e MetafieldValueType) String() string { 17113 return string(e) 17114 } 17115 17116 func (e *MetafieldValueType) UnmarshalGQL(v interface{}) error { 17117 str, ok := v.(string) 17118 if !ok { 17119 return fmt.Errorf("enums must be strings") 17120 } 17121 17122 *e = MetafieldValueType(str) 17123 if !e.IsValid() { 17124 return fmt.Errorf("%s is not a valid MetafieldValueType", str) 17125 } 17126 return nil 17127 } 17128 17129 func (e MetafieldValueType) MarshalGQL(w io.Writer) { 17130 fmt.Fprint(w, strconv.Quote(e.String())) 17131 } 17132 17133 // The set of valid sort keys for the MethodDefinition query. 17134 type MethodDefinitionSortKeys string 17135 17136 const ( 17137 // Sort by the `rate_provider_type` value. 17138 MethodDefinitionSortKeysRateProviderType MethodDefinitionSortKeys = "RATE_PROVIDER_TYPE" 17139 // Sort by the `id` value. 17140 MethodDefinitionSortKeysID MethodDefinitionSortKeys = "ID" 17141 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 17142 // results by relevance to the search term(s). When no search query is specified, this sort key is not 17143 // deterministic and should not be used. 17144 MethodDefinitionSortKeysRelevance MethodDefinitionSortKeys = "RELEVANCE" 17145 ) 17146 17147 var AllMethodDefinitionSortKeys = []MethodDefinitionSortKeys{ 17148 MethodDefinitionSortKeysRateProviderType, 17149 MethodDefinitionSortKeysID, 17150 MethodDefinitionSortKeysRelevance, 17151 } 17152 17153 func (e MethodDefinitionSortKeys) IsValid() bool { 17154 switch e { 17155 case MethodDefinitionSortKeysRateProviderType, MethodDefinitionSortKeysID, MethodDefinitionSortKeysRelevance: 17156 return true 17157 } 17158 return false 17159 } 17160 17161 func (e MethodDefinitionSortKeys) String() string { 17162 return string(e) 17163 } 17164 17165 func (e *MethodDefinitionSortKeys) UnmarshalGQL(v interface{}) error { 17166 str, ok := v.(string) 17167 if !ok { 17168 return fmt.Errorf("enums must be strings") 17169 } 17170 17171 *e = MethodDefinitionSortKeys(str) 17172 if !e.IsValid() { 17173 return fmt.Errorf("%s is not a valid MethodDefinitionSortKeys", str) 17174 } 17175 return nil 17176 } 17177 17178 func (e MethodDefinitionSortKeys) MarshalGQL(w io.Writer) { 17179 fmt.Fprint(w, strconv.Quote(e.String())) 17180 } 17181 17182 // Represents the reason that the order is being canceled. Valid values are: customer, fraud, inventory, declined, other. 17183 type OrderCancelReason string 17184 17185 const ( 17186 // The customer wanted to cancel the order. 17187 OrderCancelReasonCustomer OrderCancelReason = "CUSTOMER" 17188 // The order was fraudulent. 17189 OrderCancelReasonFraud OrderCancelReason = "FRAUD" 17190 // There was insufficient inventory. 17191 OrderCancelReasonInventory OrderCancelReason = "INVENTORY" 17192 // Payment was declined. 17193 OrderCancelReasonDeclined OrderCancelReason = "DECLINED" 17194 // Some other reason not listed. 17195 OrderCancelReasonOther OrderCancelReason = "OTHER" 17196 ) 17197 17198 var AllOrderCancelReason = []OrderCancelReason{ 17199 OrderCancelReasonCustomer, 17200 OrderCancelReasonFraud, 17201 OrderCancelReasonInventory, 17202 OrderCancelReasonDeclined, 17203 OrderCancelReasonOther, 17204 } 17205 17206 func (e OrderCancelReason) IsValid() bool { 17207 switch e { 17208 case OrderCancelReasonCustomer, OrderCancelReasonFraud, OrderCancelReasonInventory, OrderCancelReasonDeclined, OrderCancelReasonOther: 17209 return true 17210 } 17211 return false 17212 } 17213 17214 func (e OrderCancelReason) String() string { 17215 return string(e) 17216 } 17217 17218 func (e *OrderCancelReason) UnmarshalGQL(v interface{}) error { 17219 str, ok := v.(string) 17220 if !ok { 17221 return fmt.Errorf("enums must be strings") 17222 } 17223 17224 *e = OrderCancelReason(str) 17225 if !e.IsValid() { 17226 return fmt.Errorf("%s is not a valid OrderCancelReason", str) 17227 } 17228 return nil 17229 } 17230 17231 func (e OrderCancelReason) MarshalGQL(w io.Writer) { 17232 fmt.Fprint(w, strconv.Quote(e.String())) 17233 } 17234 17235 // Represents the order's current financial status. 17236 type OrderDisplayFinancialStatus string 17237 17238 const ( 17239 // Displayed as **Pending**. 17240 OrderDisplayFinancialStatusPending OrderDisplayFinancialStatus = "PENDING" 17241 // Displayed as **Authorized**. 17242 OrderDisplayFinancialStatusAuthorized OrderDisplayFinancialStatus = "AUTHORIZED" 17243 // Displayed as **Partially paid**. 17244 OrderDisplayFinancialStatusPartiallyPaid OrderDisplayFinancialStatus = "PARTIALLY_PAID" 17245 // Displayed as **Partially refunded**. 17246 OrderDisplayFinancialStatusPartiallyRefunded OrderDisplayFinancialStatus = "PARTIALLY_REFUNDED" 17247 // Displayed as **Voided**. 17248 OrderDisplayFinancialStatusVoided OrderDisplayFinancialStatus = "VOIDED" 17249 // Displayed as **Paid**. 17250 OrderDisplayFinancialStatusPaid OrderDisplayFinancialStatus = "PAID" 17251 // Displayed as **Refunded**. 17252 OrderDisplayFinancialStatusRefunded OrderDisplayFinancialStatus = "REFUNDED" 17253 // Displayed as **Expired**. 17254 OrderDisplayFinancialStatusExpired OrderDisplayFinancialStatus = "EXPIRED" 17255 ) 17256 17257 var AllOrderDisplayFinancialStatus = []OrderDisplayFinancialStatus{ 17258 OrderDisplayFinancialStatusPending, 17259 OrderDisplayFinancialStatusAuthorized, 17260 OrderDisplayFinancialStatusPartiallyPaid, 17261 OrderDisplayFinancialStatusPartiallyRefunded, 17262 OrderDisplayFinancialStatusVoided, 17263 OrderDisplayFinancialStatusPaid, 17264 OrderDisplayFinancialStatusRefunded, 17265 OrderDisplayFinancialStatusExpired, 17266 } 17267 17268 func (e OrderDisplayFinancialStatus) IsValid() bool { 17269 switch e { 17270 case OrderDisplayFinancialStatusPending, OrderDisplayFinancialStatusAuthorized, OrderDisplayFinancialStatusPartiallyPaid, OrderDisplayFinancialStatusPartiallyRefunded, OrderDisplayFinancialStatusVoided, OrderDisplayFinancialStatusPaid, OrderDisplayFinancialStatusRefunded, OrderDisplayFinancialStatusExpired: 17271 return true 17272 } 17273 return false 17274 } 17275 17276 func (e OrderDisplayFinancialStatus) String() string { 17277 return string(e) 17278 } 17279 17280 func (e *OrderDisplayFinancialStatus) UnmarshalGQL(v interface{}) error { 17281 str, ok := v.(string) 17282 if !ok { 17283 return fmt.Errorf("enums must be strings") 17284 } 17285 17286 *e = OrderDisplayFinancialStatus(str) 17287 if !e.IsValid() { 17288 return fmt.Errorf("%s is not a valid OrderDisplayFinancialStatus", str) 17289 } 17290 return nil 17291 } 17292 17293 func (e OrderDisplayFinancialStatus) MarshalGQL(w io.Writer) { 17294 fmt.Fprint(w, strconv.Quote(e.String())) 17295 } 17296 17297 // Represents the order's current fulfillment status. Valid values are: unfulfilled, partial, fulfilled, restocked. 17298 type OrderDisplayFulfillmentStatus string 17299 17300 const ( 17301 // Displayed as **Unfulfilled**. 17302 OrderDisplayFulfillmentStatusUnfulfilled OrderDisplayFulfillmentStatus = "UNFULFILLED" 17303 // Displayed as **Partially fulfilled**. 17304 OrderDisplayFulfillmentStatusPartiallyFulfilled OrderDisplayFulfillmentStatus = "PARTIALLY_FULFILLED" 17305 // Displayed as **Fulfilled**. 17306 OrderDisplayFulfillmentStatusFulfilled OrderDisplayFulfillmentStatus = "FULFILLED" 17307 // Displayed as **Restocked**. 17308 OrderDisplayFulfillmentStatusRestocked OrderDisplayFulfillmentStatus = "RESTOCKED" 17309 // Displayed as **Pending fulfillment**. 17310 OrderDisplayFulfillmentStatusPendingFulfillment OrderDisplayFulfillmentStatus = "PENDING_FULFILLMENT" 17311 // Displayed as **Open**. 17312 OrderDisplayFulfillmentStatusOpen OrderDisplayFulfillmentStatus = "OPEN" 17313 // Displayed as **In progress**. 17314 OrderDisplayFulfillmentStatusInProgress OrderDisplayFulfillmentStatus = "IN_PROGRESS" 17315 // Displayed as **Scheduled**. 17316 OrderDisplayFulfillmentStatusScheduled OrderDisplayFulfillmentStatus = "SCHEDULED" 17317 ) 17318 17319 var AllOrderDisplayFulfillmentStatus = []OrderDisplayFulfillmentStatus{ 17320 OrderDisplayFulfillmentStatusUnfulfilled, 17321 OrderDisplayFulfillmentStatusPartiallyFulfilled, 17322 OrderDisplayFulfillmentStatusFulfilled, 17323 OrderDisplayFulfillmentStatusRestocked, 17324 OrderDisplayFulfillmentStatusPendingFulfillment, 17325 OrderDisplayFulfillmentStatusOpen, 17326 OrderDisplayFulfillmentStatusInProgress, 17327 OrderDisplayFulfillmentStatusScheduled, 17328 } 17329 17330 func (e OrderDisplayFulfillmentStatus) IsValid() bool { 17331 switch e { 17332 case OrderDisplayFulfillmentStatusUnfulfilled, OrderDisplayFulfillmentStatusPartiallyFulfilled, OrderDisplayFulfillmentStatusFulfilled, OrderDisplayFulfillmentStatusRestocked, OrderDisplayFulfillmentStatusPendingFulfillment, OrderDisplayFulfillmentStatusOpen, OrderDisplayFulfillmentStatusInProgress, OrderDisplayFulfillmentStatusScheduled: 17333 return true 17334 } 17335 return false 17336 } 17337 17338 func (e OrderDisplayFulfillmentStatus) String() string { 17339 return string(e) 17340 } 17341 17342 func (e *OrderDisplayFulfillmentStatus) UnmarshalGQL(v interface{}) error { 17343 str, ok := v.(string) 17344 if !ok { 17345 return fmt.Errorf("enums must be strings") 17346 } 17347 17348 *e = OrderDisplayFulfillmentStatus(str) 17349 if !e.IsValid() { 17350 return fmt.Errorf("%s is not a valid OrderDisplayFulfillmentStatus", str) 17351 } 17352 return nil 17353 } 17354 17355 func (e OrderDisplayFulfillmentStatus) MarshalGQL(w io.Writer) { 17356 fmt.Fprint(w, strconv.Quote(e.String())) 17357 } 17358 17359 // The likelihood that an order is fraudulent. 17360 type OrderRiskLevel string 17361 17362 const ( 17363 // There is a low level of risk that this order is fraudulent. 17364 OrderRiskLevelLow OrderRiskLevel = "LOW" 17365 // There is a medium level of risk that this order is fraudulent. 17366 OrderRiskLevelMedium OrderRiskLevel = "MEDIUM" 17367 // There is a high level of risk that this order is fraudulent. 17368 OrderRiskLevelHigh OrderRiskLevel = "HIGH" 17369 ) 17370 17371 var AllOrderRiskLevel = []OrderRiskLevel{ 17372 OrderRiskLevelLow, 17373 OrderRiskLevelMedium, 17374 OrderRiskLevelHigh, 17375 } 17376 17377 func (e OrderRiskLevel) IsValid() bool { 17378 switch e { 17379 case OrderRiskLevelLow, OrderRiskLevelMedium, OrderRiskLevelHigh: 17380 return true 17381 } 17382 return false 17383 } 17384 17385 func (e OrderRiskLevel) String() string { 17386 return string(e) 17387 } 17388 17389 func (e *OrderRiskLevel) UnmarshalGQL(v interface{}) error { 17390 str, ok := v.(string) 17391 if !ok { 17392 return fmt.Errorf("enums must be strings") 17393 } 17394 17395 *e = OrderRiskLevel(str) 17396 if !e.IsValid() { 17397 return fmt.Errorf("%s is not a valid OrderRiskLevel", str) 17398 } 17399 return nil 17400 } 17401 17402 func (e OrderRiskLevel) MarshalGQL(w io.Writer) { 17403 fmt.Fprint(w, strconv.Quote(e.String())) 17404 } 17405 17406 // The set of valid sort keys for the Order query. 17407 type OrderSortKeys string 17408 17409 const ( 17410 // Sort by the `created_at` value. 17411 OrderSortKeysCreatedAt OrderSortKeys = "CREATED_AT" 17412 // Sort by the `customer_name` value. 17413 OrderSortKeysCustomerName OrderSortKeys = "CUSTOMER_NAME" 17414 // Sort by the `financial_status` value. 17415 OrderSortKeysFinancialStatus OrderSortKeys = "FINANCIAL_STATUS" 17416 // Sort by the `fulfillment_status` value. 17417 OrderSortKeysFulfillmentStatus OrderSortKeys = "FULFILLMENT_STATUS" 17418 // Sort by the `order_number` value. 17419 OrderSortKeysOrderNumber OrderSortKeys = "ORDER_NUMBER" 17420 // Sort by the `processed_at` value. 17421 OrderSortKeysProcessedAt OrderSortKeys = "PROCESSED_AT" 17422 // Sort by the `total_price` value. 17423 OrderSortKeysTotalPrice OrderSortKeys = "TOTAL_PRICE" 17424 // Sort by the `updated_at` value. 17425 OrderSortKeysUpdatedAt OrderSortKeys = "UPDATED_AT" 17426 // Sort by the `id` value. 17427 OrderSortKeysID OrderSortKeys = "ID" 17428 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 17429 // results by relevance to the search term(s). When no search query is specified, this sort key is not 17430 // deterministic and should not be used. 17431 OrderSortKeysRelevance OrderSortKeys = "RELEVANCE" 17432 ) 17433 17434 var AllOrderSortKeys = []OrderSortKeys{ 17435 OrderSortKeysCreatedAt, 17436 OrderSortKeysCustomerName, 17437 OrderSortKeysFinancialStatus, 17438 OrderSortKeysFulfillmentStatus, 17439 OrderSortKeysOrderNumber, 17440 OrderSortKeysProcessedAt, 17441 OrderSortKeysTotalPrice, 17442 OrderSortKeysUpdatedAt, 17443 OrderSortKeysID, 17444 OrderSortKeysRelevance, 17445 } 17446 17447 func (e OrderSortKeys) IsValid() bool { 17448 switch e { 17449 case OrderSortKeysCreatedAt, OrderSortKeysCustomerName, OrderSortKeysFinancialStatus, OrderSortKeysFulfillmentStatus, OrderSortKeysOrderNumber, OrderSortKeysProcessedAt, OrderSortKeysTotalPrice, OrderSortKeysUpdatedAt, OrderSortKeysID, OrderSortKeysRelevance: 17450 return true 17451 } 17452 return false 17453 } 17454 17455 func (e OrderSortKeys) String() string { 17456 return string(e) 17457 } 17458 17459 func (e *OrderSortKeys) UnmarshalGQL(v interface{}) error { 17460 str, ok := v.(string) 17461 if !ok { 17462 return fmt.Errorf("enums must be strings") 17463 } 17464 17465 *e = OrderSortKeys(str) 17466 if !e.IsValid() { 17467 return fmt.Errorf("%s is not a valid OrderSortKeys", str) 17468 } 17469 return nil 17470 } 17471 17472 func (e OrderSortKeys) MarshalGQL(w io.Writer) { 17473 fmt.Fprint(w, strconv.Quote(e.String())) 17474 } 17475 17476 // A standardized error code, independent of the payment provider. 17477 type OrderTransactionErrorCode string 17478 17479 const ( 17480 // The card number is incorrect. 17481 OrderTransactionErrorCodeIncorrectNumber OrderTransactionErrorCode = "INCORRECT_NUMBER" 17482 // The format of the card number is incorrect. 17483 OrderTransactionErrorCodeInvalidNumber OrderTransactionErrorCode = "INVALID_NUMBER" 17484 // The format of the expiry date is incorrect. 17485 OrderTransactionErrorCodeInvalidExpiryDate OrderTransactionErrorCode = "INVALID_EXPIRY_DATE" 17486 // The format of the CVC is incorrect. 17487 OrderTransactionErrorCodeInvalidCvc OrderTransactionErrorCode = "INVALID_CVC" 17488 // The card is expired. 17489 OrderTransactionErrorCodeExpiredCard OrderTransactionErrorCode = "EXPIRED_CARD" 17490 // The CVC does not match the card number. 17491 OrderTransactionErrorCodeIncorrectCvc OrderTransactionErrorCode = "INCORRECT_CVC" 17492 // The ZIP or postal code does not match the card number. 17493 OrderTransactionErrorCodeIncorrectZip OrderTransactionErrorCode = "INCORRECT_ZIP" 17494 // The address does not match the card number. 17495 OrderTransactionErrorCodeIncorrectAddress OrderTransactionErrorCode = "INCORRECT_ADDRESS" 17496 // The entered PIN is incorrect. 17497 OrderTransactionErrorCodeIncorrectPin OrderTransactionErrorCode = "INCORRECT_PIN" 17498 // The card was declined. 17499 OrderTransactionErrorCodeCardDeclined OrderTransactionErrorCode = "CARD_DECLINED" 17500 // There was an error while processing the payment. 17501 OrderTransactionErrorCodeProcessingError OrderTransactionErrorCode = "PROCESSING_ERROR" 17502 // Call the card issuer. 17503 OrderTransactionErrorCodeCallIssuer OrderTransactionErrorCode = "CALL_ISSUER" 17504 // The card has been reported as lost or stolen, and the card issuer has requested that the merchant keep the card and call the number on the back. 17505 OrderTransactionErrorCodePickUpCard OrderTransactionErrorCode = "PICK_UP_CARD" 17506 // There is an error in the gateway or merchant configuration. 17507 OrderTransactionErrorCodeConfigError OrderTransactionErrorCode = "CONFIG_ERROR" 17508 // A real card was used but the gateway was in test mode. 17509 OrderTransactionErrorCodeTestModeLiveCard OrderTransactionErrorCode = "TEST_MODE_LIVE_CARD" 17510 // The gateway or merchant configuration doesn't support a feature, such as network tokenization. 17511 OrderTransactionErrorCodeUnsupportedFeature OrderTransactionErrorCode = "UNSUPPORTED_FEATURE" 17512 // There was an unknown error with processing the payment. 17513 OrderTransactionErrorCodeGenericError OrderTransactionErrorCode = "GENERIC_ERROR" 17514 // The payment method is not available in the customer's country. 17515 OrderTransactionErrorCodeInvalidCountry OrderTransactionErrorCode = "INVALID_COUNTRY" 17516 // The amount is either too high or too low for the provider. 17517 OrderTransactionErrorCodeInvalidAmount OrderTransactionErrorCode = "INVALID_AMOUNT" 17518 // The payment method is momentarily unavailable. 17519 OrderTransactionErrorCodePaymentMethodUnavailable OrderTransactionErrorCode = "PAYMENT_METHOD_UNAVAILABLE" 17520 // The payment method was invalid. 17521 OrderTransactionErrorCodeAmazonPaymentsInvalidPaymentMethod OrderTransactionErrorCode = "AMAZON_PAYMENTS_INVALID_PAYMENT_METHOD" 17522 // The maximum amount has been captured. 17523 OrderTransactionErrorCodeAmazonPaymentsMaxAmountCharged OrderTransactionErrorCode = "AMAZON_PAYMENTS_MAX_AMOUNT_CHARGED" 17524 // The maximum amount has been refunded. 17525 OrderTransactionErrorCodeAmazonPaymentsMaxAmountRefunded OrderTransactionErrorCode = "AMAZON_PAYMENTS_MAX_AMOUNT_REFUNDED" 17526 // The maximum of 10 authorizations has been captured for an order. 17527 OrderTransactionErrorCodeAmazonPaymentsMaxAuthorizationsCaptured OrderTransactionErrorCode = "AMAZON_PAYMENTS_MAX_AUTHORIZATIONS_CAPTURED" 17528 // The maximum of 10 refunds has been processed for an order. 17529 OrderTransactionErrorCodeAmazonPaymentsMaxRefundsProcessed OrderTransactionErrorCode = "AMAZON_PAYMENTS_MAX_REFUNDS_PROCESSED" 17530 // The order was canceled, which canceled all open authorizations. 17531 OrderTransactionErrorCodeAmazonPaymentsOrderReferenceCanceled OrderTransactionErrorCode = "AMAZON_PAYMENTS_ORDER_REFERENCE_CANCELED" 17532 // The order was not confirmed within three hours. 17533 OrderTransactionErrorCodeAmazonPaymentsStale OrderTransactionErrorCode = "AMAZON_PAYMENTS_STALE" 17534 ) 17535 17536 var AllOrderTransactionErrorCode = []OrderTransactionErrorCode{ 17537 OrderTransactionErrorCodeIncorrectNumber, 17538 OrderTransactionErrorCodeInvalidNumber, 17539 OrderTransactionErrorCodeInvalidExpiryDate, 17540 OrderTransactionErrorCodeInvalidCvc, 17541 OrderTransactionErrorCodeExpiredCard, 17542 OrderTransactionErrorCodeIncorrectCvc, 17543 OrderTransactionErrorCodeIncorrectZip, 17544 OrderTransactionErrorCodeIncorrectAddress, 17545 OrderTransactionErrorCodeIncorrectPin, 17546 OrderTransactionErrorCodeCardDeclined, 17547 OrderTransactionErrorCodeProcessingError, 17548 OrderTransactionErrorCodeCallIssuer, 17549 OrderTransactionErrorCodePickUpCard, 17550 OrderTransactionErrorCodeConfigError, 17551 OrderTransactionErrorCodeTestModeLiveCard, 17552 OrderTransactionErrorCodeUnsupportedFeature, 17553 OrderTransactionErrorCodeGenericError, 17554 OrderTransactionErrorCodeInvalidCountry, 17555 OrderTransactionErrorCodeInvalidAmount, 17556 OrderTransactionErrorCodePaymentMethodUnavailable, 17557 OrderTransactionErrorCodeAmazonPaymentsInvalidPaymentMethod, 17558 OrderTransactionErrorCodeAmazonPaymentsMaxAmountCharged, 17559 OrderTransactionErrorCodeAmazonPaymentsMaxAmountRefunded, 17560 OrderTransactionErrorCodeAmazonPaymentsMaxAuthorizationsCaptured, 17561 OrderTransactionErrorCodeAmazonPaymentsMaxRefundsProcessed, 17562 OrderTransactionErrorCodeAmazonPaymentsOrderReferenceCanceled, 17563 OrderTransactionErrorCodeAmazonPaymentsStale, 17564 } 17565 17566 func (e OrderTransactionErrorCode) IsValid() bool { 17567 switch e { 17568 case OrderTransactionErrorCodeIncorrectNumber, OrderTransactionErrorCodeInvalidNumber, OrderTransactionErrorCodeInvalidExpiryDate, OrderTransactionErrorCodeInvalidCvc, OrderTransactionErrorCodeExpiredCard, OrderTransactionErrorCodeIncorrectCvc, OrderTransactionErrorCodeIncorrectZip, OrderTransactionErrorCodeIncorrectAddress, OrderTransactionErrorCodeIncorrectPin, OrderTransactionErrorCodeCardDeclined, OrderTransactionErrorCodeProcessingError, OrderTransactionErrorCodeCallIssuer, OrderTransactionErrorCodePickUpCard, OrderTransactionErrorCodeConfigError, OrderTransactionErrorCodeTestModeLiveCard, OrderTransactionErrorCodeUnsupportedFeature, OrderTransactionErrorCodeGenericError, OrderTransactionErrorCodeInvalidCountry, OrderTransactionErrorCodeInvalidAmount, OrderTransactionErrorCodePaymentMethodUnavailable, OrderTransactionErrorCodeAmazonPaymentsInvalidPaymentMethod, OrderTransactionErrorCodeAmazonPaymentsMaxAmountCharged, OrderTransactionErrorCodeAmazonPaymentsMaxAmountRefunded, OrderTransactionErrorCodeAmazonPaymentsMaxAuthorizationsCaptured, OrderTransactionErrorCodeAmazonPaymentsMaxRefundsProcessed, OrderTransactionErrorCodeAmazonPaymentsOrderReferenceCanceled, OrderTransactionErrorCodeAmazonPaymentsStale: 17569 return true 17570 } 17571 return false 17572 } 17573 17574 func (e OrderTransactionErrorCode) String() string { 17575 return string(e) 17576 } 17577 17578 func (e *OrderTransactionErrorCode) UnmarshalGQL(v interface{}) error { 17579 str, ok := v.(string) 17580 if !ok { 17581 return fmt.Errorf("enums must be strings") 17582 } 17583 17584 *e = OrderTransactionErrorCode(str) 17585 if !e.IsValid() { 17586 return fmt.Errorf("%s is not a valid OrderTransactionErrorCode", str) 17587 } 17588 return nil 17589 } 17590 17591 func (e OrderTransactionErrorCode) MarshalGQL(w io.Writer) { 17592 fmt.Fprint(w, strconv.Quote(e.String())) 17593 } 17594 17595 // The different kinds of order transactions. 17596 type OrderTransactionKind string 17597 17598 const ( 17599 // An authorization and capture performed together in a single step. 17600 OrderTransactionKindSale OrderTransactionKind = "SALE" 17601 // A transfer of the money that was reserved during the authorization stage. 17602 OrderTransactionKindCapture OrderTransactionKind = "CAPTURE" 17603 // An amount reserved against the cardholder's funding source. 17604 // Money does not change hands until the authorization is captured. 17605 OrderTransactionKindAuthorization OrderTransactionKind = "AUTHORIZATION" 17606 // A cancellation of a pending authorization or capture. 17607 OrderTransactionKindVoid OrderTransactionKind = "VOID" 17608 // A partial or full return of captured funds to the cardholder. 17609 // A refund can happen only after a capture is processed. 17610 OrderTransactionKindRefund OrderTransactionKind = "REFUND" 17611 // Money returned to the customer when they have paid too much. 17612 OrderTransactionKindChange OrderTransactionKind = "CHANGE" 17613 // An authorization for a payment taken with an EMV credit card reader. 17614 OrderTransactionKindEmvAuthorization OrderTransactionKind = "EMV_AUTHORIZATION" 17615 // A suggested refund transaction that can be used to create a refund. 17616 OrderTransactionKindSuggestedRefund OrderTransactionKind = "SUGGESTED_REFUND" 17617 ) 17618 17619 var AllOrderTransactionKind = []OrderTransactionKind{ 17620 OrderTransactionKindSale, 17621 OrderTransactionKindCapture, 17622 OrderTransactionKindAuthorization, 17623 OrderTransactionKindVoid, 17624 OrderTransactionKindRefund, 17625 OrderTransactionKindChange, 17626 OrderTransactionKindEmvAuthorization, 17627 OrderTransactionKindSuggestedRefund, 17628 } 17629 17630 func (e OrderTransactionKind) IsValid() bool { 17631 switch e { 17632 case OrderTransactionKindSale, OrderTransactionKindCapture, OrderTransactionKindAuthorization, OrderTransactionKindVoid, OrderTransactionKindRefund, OrderTransactionKindChange, OrderTransactionKindEmvAuthorization, OrderTransactionKindSuggestedRefund: 17633 return true 17634 } 17635 return false 17636 } 17637 17638 func (e OrderTransactionKind) String() string { 17639 return string(e) 17640 } 17641 17642 func (e *OrderTransactionKind) UnmarshalGQL(v interface{}) error { 17643 str, ok := v.(string) 17644 if !ok { 17645 return fmt.Errorf("enums must be strings") 17646 } 17647 17648 *e = OrderTransactionKind(str) 17649 if !e.IsValid() { 17650 return fmt.Errorf("%s is not a valid OrderTransactionKind", str) 17651 } 17652 return nil 17653 } 17654 17655 func (e OrderTransactionKind) MarshalGQL(w io.Writer) { 17656 fmt.Fprint(w, strconv.Quote(e.String())) 17657 } 17658 17659 // Transaction status' describe the status of a transaction. 17660 type OrderTransactionStatus string 17661 17662 const ( 17663 // The transaction succeeded. 17664 OrderTransactionStatusSuccess OrderTransactionStatus = "SUCCESS" 17665 // The transaction failed. 17666 OrderTransactionStatusFailure OrderTransactionStatus = "FAILURE" 17667 // The transaction is pending. 17668 OrderTransactionStatusPending OrderTransactionStatus = "PENDING" 17669 // There was an error while processing the transaction. 17670 OrderTransactionStatusError OrderTransactionStatus = "ERROR" 17671 // Awaiting a response. 17672 OrderTransactionStatusAwaitingResponse OrderTransactionStatus = "AWAITING_RESPONSE" 17673 // The transaction status is unknown. 17674 OrderTransactionStatusUnknown OrderTransactionStatus = "UNKNOWN" 17675 ) 17676 17677 var AllOrderTransactionStatus = []OrderTransactionStatus{ 17678 OrderTransactionStatusSuccess, 17679 OrderTransactionStatusFailure, 17680 OrderTransactionStatusPending, 17681 OrderTransactionStatusError, 17682 OrderTransactionStatusAwaitingResponse, 17683 OrderTransactionStatusUnknown, 17684 } 17685 17686 func (e OrderTransactionStatus) IsValid() bool { 17687 switch e { 17688 case OrderTransactionStatusSuccess, OrderTransactionStatusFailure, OrderTransactionStatusPending, OrderTransactionStatusError, OrderTransactionStatusAwaitingResponse, OrderTransactionStatusUnknown: 17689 return true 17690 } 17691 return false 17692 } 17693 17694 func (e OrderTransactionStatus) String() string { 17695 return string(e) 17696 } 17697 17698 func (e *OrderTransactionStatus) UnmarshalGQL(v interface{}) error { 17699 str, ok := v.(string) 17700 if !ok { 17701 return fmt.Errorf("enums must be strings") 17702 } 17703 17704 *e = OrderTransactionStatus(str) 17705 if !e.IsValid() { 17706 return fmt.Errorf("%s is not a valid OrderTransactionStatus", str) 17707 } 17708 return nil 17709 } 17710 17711 func (e OrderTransactionStatus) MarshalGQL(w io.Writer) { 17712 fmt.Fprint(w, strconv.Quote(e.String())) 17713 } 17714 17715 // List of payment methods used in Shopify. 17716 type PaymentMethods string 17717 17718 const ( 17719 PaymentMethodsVisa PaymentMethods = "VISA" 17720 PaymentMethodsMastercard PaymentMethods = "MASTERCARD" 17721 PaymentMethodsDiscover PaymentMethods = "DISCOVER" 17722 PaymentMethodsAmericanExpress PaymentMethods = "AMERICAN_EXPRESS" 17723 PaymentMethodsDinersClub PaymentMethods = "DINERS_CLUB" 17724 PaymentMethodsJcb PaymentMethods = "JCB" 17725 PaymentMethodsDankort PaymentMethods = "DANKORT" 17726 PaymentMethodsMaestro PaymentMethods = "MAESTRO" 17727 PaymentMethodsForbrugsforeningen PaymentMethods = "FORBRUGSFORENINGEN" 17728 PaymentMethodsPaypal PaymentMethods = "PAYPAL" 17729 PaymentMethodsBogus PaymentMethods = "BOGUS" 17730 PaymentMethodsBitcoin PaymentMethods = "BITCOIN" 17731 PaymentMethodsLitecoin PaymentMethods = "LITECOIN" 17732 PaymentMethodsDogecoin PaymentMethods = "DOGECOIN" 17733 ) 17734 17735 var AllPaymentMethods = []PaymentMethods{ 17736 PaymentMethodsVisa, 17737 PaymentMethodsMastercard, 17738 PaymentMethodsDiscover, 17739 PaymentMethodsAmericanExpress, 17740 PaymentMethodsDinersClub, 17741 PaymentMethodsJcb, 17742 PaymentMethodsDankort, 17743 PaymentMethodsMaestro, 17744 PaymentMethodsForbrugsforeningen, 17745 PaymentMethodsPaypal, 17746 PaymentMethodsBogus, 17747 PaymentMethodsBitcoin, 17748 PaymentMethodsLitecoin, 17749 PaymentMethodsDogecoin, 17750 } 17751 17752 func (e PaymentMethods) IsValid() bool { 17753 switch e { 17754 case PaymentMethodsVisa, PaymentMethodsMastercard, PaymentMethodsDiscover, PaymentMethodsAmericanExpress, PaymentMethodsDinersClub, PaymentMethodsJcb, PaymentMethodsDankort, PaymentMethodsMaestro, PaymentMethodsForbrugsforeningen, PaymentMethodsPaypal, PaymentMethodsBogus, PaymentMethodsBitcoin, PaymentMethodsLitecoin, PaymentMethodsDogecoin: 17755 return true 17756 } 17757 return false 17758 } 17759 17760 func (e PaymentMethods) String() string { 17761 return string(e) 17762 } 17763 17764 func (e *PaymentMethods) UnmarshalGQL(v interface{}) error { 17765 str, ok := v.(string) 17766 if !ok { 17767 return fmt.Errorf("enums must be strings") 17768 } 17769 17770 *e = PaymentMethods(str) 17771 if !e.IsValid() { 17772 return fmt.Errorf("%s is not a valid PaymentMethods", str) 17773 } 17774 return nil 17775 } 17776 17777 func (e PaymentMethods) MarshalGQL(w io.Writer) { 17778 fmt.Fprint(w, strconv.Quote(e.String())) 17779 } 17780 17781 // Payment status codes. 17782 type PaymentSessionStatusCode string 17783 17784 const ( 17785 // Payment rejected. 17786 PaymentSessionStatusCodeRejected PaymentSessionStatusCode = "REJECTED" 17787 // Payment resolved. 17788 PaymentSessionStatusCodeResolved PaymentSessionStatusCode = "RESOLVED" 17789 ) 17790 17791 var AllPaymentSessionStatusCode = []PaymentSessionStatusCode{ 17792 PaymentSessionStatusCodeRejected, 17793 PaymentSessionStatusCodeResolved, 17794 } 17795 17796 func (e PaymentSessionStatusCode) IsValid() bool { 17797 switch e { 17798 case PaymentSessionStatusCodeRejected, PaymentSessionStatusCodeResolved: 17799 return true 17800 } 17801 return false 17802 } 17803 17804 func (e PaymentSessionStatusCode) String() string { 17805 return string(e) 17806 } 17807 17808 func (e *PaymentSessionStatusCode) UnmarshalGQL(v interface{}) error { 17809 str, ok := v.(string) 17810 if !ok { 17811 return fmt.Errorf("enums must be strings") 17812 } 17813 17814 *e = PaymentSessionStatusCode(str) 17815 if !e.IsValid() { 17816 return fmt.Errorf("%s is not a valid PaymentSessionStatusCode", str) 17817 } 17818 return nil 17819 } 17820 17821 func (e PaymentSessionStatusCode) MarshalGQL(w io.Writer) { 17822 fmt.Fprint(w, strconv.Quote(e.String())) 17823 } 17824 17825 // Payment rejection reason codes. 17826 type PaymentSessionStatusReasonRejectionCode string 17827 17828 const ( 17829 // Rejected by risk control. 17830 PaymentSessionStatusReasonRejectionCodeRisky PaymentSessionStatusReasonRejectionCode = "RISKY" 17831 // Payment processing failure. No retry. 17832 PaymentSessionStatusReasonRejectionCodeProcessingError PaymentSessionStatusReasonRejectionCode = "PROCESSING_ERROR" 17833 ) 17834 17835 var AllPaymentSessionStatusReasonRejectionCode = []PaymentSessionStatusReasonRejectionCode{ 17836 PaymentSessionStatusReasonRejectionCodeRisky, 17837 PaymentSessionStatusReasonRejectionCodeProcessingError, 17838 } 17839 17840 func (e PaymentSessionStatusReasonRejectionCode) IsValid() bool { 17841 switch e { 17842 case PaymentSessionStatusReasonRejectionCodeRisky, PaymentSessionStatusReasonRejectionCodeProcessingError: 17843 return true 17844 } 17845 return false 17846 } 17847 17848 func (e PaymentSessionStatusReasonRejectionCode) String() string { 17849 return string(e) 17850 } 17851 17852 func (e *PaymentSessionStatusReasonRejectionCode) UnmarshalGQL(v interface{}) error { 17853 str, ok := v.(string) 17854 if !ok { 17855 return fmt.Errorf("enums must be strings") 17856 } 17857 17858 *e = PaymentSessionStatusReasonRejectionCode(str) 17859 if !e.IsValid() { 17860 return fmt.Errorf("%s is not a valid PaymentSessionStatusReasonRejectionCode", str) 17861 } 17862 return nil 17863 } 17864 17865 func (e PaymentSessionStatusReasonRejectionCode) MarshalGQL(w io.Writer) { 17866 fmt.Fprint(w, strconv.Quote(e.String())) 17867 } 17868 17869 // The method by which the price rule's value is allocated to its entitled items. 17870 type PriceRuleAllocationMethod string 17871 17872 const ( 17873 // The value will be applied to each of the entitled items. 17874 PriceRuleAllocationMethodEach PriceRuleAllocationMethod = "EACH" 17875 // The value will be applied once across the entitled items. 17876 PriceRuleAllocationMethodAcross PriceRuleAllocationMethod = "ACROSS" 17877 ) 17878 17879 var AllPriceRuleAllocationMethod = []PriceRuleAllocationMethod{ 17880 PriceRuleAllocationMethodEach, 17881 PriceRuleAllocationMethodAcross, 17882 } 17883 17884 func (e PriceRuleAllocationMethod) IsValid() bool { 17885 switch e { 17886 case PriceRuleAllocationMethodEach, PriceRuleAllocationMethodAcross: 17887 return true 17888 } 17889 return false 17890 } 17891 17892 func (e PriceRuleAllocationMethod) String() string { 17893 return string(e) 17894 } 17895 17896 func (e *PriceRuleAllocationMethod) UnmarshalGQL(v interface{}) error { 17897 str, ok := v.(string) 17898 if !ok { 17899 return fmt.Errorf("enums must be strings") 17900 } 17901 17902 *e = PriceRuleAllocationMethod(str) 17903 if !e.IsValid() { 17904 return fmt.Errorf("%s is not a valid PriceRuleAllocationMethod", str) 17905 } 17906 return nil 17907 } 17908 17909 func (e PriceRuleAllocationMethod) MarshalGQL(w io.Writer) { 17910 fmt.Fprint(w, strconv.Quote(e.String())) 17911 } 17912 17913 // Possible error codes that could be returned by a price rule mutation. 17914 type PriceRuleErrorCode string 17915 17916 const ( 17917 // Input value is blank. 17918 PriceRuleErrorCodeBlank PriceRuleErrorCode = "BLANK" 17919 // Input value should be equal to allowed value. 17920 PriceRuleErrorCodeEqualTo PriceRuleErrorCode = "EQUAL_TO" 17921 // Input value should be greater than minimum allowed value. 17922 PriceRuleErrorCodeGreaterThan PriceRuleErrorCode = "GREATER_THAN" 17923 // Input value should be greater than or equal to minimum allowed value. 17924 PriceRuleErrorCodeGreaterThanOrEqualTo PriceRuleErrorCode = "GREATER_THAN_OR_EQUAL_TO" 17925 // Input value is invalid. 17926 PriceRuleErrorCodeInvalid PriceRuleErrorCode = "INVALID" 17927 // Input value should be less than maximum allowed value. 17928 PriceRuleErrorCodeLessThan PriceRuleErrorCode = "LESS_THAN" 17929 // Input value should be less or equal to maximum allowed value. 17930 PriceRuleErrorCodeLessThanOrEqualTo PriceRuleErrorCode = "LESS_THAN_OR_EQUAL_TO" 17931 // Input value is already taken. 17932 PriceRuleErrorCodeTaken PriceRuleErrorCode = "TAKEN" 17933 // Input value is too long. 17934 PriceRuleErrorCodeTooLong PriceRuleErrorCode = "TOO_LONG" 17935 // Input value is too short. 17936 PriceRuleErrorCodeTooShort PriceRuleErrorCode = "TOO_SHORT" 17937 // Unexpected internal error happened. 17938 PriceRuleErrorCodeInternalError PriceRuleErrorCode = "INTERNAL_ERROR" 17939 // Too many arguments provided. 17940 PriceRuleErrorCodeTooManyArguments PriceRuleErrorCode = "TOO_MANY_ARGUMENTS" 17941 // Missing a required argument. 17942 PriceRuleErrorCodeMissingArgument PriceRuleErrorCode = "MISSING_ARGUMENT" 17943 // Duplicate customer prerequisite id present. 17944 PriceRuleErrorCodeCustomerPrerequisiteDuplicate PriceRuleErrorCode = "CUSTOMER_PREREQUISITE_DUPLICATE" 17945 PriceRuleErrorCodeCannotEntitleCollectionsWithProductsOrVariants PriceRuleErrorCode = "CANNOT_ENTITLE_COLLECTIONS_WITH_PRODUCTS_OR_VARIANTS" 17946 PriceRuleErrorCodeItemEntitlementInvalidType PriceRuleErrorCode = "ITEM_ENTITLEMENT_INVALID_TYPE" 17947 PriceRuleErrorCodeItemEntitlementsDuplicateCollection PriceRuleErrorCode = "ITEM_ENTITLEMENTS_DUPLICATE_COLLECTION" 17948 PriceRuleErrorCodeItemEntitlementsDuplicateProduct PriceRuleErrorCode = "ITEM_ENTITLEMENTS_DUPLICATE_PRODUCT" 17949 PriceRuleErrorCodeItemEntitlementsDuplicateVariant PriceRuleErrorCode = "ITEM_ENTITLEMENTS_DUPLICATE_VARIANT" 17950 PriceRuleErrorCodeItemEntitlementsExceededMaxCollection PriceRuleErrorCode = "ITEM_ENTITLEMENTS_EXCEEDED_MAX_COLLECTION" 17951 PriceRuleErrorCodeItemEntitlementsExceededMaxProduct PriceRuleErrorCode = "ITEM_ENTITLEMENTS_EXCEEDED_MAX_PRODUCT" 17952 PriceRuleErrorCodeItemEntitlementsExceededMaxVariant PriceRuleErrorCode = "ITEM_ENTITLEMENTS_EXCEEDED_MAX_VARIANT" 17953 PriceRuleErrorCodeItemEntitlementsInvalidCollection PriceRuleErrorCode = "ITEM_ENTITLEMENTS_INVALID_COLLECTION" 17954 PriceRuleErrorCodeItemEntitlementsInvalidProduct PriceRuleErrorCode = "ITEM_ENTITLEMENTS_INVALID_PRODUCT" 17955 PriceRuleErrorCodeItemEntitlementsInvalidTargetTypeOrSelection PriceRuleErrorCode = "ITEM_ENTITLEMENTS_INVALID_TARGET_TYPE_OR_SELECTION" 17956 PriceRuleErrorCodeItemEntitlementsInvalidVariant PriceRuleErrorCode = "ITEM_ENTITLEMENTS_INVALID_VARIANT" 17957 PriceRuleErrorCodeItemEntitlementsMissing PriceRuleErrorCode = "ITEM_ENTITLEMENTS_MISSING" 17958 PriceRuleErrorCodeVariantAlreadyEntitledThroughProduct PriceRuleErrorCode = "VARIANT_ALREADY_ENTITLED_THROUGH_PRODUCT" 17959 PriceRuleErrorCodeCannotPrerequisiteCollectionWithProductOrVariants PriceRuleErrorCode = "CANNOT_PREREQUISITE_COLLECTION_WITH_PRODUCT_OR_VARIANTS" 17960 PriceRuleErrorCodeItemPrerequisitesDuplicateCollection PriceRuleErrorCode = "ITEM_PREREQUISITES_DUPLICATE_COLLECTION" 17961 PriceRuleErrorCodeItemPrerequisitesDuplicateProduct PriceRuleErrorCode = "ITEM_PREREQUISITES_DUPLICATE_PRODUCT" 17962 PriceRuleErrorCodeItemPrerequisitesDuplicateVariant PriceRuleErrorCode = "ITEM_PREREQUISITES_DUPLICATE_VARIANT" 17963 PriceRuleErrorCodeItemPrerequisitesExceededMax PriceRuleErrorCode = "ITEM_PREREQUISITES_EXCEEDED_MAX" 17964 PriceRuleErrorCodeItemPrerequisitesInvalidCollection PriceRuleErrorCode = "ITEM_PREREQUISITES_INVALID_COLLECTION" 17965 PriceRuleErrorCodeItemPrerequisitesInvalidProduct PriceRuleErrorCode = "ITEM_PREREQUISITES_INVALID_PRODUCT" 17966 PriceRuleErrorCodeItemPrerequisitesInvalidType PriceRuleErrorCode = "ITEM_PREREQUISITES_INVALID_TYPE" 17967 PriceRuleErrorCodeItemPrerequisitesInvalidVariant PriceRuleErrorCode = "ITEM_PREREQUISITES_INVALID_VARIANT" 17968 PriceRuleErrorCodeItemPrerequisitesMissing PriceRuleErrorCode = "ITEM_PREREQUISITES_MISSING" 17969 PriceRuleErrorCodeItemPrerequisitesMustBeEmpty PriceRuleErrorCode = "ITEM_PREREQUISITES_MUST_BE_EMPTY" 17970 PriceRuleErrorCodeInvalidTargetTypePrerequisiteShippingPriceRange PriceRuleErrorCode = "INVALID_TARGET_TYPE_PREREQUISITE_SHIPPING_PRICE_RANGE" 17971 PriceRuleErrorCodeShippingEntitlementsDuplicateCountry PriceRuleErrorCode = "SHIPPING_ENTITLEMENTS_DUPLICATE_COUNTRY" 17972 PriceRuleErrorCodeShippingEntitlementsExceededMax PriceRuleErrorCode = "SHIPPING_ENTITLEMENTS_EXCEEDED_MAX" 17973 PriceRuleErrorCodeShippingEntitlementsInvalidCountry PriceRuleErrorCode = "SHIPPING_ENTITLEMENTS_INVALID_COUNTRY" 17974 PriceRuleErrorCodeShippingEntitlementsInvalidTargetTypeOrSelection PriceRuleErrorCode = "SHIPPING_ENTITLEMENTS_INVALID_TARGET_TYPE_OR_SELECTION" 17975 PriceRuleErrorCodeShippingEntitlementsMissing PriceRuleErrorCode = "SHIPPING_ENTITLEMENTS_MISSING" 17976 PriceRuleErrorCodeShippingEntitlementsUnsupportedDestinationType PriceRuleErrorCode = "SHIPPING_ENTITLEMENTS_UNSUPPORTED_DESTINATION_TYPE" 17977 PriceRuleErrorCodeBothCustomerAndSavedSearchPrerequisitesSelected PriceRuleErrorCode = "BOTH_CUSTOMER_AND_SAVED_SEARCH_PREREQUISITES_SELECTED" 17978 PriceRuleErrorCodeCustomerPrerequisitesExceededMax PriceRuleErrorCode = "CUSTOMER_PREREQUISITES_EXCEEDED_MAX" 17979 PriceRuleErrorCodeCustomerPrerequisitesInvalidSelection PriceRuleErrorCode = "CUSTOMER_PREREQUISITES_INVALID_SELECTION" 17980 PriceRuleErrorCodeCustomerPrerequisitesMissing PriceRuleErrorCode = "CUSTOMER_PREREQUISITES_MISSING" 17981 PriceRuleErrorCodeCustomerSavedSearchDuplicate PriceRuleErrorCode = "CUSTOMER_SAVED_SEARCH_DUPLICATE" 17982 PriceRuleErrorCodeCustomerSavedSearchExceededMax PriceRuleErrorCode = "CUSTOMER_SAVED_SEARCH_EXCEEDED_MAX" 17983 PriceRuleErrorCodeCustomerSavedSearchInvalid PriceRuleErrorCode = "CUSTOMER_SAVED_SEARCH_INVALID" 17984 PriceRuleErrorCodeDiscountCodeDuplicate PriceRuleErrorCode = "DISCOUNT_CODE_DUPLICATE" 17985 // Exceeds maximum number allowed. 17986 PriceRuleErrorCodeExceededMax PriceRuleErrorCode = "EXCEEDED_MAX" 17987 PriceRuleErrorCodeBogoInvalidTargetSelection PriceRuleErrorCode = "BOGO_INVALID_TARGET_SELECTION" 17988 PriceRuleErrorCodeBogoInvalidTargetType PriceRuleErrorCode = "BOGO_INVALID_TARGET_TYPE" 17989 PriceRuleErrorCodeBogoInvalidValueType PriceRuleErrorCode = "BOGO_INVALID_VALUE_TYPE" 17990 // Allocation limit can only be set on buy one get one type discounts. 17991 PriceRuleErrorCodePriceRuleAllocationLimitOnNonBogo PriceRuleErrorCode = "PRICE_RULE_ALLOCATION_LIMIT_ON_NON_BOGO" 17992 // Allocation limit must be a non zero positive number. 17993 PriceRuleErrorCodePriceRuleAllocationLimitIsZero PriceRuleErrorCode = "PRICE_RULE_ALLOCATION_LIMIT_IS_ZERO" 17994 // Number of discount codes in the shop has reached its limit. 17995 PriceRuleErrorCodePriceRuleExceededMaxDiscountCode PriceRuleErrorCode = "PRICE_RULE_EXCEEDED_MAX_DISCOUNT_CODE" 17996 // Number of discounts in the shop has reached its limit. 17997 PriceRuleErrorCodeShopExceededMaxPriceRules PriceRuleErrorCode = "SHOP_EXCEEDED_MAX_PRICE_RULES" 17998 // Discount end date must be after the start date. 17999 PriceRuleErrorCodeEndDateBeforeStartDate PriceRuleErrorCode = "END_DATE_BEFORE_START_DATE" 18000 // Percentage value must be between 0 and -100. 18001 PriceRuleErrorCodePriceRulePercentageValueOutsideRange PriceRuleErrorCode = "PRICE_RULE_PERCENTAGE_VALUE_OUTSIDE_RANGE" 18002 // Only one of minimum subtotal or minimum quantity condition can be defined. 18003 PriceRuleErrorCodePrerequisiteSubtotalAndQuantityRangeBothPresent PriceRuleErrorCode = "PREREQUISITE_SUBTOTAL_AND_QUANTITY_RANGE_BOTH_PRESENT" 18004 // Allocation method must be "across" for the provided target selection. 18005 PriceRuleErrorCodeAllocationMethodMustBeAcrossForGivenTargetSelection PriceRuleErrorCode = "ALLOCATION_METHOD_MUST_BE_ACROSS_FOR_GIVEN_TARGET_SELECTION" 18006 // Discount must apply on either one time purchase or subscription items, or both. 18007 PriceRuleErrorCodeAppliesOnNothing PriceRuleErrorCode = "APPLIES_ON_NOTHING" 18008 // Recurring cycle limit must be 1 when a discount does not apply on subscription items. 18009 PriceRuleErrorCodeMultipleRecurringCycleLimitForNonSubscriptionItems PriceRuleErrorCode = "MULTIPLE_RECURRING_CYCLE_LIMIT_FOR_NON_SUBSCRIPTION_ITEMS" 18010 ) 18011 18012 var AllPriceRuleErrorCode = []PriceRuleErrorCode{ 18013 PriceRuleErrorCodeBlank, 18014 PriceRuleErrorCodeEqualTo, 18015 PriceRuleErrorCodeGreaterThan, 18016 PriceRuleErrorCodeGreaterThanOrEqualTo, 18017 PriceRuleErrorCodeInvalid, 18018 PriceRuleErrorCodeLessThan, 18019 PriceRuleErrorCodeLessThanOrEqualTo, 18020 PriceRuleErrorCodeTaken, 18021 PriceRuleErrorCodeTooLong, 18022 PriceRuleErrorCodeTooShort, 18023 PriceRuleErrorCodeInternalError, 18024 PriceRuleErrorCodeTooManyArguments, 18025 PriceRuleErrorCodeMissingArgument, 18026 PriceRuleErrorCodeCustomerPrerequisiteDuplicate, 18027 PriceRuleErrorCodeCannotEntitleCollectionsWithProductsOrVariants, 18028 PriceRuleErrorCodeItemEntitlementInvalidType, 18029 PriceRuleErrorCodeItemEntitlementsDuplicateCollection, 18030 PriceRuleErrorCodeItemEntitlementsDuplicateProduct, 18031 PriceRuleErrorCodeItemEntitlementsDuplicateVariant, 18032 PriceRuleErrorCodeItemEntitlementsExceededMaxCollection, 18033 PriceRuleErrorCodeItemEntitlementsExceededMaxProduct, 18034 PriceRuleErrorCodeItemEntitlementsExceededMaxVariant, 18035 PriceRuleErrorCodeItemEntitlementsInvalidCollection, 18036 PriceRuleErrorCodeItemEntitlementsInvalidProduct, 18037 PriceRuleErrorCodeItemEntitlementsInvalidTargetTypeOrSelection, 18038 PriceRuleErrorCodeItemEntitlementsInvalidVariant, 18039 PriceRuleErrorCodeItemEntitlementsMissing, 18040 PriceRuleErrorCodeVariantAlreadyEntitledThroughProduct, 18041 PriceRuleErrorCodeCannotPrerequisiteCollectionWithProductOrVariants, 18042 PriceRuleErrorCodeItemPrerequisitesDuplicateCollection, 18043 PriceRuleErrorCodeItemPrerequisitesDuplicateProduct, 18044 PriceRuleErrorCodeItemPrerequisitesDuplicateVariant, 18045 PriceRuleErrorCodeItemPrerequisitesExceededMax, 18046 PriceRuleErrorCodeItemPrerequisitesInvalidCollection, 18047 PriceRuleErrorCodeItemPrerequisitesInvalidProduct, 18048 PriceRuleErrorCodeItemPrerequisitesInvalidType, 18049 PriceRuleErrorCodeItemPrerequisitesInvalidVariant, 18050 PriceRuleErrorCodeItemPrerequisitesMissing, 18051 PriceRuleErrorCodeItemPrerequisitesMustBeEmpty, 18052 PriceRuleErrorCodeInvalidTargetTypePrerequisiteShippingPriceRange, 18053 PriceRuleErrorCodeShippingEntitlementsDuplicateCountry, 18054 PriceRuleErrorCodeShippingEntitlementsExceededMax, 18055 PriceRuleErrorCodeShippingEntitlementsInvalidCountry, 18056 PriceRuleErrorCodeShippingEntitlementsInvalidTargetTypeOrSelection, 18057 PriceRuleErrorCodeShippingEntitlementsMissing, 18058 PriceRuleErrorCodeShippingEntitlementsUnsupportedDestinationType, 18059 PriceRuleErrorCodeBothCustomerAndSavedSearchPrerequisitesSelected, 18060 PriceRuleErrorCodeCustomerPrerequisitesExceededMax, 18061 PriceRuleErrorCodeCustomerPrerequisitesInvalidSelection, 18062 PriceRuleErrorCodeCustomerPrerequisitesMissing, 18063 PriceRuleErrorCodeCustomerSavedSearchDuplicate, 18064 PriceRuleErrorCodeCustomerSavedSearchExceededMax, 18065 PriceRuleErrorCodeCustomerSavedSearchInvalid, 18066 PriceRuleErrorCodeDiscountCodeDuplicate, 18067 PriceRuleErrorCodeExceededMax, 18068 PriceRuleErrorCodeBogoInvalidTargetSelection, 18069 PriceRuleErrorCodeBogoInvalidTargetType, 18070 PriceRuleErrorCodeBogoInvalidValueType, 18071 PriceRuleErrorCodePriceRuleAllocationLimitOnNonBogo, 18072 PriceRuleErrorCodePriceRuleAllocationLimitIsZero, 18073 PriceRuleErrorCodePriceRuleExceededMaxDiscountCode, 18074 PriceRuleErrorCodeShopExceededMaxPriceRules, 18075 PriceRuleErrorCodeEndDateBeforeStartDate, 18076 PriceRuleErrorCodePriceRulePercentageValueOutsideRange, 18077 PriceRuleErrorCodePrerequisiteSubtotalAndQuantityRangeBothPresent, 18078 PriceRuleErrorCodeAllocationMethodMustBeAcrossForGivenTargetSelection, 18079 PriceRuleErrorCodeAppliesOnNothing, 18080 PriceRuleErrorCodeMultipleRecurringCycleLimitForNonSubscriptionItems, 18081 } 18082 18083 func (e PriceRuleErrorCode) IsValid() bool { 18084 switch e { 18085 case PriceRuleErrorCodeBlank, PriceRuleErrorCodeEqualTo, PriceRuleErrorCodeGreaterThan, PriceRuleErrorCodeGreaterThanOrEqualTo, PriceRuleErrorCodeInvalid, PriceRuleErrorCodeLessThan, PriceRuleErrorCodeLessThanOrEqualTo, PriceRuleErrorCodeTaken, PriceRuleErrorCodeTooLong, PriceRuleErrorCodeTooShort, PriceRuleErrorCodeInternalError, PriceRuleErrorCodeTooManyArguments, PriceRuleErrorCodeMissingArgument, PriceRuleErrorCodeCustomerPrerequisiteDuplicate, PriceRuleErrorCodeCannotEntitleCollectionsWithProductsOrVariants, PriceRuleErrorCodeItemEntitlementInvalidType, PriceRuleErrorCodeItemEntitlementsDuplicateCollection, PriceRuleErrorCodeItemEntitlementsDuplicateProduct, PriceRuleErrorCodeItemEntitlementsDuplicateVariant, PriceRuleErrorCodeItemEntitlementsExceededMaxCollection, PriceRuleErrorCodeItemEntitlementsExceededMaxProduct, PriceRuleErrorCodeItemEntitlementsExceededMaxVariant, PriceRuleErrorCodeItemEntitlementsInvalidCollection, PriceRuleErrorCodeItemEntitlementsInvalidProduct, PriceRuleErrorCodeItemEntitlementsInvalidTargetTypeOrSelection, PriceRuleErrorCodeItemEntitlementsInvalidVariant, PriceRuleErrorCodeItemEntitlementsMissing, PriceRuleErrorCodeVariantAlreadyEntitledThroughProduct, PriceRuleErrorCodeCannotPrerequisiteCollectionWithProductOrVariants, PriceRuleErrorCodeItemPrerequisitesDuplicateCollection, PriceRuleErrorCodeItemPrerequisitesDuplicateProduct, PriceRuleErrorCodeItemPrerequisitesDuplicateVariant, PriceRuleErrorCodeItemPrerequisitesExceededMax, PriceRuleErrorCodeItemPrerequisitesInvalidCollection, PriceRuleErrorCodeItemPrerequisitesInvalidProduct, PriceRuleErrorCodeItemPrerequisitesInvalidType, PriceRuleErrorCodeItemPrerequisitesInvalidVariant, PriceRuleErrorCodeItemPrerequisitesMissing, PriceRuleErrorCodeItemPrerequisitesMustBeEmpty, PriceRuleErrorCodeInvalidTargetTypePrerequisiteShippingPriceRange, PriceRuleErrorCodeShippingEntitlementsDuplicateCountry, PriceRuleErrorCodeShippingEntitlementsExceededMax, PriceRuleErrorCodeShippingEntitlementsInvalidCountry, PriceRuleErrorCodeShippingEntitlementsInvalidTargetTypeOrSelection, PriceRuleErrorCodeShippingEntitlementsMissing, PriceRuleErrorCodeShippingEntitlementsUnsupportedDestinationType, PriceRuleErrorCodeBothCustomerAndSavedSearchPrerequisitesSelected, PriceRuleErrorCodeCustomerPrerequisitesExceededMax, PriceRuleErrorCodeCustomerPrerequisitesInvalidSelection, PriceRuleErrorCodeCustomerPrerequisitesMissing, PriceRuleErrorCodeCustomerSavedSearchDuplicate, PriceRuleErrorCodeCustomerSavedSearchExceededMax, PriceRuleErrorCodeCustomerSavedSearchInvalid, PriceRuleErrorCodeDiscountCodeDuplicate, PriceRuleErrorCodeExceededMax, PriceRuleErrorCodeBogoInvalidTargetSelection, PriceRuleErrorCodeBogoInvalidTargetType, PriceRuleErrorCodeBogoInvalidValueType, PriceRuleErrorCodePriceRuleAllocationLimitOnNonBogo, PriceRuleErrorCodePriceRuleAllocationLimitIsZero, PriceRuleErrorCodePriceRuleExceededMaxDiscountCode, PriceRuleErrorCodeShopExceededMaxPriceRules, PriceRuleErrorCodeEndDateBeforeStartDate, PriceRuleErrorCodePriceRulePercentageValueOutsideRange, PriceRuleErrorCodePrerequisiteSubtotalAndQuantityRangeBothPresent, PriceRuleErrorCodeAllocationMethodMustBeAcrossForGivenTargetSelection, PriceRuleErrorCodeAppliesOnNothing, PriceRuleErrorCodeMultipleRecurringCycleLimitForNonSubscriptionItems: 18086 return true 18087 } 18088 return false 18089 } 18090 18091 func (e PriceRuleErrorCode) String() string { 18092 return string(e) 18093 } 18094 18095 func (e *PriceRuleErrorCode) UnmarshalGQL(v interface{}) error { 18096 str, ok := v.(string) 18097 if !ok { 18098 return fmt.Errorf("enums must be strings") 18099 } 18100 18101 *e = PriceRuleErrorCode(str) 18102 if !e.IsValid() { 18103 return fmt.Errorf("%s is not a valid PriceRuleErrorCode", str) 18104 } 18105 return nil 18106 } 18107 18108 func (e PriceRuleErrorCode) MarshalGQL(w io.Writer) { 18109 fmt.Fprint(w, strconv.Quote(e.String())) 18110 } 18111 18112 // A list of features used by the price rule. 18113 type PriceRuleFeature string 18114 18115 const ( 18116 // The price rule supports quantity BXGY discounts. 18117 PriceRuleFeatureBuyOneGetOne PriceRuleFeature = "BUY_ONE_GET_ONE" 18118 // The price rule supports BXGY discounts using custom allocation limit. 18119 PriceRuleFeatureBuyOneGetOneWithAllocationLimit PriceRuleFeature = "BUY_ONE_GET_ONE_WITH_ALLOCATION_LIMIT" 18120 // The price rule supports bulk discounts. 18121 PriceRuleFeatureBulk PriceRuleFeature = "BULK" 18122 // The price rule supports specific customers. 18123 PriceRuleFeatureSpecificCustomers PriceRuleFeature = "SPECIFIC_CUSTOMERS" 18124 // The price rule supports quantity discounts. 18125 PriceRuleFeatureQuantityDiscounts PriceRuleFeature = "QUANTITY_DISCOUNTS" 18126 ) 18127 18128 var AllPriceRuleFeature = []PriceRuleFeature{ 18129 PriceRuleFeatureBuyOneGetOne, 18130 PriceRuleFeatureBuyOneGetOneWithAllocationLimit, 18131 PriceRuleFeatureBulk, 18132 PriceRuleFeatureSpecificCustomers, 18133 PriceRuleFeatureQuantityDiscounts, 18134 } 18135 18136 func (e PriceRuleFeature) IsValid() bool { 18137 switch e { 18138 case PriceRuleFeatureBuyOneGetOne, PriceRuleFeatureBuyOneGetOneWithAllocationLimit, PriceRuleFeatureBulk, PriceRuleFeatureSpecificCustomers, PriceRuleFeatureQuantityDiscounts: 18139 return true 18140 } 18141 return false 18142 } 18143 18144 func (e PriceRuleFeature) String() string { 18145 return string(e) 18146 } 18147 18148 func (e *PriceRuleFeature) UnmarshalGQL(v interface{}) error { 18149 str, ok := v.(string) 18150 if !ok { 18151 return fmt.Errorf("enums must be strings") 18152 } 18153 18154 *e = PriceRuleFeature(str) 18155 if !e.IsValid() { 18156 return fmt.Errorf("%s is not a valid PriceRuleFeature", str) 18157 } 18158 return nil 18159 } 18160 18161 func (e PriceRuleFeature) MarshalGQL(w io.Writer) { 18162 fmt.Fprint(w, strconv.Quote(e.String())) 18163 } 18164 18165 // Page type where shareable URL lands. 18166 type PriceRuleShareableURLTargetType string 18167 18168 const ( 18169 PriceRuleShareableURLTargetTypeHome PriceRuleShareableURLTargetType = "HOME" 18170 PriceRuleShareableURLTargetTypeProduct PriceRuleShareableURLTargetType = "PRODUCT" 18171 PriceRuleShareableURLTargetTypeCollection PriceRuleShareableURLTargetType = "COLLECTION" 18172 ) 18173 18174 var AllPriceRuleShareableURLTargetType = []PriceRuleShareableURLTargetType{ 18175 PriceRuleShareableURLTargetTypeHome, 18176 PriceRuleShareableURLTargetTypeProduct, 18177 PriceRuleShareableURLTargetTypeCollection, 18178 } 18179 18180 func (e PriceRuleShareableURLTargetType) IsValid() bool { 18181 switch e { 18182 case PriceRuleShareableURLTargetTypeHome, PriceRuleShareableURLTargetTypeProduct, PriceRuleShareableURLTargetTypeCollection: 18183 return true 18184 } 18185 return false 18186 } 18187 18188 func (e PriceRuleShareableURLTargetType) String() string { 18189 return string(e) 18190 } 18191 18192 func (e *PriceRuleShareableURLTargetType) UnmarshalGQL(v interface{}) error { 18193 str, ok := v.(string) 18194 if !ok { 18195 return fmt.Errorf("enums must be strings") 18196 } 18197 18198 *e = PriceRuleShareableURLTargetType(str) 18199 if !e.IsValid() { 18200 return fmt.Errorf("%s is not a valid PriceRuleShareableUrlTargetType", str) 18201 } 18202 return nil 18203 } 18204 18205 func (e PriceRuleShareableURLTargetType) MarshalGQL(w io.Writer) { 18206 fmt.Fprint(w, strconv.Quote(e.String())) 18207 } 18208 18209 // The set of valid sort keys for the PriceRule query. 18210 type PriceRuleSortKeys string 18211 18212 const ( 18213 // Sort by the `starts_at` value. 18214 PriceRuleSortKeysStartsAt PriceRuleSortKeys = "STARTS_AT" 18215 // Sort by the `ends_at` value. 18216 PriceRuleSortKeysEndsAt PriceRuleSortKeys = "ENDS_AT" 18217 // Sort by the `title` value. 18218 PriceRuleSortKeysTitle PriceRuleSortKeys = "TITLE" 18219 // Sort by the `created_at` value. 18220 PriceRuleSortKeysCreatedAt PriceRuleSortKeys = "CREATED_AT" 18221 // Sort by the `updated_at` value. 18222 PriceRuleSortKeysUpdatedAt PriceRuleSortKeys = "UPDATED_AT" 18223 // Sort by the `id` value. 18224 PriceRuleSortKeysID PriceRuleSortKeys = "ID" 18225 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 18226 // results by relevance to the search term(s). When no search query is specified, this sort key is not 18227 // deterministic and should not be used. 18228 PriceRuleSortKeysRelevance PriceRuleSortKeys = "RELEVANCE" 18229 ) 18230 18231 var AllPriceRuleSortKeys = []PriceRuleSortKeys{ 18232 PriceRuleSortKeysStartsAt, 18233 PriceRuleSortKeysEndsAt, 18234 PriceRuleSortKeysTitle, 18235 PriceRuleSortKeysCreatedAt, 18236 PriceRuleSortKeysUpdatedAt, 18237 PriceRuleSortKeysID, 18238 PriceRuleSortKeysRelevance, 18239 } 18240 18241 func (e PriceRuleSortKeys) IsValid() bool { 18242 switch e { 18243 case PriceRuleSortKeysStartsAt, PriceRuleSortKeysEndsAt, PriceRuleSortKeysTitle, PriceRuleSortKeysCreatedAt, PriceRuleSortKeysUpdatedAt, PriceRuleSortKeysID, PriceRuleSortKeysRelevance: 18244 return true 18245 } 18246 return false 18247 } 18248 18249 func (e PriceRuleSortKeys) String() string { 18250 return string(e) 18251 } 18252 18253 func (e *PriceRuleSortKeys) UnmarshalGQL(v interface{}) error { 18254 str, ok := v.(string) 18255 if !ok { 18256 return fmt.Errorf("enums must be strings") 18257 } 18258 18259 *e = PriceRuleSortKeys(str) 18260 if !e.IsValid() { 18261 return fmt.Errorf("%s is not a valid PriceRuleSortKeys", str) 18262 } 18263 return nil 18264 } 18265 18266 func (e PriceRuleSortKeys) MarshalGQL(w io.Writer) { 18267 fmt.Fprint(w, strconv.Quote(e.String())) 18268 } 18269 18270 // The status of the price rule. 18271 type PriceRuleStatus string 18272 18273 const ( 18274 PriceRuleStatusActive PriceRuleStatus = "ACTIVE" 18275 PriceRuleStatusExpired PriceRuleStatus = "EXPIRED" 18276 PriceRuleStatusScheduled PriceRuleStatus = "SCHEDULED" 18277 ) 18278 18279 var AllPriceRuleStatus = []PriceRuleStatus{ 18280 PriceRuleStatusActive, 18281 PriceRuleStatusExpired, 18282 PriceRuleStatusScheduled, 18283 } 18284 18285 func (e PriceRuleStatus) IsValid() bool { 18286 switch e { 18287 case PriceRuleStatusActive, PriceRuleStatusExpired, PriceRuleStatusScheduled: 18288 return true 18289 } 18290 return false 18291 } 18292 18293 func (e PriceRuleStatus) String() string { 18294 return string(e) 18295 } 18296 18297 func (e *PriceRuleStatus) UnmarshalGQL(v interface{}) error { 18298 str, ok := v.(string) 18299 if !ok { 18300 return fmt.Errorf("enums must be strings") 18301 } 18302 18303 *e = PriceRuleStatus(str) 18304 if !e.IsValid() { 18305 return fmt.Errorf("%s is not a valid PriceRuleStatus", str) 18306 } 18307 return nil 18308 } 18309 18310 func (e PriceRuleStatus) MarshalGQL(w io.Writer) { 18311 fmt.Fprint(w, strconv.Quote(e.String())) 18312 } 18313 18314 // The type of lines (line_item or shipping_line) to which the price rule applies. 18315 type PriceRuleTarget string 18316 18317 const ( 18318 // The price rule applies to line items. 18319 PriceRuleTargetLineItem PriceRuleTarget = "LINE_ITEM" 18320 // The price rule applies to shipping lines. 18321 PriceRuleTargetShippingLine PriceRuleTarget = "SHIPPING_LINE" 18322 ) 18323 18324 var AllPriceRuleTarget = []PriceRuleTarget{ 18325 PriceRuleTargetLineItem, 18326 PriceRuleTargetShippingLine, 18327 } 18328 18329 func (e PriceRuleTarget) IsValid() bool { 18330 switch e { 18331 case PriceRuleTargetLineItem, PriceRuleTargetShippingLine: 18332 return true 18333 } 18334 return false 18335 } 18336 18337 func (e PriceRuleTarget) String() string { 18338 return string(e) 18339 } 18340 18341 func (e *PriceRuleTarget) UnmarshalGQL(v interface{}) error { 18342 str, ok := v.(string) 18343 if !ok { 18344 return fmt.Errorf("enums must be strings") 18345 } 18346 18347 *e = PriceRuleTarget(str) 18348 if !e.IsValid() { 18349 return fmt.Errorf("%s is not a valid PriceRuleTarget", str) 18350 } 18351 return nil 18352 } 18353 18354 func (e PriceRuleTarget) MarshalGQL(w io.Writer) { 18355 fmt.Fprint(w, strconv.Quote(e.String())) 18356 } 18357 18358 // A list of features used by the price rule. 18359 type PriceRuleTrait string 18360 18361 const ( 18362 // The price rule supports quantity BXGY discounts. 18363 PriceRuleTraitBuyOneGetOne PriceRuleTrait = "BUY_ONE_GET_ONE" 18364 // The price rule supports BXGY discounts using custom allocation limit. 18365 PriceRuleTraitBuyOneGetOneWithAllocationLimit PriceRuleTrait = "BUY_ONE_GET_ONE_WITH_ALLOCATION_LIMIT" 18366 // The price rule supports bulk discounts. 18367 PriceRuleTraitBulk PriceRuleTrait = "BULK" 18368 // The price rule supports specific customers. 18369 PriceRuleTraitSpecificCustomers PriceRuleTrait = "SPECIFIC_CUSTOMERS" 18370 // The price rule supports quantity discounts. 18371 PriceRuleTraitQuantityDiscounts PriceRuleTrait = "QUANTITY_DISCOUNTS" 18372 ) 18373 18374 var AllPriceRuleTrait = []PriceRuleTrait{ 18375 PriceRuleTraitBuyOneGetOne, 18376 PriceRuleTraitBuyOneGetOneWithAllocationLimit, 18377 PriceRuleTraitBulk, 18378 PriceRuleTraitSpecificCustomers, 18379 PriceRuleTraitQuantityDiscounts, 18380 } 18381 18382 func (e PriceRuleTrait) IsValid() bool { 18383 switch e { 18384 case PriceRuleTraitBuyOneGetOne, PriceRuleTraitBuyOneGetOneWithAllocationLimit, PriceRuleTraitBulk, PriceRuleTraitSpecificCustomers, PriceRuleTraitQuantityDiscounts: 18385 return true 18386 } 18387 return false 18388 } 18389 18390 func (e PriceRuleTrait) String() string { 18391 return string(e) 18392 } 18393 18394 func (e *PriceRuleTrait) UnmarshalGQL(v interface{}) error { 18395 str, ok := v.(string) 18396 if !ok { 18397 return fmt.Errorf("enums must be strings") 18398 } 18399 18400 *e = PriceRuleTrait(str) 18401 if !e.IsValid() { 18402 return fmt.Errorf("%s is not a valid PriceRuleTrait", str) 18403 } 18404 return nil 18405 } 18406 18407 func (e PriceRuleTrait) MarshalGQL(w io.Writer) { 18408 fmt.Fprint(w, strconv.Quote(e.String())) 18409 } 18410 18411 // Private Metafield value types. 18412 type PrivateMetafieldValueType string 18413 18414 const ( 18415 // A string metafield. 18416 PrivateMetafieldValueTypeString PrivateMetafieldValueType = "STRING" 18417 // An integer metafield. 18418 PrivateMetafieldValueTypeInteger PrivateMetafieldValueType = "INTEGER" 18419 // A JSON string metafield. 18420 PrivateMetafieldValueTypeJSONString PrivateMetafieldValueType = "JSON_STRING" 18421 ) 18422 18423 var AllPrivateMetafieldValueType = []PrivateMetafieldValueType{ 18424 PrivateMetafieldValueTypeString, 18425 PrivateMetafieldValueTypeInteger, 18426 PrivateMetafieldValueTypeJSONString, 18427 } 18428 18429 func (e PrivateMetafieldValueType) IsValid() bool { 18430 switch e { 18431 case PrivateMetafieldValueTypeString, PrivateMetafieldValueTypeInteger, PrivateMetafieldValueTypeJSONString: 18432 return true 18433 } 18434 return false 18435 } 18436 18437 func (e PrivateMetafieldValueType) String() string { 18438 return string(e) 18439 } 18440 18441 func (e *PrivateMetafieldValueType) UnmarshalGQL(v interface{}) error { 18442 str, ok := v.(string) 18443 if !ok { 18444 return fmt.Errorf("enums must be strings") 18445 } 18446 18447 *e = PrivateMetafieldValueType(str) 18448 if !e.IsValid() { 18449 return fmt.Errorf("%s is not a valid PrivateMetafieldValueType", str) 18450 } 18451 return nil 18452 } 18453 18454 func (e PrivateMetafieldValueType) MarshalGQL(w io.Writer) { 18455 fmt.Fprint(w, strconv.Quote(e.String())) 18456 } 18457 18458 // Possible error codes that could be returned by ProductChangeStatusUserError. 18459 type ProductChangeStatusUserErrorCode string 18460 18461 const ( 18462 // Product could not be found. 18463 ProductChangeStatusUserErrorCodeProductNotFound ProductChangeStatusUserErrorCode = "PRODUCT_NOT_FOUND" 18464 ) 18465 18466 var AllProductChangeStatusUserErrorCode = []ProductChangeStatusUserErrorCode{ 18467 ProductChangeStatusUserErrorCodeProductNotFound, 18468 } 18469 18470 func (e ProductChangeStatusUserErrorCode) IsValid() bool { 18471 switch e { 18472 case ProductChangeStatusUserErrorCodeProductNotFound: 18473 return true 18474 } 18475 return false 18476 } 18477 18478 func (e ProductChangeStatusUserErrorCode) String() string { 18479 return string(e) 18480 } 18481 18482 func (e *ProductChangeStatusUserErrorCode) UnmarshalGQL(v interface{}) error { 18483 str, ok := v.(string) 18484 if !ok { 18485 return fmt.Errorf("enums must be strings") 18486 } 18487 18488 *e = ProductChangeStatusUserErrorCode(str) 18489 if !e.IsValid() { 18490 return fmt.Errorf("%s is not a valid ProductChangeStatusUserErrorCode", str) 18491 } 18492 return nil 18493 } 18494 18495 func (e ProductChangeStatusUserErrorCode) MarshalGQL(w io.Writer) { 18496 fmt.Fprint(w, strconv.Quote(e.String())) 18497 } 18498 18499 // The set of valid sort keys for the ProductCollection query. 18500 type ProductCollectionSortKeys string 18501 18502 const ( 18503 // Sort by the `title` value. 18504 ProductCollectionSortKeysTitle ProductCollectionSortKeys = "TITLE" 18505 // Sort by the `price` value. 18506 ProductCollectionSortKeysPrice ProductCollectionSortKeys = "PRICE" 18507 // Sort by the `best-selling` value. 18508 ProductCollectionSortKeysBestSelling ProductCollectionSortKeys = "BEST_SELLING" 18509 // Sort by the `created` value. 18510 ProductCollectionSortKeysCreated ProductCollectionSortKeys = "CREATED" 18511 // Sort by the `id` value. 18512 ProductCollectionSortKeysID ProductCollectionSortKeys = "ID" 18513 // Sort by the `manual` value. 18514 ProductCollectionSortKeysManual ProductCollectionSortKeys = "MANUAL" 18515 // Sort by the `collection-default` value. 18516 ProductCollectionSortKeysCollectionDefault ProductCollectionSortKeys = "COLLECTION_DEFAULT" 18517 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 18518 // results by relevance to the search term(s). When no search query is specified, this sort key is not 18519 // deterministic and should not be used. 18520 ProductCollectionSortKeysRelevance ProductCollectionSortKeys = "RELEVANCE" 18521 ) 18522 18523 var AllProductCollectionSortKeys = []ProductCollectionSortKeys{ 18524 ProductCollectionSortKeysTitle, 18525 ProductCollectionSortKeysPrice, 18526 ProductCollectionSortKeysBestSelling, 18527 ProductCollectionSortKeysCreated, 18528 ProductCollectionSortKeysID, 18529 ProductCollectionSortKeysManual, 18530 ProductCollectionSortKeysCollectionDefault, 18531 ProductCollectionSortKeysRelevance, 18532 } 18533 18534 func (e ProductCollectionSortKeys) IsValid() bool { 18535 switch e { 18536 case ProductCollectionSortKeysTitle, ProductCollectionSortKeysPrice, ProductCollectionSortKeysBestSelling, ProductCollectionSortKeysCreated, ProductCollectionSortKeysID, ProductCollectionSortKeysManual, ProductCollectionSortKeysCollectionDefault, ProductCollectionSortKeysRelevance: 18537 return true 18538 } 18539 return false 18540 } 18541 18542 func (e ProductCollectionSortKeys) String() string { 18543 return string(e) 18544 } 18545 18546 func (e *ProductCollectionSortKeys) UnmarshalGQL(v interface{}) error { 18547 str, ok := v.(string) 18548 if !ok { 18549 return fmt.Errorf("enums must be strings") 18550 } 18551 18552 *e = ProductCollectionSortKeys(str) 18553 if !e.IsValid() { 18554 return fmt.Errorf("%s is not a valid ProductCollectionSortKeys", str) 18555 } 18556 return nil 18557 } 18558 18559 func (e ProductCollectionSortKeys) MarshalGQL(w io.Writer) { 18560 fmt.Fprint(w, strconv.Quote(e.String())) 18561 } 18562 18563 // The set of valid sort keys for the ProductImage query. 18564 type ProductImageSortKeys string 18565 18566 const ( 18567 // Sort by the `created_at` value. 18568 ProductImageSortKeysCreatedAt ProductImageSortKeys = "CREATED_AT" 18569 // Sort by the `position` value. 18570 ProductImageSortKeysPosition ProductImageSortKeys = "POSITION" 18571 // Sort by the `id` value. 18572 ProductImageSortKeysID ProductImageSortKeys = "ID" 18573 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 18574 // results by relevance to the search term(s). When no search query is specified, this sort key is not 18575 // deterministic and should not be used. 18576 ProductImageSortKeysRelevance ProductImageSortKeys = "RELEVANCE" 18577 ) 18578 18579 var AllProductImageSortKeys = []ProductImageSortKeys{ 18580 ProductImageSortKeysCreatedAt, 18581 ProductImageSortKeysPosition, 18582 ProductImageSortKeysID, 18583 ProductImageSortKeysRelevance, 18584 } 18585 18586 func (e ProductImageSortKeys) IsValid() bool { 18587 switch e { 18588 case ProductImageSortKeysCreatedAt, ProductImageSortKeysPosition, ProductImageSortKeysID, ProductImageSortKeysRelevance: 18589 return true 18590 } 18591 return false 18592 } 18593 18594 func (e ProductImageSortKeys) String() string { 18595 return string(e) 18596 } 18597 18598 func (e *ProductImageSortKeys) UnmarshalGQL(v interface{}) error { 18599 str, ok := v.(string) 18600 if !ok { 18601 return fmt.Errorf("enums must be strings") 18602 } 18603 18604 *e = ProductImageSortKeys(str) 18605 if !e.IsValid() { 18606 return fmt.Errorf("%s is not a valid ProductImageSortKeys", str) 18607 } 18608 return nil 18609 } 18610 18611 func (e ProductImageSortKeys) MarshalGQL(w io.Writer) { 18612 fmt.Fprint(w, strconv.Quote(e.String())) 18613 } 18614 18615 // The set of valid sort keys for the ProductMedia query. 18616 type ProductMediaSortKeys string 18617 18618 const ( 18619 // Sort by the `position` value. 18620 ProductMediaSortKeysPosition ProductMediaSortKeys = "POSITION" 18621 // Sort by the `id` value. 18622 ProductMediaSortKeysID ProductMediaSortKeys = "ID" 18623 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 18624 // results by relevance to the search term(s). When no search query is specified, this sort key is not 18625 // deterministic and should not be used. 18626 ProductMediaSortKeysRelevance ProductMediaSortKeys = "RELEVANCE" 18627 ) 18628 18629 var AllProductMediaSortKeys = []ProductMediaSortKeys{ 18630 ProductMediaSortKeysPosition, 18631 ProductMediaSortKeysID, 18632 ProductMediaSortKeysRelevance, 18633 } 18634 18635 func (e ProductMediaSortKeys) IsValid() bool { 18636 switch e { 18637 case ProductMediaSortKeysPosition, ProductMediaSortKeysID, ProductMediaSortKeysRelevance: 18638 return true 18639 } 18640 return false 18641 } 18642 18643 func (e ProductMediaSortKeys) String() string { 18644 return string(e) 18645 } 18646 18647 func (e *ProductMediaSortKeys) UnmarshalGQL(v interface{}) error { 18648 str, ok := v.(string) 18649 if !ok { 18650 return fmt.Errorf("enums must be strings") 18651 } 18652 18653 *e = ProductMediaSortKeys(str) 18654 if !e.IsValid() { 18655 return fmt.Errorf("%s is not a valid ProductMediaSortKeys", str) 18656 } 18657 return nil 18658 } 18659 18660 func (e ProductMediaSortKeys) MarshalGQL(w io.Writer) { 18661 fmt.Fprint(w, strconv.Quote(e.String())) 18662 } 18663 18664 // The set of valid sort keys for the Product query. 18665 type ProductSortKeys string 18666 18667 const ( 18668 // Sort by the `title` value. 18669 ProductSortKeysTitle ProductSortKeys = "TITLE" 18670 // Sort by the `product_type` value. 18671 ProductSortKeysProductType ProductSortKeys = "PRODUCT_TYPE" 18672 // Sort by the `vendor` value. 18673 ProductSortKeysVendor ProductSortKeys = "VENDOR" 18674 // Sort by the `inventory_total` value. 18675 ProductSortKeysInventoryTotal ProductSortKeys = "INVENTORY_TOTAL" 18676 // Sort by the `updated_at` value. 18677 ProductSortKeysUpdatedAt ProductSortKeys = "UPDATED_AT" 18678 // Sort by the `created_at` value. 18679 ProductSortKeysCreatedAt ProductSortKeys = "CREATED_AT" 18680 // Sort by the `published_at` value. 18681 ProductSortKeysPublishedAt ProductSortKeys = "PUBLISHED_AT" 18682 // Sort by the `id` value. 18683 ProductSortKeysID ProductSortKeys = "ID" 18684 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 18685 // results by relevance to the search term(s). When no search query is specified, this sort key is not 18686 // deterministic and should not be used. 18687 ProductSortKeysRelevance ProductSortKeys = "RELEVANCE" 18688 ) 18689 18690 var AllProductSortKeys = []ProductSortKeys{ 18691 ProductSortKeysTitle, 18692 ProductSortKeysProductType, 18693 ProductSortKeysVendor, 18694 ProductSortKeysInventoryTotal, 18695 ProductSortKeysUpdatedAt, 18696 ProductSortKeysCreatedAt, 18697 ProductSortKeysPublishedAt, 18698 ProductSortKeysID, 18699 ProductSortKeysRelevance, 18700 } 18701 18702 func (e ProductSortKeys) IsValid() bool { 18703 switch e { 18704 case ProductSortKeysTitle, ProductSortKeysProductType, ProductSortKeysVendor, ProductSortKeysInventoryTotal, ProductSortKeysUpdatedAt, ProductSortKeysCreatedAt, ProductSortKeysPublishedAt, ProductSortKeysID, ProductSortKeysRelevance: 18705 return true 18706 } 18707 return false 18708 } 18709 18710 func (e ProductSortKeys) String() string { 18711 return string(e) 18712 } 18713 18714 func (e *ProductSortKeys) UnmarshalGQL(v interface{}) error { 18715 str, ok := v.(string) 18716 if !ok { 18717 return fmt.Errorf("enums must be strings") 18718 } 18719 18720 *e = ProductSortKeys(str) 18721 if !e.IsValid() { 18722 return fmt.Errorf("%s is not a valid ProductSortKeys", str) 18723 } 18724 return nil 18725 } 18726 18727 func (e ProductSortKeys) MarshalGQL(w io.Writer) { 18728 fmt.Fprint(w, strconv.Quote(e.String())) 18729 } 18730 18731 // The possible product statuses. 18732 type ProductStatus string 18733 18734 const ( 18735 // The product is ready to sell and is available to customers on the online store, sales channels, and apps. By default, existing products are set to active. 18736 ProductStatusActive ProductStatus = "ACTIVE" 18737 // The product is no longer being sold and isn't available to customers on sales channels and apps. 18738 ProductStatusArchived ProductStatus = "ARCHIVED" 18739 // The product isn't ready to sell and is unavailable to customers on sales channels and apps. By default, duplicated and unarchived products are set to draft. 18740 ProductStatusDraft ProductStatus = "DRAFT" 18741 ) 18742 18743 var AllProductStatus = []ProductStatus{ 18744 ProductStatusActive, 18745 ProductStatusArchived, 18746 ProductStatusDraft, 18747 } 18748 18749 func (e ProductStatus) IsValid() bool { 18750 switch e { 18751 case ProductStatusActive, ProductStatusArchived, ProductStatusDraft: 18752 return true 18753 } 18754 return false 18755 } 18756 18757 func (e ProductStatus) String() string { 18758 return string(e) 18759 } 18760 18761 func (e *ProductStatus) UnmarshalGQL(v interface{}) error { 18762 str, ok := v.(string) 18763 if !ok { 18764 return fmt.Errorf("enums must be strings") 18765 } 18766 18767 *e = ProductStatus(str) 18768 if !e.IsValid() { 18769 return fmt.Errorf("%s is not a valid ProductStatus", str) 18770 } 18771 return nil 18772 } 18773 18774 func (e ProductStatus) MarshalGQL(w io.Writer) { 18775 fmt.Fprint(w, strconv.Quote(e.String())) 18776 } 18777 18778 // The method of inventory tracking for a product variant. 18779 type ProductVariantInventoryManagement string 18780 18781 const ( 18782 // Shopify tracks this product variant's inventory. 18783 ProductVariantInventoryManagementShopify ProductVariantInventoryManagement = "SHOPIFY" 18784 // This product variant's inventory is not tracked. 18785 ProductVariantInventoryManagementNotManaged ProductVariantInventoryManagement = "NOT_MANAGED" 18786 // A third-party fulfillment service tracks this product variant's inventory. 18787 ProductVariantInventoryManagementFulfillmentService ProductVariantInventoryManagement = "FULFILLMENT_SERVICE" 18788 ) 18789 18790 var AllProductVariantInventoryManagement = []ProductVariantInventoryManagement{ 18791 ProductVariantInventoryManagementShopify, 18792 ProductVariantInventoryManagementNotManaged, 18793 ProductVariantInventoryManagementFulfillmentService, 18794 } 18795 18796 func (e ProductVariantInventoryManagement) IsValid() bool { 18797 switch e { 18798 case ProductVariantInventoryManagementShopify, ProductVariantInventoryManagementNotManaged, ProductVariantInventoryManagementFulfillmentService: 18799 return true 18800 } 18801 return false 18802 } 18803 18804 func (e ProductVariantInventoryManagement) String() string { 18805 return string(e) 18806 } 18807 18808 func (e *ProductVariantInventoryManagement) UnmarshalGQL(v interface{}) error { 18809 str, ok := v.(string) 18810 if !ok { 18811 return fmt.Errorf("enums must be strings") 18812 } 18813 18814 *e = ProductVariantInventoryManagement(str) 18815 if !e.IsValid() { 18816 return fmt.Errorf("%s is not a valid ProductVariantInventoryManagement", str) 18817 } 18818 return nil 18819 } 18820 18821 func (e ProductVariantInventoryManagement) MarshalGQL(w io.Writer) { 18822 fmt.Fprint(w, strconv.Quote(e.String())) 18823 } 18824 18825 // The inventory policy for a product variant controls whether customers can continue to buy the variant when it 18826 // is out of stock. When the value is <code>continue</code>, customers are able to buy the variant when it's out of stock. 18827 // When the value is <code>deny</code>, customers can't buy the variant when it's out of stock. 18828 type ProductVariantInventoryPolicy string 18829 18830 const ( 18831 // Stop selling a product variant when it is out of stock. 18832 ProductVariantInventoryPolicyDeny ProductVariantInventoryPolicy = "DENY" 18833 // Continue selling a product variant when it is out of stock. 18834 ProductVariantInventoryPolicyContinue ProductVariantInventoryPolicy = "CONTINUE" 18835 ) 18836 18837 var AllProductVariantInventoryPolicy = []ProductVariantInventoryPolicy{ 18838 ProductVariantInventoryPolicyDeny, 18839 ProductVariantInventoryPolicyContinue, 18840 } 18841 18842 func (e ProductVariantInventoryPolicy) IsValid() bool { 18843 switch e { 18844 case ProductVariantInventoryPolicyDeny, ProductVariantInventoryPolicyContinue: 18845 return true 18846 } 18847 return false 18848 } 18849 18850 func (e ProductVariantInventoryPolicy) String() string { 18851 return string(e) 18852 } 18853 18854 func (e *ProductVariantInventoryPolicy) UnmarshalGQL(v interface{}) error { 18855 str, ok := v.(string) 18856 if !ok { 18857 return fmt.Errorf("enums must be strings") 18858 } 18859 18860 *e = ProductVariantInventoryPolicy(str) 18861 if !e.IsValid() { 18862 return fmt.Errorf("%s is not a valid ProductVariantInventoryPolicy", str) 18863 } 18864 return nil 18865 } 18866 18867 func (e ProductVariantInventoryPolicy) MarshalGQL(w io.Writer) { 18868 fmt.Fprint(w, strconv.Quote(e.String())) 18869 } 18870 18871 // The set of valid sort keys for the ProductVariant query. 18872 type ProductVariantSortKeys string 18873 18874 const ( 18875 // Sort by the `title` value. 18876 ProductVariantSortKeysTitle ProductVariantSortKeys = "TITLE" 18877 // Sort by the `name` value. 18878 ProductVariantSortKeysName ProductVariantSortKeys = "NAME" 18879 // Sort by the `sku` value. 18880 ProductVariantSortKeysSku ProductVariantSortKeys = "SKU" 18881 // Sort by the `inventory_quantity` value. 18882 ProductVariantSortKeysInventoryQuantity ProductVariantSortKeys = "INVENTORY_QUANTITY" 18883 // Sort by the `inventory_management` value. 18884 ProductVariantSortKeysInventoryManagement ProductVariantSortKeys = "INVENTORY_MANAGEMENT" 18885 // Sort by the `inventory_levels.available` value. 18886 ProductVariantSortKeysInventoryLevelsAvailable ProductVariantSortKeys = "INVENTORY_LEVELS_AVAILABLE" 18887 // Sort by the `inventory_policy` value. 18888 ProductVariantSortKeysInventoryPolicy ProductVariantSortKeys = "INVENTORY_POLICY" 18889 // Sort by the `full_title` value. 18890 ProductVariantSortKeysFullTitle ProductVariantSortKeys = "FULL_TITLE" 18891 // Sort by the `popular` value. 18892 ProductVariantSortKeysPopular ProductVariantSortKeys = "POPULAR" 18893 // Sort by the `position` value. 18894 ProductVariantSortKeysPosition ProductVariantSortKeys = "POSITION" 18895 // Sort by the `id` value. 18896 ProductVariantSortKeysID ProductVariantSortKeys = "ID" 18897 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 18898 // results by relevance to the search term(s). When no search query is specified, this sort key is not 18899 // deterministic and should not be used. 18900 ProductVariantSortKeysRelevance ProductVariantSortKeys = "RELEVANCE" 18901 ) 18902 18903 var AllProductVariantSortKeys = []ProductVariantSortKeys{ 18904 ProductVariantSortKeysTitle, 18905 ProductVariantSortKeysName, 18906 ProductVariantSortKeysSku, 18907 ProductVariantSortKeysInventoryQuantity, 18908 ProductVariantSortKeysInventoryManagement, 18909 ProductVariantSortKeysInventoryLevelsAvailable, 18910 ProductVariantSortKeysInventoryPolicy, 18911 ProductVariantSortKeysFullTitle, 18912 ProductVariantSortKeysPopular, 18913 ProductVariantSortKeysPosition, 18914 ProductVariantSortKeysID, 18915 ProductVariantSortKeysRelevance, 18916 } 18917 18918 func (e ProductVariantSortKeys) IsValid() bool { 18919 switch e { 18920 case ProductVariantSortKeysTitle, ProductVariantSortKeysName, ProductVariantSortKeysSku, ProductVariantSortKeysInventoryQuantity, ProductVariantSortKeysInventoryManagement, ProductVariantSortKeysInventoryLevelsAvailable, ProductVariantSortKeysInventoryPolicy, ProductVariantSortKeysFullTitle, ProductVariantSortKeysPopular, ProductVariantSortKeysPosition, ProductVariantSortKeysID, ProductVariantSortKeysRelevance: 18921 return true 18922 } 18923 return false 18924 } 18925 18926 func (e ProductVariantSortKeys) String() string { 18927 return string(e) 18928 } 18929 18930 func (e *ProductVariantSortKeys) UnmarshalGQL(v interface{}) error { 18931 str, ok := v.(string) 18932 if !ok { 18933 return fmt.Errorf("enums must be strings") 18934 } 18935 18936 *e = ProductVariantSortKeys(str) 18937 if !e.IsValid() { 18938 return fmt.Errorf("%s is not a valid ProductVariantSortKeys", str) 18939 } 18940 return nil 18941 } 18942 18943 func (e ProductVariantSortKeys) MarshalGQL(w io.Writer) { 18944 fmt.Fprint(w, strconv.Quote(e.String())) 18945 } 18946 18947 // The set of valid sort keys for the ProfileItem query. 18948 type ProfileItemSortKeys string 18949 18950 const ( 18951 // Sort by the `title` value. 18952 ProfileItemSortKeysTitle ProfileItemSortKeys = "TITLE" 18953 // Sort by the `product_type` value. 18954 ProfileItemSortKeysProductType ProfileItemSortKeys = "PRODUCT_TYPE" 18955 // Sort by the `vendor` value. 18956 ProfileItemSortKeysVendor ProfileItemSortKeys = "VENDOR" 18957 // Sort by the `inventory_total` value. 18958 ProfileItemSortKeysInventoryTotal ProfileItemSortKeys = "INVENTORY_TOTAL" 18959 // Sort by the `updated_at` value. 18960 ProfileItemSortKeysUpdatedAt ProfileItemSortKeys = "UPDATED_AT" 18961 // Sort by the `created_at` value. 18962 ProfileItemSortKeysCreatedAt ProfileItemSortKeys = "CREATED_AT" 18963 // Sort by the `published_at` value. 18964 ProfileItemSortKeysPublishedAt ProfileItemSortKeys = "PUBLISHED_AT" 18965 // Sort by the `id` value. 18966 ProfileItemSortKeysID ProfileItemSortKeys = "ID" 18967 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 18968 // results by relevance to the search term(s). When no search query is specified, this sort key is not 18969 // deterministic and should not be used. 18970 ProfileItemSortKeysRelevance ProfileItemSortKeys = "RELEVANCE" 18971 ) 18972 18973 var AllProfileItemSortKeys = []ProfileItemSortKeys{ 18974 ProfileItemSortKeysTitle, 18975 ProfileItemSortKeysProductType, 18976 ProfileItemSortKeysVendor, 18977 ProfileItemSortKeysInventoryTotal, 18978 ProfileItemSortKeysUpdatedAt, 18979 ProfileItemSortKeysCreatedAt, 18980 ProfileItemSortKeysPublishedAt, 18981 ProfileItemSortKeysID, 18982 ProfileItemSortKeysRelevance, 18983 } 18984 18985 func (e ProfileItemSortKeys) IsValid() bool { 18986 switch e { 18987 case ProfileItemSortKeysTitle, ProfileItemSortKeysProductType, ProfileItemSortKeysVendor, ProfileItemSortKeysInventoryTotal, ProfileItemSortKeysUpdatedAt, ProfileItemSortKeysCreatedAt, ProfileItemSortKeysPublishedAt, ProfileItemSortKeysID, ProfileItemSortKeysRelevance: 18988 return true 18989 } 18990 return false 18991 } 18992 18993 func (e ProfileItemSortKeys) String() string { 18994 return string(e) 18995 } 18996 18997 func (e *ProfileItemSortKeys) UnmarshalGQL(v interface{}) error { 18998 str, ok := v.(string) 18999 if !ok { 19000 return fmt.Errorf("enums must be strings") 19001 } 19002 19003 *e = ProfileItemSortKeys(str) 19004 if !e.IsValid() { 19005 return fmt.Errorf("%s is not a valid ProfileItemSortKeys", str) 19006 } 19007 return nil 19008 } 19009 19010 func (e ProfileItemSortKeys) MarshalGQL(w io.Writer) { 19011 fmt.Fprint(w, strconv.Quote(e.String())) 19012 } 19013 19014 // The type of refund to perform for a particular refund duty. 19015 type RefundDutyRefundType string 19016 19017 const ( 19018 // The duty is proportionally refunded based on the quantity of the refunded line item. 19019 RefundDutyRefundTypeProportional RefundDutyRefundType = "PROPORTIONAL" 19020 // The duty is fully refunded. 19021 RefundDutyRefundTypeFull RefundDutyRefundType = "FULL" 19022 ) 19023 19024 var AllRefundDutyRefundType = []RefundDutyRefundType{ 19025 RefundDutyRefundTypeProportional, 19026 RefundDutyRefundTypeFull, 19027 } 19028 19029 func (e RefundDutyRefundType) IsValid() bool { 19030 switch e { 19031 case RefundDutyRefundTypeProportional, RefundDutyRefundTypeFull: 19032 return true 19033 } 19034 return false 19035 } 19036 19037 func (e RefundDutyRefundType) String() string { 19038 return string(e) 19039 } 19040 19041 func (e *RefundDutyRefundType) UnmarshalGQL(v interface{}) error { 19042 str, ok := v.(string) 19043 if !ok { 19044 return fmt.Errorf("enums must be strings") 19045 } 19046 19047 *e = RefundDutyRefundType(str) 19048 if !e.IsValid() { 19049 return fmt.Errorf("%s is not a valid RefundDutyRefundType", str) 19050 } 19051 return nil 19052 } 19053 19054 func (e RefundDutyRefundType) MarshalGQL(w io.Writer) { 19055 fmt.Fprint(w, strconv.Quote(e.String())) 19056 } 19057 19058 // The type of restock performed for a particular refund line item. 19059 type RefundLineItemRestockType string 19060 19061 const ( 19062 // Refund line item was returned. 19063 RefundLineItemRestockTypeReturn RefundLineItemRestockType = "RETURN" 19064 // Refund line item was canceled. 19065 RefundLineItemRestockTypeCancel RefundLineItemRestockType = "CANCEL" 19066 // Refund line item was restocked, without specifically being identified as a return or cancelation. 19067 RefundLineItemRestockTypeLegacyRestock RefundLineItemRestockType = "LEGACY_RESTOCK" 19068 // Refund line item was not restocked. 19069 RefundLineItemRestockTypeNoRestock RefundLineItemRestockType = "NO_RESTOCK" 19070 ) 19071 19072 var AllRefundLineItemRestockType = []RefundLineItemRestockType{ 19073 RefundLineItemRestockTypeReturn, 19074 RefundLineItemRestockTypeCancel, 19075 RefundLineItemRestockTypeLegacyRestock, 19076 RefundLineItemRestockTypeNoRestock, 19077 } 19078 19079 func (e RefundLineItemRestockType) IsValid() bool { 19080 switch e { 19081 case RefundLineItemRestockTypeReturn, RefundLineItemRestockTypeCancel, RefundLineItemRestockTypeLegacyRestock, RefundLineItemRestockTypeNoRestock: 19082 return true 19083 } 19084 return false 19085 } 19086 19087 func (e RefundLineItemRestockType) String() string { 19088 return string(e) 19089 } 19090 19091 func (e *RefundLineItemRestockType) UnmarshalGQL(v interface{}) error { 19092 str, ok := v.(string) 19093 if !ok { 19094 return fmt.Errorf("enums must be strings") 19095 } 19096 19097 *e = RefundLineItemRestockType(str) 19098 if !e.IsValid() { 19099 return fmt.Errorf("%s is not a valid RefundLineItemRestockType", str) 19100 } 19101 return nil 19102 } 19103 19104 func (e RefundLineItemRestockType) MarshalGQL(w io.Writer) { 19105 fmt.Fprint(w, strconv.Quote(e.String())) 19106 } 19107 19108 // The available icons for resource alerts. 19109 type ResourceAlertIcon string 19110 19111 const ( 19112 // A checkmark inside a circle. 19113 ResourceAlertIconCheckmarkCircle ResourceAlertIcon = "CHECKMARK_CIRCLE" 19114 // A lowercase `i` inside a circle. 19115 ResourceAlertIconInformationCircle ResourceAlertIcon = "INFORMATION_CIRCLE" 19116 ) 19117 19118 var AllResourceAlertIcon = []ResourceAlertIcon{ 19119 ResourceAlertIconCheckmarkCircle, 19120 ResourceAlertIconInformationCircle, 19121 } 19122 19123 func (e ResourceAlertIcon) IsValid() bool { 19124 switch e { 19125 case ResourceAlertIconCheckmarkCircle, ResourceAlertIconInformationCircle: 19126 return true 19127 } 19128 return false 19129 } 19130 19131 func (e ResourceAlertIcon) String() string { 19132 return string(e) 19133 } 19134 19135 func (e *ResourceAlertIcon) UnmarshalGQL(v interface{}) error { 19136 str, ok := v.(string) 19137 if !ok { 19138 return fmt.Errorf("enums must be strings") 19139 } 19140 19141 *e = ResourceAlertIcon(str) 19142 if !e.IsValid() { 19143 return fmt.Errorf("%s is not a valid ResourceAlertIcon", str) 19144 } 19145 return nil 19146 } 19147 19148 func (e ResourceAlertIcon) MarshalGQL(w io.Writer) { 19149 fmt.Fprint(w, strconv.Quote(e.String())) 19150 } 19151 19152 // The possible severity levels for a resource alert. 19153 type ResourceAlertSeverity string 19154 19155 const ( 19156 // Indicates a neutral alert. 19157 ResourceAlertSeverityDefault ResourceAlertSeverity = "DEFAULT" 19158 // Indicates an informative alert. 19159 ResourceAlertSeverityInfo ResourceAlertSeverity = "INFO" 19160 // Indicates a warning alert. 19161 ResourceAlertSeverityWarning ResourceAlertSeverity = "WARNING" 19162 // Indicates a success alert. 19163 ResourceAlertSeveritySuccess ResourceAlertSeverity = "SUCCESS" 19164 // Indicates a critical alert. 19165 ResourceAlertSeverityCritical ResourceAlertSeverity = "CRITICAL" 19166 ResourceAlertSeverityError ResourceAlertSeverity = "ERROR" 19167 ) 19168 19169 var AllResourceAlertSeverity = []ResourceAlertSeverity{ 19170 ResourceAlertSeverityDefault, 19171 ResourceAlertSeverityInfo, 19172 ResourceAlertSeverityWarning, 19173 ResourceAlertSeveritySuccess, 19174 ResourceAlertSeverityCritical, 19175 ResourceAlertSeverityError, 19176 } 19177 19178 func (e ResourceAlertSeverity) IsValid() bool { 19179 switch e { 19180 case ResourceAlertSeverityDefault, ResourceAlertSeverityInfo, ResourceAlertSeverityWarning, ResourceAlertSeveritySuccess, ResourceAlertSeverityCritical, ResourceAlertSeverityError: 19181 return true 19182 } 19183 return false 19184 } 19185 19186 func (e ResourceAlertSeverity) String() string { 19187 return string(e) 19188 } 19189 19190 func (e *ResourceAlertSeverity) UnmarshalGQL(v interface{}) error { 19191 str, ok := v.(string) 19192 if !ok { 19193 return fmt.Errorf("enums must be strings") 19194 } 19195 19196 *e = ResourceAlertSeverity(str) 19197 if !e.IsValid() { 19198 return fmt.Errorf("%s is not a valid ResourceAlertSeverity", str) 19199 } 19200 return nil 19201 } 19202 19203 func (e ResourceAlertSeverity) MarshalGQL(w io.Writer) { 19204 fmt.Fprint(w, strconv.Quote(e.String())) 19205 } 19206 19207 // The page or pages on the online store where the script should be included. 19208 type ScriptTagDisplayScope string 19209 19210 const ( 19211 // Include the script on both the web storefront and the order status page. 19212 ScriptTagDisplayScopeAll ScriptTagDisplayScope = "ALL" 19213 // Include the script only on the order status page. 19214 ScriptTagDisplayScopeOrderStatus ScriptTagDisplayScope = "ORDER_STATUS" 19215 // Include the script only on the web storefront. 19216 ScriptTagDisplayScopeOnlineStore ScriptTagDisplayScope = "ONLINE_STORE" 19217 ) 19218 19219 var AllScriptTagDisplayScope = []ScriptTagDisplayScope{ 19220 ScriptTagDisplayScopeAll, 19221 ScriptTagDisplayScopeOrderStatus, 19222 ScriptTagDisplayScopeOnlineStore, 19223 } 19224 19225 func (e ScriptTagDisplayScope) IsValid() bool { 19226 switch e { 19227 case ScriptTagDisplayScopeAll, ScriptTagDisplayScopeOrderStatus, ScriptTagDisplayScopeOnlineStore: 19228 return true 19229 } 19230 return false 19231 } 19232 19233 func (e ScriptTagDisplayScope) String() string { 19234 return string(e) 19235 } 19236 19237 func (e *ScriptTagDisplayScope) UnmarshalGQL(v interface{}) error { 19238 str, ok := v.(string) 19239 if !ok { 19240 return fmt.Errorf("enums must be strings") 19241 } 19242 19243 *e = ScriptTagDisplayScope(str) 19244 if !e.IsValid() { 19245 return fmt.Errorf("%s is not a valid ScriptTagDisplayScope", str) 19246 } 19247 return nil 19248 } 19249 19250 func (e ScriptTagDisplayScope) MarshalGQL(w io.Writer) { 19251 fmt.Fprint(w, strconv.Quote(e.String())) 19252 } 19253 19254 // Specifies the type of resources to be returned from a search. 19255 type SearchResultType string 19256 19257 const ( 19258 SearchResultTypeOrder SearchResultType = "ORDER" 19259 SearchResultTypeCustomer SearchResultType = "CUSTOMER" 19260 SearchResultTypeProduct SearchResultType = "PRODUCT" 19261 SearchResultTypeOnlineStorePage SearchResultType = "ONLINE_STORE_PAGE" 19262 SearchResultTypeOnlineStoreBlog SearchResultType = "ONLINE_STORE_BLOG" 19263 SearchResultTypeOnlineStoreArticle SearchResultType = "ONLINE_STORE_ARTICLE" 19264 SearchResultTypeCollection SearchResultType = "COLLECTION" 19265 SearchResultTypeDraftOrder SearchResultType = "DRAFT_ORDER" 19266 SearchResultTypePriceRule SearchResultType = "PRICE_RULE" 19267 // A code discount redeem code. 19268 SearchResultTypeDiscountRedeemCode SearchResultType = "DISCOUNT_REDEEM_CODE" 19269 ) 19270 19271 var AllSearchResultType = []SearchResultType{ 19272 SearchResultTypeOrder, 19273 SearchResultTypeCustomer, 19274 SearchResultTypeProduct, 19275 SearchResultTypeOnlineStorePage, 19276 SearchResultTypeOnlineStoreBlog, 19277 SearchResultTypeOnlineStoreArticle, 19278 SearchResultTypeCollection, 19279 SearchResultTypeDraftOrder, 19280 SearchResultTypePriceRule, 19281 SearchResultTypeDiscountRedeemCode, 19282 } 19283 19284 func (e SearchResultType) IsValid() bool { 19285 switch e { 19286 case SearchResultTypeOrder, SearchResultTypeCustomer, SearchResultTypeProduct, SearchResultTypeOnlineStorePage, SearchResultTypeOnlineStoreBlog, SearchResultTypeOnlineStoreArticle, SearchResultTypeCollection, SearchResultTypeDraftOrder, SearchResultTypePriceRule, SearchResultTypeDiscountRedeemCode: 19287 return true 19288 } 19289 return false 19290 } 19291 19292 func (e SearchResultType) String() string { 19293 return string(e) 19294 } 19295 19296 func (e *SearchResultType) UnmarshalGQL(v interface{}) error { 19297 str, ok := v.(string) 19298 if !ok { 19299 return fmt.Errorf("enums must be strings") 19300 } 19301 19302 *e = SearchResultType(str) 19303 if !e.IsValid() { 19304 return fmt.Errorf("%s is not a valid SearchResultType", str) 19305 } 19306 return nil 19307 } 19308 19309 func (e SearchResultType) MarshalGQL(w io.Writer) { 19310 fmt.Fprint(w, strconv.Quote(e.String())) 19311 } 19312 19313 // Represents the anchor type. 19314 type SellingPlanAnchorType string 19315 19316 const ( 19317 // Which day of the week, between 1-7. 19318 SellingPlanAnchorTypeWeekday SellingPlanAnchorType = "WEEKDAY" 19319 // Which day of the month, between 1-31. 19320 SellingPlanAnchorTypeMonthday SellingPlanAnchorType = "MONTHDAY" 19321 // Which days of the month and year, month between 1-12, and day between 1-31. 19322 SellingPlanAnchorTypeYearday SellingPlanAnchorType = "YEARDAY" 19323 ) 19324 19325 var AllSellingPlanAnchorType = []SellingPlanAnchorType{ 19326 SellingPlanAnchorTypeWeekday, 19327 SellingPlanAnchorTypeMonthday, 19328 SellingPlanAnchorTypeYearday, 19329 } 19330 19331 func (e SellingPlanAnchorType) IsValid() bool { 19332 switch e { 19333 case SellingPlanAnchorTypeWeekday, SellingPlanAnchorTypeMonthday, SellingPlanAnchorTypeYearday: 19334 return true 19335 } 19336 return false 19337 } 19338 19339 func (e SellingPlanAnchorType) String() string { 19340 return string(e) 19341 } 19342 19343 func (e *SellingPlanAnchorType) UnmarshalGQL(v interface{}) error { 19344 str, ok := v.(string) 19345 if !ok { 19346 return fmt.Errorf("enums must be strings") 19347 } 19348 19349 *e = SellingPlanAnchorType(str) 19350 if !e.IsValid() { 19351 return fmt.Errorf("%s is not a valid SellingPlanAnchorType", str) 19352 } 19353 return nil 19354 } 19355 19356 func (e SellingPlanAnchorType) MarshalGQL(w io.Writer) { 19357 fmt.Fprint(w, strconv.Quote(e.String())) 19358 } 19359 19360 // The set of valid sort keys for the SellingPlanGroup query. 19361 type SellingPlanGroupSortKeys string 19362 19363 const ( 19364 // Sort by the `name` value. 19365 SellingPlanGroupSortKeysName SellingPlanGroupSortKeys = "NAME" 19366 // Sort by the `updated_at` value. 19367 SellingPlanGroupSortKeysUpdatedAt SellingPlanGroupSortKeys = "UPDATED_AT" 19368 // Sort by the `created_at` value. 19369 SellingPlanGroupSortKeysCreatedAt SellingPlanGroupSortKeys = "CREATED_AT" 19370 // Sort by the `id` value. 19371 SellingPlanGroupSortKeysID SellingPlanGroupSortKeys = "ID" 19372 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 19373 // results by relevance to the search term(s). When no search query is specified, this sort key is not 19374 // deterministic and should not be used. 19375 SellingPlanGroupSortKeysRelevance SellingPlanGroupSortKeys = "RELEVANCE" 19376 ) 19377 19378 var AllSellingPlanGroupSortKeys = []SellingPlanGroupSortKeys{ 19379 SellingPlanGroupSortKeysName, 19380 SellingPlanGroupSortKeysUpdatedAt, 19381 SellingPlanGroupSortKeysCreatedAt, 19382 SellingPlanGroupSortKeysID, 19383 SellingPlanGroupSortKeysRelevance, 19384 } 19385 19386 func (e SellingPlanGroupSortKeys) IsValid() bool { 19387 switch e { 19388 case SellingPlanGroupSortKeysName, SellingPlanGroupSortKeysUpdatedAt, SellingPlanGroupSortKeysCreatedAt, SellingPlanGroupSortKeysID, SellingPlanGroupSortKeysRelevance: 19389 return true 19390 } 19391 return false 19392 } 19393 19394 func (e SellingPlanGroupSortKeys) String() string { 19395 return string(e) 19396 } 19397 19398 func (e *SellingPlanGroupSortKeys) UnmarshalGQL(v interface{}) error { 19399 str, ok := v.(string) 19400 if !ok { 19401 return fmt.Errorf("enums must be strings") 19402 } 19403 19404 *e = SellingPlanGroupSortKeys(str) 19405 if !e.IsValid() { 19406 return fmt.Errorf("%s is not a valid SellingPlanGroupSortKeys", str) 19407 } 19408 return nil 19409 } 19410 19411 func (e SellingPlanGroupSortKeys) MarshalGQL(w io.Writer) { 19412 fmt.Fprint(w, strconv.Quote(e.String())) 19413 } 19414 19415 // Possible error codes that could be returned by SellingPlanGroupUserError. 19416 type SellingPlanGroupUserErrorCode string 19417 19418 const ( 19419 // Input value is not present. 19420 SellingPlanGroupUserErrorCodePresent SellingPlanGroupUserErrorCode = "PRESENT" 19421 // Input value is blank. 19422 SellingPlanGroupUserErrorCodeBlank SellingPlanGroupUserErrorCode = "BLANK" 19423 // Input value is invalid. 19424 SellingPlanGroupUserErrorCodeInvalid SellingPlanGroupUserErrorCode = "INVALID" 19425 // Input value should be greater than minimum allowed value. 19426 SellingPlanGroupUserErrorCodeGreaterThan SellingPlanGroupUserErrorCode = "GREATER_THAN" 19427 // Input value should be greater than or equal to minimum allowed value. 19428 SellingPlanGroupUserErrorCodeGreaterThanOrEqualTo SellingPlanGroupUserErrorCode = "GREATER_THAN_OR_EQUAL_TO" 19429 // Input value should be less than maximum allowed value. 19430 SellingPlanGroupUserErrorCodeLessThan SellingPlanGroupUserErrorCode = "LESS_THAN" 19431 // Input value should be less or equal to maximum allowed value. 19432 SellingPlanGroupUserErrorCodeLessThanOrEqualTo SellingPlanGroupUserErrorCode = "LESS_THAN_OR_EQUAL_TO" 19433 // Input value is not a number. 19434 SellingPlanGroupUserErrorCodeNotANumber SellingPlanGroupUserErrorCode = "NOT_A_NUMBER" 19435 // Input value is too long. 19436 SellingPlanGroupUserErrorCodeTooLong SellingPlanGroupUserErrorCode = "TOO_LONG" 19437 // Input value is too short. 19438 SellingPlanGroupUserErrorCodeTooShort SellingPlanGroupUserErrorCode = "TOO_SHORT" 19439 // Input value is already taken. 19440 SellingPlanGroupUserErrorCodeTaken SellingPlanGroupUserErrorCode = "TAKEN" 19441 // Exceeded the selling plan limit (20). 19442 SellingPlanGroupUserErrorCodeSellingPlanCountUpperBound SellingPlanGroupUserErrorCode = "SELLING_PLAN_COUNT_UPPER_BOUND" 19443 // Must include at least one selling plan. 19444 SellingPlanGroupUserErrorCodeSellingPlanCountLowerBound SellingPlanGroupUserErrorCode = "SELLING_PLAN_COUNT_LOWER_BOUND" 19445 // Selling plan's billing policy max cycles must be greater than min cycles. 19446 SellingPlanGroupUserErrorCodeSellingPlanMaxCyclesMustBeGreaterThanMinCycles SellingPlanGroupUserErrorCode = "SELLING_PLAN_MAX_CYCLES_MUST_BE_GREATER_THAN_MIN_CYCLES" 19447 // Selling plan's billing and delivery policies anchors must be equal. 19448 SellingPlanGroupUserErrorCodeSellingPlanBillingAndDeliveryPolicyAnchorsMustBeEqual SellingPlanGroupUserErrorCode = "SELLING_PLAN_BILLING_AND_DELIVERY_POLICY_ANCHORS_MUST_BE_EQUAL" 19449 // Selling plan's billing cycle must be a multiple of delivery cycle. 19450 SellingPlanGroupUserErrorCodeSellingPlanBillingCycleMustBeAMultipleOfDeliveryCycle SellingPlanGroupUserErrorCode = "SELLING_PLAN_BILLING_CYCLE_MUST_BE_A_MULTIPLE_OF_DELIVERY_CYCLE" 19451 // Selling plan's pricing policies must contain one fixed pricing policy. 19452 SellingPlanGroupUserErrorCodeSellingPlanPricingPoliciesMustContainAFixedPricingPolicy SellingPlanGroupUserErrorCode = "SELLING_PLAN_PRICING_POLICIES_MUST_CONTAIN_A_FIXED_PRICING_POLICY" 19453 // Cannot define option2 on this selling plan as there's no label on the parent selling plan group. 19454 SellingPlanGroupUserErrorCodeSellingPlanMissingOption2LabelOnParentGroup SellingPlanGroupUserErrorCode = "SELLING_PLAN_MISSING_OPTION2_LABEL_ON_PARENT_GROUP" 19455 // Cannot define option3 on this selling plan as there's no label on the parent selling plan group. 19456 SellingPlanGroupUserErrorCodeSellingPlanMissingOption3LabelOnParentGroup SellingPlanGroupUserErrorCode = "SELLING_PLAN_MISSING_OPTION3_LABEL_ON_PARENT_GROUP" 19457 // Selling plan's option2 is required because option2 exists. 19458 SellingPlanGroupUserErrorCodeSellingPlanOption2RequiredAsDefinedOnParentGroup SellingPlanGroupUserErrorCode = "SELLING_PLAN_OPTION2_REQUIRED_AS_DEFINED_ON_PARENT_GROUP" 19459 // Selling plan's option3 is required because option3 exists. 19460 SellingPlanGroupUserErrorCodeSellingPlanOption3RequiredAsDefinedOnParentGroup SellingPlanGroupUserErrorCode = "SELLING_PLAN_OPTION3_REQUIRED_AS_DEFINED_ON_PARENT_GROUP" 19461 // Selling plans can't have more than 2 pricing policies. 19462 SellingPlanGroupUserErrorCodeSellingPlanPricingPoliciesLimit SellingPlanGroupUserErrorCode = "SELLING_PLAN_PRICING_POLICIES_LIMIT" 19463 // Product variant does not exist. 19464 SellingPlanGroupUserErrorCodeProductVariantDoesNotExist SellingPlanGroupUserErrorCode = "PRODUCT_VARIANT_DOES_NOT_EXIST" 19465 // Product does not exist. 19466 SellingPlanGroupUserErrorCodeProductDoesNotExist SellingPlanGroupUserErrorCode = "PRODUCT_DOES_NOT_EXIST" 19467 // Selling plan group does not exist. 19468 SellingPlanGroupUserErrorCodeGroupDoesNotExist SellingPlanGroupUserErrorCode = "GROUP_DOES_NOT_EXIST" 19469 // Selling plan group could not be deleted. 19470 SellingPlanGroupUserErrorCodeGroupCouldNotBeDeleted SellingPlanGroupUserErrorCode = "GROUP_COULD_NOT_BE_DELETED" 19471 // Could not add the resource to the selling plan group. 19472 SellingPlanGroupUserErrorCodeErrorAddingResourceToGroup SellingPlanGroupUserErrorCode = "ERROR_ADDING_RESOURCE_TO_GROUP" 19473 // Missing delivery policy. 19474 SellingPlanGroupUserErrorCodeSellingPlanDeliveryPolicyMissing SellingPlanGroupUserErrorCode = "SELLING_PLAN_DELIVERY_POLICY_MISSING" 19475 // Missing billing policy. 19476 SellingPlanGroupUserErrorCodeSellingPlanBillingPolicyMissing SellingPlanGroupUserErrorCode = "SELLING_PLAN_BILLING_POLICY_MISSING" 19477 // Selling plan does not exist. 19478 SellingPlanGroupUserErrorCodePlanDoesNotExist SellingPlanGroupUserErrorCode = "PLAN_DOES_NOT_EXIST" 19479 // Selling plan ID must be specified to update. 19480 SellingPlanGroupUserErrorCodePlanIDMustBeSpecifiedToUpdate SellingPlanGroupUserErrorCode = "PLAN_ID_MUST_BE_SPECIFIED_TO_UPDATE" 19481 // Only one pricing policy type can be defined. 19482 SellingPlanGroupUserErrorCodeOnlyNeedOnePricingPolicyType SellingPlanGroupUserErrorCode = "ONLY_NEED_ONE_PRICING_POLICY_TYPE" 19483 // Only one pricing policy adjustment value type can be defined. 19484 SellingPlanGroupUserErrorCodeOnlyNeedOnePricingPolicyValue SellingPlanGroupUserErrorCode = "ONLY_NEED_ONE_PRICING_POLICY_VALUE" 19485 // Pricing policy's adjustment value and adjustment type must match. 19486 SellingPlanGroupUserErrorCodePricingPolicyAdjustmentValueAndTypeMustMatch SellingPlanGroupUserErrorCode = "PRICING_POLICY_ADJUSTMENT_VALUE_AND_TYPE_MUST_MATCH" 19487 // Cannot have multiple selling plans with the same name. 19488 SellingPlanGroupUserErrorCodeSellingPlanDuplicateName SellingPlanGroupUserErrorCode = "SELLING_PLAN_DUPLICATE_NAME" 19489 // Cannot have multiple selling plans with the same options. 19490 SellingPlanGroupUserErrorCodeSellingPlanDuplicateOptions SellingPlanGroupUserErrorCode = "SELLING_PLAN_DUPLICATE_OPTIONS" 19491 ) 19492 19493 var AllSellingPlanGroupUserErrorCode = []SellingPlanGroupUserErrorCode{ 19494 SellingPlanGroupUserErrorCodePresent, 19495 SellingPlanGroupUserErrorCodeBlank, 19496 SellingPlanGroupUserErrorCodeInvalid, 19497 SellingPlanGroupUserErrorCodeGreaterThan, 19498 SellingPlanGroupUserErrorCodeGreaterThanOrEqualTo, 19499 SellingPlanGroupUserErrorCodeLessThan, 19500 SellingPlanGroupUserErrorCodeLessThanOrEqualTo, 19501 SellingPlanGroupUserErrorCodeNotANumber, 19502 SellingPlanGroupUserErrorCodeTooLong, 19503 SellingPlanGroupUserErrorCodeTooShort, 19504 SellingPlanGroupUserErrorCodeTaken, 19505 SellingPlanGroupUserErrorCodeSellingPlanCountUpperBound, 19506 SellingPlanGroupUserErrorCodeSellingPlanCountLowerBound, 19507 SellingPlanGroupUserErrorCodeSellingPlanMaxCyclesMustBeGreaterThanMinCycles, 19508 SellingPlanGroupUserErrorCodeSellingPlanBillingAndDeliveryPolicyAnchorsMustBeEqual, 19509 SellingPlanGroupUserErrorCodeSellingPlanBillingCycleMustBeAMultipleOfDeliveryCycle, 19510 SellingPlanGroupUserErrorCodeSellingPlanPricingPoliciesMustContainAFixedPricingPolicy, 19511 SellingPlanGroupUserErrorCodeSellingPlanMissingOption2LabelOnParentGroup, 19512 SellingPlanGroupUserErrorCodeSellingPlanMissingOption3LabelOnParentGroup, 19513 SellingPlanGroupUserErrorCodeSellingPlanOption2RequiredAsDefinedOnParentGroup, 19514 SellingPlanGroupUserErrorCodeSellingPlanOption3RequiredAsDefinedOnParentGroup, 19515 SellingPlanGroupUserErrorCodeSellingPlanPricingPoliciesLimit, 19516 SellingPlanGroupUserErrorCodeProductVariantDoesNotExist, 19517 SellingPlanGroupUserErrorCodeProductDoesNotExist, 19518 SellingPlanGroupUserErrorCodeGroupDoesNotExist, 19519 SellingPlanGroupUserErrorCodeGroupCouldNotBeDeleted, 19520 SellingPlanGroupUserErrorCodeErrorAddingResourceToGroup, 19521 SellingPlanGroupUserErrorCodeSellingPlanDeliveryPolicyMissing, 19522 SellingPlanGroupUserErrorCodeSellingPlanBillingPolicyMissing, 19523 SellingPlanGroupUserErrorCodePlanDoesNotExist, 19524 SellingPlanGroupUserErrorCodePlanIDMustBeSpecifiedToUpdate, 19525 SellingPlanGroupUserErrorCodeOnlyNeedOnePricingPolicyType, 19526 SellingPlanGroupUserErrorCodeOnlyNeedOnePricingPolicyValue, 19527 SellingPlanGroupUserErrorCodePricingPolicyAdjustmentValueAndTypeMustMatch, 19528 SellingPlanGroupUserErrorCodeSellingPlanDuplicateName, 19529 SellingPlanGroupUserErrorCodeSellingPlanDuplicateOptions, 19530 } 19531 19532 func (e SellingPlanGroupUserErrorCode) IsValid() bool { 19533 switch e { 19534 case SellingPlanGroupUserErrorCodePresent, SellingPlanGroupUserErrorCodeBlank, SellingPlanGroupUserErrorCodeInvalid, SellingPlanGroupUserErrorCodeGreaterThan, SellingPlanGroupUserErrorCodeGreaterThanOrEqualTo, SellingPlanGroupUserErrorCodeLessThan, SellingPlanGroupUserErrorCodeLessThanOrEqualTo, SellingPlanGroupUserErrorCodeNotANumber, SellingPlanGroupUserErrorCodeTooLong, SellingPlanGroupUserErrorCodeTooShort, SellingPlanGroupUserErrorCodeTaken, SellingPlanGroupUserErrorCodeSellingPlanCountUpperBound, SellingPlanGroupUserErrorCodeSellingPlanCountLowerBound, SellingPlanGroupUserErrorCodeSellingPlanMaxCyclesMustBeGreaterThanMinCycles, SellingPlanGroupUserErrorCodeSellingPlanBillingAndDeliveryPolicyAnchorsMustBeEqual, SellingPlanGroupUserErrorCodeSellingPlanBillingCycleMustBeAMultipleOfDeliveryCycle, SellingPlanGroupUserErrorCodeSellingPlanPricingPoliciesMustContainAFixedPricingPolicy, SellingPlanGroupUserErrorCodeSellingPlanMissingOption2LabelOnParentGroup, SellingPlanGroupUserErrorCodeSellingPlanMissingOption3LabelOnParentGroup, SellingPlanGroupUserErrorCodeSellingPlanOption2RequiredAsDefinedOnParentGroup, SellingPlanGroupUserErrorCodeSellingPlanOption3RequiredAsDefinedOnParentGroup, SellingPlanGroupUserErrorCodeSellingPlanPricingPoliciesLimit, SellingPlanGroupUserErrorCodeProductVariantDoesNotExist, SellingPlanGroupUserErrorCodeProductDoesNotExist, SellingPlanGroupUserErrorCodeGroupDoesNotExist, SellingPlanGroupUserErrorCodeGroupCouldNotBeDeleted, SellingPlanGroupUserErrorCodeErrorAddingResourceToGroup, SellingPlanGroupUserErrorCodeSellingPlanDeliveryPolicyMissing, SellingPlanGroupUserErrorCodeSellingPlanBillingPolicyMissing, SellingPlanGroupUserErrorCodePlanDoesNotExist, SellingPlanGroupUserErrorCodePlanIDMustBeSpecifiedToUpdate, SellingPlanGroupUserErrorCodeOnlyNeedOnePricingPolicyType, SellingPlanGroupUserErrorCodeOnlyNeedOnePricingPolicyValue, SellingPlanGroupUserErrorCodePricingPolicyAdjustmentValueAndTypeMustMatch, SellingPlanGroupUserErrorCodeSellingPlanDuplicateName, SellingPlanGroupUserErrorCodeSellingPlanDuplicateOptions: 19535 return true 19536 } 19537 return false 19538 } 19539 19540 func (e SellingPlanGroupUserErrorCode) String() string { 19541 return string(e) 19542 } 19543 19544 func (e *SellingPlanGroupUserErrorCode) UnmarshalGQL(v interface{}) error { 19545 str, ok := v.(string) 19546 if !ok { 19547 return fmt.Errorf("enums must be strings") 19548 } 19549 19550 *e = SellingPlanGroupUserErrorCode(str) 19551 if !e.IsValid() { 19552 return fmt.Errorf("%s is not a valid SellingPlanGroupUserErrorCode", str) 19553 } 19554 return nil 19555 } 19556 19557 func (e SellingPlanGroupUserErrorCode) MarshalGQL(w io.Writer) { 19558 fmt.Fprint(w, strconv.Quote(e.String())) 19559 } 19560 19561 // Represents valid selling plan interval. 19562 type SellingPlanInterval string 19563 19564 const ( 19565 // Day interval. 19566 SellingPlanIntervalDay SellingPlanInterval = "DAY" 19567 // Week interval. 19568 SellingPlanIntervalWeek SellingPlanInterval = "WEEK" 19569 // Month interval. 19570 SellingPlanIntervalMonth SellingPlanInterval = "MONTH" 19571 // Year interval. 19572 SellingPlanIntervalYear SellingPlanInterval = "YEAR" 19573 ) 19574 19575 var AllSellingPlanInterval = []SellingPlanInterval{ 19576 SellingPlanIntervalDay, 19577 SellingPlanIntervalWeek, 19578 SellingPlanIntervalMonth, 19579 SellingPlanIntervalYear, 19580 } 19581 19582 func (e SellingPlanInterval) IsValid() bool { 19583 switch e { 19584 case SellingPlanIntervalDay, SellingPlanIntervalWeek, SellingPlanIntervalMonth, SellingPlanIntervalYear: 19585 return true 19586 } 19587 return false 19588 } 19589 19590 func (e SellingPlanInterval) String() string { 19591 return string(e) 19592 } 19593 19594 func (e *SellingPlanInterval) UnmarshalGQL(v interface{}) error { 19595 str, ok := v.(string) 19596 if !ok { 19597 return fmt.Errorf("enums must be strings") 19598 } 19599 19600 *e = SellingPlanInterval(str) 19601 if !e.IsValid() { 19602 return fmt.Errorf("%s is not a valid SellingPlanInterval", str) 19603 } 19604 return nil 19605 } 19606 19607 func (e SellingPlanInterval) MarshalGQL(w io.Writer) { 19608 fmt.Fprint(w, strconv.Quote(e.String())) 19609 } 19610 19611 // Represents a selling plan pricing policy adjustment type. 19612 type SellingPlanPricingPolicyAdjustmentType string 19613 19614 const ( 19615 // Percentage off adjustment. 19616 SellingPlanPricingPolicyAdjustmentTypePercentage SellingPlanPricingPolicyAdjustmentType = "PERCENTAGE" 19617 // Fixed amount off adjustment. 19618 SellingPlanPricingPolicyAdjustmentTypeFixedAmount SellingPlanPricingPolicyAdjustmentType = "FIXED_AMOUNT" 19619 // Price of the policy. 19620 SellingPlanPricingPolicyAdjustmentTypePrice SellingPlanPricingPolicyAdjustmentType = "PRICE" 19621 ) 19622 19623 var AllSellingPlanPricingPolicyAdjustmentType = []SellingPlanPricingPolicyAdjustmentType{ 19624 SellingPlanPricingPolicyAdjustmentTypePercentage, 19625 SellingPlanPricingPolicyAdjustmentTypeFixedAmount, 19626 SellingPlanPricingPolicyAdjustmentTypePrice, 19627 } 19628 19629 func (e SellingPlanPricingPolicyAdjustmentType) IsValid() bool { 19630 switch e { 19631 case SellingPlanPricingPolicyAdjustmentTypePercentage, SellingPlanPricingPolicyAdjustmentTypeFixedAmount, SellingPlanPricingPolicyAdjustmentTypePrice: 19632 return true 19633 } 19634 return false 19635 } 19636 19637 func (e SellingPlanPricingPolicyAdjustmentType) String() string { 19638 return string(e) 19639 } 19640 19641 func (e *SellingPlanPricingPolicyAdjustmentType) UnmarshalGQL(v interface{}) error { 19642 str, ok := v.(string) 19643 if !ok { 19644 return fmt.Errorf("enums must be strings") 19645 } 19646 19647 *e = SellingPlanPricingPolicyAdjustmentType(str) 19648 if !e.IsValid() { 19649 return fmt.Errorf("%s is not a valid SellingPlanPricingPolicyAdjustmentType", str) 19650 } 19651 return nil 19652 } 19653 19654 func (e SellingPlanPricingPolicyAdjustmentType) MarshalGQL(w io.Writer) { 19655 fmt.Fprint(w, strconv.Quote(e.String())) 19656 } 19657 19658 // Possible intentions of a Delivery Policy. 19659 type SellingPlanRecurringDeliveryPolicyIntent string 19660 19661 const ( 19662 // A merchant-centric delivery policy. Mark this delivery policy to define when the merchant should start fulfillment. 19663 SellingPlanRecurringDeliveryPolicyIntentFulfillmentBegin SellingPlanRecurringDeliveryPolicyIntent = "FULFILLMENT_BEGIN" 19664 ) 19665 19666 var AllSellingPlanRecurringDeliveryPolicyIntent = []SellingPlanRecurringDeliveryPolicyIntent{ 19667 SellingPlanRecurringDeliveryPolicyIntentFulfillmentBegin, 19668 } 19669 19670 func (e SellingPlanRecurringDeliveryPolicyIntent) IsValid() bool { 19671 switch e { 19672 case SellingPlanRecurringDeliveryPolicyIntentFulfillmentBegin: 19673 return true 19674 } 19675 return false 19676 } 19677 19678 func (e SellingPlanRecurringDeliveryPolicyIntent) String() string { 19679 return string(e) 19680 } 19681 19682 func (e *SellingPlanRecurringDeliveryPolicyIntent) UnmarshalGQL(v interface{}) error { 19683 str, ok := v.(string) 19684 if !ok { 19685 return fmt.Errorf("enums must be strings") 19686 } 19687 19688 *e = SellingPlanRecurringDeliveryPolicyIntent(str) 19689 if !e.IsValid() { 19690 return fmt.Errorf("%s is not a valid SellingPlanRecurringDeliveryPolicyIntent", str) 19691 } 19692 return nil 19693 } 19694 19695 func (e SellingPlanRecurringDeliveryPolicyIntent) MarshalGQL(w io.Writer) { 19696 fmt.Fprint(w, strconv.Quote(e.String())) 19697 } 19698 19699 // Possible fulfillment or delivery behaviors of the first fulfillment when the orderis placed before the anchor. 19700 type SellingPlanRecurringDeliveryPolicyPreAnchorBehavior string 19701 19702 const ( 19703 // Orders placed can be fulfilled / delivered immediately. Orders placed inside a cutoff can be fulfilled / delivered at the next anchor. 19704 SellingPlanRecurringDeliveryPolicyPreAnchorBehaviorAsap SellingPlanRecurringDeliveryPolicyPreAnchorBehavior = "ASAP" 19705 // Orders placed can be fulfilled / delivered at the next anchor date. Ordersplaced inside a cutoff will skip the next anchor and can be fulfilled / delivered at the following anchor. 19706 SellingPlanRecurringDeliveryPolicyPreAnchorBehaviorNext SellingPlanRecurringDeliveryPolicyPreAnchorBehavior = "NEXT" 19707 ) 19708 19709 var AllSellingPlanRecurringDeliveryPolicyPreAnchorBehavior = []SellingPlanRecurringDeliveryPolicyPreAnchorBehavior{ 19710 SellingPlanRecurringDeliveryPolicyPreAnchorBehaviorAsap, 19711 SellingPlanRecurringDeliveryPolicyPreAnchorBehaviorNext, 19712 } 19713 19714 func (e SellingPlanRecurringDeliveryPolicyPreAnchorBehavior) IsValid() bool { 19715 switch e { 19716 case SellingPlanRecurringDeliveryPolicyPreAnchorBehaviorAsap, SellingPlanRecurringDeliveryPolicyPreAnchorBehaviorNext: 19717 return true 19718 } 19719 return false 19720 } 19721 19722 func (e SellingPlanRecurringDeliveryPolicyPreAnchorBehavior) String() string { 19723 return string(e) 19724 } 19725 19726 func (e *SellingPlanRecurringDeliveryPolicyPreAnchorBehavior) UnmarshalGQL(v interface{}) error { 19727 str, ok := v.(string) 19728 if !ok { 19729 return fmt.Errorf("enums must be strings") 19730 } 19731 19732 *e = SellingPlanRecurringDeliveryPolicyPreAnchorBehavior(str) 19733 if !e.IsValid() { 19734 return fmt.Errorf("%s is not a valid SellingPlanRecurringDeliveryPolicyPreAnchorBehavior", str) 19735 } 19736 return nil 19737 } 19738 19739 func (e SellingPlanRecurringDeliveryPolicyPreAnchorBehavior) MarshalGQL(w io.Writer) { 19740 fmt.Fprint(w, strconv.Quote(e.String())) 19741 } 19742 19743 // Possible branding of a shop. 19744 // Branding can be used to define the look of a shop including its styling and logo in the Shopify Admin. 19745 type ShopBranding string 19746 19747 const ( 19748 // Shop has Shopify Gold branding. 19749 ShopBrandingShopifyGold ShopBranding = "SHOPIFY_GOLD" 19750 // Shop has Shopify Plus branding. 19751 ShopBrandingShopifyPlus ShopBranding = "SHOPIFY_PLUS" 19752 // Shop has Rogers branding. 19753 ShopBrandingRogers ShopBranding = "ROGERS" 19754 // Shop has Shopify branding. 19755 ShopBrandingShopify ShopBranding = "SHOPIFY" 19756 ) 19757 19758 var AllShopBranding = []ShopBranding{ 19759 ShopBrandingShopifyGold, 19760 ShopBrandingShopifyPlus, 19761 ShopBrandingRogers, 19762 ShopBrandingShopify, 19763 } 19764 19765 func (e ShopBranding) IsValid() bool { 19766 switch e { 19767 case ShopBrandingShopifyGold, ShopBrandingShopifyPlus, ShopBrandingRogers, ShopBrandingShopify: 19768 return true 19769 } 19770 return false 19771 } 19772 19773 func (e ShopBranding) String() string { 19774 return string(e) 19775 } 19776 19777 func (e *ShopBranding) UnmarshalGQL(v interface{}) error { 19778 str, ok := v.(string) 19779 if !ok { 19780 return fmt.Errorf("enums must be strings") 19781 } 19782 19783 *e = ShopBranding(str) 19784 if !e.IsValid() { 19785 return fmt.Errorf("%s is not a valid ShopBranding", str) 19786 } 19787 return nil 19788 } 19789 19790 func (e ShopBranding) MarshalGQL(w io.Writer) { 19791 fmt.Fprint(w, strconv.Quote(e.String())) 19792 } 19793 19794 // Represents the shop's customer account requirement preference. 19795 type ShopCustomerAccountsSetting string 19796 19797 const ( 19798 ShopCustomerAccountsSettingRequired ShopCustomerAccountsSetting = "REQUIRED" 19799 ShopCustomerAccountsSettingOptional ShopCustomerAccountsSetting = "OPTIONAL" 19800 ShopCustomerAccountsSettingDisabled ShopCustomerAccountsSetting = "DISABLED" 19801 ) 19802 19803 var AllShopCustomerAccountsSetting = []ShopCustomerAccountsSetting{ 19804 ShopCustomerAccountsSettingRequired, 19805 ShopCustomerAccountsSettingOptional, 19806 ShopCustomerAccountsSettingDisabled, 19807 } 19808 19809 func (e ShopCustomerAccountsSetting) IsValid() bool { 19810 switch e { 19811 case ShopCustomerAccountsSettingRequired, ShopCustomerAccountsSettingOptional, ShopCustomerAccountsSettingDisabled: 19812 return true 19813 } 19814 return false 19815 } 19816 19817 func (e ShopCustomerAccountsSetting) String() string { 19818 return string(e) 19819 } 19820 19821 func (e *ShopCustomerAccountsSetting) UnmarshalGQL(v interface{}) error { 19822 str, ok := v.(string) 19823 if !ok { 19824 return fmt.Errorf("enums must be strings") 19825 } 19826 19827 *e = ShopCustomerAccountsSetting(str) 19828 if !e.IsValid() { 19829 return fmt.Errorf("%s is not a valid ShopCustomerAccountsSetting", str) 19830 } 19831 return nil 19832 } 19833 19834 func (e ShopCustomerAccountsSetting) MarshalGQL(w io.Writer) { 19835 fmt.Fprint(w, strconv.Quote(e.String())) 19836 } 19837 19838 // The set of valid sort keys for the ShopImage query. 19839 type ShopImageSortKeys string 19840 19841 const ( 19842 // Sort by the `created_at` value. 19843 ShopImageSortKeysCreatedAt ShopImageSortKeys = "CREATED_AT" 19844 // Sort by the `id` value. 19845 ShopImageSortKeysID ShopImageSortKeys = "ID" 19846 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 19847 // results by relevance to the search term(s). When no search query is specified, this sort key is not 19848 // deterministic and should not be used. 19849 ShopImageSortKeysRelevance ShopImageSortKeys = "RELEVANCE" 19850 ) 19851 19852 var AllShopImageSortKeys = []ShopImageSortKeys{ 19853 ShopImageSortKeysCreatedAt, 19854 ShopImageSortKeysID, 19855 ShopImageSortKeysRelevance, 19856 } 19857 19858 func (e ShopImageSortKeys) IsValid() bool { 19859 switch e { 19860 case ShopImageSortKeysCreatedAt, ShopImageSortKeysID, ShopImageSortKeysRelevance: 19861 return true 19862 } 19863 return false 19864 } 19865 19866 func (e ShopImageSortKeys) String() string { 19867 return string(e) 19868 } 19869 19870 func (e *ShopImageSortKeys) UnmarshalGQL(v interface{}) error { 19871 str, ok := v.(string) 19872 if !ok { 19873 return fmt.Errorf("enums must be strings") 19874 } 19875 19876 *e = ShopImageSortKeys(str) 19877 if !e.IsValid() { 19878 return fmt.Errorf("%s is not a valid ShopImageSortKeys", str) 19879 } 19880 return nil 19881 } 19882 19883 func (e ShopImageSortKeys) MarshalGQL(w io.Writer) { 19884 fmt.Fprint(w, strconv.Quote(e.String())) 19885 } 19886 19887 // Possible error codes that could be returned by ShopPolicyUserError. 19888 type ShopPolicyErrorCode string 19889 19890 const ( 19891 // Input value is too big. 19892 ShopPolicyErrorCodeTooBig ShopPolicyErrorCode = "TOO_BIG" 19893 ) 19894 19895 var AllShopPolicyErrorCode = []ShopPolicyErrorCode{ 19896 ShopPolicyErrorCodeTooBig, 19897 } 19898 19899 func (e ShopPolicyErrorCode) IsValid() bool { 19900 switch e { 19901 case ShopPolicyErrorCodeTooBig: 19902 return true 19903 } 19904 return false 19905 } 19906 19907 func (e ShopPolicyErrorCode) String() string { 19908 return string(e) 19909 } 19910 19911 func (e *ShopPolicyErrorCode) UnmarshalGQL(v interface{}) error { 19912 str, ok := v.(string) 19913 if !ok { 19914 return fmt.Errorf("enums must be strings") 19915 } 19916 19917 *e = ShopPolicyErrorCode(str) 19918 if !e.IsValid() { 19919 return fmt.Errorf("%s is not a valid ShopPolicyErrorCode", str) 19920 } 19921 return nil 19922 } 19923 19924 func (e ShopPolicyErrorCode) MarshalGQL(w io.Writer) { 19925 fmt.Fprint(w, strconv.Quote(e.String())) 19926 } 19927 19928 // Available shop policy types. 19929 type ShopPolicyType string 19930 19931 const ( 19932 // The Refund policy. 19933 ShopPolicyTypeRefundPolicy ShopPolicyType = "REFUND_POLICY" 19934 // The Shipping policy. 19935 ShopPolicyTypeShippingPolicy ShopPolicyType = "SHIPPING_POLICY" 19936 // The Privacy policy. 19937 ShopPolicyTypePrivacyPolicy ShopPolicyType = "PRIVACY_POLICY" 19938 // The Terms of service. 19939 ShopPolicyTypeTermsOfService ShopPolicyType = "TERMS_OF_SERVICE" 19940 // The Terms of sale. 19941 ShopPolicyTypeTermsOfSale ShopPolicyType = "TERMS_OF_SALE" 19942 // The Legal notice. 19943 ShopPolicyTypeLegalNotice ShopPolicyType = "LEGAL_NOTICE" 19944 ) 19945 19946 var AllShopPolicyType = []ShopPolicyType{ 19947 ShopPolicyTypeRefundPolicy, 19948 ShopPolicyTypeShippingPolicy, 19949 ShopPolicyTypePrivacyPolicy, 19950 ShopPolicyTypeTermsOfService, 19951 ShopPolicyTypeTermsOfSale, 19952 ShopPolicyTypeLegalNotice, 19953 } 19954 19955 func (e ShopPolicyType) IsValid() bool { 19956 switch e { 19957 case ShopPolicyTypeRefundPolicy, ShopPolicyTypeShippingPolicy, ShopPolicyTypePrivacyPolicy, ShopPolicyTypeTermsOfService, ShopPolicyTypeTermsOfSale, ShopPolicyTypeLegalNotice: 19958 return true 19959 } 19960 return false 19961 } 19962 19963 func (e ShopPolicyType) String() string { 19964 return string(e) 19965 } 19966 19967 func (e *ShopPolicyType) UnmarshalGQL(v interface{}) error { 19968 str, ok := v.(string) 19969 if !ok { 19970 return fmt.Errorf("enums must be strings") 19971 } 19972 19973 *e = ShopPolicyType(str) 19974 if !e.IsValid() { 19975 return fmt.Errorf("%s is not a valid ShopPolicyType", str) 19976 } 19977 return nil 19978 } 19979 19980 func (e ShopPolicyType) MarshalGQL(w io.Writer) { 19981 fmt.Fprint(w, strconv.Quote(e.String())) 19982 } 19983 19984 // Possible sort of tags. 19985 type ShopTagSort string 19986 19987 const ( 19988 // Alphabetical sort. 19989 ShopTagSortAlphabetical ShopTagSort = "ALPHABETICAL" 19990 // Popularity sort. 19991 ShopTagSortPopular ShopTagSort = "POPULAR" 19992 ) 19993 19994 var AllShopTagSort = []ShopTagSort{ 19995 ShopTagSortAlphabetical, 19996 ShopTagSortPopular, 19997 } 19998 19999 func (e ShopTagSort) IsValid() bool { 20000 switch e { 20001 case ShopTagSortAlphabetical, ShopTagSortPopular: 20002 return true 20003 } 20004 return false 20005 } 20006 20007 func (e ShopTagSort) String() string { 20008 return string(e) 20009 } 20010 20011 func (e *ShopTagSort) UnmarshalGQL(v interface{}) error { 20012 str, ok := v.(string) 20013 if !ok { 20014 return fmt.Errorf("enums must be strings") 20015 } 20016 20017 *e = ShopTagSort(str) 20018 if !e.IsValid() { 20019 return fmt.Errorf("%s is not a valid ShopTagSort", str) 20020 } 20021 return nil 20022 } 20023 20024 func (e ShopTagSort) MarshalGQL(w io.Writer) { 20025 fmt.Fprint(w, strconv.Quote(e.String())) 20026 } 20027 20028 // The bank account status. 20029 type ShopifyPaymentsBankAccountStatus string 20030 20031 const ( 20032 // A bank account that hasn't had any activity and that's not validated. 20033 ShopifyPaymentsBankAccountStatusNew ShopifyPaymentsBankAccountStatus = "NEW" 20034 // It was determined that the bank account exists. 20035 ShopifyPaymentsBankAccountStatusValidated ShopifyPaymentsBankAccountStatus = "VALIDATED" 20036 // Bank account validation was successful. 20037 ShopifyPaymentsBankAccountStatusVerified ShopifyPaymentsBankAccountStatus = "VERIFIED" 20038 // A payout to the bank account failed. 20039 ShopifyPaymentsBankAccountStatusErrored ShopifyPaymentsBankAccountStatus = "ERRORED" 20040 ) 20041 20042 var AllShopifyPaymentsBankAccountStatus = []ShopifyPaymentsBankAccountStatus{ 20043 ShopifyPaymentsBankAccountStatusNew, 20044 ShopifyPaymentsBankAccountStatusValidated, 20045 ShopifyPaymentsBankAccountStatusVerified, 20046 ShopifyPaymentsBankAccountStatusErrored, 20047 } 20048 20049 func (e ShopifyPaymentsBankAccountStatus) IsValid() bool { 20050 switch e { 20051 case ShopifyPaymentsBankAccountStatusNew, ShopifyPaymentsBankAccountStatusValidated, ShopifyPaymentsBankAccountStatusVerified, ShopifyPaymentsBankAccountStatusErrored: 20052 return true 20053 } 20054 return false 20055 } 20056 20057 func (e ShopifyPaymentsBankAccountStatus) String() string { 20058 return string(e) 20059 } 20060 20061 func (e *ShopifyPaymentsBankAccountStatus) UnmarshalGQL(v interface{}) error { 20062 str, ok := v.(string) 20063 if !ok { 20064 return fmt.Errorf("enums must be strings") 20065 } 20066 20067 *e = ShopifyPaymentsBankAccountStatus(str) 20068 if !e.IsValid() { 20069 return fmt.Errorf("%s is not a valid ShopifyPaymentsBankAccountStatus", str) 20070 } 20071 return nil 20072 } 20073 20074 func (e ShopifyPaymentsBankAccountStatus) MarshalGQL(w io.Writer) { 20075 fmt.Fprint(w, strconv.Quote(e.String())) 20076 } 20077 20078 // The reason for the dispute provided by the cardholder's bank. 20079 type ShopifyPaymentsDisputeReason string 20080 20081 const ( 20082 // The cardholder claims that they didn’t authorize the payment. 20083 ShopifyPaymentsDisputeReasonFraudulent ShopifyPaymentsDisputeReason = "FRAUDULENT" 20084 // The dispute is uncategorized, so you should contact the customer for additional details to find out why the payment was disputed. 20085 ShopifyPaymentsDisputeReasonGeneral ShopifyPaymentsDisputeReason = "GENERAL" 20086 // The customer doesn’t recognize the payment appearing on their card statement. 20087 ShopifyPaymentsDisputeReasonUnrecognized ShopifyPaymentsDisputeReason = "UNRECOGNIZED" 20088 // The customer claims they were charged multiple times for the same product or service. 20089 ShopifyPaymentsDisputeReasonDuplicate ShopifyPaymentsDisputeReason = "DUPLICATE" 20090 // The customer claims that you continued to charge them after a subscription was canceled. 20091 ShopifyPaymentsDisputeReasonSubscriptionCancelled ShopifyPaymentsDisputeReason = "SUBSCRIPTION_CANCELLED" 20092 // The product or service was received but was defective, damaged, or not as described. 20093 ShopifyPaymentsDisputeReasonProductUnacceptable ShopifyPaymentsDisputeReason = "PRODUCT_UNACCEPTABLE" 20094 // The customer claims they did not receive the products or services purchased. 20095 ShopifyPaymentsDisputeReasonProductNotReceived ShopifyPaymentsDisputeReason = "PRODUCT_NOT_RECEIVED" 20096 // The customer claims that the purchased product was returned or the transaction was otherwise canceled, but you have not yet provided a refund or credit. 20097 ShopifyPaymentsDisputeReasonCreditNotProcessed ShopifyPaymentsDisputeReason = "CREDIT_NOT_PROCESSED" 20098 // The customer account associated with the purchase is incorrect. 20099 ShopifyPaymentsDisputeReasonIncorrectAccountDetails ShopifyPaymentsDisputeReason = "INCORRECT_ACCOUNT_DETAILS" 20100 // The customer's bank account has insufficient funds. 20101 ShopifyPaymentsDisputeReasonInsufficientFunds ShopifyPaymentsDisputeReason = "INSUFFICIENT_FUNDS" 20102 // The customer's bank cannot process the charge. 20103 ShopifyPaymentsDisputeReasonBankCannotProcess ShopifyPaymentsDisputeReason = "BANK_CANNOT_PROCESS" 20104 // The customer's bank cannot proceed with the debit since it has not been authorized. 20105 ShopifyPaymentsDisputeReasonDebitNotAuthorized ShopifyPaymentsDisputeReason = "DEBIT_NOT_AUTHORIZED" 20106 // The customer initiated the dispute, so you should contact the customer for additional details to find out why the payment was disputed. 20107 ShopifyPaymentsDisputeReasonCustomerInitiated ShopifyPaymentsDisputeReason = "CUSTOMER_INITIATED" 20108 ) 20109 20110 var AllShopifyPaymentsDisputeReason = []ShopifyPaymentsDisputeReason{ 20111 ShopifyPaymentsDisputeReasonFraudulent, 20112 ShopifyPaymentsDisputeReasonGeneral, 20113 ShopifyPaymentsDisputeReasonUnrecognized, 20114 ShopifyPaymentsDisputeReasonDuplicate, 20115 ShopifyPaymentsDisputeReasonSubscriptionCancelled, 20116 ShopifyPaymentsDisputeReasonProductUnacceptable, 20117 ShopifyPaymentsDisputeReasonProductNotReceived, 20118 ShopifyPaymentsDisputeReasonCreditNotProcessed, 20119 ShopifyPaymentsDisputeReasonIncorrectAccountDetails, 20120 ShopifyPaymentsDisputeReasonInsufficientFunds, 20121 ShopifyPaymentsDisputeReasonBankCannotProcess, 20122 ShopifyPaymentsDisputeReasonDebitNotAuthorized, 20123 ShopifyPaymentsDisputeReasonCustomerInitiated, 20124 } 20125 20126 func (e ShopifyPaymentsDisputeReason) IsValid() bool { 20127 switch e { 20128 case ShopifyPaymentsDisputeReasonFraudulent, ShopifyPaymentsDisputeReasonGeneral, ShopifyPaymentsDisputeReasonUnrecognized, ShopifyPaymentsDisputeReasonDuplicate, ShopifyPaymentsDisputeReasonSubscriptionCancelled, ShopifyPaymentsDisputeReasonProductUnacceptable, ShopifyPaymentsDisputeReasonProductNotReceived, ShopifyPaymentsDisputeReasonCreditNotProcessed, ShopifyPaymentsDisputeReasonIncorrectAccountDetails, ShopifyPaymentsDisputeReasonInsufficientFunds, ShopifyPaymentsDisputeReasonBankCannotProcess, ShopifyPaymentsDisputeReasonDebitNotAuthorized, ShopifyPaymentsDisputeReasonCustomerInitiated: 20129 return true 20130 } 20131 return false 20132 } 20133 20134 func (e ShopifyPaymentsDisputeReason) String() string { 20135 return string(e) 20136 } 20137 20138 func (e *ShopifyPaymentsDisputeReason) UnmarshalGQL(v interface{}) error { 20139 str, ok := v.(string) 20140 if !ok { 20141 return fmt.Errorf("enums must be strings") 20142 } 20143 20144 *e = ShopifyPaymentsDisputeReason(str) 20145 if !e.IsValid() { 20146 return fmt.Errorf("%s is not a valid ShopifyPaymentsDisputeReason", str) 20147 } 20148 return nil 20149 } 20150 20151 func (e ShopifyPaymentsDisputeReason) MarshalGQL(w io.Writer) { 20152 fmt.Fprint(w, strconv.Quote(e.String())) 20153 } 20154 20155 // The interval at which payouts are sent to the connected bank account. 20156 type ShopifyPaymentsPayoutInterval string 20157 20158 const ( 20159 // Each business day. 20160 ShopifyPaymentsPayoutIntervalDaily ShopifyPaymentsPayoutInterval = "DAILY" 20161 // Each week, on the day of week specified by weeklyAnchor. 20162 ShopifyPaymentsPayoutIntervalWeekly ShopifyPaymentsPayoutInterval = "WEEKLY" 20163 // Each month, on the day of month specified by monthlyAnchor. 20164 ShopifyPaymentsPayoutIntervalMonthly ShopifyPaymentsPayoutInterval = "MONTHLY" 20165 // Payouts will not be automatically made. 20166 ShopifyPaymentsPayoutIntervalManual ShopifyPaymentsPayoutInterval = "MANUAL" 20167 ) 20168 20169 var AllShopifyPaymentsPayoutInterval = []ShopifyPaymentsPayoutInterval{ 20170 ShopifyPaymentsPayoutIntervalDaily, 20171 ShopifyPaymentsPayoutIntervalWeekly, 20172 ShopifyPaymentsPayoutIntervalMonthly, 20173 ShopifyPaymentsPayoutIntervalManual, 20174 } 20175 20176 func (e ShopifyPaymentsPayoutInterval) IsValid() bool { 20177 switch e { 20178 case ShopifyPaymentsPayoutIntervalDaily, ShopifyPaymentsPayoutIntervalWeekly, ShopifyPaymentsPayoutIntervalMonthly, ShopifyPaymentsPayoutIntervalManual: 20179 return true 20180 } 20181 return false 20182 } 20183 20184 func (e ShopifyPaymentsPayoutInterval) String() string { 20185 return string(e) 20186 } 20187 20188 func (e *ShopifyPaymentsPayoutInterval) UnmarshalGQL(v interface{}) error { 20189 str, ok := v.(string) 20190 if !ok { 20191 return fmt.Errorf("enums must be strings") 20192 } 20193 20194 *e = ShopifyPaymentsPayoutInterval(str) 20195 if !e.IsValid() { 20196 return fmt.Errorf("%s is not a valid ShopifyPaymentsPayoutInterval", str) 20197 } 20198 return nil 20199 } 20200 20201 func (e ShopifyPaymentsPayoutInterval) MarshalGQL(w io.Writer) { 20202 fmt.Fprint(w, strconv.Quote(e.String())) 20203 } 20204 20205 // The transfer status of the payout. 20206 type ShopifyPaymentsPayoutStatus string 20207 20208 const ( 20209 // The payout has been created and had transactions assigned to it, but 20210 // it has not yet been submitted to the bank. 20211 ShopifyPaymentsPayoutStatusScheduled ShopifyPaymentsPayoutStatus = "SCHEDULED" 20212 // The payout has been submitted to the bank. 20213 ShopifyPaymentsPayoutStatusInTransit ShopifyPaymentsPayoutStatus = "IN_TRANSIT" 20214 // The payout has been successfully deposited into the bank. 20215 ShopifyPaymentsPayoutStatusPaid ShopifyPaymentsPayoutStatus = "PAID" 20216 // The payout has been declined by the bank. 20217 ShopifyPaymentsPayoutStatusFailed ShopifyPaymentsPayoutStatus = "FAILED" 20218 // The payout has been canceled by Shopify. 20219 ShopifyPaymentsPayoutStatusCanceled ShopifyPaymentsPayoutStatus = "CANCELED" 20220 ) 20221 20222 var AllShopifyPaymentsPayoutStatus = []ShopifyPaymentsPayoutStatus{ 20223 ShopifyPaymentsPayoutStatusScheduled, 20224 ShopifyPaymentsPayoutStatusInTransit, 20225 ShopifyPaymentsPayoutStatusPaid, 20226 ShopifyPaymentsPayoutStatusFailed, 20227 ShopifyPaymentsPayoutStatusCanceled, 20228 } 20229 20230 func (e ShopifyPaymentsPayoutStatus) IsValid() bool { 20231 switch e { 20232 case ShopifyPaymentsPayoutStatusScheduled, ShopifyPaymentsPayoutStatusInTransit, ShopifyPaymentsPayoutStatusPaid, ShopifyPaymentsPayoutStatusFailed, ShopifyPaymentsPayoutStatusCanceled: 20233 return true 20234 } 20235 return false 20236 } 20237 20238 func (e ShopifyPaymentsPayoutStatus) String() string { 20239 return string(e) 20240 } 20241 20242 func (e *ShopifyPaymentsPayoutStatus) UnmarshalGQL(v interface{}) error { 20243 str, ok := v.(string) 20244 if !ok { 20245 return fmt.Errorf("enums must be strings") 20246 } 20247 20248 *e = ShopifyPaymentsPayoutStatus(str) 20249 if !e.IsValid() { 20250 return fmt.Errorf("%s is not a valid ShopifyPaymentsPayoutStatus", str) 20251 } 20252 return nil 20253 } 20254 20255 func (e ShopifyPaymentsPayoutStatus) MarshalGQL(w io.Writer) { 20256 fmt.Fprint(w, strconv.Quote(e.String())) 20257 } 20258 20259 // The possible transaction types for a payout. 20260 type ShopifyPaymentsPayoutTransactionType string 20261 20262 const ( 20263 // The payout is a deposit. 20264 ShopifyPaymentsPayoutTransactionTypeDeposit ShopifyPaymentsPayoutTransactionType = "DEPOSIT" 20265 // The payout is a withdrawal. 20266 ShopifyPaymentsPayoutTransactionTypeWithdrawal ShopifyPaymentsPayoutTransactionType = "WITHDRAWAL" 20267 ) 20268 20269 var AllShopifyPaymentsPayoutTransactionType = []ShopifyPaymentsPayoutTransactionType{ 20270 ShopifyPaymentsPayoutTransactionTypeDeposit, 20271 ShopifyPaymentsPayoutTransactionTypeWithdrawal, 20272 } 20273 20274 func (e ShopifyPaymentsPayoutTransactionType) IsValid() bool { 20275 switch e { 20276 case ShopifyPaymentsPayoutTransactionTypeDeposit, ShopifyPaymentsPayoutTransactionTypeWithdrawal: 20277 return true 20278 } 20279 return false 20280 } 20281 20282 func (e ShopifyPaymentsPayoutTransactionType) String() string { 20283 return string(e) 20284 } 20285 20286 func (e *ShopifyPaymentsPayoutTransactionType) UnmarshalGQL(v interface{}) error { 20287 str, ok := v.(string) 20288 if !ok { 20289 return fmt.Errorf("enums must be strings") 20290 } 20291 20292 *e = ShopifyPaymentsPayoutTransactionType(str) 20293 if !e.IsValid() { 20294 return fmt.Errorf("%s is not a valid ShopifyPaymentsPayoutTransactionType", str) 20295 } 20296 return nil 20297 } 20298 20299 func (e ShopifyPaymentsPayoutTransactionType) MarshalGQL(w io.Writer) { 20300 fmt.Fprint(w, strconv.Quote(e.String())) 20301 } 20302 20303 // The types of possible verification documents. 20304 type ShopifyPaymentsVerificationDocumentType string 20305 20306 const ( 20307 // The subject's driver's license. 20308 ShopifyPaymentsVerificationDocumentTypeDriversLicense ShopifyPaymentsVerificationDocumentType = "DRIVERS_LICENSE" 20309 // A government's identification document of the subject. 20310 ShopifyPaymentsVerificationDocumentTypeGovernmentIDEntification ShopifyPaymentsVerificationDocumentType = "GOVERNMENT_IDENTIFICATION" 20311 // The subject's passport. 20312 ShopifyPaymentsVerificationDocumentTypePassport ShopifyPaymentsVerificationDocumentType = "PASSPORT" 20313 ) 20314 20315 var AllShopifyPaymentsVerificationDocumentType = []ShopifyPaymentsVerificationDocumentType{ 20316 ShopifyPaymentsVerificationDocumentTypeDriversLicense, 20317 ShopifyPaymentsVerificationDocumentTypeGovernmentIDEntification, 20318 ShopifyPaymentsVerificationDocumentTypePassport, 20319 } 20320 20321 func (e ShopifyPaymentsVerificationDocumentType) IsValid() bool { 20322 switch e { 20323 case ShopifyPaymentsVerificationDocumentTypeDriversLicense, ShopifyPaymentsVerificationDocumentTypeGovernmentIDEntification, ShopifyPaymentsVerificationDocumentTypePassport: 20324 return true 20325 } 20326 return false 20327 } 20328 20329 func (e ShopifyPaymentsVerificationDocumentType) String() string { 20330 return string(e) 20331 } 20332 20333 func (e *ShopifyPaymentsVerificationDocumentType) UnmarshalGQL(v interface{}) error { 20334 str, ok := v.(string) 20335 if !ok { 20336 return fmt.Errorf("enums must be strings") 20337 } 20338 20339 *e = ShopifyPaymentsVerificationDocumentType(str) 20340 if !e.IsValid() { 20341 return fmt.Errorf("%s is not a valid ShopifyPaymentsVerificationDocumentType", str) 20342 } 20343 return nil 20344 } 20345 20346 func (e ShopifyPaymentsVerificationDocumentType) MarshalGQL(w io.Writer) { 20347 fmt.Fprint(w, strconv.Quote(e.String())) 20348 } 20349 20350 // The status of a verification. 20351 type ShopifyPaymentsVerificationStatus string 20352 20353 const ( 20354 // The verification has been verified. 20355 ShopifyPaymentsVerificationStatusVerified ShopifyPaymentsVerificationStatus = "VERIFIED" 20356 // The verification has not yet been verified. 20357 ShopifyPaymentsVerificationStatusUnverified ShopifyPaymentsVerificationStatus = "UNVERIFIED" 20358 // The verification request has been submitted but a response has not yet been given. 20359 ShopifyPaymentsVerificationStatusPending ShopifyPaymentsVerificationStatus = "PENDING" 20360 ) 20361 20362 var AllShopifyPaymentsVerificationStatus = []ShopifyPaymentsVerificationStatus{ 20363 ShopifyPaymentsVerificationStatusVerified, 20364 ShopifyPaymentsVerificationStatusUnverified, 20365 ShopifyPaymentsVerificationStatusPending, 20366 } 20367 20368 func (e ShopifyPaymentsVerificationStatus) IsValid() bool { 20369 switch e { 20370 case ShopifyPaymentsVerificationStatusVerified, ShopifyPaymentsVerificationStatusUnverified, ShopifyPaymentsVerificationStatusPending: 20371 return true 20372 } 20373 return false 20374 } 20375 20376 func (e ShopifyPaymentsVerificationStatus) String() string { 20377 return string(e) 20378 } 20379 20380 func (e *ShopifyPaymentsVerificationStatus) UnmarshalGQL(v interface{}) error { 20381 str, ok := v.(string) 20382 if !ok { 20383 return fmt.Errorf("enums must be strings") 20384 } 20385 20386 *e = ShopifyPaymentsVerificationStatus(str) 20387 if !e.IsValid() { 20388 return fmt.Errorf("%s is not a valid ShopifyPaymentsVerificationStatus", str) 20389 } 20390 return nil 20391 } 20392 20393 func (e ShopifyPaymentsVerificationStatus) MarshalGQL(w io.Writer) { 20394 fmt.Fprint(w, strconv.Quote(e.String())) 20395 } 20396 20397 // Possible HTTP method of a staged upload target. 20398 type StagedUploadHTTPMethodType string 20399 20400 const ( 20401 // The POST HTTP method. 20402 StagedUploadHTTPMethodTypePost StagedUploadHTTPMethodType = "POST" 20403 // The PUT HTTP method. 20404 StagedUploadHTTPMethodTypePut StagedUploadHTTPMethodType = "PUT" 20405 ) 20406 20407 var AllStagedUploadHTTPMethodType = []StagedUploadHTTPMethodType{ 20408 StagedUploadHTTPMethodTypePost, 20409 StagedUploadHTTPMethodTypePut, 20410 } 20411 20412 func (e StagedUploadHTTPMethodType) IsValid() bool { 20413 switch e { 20414 case StagedUploadHTTPMethodTypePost, StagedUploadHTTPMethodTypePut: 20415 return true 20416 } 20417 return false 20418 } 20419 20420 func (e StagedUploadHTTPMethodType) String() string { 20421 return string(e) 20422 } 20423 20424 func (e *StagedUploadHTTPMethodType) UnmarshalGQL(v interface{}) error { 20425 str, ok := v.(string) 20426 if !ok { 20427 return fmt.Errorf("enums must be strings") 20428 } 20429 20430 *e = StagedUploadHTTPMethodType(str) 20431 if !e.IsValid() { 20432 return fmt.Errorf("%s is not a valid StagedUploadHttpMethodType", str) 20433 } 20434 return nil 20435 } 20436 20437 func (e StagedUploadHTTPMethodType) MarshalGQL(w io.Writer) { 20438 fmt.Fprint(w, strconv.Quote(e.String())) 20439 } 20440 20441 // Specifies the resource type to receive. 20442 type StagedUploadTargetGenerateUploadResource string 20443 20444 const ( 20445 // A timeline event. 20446 StagedUploadTargetGenerateUploadResourceTimeline StagedUploadTargetGenerateUploadResource = "TIMELINE" 20447 // A product image. 20448 StagedUploadTargetGenerateUploadResourceProductImage StagedUploadTargetGenerateUploadResource = "PRODUCT_IMAGE" 20449 // A collection image. 20450 StagedUploadTargetGenerateUploadResourceCollectionImage StagedUploadTargetGenerateUploadResource = "COLLECTION_IMAGE" 20451 // A shop image. 20452 StagedUploadTargetGenerateUploadResourceShopImage StagedUploadTargetGenerateUploadResource = "SHOP_IMAGE" 20453 // Merchandising::Video resource representation. 20454 StagedUploadTargetGenerateUploadResourceVideo StagedUploadTargetGenerateUploadResource = "VIDEO" 20455 // Merchandising::Model3d resource representation. 20456 StagedUploadTargetGenerateUploadResourceModel3d StagedUploadTargetGenerateUploadResource = "MODEL_3D" 20457 // Merchandising::Image resource representation. 20458 StagedUploadTargetGenerateUploadResourceImage StagedUploadTargetGenerateUploadResource = "IMAGE" 20459 ) 20460 20461 var AllStagedUploadTargetGenerateUploadResource = []StagedUploadTargetGenerateUploadResource{ 20462 StagedUploadTargetGenerateUploadResourceTimeline, 20463 StagedUploadTargetGenerateUploadResourceProductImage, 20464 StagedUploadTargetGenerateUploadResourceCollectionImage, 20465 StagedUploadTargetGenerateUploadResourceShopImage, 20466 StagedUploadTargetGenerateUploadResourceVideo, 20467 StagedUploadTargetGenerateUploadResourceModel3d, 20468 StagedUploadTargetGenerateUploadResourceImage, 20469 } 20470 20471 func (e StagedUploadTargetGenerateUploadResource) IsValid() bool { 20472 switch e { 20473 case StagedUploadTargetGenerateUploadResourceTimeline, StagedUploadTargetGenerateUploadResourceProductImage, StagedUploadTargetGenerateUploadResourceCollectionImage, StagedUploadTargetGenerateUploadResourceShopImage, StagedUploadTargetGenerateUploadResourceVideo, StagedUploadTargetGenerateUploadResourceModel3d, StagedUploadTargetGenerateUploadResourceImage: 20474 return true 20475 } 20476 return false 20477 } 20478 20479 func (e StagedUploadTargetGenerateUploadResource) String() string { 20480 return string(e) 20481 } 20482 20483 func (e *StagedUploadTargetGenerateUploadResource) UnmarshalGQL(v interface{}) error { 20484 str, ok := v.(string) 20485 if !ok { 20486 return fmt.Errorf("enums must be strings") 20487 } 20488 20489 *e = StagedUploadTargetGenerateUploadResource(str) 20490 if !e.IsValid() { 20491 return fmt.Errorf("%s is not a valid StagedUploadTargetGenerateUploadResource", str) 20492 } 20493 return nil 20494 } 20495 20496 func (e StagedUploadTargetGenerateUploadResource) MarshalGQL(w io.Writer) { 20497 fmt.Fprint(w, strconv.Quote(e.String())) 20498 } 20499 20500 // The possible error codes associated with making billing attempts. The error codes supplement the 20501 // `error_message` to provide consistent results and help with dunning management. 20502 type SubscriptionBillingAttemptErrorCode string 20503 20504 const ( 20505 // Payment method was not found. 20506 SubscriptionBillingAttemptErrorCodePaymentMethodNotFound SubscriptionBillingAttemptErrorCode = "PAYMENT_METHOD_NOT_FOUND" 20507 // Payment provider is not enabled. 20508 SubscriptionBillingAttemptErrorCodePaymentProviderIsNotEnabled SubscriptionBillingAttemptErrorCode = "PAYMENT_PROVIDER_IS_NOT_ENABLED" 20509 // Payment method is invalid. Please update or create a new payment method. 20510 SubscriptionBillingAttemptErrorCodeInvalidPaymentMethod SubscriptionBillingAttemptErrorCode = "INVALID_PAYMENT_METHOD" 20511 // There was an unexpected error during the billing attempt. 20512 SubscriptionBillingAttemptErrorCodeUnexpectedError SubscriptionBillingAttemptErrorCode = "UNEXPECTED_ERROR" 20513 // Payment method is expired. 20514 SubscriptionBillingAttemptErrorCodeExpiredPaymentMethod SubscriptionBillingAttemptErrorCode = "EXPIRED_PAYMENT_METHOD" 20515 // Payment method was declined by processor. 20516 SubscriptionBillingAttemptErrorCodePaymentMethodDeclined SubscriptionBillingAttemptErrorCode = "PAYMENT_METHOD_DECLINED" 20517 // There was an error during the authentication. 20518 SubscriptionBillingAttemptErrorCodeAuthenticationError SubscriptionBillingAttemptErrorCode = "AUTHENTICATION_ERROR" 20519 // Gateway is in test mode and attempted to bill a live payment method. 20520 SubscriptionBillingAttemptErrorCodeTestMode SubscriptionBillingAttemptErrorCode = "TEST_MODE" 20521 ) 20522 20523 var AllSubscriptionBillingAttemptErrorCode = []SubscriptionBillingAttemptErrorCode{ 20524 SubscriptionBillingAttemptErrorCodePaymentMethodNotFound, 20525 SubscriptionBillingAttemptErrorCodePaymentProviderIsNotEnabled, 20526 SubscriptionBillingAttemptErrorCodeInvalidPaymentMethod, 20527 SubscriptionBillingAttemptErrorCodeUnexpectedError, 20528 SubscriptionBillingAttemptErrorCodeExpiredPaymentMethod, 20529 SubscriptionBillingAttemptErrorCodePaymentMethodDeclined, 20530 SubscriptionBillingAttemptErrorCodeAuthenticationError, 20531 SubscriptionBillingAttemptErrorCodeTestMode, 20532 } 20533 20534 func (e SubscriptionBillingAttemptErrorCode) IsValid() bool { 20535 switch e { 20536 case SubscriptionBillingAttemptErrorCodePaymentMethodNotFound, SubscriptionBillingAttemptErrorCodePaymentProviderIsNotEnabled, SubscriptionBillingAttemptErrorCodeInvalidPaymentMethod, SubscriptionBillingAttemptErrorCodeUnexpectedError, SubscriptionBillingAttemptErrorCodeExpiredPaymentMethod, SubscriptionBillingAttemptErrorCodePaymentMethodDeclined, SubscriptionBillingAttemptErrorCodeAuthenticationError, SubscriptionBillingAttemptErrorCodeTestMode: 20537 return true 20538 } 20539 return false 20540 } 20541 20542 func (e SubscriptionBillingAttemptErrorCode) String() string { 20543 return string(e) 20544 } 20545 20546 func (e *SubscriptionBillingAttemptErrorCode) UnmarshalGQL(v interface{}) error { 20547 str, ok := v.(string) 20548 if !ok { 20549 return fmt.Errorf("enums must be strings") 20550 } 20551 20552 *e = SubscriptionBillingAttemptErrorCode(str) 20553 if !e.IsValid() { 20554 return fmt.Errorf("%s is not a valid SubscriptionBillingAttemptErrorCode", str) 20555 } 20556 return nil 20557 } 20558 20559 func (e SubscriptionBillingAttemptErrorCode) MarshalGQL(w io.Writer) { 20560 fmt.Fprint(w, strconv.Quote(e.String())) 20561 } 20562 20563 // Possible error codes that could be returned by SubscriptionContractUserError. 20564 type SubscriptionContractErrorCode string 20565 20566 const ( 20567 // Input value is invalid. 20568 SubscriptionContractErrorCodeInvalid SubscriptionContractErrorCode = "INVALID" 20569 ) 20570 20571 var AllSubscriptionContractErrorCode = []SubscriptionContractErrorCode{ 20572 SubscriptionContractErrorCodeInvalid, 20573 } 20574 20575 func (e SubscriptionContractErrorCode) IsValid() bool { 20576 switch e { 20577 case SubscriptionContractErrorCodeInvalid: 20578 return true 20579 } 20580 return false 20581 } 20582 20583 func (e SubscriptionContractErrorCode) String() string { 20584 return string(e) 20585 } 20586 20587 func (e *SubscriptionContractErrorCode) UnmarshalGQL(v interface{}) error { 20588 str, ok := v.(string) 20589 if !ok { 20590 return fmt.Errorf("enums must be strings") 20591 } 20592 20593 *e = SubscriptionContractErrorCode(str) 20594 if !e.IsValid() { 20595 return fmt.Errorf("%s is not a valid SubscriptionContractErrorCode", str) 20596 } 20597 return nil 20598 } 20599 20600 func (e SubscriptionContractErrorCode) MarshalGQL(w io.Writer) { 20601 fmt.Fprint(w, strconv.Quote(e.String())) 20602 } 20603 20604 // Possible status values of the last payment on a subscription contract. 20605 type SubscriptionContractLastPaymentStatus string 20606 20607 const ( 20608 // Successful subscription billing attempt. 20609 SubscriptionContractLastPaymentStatusSucceeded SubscriptionContractLastPaymentStatus = "SUCCEEDED" 20610 // Failed subscription billing attempt. 20611 SubscriptionContractLastPaymentStatusFailed SubscriptionContractLastPaymentStatus = "FAILED" 20612 ) 20613 20614 var AllSubscriptionContractLastPaymentStatus = []SubscriptionContractLastPaymentStatus{ 20615 SubscriptionContractLastPaymentStatusSucceeded, 20616 SubscriptionContractLastPaymentStatusFailed, 20617 } 20618 20619 func (e SubscriptionContractLastPaymentStatus) IsValid() bool { 20620 switch e { 20621 case SubscriptionContractLastPaymentStatusSucceeded, SubscriptionContractLastPaymentStatusFailed: 20622 return true 20623 } 20624 return false 20625 } 20626 20627 func (e SubscriptionContractLastPaymentStatus) String() string { 20628 return string(e) 20629 } 20630 20631 func (e *SubscriptionContractLastPaymentStatus) UnmarshalGQL(v interface{}) error { 20632 str, ok := v.(string) 20633 if !ok { 20634 return fmt.Errorf("enums must be strings") 20635 } 20636 20637 *e = SubscriptionContractLastPaymentStatus(str) 20638 if !e.IsValid() { 20639 return fmt.Errorf("%s is not a valid SubscriptionContractLastPaymentStatus", str) 20640 } 20641 return nil 20642 } 20643 20644 func (e SubscriptionContractLastPaymentStatus) MarshalGQL(w io.Writer) { 20645 fmt.Fprint(w, strconv.Quote(e.String())) 20646 } 20647 20648 // Possible status values of a subscription. 20649 type SubscriptionContractSubscriptionStatus string 20650 20651 const ( 20652 // Active subscription contract. 20653 SubscriptionContractSubscriptionStatusActive SubscriptionContractSubscriptionStatus = "ACTIVE" 20654 // Paused subscription contract. 20655 SubscriptionContractSubscriptionStatusPaused SubscriptionContractSubscriptionStatus = "PAUSED" 20656 // Cancelled subscription contract. 20657 SubscriptionContractSubscriptionStatusCancelled SubscriptionContractSubscriptionStatus = "CANCELLED" 20658 // Expired subscription contract. 20659 SubscriptionContractSubscriptionStatusExpired SubscriptionContractSubscriptionStatus = "EXPIRED" 20660 // Failed subscription contract. 20661 SubscriptionContractSubscriptionStatusFailed SubscriptionContractSubscriptionStatus = "FAILED" 20662 ) 20663 20664 var AllSubscriptionContractSubscriptionStatus = []SubscriptionContractSubscriptionStatus{ 20665 SubscriptionContractSubscriptionStatusActive, 20666 SubscriptionContractSubscriptionStatusPaused, 20667 SubscriptionContractSubscriptionStatusCancelled, 20668 SubscriptionContractSubscriptionStatusExpired, 20669 SubscriptionContractSubscriptionStatusFailed, 20670 } 20671 20672 func (e SubscriptionContractSubscriptionStatus) IsValid() bool { 20673 switch e { 20674 case SubscriptionContractSubscriptionStatusActive, SubscriptionContractSubscriptionStatusPaused, SubscriptionContractSubscriptionStatusCancelled, SubscriptionContractSubscriptionStatusExpired, SubscriptionContractSubscriptionStatusFailed: 20675 return true 20676 } 20677 return false 20678 } 20679 20680 func (e SubscriptionContractSubscriptionStatus) String() string { 20681 return string(e) 20682 } 20683 20684 func (e *SubscriptionContractSubscriptionStatus) UnmarshalGQL(v interface{}) error { 20685 str, ok := v.(string) 20686 if !ok { 20687 return fmt.Errorf("enums must be strings") 20688 } 20689 20690 *e = SubscriptionContractSubscriptionStatus(str) 20691 if !e.IsValid() { 20692 return fmt.Errorf("%s is not a valid SubscriptionContractSubscriptionStatus", str) 20693 } 20694 return nil 20695 } 20696 20697 func (e SubscriptionContractSubscriptionStatus) MarshalGQL(w io.Writer) { 20698 fmt.Fprint(w, strconv.Quote(e.String())) 20699 } 20700 20701 // The reason a discount on a subscription draft was rejected. 20702 type SubscriptionDiscountRejectionReason string 20703 20704 const ( 20705 // Discount code is not found. 20706 SubscriptionDiscountRejectionReasonNotFound SubscriptionDiscountRejectionReason = "NOT_FOUND" 20707 // Discount does not apply to any of the given line items. 20708 SubscriptionDiscountRejectionReasonNoEntitledLineItems SubscriptionDiscountRejectionReason = "NO_ENTITLED_LINE_ITEMS" 20709 // Quantity of items does not qualify for the discount. 20710 SubscriptionDiscountRejectionReasonQuantityNotInRange SubscriptionDiscountRejectionReason = "QUANTITY_NOT_IN_RANGE" 20711 // Purchase amount of items does not qualify for the discount. 20712 SubscriptionDiscountRejectionReasonPurchaseNotInRange SubscriptionDiscountRejectionReason = "PURCHASE_NOT_IN_RANGE" 20713 // Given customer does not qualify for the discount. 20714 SubscriptionDiscountRejectionReasonCustomerNotEligible SubscriptionDiscountRejectionReason = "CUSTOMER_NOT_ELIGIBLE" 20715 // Discount usage limit has been reached. 20716 SubscriptionDiscountRejectionReasonUsageLimitReached SubscriptionDiscountRejectionReason = "USAGE_LIMIT_REACHED" 20717 // Customer usage limit has been reached. 20718 SubscriptionDiscountRejectionReasonCustomerUsageLimitReached SubscriptionDiscountRejectionReason = "CUSTOMER_USAGE_LIMIT_REACHED" 20719 // Discount is inactive. 20720 SubscriptionDiscountRejectionReasonCurrentlyInactive SubscriptionDiscountRejectionReason = "CURRENTLY_INACTIVE" 20721 // No applicable shipping lines. 20722 SubscriptionDiscountRejectionReasonNoEntitledShippingLines SubscriptionDiscountRejectionReason = "NO_ENTITLED_SHIPPING_LINES" 20723 // Purchase type does not qualify for the discount. 20724 SubscriptionDiscountRejectionReasonIncompatiblePurchaseType SubscriptionDiscountRejectionReason = "INCOMPATIBLE_PURCHASE_TYPE" 20725 // Internal error during discount code validation. 20726 SubscriptionDiscountRejectionReasonInternalError SubscriptionDiscountRejectionReason = "INTERNAL_ERROR" 20727 ) 20728 20729 var AllSubscriptionDiscountRejectionReason = []SubscriptionDiscountRejectionReason{ 20730 SubscriptionDiscountRejectionReasonNotFound, 20731 SubscriptionDiscountRejectionReasonNoEntitledLineItems, 20732 SubscriptionDiscountRejectionReasonQuantityNotInRange, 20733 SubscriptionDiscountRejectionReasonPurchaseNotInRange, 20734 SubscriptionDiscountRejectionReasonCustomerNotEligible, 20735 SubscriptionDiscountRejectionReasonUsageLimitReached, 20736 SubscriptionDiscountRejectionReasonCustomerUsageLimitReached, 20737 SubscriptionDiscountRejectionReasonCurrentlyInactive, 20738 SubscriptionDiscountRejectionReasonNoEntitledShippingLines, 20739 SubscriptionDiscountRejectionReasonIncompatiblePurchaseType, 20740 SubscriptionDiscountRejectionReasonInternalError, 20741 } 20742 20743 func (e SubscriptionDiscountRejectionReason) IsValid() bool { 20744 switch e { 20745 case SubscriptionDiscountRejectionReasonNotFound, SubscriptionDiscountRejectionReasonNoEntitledLineItems, SubscriptionDiscountRejectionReasonQuantityNotInRange, SubscriptionDiscountRejectionReasonPurchaseNotInRange, SubscriptionDiscountRejectionReasonCustomerNotEligible, SubscriptionDiscountRejectionReasonUsageLimitReached, SubscriptionDiscountRejectionReasonCustomerUsageLimitReached, SubscriptionDiscountRejectionReasonCurrentlyInactive, SubscriptionDiscountRejectionReasonNoEntitledShippingLines, SubscriptionDiscountRejectionReasonIncompatiblePurchaseType, SubscriptionDiscountRejectionReasonInternalError: 20746 return true 20747 } 20748 return false 20749 } 20750 20751 func (e SubscriptionDiscountRejectionReason) String() string { 20752 return string(e) 20753 } 20754 20755 func (e *SubscriptionDiscountRejectionReason) UnmarshalGQL(v interface{}) error { 20756 str, ok := v.(string) 20757 if !ok { 20758 return fmt.Errorf("enums must be strings") 20759 } 20760 20761 *e = SubscriptionDiscountRejectionReason(str) 20762 if !e.IsValid() { 20763 return fmt.Errorf("%s is not a valid SubscriptionDiscountRejectionReason", str) 20764 } 20765 return nil 20766 } 20767 20768 func (e SubscriptionDiscountRejectionReason) MarshalGQL(w io.Writer) { 20769 fmt.Fprint(w, strconv.Quote(e.String())) 20770 } 20771 20772 // Possible error codes that could be returned by SubscriptionDraftUserError. 20773 type SubscriptionDraftErrorCode string 20774 20775 const ( 20776 // This line has already been removed. 20777 SubscriptionDraftErrorCodeAlreadyRemoved SubscriptionDraftErrorCode = "ALREADY_REMOVED" 20778 // Input value is not present. 20779 SubscriptionDraftErrorCodePresence SubscriptionDraftErrorCode = "PRESENCE" 20780 // Subscription draft has been already committed. 20781 SubscriptionDraftErrorCodeCommitted SubscriptionDraftErrorCode = "COMMITTED" 20782 // Value is not in range. 20783 SubscriptionDraftErrorCodeNotInRange SubscriptionDraftErrorCode = "NOT_IN_RANGE" 20784 // The value is not an integer. 20785 SubscriptionDraftErrorCodeNotAnInteger SubscriptionDraftErrorCode = "NOT_AN_INTEGER" 20786 // The maximum number of cycles must be greater than the minimum. 20787 SubscriptionDraftErrorCodeSellingPlanMaxCyclesMustBeGreaterThanMinCycles SubscriptionDraftErrorCode = "SELLING_PLAN_MAX_CYCLES_MUST_BE_GREATER_THAN_MIN_CYCLES" 20788 // The delivery policy interval must be a multiple of the billing policy interval. 20789 SubscriptionDraftErrorCodeDeliveryMustBeMultipleOfBilling SubscriptionDraftErrorCode = "DELIVERY_MUST_BE_MULTIPLE_OF_BILLING" 20790 // Next billing date is invalid. 20791 SubscriptionDraftErrorCodeInvalidBillingDate SubscriptionDraftErrorCode = "INVALID_BILLING_DATE" 20792 // Must have at least one line. 20793 SubscriptionDraftErrorCodeInvalidLines SubscriptionDraftErrorCode = "INVALID_LINES" 20794 // Discount must have at least one entitled line. 20795 SubscriptionDraftErrorCodeNoEntitledLines SubscriptionDraftErrorCode = "NO_ENTITLED_LINES" 20796 // The customer doesn't exist. 20797 SubscriptionDraftErrorCodeCustomerDoesNotExist SubscriptionDraftErrorCode = "CUSTOMER_DOES_NOT_EXIST" 20798 // The payment method customer must be the same as the contract customer. 20799 SubscriptionDraftErrorCodeCustomerMismatch SubscriptionDraftErrorCode = "CUSTOMER_MISMATCH" 20800 // The delivery method can't be blank if any lines require shipping. 20801 SubscriptionDraftErrorCodeDeliveryMethodRequired SubscriptionDraftErrorCode = "DELIVERY_METHOD_REQUIRED" 20802 // The after cycle attribute must be unique between cycle discounts. 20803 SubscriptionDraftErrorCodeCycleDiscountsUniqueAfterCycle SubscriptionDraftErrorCode = "CYCLE_DISCOUNTS_UNIQUE_AFTER_CYCLE" 20804 // The adjustment value must the same type as the adjustment type. 20805 SubscriptionDraftErrorCodeInvalidAdjustmentType SubscriptionDraftErrorCode = "INVALID_ADJUSTMENT_TYPE" 20806 // The adjustment value must be either fixed_value or percentage. 20807 SubscriptionDraftErrorCodeInvalidAdjustmentValue SubscriptionDraftErrorCode = "INVALID_ADJUSTMENT_VALUE" 20808 // Another operation updated the contract concurrently as the commit was in progress. 20809 SubscriptionDraftErrorCodeStaleContract SubscriptionDraftErrorCode = "STALE_CONTRACT" 20810 // Currency is not enabled. 20811 SubscriptionDraftErrorCodeCurrencyNotEnabled SubscriptionDraftErrorCode = "CURRENCY_NOT_ENABLED" 20812 // Input value is invalid. 20813 SubscriptionDraftErrorCodeInvalid SubscriptionDraftErrorCode = "INVALID" 20814 // Input value is blank. 20815 SubscriptionDraftErrorCodeBlank SubscriptionDraftErrorCode = "BLANK" 20816 // Input value should be greater than minimum allowed value. 20817 SubscriptionDraftErrorCodeGreaterThan SubscriptionDraftErrorCode = "GREATER_THAN" 20818 // Input value should be greater than or equal to minimum allowed value. 20819 SubscriptionDraftErrorCodeGreaterThanOrEqualTo SubscriptionDraftErrorCode = "GREATER_THAN_OR_EQUAL_TO" 20820 // Input value should be less than maximum allowed value. 20821 SubscriptionDraftErrorCodeLessThan SubscriptionDraftErrorCode = "LESS_THAN" 20822 // Input value should be less or equal to maximum allowed value. 20823 SubscriptionDraftErrorCodeLessThanOrEqualTo SubscriptionDraftErrorCode = "LESS_THAN_OR_EQUAL_TO" 20824 // Input value is too long. 20825 SubscriptionDraftErrorCodeTooLong SubscriptionDraftErrorCode = "TOO_LONG" 20826 // Input value is too short. 20827 SubscriptionDraftErrorCodeTooShort SubscriptionDraftErrorCode = "TOO_SHORT" 20828 ) 20829 20830 var AllSubscriptionDraftErrorCode = []SubscriptionDraftErrorCode{ 20831 SubscriptionDraftErrorCodeAlreadyRemoved, 20832 SubscriptionDraftErrorCodePresence, 20833 SubscriptionDraftErrorCodeCommitted, 20834 SubscriptionDraftErrorCodeNotInRange, 20835 SubscriptionDraftErrorCodeNotAnInteger, 20836 SubscriptionDraftErrorCodeSellingPlanMaxCyclesMustBeGreaterThanMinCycles, 20837 SubscriptionDraftErrorCodeDeliveryMustBeMultipleOfBilling, 20838 SubscriptionDraftErrorCodeInvalidBillingDate, 20839 SubscriptionDraftErrorCodeInvalidLines, 20840 SubscriptionDraftErrorCodeNoEntitledLines, 20841 SubscriptionDraftErrorCodeCustomerDoesNotExist, 20842 SubscriptionDraftErrorCodeCustomerMismatch, 20843 SubscriptionDraftErrorCodeDeliveryMethodRequired, 20844 SubscriptionDraftErrorCodeCycleDiscountsUniqueAfterCycle, 20845 SubscriptionDraftErrorCodeInvalidAdjustmentType, 20846 SubscriptionDraftErrorCodeInvalidAdjustmentValue, 20847 SubscriptionDraftErrorCodeStaleContract, 20848 SubscriptionDraftErrorCodeCurrencyNotEnabled, 20849 SubscriptionDraftErrorCodeInvalid, 20850 SubscriptionDraftErrorCodeBlank, 20851 SubscriptionDraftErrorCodeGreaterThan, 20852 SubscriptionDraftErrorCodeGreaterThanOrEqualTo, 20853 SubscriptionDraftErrorCodeLessThan, 20854 SubscriptionDraftErrorCodeLessThanOrEqualTo, 20855 SubscriptionDraftErrorCodeTooLong, 20856 SubscriptionDraftErrorCodeTooShort, 20857 } 20858 20859 func (e SubscriptionDraftErrorCode) IsValid() bool { 20860 switch e { 20861 case SubscriptionDraftErrorCodeAlreadyRemoved, SubscriptionDraftErrorCodePresence, SubscriptionDraftErrorCodeCommitted, SubscriptionDraftErrorCodeNotInRange, SubscriptionDraftErrorCodeNotAnInteger, SubscriptionDraftErrorCodeSellingPlanMaxCyclesMustBeGreaterThanMinCycles, SubscriptionDraftErrorCodeDeliveryMustBeMultipleOfBilling, SubscriptionDraftErrorCodeInvalidBillingDate, SubscriptionDraftErrorCodeInvalidLines, SubscriptionDraftErrorCodeNoEntitledLines, SubscriptionDraftErrorCodeCustomerDoesNotExist, SubscriptionDraftErrorCodeCustomerMismatch, SubscriptionDraftErrorCodeDeliveryMethodRequired, SubscriptionDraftErrorCodeCycleDiscountsUniqueAfterCycle, SubscriptionDraftErrorCodeInvalidAdjustmentType, SubscriptionDraftErrorCodeInvalidAdjustmentValue, SubscriptionDraftErrorCodeStaleContract, SubscriptionDraftErrorCodeCurrencyNotEnabled, SubscriptionDraftErrorCodeInvalid, SubscriptionDraftErrorCodeBlank, SubscriptionDraftErrorCodeGreaterThan, SubscriptionDraftErrorCodeGreaterThanOrEqualTo, SubscriptionDraftErrorCodeLessThan, SubscriptionDraftErrorCodeLessThanOrEqualTo, SubscriptionDraftErrorCodeTooLong, SubscriptionDraftErrorCodeTooShort: 20862 return true 20863 } 20864 return false 20865 } 20866 20867 func (e SubscriptionDraftErrorCode) String() string { 20868 return string(e) 20869 } 20870 20871 func (e *SubscriptionDraftErrorCode) UnmarshalGQL(v interface{}) error { 20872 str, ok := v.(string) 20873 if !ok { 20874 return fmt.Errorf("enums must be strings") 20875 } 20876 20877 *e = SubscriptionDraftErrorCode(str) 20878 if !e.IsValid() { 20879 return fmt.Errorf("%s is not a valid SubscriptionDraftErrorCode", str) 20880 } 20881 return nil 20882 } 20883 20884 func (e SubscriptionDraftErrorCode) MarshalGQL(w io.Writer) { 20885 fmt.Fprint(w, strconv.Quote(e.String())) 20886 } 20887 20888 // Specifies the kind of the suggested order transaction. 20889 type SuggestedOrderTransactionKind string 20890 20891 const ( 20892 // A suggested refund transaction for an order. 20893 SuggestedOrderTransactionKindSuggestedRefund SuggestedOrderTransactionKind = "SUGGESTED_REFUND" 20894 ) 20895 20896 var AllSuggestedOrderTransactionKind = []SuggestedOrderTransactionKind{ 20897 SuggestedOrderTransactionKindSuggestedRefund, 20898 } 20899 20900 func (e SuggestedOrderTransactionKind) IsValid() bool { 20901 switch e { 20902 case SuggestedOrderTransactionKindSuggestedRefund: 20903 return true 20904 } 20905 return false 20906 } 20907 20908 func (e SuggestedOrderTransactionKind) String() string { 20909 return string(e) 20910 } 20911 20912 func (e *SuggestedOrderTransactionKind) UnmarshalGQL(v interface{}) error { 20913 str, ok := v.(string) 20914 if !ok { 20915 return fmt.Errorf("enums must be strings") 20916 } 20917 20918 *e = SuggestedOrderTransactionKind(str) 20919 if !e.IsValid() { 20920 return fmt.Errorf("%s is not a valid SuggestedOrderTransactionKind", str) 20921 } 20922 return nil 20923 } 20924 20925 func (e SuggestedOrderTransactionKind) MarshalGQL(w io.Writer) { 20926 fmt.Fprint(w, strconv.Quote(e.String())) 20927 } 20928 20929 // Available customer tax exemptions. 20930 type TaxExemption string 20931 20932 const ( 20933 // This customer is exempt from specific taxes for holding a valid STATUS_CARD_EXEMPTION in Canada. 20934 TaxExemptionCaStatusCardExemption TaxExemption = "CA_STATUS_CARD_EXEMPTION" 20935 // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in British Columbia. 20936 TaxExemptionCaBcResellerExemption TaxExemption = "CA_BC_RESELLER_EXEMPTION" 20937 // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Manitoba. 20938 TaxExemptionCaMbResellerExemption TaxExemption = "CA_MB_RESELLER_EXEMPTION" 20939 // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Saskatchewan. 20940 TaxExemptionCaSkResellerExemption TaxExemption = "CA_SK_RESELLER_EXEMPTION" 20941 // This customer is exempt from specific taxes for holding a valid DIPLOMAT_EXEMPTION in Canada. 20942 TaxExemptionCaDiplomatExemption TaxExemption = "CA_DIPLOMAT_EXEMPTION" 20943 // This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in British Columbia. 20944 TaxExemptionCaBcCommercialFisheryExemption TaxExemption = "CA_BC_COMMERCIAL_FISHERY_EXEMPTION" 20945 // This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Manitoba. 20946 TaxExemptionCaMbCommercialFisheryExemption TaxExemption = "CA_MB_COMMERCIAL_FISHERY_EXEMPTION" 20947 // This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Nova Scotia. 20948 TaxExemptionCaNsCommercialFisheryExemption TaxExemption = "CA_NS_COMMERCIAL_FISHERY_EXEMPTION" 20949 // This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Prince Edward Island. 20950 TaxExemptionCaPeCommercialFisheryExemption TaxExemption = "CA_PE_COMMERCIAL_FISHERY_EXEMPTION" 20951 // This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Saskatchewan. 20952 TaxExemptionCaSkCommercialFisheryExemption TaxExemption = "CA_SK_COMMERCIAL_FISHERY_EXEMPTION" 20953 // This customer is exempt from specific taxes for holding a valid PRODUCTION_AND_MACHINERY_EXEMPTION in British Columbia. 20954 TaxExemptionCaBcProductionAndMachineryExemption TaxExemption = "CA_BC_PRODUCTION_AND_MACHINERY_EXEMPTION" 20955 // This customer is exempt from specific taxes for holding a valid PRODUCTION_AND_MACHINERY_EXEMPTION in Saskatchewan. 20956 TaxExemptionCaSkProductionAndMachineryExemption TaxExemption = "CA_SK_PRODUCTION_AND_MACHINERY_EXEMPTION" 20957 // This customer is exempt from specific taxes for holding a valid SUB_CONTRACTOR_EXEMPTION in British Columbia. 20958 TaxExemptionCaBcSubContractorExemption TaxExemption = "CA_BC_SUB_CONTRACTOR_EXEMPTION" 20959 // This customer is exempt from specific taxes for holding a valid SUB_CONTRACTOR_EXEMPTION in Saskatchewan. 20960 TaxExemptionCaSkSubContractorExemption TaxExemption = "CA_SK_SUB_CONTRACTOR_EXEMPTION" 20961 // This customer is exempt from specific taxes for holding a valid CONTRACTOR_EXEMPTION in British Columbia. 20962 TaxExemptionCaBcContractorExemption TaxExemption = "CA_BC_CONTRACTOR_EXEMPTION" 20963 // This customer is exempt from specific taxes for holding a valid CONTRACTOR_EXEMPTION in Saskatchewan. 20964 TaxExemptionCaSkContractorExemption TaxExemption = "CA_SK_CONTRACTOR_EXEMPTION" 20965 // This customer is exempt from specific taxes for holding a valid PURCHASE_EXEMPTION in Ontario. 20966 TaxExemptionCaOnPurchaseExemption TaxExemption = "CA_ON_PURCHASE_EXEMPTION" 20967 // This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Manitoba. 20968 TaxExemptionCaMbFarmerExemption TaxExemption = "CA_MB_FARMER_EXEMPTION" 20969 // This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Nova Scotia. 20970 TaxExemptionCaNsFarmerExemption TaxExemption = "CA_NS_FARMER_EXEMPTION" 20971 // This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Saskatchewan. 20972 TaxExemptionCaSkFarmerExemption TaxExemption = "CA_SK_FARMER_EXEMPTION" 20973 ) 20974 20975 var AllTaxExemption = []TaxExemption{ 20976 TaxExemptionCaStatusCardExemption, 20977 TaxExemptionCaBcResellerExemption, 20978 TaxExemptionCaMbResellerExemption, 20979 TaxExemptionCaSkResellerExemption, 20980 TaxExemptionCaDiplomatExemption, 20981 TaxExemptionCaBcCommercialFisheryExemption, 20982 TaxExemptionCaMbCommercialFisheryExemption, 20983 TaxExemptionCaNsCommercialFisheryExemption, 20984 TaxExemptionCaPeCommercialFisheryExemption, 20985 TaxExemptionCaSkCommercialFisheryExemption, 20986 TaxExemptionCaBcProductionAndMachineryExemption, 20987 TaxExemptionCaSkProductionAndMachineryExemption, 20988 TaxExemptionCaBcSubContractorExemption, 20989 TaxExemptionCaSkSubContractorExemption, 20990 TaxExemptionCaBcContractorExemption, 20991 TaxExemptionCaSkContractorExemption, 20992 TaxExemptionCaOnPurchaseExemption, 20993 TaxExemptionCaMbFarmerExemption, 20994 TaxExemptionCaNsFarmerExemption, 20995 TaxExemptionCaSkFarmerExemption, 20996 } 20997 20998 func (e TaxExemption) IsValid() bool { 20999 switch e { 21000 case TaxExemptionCaStatusCardExemption, TaxExemptionCaBcResellerExemption, TaxExemptionCaMbResellerExemption, TaxExemptionCaSkResellerExemption, TaxExemptionCaDiplomatExemption, TaxExemptionCaBcCommercialFisheryExemption, TaxExemptionCaMbCommercialFisheryExemption, TaxExemptionCaNsCommercialFisheryExemption, TaxExemptionCaPeCommercialFisheryExemption, TaxExemptionCaSkCommercialFisheryExemption, TaxExemptionCaBcProductionAndMachineryExemption, TaxExemptionCaSkProductionAndMachineryExemption, TaxExemptionCaBcSubContractorExemption, TaxExemptionCaSkSubContractorExemption, TaxExemptionCaBcContractorExemption, TaxExemptionCaSkContractorExemption, TaxExemptionCaOnPurchaseExemption, TaxExemptionCaMbFarmerExemption, TaxExemptionCaNsFarmerExemption, TaxExemptionCaSkFarmerExemption: 21001 return true 21002 } 21003 return false 21004 } 21005 21006 func (e TaxExemption) String() string { 21007 return string(e) 21008 } 21009 21010 func (e *TaxExemption) UnmarshalGQL(v interface{}) error { 21011 str, ok := v.(string) 21012 if !ok { 21013 return fmt.Errorf("enums must be strings") 21014 } 21015 21016 *e = TaxExemption(str) 21017 if !e.IsValid() { 21018 return fmt.Errorf("%s is not a valid TaxExemption", str) 21019 } 21020 return nil 21021 } 21022 21023 func (e TaxExemption) MarshalGQL(w io.Writer) { 21024 fmt.Fprint(w, strconv.Quote(e.String())) 21025 } 21026 21027 // Specifies the type of resources that are translatable. 21028 type TranslatableResourceType string 21029 21030 const ( 21031 // Represents a product. 21032 TranslatableResourceTypeProduct TranslatableResourceType = "PRODUCT" 21033 // Represents a product variant. 21034 TranslatableResourceTypeProductVariant TranslatableResourceType = "PRODUCT_VARIANT" 21035 // Represents an email template. 21036 TranslatableResourceTypeEmailTemplate TranslatableResourceType = "EMAIL_TEMPLATE" 21037 // Represents an online store theme. 21038 TranslatableResourceTypeOnlineStoreTheme TranslatableResourceType = "ONLINE_STORE_THEME" 21039 // Represents an article. 21040 TranslatableResourceTypeOnlineStoreArticle TranslatableResourceType = "ONLINE_STORE_ARTICLE" 21041 // Represents an online store blog. 21042 TranslatableResourceTypeOnlineStoreBlog TranslatableResourceType = "ONLINE_STORE_BLOG" 21043 // Represents an online store page. 21044 TranslatableResourceTypeOnlineStorePage TranslatableResourceType = "ONLINE_STORE_PAGE" 21045 // Represents a collection of products. 21046 TranslatableResourceTypeCollection TranslatableResourceType = "COLLECTION" 21047 // Represents a link to direct users to. 21048 TranslatableResourceTypeLink TranslatableResourceType = "LINK" 21049 // Represents a metafield. 21050 TranslatableResourceTypeMetafield TranslatableResourceType = "METAFIELD" 21051 // Represents an SMS template. 21052 TranslatableResourceTypeSmsTemplate TranslatableResourceType = "SMS_TEMPLATE" 21053 // Represents a shop. 21054 TranslatableResourceTypeShop TranslatableResourceType = "SHOP" 21055 // Represents a shop policy. 21056 TranslatableResourceTypeShopPolicy TranslatableResourceType = "SHOP_POLICY" 21057 // Represents a payment gateway. 21058 TranslatableResourceTypePaymentGateway TranslatableResourceType = "PAYMENT_GATEWAY" 21059 // Represents a custom product property name like "Size", "Color", and "Material". 21060 TranslatableResourceTypeProductOption TranslatableResourceType = "PRODUCT_OPTION" 21061 // Represents a delivery method definition. For example, "Standard", or "Expedited". 21062 TranslatableResourceTypeDeliveryMethodDefinition TranslatableResourceType = "DELIVERY_METHOD_DEFINITION" 21063 ) 21064 21065 var AllTranslatableResourceType = []TranslatableResourceType{ 21066 TranslatableResourceTypeProduct, 21067 TranslatableResourceTypeProductVariant, 21068 TranslatableResourceTypeEmailTemplate, 21069 TranslatableResourceTypeOnlineStoreTheme, 21070 TranslatableResourceTypeOnlineStoreArticle, 21071 TranslatableResourceTypeOnlineStoreBlog, 21072 TranslatableResourceTypeOnlineStorePage, 21073 TranslatableResourceTypeCollection, 21074 TranslatableResourceTypeLink, 21075 TranslatableResourceTypeMetafield, 21076 TranslatableResourceTypeSmsTemplate, 21077 TranslatableResourceTypeShop, 21078 TranslatableResourceTypeShopPolicy, 21079 TranslatableResourceTypePaymentGateway, 21080 TranslatableResourceTypeProductOption, 21081 TranslatableResourceTypeDeliveryMethodDefinition, 21082 } 21083 21084 func (e TranslatableResourceType) IsValid() bool { 21085 switch e { 21086 case TranslatableResourceTypeProduct, TranslatableResourceTypeProductVariant, TranslatableResourceTypeEmailTemplate, TranslatableResourceTypeOnlineStoreTheme, TranslatableResourceTypeOnlineStoreArticle, TranslatableResourceTypeOnlineStoreBlog, TranslatableResourceTypeOnlineStorePage, TranslatableResourceTypeCollection, TranslatableResourceTypeLink, TranslatableResourceTypeMetafield, TranslatableResourceTypeSmsTemplate, TranslatableResourceTypeShop, TranslatableResourceTypeShopPolicy, TranslatableResourceTypePaymentGateway, TranslatableResourceTypeProductOption, TranslatableResourceTypeDeliveryMethodDefinition: 21087 return true 21088 } 21089 return false 21090 } 21091 21092 func (e TranslatableResourceType) String() string { 21093 return string(e) 21094 } 21095 21096 func (e *TranslatableResourceType) UnmarshalGQL(v interface{}) error { 21097 str, ok := v.(string) 21098 if !ok { 21099 return fmt.Errorf("enums must be strings") 21100 } 21101 21102 *e = TranslatableResourceType(str) 21103 if !e.IsValid() { 21104 return fmt.Errorf("%s is not a valid TranslatableResourceType", str) 21105 } 21106 return nil 21107 } 21108 21109 func (e TranslatableResourceType) MarshalGQL(w io.Writer) { 21110 fmt.Fprint(w, strconv.Quote(e.String())) 21111 } 21112 21113 // Possible error codes that could be returned by TranslationUserError. 21114 type TranslationErrorCode string 21115 21116 const ( 21117 // Input value is blank. 21118 TranslationErrorCodeBlank TranslationErrorCode = "BLANK" 21119 // Input value is invalid. 21120 TranslationErrorCodeInvalid TranslationErrorCode = "INVALID" 21121 // Resource does not exist. 21122 TranslationErrorCodeResourceNotFound TranslationErrorCode = "RESOURCE_NOT_FOUND" 21123 // Too many translation keys for resource. 21124 TranslationErrorCodeTooManyKeysForResource TranslationErrorCode = "TOO_MANY_KEYS_FOR_RESOURCE" 21125 // Translation key is invalid. 21126 TranslationErrorCodeInvalidKeyForModel TranslationErrorCode = "INVALID_KEY_FOR_MODEL" 21127 // Translation value is invalid. 21128 TranslationErrorCodeFailsResourceValidation TranslationErrorCode = "FAILS_RESOURCE_VALIDATION" 21129 // Translatable content is invalid. 21130 TranslationErrorCodeInvalidTranslatableContent TranslationErrorCode = "INVALID_TRANSLATABLE_CONTENT" 21131 // Locale is invalid for the shop. 21132 TranslationErrorCodeInvalidLocaleForShop TranslationErrorCode = "INVALID_LOCALE_FOR_SHOP" 21133 // Locale language code is invalid. 21134 TranslationErrorCodeInvalidCode TranslationErrorCode = "INVALID_CODE" 21135 // Locale code format is invalid. 21136 TranslationErrorCodeInvalidFormat TranslationErrorCode = "INVALID_FORMAT" 21137 ) 21138 21139 var AllTranslationErrorCode = []TranslationErrorCode{ 21140 TranslationErrorCodeBlank, 21141 TranslationErrorCodeInvalid, 21142 TranslationErrorCodeResourceNotFound, 21143 TranslationErrorCodeTooManyKeysForResource, 21144 TranslationErrorCodeInvalidKeyForModel, 21145 TranslationErrorCodeFailsResourceValidation, 21146 TranslationErrorCodeInvalidTranslatableContent, 21147 TranslationErrorCodeInvalidLocaleForShop, 21148 TranslationErrorCodeInvalidCode, 21149 TranslationErrorCodeInvalidFormat, 21150 } 21151 21152 func (e TranslationErrorCode) IsValid() bool { 21153 switch e { 21154 case TranslationErrorCodeBlank, TranslationErrorCodeInvalid, TranslationErrorCodeResourceNotFound, TranslationErrorCodeTooManyKeysForResource, TranslationErrorCodeInvalidKeyForModel, TranslationErrorCodeFailsResourceValidation, TranslationErrorCodeInvalidTranslatableContent, TranslationErrorCodeInvalidLocaleForShop, TranslationErrorCodeInvalidCode, TranslationErrorCodeInvalidFormat: 21155 return true 21156 } 21157 return false 21158 } 21159 21160 func (e TranslationErrorCode) String() string { 21161 return string(e) 21162 } 21163 21164 func (e *TranslationErrorCode) UnmarshalGQL(v interface{}) error { 21165 str, ok := v.(string) 21166 if !ok { 21167 return fmt.Errorf("enums must be strings") 21168 } 21169 21170 *e = TranslationErrorCode(str) 21171 if !e.IsValid() { 21172 return fmt.Errorf("%s is not a valid TranslationErrorCode", str) 21173 } 21174 return nil 21175 } 21176 21177 func (e TranslationErrorCode) MarshalGQL(w io.Writer) { 21178 fmt.Fprint(w, strconv.Quote(e.String())) 21179 } 21180 21181 // Systems of weights and measures. 21182 type UnitSystem string 21183 21184 const ( 21185 // Imperial system of weights and measures. 21186 UnitSystemImperialSystem UnitSystem = "IMPERIAL_SYSTEM" 21187 // Metric system of weights and measures. 21188 UnitSystemMetricSystem UnitSystem = "METRIC_SYSTEM" 21189 ) 21190 21191 var AllUnitSystem = []UnitSystem{ 21192 UnitSystemImperialSystem, 21193 UnitSystemMetricSystem, 21194 } 21195 21196 func (e UnitSystem) IsValid() bool { 21197 switch e { 21198 case UnitSystemImperialSystem, UnitSystemMetricSystem: 21199 return true 21200 } 21201 return false 21202 } 21203 21204 func (e UnitSystem) String() string { 21205 return string(e) 21206 } 21207 21208 func (e *UnitSystem) UnmarshalGQL(v interface{}) error { 21209 str, ok := v.(string) 21210 if !ok { 21211 return fmt.Errorf("enums must be strings") 21212 } 21213 21214 *e = UnitSystem(str) 21215 if !e.IsValid() { 21216 return fmt.Errorf("%s is not a valid UnitSystem", str) 21217 } 21218 return nil 21219 } 21220 21221 func (e UnitSystem) MarshalGQL(w io.Writer) { 21222 fmt.Fprint(w, strconv.Quote(e.String())) 21223 } 21224 21225 // The supported formats for webhook subscriptions. 21226 type WebhookSubscriptionFormat string 21227 21228 const ( 21229 WebhookSubscriptionFormatJSON WebhookSubscriptionFormat = "JSON" 21230 WebhookSubscriptionFormatXML WebhookSubscriptionFormat = "XML" 21231 ) 21232 21233 var AllWebhookSubscriptionFormat = []WebhookSubscriptionFormat{ 21234 WebhookSubscriptionFormatJSON, 21235 WebhookSubscriptionFormatXML, 21236 } 21237 21238 func (e WebhookSubscriptionFormat) IsValid() bool { 21239 switch e { 21240 case WebhookSubscriptionFormatJSON, WebhookSubscriptionFormatXML: 21241 return true 21242 } 21243 return false 21244 } 21245 21246 func (e WebhookSubscriptionFormat) String() string { 21247 return string(e) 21248 } 21249 21250 func (e *WebhookSubscriptionFormat) UnmarshalGQL(v interface{}) error { 21251 str, ok := v.(string) 21252 if !ok { 21253 return fmt.Errorf("enums must be strings") 21254 } 21255 21256 *e = WebhookSubscriptionFormat(str) 21257 if !e.IsValid() { 21258 return fmt.Errorf("%s is not a valid WebhookSubscriptionFormat", str) 21259 } 21260 return nil 21261 } 21262 21263 func (e WebhookSubscriptionFormat) MarshalGQL(w io.Writer) { 21264 fmt.Fprint(w, strconv.Quote(e.String())) 21265 } 21266 21267 // The set of valid sort keys for the WebhookSubscription query. 21268 type WebhookSubscriptionSortKeys string 21269 21270 const ( 21271 // Sort by the `created_at` value. 21272 WebhookSubscriptionSortKeysCreatedAt WebhookSubscriptionSortKeys = "CREATED_AT" 21273 // Sort by the `id` value. 21274 WebhookSubscriptionSortKeysID WebhookSubscriptionSortKeys = "ID" 21275 // During a search (i.e. when the `query` parameter has been specified on the connection) this sorts the 21276 // results by relevance to the search term(s). When no search query is specified, this sort key is not 21277 // deterministic and should not be used. 21278 WebhookSubscriptionSortKeysRelevance WebhookSubscriptionSortKeys = "RELEVANCE" 21279 ) 21280 21281 var AllWebhookSubscriptionSortKeys = []WebhookSubscriptionSortKeys{ 21282 WebhookSubscriptionSortKeysCreatedAt, 21283 WebhookSubscriptionSortKeysID, 21284 WebhookSubscriptionSortKeysRelevance, 21285 } 21286 21287 func (e WebhookSubscriptionSortKeys) IsValid() bool { 21288 switch e { 21289 case WebhookSubscriptionSortKeysCreatedAt, WebhookSubscriptionSortKeysID, WebhookSubscriptionSortKeysRelevance: 21290 return true 21291 } 21292 return false 21293 } 21294 21295 func (e WebhookSubscriptionSortKeys) String() string { 21296 return string(e) 21297 } 21298 21299 func (e *WebhookSubscriptionSortKeys) UnmarshalGQL(v interface{}) error { 21300 str, ok := v.(string) 21301 if !ok { 21302 return fmt.Errorf("enums must be strings") 21303 } 21304 21305 *e = WebhookSubscriptionSortKeys(str) 21306 if !e.IsValid() { 21307 return fmt.Errorf("%s is not a valid WebhookSubscriptionSortKeys", str) 21308 } 21309 return nil 21310 } 21311 21312 func (e WebhookSubscriptionSortKeys) MarshalGQL(w io.Writer) { 21313 fmt.Fprint(w, strconv.Quote(e.String())) 21314 } 21315 21316 // The supported topics for webhook subscriptions. 21317 type WebhookSubscriptionTopic string 21318 21319 const ( 21320 // The webhook topic for `app/uninstalled` events. 21321 WebhookSubscriptionTopicAppUninstalled WebhookSubscriptionTopic = "APP_UNINSTALLED" 21322 // The webhook topic for `carts/create` events. 21323 WebhookSubscriptionTopicCartsCreate WebhookSubscriptionTopic = "CARTS_CREATE" 21324 // The webhook topic for `carts/update` events. 21325 WebhookSubscriptionTopicCartsUpdate WebhookSubscriptionTopic = "CARTS_UPDATE" 21326 // The webhook topic for `channels/delete` events. 21327 WebhookSubscriptionTopicChannelsDelete WebhookSubscriptionTopic = "CHANNELS_DELETE" 21328 // The webhook topic for `checkouts/create` events. 21329 WebhookSubscriptionTopicCheckoutsCreate WebhookSubscriptionTopic = "CHECKOUTS_CREATE" 21330 // The webhook topic for `checkouts/delete` events. 21331 WebhookSubscriptionTopicCheckoutsDelete WebhookSubscriptionTopic = "CHECKOUTS_DELETE" 21332 // The webhook topic for `checkouts/update` events. 21333 WebhookSubscriptionTopicCheckoutsUpdate WebhookSubscriptionTopic = "CHECKOUTS_UPDATE" 21334 // The webhook topic for `customer_payment_methods/create` events. 21335 WebhookSubscriptionTopicCustomerPaymentMethodsCreate WebhookSubscriptionTopic = "CUSTOMER_PAYMENT_METHODS_CREATE" 21336 // The webhook topic for `customer_payment_methods/update` events. 21337 WebhookSubscriptionTopicCustomerPaymentMethodsUpdate WebhookSubscriptionTopic = "CUSTOMER_PAYMENT_METHODS_UPDATE" 21338 // The webhook topic for `customer_payment_methods/revoke` events. 21339 WebhookSubscriptionTopicCustomerPaymentMethodsRevoke WebhookSubscriptionTopic = "CUSTOMER_PAYMENT_METHODS_REVOKE" 21340 // The webhook topic for `collection_listings/add` events. 21341 WebhookSubscriptionTopicCollectionListingsAdd WebhookSubscriptionTopic = "COLLECTION_LISTINGS_ADD" 21342 // The webhook topic for `collection_listings/remove` events. 21343 WebhookSubscriptionTopicCollectionListingsRemove WebhookSubscriptionTopic = "COLLECTION_LISTINGS_REMOVE" 21344 // The webhook topic for `collection_listings/update` events. 21345 WebhookSubscriptionTopicCollectionListingsUpdate WebhookSubscriptionTopic = "COLLECTION_LISTINGS_UPDATE" 21346 // The webhook topic for `collection_publications/create` events. 21347 WebhookSubscriptionTopicCollectionPublicationsCreate WebhookSubscriptionTopic = "COLLECTION_PUBLICATIONS_CREATE" 21348 // The webhook topic for `collection_publications/delete` events. 21349 WebhookSubscriptionTopicCollectionPublicationsDelete WebhookSubscriptionTopic = "COLLECTION_PUBLICATIONS_DELETE" 21350 // The webhook topic for `collection_publications/update` events. 21351 WebhookSubscriptionTopicCollectionPublicationsUpdate WebhookSubscriptionTopic = "COLLECTION_PUBLICATIONS_UPDATE" 21352 // The webhook topic for `collections/create` events. 21353 WebhookSubscriptionTopicCollectionsCreate WebhookSubscriptionTopic = "COLLECTIONS_CREATE" 21354 // The webhook topic for `collections/delete` events. 21355 WebhookSubscriptionTopicCollectionsDelete WebhookSubscriptionTopic = "COLLECTIONS_DELETE" 21356 // The webhook topic for `collections/update` events. 21357 WebhookSubscriptionTopicCollectionsUpdate WebhookSubscriptionTopic = "COLLECTIONS_UPDATE" 21358 // The webhook topic for `customer_groups/create` events. 21359 WebhookSubscriptionTopicCustomerGroupsCreate WebhookSubscriptionTopic = "CUSTOMER_GROUPS_CREATE" 21360 // The webhook topic for `customer_groups/delete` events. 21361 WebhookSubscriptionTopicCustomerGroupsDelete WebhookSubscriptionTopic = "CUSTOMER_GROUPS_DELETE" 21362 // The webhook topic for `customer_groups/update` events. 21363 WebhookSubscriptionTopicCustomerGroupsUpdate WebhookSubscriptionTopic = "CUSTOMER_GROUPS_UPDATE" 21364 // The webhook topic for `customers/create` events. 21365 WebhookSubscriptionTopicCustomersCreate WebhookSubscriptionTopic = "CUSTOMERS_CREATE" 21366 // The webhook topic for `customers/delete` events. 21367 WebhookSubscriptionTopicCustomersDelete WebhookSubscriptionTopic = "CUSTOMERS_DELETE" 21368 // The webhook topic for `customers/disable` events. 21369 WebhookSubscriptionTopicCustomersDisable WebhookSubscriptionTopic = "CUSTOMERS_DISABLE" 21370 // The webhook topic for `customers/enable` events. 21371 WebhookSubscriptionTopicCustomersEnable WebhookSubscriptionTopic = "CUSTOMERS_ENABLE" 21372 // The webhook topic for `customers/update` events. 21373 WebhookSubscriptionTopicCustomersUpdate WebhookSubscriptionTopic = "CUSTOMERS_UPDATE" 21374 // The webhook topic for `disputes/create` events. 21375 WebhookSubscriptionTopicDisputesCreate WebhookSubscriptionTopic = "DISPUTES_CREATE" 21376 // The webhook topic for `disputes/update` events. 21377 WebhookSubscriptionTopicDisputesUpdate WebhookSubscriptionTopic = "DISPUTES_UPDATE" 21378 // The webhook topic for `draft_orders/create` events. 21379 WebhookSubscriptionTopicDraftOrdersCreate WebhookSubscriptionTopic = "DRAFT_ORDERS_CREATE" 21380 // The webhook topic for `draft_orders/delete` events. 21381 WebhookSubscriptionTopicDraftOrdersDelete WebhookSubscriptionTopic = "DRAFT_ORDERS_DELETE" 21382 // The webhook topic for `draft_orders/update` events. 21383 WebhookSubscriptionTopicDraftOrdersUpdate WebhookSubscriptionTopic = "DRAFT_ORDERS_UPDATE" 21384 // The webhook topic for `fulfillment_events/create` events. 21385 WebhookSubscriptionTopicFulfillmentEventsCreate WebhookSubscriptionTopic = "FULFILLMENT_EVENTS_CREATE" 21386 // The webhook topic for `fulfillment_events/delete` events. 21387 WebhookSubscriptionTopicFulfillmentEventsDelete WebhookSubscriptionTopic = "FULFILLMENT_EVENTS_DELETE" 21388 // The webhook topic for `fulfillments/create` events. 21389 WebhookSubscriptionTopicFulfillmentsCreate WebhookSubscriptionTopic = "FULFILLMENTS_CREATE" 21390 // The webhook topic for `fulfillments/update` events. 21391 WebhookSubscriptionTopicFulfillmentsUpdate WebhookSubscriptionTopic = "FULFILLMENTS_UPDATE" 21392 // The webhook topic for `attributed_sessions/first` events. 21393 WebhookSubscriptionTopicAttributedSessionsFirst WebhookSubscriptionTopic = "ATTRIBUTED_SESSIONS_FIRST" 21394 // The webhook topic for `attributed_sessions/last` events. 21395 WebhookSubscriptionTopicAttributedSessionsLast WebhookSubscriptionTopic = "ATTRIBUTED_SESSIONS_LAST" 21396 // The webhook topic for `order_transactions/create` events. 21397 WebhookSubscriptionTopicOrderTransactionsCreate WebhookSubscriptionTopic = "ORDER_TRANSACTIONS_CREATE" 21398 // The webhook topic for `orders/cancelled` events. 21399 WebhookSubscriptionTopicOrdersCancelled WebhookSubscriptionTopic = "ORDERS_CANCELLED" 21400 // The webhook topic for `orders/create` events. 21401 WebhookSubscriptionTopicOrdersCreate WebhookSubscriptionTopic = "ORDERS_CREATE" 21402 // The webhook topic for `orders/delete` events. 21403 WebhookSubscriptionTopicOrdersDelete WebhookSubscriptionTopic = "ORDERS_DELETE" 21404 // The webhook topic for `orders/edited` events. 21405 WebhookSubscriptionTopicOrdersEdited WebhookSubscriptionTopic = "ORDERS_EDITED" 21406 // The webhook topic for `orders/fulfilled` events. 21407 WebhookSubscriptionTopicOrdersFulfilled WebhookSubscriptionTopic = "ORDERS_FULFILLED" 21408 // The webhook topic for `orders/paid` events. 21409 WebhookSubscriptionTopicOrdersPaid WebhookSubscriptionTopic = "ORDERS_PAID" 21410 // The webhook topic for `orders/partially_fulfilled` events. 21411 WebhookSubscriptionTopicOrdersPartiallyFulfilled WebhookSubscriptionTopic = "ORDERS_PARTIALLY_FULFILLED" 21412 // The webhook topic for `orders/updated` events. 21413 WebhookSubscriptionTopicOrdersUpdated WebhookSubscriptionTopic = "ORDERS_UPDATED" 21414 // The webhook topic for `product_listings/add` events. 21415 WebhookSubscriptionTopicProductListingsAdd WebhookSubscriptionTopic = "PRODUCT_LISTINGS_ADD" 21416 // The webhook topic for `product_listings/remove` events. 21417 WebhookSubscriptionTopicProductListingsRemove WebhookSubscriptionTopic = "PRODUCT_LISTINGS_REMOVE" 21418 // The webhook topic for `product_listings/update` events. 21419 WebhookSubscriptionTopicProductListingsUpdate WebhookSubscriptionTopic = "PRODUCT_LISTINGS_UPDATE" 21420 // The webhook topic for `product_publications/create` events. 21421 WebhookSubscriptionTopicProductPublicationsCreate WebhookSubscriptionTopic = "PRODUCT_PUBLICATIONS_CREATE" 21422 // The webhook topic for `product_publications/delete` events. 21423 WebhookSubscriptionTopicProductPublicationsDelete WebhookSubscriptionTopic = "PRODUCT_PUBLICATIONS_DELETE" 21424 // The webhook topic for `product_publications/update` events. 21425 WebhookSubscriptionTopicProductPublicationsUpdate WebhookSubscriptionTopic = "PRODUCT_PUBLICATIONS_UPDATE" 21426 // The webhook topic for `products/create` events. 21427 WebhookSubscriptionTopicProductsCreate WebhookSubscriptionTopic = "PRODUCTS_CREATE" 21428 // The webhook topic for `products/delete` events. 21429 WebhookSubscriptionTopicProductsDelete WebhookSubscriptionTopic = "PRODUCTS_DELETE" 21430 // The webhook topic for `products/update` events. 21431 WebhookSubscriptionTopicProductsUpdate WebhookSubscriptionTopic = "PRODUCTS_UPDATE" 21432 // The webhook topic for `refunds/create` events. 21433 WebhookSubscriptionTopicRefundsCreate WebhookSubscriptionTopic = "REFUNDS_CREATE" 21434 // The webhook topic for `shipping_addresses/create` events. 21435 WebhookSubscriptionTopicShippingAddressesCreate WebhookSubscriptionTopic = "SHIPPING_ADDRESSES_CREATE" 21436 // The webhook topic for `shipping_addresses/update` events. 21437 WebhookSubscriptionTopicShippingAddressesUpdate WebhookSubscriptionTopic = "SHIPPING_ADDRESSES_UPDATE" 21438 // The webhook topic for `shop/update` events. 21439 WebhookSubscriptionTopicShopUpdate WebhookSubscriptionTopic = "SHOP_UPDATE" 21440 // The webhook topic for `tax_services/create` events. 21441 WebhookSubscriptionTopicTaxServicesCreate WebhookSubscriptionTopic = "TAX_SERVICES_CREATE" 21442 // The webhook topic for `tax_services/update` events. 21443 WebhookSubscriptionTopicTaxServicesUpdate WebhookSubscriptionTopic = "TAX_SERVICES_UPDATE" 21444 // The webhook topic for `themes/create` events. 21445 WebhookSubscriptionTopicThemesCreate WebhookSubscriptionTopic = "THEMES_CREATE" 21446 // The webhook topic for `themes/delete` events. 21447 WebhookSubscriptionTopicThemesDelete WebhookSubscriptionTopic = "THEMES_DELETE" 21448 // The webhook topic for `themes/publish` events. 21449 WebhookSubscriptionTopicThemesPublish WebhookSubscriptionTopic = "THEMES_PUBLISH" 21450 // The webhook topic for `themes/update` events. 21451 WebhookSubscriptionTopicThemesUpdate WebhookSubscriptionTopic = "THEMES_UPDATE" 21452 // The webhook topic for `variants/in_stock` events. 21453 WebhookSubscriptionTopicVariantsInStock WebhookSubscriptionTopic = "VARIANTS_IN_STOCK" 21454 // The webhook topic for `variants/out_of_stock` events. 21455 WebhookSubscriptionTopicVariantsOutOfStock WebhookSubscriptionTopic = "VARIANTS_OUT_OF_STOCK" 21456 // The webhook topic for `inventory_levels/connect` events. 21457 WebhookSubscriptionTopicInventoryLevelsConnect WebhookSubscriptionTopic = "INVENTORY_LEVELS_CONNECT" 21458 // The webhook topic for `inventory_levels/update` events. 21459 WebhookSubscriptionTopicInventoryLevelsUpdate WebhookSubscriptionTopic = "INVENTORY_LEVELS_UPDATE" 21460 // The webhook topic for `inventory_levels/disconnect` events. 21461 WebhookSubscriptionTopicInventoryLevelsDisconnect WebhookSubscriptionTopic = "INVENTORY_LEVELS_DISCONNECT" 21462 // The webhook topic for `attribution/risk` events. 21463 WebhookSubscriptionTopicAttributionRisk WebhookSubscriptionTopic = "ATTRIBUTION_RISK" 21464 // The webhook topic for `inventory_items/create` events. 21465 WebhookSubscriptionTopicInventoryItemsCreate WebhookSubscriptionTopic = "INVENTORY_ITEMS_CREATE" 21466 // The webhook topic for `inventory_items/update` events. 21467 WebhookSubscriptionTopicInventoryItemsUpdate WebhookSubscriptionTopic = "INVENTORY_ITEMS_UPDATE" 21468 // The webhook topic for `inventory_items/delete` events. 21469 WebhookSubscriptionTopicInventoryItemsDelete WebhookSubscriptionTopic = "INVENTORY_ITEMS_DELETE" 21470 // The webhook topic for `locations/create` events. 21471 WebhookSubscriptionTopicLocationsCreate WebhookSubscriptionTopic = "LOCATIONS_CREATE" 21472 // The webhook topic for `locations/update` events. 21473 WebhookSubscriptionTopicLocationsUpdate WebhookSubscriptionTopic = "LOCATIONS_UPDATE" 21474 // The webhook topic for `locations/delete` events. 21475 WebhookSubscriptionTopicLocationsDelete WebhookSubscriptionTopic = "LOCATIONS_DELETE" 21476 // The webhook topic for `tender_transactions/create` events. 21477 WebhookSubscriptionTopicTenderTransactionsCreate WebhookSubscriptionTopic = "TENDER_TRANSACTIONS_CREATE" 21478 // The webhook topic for `app_purchases_one_time/update` events. 21479 WebhookSubscriptionTopicAppPurchasesOneTimeUpdate WebhookSubscriptionTopic = "APP_PURCHASES_ONE_TIME_UPDATE" 21480 // The webhook topic for `app_subscriptions/update` events. 21481 WebhookSubscriptionTopicAppSubscriptionsUpdate WebhookSubscriptionTopic = "APP_SUBSCRIPTIONS_UPDATE" 21482 // The webhook topic for `locales/create` events. 21483 WebhookSubscriptionTopicLocalesCreate WebhookSubscriptionTopic = "LOCALES_CREATE" 21484 // The webhook topic for `locales/update` events. 21485 WebhookSubscriptionTopicLocalesUpdate WebhookSubscriptionTopic = "LOCALES_UPDATE" 21486 // The webhook topic for `domains/create` events. 21487 WebhookSubscriptionTopicDomainsCreate WebhookSubscriptionTopic = "DOMAINS_CREATE" 21488 // The webhook topic for `domains/update` events. 21489 WebhookSubscriptionTopicDomainsUpdate WebhookSubscriptionTopic = "DOMAINS_UPDATE" 21490 // The webhook topic for `domains/destroy` events. 21491 WebhookSubscriptionTopicDomainsDestroy WebhookSubscriptionTopic = "DOMAINS_DESTROY" 21492 // The webhook topic for `subscription_contracts/create` events. 21493 WebhookSubscriptionTopicSubscriptionContractsCreate WebhookSubscriptionTopic = "SUBSCRIPTION_CONTRACTS_CREATE" 21494 // The webhook topic for `subscription_contracts/update` events. 21495 WebhookSubscriptionTopicSubscriptionContractsUpdate WebhookSubscriptionTopic = "SUBSCRIPTION_CONTRACTS_UPDATE" 21496 // The webhook topic for `profiles/create` events. 21497 WebhookSubscriptionTopicProfilesCreate WebhookSubscriptionTopic = "PROFILES_CREATE" 21498 // The webhook topic for `profiles/update` events. 21499 WebhookSubscriptionTopicProfilesUpdate WebhookSubscriptionTopic = "PROFILES_UPDATE" 21500 // The webhook topic for `profiles/delete` events. 21501 WebhookSubscriptionTopicProfilesDelete WebhookSubscriptionTopic = "PROFILES_DELETE" 21502 // The webhook topic for `subscription_billing_attempts/success` events. 21503 WebhookSubscriptionTopicSubscriptionBillingAttemptsSuccess WebhookSubscriptionTopic = "SUBSCRIPTION_BILLING_ATTEMPTS_SUCCESS" 21504 // The webhook topic for `subscription_billing_attempts/failure` events. 21505 WebhookSubscriptionTopicSubscriptionBillingAttemptsFailure WebhookSubscriptionTopic = "SUBSCRIPTION_BILLING_ATTEMPTS_FAILURE" 21506 ) 21507 21508 var AllWebhookSubscriptionTopic = []WebhookSubscriptionTopic{ 21509 WebhookSubscriptionTopicAppUninstalled, 21510 WebhookSubscriptionTopicCartsCreate, 21511 WebhookSubscriptionTopicCartsUpdate, 21512 WebhookSubscriptionTopicChannelsDelete, 21513 WebhookSubscriptionTopicCheckoutsCreate, 21514 WebhookSubscriptionTopicCheckoutsDelete, 21515 WebhookSubscriptionTopicCheckoutsUpdate, 21516 WebhookSubscriptionTopicCustomerPaymentMethodsCreate, 21517 WebhookSubscriptionTopicCustomerPaymentMethodsUpdate, 21518 WebhookSubscriptionTopicCustomerPaymentMethodsRevoke, 21519 WebhookSubscriptionTopicCollectionListingsAdd, 21520 WebhookSubscriptionTopicCollectionListingsRemove, 21521 WebhookSubscriptionTopicCollectionListingsUpdate, 21522 WebhookSubscriptionTopicCollectionPublicationsCreate, 21523 WebhookSubscriptionTopicCollectionPublicationsDelete, 21524 WebhookSubscriptionTopicCollectionPublicationsUpdate, 21525 WebhookSubscriptionTopicCollectionsCreate, 21526 WebhookSubscriptionTopicCollectionsDelete, 21527 WebhookSubscriptionTopicCollectionsUpdate, 21528 WebhookSubscriptionTopicCustomerGroupsCreate, 21529 WebhookSubscriptionTopicCustomerGroupsDelete, 21530 WebhookSubscriptionTopicCustomerGroupsUpdate, 21531 WebhookSubscriptionTopicCustomersCreate, 21532 WebhookSubscriptionTopicCustomersDelete, 21533 WebhookSubscriptionTopicCustomersDisable, 21534 WebhookSubscriptionTopicCustomersEnable, 21535 WebhookSubscriptionTopicCustomersUpdate, 21536 WebhookSubscriptionTopicDisputesCreate, 21537 WebhookSubscriptionTopicDisputesUpdate, 21538 WebhookSubscriptionTopicDraftOrdersCreate, 21539 WebhookSubscriptionTopicDraftOrdersDelete, 21540 WebhookSubscriptionTopicDraftOrdersUpdate, 21541 WebhookSubscriptionTopicFulfillmentEventsCreate, 21542 WebhookSubscriptionTopicFulfillmentEventsDelete, 21543 WebhookSubscriptionTopicFulfillmentsCreate, 21544 WebhookSubscriptionTopicFulfillmentsUpdate, 21545 WebhookSubscriptionTopicAttributedSessionsFirst, 21546 WebhookSubscriptionTopicAttributedSessionsLast, 21547 WebhookSubscriptionTopicOrderTransactionsCreate, 21548 WebhookSubscriptionTopicOrdersCancelled, 21549 WebhookSubscriptionTopicOrdersCreate, 21550 WebhookSubscriptionTopicOrdersDelete, 21551 WebhookSubscriptionTopicOrdersEdited, 21552 WebhookSubscriptionTopicOrdersFulfilled, 21553 WebhookSubscriptionTopicOrdersPaid, 21554 WebhookSubscriptionTopicOrdersPartiallyFulfilled, 21555 WebhookSubscriptionTopicOrdersUpdated, 21556 WebhookSubscriptionTopicProductListingsAdd, 21557 WebhookSubscriptionTopicProductListingsRemove, 21558 WebhookSubscriptionTopicProductListingsUpdate, 21559 WebhookSubscriptionTopicProductPublicationsCreate, 21560 WebhookSubscriptionTopicProductPublicationsDelete, 21561 WebhookSubscriptionTopicProductPublicationsUpdate, 21562 WebhookSubscriptionTopicProductsCreate, 21563 WebhookSubscriptionTopicProductsDelete, 21564 WebhookSubscriptionTopicProductsUpdate, 21565 WebhookSubscriptionTopicRefundsCreate, 21566 WebhookSubscriptionTopicShippingAddressesCreate, 21567 WebhookSubscriptionTopicShippingAddressesUpdate, 21568 WebhookSubscriptionTopicShopUpdate, 21569 WebhookSubscriptionTopicTaxServicesCreate, 21570 WebhookSubscriptionTopicTaxServicesUpdate, 21571 WebhookSubscriptionTopicThemesCreate, 21572 WebhookSubscriptionTopicThemesDelete, 21573 WebhookSubscriptionTopicThemesPublish, 21574 WebhookSubscriptionTopicThemesUpdate, 21575 WebhookSubscriptionTopicVariantsInStock, 21576 WebhookSubscriptionTopicVariantsOutOfStock, 21577 WebhookSubscriptionTopicInventoryLevelsConnect, 21578 WebhookSubscriptionTopicInventoryLevelsUpdate, 21579 WebhookSubscriptionTopicInventoryLevelsDisconnect, 21580 WebhookSubscriptionTopicAttributionRisk, 21581 WebhookSubscriptionTopicInventoryItemsCreate, 21582 WebhookSubscriptionTopicInventoryItemsUpdate, 21583 WebhookSubscriptionTopicInventoryItemsDelete, 21584 WebhookSubscriptionTopicLocationsCreate, 21585 WebhookSubscriptionTopicLocationsUpdate, 21586 WebhookSubscriptionTopicLocationsDelete, 21587 WebhookSubscriptionTopicTenderTransactionsCreate, 21588 WebhookSubscriptionTopicAppPurchasesOneTimeUpdate, 21589 WebhookSubscriptionTopicAppSubscriptionsUpdate, 21590 WebhookSubscriptionTopicLocalesCreate, 21591 WebhookSubscriptionTopicLocalesUpdate, 21592 WebhookSubscriptionTopicDomainsCreate, 21593 WebhookSubscriptionTopicDomainsUpdate, 21594 WebhookSubscriptionTopicDomainsDestroy, 21595 WebhookSubscriptionTopicSubscriptionContractsCreate, 21596 WebhookSubscriptionTopicSubscriptionContractsUpdate, 21597 WebhookSubscriptionTopicProfilesCreate, 21598 WebhookSubscriptionTopicProfilesUpdate, 21599 WebhookSubscriptionTopicProfilesDelete, 21600 WebhookSubscriptionTopicSubscriptionBillingAttemptsSuccess, 21601 WebhookSubscriptionTopicSubscriptionBillingAttemptsFailure, 21602 } 21603 21604 func (e WebhookSubscriptionTopic) IsValid() bool { 21605 switch e { 21606 case WebhookSubscriptionTopicAppUninstalled, WebhookSubscriptionTopicCartsCreate, WebhookSubscriptionTopicCartsUpdate, WebhookSubscriptionTopicChannelsDelete, WebhookSubscriptionTopicCheckoutsCreate, WebhookSubscriptionTopicCheckoutsDelete, WebhookSubscriptionTopicCheckoutsUpdate, WebhookSubscriptionTopicCustomerPaymentMethodsCreate, WebhookSubscriptionTopicCustomerPaymentMethodsUpdate, WebhookSubscriptionTopicCustomerPaymentMethodsRevoke, WebhookSubscriptionTopicCollectionListingsAdd, WebhookSubscriptionTopicCollectionListingsRemove, WebhookSubscriptionTopicCollectionListingsUpdate, WebhookSubscriptionTopicCollectionPublicationsCreate, WebhookSubscriptionTopicCollectionPublicationsDelete, WebhookSubscriptionTopicCollectionPublicationsUpdate, WebhookSubscriptionTopicCollectionsCreate, WebhookSubscriptionTopicCollectionsDelete, WebhookSubscriptionTopicCollectionsUpdate, WebhookSubscriptionTopicCustomerGroupsCreate, WebhookSubscriptionTopicCustomerGroupsDelete, WebhookSubscriptionTopicCustomerGroupsUpdate, WebhookSubscriptionTopicCustomersCreate, WebhookSubscriptionTopicCustomersDelete, WebhookSubscriptionTopicCustomersDisable, WebhookSubscriptionTopicCustomersEnable, WebhookSubscriptionTopicCustomersUpdate, WebhookSubscriptionTopicDisputesCreate, WebhookSubscriptionTopicDisputesUpdate, WebhookSubscriptionTopicDraftOrdersCreate, WebhookSubscriptionTopicDraftOrdersDelete, WebhookSubscriptionTopicDraftOrdersUpdate, WebhookSubscriptionTopicFulfillmentEventsCreate, WebhookSubscriptionTopicFulfillmentEventsDelete, WebhookSubscriptionTopicFulfillmentsCreate, WebhookSubscriptionTopicFulfillmentsUpdate, WebhookSubscriptionTopicAttributedSessionsFirst, WebhookSubscriptionTopicAttributedSessionsLast, WebhookSubscriptionTopicOrderTransactionsCreate, WebhookSubscriptionTopicOrdersCancelled, WebhookSubscriptionTopicOrdersCreate, WebhookSubscriptionTopicOrdersDelete, WebhookSubscriptionTopicOrdersEdited, WebhookSubscriptionTopicOrdersFulfilled, WebhookSubscriptionTopicOrdersPaid, WebhookSubscriptionTopicOrdersPartiallyFulfilled, WebhookSubscriptionTopicOrdersUpdated, WebhookSubscriptionTopicProductListingsAdd, WebhookSubscriptionTopicProductListingsRemove, WebhookSubscriptionTopicProductListingsUpdate, WebhookSubscriptionTopicProductPublicationsCreate, WebhookSubscriptionTopicProductPublicationsDelete, WebhookSubscriptionTopicProductPublicationsUpdate, WebhookSubscriptionTopicProductsCreate, WebhookSubscriptionTopicProductsDelete, WebhookSubscriptionTopicProductsUpdate, WebhookSubscriptionTopicRefundsCreate, WebhookSubscriptionTopicShippingAddressesCreate, WebhookSubscriptionTopicShippingAddressesUpdate, WebhookSubscriptionTopicShopUpdate, WebhookSubscriptionTopicTaxServicesCreate, WebhookSubscriptionTopicTaxServicesUpdate, WebhookSubscriptionTopicThemesCreate, WebhookSubscriptionTopicThemesDelete, WebhookSubscriptionTopicThemesPublish, WebhookSubscriptionTopicThemesUpdate, WebhookSubscriptionTopicVariantsInStock, WebhookSubscriptionTopicVariantsOutOfStock, WebhookSubscriptionTopicInventoryLevelsConnect, WebhookSubscriptionTopicInventoryLevelsUpdate, WebhookSubscriptionTopicInventoryLevelsDisconnect, WebhookSubscriptionTopicAttributionRisk, WebhookSubscriptionTopicInventoryItemsCreate, WebhookSubscriptionTopicInventoryItemsUpdate, WebhookSubscriptionTopicInventoryItemsDelete, WebhookSubscriptionTopicLocationsCreate, WebhookSubscriptionTopicLocationsUpdate, WebhookSubscriptionTopicLocationsDelete, WebhookSubscriptionTopicTenderTransactionsCreate, WebhookSubscriptionTopicAppPurchasesOneTimeUpdate, WebhookSubscriptionTopicAppSubscriptionsUpdate, WebhookSubscriptionTopicLocalesCreate, WebhookSubscriptionTopicLocalesUpdate, WebhookSubscriptionTopicDomainsCreate, WebhookSubscriptionTopicDomainsUpdate, WebhookSubscriptionTopicDomainsDestroy, WebhookSubscriptionTopicSubscriptionContractsCreate, WebhookSubscriptionTopicSubscriptionContractsUpdate, WebhookSubscriptionTopicProfilesCreate, WebhookSubscriptionTopicProfilesUpdate, WebhookSubscriptionTopicProfilesDelete, WebhookSubscriptionTopicSubscriptionBillingAttemptsSuccess, WebhookSubscriptionTopicSubscriptionBillingAttemptsFailure: 21607 return true 21608 } 21609 return false 21610 } 21611 21612 func (e WebhookSubscriptionTopic) String() string { 21613 return string(e) 21614 } 21615 21616 func (e *WebhookSubscriptionTopic) UnmarshalGQL(v interface{}) error { 21617 str, ok := v.(string) 21618 if !ok { 21619 return fmt.Errorf("enums must be strings") 21620 } 21621 21622 *e = WebhookSubscriptionTopic(str) 21623 if !e.IsValid() { 21624 return fmt.Errorf("%s is not a valid WebhookSubscriptionTopic", str) 21625 } 21626 return nil 21627 } 21628 21629 func (e WebhookSubscriptionTopic) MarshalGQL(w io.Writer) { 21630 fmt.Fprint(w, strconv.Quote(e.String())) 21631 } 21632 21633 // Units of measurement for weight. 21634 type WeightUnit string 21635 21636 const ( 21637 // 1 kilogram equals 1000 grams. 21638 WeightUnitKilograms WeightUnit = "KILOGRAMS" 21639 // Metric system unit of mass. 21640 WeightUnitGrams WeightUnit = "GRAMS" 21641 // 1 pound equals 16 ounces. 21642 WeightUnitPounds WeightUnit = "POUNDS" 21643 // Imperial system unit of mass. 21644 WeightUnitOunces WeightUnit = "OUNCES" 21645 ) 21646 21647 var AllWeightUnit = []WeightUnit{ 21648 WeightUnitKilograms, 21649 WeightUnitGrams, 21650 WeightUnitPounds, 21651 WeightUnitOunces, 21652 } 21653 21654 func (e WeightUnit) IsValid() bool { 21655 switch e { 21656 case WeightUnitKilograms, WeightUnitGrams, WeightUnitPounds, WeightUnitOunces: 21657 return true 21658 } 21659 return false 21660 } 21661 21662 func (e WeightUnit) String() string { 21663 return string(e) 21664 } 21665 21666 func (e *WeightUnit) UnmarshalGQL(v interface{}) error { 21667 str, ok := v.(string) 21668 if !ok { 21669 return fmt.Errorf("enums must be strings") 21670 } 21671 21672 *e = WeightUnit(str) 21673 if !e.IsValid() { 21674 return fmt.Errorf("%s is not a valid WeightUnit", str) 21675 } 21676 return nil 21677 } 21678 21679 func (e WeightUnit) MarshalGQL(w io.Writer) { 21680 fmt.Fprint(w, strconv.Quote(e.String())) 21681 }