Documentation
¶
Index ¶
- type AccessScope
- type AccountType
- type AddAllProductsOperation
- type AdditionalFee
- type App
- type AppConnection
- type AppCredit
- type AppCreditConnection
- type AppCreditEdge
- type AppDeveloperType
- type AppEdge
- type AppFeedback
- type AppInstallation
- type AppPublicCategory
- type AppPurchaseOneTime
- type AppPurchaseOneTimeConnection
- type AppPurchaseOneTimeEdge
- type AppPurchaseStatus
- type AppRecurringPricing
- type AppRevenueAttributionRecord
- type AppRevenueAttributionRecordConnection
- type AppRevenueAttributionRecordEdge
- type AppRevenueAttributionType
- type AppSubscription
- type AppSubscriptionConnection
- type AppSubscriptionDiscount
- type AppSubscriptionDiscountAmount
- type AppSubscriptionDiscountPercentage
- type AppSubscriptionDiscountValue
- type AppSubscriptionEdge
- type AppSubscriptionLineItem
- type AppSubscriptionStatus
- type AppUsagePricing
- type Attribute
- type AvailableChannelDefinitionsByChannel
- type BundlesFeature
- type BusinessEntity
- type BusinessEntityAddress
- type BuyerExperienceConfiguration
- type CalculatedDraftOrderLineItem
- type CartTransformEligibleOperations
- type CartTransformFeature
- type CashRoundingAdjustment
- type Catalog
- type CatalogConnection
- type CatalogCsvOperation
- type CatalogEdge
- type CatalogStatus
- type ChannelDefinition
- type ChannelInformation
- type Collection
- type CollectionConnection
- type CollectionEdge
- type CollectionRule
- type CollectionRuleCategoryCondition
- type CollectionRuleColumn
- type CollectionRuleConditionObject
- type CollectionRuleRelation
- type CollectionRuleSet
- type CollectionSortOrder
- type Color
- type Company
- type CompanyAddress
- type CompanyContact
- type CompanyContactConnection
- type CompanyContactEdge
- type CompanyContactRole
- type CompanyContactRoleAssignment
- type CompanyContactRoleAssignmentConnection
- type CompanyContactRoleAssignmentEdge
- type CompanyContactRoleConnection
- type CompanyContactRoleEdge
- type CompanyLocation
- type CompanyLocationConnection
- type CompanyLocationEdge
- type CompanyLocationStaffMemberAssignment
- type CompanyLocationStaffMemberAssignmentConnection
- type CompanyLocationStaffMemberAssignmentEdge
- type CompanyLocationTaxSettings
- type Count
- type CountriesInShippingZones
- type CountryCode
- type CountryHarmonizedSystemCode
- type CountryHarmonizedSystemCodeConnection
- type CountryHarmonizedSystemCodeEdge
- type CurrencyCode
- type CurrencyFormats
- type CurrencySetting
- type CurrencySettingConnection
- type CurrencySettingEdge
- type Customer
- type CustomerAccountsV2
- type CustomerAccountsVersion
- type CustomerConnection
- type CustomerConsentCollectedFrom
- type CustomerCreditCard
- type CustomerCreditCardBillingAddress
- type CustomerEdge
- type CustomerEmailMarketingConsentState
- type CustomerEmailMarketingState
- type CustomerJourneySummary
- type CustomerMarketingOptInLevel
- type CustomerMergeError
- type CustomerMergeErrorFieldType
- type CustomerMergeRequest
- type CustomerMergeRequestStatus
- type CustomerMergeable
- type CustomerMoment
- type CustomerMomentConnection
- type CustomerMomentEdge
- type CustomerPaymentInstrument
- type CustomerPaymentInstrumentBillingAddress
- type CustomerPaymentMethod
- type CustomerPaymentMethodConnection
- type CustomerPaymentMethodEdge
- type CustomerPaymentMethodRevocationReason
- type CustomerPaypalBillingAgreement
- type CustomerProductSubscriberStatus
- type CustomerShopPayAgreement
- type CustomerSmsMarketingConsentState
- type CustomerSmsMarketingState
- type CustomerState
- type CustomerStatistics
- type CustomerVisit
- type Date
- type DateTime
- type DayOfTheWeek
- type Decimal
- type DeletionEvent
- type DeletionEventSubjectType
- type DeliveryAvailableService
- type DeliveryBrandedPromise
- type DeliveryCarrierService
- type DeliveryCondition
- type DeliveryConditionCriteria
- type DeliveryConditionField
- type DeliveryConditionOperator
- type DeliveryCountry
- type DeliveryCountryAndZone
- type DeliveryCountryCodeOrRestOfWorld
- type DeliveryCountryCodesOrRestOfWorld
- type DeliveryLocalPickupSettings
- type DeliveryLocalPickupTime
- type DeliveryLocationGroup
- type DeliveryLocationGroupZone
- type DeliveryLocationGroupZoneConnection
- type DeliveryLocationGroupZoneEdge
- type DeliveryMethod
- type DeliveryMethodAdditionalInformation
- type DeliveryMethodDefinition
- type DeliveryMethodDefinitionConnection
- type DeliveryMethodDefinitionCounts
- type DeliveryMethodDefinitionEdge
- type DeliveryMethodType
- type DeliveryParticipant
- type DeliveryParticipantService
- type DeliveryProfile
- type DeliveryProfileItem
- type DeliveryProfileItemConnection
- type DeliveryProfileItemEdge
- type DeliveryProfileLocationGroup
- type DeliveryProvince
- type DeliveryRateDefinition
- type DeliveryRateProvider
- type DeliveryZone
- type DepositConfiguration
- type DepositPercentage
- type DigitalWallet
- type DiscountAllocation
- type DiscountApplication
- type DiscountApplicationAllocationMethod
- type DiscountApplicationConnection
- type DiscountApplicationEdge
- type DiscountApplicationTargetSelection
- type DiscountApplicationTargetType
- type DiscountClass
- type DiscountNode
- type DiscountTargetType
- type DiscountType
- type DisputeStatus
- type DisputeType
- type Domain
- type DomainLocalization
- type DraftOrder
- type DraftOrderAppliedDiscount
- type DraftOrderAppliedDiscountType
- type DraftOrderConnection
- type DraftOrderEdge
- type DraftOrderLineItem
- type DraftOrderLineItemConnection
- type DraftOrderLineItemEdge
- type DraftOrderPlatformDiscount
- type DraftOrderPlatformDiscountAllocation
- type DraftOrderPlatformDiscountAllocationTarget
- type DraftOrderStatus
- type DraftOrderWarning
- type Duty
- type EditableProperty
- type Event
- type EventConnection
- type EventEdge
- type ExchangeLineItem
- type ExchangeLineItemConnection
- type ExchangeLineItemEdge
- type FailedRequirement
- type FileError
- type FileErrorCode
- type FileStatus
- type FilterOption
- type FinancialSummaryDiscountAllocation
- type FinancialSummaryDiscountApplication
- type Fulfillment
- type FulfillmentConnection
- type FulfillmentDisplayStatus
- type FulfillmentEdge
- type FulfillmentEvent
- type FulfillmentEventConnection
- type FulfillmentEventEdge
- type FulfillmentEventStatus
- type FulfillmentHold
- type FulfillmentHoldReason
- type FulfillmentLineItem
- type FulfillmentLineItemConnection
- type FulfillmentLineItemEdge
- type FulfillmentOrder
- type FulfillmentOrderAction
- type FulfillmentOrderAssignedLocation
- type FulfillmentOrderConnection
- type FulfillmentOrderDestination
- type FulfillmentOrderEdge
- type FulfillmentOrderInternationalDuties
- type FulfillmentOrderLineItem
- type FulfillmentOrderLineItemConnection
- type FulfillmentOrderLineItemEdge
- type FulfillmentOrderLineItemFinancialSummary
- type FulfillmentOrderLineItemWarning
- type FulfillmentOrderLocationForMove
- type FulfillmentOrderLocationForMoveConnection
- type FulfillmentOrderLocationForMoveEdge
- type FulfillmentOrderMerchantRequest
- type FulfillmentOrderMerchantRequestConnection
- type FulfillmentOrderMerchantRequestEdge
- type FulfillmentOrderMerchantRequestKind
- type FulfillmentOrderRequestStatus
- type FulfillmentOrderStatus
- type FulfillmentOrderSupportedAction
- type FulfillmentOriginAddress
- type FulfillmentService
- type FulfillmentServiceType
- type FulfillmentStatus
- type FulfillmentTrackingInfo
- type HasMetafields
- type HasStoreCreditAccounts
- type Image
- type InventoryItem
- type InventoryItemMeasurement
- type InventoryLevel
- type InventoryLevelConnection
- type InventoryLevelEdge
- type InventoryQuantity
- type InventoryScheduleChange
- type InventoryScheduleChangeConnection
- type InventoryScheduleChangeEdge
- type JSON
- type LanguageCode
- type LineItem
- type LineItemConnection
- type LineItemEdge
- type LineItemGroup
- type LineItemSellingPlan
- type Link
- type LinkedMetafield
- type LocalizedField
- type LocalizedFieldConnection
- type LocalizedFieldEdge
- type LocalizedFieldKey
- type LocalizedFieldPurpose
- type Location
- type LocationAddress
- type LocationConnection
- type LocationEdge
- type LocationSuggestedAddress
- type MailingAddress
- type MailingAddressConnection
- type MailingAddressEdge
- type MailingAddressValidationResult
- type Market
- type MarketCatalog
- type MarketCatalogConnection
- type MarketCatalogEdge
- type MarketConnection
- type MarketCurrencySettings
- type MarketEdge
- type MarketWebPresence
- type MarketWebPresenceConnection
- type MarketWebPresenceEdge
- type MarketWebPresenceRootURL
- type MarketingChannel
- type MarketingEvent
- type MarketingTactic
- type Media
- type MediaConnection
- type MediaContentType
- type MediaEdge
- type MediaError
- type MediaErrorCode
- type MediaImage
- type MediaImageOriginalSource
- type MediaPreview
- type MediaPreviewImage
- type MediaPreviewImageStatus
- type MediaStatus
- type MediaWarning
- type MediaWarningCode
- type MerchantApprovalSignals
- type Metafield
- type MetafieldAccess
- type MetafieldAdminAccess
- type MetafieldArgs
- type MetafieldCapabilities
- type MetafieldCapabilityAdminFilterable
- type MetafieldCapabilitySmartCollectionCondition
- type MetafieldConnection
- type MetafieldCustomerAccountAccess
- type MetafieldDefinition
- type MetafieldDefinitionAdminFilterStatus
- type MetafieldDefinitionConstraintValue
- type MetafieldDefinitionConstraintValueConnection
- type MetafieldDefinitionConstraintValueEdge
- type MetafieldDefinitionConstraints
- type MetafieldDefinitionSupportedValidation
- type MetafieldDefinitionType
- type MetafieldDefinitionValidation
- type MetafieldDefinitionValidationStatus
- type MetafieldEdge
- type MetafieldOwnerType
- type MetafieldStorefrontAccess
- type Money
- type MoneyBag
- type MoneyV2
- type NavigationItem
- type Node
- type OnlineStore
- type OnlineStorePasswordProtection
- type Order
- type OrderActionType
- type OrderAdjustment
- type OrderAdjustmentConnection
- type OrderAdjustmentDiscrepancyReason
- type OrderAdjustmentEdge
- type OrderApp
- type OrderCancelReason
- type OrderCancellation
- type OrderConnection
- type OrderDisplayFinancialStatus
- type OrderDisplayFulfillmentStatus
- type OrderDisputeSummary
- type OrderEdge
- type OrderPaymentCollectionDetails
- type OrderReturnStatus
- type OrderRiskAssessment
- type OrderRiskRecommendationResult
- type OrderRiskSummary
- type OrderTransaction
- type OrderTransactionConnection
- type OrderTransactionEdge
- type OrderTransactionErrorCode
- type OrderTransactionKind
- type OrderTransactionStatus
- type PageInfo
- type PaymentInstrument
- type PaymentMandate
- type PaymentSchedule
- type PaymentScheduleConnection
- type PaymentScheduleEdge
- type PaymentSettings
- type PaymentTerms
- type PaymentTermsTemplate
- type PaymentTermsType
- type PaypalExpressSubscriptionsGatewayStatus
- type Plan
- type PredictedSpendTier
- type PriceList
- type PriceListAdjustment
- type PriceListAdjustmentSettings
- type PriceListAdjustmentType
- type PriceListCompareAtMode
- type PriceListParent
- type PriceListPrice
- type PriceListPriceConnection
- type PriceListPriceEdge
- type PriceListPriceOriginType
- type PricingDetails
- type PricingPercentageValue
- type PricingValue
- type Product
- type ProductBundleComponent
- type ProductBundleComponentConnection
- type ProductBundleComponentEdge
- type ProductBundleComponentOptionSelection
- type ProductBundleComponentOptionSelectionStatus
- type ProductBundleComponentOptionSelectionValue
- type ProductBundleComponentQuantityOption
- type ProductBundleComponentQuantityOptionValue
- type ProductConnection
- type ProductEdge
- type ProductFeed
- type ProductFeedStatus
- type ProductOption
- type ProductOptionValue
- type ProductOptionValueSwatch
- type ProductPriceRangeV2
- type ProductStatus
- type ProductVariant
- type ProductVariantComponent
- type ProductVariantComponentConnection
- type ProductVariantComponentEdge
- type ProductVariantConnection
- type ProductVariantContextualPricing
- type ProductVariantEdge
- type ProductVariantInventoryPolicy
- type Publication
- type PublicationConnection
- type PublicationEdge
- type PublicationOperation
- type PublicationResourceOperation
- type Publishable
- type PurchasingCompany
- type PurchasingEntity
- type QuantityPriceBreak
- type QuantityPriceBreakConnection
- type QuantityPriceBreakEdge
- type QuantityRule
- type QuantityRuleConnection
- type QuantityRuleEdge
- type QuantityRuleOriginType
- type Refund
- type RefundConnection
- type RefundDuty
- type RefundEdge
- type RefundLineItem
- type RefundLineItemConnection
- type RefundLineItemEdge
- type RefundLineItemRestockType
- type RefundShippingLine
- type RefundShippingLineConnection
- type RefundShippingLineEdge
- type ResourceAlert
- type ResourceAlertAction
- type ResourceAlertIcon
- type ResourceAlertSeverity
- type ResourceFeedback
- type ResourceFeedbackState
- type ResourceOperation
- type ResourceOperationStatus
- type ResourcePublication
- type ResourcePublicationConnection
- type ResourcePublicationEdge
- type ResourcePublicationV2
- type ResourcePublicationV2Connection
- type ResourcePublicationV2Edge
- type Return
- type ReturnConnection
- type ReturnDecline
- type ReturnDeclineReason
- type ReturnEdge
- type ReturnLineItemType
- type ReturnLineItemTypeConnection
- type ReturnLineItemTypeEdge
- type ReturnReason
- type ReturnShippingFee
- type ReturnStatus
- type ReverseDelivery
- type ReverseDeliveryConnection
- type ReverseDeliveryDeliverable
- type ReverseDeliveryEdge
- type ReverseDeliveryLabelV2
- type ReverseDeliveryLineItem
- type ReverseDeliveryLineItemConnection
- type ReverseDeliveryLineItemEdge
- type ReverseDeliveryShippingDeliverable
- type ReverseDeliveryTrackingV2
- type ReverseFulfillmentOrder
- type ReverseFulfillmentOrderConnection
- type ReverseFulfillmentOrderDisposition
- type ReverseFulfillmentOrderDispositionType
- type ReverseFulfillmentOrderEdge
- type ReverseFulfillmentOrderLineItem
- type ReverseFulfillmentOrderLineItemConnection
- type ReverseFulfillmentOrderLineItemEdge
- type ReverseFulfillmentOrderStatus
- type ReverseFulfillmentOrderThirdPartyConfirmation
- type ReverseFulfillmentOrderThirdPartyConfirmationStatus
- type RiskAssessmentResult
- type RiskFact
- type RiskFactSentiment
- type RowCount
- type SEO
- type Sale
- type SaleActionType
- type SaleConnection
- type SaleEdge
- type SaleLineType
- type SaleTax
- type SalesAgreement
- type SalesAgreementConnection
- type SalesAgreementEdge
- type SearchFilterOptions
- type SearchResult
- type SearchResultConnection
- type SearchResultEdge
- type SelectedOption
- type SellingPlan
- type SellingPlanAnchor
- type SellingPlanAnchorType
- type SellingPlanBillingPolicy
- type SellingPlanCategory
- type SellingPlanCheckoutCharge
- type SellingPlanCheckoutChargePercentageValue
- type SellingPlanCheckoutChargeType
- type SellingPlanCheckoutChargeValue
- type SellingPlanConnection
- type SellingPlanDeliveryPolicy
- type SellingPlanEdge
- type SellingPlanFixedBillingPolicy
- type SellingPlanFixedDeliveryPolicy
- type SellingPlanFixedDeliveryPolicyIntent
- type SellingPlanFixedDeliveryPolicyPreAnchorBehavior
- type SellingPlanFixedPricingPolicy
- type SellingPlanFulfillmentTrigger
- type SellingPlanGroup
- type SellingPlanGroupConnection
- type SellingPlanGroupEdge
- type SellingPlanInterval
- type SellingPlanInventoryPolicy
- type SellingPlanPricingPolicy
- type SellingPlanPricingPolicyAdjustmentType
- type SellingPlanPricingPolicyAdjustmentValue
- type SellingPlanPricingPolicyPercentageValue
- type SellingPlanRecurringBillingPolicy
- type SellingPlanRecurringDeliveryPolicy
- type SellingPlanRecurringDeliveryPolicyIntent
- type SellingPlanRecurringDeliveryPolicyPreAnchorBehavior
- type SellingPlanRecurringPricingPolicy
- type SellingPlanRemainingBalanceChargeTrigger
- type SellingPlanReserve
- type ShippingLine
- type ShippingLineConnection
- type ShippingLineEdge
- type ShippingRefund
- type Shop
- type ShopAddress
- type ShopAlert
- type ShopAlertAction
- type ShopBranding
- type ShopCustomerAccountSetting
- type ShopFeatures
- type ShopLocale
- type ShopPlan
- type ShopPolicy
- type ShopPolicyType
- type ShopResourceLimits
- type ShopifyPaymentsAccount
- type ShopifyPaymentsAdjustmentOrder
- type ShopifyPaymentsAssociatedOrder
- type ShopifyPaymentsBalanceTransaction
- type ShopifyPaymentsBalanceTransactionAssociatedPayout
- type ShopifyPaymentsBalanceTransactionConnection
- type ShopifyPaymentsBalanceTransactionEdge
- type ShopifyPaymentsBalanceTransactionPayoutStatus
- type ShopifyPaymentsBankAccount
- type ShopifyPaymentsBankAccountConnection
- type ShopifyPaymentsBankAccountEdge
- type ShopifyPaymentsBankAccountStatus
- type ShopifyPaymentsChargeStatementDescriptor
- type ShopifyPaymentsDispute
- type ShopifyPaymentsDisputeConnection
- type ShopifyPaymentsDisputeEdge
- type ShopifyPaymentsDisputeReason
- type ShopifyPaymentsDisputeReasonDetails
- type ShopifyPaymentsExtendedAuthorization
- type ShopifyPaymentsPayout
- type ShopifyPaymentsPayoutConnection
- type ShopifyPaymentsPayoutEdge
- type ShopifyPaymentsPayoutInterval
- type ShopifyPaymentsPayoutSchedule
- type ShopifyPaymentsPayoutStatus
- type ShopifyPaymentsPayoutSummary
- type ShopifyPaymentsPayoutTransactionType
- type ShopifyPaymentsRefundSet
- type ShopifyPaymentsSourceType
- type ShopifyPaymentsTransactionSet
- type ShopifyPaymentsTransactionType
- type ShopifyProtectEligibilityStatus
- type ShopifyProtectOrderEligibility
- type ShopifyProtectOrderSummary
- type ShopifyProtectStatus
- type StaffMember
- type StaffMemberPrivateData
- type StandardMetafieldDefinitionTemplate
- type StoreCreditAccount
- type StoreCreditAccountConnection
- type StoreCreditAccountEdge
- type StoreCreditAccountTransaction
- type StoreCreditAccountTransactionConnection
- type StoreCreditAccountTransactionEdge
- type StoreCreditAccountTransactionOrigin
- type StoreCreditSystemEvent
- type StorefrontAccessToken
- type StorefrontAccessTokenConnection
- type StorefrontAccessTokenEdge
- type String
- type StringConnection
- type StringEdge
- type SubscriptionAppliedCodeDiscount
- type SubscriptionBillingAttempt
- type SubscriptionBillingAttemptConnection
- type SubscriptionBillingAttemptEdge
- type SubscriptionBillingAttemptErrorCode
- type SubscriptionBillingAttemptProcessingError
- type SubscriptionBillingPolicy
- type SubscriptionContract
- type SubscriptionContractConnection
- type SubscriptionContractEdge
- type SubscriptionContractLastBillingErrorType
- type SubscriptionContractLastPaymentStatus
- type SubscriptionContractSubscriptionStatus
- type SubscriptionCyclePriceAdjustment
- type SubscriptionDeliveryPolicy
- type SubscriptionDiscount
- type SubscriptionDiscountAllocation
- type SubscriptionDiscountEntitledLines
- type SubscriptionDiscountFixedAmountValue
- type SubscriptionDiscountPercentageValue
- type SubscriptionDiscountRejectionReason
- type SubscriptionDiscountValue
- type SubscriptionLine
- type SubscriptionLineConnection
- type SubscriptionLineEdge
- type SubscriptionManualDiscount
- type SubscriptionManualDiscountConnection
- type SubscriptionManualDiscountEdge
- type SubscriptionPricingPolicy
- type SuggestedOrderTransaction
- type SuggestedOrderTransactionKind
- type SuggestedRefund
- type SuggestedReturnRefund
- type TaxExemption
- type TaxLine
- type TaxonomyAttribute
- type TaxonomyCategory
- type TaxonomyCategoryAttribute
- type TaxonomyCategoryAttributeConnection
- type TaxonomyCategoryAttributeEdge
- type TaxonomyChoiceListAttribute
- type TaxonomyMeasurementAttribute
- type TaxonomyValue
- type TaxonomyValueConnection
- type TaxonomyValueEdge
- type TransactionFee
- type Translation
- type TypedAttribute
- type URL
- type UTMParameters
- type UnitPriceMeasurement
- type UnitPriceMeasurementMeasuredType
- type UnitPriceMeasurementMeasuredUnit
- type UnitSystem
- type UserError
- type VaultCreditCard
- type VaultPaypalBillingAgreement
- type Weight
- type WeightUnit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessScope ¶
type AccessScope struct {
// A readable string that represents the access scope. The string usually follows the format `{action}_{resource}`.
// {action} is read or write, and {resource} is the resource that the action can be performed on.
// `{action}` and `{resource}` are separated by an underscore. For example, `read_orders` or `write_products`.
Handle string `json:"handle"`
Description string `json:"description"` // A description of the actions that the access scope allows an app to perform.
}
The permission required to access a Shopify Admin API or Storefront API resource for a shop. Merchants grant access scopes that are requested by applications.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/AccessScope
type AccountType ¶
type AccountType string
Possible account types that a staff member can have.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/AccountType
const ( AccountTypeCollaborator AccountType = "COLLABORATOR" // The account of a partner who collaborates with the merchant. AccountTypeCollaboratorTeamMember AccountType = "COLLABORATOR_TEAM_MEMBER" // The account of a partner collaborator team member. AccountTypeInvited AccountType = "INVITED" // The user has not yet accepted the invitation to create an account. AccountTypeInvitedStoreOwner AccountType = "INVITED_STORE_OWNER" // The user has not yet accepted the invitation to become the store owner. AccountTypeRegular AccountType = "REGULAR" // The account can access the Shopify admin. AccountTypeRequested AccountType = "REQUESTED" // The admin has not yet accepted the request to create a collaborator account. AccountTypeRestricted AccountType = "RESTRICTED" // The account cannot access the Shopify admin. AccountTypeSAML AccountType = "SAML" // The account can be signed into via a SAML provider. )
type AddAllProductsOperation ¶
type AddAllProductsOperation struct {
ID string `json:"id"` // A globally-unique ID.
RowCount *RowCount `json:"rowCount,omitempty"` // Represents a rows objects within this background operation.
ProcessedRowCount int `json:"processedRowCount"` // The count of processed rows, summing imported, failed, and skipped rows.
Status ResourceOperationStatus `json:"status"` // The status of this operation.
}
Represents an operation publishing all products to a publication.
Requires `read_products` access scope or `read_publications` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/AddAllProductsOperation
type AdditionalFee ¶
type AdditionalFee struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The name of the additional fee.
Price *MoneyBag `json:"price,omitempty"` // The price of the additional fee.
TaxLines []TaxLine `json:"taxLines"` // A list of taxes charged on the additional fee.
}
The additional fees that have been applied to the order.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/AdditionalFee
type App ¶
type App struct {
ID string `json:"id"` // Globally unique ID.
Title string `json:"title"` // Name of the app.
Handle string `json:"handle"` // Handle of the app.
ApiKey string `json:"apiKey"` // A unique application API identifier.
AppStoreURL URL `json:"appStoreUrl"` // App store page URL of the app.
AppStoreDeveloperURL URL `json:"appStoreDeveloperUrl"` // App store page URL of the developer who created the app.
Description string `json:"description"` // Description of the app.
DeveloperName string `json:"developerName"` // The name of the app developer.
DeveloperType AppDeveloperType `json:"developerType"` // The type of app developer.
Banner *Image `json:"banner,omitempty"` // Banner image for the app.
Icon *Image `json:"icon,omitempty"` // Icon that represents the app.
AvailableAccessScopes []AccessScope `json:"availableAccessScopes"` // All requestable access scopes available to the app.
OptionalAccessScopes []AccessScope `json:"optionalAccessScopes"` // The optional scopes requested by the app. Lists the optional access scopes the app has declared in its configuration. These scopes are optionally requested by the app after installation.
RequestedAccessScopes []AccessScope `json:"requestedAccessScopes"` // The access scopes requested by the app. Lists the access scopes the app has declared in its configuration. Merchant must grant approval to these scopes for the app to be installed.
Features []string `json:"features"` // A list of app features that are shown in the Shopify App Store listing.
FailedRequirements []FailedRequirement `json:"failedRequirements"` // Requirements that must be met before the app can be installed.
Feedback *AppFeedback `json:"feedback,omitempty"` // Feedback from this app about the store.
Installation *AppInstallation `json:"installation,omitempty"` // Corresponding AppInstallation for this shop and App. Returns null if the App is not installed.
InstallURL URL `json:"installUrl"` // Webpage where you can install the app.
IsPostPurchaseAppInUse bool `json:"isPostPurchaseAppInUse"` // Whether the app is the [post purchase](https://shopify.dev/apps/checkout/post-purchase) app in use.
PreviouslyInstalled bool `json:"previouslyInstalled"` // Whether the app was previously installed on the current shop.
PricingDetails string `json:"pricingDetails"` // Detailed information about the app pricing.
PricingDetailsSummary string `json:"pricingDetailsSummary"` // Summary of the app pricing details.
PrivacyPolicyURL URL `json:"privacyPolicyUrl"` // Link to app privacy policy.
PublicCategory AppPublicCategory `json:"publicCategory"` // The public category for the app.
Published bool `json:"published"` // Whether the app is published to the Shopify App Store.
Screenshots []Image `json:"screenshots"` // Screenshots of the app.
ShopifyDeveloped bool `json:"shopifyDeveloped"` // Whether the app was developed by Shopify.
UninstallMessage string `json:"uninstallMessage"` // Message that appears when the app is uninstalled. For example: 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.
WebhookAPIVersion string `json:"webhookApiVersion"` // The webhook API version for the app.
}
A Shopify application.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/App
type AppConnection ¶
type AppConnection struct {
Edges []AppEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []App `json:"nodes,omitempty"` // A list of nodes that are contained in AppEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Apps.
type AppCredit ¶
type AppCredit struct {
ID string `json:"id"` // A globally-unique ID.
Description string `json:"description"` // The description of the app credit.
Test bool `json:"test"` // Whether the app credit is a test transaction.
Amount *MoneyV2 `json:"amount,omitempty"` // The amount that can be used towards future app purchases in Shopify.
CreatedAt DateTime `json:"created_at"` // The date and time when the app credit was created.
}
App credits can be applied by the merchant towards future app purchases, subscriptions, or usage records in Shopify.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/AppCredit
type AppCreditConnection ¶
type AppCreditConnection struct {
Edges []AppCreditEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []AppCredit `json:"nodes,omitempty"` // A list of nodes that are contained in AppCreditEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple AppCredits.
type AppCreditEdge ¶
type AppCreditEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *AppCredit `json:"node,omitempty"` // The item at the end of AppCreditEdge.
}
An auto-generated type which holds one AppCredit and a cursor during pagination.
type AppDeveloperType ¶
type AppDeveloperType string
Possible types of app developer.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/AppDeveloperType
const ( AppDeveloperTypeMerchant AppDeveloperType = "MERCHANT" // Indicates the app developer works directly for a Merchant. AppDeveloperTypePartner AppDeveloperType = "PARTNER" // Indicates the app developer is a Partner. AppDeveloperTypeShopify AppDeveloperType = "SHOPIFY" // Indicates the app developer is Shopify. AppDeveloperTypeUnknown AppDeveloperType = "UNKNOWN" // Indicates the app developer is unknown. It is not categorized as any of the other developer types. )
func (AppDeveloperType) Validate ¶
func (devType AppDeveloperType) Validate() error
Validate AppDeveloperType
type AppEdge ¶
type AppEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *App `json:"node,omitempty"` // The item at the end of AppEdge.
}
An auto-generated type which holds one App and a cursor during pagination.
type AppFeedback ¶
type AppFeedback struct {
App *App `json:"app,omitempty"` // The application associated to the feedback.
Messages []UserError `json:"messages"` // The feedback message presented to the merchant.
Link *Link `json:"link,omitempty"` // A link to where merchants can resolve errors.
State ResourceFeedbackState `json:"state"` // Conveys the state of the feedback and whether it requires merchant action or not.
FeedbackGeneratedAt DateTime `json:"feedbackGeneratedAt"` // The date and time when the app feedback was generated.
}
Reports the status of shops and their resources and displays this information within Shopify admin. AppFeedback is used to notify merchants about steps they need to take to set up an app on their store.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/AppFeedback
type AppInstallation ¶
type AppInstallation struct {
ID string `json:"id"` // Globally unique ID.
App *App `json:"app"` // Application which is installed.
LaunchURL URL `json:"launchUrl"` // The URL to launch the application.
UninstallURL URL `json:"uninstallUrl"` // The URL to uninstall the application.
AccessScopes []AccessScope `json:"accessScopes"` // The access scopes granted to the application by a merchant during installation.
Publication *Publication `json:"publication,omitempty"` // The publication associated with the installed application.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
ActiveSubscriptions []AppSubscription `json:"activeSubscriptions"` // The active application subscriptions billed to the shop on a recurring basis.
AllSubscriptions *AppSubscriptionConnection `json:"allSubscriptions,omitempty"` // All subscriptions created for a shop.
Credits *AppCreditConnection `json:"credits,omitempty"` // Credits that can be used towards future app purchases.
OneTimePurchases *AppPurchaseOneTimeConnection `json:"oneTimePurchases,omitempty"` // One-time purchases to a shop.
RevenueAttributionRecords *AppRevenueAttributionRecordConnection `json:"revenueAttributionRecords,omitempty"` // The records that track the externally-captured revenue for the app. The records are used for revenue attribution purposes.
}
Represents an installed application on a shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/AppInstallation
type AppPublicCategory ¶
type AppPublicCategory string
The public-facing category for an app.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/AppPublicCategory
const ( AppPublicCategoryCustom AppPublicCategory = "CUSTOM" // The app's public category is custom. AppPublicCategoryOther AppPublicCategory = "OTHER" // The app's public category is other. An app is in this category if it's not classified under any of the other app types (private, public, or custom). AppPublicCategoryPrivate AppPublicCategory = "PRIVATE" // The app's public category is private. AppPublicCategoryPublic AppPublicCategory = "PUBLIC" // The app's public category is public. )
func (AppPublicCategory) Validate ¶
func (category AppPublicCategory) Validate() error
Validate AppPublicCategory
type AppPurchaseOneTime ¶
type AppPurchaseOneTime struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The name of the app purchase.
Status AppPurchaseStatus `json:"status"` // The status of the app purchase.
Test bool `json:"test"` // Whether the app purchase is a test transaction.
Price *MoneyV2 `json:"price,omitempty"` // The amount to be charged to the store for the app purchase.
CreatedAt DateTime `json:"created_at"` // The date and time when the app purchase occurred.
}
Services and features purchased once by a store.
Requires The staff member must have permission to manage app billing or approve app charges if authenticated with an online access token as described in https://shopify.dev/apps/auth/oauth/access-modes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/AppPurchaseOneTime
type AppPurchaseOneTimeConnection ¶
type AppPurchaseOneTimeConnection struct {
Edges []AppPurchaseOneTimeEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []AppPurchaseOneTime `json:"nodes,omitempty"` // A list of nodes that are contained in AppPurchaseOneTimeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple AppPurchaseOneTimes.
type AppPurchaseOneTimeEdge ¶
type AppPurchaseOneTimeEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *AppPurchaseOneTime `json:"node,omitempty"` // The item at the end of AppPurchaseOneTimeEdge.
}
An auto-generated type which holds one AppPurchaseOneTime and a cursor during pagination.
type AppPurchaseStatus ¶
type AppPurchaseStatus string
The approval status of the app purchase.
The merchant is charged for the purchase immediately after approval, and the status changes to `active`. If the payment fails, then the app purchase remains `pending`.
Purchases start as `pending` and can change to: `active`, `declined`, `expired`. After a purchase changes, it remains in that final state.
const ( AppPurchaseStatusActive AppPurchaseStatus = "ACTIVE" // The app purchase was approved by the merchant and has been activated by the app. Active app purchases are charged to the merchant and are paid out to the partner. AppPurchaseStatusDeclined AppPurchaseStatus = "DECLINED" // The app purchase was declined by the merchant. AppPurchaseStatusExpired AppPurchaseStatus = "EXPIRED" // The app purchase was not accepted within two days of being created. AppPurchaseStatusPending AppPurchaseStatus = "PENDING" // The app purchase is pending approval by the merchant. AppPurchaseStatusAccepted AppPurchaseStatus = "ACCEPTED" // 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. As of API version `2021-01`, when a merchant accepts an app purchase, the status immediately changes from `pending` to `active`. )
func (AppPurchaseStatus) Validate ¶
func (status AppPurchaseStatus) Validate() error
Validate AppPurchaseStatus
type AppRecurringPricing ¶
type AppRecurringPricing struct {
Discount *AppSubscriptionDiscount `json:"discount,omitempty"` // The discount applied to the subscription for a given number of billing intervals.
Interval string `json:"interval"` // The frequency at which the subscribing shop is billed for an app subscription. Valid values: `ANNUAL`, `EVERY_30_DAYS`
Price *MoneyV2 `json:"price"` // The amount and currency to be charged to the subscribing shop every billing interval.
}
The pricing information about a subscription app. The object contains an interval (the frequency at which the shop is billed for an app subscription) and a price (the amount to be charged to the subscribing shop at each interval).
type AppRevenueAttributionRecord ¶
type AppRevenueAttributionRecord struct {
ID string `json:"id"` // A globally-unique ID.
Type AppRevenueAttributionType `json:"type"` // The type of revenue attribution.
Test bool `json:"test"` // Whether the app purchase is a test transaction.
Amount *MoneyV2 `json:"amount,omitempty"` // The financial amount captured in this attribution.
IdempotencyKey string `json:"idempotencyKey"` // The unique value submitted during the creation of the app revenue attribution record. For more information, refer to [Idempotent requests](https://shopify.dev/api/usage/idempotent-requests).
CapturedAt DateTime `json:"capturedAt"` // The timestamp when the financial amount was captured.
CreatedAt DateTime `json:"created_at"` // The timestamp at which this revenue attribution was issued.
}
Represents app revenue that was captured externally by the partner.
Requires Access allowed for apps with `app_attributions` scope using offline tokens only. This API is under a private program and is not available to all partners.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/AppRevenueAttributionRecord
type AppRevenueAttributionRecordConnection ¶
type AppRevenueAttributionRecordConnection struct {
Edges []AppRevenueAttributionRecordEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []AppRevenueAttributionRecord `json:"nodes,omitempty"` // A list of nodes that are contained in AppRevenueAttributionRecordEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple AppRevenueAttributionRecords.
type AppRevenueAttributionRecordEdge ¶
type AppRevenueAttributionRecordEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *AppCredit `json:"node,omitempty"` // The item at the end of AppRevenueAttributionRecordEdge.
}
An auto-generated type which holds one AppRevenueAttributionRecord and a cursor during pagination.
type AppRevenueAttributionType ¶
type AppRevenueAttributionType string
Represents the billing types of revenue attribution.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/AppRevenueAttributionType
const ( AppRevenueAttributionTypeApplicationPurchase AppRevenueAttributionType = "APPLICATION_PURCHASE" // App purchase related revenue collection. AppRevenueAttributionTypeApplicationSubscription AppRevenueAttributionType = "APPLICATION_SUBSCRIPTION" // App subscription revenue collection. AppRevenueAttributionTypeApplicationUsage AppRevenueAttributionType = "APPLICATION_USAGE" // App usage-based revenue collection. AppRevenueAttributionTypeOther AppRevenueAttributionType = "OTHER" // Other app revenue collection type. )
func (AppRevenueAttributionType) Validate ¶
func (t AppRevenueAttributionType) Validate() error
Validate AppRevenueAttributionType
type AppSubscription ¶
type AppSubscription struct {
ID string `json:"id"` // A globally-unique ID.
Status AppSubscriptionStatus `json:"status,omitempty"` // The status of the app subscription.
Name string `json:"name"` // The name of the app subscription. This is the plan name.
LineItems []AppSubscriptionLineItem `json:"lineItems"` // The plans attached to the app subscription.
CurrentPeriodEnd *string `json:"currentPeriodEnd,omitempty"` // The date and time when the current app subscription period ends. Returns `null` if the subscription isn't active.
ReturnURL string `json:"returnUrl,omitempty"` // The URL that the merchant is redirected to after approving the app subscription.
CreatedAt string `json:"createdAt,omitempty"` // The date and time when the app subscription was created.
}
Provides users access to services and/or features for a duration of time.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscription
type AppSubscriptionConnection ¶
type AppSubscriptionConnection struct {
Edges []AppSubscriptionEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []AppSubscription `json:"nodes,omitempty"` // A list of nodes that are contained in AppSubscriptionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple AppSubscriptions.
type AppSubscriptionDiscount ¶
type AppSubscriptionDiscount struct {
DurationLimitInIntervals int `json:"durationLimitInIntervals,omitempty"` // The total number of billing intervals to which the discount will be applied. The discount will be applied to an indefinite number of billing intervals if this value is blank.
PriceAfterDiscount *MoneyV2 `json:"priceAfterDiscount"` // The price of the subscription after the discount is applied.
RemainingDurationInIntervals int `json:"remainingDurationInIntervals"` // The remaining number of billing intervals to which the discount will be applied.
Value *AppSubscriptionDiscountValue `json:"value"` // The value of the discount applied every billing interval.
}
The discount applied to the subscription for a given number of billing intervals.
type AppSubscriptionDiscountAmount ¶
type AppSubscriptionDiscountAmount struct {
Amount *MoneyV2 `json:"amount"` // The fixed amount value of a discount.
}
The fixed amount value of a discount.
type AppSubscriptionDiscountPercentage ¶
type AppSubscriptionDiscountPercentage struct {
Percentage float32 `json:"percentage"` // The percentage value of a discount.
}
The percentage value of a discount.
type AppSubscriptionDiscountValue ¶
type AppSubscriptionDiscountValue struct {
AppSubscriptionDiscountAmount AppSubscriptionDiscountAmount `json:"appSubscriptionDiscountAmount"` // The fixed amount value of a discount.
AppSubscriptionDiscountPercentage AppSubscriptionDiscountPercentage `json:"appSubscriptionDiscountPercentage"` // The percentage value of a discount.
}
The value of the discount applied every billing interval.
type AppSubscriptionEdge ¶
type AppSubscriptionEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *AppSubscription `json:"node,omitempty"` // The item at the end of AppSubscriptionEdge.
}
An auto-generated type which holds one AppSubscription and a cursor during pagination.
type AppSubscriptionLineItem ¶
type AppSubscriptionLineItem struct {
ID string `json:"id"` // A globally-unique ID.
Plan *Plan `json:"plan,omitempty"` // The pricing model for the app subscription.
}
The plans attached to the app subscription.
type AppSubscriptionStatus ¶
type AppSubscriptionStatus string
The status of the app subscription.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/AppSubscriptionStatus
const ( AppSubscriptionStatusActive AppSubscriptionStatus = "ACTIVE" // The app subscription has been approved by the merchant. Active app subscriptions are billed to the shop. After payment, partners receive payouts. AppSubscriptionStatusCancelled AppSubscriptionStatus = "CANCELLED" // The app subscription was cancelled by the app. This could be caused by the app being uninstalled, a new app subscription being activated, or a direct cancellation by the app. This is a terminal state. AppSubscriptionStatusDeclined AppSubscriptionStatus = "DECLINED" // The app subscription was declined by the merchant. This is a terminal state. AppSubscriptionStatusExpired AppSubscriptionStatus = "EXPIRED" // The app subscription wasn't approved by the merchant within two days of being created. This is a terminal state. AppSubscriptionStatusFrozen AppSubscriptionStatus = "FROZEN" // The app subscription is on hold due to non-payment. The subscription re-activates after payments resume. AppSubscriptionStatusPending AppSubscriptionStatus = "PENDING" // The app subscription is pending approval by the merchant. AppSubscriptionStatusAccepted AppSubscriptionStatus = "ACCEPTED" // (Deprecated) The app subscription has been approved by the merchant and is ready to be activated by the app. As of API version `2021-01`, when a merchant approves an app subscription, the status immediately transitions from `pending` to `active`. )
func (AppSubscriptionStatus) Validate ¶
func (order AppSubscriptionStatus) Validate() error
Validate AppSubscriptionStatus
type AppUsagePricing ¶
type AppUsagePricing struct {
BalanceUsed *MoneyV2 `json:"balanceUsed"` // The total usage records for interval.
CappedAmount *MoneyV2 `json:"cappedAmount"` // The capped amount prevents the merchant from being charged for any usage over that amount during a billing period. This prevents billing from exceeding a maximum threshold over the duration of the billing period. For the merchant to continue using the app after exceeding a capped amount, they would need to agree to a new usage charge.
Interval string `json:"interval"` // The frequency with which the app usage records are billed.
Terms string `json:"terms"` // The terms and conditions for app usage pricing. Must be present in order to create usage charges. The terms are presented to the merchant when they approve an app's usage charges.
}
Defines a usage pricing model for the app subscription. These charges are variable based on how much the merchant uses the app.
type Attribute ¶
type Attribute struct {
Key string `json:"key"` // The key or name of the attribute. For example, `"customersFirstOrder"`.
Value string `json:"value"` // The value of the attribute. For example, `"true"`.
}
Represents a generic custom attribute, such as whether an order is a customer's first.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Attribute
type AvailableChannelDefinitionsByChannel ¶
type AvailableChannelDefinitionsByChannel struct {
ChannelName string `json:"channelName"` // The name of the channel.
ChannelDefinitions []ChannelDefinition `json:"channelDefinitions"` // The channel definitions for channels installed on a shop.
}
Represents an object containing all information for channels available to a shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/AvailableChannelDefinitionsByChannel
type BundlesFeature ¶
type BundlesFeature struct {
EligibleForBundles bool `json:"eligibleForBundles"` // Whether a shop is configured properly to sell bundles.
IneligibilityReason string `json:"ineligibilityReason"` // The reason why a shop is not eligible for bundles.
SellsBundles bool `json:"sellsBundles"` // Whether a shop has any fixed bundle products or has a cartTransform function installed.
}
Represents the Bundles feature configuration for the shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/BundlesFeature
type BusinessEntity ¶
type BusinessEntity struct {
ID string `json:"id"` // A globally-unique ID.
CompanyName string `json:"companyName"` // The name of the company associated with the merchant's Business Entity.
DisplayName string `json:"displayName"` // The display name of the merchant's Business Entity.
Primary bool `json:"primary"` // Whether it's the merchant's primary Business Entity.
Address *BusinessEntityAddress `json:"address,omitempty"` // The address of the merchant's Business Entity.
ShopifyPaymentsAccount *ShopifyPaymentsAccount `json:"shopifyPaymentsAccount,omitempty"` // Shopify Payments account information, including balances and payouts.
}
Represents a merchant's Business Entity.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/BusinessEntity
type BusinessEntityAddress ¶
type BusinessEntityAddress struct {
Address1 string `json:"address1"` // The first line of the address. Typically the street address or PO Box number.
Address2 string `json:"address2"` // The second line of the address. Typically the number of the apartment, suite, or unit.
City string `json:"city"` // The name of the city, district, village, or town.
Province string `json:"province"` // The region of the address, such as the province, state, or district.
CountryCode CountryCode `json:"countryCode"` // The country code of the merchant's Business Entity.
Zip string `json:"zip"` // The zip or postal code of the address.
}
Represents the address of a merchant's Business Entity.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/BusinessEntityAddress
type BuyerExperienceConfiguration ¶
type BuyerExperienceConfiguration struct {
CheckoutToDraft bool `json:"checkoutToDraft"` // Whether to checkout to draft order for merchant review.
Deposit *DepositPercentage `json:"deposit,omitempty"` // The portion required to be paid at checkout.
EditableShippingAddress bool `json:"editableShippingAddress"` // Whether to allow customers to use editable shipping addresses.
PaymentTermsTemplate *PaymentTermsTemplate `json:"paymentTermsTemplate,omitempty"` // Represents the merchant configured payment terms.
}
Settings describing the behavior of checkout for a B2B buyer.
Requires `read_customers` access scope or `read_companies` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/BuyerExperienceConfiguration
type CalculatedDraftOrderLineItem ¶
type CalculatedDraftOrderLineItem struct {
UUID string `json:"uuid"` // The UUID of the draft order line item. Must be unique and consistent across requests. This field is mandatory in order to manipulate drafts with bundles.
Name string `json:"name"` // The name of the product.
Title string `json:"title"` // The title of the product or variant. This field only applies to custom line items.
Image *Image `json:"image,omitempty"` // The image associated with the draft order line item.
Product *Product `json:"product,omitempty"` // The product for the line item.
Variant *ProductVariant `json:"variant,omitempty"` // The product variant for the line item.
VariantTitle string `json:"variantTitle"` // The name of the variant.
SKU string `json:"sku"` // The SKU number of the product variant.
Quantity int `json:"quantity"` // The quantity of items. For a bundle item, this is the quantity of bundles, not the quantity of items contained in the bundles themselves.
PriceOverride *MoneyV2 `json:"priceOverride,omitempty"` // The price override for the line item.
Vendor string `json:"vendor"` // The name of the vendor who created the product variant.
IsGiftCard bool `json:"isGiftCard"` // Whether the line item represents the purchase of a gift card.
Custom bool `json:"custom"` // Whether the line item is custom (true) or contains a product variant (false).
RequiresShipping bool `json:"requiresShipping"` // Whether physical shipping is required for the variant.
Weight *Weight `json:"weight,omitempty"` // The weight unit and value.
CustomAttributes []Attribute `json:"customAttributes"` // A list of attributes that represent custom features or special requests.
CustomAttributesV2 []TypedAttribute `json:"customAttributesV2"` // The list of additional information (metafields) with the associated types.
BundleComponents []CalculatedDraftOrderLineItem `json:"bundleComponents"` // The bundle components of the draft order line item.
OriginalUnitPrice *MoneyV2 `json:"originalUnitPrice,omitempty"` // The line item price without any discounts applied.
OriginalUnitPriceWithCurrency *MoneyV2 `json:"originalUnitPriceWithCurrency,omitempty"` // The original custom line item input price.
OriginalUnitPriceSet *MoneyBag `json:"originalUnitPriceSet,omitempty"` // The price without any discounts applied.
OriginalTotal *MoneyV2 `json:"originalTotal,omitempty"` // The total price, excluding discounts, equal to the original unit price multiplied by quantity.
OriginalTotalSet *MoneyBag `json:"originalTotalSet,omitempty"` // The total price excluding discounts, equal to the original unit price multiplied by quantity.
AppliedDiscount *DraftOrderAppliedDiscount `json:"appliedDiscount,omitempty"` // The custom applied discount.
TotalDiscount *MoneyV2 `json:"totalDiscount,omitempty"` // The total value of the discount.
TotalDiscountSet *MoneyBag `json:"totalDiscountSet,omitempty"` // The total discount amount.
DiscountedTotal *MoneyV2 `json:"discountedTotal,omitempty"` // The total price with discounts applied.
ApproximateDiscountedUnitPriceSet *MoneyBag `json:"approximateDiscountedUnitPriceSet,omitempty"` // The `discountedTotal` divided by `quantity`, equal to the average value of the line item price per unit after discounts are applied. This value doesn't include discounts applied to the entire draft order.
DiscountedTotalSet *MoneyBag `json:"discountedTotalSet,omitempty"` // The total price with discounts applied.
Taxable bool `json:"taxable"` // Whether the variant is taxable.
FulfillmentService *FulfillmentService `json:"fulfillmentService,omitempty"` // Name of the service provider who fulfilled the order. Valid values are either manual or the name of the provider. For example, amazon, shipwire. Deleted fulfillment services will return null.
}
The calculated line item for a draft order.
Requires `read_draft_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CalculatedDraftOrderLineItem
type CartTransformEligibleOperations ¶
type CartTransformEligibleOperations struct {
ExpandOperation bool `json:"expandOperation"` // The shop is eligible for expand operations.
MergeOperation bool `json:"mergeOperation"` // The shop is eligible for merge operations.
UpdateOperation bool `json:"updateOperation"` // The shop is eligible for update operations.
}
Represents the cart transform feature configuration for the shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CartTransformEligibleOperations
type CartTransformFeature ¶
type CartTransformFeature struct {
EligibleOperations *CartTransformEligibleOperations `json:"eligibleOperations,omitempty"` // The cart transform operations eligible for the shop.
}
Represents the cart transform feature configuration for the shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CartTransformFeature
type CashRoundingAdjustment ¶
type CashRoundingAdjustment struct {
PaymentSet *MoneyBag `json:"paymentSet,omitempty"` // The rounding adjustment that can be applied to totalReceived for an Order involving cash payments in shop and presentment currencies. Could be a positive or negative value. Value is 0 if there's no rounding, or for non-cash payments.
RefundSet *MoneyBag `json:"refundSet,omitempty"` // The rounding adjustment that can be applied to totalRefunded for an Order involving cash payments in shop and presentment currencies. Could be a positive or negative value. Value is 0 if there's no rounding, or for non-cash refunds.
}
The rounding adjustment applied to total payment or refund received for an Order involving cash payments.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CashRoundingAdjustment
type Catalog ¶
type Catalog struct {
ID string `json:"id"` // A globally-unique ID.
Title string `json:"title"` // The name of the catalog.
Status CatalogStatus `json:"status"` // The status of the catalog.
Operations []ResourceOperation `json:"operations"` // Most recent catalog operations.
PriceList *PriceList `json:"priceList,omitempty"` // The price list associated with the catalog.
Publication *Publication `json:"publication,omitempty"` // A group of products and collections that's published to a catalog.
}
A list of products with publishing and pricing information. A catalog can be associated with a specific context, such as a Market, CompanyLocation, or App.
Requires `read_products` or `read_product_listings` access scope. The user must have permission to view markets or customers or companies.
type CatalogConnection ¶
type CatalogConnection struct {
Edges []CatalogEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Catalog `json:"nodes,omitempty"` // A list of nodes that are contained in CatalogEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Catalogs.
type CatalogCsvOperation ¶
type CatalogCsvOperation struct {
ID string `json:"id"` // A globally-unique ID.
RowCount *RowCount `json:"rowCount,omitempty"` // Represents a rows objects within this background operation.
ProcessedRowCount int `json:"processedRowCount"` // The count of processed rows, summing imported, failed, and skipped rows.
Status ResourceOperationStatus `json:"status"` // The status of this operation.
}
A catalog csv operation represents a CSV file import.
Requires `read_products` access scope or `read_publications` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CatalogCsvOperation
type CatalogEdge ¶
type CatalogEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Catalog `json:"node,omitempty"` // The item at the end of CatalogEdge.
}
An auto-generated type which holds one Catalog and a cursor during pagination.
type CatalogStatus ¶
type CatalogStatus string
The state of a catalog.
const ( CatalogStatusActive CatalogStatus = "ACTIVE" // The catalog is active. CatalogStatusArchived CatalogStatus = "ARCHIVED" // The catalog is archived. CatalogStatusDraft CatalogStatus = "DRAFT" // The catalog is in draft. )
type ChannelDefinition ¶
type ChannelDefinition struct {
ID string `json:"id"` // The unique ID for the channel definition.
Handle string `json:"handle"` // Unique string used as a public identifier for the channel definition.
ChannelName string `json:"channelName"` // Name of the channel that this sub channel belongs to.
SubChannelName string `json:"subChannelName"` // Name of the sub channel (e.g. Online Store, Instagram Shopping, TikTok Live).
SVGIcon string `json:"svgIcon"` // Icon displayed when showing the channel in admin.
IsMarketplace bool `json:"isMarketplace"` // Whether this channel definition represents a marketplace.
}
A channel definition represents channels surfaces on the platform. A channel definition can be a platform or a subsegment of it such as Facebook Home, Instagram Live, Instagram Shops, or WhatsApp chat.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ChannelDefinition
type ChannelInformation ¶
type ChannelInformation struct {
ID string `json:"id"` // A globally-unique ID.
ChannelID string `json:"channelId"` // The unique ID for the channel.
ChannelDefinition *ChannelDefinition `json:"channelDefinition,omitempty"` // The channel definition associated with the channel.
App *App `json:"app,omitempty"` // The app associated with the channel.
}
Contains the information for a given sales channel.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ChannelInformation
type Collection ¶
type Collection struct {
ID string `json:"id"` // A globally-unique ID.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
Ttile string `json:"title"` // The name of the collection. It's displayed in the Shopify admin and is typically displayed in sales channels, such as an online store.
Description string `json:"description"` // A single-line, text-only description of the collection, stripped of any HTML tags and formatting that were included in the description.
DescriptionHtml string `json:"descriptionHtml"` // The description of the collection, including any HTML tags and formatting. This content is typically displayed to customers, such as on an online store, depending on the theme.
Handle string `json:"handle"` // A unique string that identifies the collection. If a handle isn't specified when a collection is created, it's automatically generated from the collection's original title, and typically includes words from the title separated by hyphens. For example, a collection that was created with the title Summer Catalog 2022 might have the `handle summer-catalog-2022`.
SEO *SEO `json:"seo,omitempty"` // If the default SEO fields for page title and description have been modified, contains the modified information.
Image *Image `json:"image"` // The image associated with the collection.
HasProduct bool `json:"hasProduct"` // Whether the collection includes the specified product.
ProductsCount *Count `json:"productsCount,omitempty"` // The number of products in the collection.
Products *ProductConnection `json:"products,omitempty"` // The products that are included in the collection.
RuleSet *CollectionRuleSet `json:"ruleSet,omitempty"` // For a smart (automated) collection, specifies the rules that determine whether a product is included.
SortOrder CollectionSortOrder `json:"sortOrder"` // The order in which the products in the collection are displayed by default in the Shopify admin and in sales channels, such as an online store.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
AvailablePublicationsCount *Count `json:"availablePublicationsCount,omitempty"` // The number of publications that a resource is published to, without feedback errors.
Events *EventConnection `json:"events,omitempty"` // The paginated list of events associated with the host subject.
Feedback *ResourceFeedback `json:"feedback,omitempty"` // Information about the collection that's provided through resource feedback.
Translations []Translation `json:"translations"` // The published translations associated with the resource.
PublishedOnCurrentPublication bool `json:"publishedOnCurrentPublication"` // Whether the resource is published to the app's publication. For example, the resource might be published to the app's online store channel.
PublishedOnPublication bool `json:"publishedOnPublication"` // Whether the resource is published to a specified publication.
ResourcePublicationsCount *Count `json:"resourcePublicationsCount,omitempty"` // The number of publications that a resource is published to, without feedback errors.
ResourcePublications *ResourcePublicationConnection `json:"resourcePublications,omitempty"` // The list of resources that are published to a publication.
ResourcePublicationsV2 *ResourcePublicationV2Connection `json:"resourcePublicationsV2,omitempty"` // The list of resources that are either published or staged to be published to a publication.
UnpublishedPublications *PublicationConnection `json:"unpublishedPublications,omitempty"` // The list of publications that the resource isn't published to.
TemplateSuffix string `json:"templateSuffix"` // The suffix of the Liquid template being used to show the collection in an online store. For example, if the value is custom, then the collection is using the `collection.custom.liquid` template. If the value is null, then the collection is using the default `collection.liquid` template.
UpdatedAt DateTime `json:"updatedAt"` // The date and time (ISO 8601 format) when the collection was last modified.
}
Represents a group of products that can be displayed in online stores and other sales channels in categories, which makes it easy for customers to find them. For example, an athletics store might create different collections for running attire, shoes, and accessories.
Collections can be defined by conditions, such as whether they match certain product tags. These are called smart or automated collections.
Collections can also be created for a custom group of products. These are called custom or manual collections.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection
type CollectionConnection ¶
type CollectionConnection struct {
Edges []CollectionEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Collection `json:"nodes,omitempty"` // A list of nodes that are contained in CollectionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Collections.
type CollectionEdge ¶
type CollectionEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Collection `json:"node,omitempty"` // The item at the end of CollectionEdge.
}
An auto-generated type which holds one Collection and a cursor during pagination.
type CollectionRule ¶
type CollectionRule struct {
Column CollectionRuleColumn `json:"column"` // The attribute that the rule focuses on. For example, `title` or `product_type`.
Condition string `json:"condition"` // The value that the operator is applied to. For example, Hats.
Relation CollectionRuleRelation `json:"relation"` // The type of operator that the rule is based on. For example, `equals`, `contains`, or `not_equals`.
ConditionObject interface{} `json:"conditionObject,omitempty"` // The value that the operator is applied to.
}
Represents at rule that's used to assign products to a collection.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CollectionRule
type CollectionRuleCategoryCondition ¶
type CollectionRuleCategoryCondition struct {
Value interface{}
}
Specifies the taxonomy category to used for the condition of the rule.
Requires `read_products` access scope
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/CollectionRuleConditionObject
type CollectionRuleColumn ¶
type CollectionRuleColumn string
Specifies the attribute of a product being used to populate the smart collection.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CollectionRuleColumn
const ( // An attribute evaluated based on the `compare_at_price` attribute of the product's variants. // With `is_set` relation, the rule matches products with at least one variant with `compare_at_price` set. // With `is_not_set` relation, the rule matches matches products with at least one variant with `compare_at_price` not set. CollectionRuleColumnIsPriceReduced CollectionRuleColumn = "IS_PRICE_REDUCED" // This rule type is designed to dynamically include products in a smart collection based on their category id. // When a specific product category is set as a condition, this rule will match products that are directly assigned to the specified category. CollectionRuleColumnProductCategoryID CollectionRuleColumn = "PRODUCT_CATEGORY_ID" // This category includes metafield definitions that have the useAsCollectionCondition flag set to true. CollectionRuleColumnProductMetafieldDefinition CollectionRuleColumn = "PRODUCT_METAFIELD_DEFINITION" CollectionRuleColumnProductTaxonomyNodeID CollectionRuleColumn = "PRODUCT_TAXONOMY_NODE_ID" // The [product_taxonomy_node_id](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-product-productcategory) attribute. CollectionRuleColumnTag CollectionRuleColumn = "TAG" // The tag attribute. CollectionRuleColumnTitle CollectionRuleColumn = "TITLE" // The title attribute. CollectionRuleColumnType CollectionRuleColumn = "TYPE" // The type attribute. CollectionRuleColumnVariantCompareAtPrice CollectionRuleColumn = "VARIANT_COMPARE_AT_PRICE" // The variant_compare_at_price attribute. CollectionRuleColumnVariantInventory CollectionRuleColumn = "VARIANT_INVENTORY" // The variant_inventory attribute. CollectionRuleColumnVariantMetafieldDefinition CollectionRuleColumn = "VARIANT_METAFIELD_DEFINITION" // This category includes metafield definitions that have the `useAsCollectionCondition` flag set to true. CollectionRuleColumnVariantTitle CollectionRuleColumn = "VARIANT_TITLE" // The variant_price attribute. CollectionRuleColumnVariantPrice CollectionRuleColumn = "VARIANT_PRICE" // The variant_title attribute. CollectionRuleColumnVariantWeight CollectionRuleColumn = "VARIANT_WEIGHT" // The variant_weight attribute. CollectionRuleColumnVendor CollectionRuleColumn = "VENDOR" // The vendor attribute. )
func (CollectionRuleColumn) Validate ¶
func (col CollectionRuleColumn) Validate() error
Validate CollectionRuleColumn
type CollectionRuleConditionObject ¶
type CollectionRuleConditionObject interface {
CollectionRuleCategoryCondition
}
Specifies object for the condition of the rule.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/CollectionRuleConditionObject
type CollectionRuleRelation ¶
type CollectionRuleRelation string
Specifies the relationship between the `column` and the `condition`.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CollectionRuleRelation
const ( CollectionRuleRelationContains CollectionRuleRelation = "CONTAINS" // The attribute contains the condition. CollectionRuleRelationEndsWith CollectionRuleRelation = "ENDS_WITH" // The attribute ends with the condition. CollectionRuleRelationEquals CollectionRuleRelation = "EQUALS" // The attribute is equal to the condition. CollectionRuleRelationGreaterThan CollectionRuleRelation = "GREATER_THAN" // The attribute is greater than the condition. CollectionRuleRelationIsNotSet CollectionRuleRelation = "IS_NOT_SET" // The attribute is not set (equal to `null`). CollectionRuleRelationIsSet CollectionRuleRelation = "IS_SET" // The attribute is set (not equal to `null`). CollectionRuleRelationLessThan CollectionRuleRelation = "LESS_THAN" // The attribute is less than the condition. CollectionRuleRelationNotContains CollectionRuleRelation = "NOT_CONTAINS" // The attribute does not contain the condition. CollectionRuleRelationNotEquals CollectionRuleRelation = "NOT_EQUALS" // The attribute does not equal the condition. CollectionRuleRelationStartsWith CollectionRuleRelation = "STARTS_WITH" // The attribute starts with the condition. )
func (CollectionRuleRelation) Validate ¶
func (rel CollectionRuleRelation) Validate() error
Validate CollectionRuleRelation
type CollectionRuleSet ¶
type CollectionRuleSet struct {
Rules []CollectionRule `json:"rules"` // The rules used to assign products to the collection.
AppliedDisjunctively bool `json:"appliedDisjunctively"` // Whether products must match any or all of the rules to be included in the collection. If true, then products must match at least one of the rules to be included in the collection. If false, then products must match all of the rules to be included in the collection.
}
The set of rules that are used to determine which products are included in the collection.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CollectionRuleSet
type CollectionSortOrder ¶
type CollectionSortOrder string
Specifies the sort order for the products in the collection.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CollectionSortOrder
const ( CollectionSortOrderAlphaASC CollectionSortOrder = "ALPHA_ASC" // Alphabetically, in ascending order (A - Z). CollectionSortOrderAlphaDESC CollectionSortOrder = "ALPHA_DESC" // Alphabetically, in descending order (Z - A). CollectionSortOrderBestSelling CollectionSortOrder = "BEST_SELLING" // By best-selling products. CollectionSortOrderCreated CollectionSortOrder = "CREATED" // By date created, in ascending order (oldest - newest). CollectionSortOrderCreatedDESC CollectionSortOrder = "CREATED_DESC" // By date created, in descending order (newest - oldest). CollectionSortOrderManual CollectionSortOrder = "MANUAL" // In the order set manually by the merchant. CollectionSortOrderPriceASC CollectionSortOrder = "PRICE_ASC" // By price, in ascending order (lowest - highest). CollectionSortOrderPriceDESC CollectionSortOrder = "PRICE_DESC" // By price, in descending order (highest - lowest). )
func (CollectionSortOrder) Validate ¶
func (order CollectionSortOrder) Validate() error
Validate CollectionSortOrder
type Color ¶
type Color string // A string containing a hexadecimal representation of a color. For example, `#6A8D48`.
type Company ¶
type Company struct {
ID string `json:"id"` // A globally-unique ID.
ExternalID string `json:"externalId"` // A unique externally-supplied ID for the company.
Name string `json:"name"` // The name of the company.
MainContact *CompanyContact `json:"mainContact,omitempty"` // The main contact for the company.
Contacts *CompanyContactConnection `json:"contacts,omitempty"` // The list of contacts in the company.
ContactsCount *Count `json:"contactsCount,omitempty"` // The number of contacts that belong to the company.
ContactRoles *CompanyContactRoleConnection `json:"contactRoles,omitempty"` // The list of roles for the company contacts.
DefaultRole *CompanyContactRole `json:"defaultRole,omitempty"` // The role proposed by default for a contact at the company.
Orders *OrderConnection `json:"orders,omitempty"` // The list of the company's orders.
DraftOrders *DraftOrderConnection `json:"draftOrders,omitempty"` // The list of the company's draft orders.
OrdersCount *Count `json:"ordersCount,omitempty"` // The total number of orders placed for this company, across all its locations.
TotalSpent *MoneyV2 `json:"totalSpent,omitempty"` // The total amount spent by this company, across all its locations.
Locations *CompanyLocationConnection `json:"locations,omitempty"` // The list of locations in the company.
LocationsCount *Count `json:"locationsCount,omitempty"` // The number of locations that belong to the company.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
Events *EventConnection `json:"events,omitempty"` // A list of events associated with the host subject.
HasTimelineComment bool `json:"hasTimelineComment"` // Whether the merchant added a timeline comment to the company.
LifetimeDuration string `json:"lifetimeDuration"` // The lifetime duration of the company, since it became a customer of the shop. Examples: `1 year`, `2 months`, `3 days`.
Note string `json:"note"` // A note about the company.
DefaultCursor string `json:"defaultCursor"` // A default cursor that returns the single next record, sorted ascending by ID.
CreatedAt DateTime `json:"createdAt"` // The date and time (ISO 8601 format) at which the company was created at Shopify.
UpdatedAt DateTime `json:"updatedAt"` // The date and time (ISO 8601 format) at which the company was last updated.
CustomerSince DateTime `json:"customerSince"` // The date and time (ISO 8601 format) at which the company became the customer.
}
Represents information about a company which is also a customer of the shop.
Requires `read_customers` access scope or `read_companies` access scope. Also: The API client must be installed on a Shopify Plus store.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Company
type CompanyAddress ¶
type CompanyAddress struct {
ID string `json:"id"` // A globally-unique ID.
CompanyName string `json:"companyName"` // The name of the company.
FirstName string `json:"firstName"` // The first name of the recipient.
LastName string `json:"lastName"` // The last name of the recipient.
Recipient string `json:"recipient"` // The identity of the recipient e.g. 'Receiving Department'.
Address1 string `json:"address1"` // The first line of the address. Typically the street address or PO Box number.
Address2 string `json:"address2"` // The second line of the address. Typically the number of the apartment, suite, or unit.
City string `json:"city"` // The name of the city, district, village, or town.
Province string `json:"province"` // The region of the address, such as the province, state, or district.
Country string `json:"country"` // The name of the country.
CountryCode CountryCode `json:"countryCode"` // The two-letter code for the country of the address. For example, US.
Zip string `json:"zip"` // The zip or postal code of the address.
Phone string `json:"phone"` // A unique phone number for the customer. Formatted using E.164 standard. For example, +16135551111.
FormattedAddress []string `json:"formattedAddress"` // The formatted version of the address.
FormattedArea string `json:"formattedArea"` // A comma-separated list of the values for city, province, and country.
CreatedAt DateTime `json:"createdAt"` // The date and time (ISO 8601 format) at which the company address was created.
UpdatedAt DateTime `json:"updatedAt"` // The date and time (ISO 8601 format) at which the company address was last updated.
}
Represents a billing or shipping address for a company location.
Requires `read_customers` access scope or `read_companies` access scope. Also: The API client must be installed on a Shopify Plus store.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyAddress
type CompanyContact ¶
type CompanyContact struct {
ID string `json:"id"` // A globally-unique ID.
Title string `json:"title"` // The company contact's job title.
Company *Company `json:"company,omitempty"` // The company to which the contact belongs.
RoleAssignments *CompanyContactRoleAssignmentConnection `json:"roleAssignments,omitempty"` // The list of roles assigned to this company contact.
IsMainContact bool `json:"isMainContact"` // Whether the contact is the main contact of the company.
Customer *Customer `json:"customer,omitempty"` // The customer associated to this contact.
Orders *OrderConnection `json:"orders,omitempty"` // The list of orders for the company contact.
DraftOrders *DraftOrderConnection `json:"draftOrders,omitempty"` // The list of draft orders for the company contact.
Locale string `json:"locale"` // The company contact's locale (language).
LifetimeDuration string `json:"lifetimeDuration"` // The lifetime duration of the company contact, since its creation date on Shopify. Examples: `1 year`, `2 months`, `3 days`.
CreatedAt DateTime `json:"createdAt"` // The date and time (ISO 8601 format) at which the company contact was created at Shopify.
UpdatedAt DateTime `json:"updatedAt"` // The date and time (ISO 8601 format) at which the company contact was last updated.
}
A person that acts on behalf of company associated to a customer.
Requires `read_customers` access scope or `read_companies` access scope. Also: The API client must be installed on a Shopify Plus store.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContact
type CompanyContactConnection ¶
type CompanyContactConnection struct {
Edges []CompanyContactEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []CompanyContact `json:"nodes,omitempty"` // A list of nodes that are contained in CompanyContactEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple CompanyContacts.
type CompanyContactEdge ¶
type CompanyContactEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *CompanyContact `json:"node,omitempty"` // The item at the end of CompanyContactEdge.
}
An auto-generated type which holds one CompanyContact and a cursor during pagination.
type CompanyContactRole ¶
type CompanyContactRole struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The name of a role. For example, `admin` or `buyer`.
Note string `json:"note"` // A note for the role.
}
The role for a company contact.
Requires `read_customers` access scope or `read_companies` access scope. Also: The API client must be installed on a Shopify Plus store.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContactRole
type CompanyContactRoleAssignment ¶
type CompanyContactRoleAssignment struct {
ID string `json:"id"` // A globally-unique ID.
Company *Company `json:"company,omitempty"` // The company this role assignment belongs to.
CompanyContact *CompanyContact `json:"companyContact,omitempty"` // The company contact for whom this role is assigned.
Role *CompanyContactRole `json:"role,omitempty"` // The role that's assigned to the company contact.
CompanyLocation *CompanyLocation `json:"companyLocation,omitempty"` // The company location to which the role is assigned.
CreatedAt DateTime `json:"createdAt"` // The date and time (ISO 8601 format) when the assignment record was created.
UpdatedAt DateTime `json:"updatedAt"` // The date and time (ISO 8601 format) when the assignment record was last updated.
}
The CompanyContactRoleAssignment describes the company and location associated to a company contact's role.
Requires `read_customers` access scope or `read_companies` access scope. Also: The API client must be installed on a Shopify Plus store.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyContactRoleAssignment
type CompanyContactRoleAssignmentConnection ¶
type CompanyContactRoleAssignmentConnection struct {
Edges []CompanyContactRoleAssignmentEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []CompanyContactRoleAssignment `json:"nodes,omitempty"` // A list of nodes that are contained in CompanyContactRoleAssignmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple CompanyContactRoleAssignments.
type CompanyContactRoleAssignmentEdge ¶
type CompanyContactRoleAssignmentEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *CompanyContactRoleAssignment `json:"node"` // The item at the end of `CompanyContactRoleAssignmentEdge`.
}
An auto-generated type which holds one `CompanyContactRoleAssignment` and a cursor during pagination.
type CompanyContactRoleConnection ¶
type CompanyContactRoleConnection struct {
Edges []CompanyContactRoleEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []CompanyContactRole `json:"nodes,omitempty"` // A list of nodes that are contained in CompanyContactRoleEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple CompanyContactRoles.
type CompanyContactRoleEdge ¶
type CompanyContactRoleEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *CompanyContactRole `json:"node,omitempty"` // The item at the end of CompanyContactRoleEdge.
}
An auto-generated type which holds one CompanyContactRole and a cursor during pagination.
type CompanyLocation ¶
type CompanyLocation struct {
ID string `json:"id"` // A globally-unique ID.
ExternalID string `json:"externalId"` // A unique externally-supplied ID for the company location.
Name string `json:"name"` // The name of the company location.
Company *Company `json:"company,omitempty"` // The company this role assignment belongs to.
BillingAddress *CompanyAddress `json:"billingAddress,omitempty"` // The address used as billing address for the location.
ShippingAddress *CompanyAddress `json:"shippingAddress,omitempty"` // The address used as shipping address for the location.
Phone string `json:"phone"` // The phone number of the company location.
Orders *OrderConnection `json:"orders,omitempty"` // The list of orders for the company location.
OrdersCount *Count `json:"ordersCount,omitempty"` // The total number of orders placed for the location.
DraftOrders *DraftOrderConnection `json:"draftOrders,omitempty"` // The list of draft orders for the company location.
Locale string `json:"locale"` // The preferred locale of the company location.
Market *Market `json:"market,omitempty"` // The market that includes the location's shipping address. If the shipping address is empty, then the value is the shop's primary market.
Currency CurrencyCode `json:"currency"` // The location's currency based on the shipping address. If the shipping address is empty, then the value is the shop's primary market.
DefaultCursor string `json:"defaultCursor"` // A default cursor that returns the single next record, sorted ascending by ID.
RoleAssignments *CompanyContactRoleAssignmentConnection `json:"roleAssignments,omitempty"` // The list of roles assigned to the company location.
BuyerExperienceConfiguration *BuyerExperienceConfiguration `json:"buyerExperienceConfiguration,omitempty"` // The configuration for the buyer's B2B checkout.
InCatalog bool `json:"inCatalog"` // Whether the company location is assigned a specific catalog.
Catalogs *CatalogConnection `json:"catalogs,omitempty"` // The list of catalogs associated with the company location.
CatalogsCount *Count `json:"catalogsCount,omitempty"` // The number of catalogs associated with the company location. Limited to a maximum of 10000.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
Events *EventConnection `json:"events,omitempty"` // The paginated list of events associated with the host subject.
HasTimelineComment bool `json:"hasTimelineComment"` // Whether the merchant added a timeline comment to the company location.
StaffMemberAssignments *CompanyLocationStaffMemberAssignmentConnection `json:"staffMemberAssignments,omitempty"` // The list of staff members assigned to the company location.
TaxSettings *CompanyLocationTaxSettings `json:"taxSettings,omitempty"` // The tax settings for the company location.
TotalSpent *MoneyV2 `json:"totalSpent,omitempty"` // The total amount spent by the location.
Note string `json:"note"` // A note about the company location.
CreatedAt DateTime `json:"createdAt"` // The date and time (ISO 8601 format) at which the company location was created in Shopify.
UpdatedAt DateTime `json:"updatedAt"` // The date and time (ISO 8601 format) at which the company location was last modified.
}
A location or branch of a company that's a customer of the shop. Configuration of B2B relationship, for example prices lists and checkout settings, may be done for a location.
Requires `read_customers` access scope or `read_companies` access scope. Also: The API client must be installed on a Shopify Plus store.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocation
type CompanyLocationConnection ¶
type CompanyLocationConnection struct {
Edges []CompanyLocationEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []CompanyLocation `json:"nodes,omitempty"` // A list of nodes that are contained in CompanyLocationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple CompanyLocations.
type CompanyLocationEdge ¶
type CompanyLocationEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *CompanyLocation `json:"node"` // The item at the end of `CompanyLocationEdge`.
}
An auto-generated type which holds one `CompanyLocations` and a cursor during pagination.
type CompanyLocationStaffMemberAssignment ¶
type CompanyLocationStaffMemberAssignment struct {
ID string `json:"id"` // A globally-unique ID.
CompanyLocation *CompanyLocation `json:"companyLocation,omitempty"` // The company location the staff member is assigned to.
StaffMember *StaffMember `json:"staffMember,omitempty"` // Represents the data of a staff member who's assigned to a company location.
}
A representation of store's staff member who is assigned to a company location of the shop. The staff member's actions will be limited to objects associated with the assigned company location.
Requires `read_customers` access scope or `read_companies` access scope. Also: The API client must be installed on a Shopify Plus store.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocationStaffMemberAssignment
type CompanyLocationStaffMemberAssignmentConnection ¶
type CompanyLocationStaffMemberAssignmentConnection struct {
Edges []CompanyLocationStaffMemberAssignmentEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []CompanyLocationStaffMemberAssignment `json:"nodes,omitempty"` // A list of nodes that are contained in CompanyLocationStaffMemberAssignmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple CompanyLocationStaffMemberAssignments.
type CompanyLocationStaffMemberAssignmentEdge ¶
type CompanyLocationStaffMemberAssignmentEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *CompanyLocationStaffMemberAssignment `json:"node"` // The item at the end of `CompanyLocationStaffMemberAssignmentEdge`.
}
An auto-generated type which holds one `CompanyLocationStaffMemberAssignment` and a cursor during pagination.
type CompanyLocationTaxSettings ¶
type CompanyLocationTaxSettings struct {
TaxRegistrationID string `json:"taxRegistrationId"` // The tax registration ID for the company location.
TaxExempt bool `json:"taxExempt"` // Whether the location is exempt from taxes.
TaxExemptions []TaxExemption `json:"taxExemptions"` // The list of tax exemptions applied to the location.
}
Represents the tax settings for a company location.
Requires `read_customers` access scope or `read_companies` access scope. Also: The API client must be installed on a Shopify Plus store.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CompanyLocationTaxSettings
type Count ¶
type Count struct {
Count int `json:"count"` // The count of elements.
Precision string `json:"precision"` // The count's precision, or the exactness of the value. (Valid values: `AT_LEAST` | `EXACT`)
}
Details for count of elements.
type CountriesInShippingZones ¶
type CountriesInShippingZones struct {
CountryCodes []CountryCode `json:"countryCodes"` // The list of all the countries from all the combined shipping zones.
IncludesRestOfTheWorld bool `json:"includesRestOfTheWorld"` // Whether 'Rest of World' has been defined in any of the shipping zones.
}
The list of all the countries from the combined shipping zones for the shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CountriesInShippingZones
type CountryCode ¶
type CountryCode string // The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines. If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision of another country. For example, the territories associated with Spain are represented by the country code `ES`, and the territories associated with the United States of America are represented by the country code `US`.
const ( CountryCodeAC CountryCode = "AC" // Ascension Island CountryCodeAD CountryCode = "AD" // Andorra CountryCodeAE CountryCode = "AE" // United Arab Emirates CountryCodeAF CountryCode = "AF" // Afghanistan CountryCodeAG CountryCode = "AG" // Antigua & Barbuda CountryCodeAI CountryCode = "AI" // Anguilla CountryCodeAL CountryCode = "AL" // Albania CountryCodeAM CountryCode = "AM" // Armenia CountryCodeAN CountryCode = "AN" // Netherlands Antilles CountryCodeAO CountryCode = "AO" // Angola CountryCodeAR CountryCode = "AR" // Argentina CountryCodeAT CountryCode = "AT" // Austria CountryCodeAU CountryCode = "AU" // Australia CountryCodeAW CountryCode = "AW" // Aruba CountryCodeAX CountryCode = "AX" // Åland Islands CountryCodeAZ CountryCode = "AZ" // Azerbaijan CountryCodeBA CountryCode = "BA" // Bosnia & Herzegovina CountryCodeBB CountryCode = "BB" // Barbados CountryCodeBD CountryCode = "BD" // Bangladesh CountryCodeBE CountryCode = "BE" // Belgium CountryCodeBF CountryCode = "BF" // Burkina Faso CountryCodeBG CountryCode = "BG" // Bulgaria CountryCodeBH CountryCode = "BH" // Bahrain CountryCodeBI CountryCode = "BI" // Burundi CountryCodeBJ CountryCode = "BJ" // Benin CountryCodeBL CountryCode = "BL" // St. Barthélemy CountryCodeBM CountryCode = "BM" // Bermuda CountryCodeBN CountryCode = "BN" // Brunei CountryCodeBO CountryCode = "BO" // Bolivia CountryCodeBQ CountryCode = "BQ" // Caribbean Netherlands CountryCodeBR CountryCode = "BR" // Brazil CountryCodeBS CountryCode = "BS" // Bahamas CountryCodeBT CountryCode = "BT" // Bhutan CountryCodeBV CountryCode = "BV" // Bouvet Island CountryCodeBW CountryCode = "BW" // Botswana CountryCodeBY CountryCode = "BY" // Belarus CountryCodeBZ CountryCode = "BZ" // Belize CountryCodeCA CountryCode = "CA" // Canada CountryCodeCC CountryCode = "CC" // Cocos (Keeling) Islands CountryCodeCD CountryCode = "CD" // Congo - Kinshasa CountryCodeCF CountryCode = "CF" // Central African Republic CountryCodeCG CountryCode = "CG" // Congo - Brazzaville CountryCodeCH CountryCode = "CH" // Switzerland CountryCodeCI CountryCode = "CI" // Côte d’Ivoire CountryCodeCK CountryCode = "CK" // Cook Islands CountryCodeCL CountryCode = "CL" // Chile CountryCodeCM CountryCode = "CM" // Cameroon CountryCodeCN CountryCode = "CN" // China CountryCodeCO CountryCode = "CO" // Colombia CountryCodeCR CountryCode = "CR" // Costa Rica CountryCodeCU CountryCode = "CU" // Cuba CountryCodeCV CountryCode = "CV" // Cape Verde CountryCodeCW CountryCode = "CW" // Curaçao CountryCodeCX CountryCode = "CX" // Christmas Island CountryCodeCY CountryCode = "CY" // Cyprus CountryCodeCZ CountryCode = "CZ" // Czechia CountryCodeDE CountryCode = "DE" // Germany CountryCodeDJ CountryCode = "DJ" // Djibouti CountryCodeDK CountryCode = "DK" // Denmark CountryCodeDM CountryCode = "DM" // Dominica CountryCodeDO CountryCode = "DO" // Dominican Republic CountryCodeDZ CountryCode = "DZ" // Algeria CountryCodeEC CountryCode = "EC" // Ecuador CountryCodeEE CountryCode = "EE" // Estonia CountryCodeEG CountryCode = "EG" // Egypt CountryCodeEH CountryCode = "EH" // Western Sahara CountryCodeER CountryCode = "ER" // Eritrea CountryCodeES CountryCode = "ES" // Spain CountryCodeET CountryCode = "ET" // Ethiopia CountryCodeFI CountryCode = "FI" // Finland CountryCodeFJ CountryCode = "FJ" // Fiji CountryCodeFK CountryCode = "FK" // Falkland Islands CountryCodeFO CountryCode = "FO" // Faroe Islands CountryCodeFR CountryCode = "FR" // France CountryCodeGA CountryCode = "GA" // Gabon CountryCodeGB CountryCode = "GB" // United Kingdom CountryCodeGD CountryCode = "GD" // Grenada CountryCodeGE CountryCode = "GE" // Georgia CountryCodeGF CountryCode = "GF" // French Guiana CountryCodeGG CountryCode = "GG" // Guernsey CountryCodeGH CountryCode = "GH" // Ghana CountryCodeGI CountryCode = "GI" // Gibraltar CountryCodeGL CountryCode = "GL" // Greenland CountryCodeGM CountryCode = "GM" // Gambia CountryCodeGN CountryCode = "GN" // Guinea CountryCodeGP CountryCode = "GP" // Guadeloupe CountryCodeGQ CountryCode = "GQ" // Equatorial Guinea CountryCodeGR CountryCode = "GR" // Greece CountryCodeGS CountryCode = "GS" // South Georgia & South Sandwich Islands CountryCodeGT CountryCode = "GT" // Guatemala CountryCodeGW CountryCode = "GW" // Guinea-Bissau CountryCodeGY CountryCode = "GY" // Guyana CountryCodeHK CountryCode = "HK" // Hong Kong SAR CountryCodeHM CountryCode = "HM" // Heard & McDonald Islands CountryCodeHN CountryCode = "HN" // Honduras CountryCodeHR CountryCode = "HR" // Croatia CountryCodeHT CountryCode = "HT" // Haiti CountryCodeHU CountryCode = "HU" // Hungary CountryCodeID CountryCode = "ID" // Indonesia CountryCodeIE CountryCode = "IE" // Ireland CountryCodeIL CountryCode = "IL" // Israel CountryCodeIM CountryCode = "IM" // Isle of Man CountryCodeIN CountryCode = "IN" // India CountryCodeIO CountryCode = "IO" // British Indian Ocean Territory CountryCodeIQ CountryCode = "IQ" // Iraq CountryCodeIR CountryCode = "IR" // Iran CountryCodeIS CountryCode = "IS" // Iceland CountryCodeIT CountryCode = "IT" // Italy CountryCodeJE CountryCode = "JE" // Jersey CountryCodeJM CountryCode = "JM" // Jamaica CountryCodeJO CountryCode = "JO" // Jordan CountryCodeJP CountryCode = "JP" // Japan CountryCodeKE CountryCode = "KE" // Kenya CountryCodeKG CountryCode = "KG" // Kyrgyzstan CountryCodeKH CountryCode = "KH" // Cambodia CountryCodeKI CountryCode = "KI" // Kiribati CountryCodeKM CountryCode = "KM" // Comoros CountryCodeKN CountryCode = "KN" // St. Kitts & Nevis CountryCodeKP CountryCode = "KP" // North Korea CountryCodeKR CountryCode = "KR" // South Korea CountryCodeKW CountryCode = "KW" // Kuwait CountryCodeKY CountryCode = "KY" // Cayman Islands CountryCodeKZ CountryCode = "KZ" // Kazakhstan CountryCodeLA CountryCode = "LA" // Laos CountryCodeLB CountryCode = "LB" // Lebanon CountryCodeLC CountryCode = "LC" // St. Lucia CountryCodeLI CountryCode = "LI" // Liechtenstein CountryCodeLK CountryCode = "LK" // Sri Lanka CountryCodeLR CountryCode = "LR" // Liberia CountryCodeLS CountryCode = "LS" // Lesotho CountryCodeLT CountryCode = "LT" // Lithuania CountryCodeLU CountryCode = "LU" // Luxembourg CountryCodeLV CountryCode = "LV" // Latvia CountryCodeLY CountryCode = "LY" // Libya CountryCodeMA CountryCode = "MA" // Morocco CountryCodeMC CountryCode = "MC" // Monaco CountryCodeMD CountryCode = "MD" // Moldova CountryCodeME CountryCode = "ME" // Montenegro CountryCodeMF CountryCode = "MF" // St. Martin CountryCodeMG CountryCode = "MG" // Madagascar CountryCodeMK CountryCode = "MK" // North Macedonia CountryCodeML CountryCode = "ML" // Mali CountryCodeMM CountryCode = "MM" // Myanmar (Burma) CountryCodeMN CountryCode = "MN" // Mongolia CountryCodeMO CountryCode = "MO" // Macao SAR CountryCodeMQ CountryCode = "MQ" // Martinique CountryCodeMR CountryCode = "MR" // Mauritania CountryCodeMS CountryCode = "MS" // Montserrat CountryCodeMT CountryCode = "MT" // Malta CountryCodeMU CountryCode = "MU" // Mauritius CountryCodeMV CountryCode = "MV" // Maldives CountryCodeMW CountryCode = "MW" // Malawi CountryCodeMX CountryCode = "MX" // Mexico CountryCodeMY CountryCode = "MY" // Malaysia CountryCodeMZ CountryCode = "MZ" // Mozambique CountryCodeNA CountryCode = "NA" // Namibia CountryCodeNC CountryCode = "NC" // New Caledonia CountryCodeNE CountryCode = "NE" // Niger CountryCodeNF CountryCode = "NF" // Norfolk Island CountryCodeNG CountryCode = "NG" // Nigeria CountryCodeNI CountryCode = "NI" // Nicaragua CountryCodeNL CountryCode = "NL" // Netherlands CountryCodeNO CountryCode = "NO" // Norway CountryCodeNP CountryCode = "NP" // Nepal CountryCodeNR CountryCode = "NR" // Nauru CountryCodeNU CountryCode = "NU" // Niue CountryCodeNZ CountryCode = "NZ" // New Zealand CountryCodeOM CountryCode = "OM" // Oman CountryCodePA CountryCode = "PA" // Panama CountryCodePE CountryCode = "PE" // Peru CountryCodePF CountryCode = "PF" // French Polynesia CountryCodePG CountryCode = "PG" // Papua New Guinea CountryCodePH CountryCode = "PH" // Philippines CountryCodePK CountryCode = "PK" // Pakistan CountryCodePL CountryCode = "PL" // Poland CountryCodePM CountryCode = "PM" // St. Pierre & Miquelon CountryCodePN CountryCode = "PN" // Pitcairn Islands CountryCodePS CountryCode = "PS" // Palestinian Territories CountryCodePT CountryCode = "PT" // Portugal CountryCodePY CountryCode = "PY" // Paraguay CountryCodeQA CountryCode = "QA" // Qatar CountryCodeRE CountryCode = "RE" // Réunion CountryCodeRO CountryCode = "RO" // Romania CountryCodeRS CountryCode = "RS" // Serbia CountryCodeRU CountryCode = "RU" // Russia CountryCodeRW CountryCode = "RW" // Rwanda CountryCodeSA CountryCode = "SA" // Saudi Arabia CountryCodeSB CountryCode = "SB" // Solomon Islands CountryCodeSC CountryCode = "SC" // Seychelles CountryCodeSD CountryCode = "SD" // Sudan CountryCodeSE CountryCode = "SE" // Sweden CountryCodeSG CountryCode = "SG" // Singapore CountryCodeSH CountryCode = "SH" // St. Helena CountryCodeSI CountryCode = "SI" // Slovenia CountryCodeSJ CountryCode = "SJ" // Svalbard & Jan Mayen CountryCodeSK CountryCode = "SK" // Slovakia CountryCodeSL CountryCode = "SL" // Sierra Leone CountryCodeSM CountryCode = "SM" // San Marino CountryCodeSN CountryCode = "SN" // Senegal CountryCodeSO CountryCode = "SO" // Somalia CountryCodeSR CountryCode = "SR" // Suriname CountryCodeSS CountryCode = "SS" // South Sudan CountryCodeST CountryCode = "ST" // São Tomé & Príncipe CountryCodeSV CountryCode = "SV" // El Salvador CountryCodeSX CountryCode = "SX" // Sint Maarten CountryCodeSY CountryCode = "SY" // Syria CountryCodeSZ CountryCode = "SZ" // Eswatini CountryCodeTA CountryCode = "TA" // Tristan da Cunha CountryCodeTC CountryCode = "TC" // Turks & Caicos Islands CountryCodeTD CountryCode = "TD" // Chad CountryCodeTF CountryCode = "TF" // French Southern Territories CountryCodeTG CountryCode = "TG" // Togo CountryCodeTH CountryCode = "TH" // Thailand CountryCodeTJ CountryCode = "TJ" // Tajikistan CountryCodeTK CountryCode = "TK" // Tokelau CountryCodeTL CountryCode = "TL" // Timor-Leste CountryCodeTM CountryCode = "TM" // Turkmenistan CountryCodeTN CountryCode = "TN" // Tunisia CountryCodeTO CountryCode = "TO" // Tonga CountryCodeTR CountryCode = "TR" // Türkiye CountryCodeTT CountryCode = "TT" // Trinidad & Tobago CountryCodeTV CountryCode = "TV" // Tuvalu CountryCodeTW CountryCode = "TW" // Taiwan CountryCodeTZ CountryCode = "TZ" // Tanzania CountryCodeUA CountryCode = "UA" // Ukraine CountryCodeUG CountryCode = "UG" // Uganda CountryCodeUM CountryCode = "UM" // U.S. Outlying Islands CountryCodeUS CountryCode = "US" // United States CountryCodeUY CountryCode = "UY" // Uruguay CountryCodeUZ CountryCode = "UZ" // Uzbekistan CountryCodeVA CountryCode = "VA" // Vatican City CountryCodeVC CountryCode = "VC" // St. Vincent & Grenadines CountryCodeVE CountryCode = "VE" // Venezuela CountryCodeVG CountryCode = "VG" // British Virgin Islands CountryCodeVN CountryCode = "VN" // Vietnam CountryCodeVU CountryCode = "VU" // Vanuatu CountryCodeWF CountryCode = "WF" // Wallis & Futuna CountryCodeWS CountryCode = "WS" // Samoa CountryCodeXK CountryCode = "XK" // Kosovo CountryCodeYE CountryCode = "YE" // Yemen CountryCodeYT CountryCode = "YT" // Mayotte CountryCodeZA CountryCode = "ZA" // South Africa CountryCodeZM CountryCode = "ZM" // Zambia CountryCodeZW CountryCode = "ZW" // Zimbabwe CountryCodeZZ CountryCode = "ZZ" // Unknown Region )
func (CountryCode) Validate ¶
func (code CountryCode) Validate() error
Add all the CountryCodes to the case
type CountryHarmonizedSystemCode ¶
type CountryHarmonizedSystemCode struct {
CountryCode CountryCode `json:"countryCode"` // The ISO 3166-1 alpha-2 country code for the country that issued the specified harmonized system code.
HarmonizedSystemCode string `json:"harmonizedSystemCode"` // The country-specific harmonized system code. These are usually longer than 6 digits.
}
The country-specific harmonized system code and ISO country code for an inventory item.
Requires `read_inventory` access scope or `read_products` access scope.
type CountryHarmonizedSystemCodeConnection ¶
type CountryHarmonizedSystemCodeConnection struct {
Edges []CountryHarmonizedSystemCodeEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []CountryHarmonizedSystemCode `json:"nodes,omitempty"` // A list of nodes that are contained in CountryHarmonizedSystemCodeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple CountryHarmonizedSystemCodes.
type CountryHarmonizedSystemCodeEdge ¶
type CountryHarmonizedSystemCodeEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Location `json:"node,omitempty"` // The item at the end of CountryHarmonizedSystemCodeEdge.
}
An auto-generated type which holds one CountryHarmonizedSystemCode and a cursor during pagination.
type CurrencyCode ¶
type CurrencyCode string // The three-letter currency codes that represent the world currencies used in stores. These include standard ISO 4217 codes, legacy codes, and non-standard codes.
type CurrencyFormats ¶
type CurrencyFormats struct {
MoneyFormat string `json:"moneyFormat"` // Money without currency in HTML.
MoneyInEmailsFormat string `json:"moneyInEmailsFormat"` // Money without currency in emails.
MoneyWithCurrencyFormat string `json:"moneyWithCurrencyFormat"` // Money with currency in HTML.
MoneyWithCurrencyInEmailsFormat string `json:"moneyWithCurrencyInEmailsFormat"` // Money with currency in emails.
}
Currency formats configured for the merchant. These formats are available to use within Liquid.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CurrencyFormats
type CurrencySetting ¶
type CurrencySetting struct {
CurrencyCode CurrencyCode `json:"currencyCode"` // The currency's ISO code.
Enabled bool `json:"enabled"` // Whether the currency is enabled or not. An enabled currency setting is visible to buyers and allows orders to be generated with that currency as presentment.
RateUpdatedAt DateTime `json:"rateUpdatedAt"` // The date and time when the active exchange rate for the currency was last modified. It can be the automatic rate's creation date, or the manual rate's last updated at date if active.
}
A setting for a presentment currency.
type CurrencySettingConnection ¶
type CurrencySettingConnection struct {
Edges []CurrencySettingEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []CurrencySetting `json:"nodes,omitempty"` // A list of nodes that are contained in CurrencySettingEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // Pagination information.
}
An auto-generated type for paginating through multiple CurrencySettings.
type CurrencySettingEdge ¶
type CurrencySettingEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *CurrencySetting `json:"node"` // The item at the end of ProductEdge.
}
An auto-generated type which holds one CurrencySetting and a cursor during pagination.
type Customer ¶
type Customer struct {
ID string `json:"id"` // A globally-unique ID.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
FirstName string `json:"firstName"` // The first name of the customer.
LastName string `json:"lastName"` // The last name of the customer.
DisplayName string `json:"displayName"` // The full name of the customer, based on the values for first_name and last_name. If the first_name and 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.
State CustomerState `json:"state"` // The state of the customer's account with the shop. Please note that this only meaningful when Classic Customer Accounts is active.
Email string `json:"email"` // The customer's email address.
ValidEmailAddress bool `json:"validEmailAddress"` // Whether the email address is formatted correctly. Returns `true` when the email is formatted correctly and belongs to an existing domain. This doesn't guarantee that the email address actually exists.
VerifiedEmail bool `json:"verifiedEmail"` // Whether the customer has verified their email address. Defaults to `true` if the customer is created through the Shopify admin or API.
EmailMarketingConsent *CustomerEmailMarketingConsentState `json:"emailMarketingConsent,omitempty"` // The current email marketing state for the customer. If the customer doesn't have an email address, then this property is `null`.
SMSMarketingConsent *CustomerSmsMarketingConsentState `json:"smsMarketingConsent,omitempty"` // The current SMS marketing state for the customer's phone number. If the customer does not have a phone number, then this property is `null`.
Image *Image `json:"image,omitempty"` // The image associated with the customer.
DefaultAddress *MailingAddress `json:"defaultAddress,omitempty"` // The default address associated with the customer.
Addresses []MailingAddress `json:"addresses"` // A list of addresses associated with the customer.
AddressesV2 *MailingAddressConnection `json:"addressesV2,omitempty"` // The addresses associated with the customer.
AmountSpent *MoneyV2 `json:"amountSpent,omitempty"` // The total amount that the customer has spent on orders in their lifetime.
Phone string `json:"phone"` // A unique phone number for the customer.
DataSalesOptOut bool `json:"dataSalesOptOut"` // Whether the customer has opted out of having their data sold.
CanDelete bool `json:"canDelete"` // Whether the merchant can delete the customer from their store. A customer can be deleted from a store only if they haven't yet made an order. After a customer makes an order, they can't be deleted from a store.
CompanyContactProfiles []CompanyContact `json:"companyContactProfiles"` // A list of the customer's company contact profiles.
LastOrder *Order `json:"lastOrder,omitempty"` // The customer's last order.
Orders *OrderConnection `json:"orders,omitempty"` // A list of the customer's orders.
NumberOfOrders string `json:"numberOfOrders"` // The number of orders that the customer has made at the store in their lifetime.
ProductSubscriberStatus CustomerProductSubscriberStatus `json:"productSubscriberStatus"` // Possible subscriber states of a customer defined by their subscription contracts.
LifetimeDuration string `json:"lifetimeDuration"` // The amount of time since the customer was first added to the store. Example: 'about 12 years'.
Locale string `json:"locale"` // The customer's locale.
Market *Market `json:"market,omitempty"` // The market that includes the customer’s default address.
Mergeable *CustomerMergeable `json:"mergeable,omitempty"` // Whether the customer can be merged with another customer.
MultipassIdentifier string `json:"multipassIdentifier"` // A unique identifier for the customer that's used with Multipass login.
PaymentMethods *CustomerPaymentMethodConnection `json:"paymentMethods,omitempty"` // A list of the customer's payment methods.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
Events *EventConnection `json:"events,omitempty"` // A list of events associated with the customer.
Statistics *CustomerStatistics `json:"statistics,omitempty"` // The statistics for a given customer.
StoreCreditAccounts *StoreCreditAccountConnection `json:"storeCreditAccounts,omitempty"` // Returns a list of store credit accounts that belong to the owner resource. A store credit account owner can hold multiple accounts each with a different currency.
SubscriptionContracts *SubscriptionContractConnection `json:"subscriptionContracts,omitempty"` // A list of the customer's subscription contracts.
Tags []string `json:"tags"` // A comma separated list of tags that have been added to the customer.
TaxExempt bool `json:"taxExempt"` // Whether the customer is exempt from being charged taxes on their orders.
TaxExemptions []TaxExemption `json:"taxExemptions"` // The list of tax exemptions applied to the customer.
UnsubscribeURL URL `json:"unsubscribeUrl"` // The URL to unsubscribe the customer from the mailing list.
Note string `json:"note"` // A note about the customer.
CreatedAt DateTime `json:"createdAt"` // The date and time when the customer was added to the store.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the customer was last updated.
}
Represents information about a customer of the shop, such as the customer's contact details, their order history, and whether they've agreed to receive marketing material by email.
Requires `read_customers` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer
type CustomerAccountsV2 ¶
type CustomerAccountsV2 struct {
CustomerAccountsVersion CustomerAccountsVersion `json:"customerAccountsVersion"` // Indicates which version of customer accounts the merchant is using in online store and checkout.
LoginLinksVisibleOnStorefrontAndCheckout bool `json:"loginLinksVisibleOnStorefrontAndCheckout"` // Login links are shown in online store and checkout.
LoginRequiredAtCheckout bool `json:"loginRequiredAtCheckout"` // Customers are required to log in to their account before checkout.
URL URL `json:"url"` // The root url for the customer accounts pages.
}
Information about the shop's customer accounts.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerAccountsV2
type CustomerAccountsVersion ¶
type CustomerAccountsVersion string
The login redirection target for customer accounts.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerAccountsVersion
const ( CustomerAccountsVersionClassic CustomerAccountsVersion = "CLASSIC" // The customer is redirected to the classic customer accounts login page. CustomerAccountsVersionNewCustomerAccounts CustomerAccountsVersion = "NEW_CUSTOMER_ACCOUNTS" // The customer is redirected to the new customer accounts login page. )
func (CustomerAccountsVersion) Validate ¶
func (v CustomerAccountsVersion) Validate() error
Validate CustomerAccountsVersion
type CustomerConnection ¶
type CustomerConnection struct {
Edges []CustomerEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Customer `json:"nodes,omitempty"` // A list of nodes that are contained in CustomerEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Customers.
type CustomerConsentCollectedFrom ¶
type CustomerConsentCollectedFrom string
The source that collected the customer's consent to receive marketing materials.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerConsentCollectedFrom
const ( CustomerConsentCollectedFromOther CustomerConsentCollectedFrom = "OTHER" // The customer consent was collected outside of Shopify. CustomerConsentCollectedFromShopify CustomerConsentCollectedFrom = "SHOPIFY" // The customer consent was collected by Shopify. )
func (CustomerConsentCollectedFrom) Validate ¶
func (s CustomerConsentCollectedFrom) Validate() error
Validate CustomerConsentCollectedFrom
type CustomerCreditCard ¶
type CustomerCreditCard struct {
Name string `json:"name"` // The name of the card holder.
Brand string `json:"brand"` // The brand of the card.
Source string `json:"source"` // The source of the card if coming from a wallet such as Apple Pay.
MaskedNumber string `json:"maskedNumber"` // The masked card number with only the last 4 digits displayed.
FirstDigits string `json:"firstDigits"` // The card's BIN number.
LastDigits string `json:"lastDigits"` // The last 4 digits of the card.
VirtualLastDigits string `json:"virtualLastDigits"` // The last 4 digits of the Device Account Number.
ExpiryMonth int `json:"expiryMonth"` // The expiry month of the card.
ExpiryYear int `json:"expiryYear"` // The expiry year of the card.
ExpiresSoon bool `json:"expiresSoon"` // Whether the card is about to expire.
BillingAddress *CustomerCreditCardBillingAddress `json:"billingAddress,omitempty"` // The billing address of the card.
IsRevocable bool `json:"isRevocable"` // The payment method can be revoked if there are no active subscription contracts.
}
Represents a card instrument for customer payment method.
Requires `read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerCreditCard
type CustomerCreditCardBillingAddress ¶
type CustomerCreditCardBillingAddress struct {
FirstName string `json:"firstName"` // The first name in the billing address.
LastName string `json:"lastName"` // The last name in the billing address.
Address1 string `json:"address1"` // The first line of the address. Typically the street address or PO Box number.
City string `json:"city"` // The name of the city, district, village, or town.
Province string `json:"province"` // The region of the address, such as the province, state, or district.
ProvinceCode string `json:"provinceCode"` // The alphanumeric code for the region. For example, ON.
Country string `json:"country"` // The name of the country.
CountryCode CountryCode `json:"countryCode"` // The two-letter code for the country of the address. For example, US.
Zip string `json:"zip"` // The zip or postal code of the address.
}
The billing address of a credit card payment instrument.
Requires `read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerCreditCardBillingAddress
type CustomerEdge ¶
type CustomerEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Customer `json:"node,omitempty"` // The item at the end of CustomerEdge.
}
An auto-generated type which holds one Customer and a cursor during pagination.
type CustomerEmailMarketingConsentState ¶
type CustomerEmailMarketingConsentState struct {
CustomerMarketingOptInLevel CustomerMarketingOptInLevel `json:"marketingOptInLevel"` // The marketing subscription opt-in level, as described by the M3AAWG best practices guidelines, that the customer gave when they consented to receive marketing material by email.
MarketingState CustomerEmailMarketingState `json:"marketingState"` // The current email marketing state for the customer.
ConsentUpdatedAt DateTime `json:"consentUpdatedAt"` // The date and time at which the customer consented to receive marketing material by email. The customer's consent state reflects the consent record with the most recent `consent_updated_at` date. If no date is provided, then the date and time at which the consent information was sent is used.
}
The record of when a customer consented to receive marketing material by email.
Requires `read_customers` access scope.
type CustomerEmailMarketingState ¶
type CustomerEmailMarketingState string
The possible email marketing states for a customer.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerEmailMarketingState
const ( CustomerEmailMarketingStateInvalid CustomerEmailMarketingState = "INVALID" // The customer’s email address marketing state is invalid. CustomerEmailMarketingStateNotSubscribed CustomerEmailMarketingState = "NOT_SUBSCRIBED" // The customer isn't subscribed to email marketing. CustomerEmailMarketingStatePending CustomerEmailMarketingState = "PENDING" // The customer is in the process of subscribing to email marketing. CustomerEmailMarketingStateRedacted CustomerEmailMarketingState = "REDACTED" // The customer's personal data is erased. This value is internally-set and read-only. CustomerEmailMarketingStateSubscribed CustomerEmailMarketingState = "SUBSCRIBED" // The customer is subscribed to email marketing. CustomerEmailMarketingStateUnsubscribed CustomerEmailMarketingState = "UNSUBSCRIBED" // The customer isn't currently subscribed to email marketing but was previously subscribed. )
func (CustomerEmailMarketingState) Validate ¶
func (state CustomerEmailMarketingState) Validate() error
Validate CustomerEmailMarketingState
type CustomerJourneySummary ¶
type CustomerJourneySummary struct {
CustomerOrderIndex int `json:"customerOrderIndex"` // The position of the current order within the customer's order history. Test orders aren't included.
DaysToConversion int `json:"daysToConversion"` // 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.
FirstVisit *CustomerVisit `json:"firstVisit,omitempty"` // The customer's first session going into the shop.
LastVisit *CustomerVisit `json:"lastVisit,omitempty"` // The last session before an order is made.
Moments *CustomerMomentConnection `json:"moments,omitempty"` // The events preceding a customer's order, such as shop sessions.
MomentsCount *Count `json:"momentsCount,omitempty"` // The total number of customer moments associated with this order. Returns null if the order is still in the process of being attributed.
Ready bool `json:"ready"` // Whether the attributed sessions for the order have been created yet.
}
Represents a customer's visiting activities on a shop's online store.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerJourneySummary
type CustomerMarketingOptInLevel ¶
type CustomerMarketingOptInLevel string
The possible values for the marketing subscription opt-in level enabled at the time the customer consented to receive marketing information.
The levels are defined by [the M3AAWG best practices guideline document](https://www.m3aawg.org/sites/maawg/files/news/M3AAWG_Senders_BCP_Ver3-2015-02.pdf).
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerMarketingOptInLevel
const ( CustomerMarketingOptInLevelConfirmedOptIn CustomerMarketingOptInLevel = "CONFIRMED_OPT_IN" // After providing their information, the customer receives a confirmation and is required to perform a intermediate step before receiving marketing information. CustomerMarketingOptInLevelSingleOptIn CustomerMarketingOptInLevel = "SINGLE_OPT_IN" // After providing their information, the customer receives marketing information without any intermediate steps. CustomerMarketingOptInLevelUnknown CustomerMarketingOptInLevel = "UNKNOWN" // The customer receives marketing information but how they were opted in is unknown. )
func (CustomerMarketingOptInLevel) Validate ¶
func (level CustomerMarketingOptInLevel) Validate() error
Validate CustomerMarketingOptInLevel
type CustomerMergeError ¶
type CustomerMergeError struct {
ErrorFields []CustomerMergeErrorFieldType `json:"errorFields"` // The list of fields preventing the customer from being merged.
Message string `json:"message"` // The customer merge error message.
}
The error blocking a customer merge.
Requires The user must have `read_customer_merge` permissions.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerMergeError
type CustomerMergeErrorFieldType ¶
type CustomerMergeErrorFieldType string
The types of the hard blockers preventing a customer from being merged to another customer.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerMergeErrorFieldType
const ( CustomerMergeErrorFieldTypeCompanyContact CustomerMergeErrorFieldType = "COMPANY_CONTACT" // The customer is a company contact. CustomerMergeErrorFieldTypeCustomerPaymentMethods CustomerMergeErrorFieldType = "CUSTOMER_PAYMENT_METHODS" // The customer has payment methods. CustomerMergeErrorFieldTypeDeletedAt CustomerMergeErrorFieldType = "DELETED_AT" // The customer does not exist. CustomerMergeErrorFieldTypeGiftCards CustomerMergeErrorFieldType = "GIFT_CARDS" // The customer has gift cards. CustomerMergeErrorFieldTypeMergeInProgress CustomerMergeErrorFieldType = "MERGE_IN_PROGRESS" // The customer has a merge in progress. CustomerMergeErrorFieldTypeMultipassIdentifier CustomerMergeErrorFieldType = "MULTIPASS_IDENTIFIER" // The customer has a multipass identifier. CustomerMergeErrorFieldTypePendingDataRequest CustomerMergeErrorFieldType = "PENDING_DATA_REQUEST" // The customer has a pending data request. CustomerMergeErrorFieldTypeRedactedAt CustomerMergeErrorFieldType = "REDACTED_AT" // The customer has a pending or completed redaction. CustomerMergeErrorFieldTypeStoreCredit CustomerMergeErrorFieldType = "STORE_CREDIT" // The customer has store credit. CustomerMergeErrorFieldTypeSubscriptions CustomerMergeErrorFieldType = "SUBSCRIPTIONS" // The customer has a subscription history. )
func (CustomerMergeErrorFieldType) Validate ¶
func (result CustomerMergeErrorFieldType) Validate() error
Validate CustomerMergeErrorFieldType
type CustomerMergeRequest ¶
type CustomerMergeRequest struct {
JobID string `json:"jobId"` // The UUID of the merge job.
ResultingCustomerID string `json:"resultingCustomerId"` // The ID of the customer resulting from the merge.
Status CustomerMergeRequestStatus `json:"status"` // The status of the customer merge request.
CustomerMergeErrors []CustomerMergeError `json:"customerMergeErrors"` // The merge errors that occurred during the customer merge request.
}
A merge request for merging two customers.
Requires The user must have `read_customer_merge` permissions.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerMergeRequest
type CustomerMergeRequestStatus ¶
type CustomerMergeRequestStatus string
The status of the customer merge request.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerMergeRequestStatus
const ( CustomerMergeRequestStatusCompleted CustomerMergeRequestStatus = "COMPLETED" // The customer merge request has been completed. CustomerMergeRequestStatusFailed CustomerMergeRequestStatus = "FAILED" // The customer merge request has failed. CustomerMergeRequestStatusInProgress CustomerMergeRequestStatus = "IN_PROGRESS" // The customer merge request is currently in progress. CustomerMergeRequestStatusRequested CustomerMergeRequestStatus = "REQUESTED" // The customer merge request has been requested. )
func (CustomerMergeRequestStatus) Validate ¶
func (status CustomerMergeRequestStatus) Validate() error
Validate CustomerMergeRequestStatus
type CustomerMergeable ¶
type CustomerMergeable struct {
IsMergeable bool `json:"isMergeable"` // Whether the customer can be merged with another customer.
MergeInProgress *CustomerMergeRequest `json:"mergeInProgress,omitempty"` // The merge request if one is currently in progress.
ErrorFields []CustomerMergeErrorFieldType `json:"errorFields"` // The list of fields preventing the customer from being merged.
Reason string `json:"reason"` // The reason why the customer can't be merged with another customer.
}
An object that represents whether a customer can be merged with another customer.
Requires The user must have `read_customer_merge` permissions.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerMergeable
type CustomerMoment ¶
type CustomerMoment struct {
OccuredAt DateTime `json:"occuredAt"` // The date and time when the customer's session occurred.
}
Represents a session preceding an order, often used for building a timeline of events leading to an order.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/CustomerMoment
type CustomerMomentConnection ¶
type CustomerMomentConnection struct {
Edges []CustomerMomentEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []CustomerMoment `json:"nodes,omitempty"` // A list of nodes that are contained in CustomerMomentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple CustomerMoments.
type CustomerMomentEdge ¶
type CustomerMomentEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *CustomerMoment `json:"node"` // The item at the end of `CustomerMomentEdge`.
}
An auto-generated type which holds one `CustomerMoment` and a cursor during pagination.
type CustomerPaymentInstrument ¶
type CustomerPaymentInstrument interface {
*CustomerCreditCard | *CustomerPaypalBillingAgreement | *CustomerShopPayAgreement
}
All possible instruments for CustomerPaymentMethods.
Requires `read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.
type CustomerPaymentInstrumentBillingAddress ¶
type CustomerPaymentInstrumentBillingAddress struct {
Name string `json:"name"` // The name of the buyer of the address.
Address1 string `json:"address1"` // The first line of the address. Typically the street address or PO Box number.
City string `json:"city"` // The name of the city, district, village, or town.
Province string `json:"province"` // The region of the address, such as the province, state, or district.
ProvinceCode string `json:"provinceCode"` // The alphanumeric code for the region. For example, ON.
Country string `json:"country"` // The name of the country.
CountryCode CountryCode `json:"countryCode"` // The two-letter code for the country of the address. For example, US.
Zip string `json:"zip"` // The zip or postal code of the address.
}
The billing address of a payment instrument.
Requires `read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerPaymentInstrumentBillingAddress
type CustomerPaymentMethod ¶
type CustomerPaymentMethod struct {
ID string `json:"id"` // The ID of this payment method.
Customer *Customer `json:"customer,omitempty"` // The customer to whom the payment method belongs.
Instrument interface{} `json:"instrument,omitempty"` // The instrument for this payment method.
RevokedAt DateTime `json:"revokedAt"` // The time that the payment method was revoked.
RevokedReason CustomerPaymentMethodRevocationReason `json:"revokedReason"` // The revocation reason for this payment method.
SubscriptionContracts *SubscriptionContractConnection `json:"subscriptionContracts,omitempty"` // List Subscription Contracts.
}
A customer's payment method.
Requires `read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerPaymentMethod
type CustomerPaymentMethodConnection ¶
type CustomerPaymentMethodConnection struct {
Edges []CustomerPaymentMethodEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []CustomerPaymentMethod `json:"nodes,omitempty"` // A list of nodes that are contained in CustomerPaymentMethodEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple CustomerPaymentMethods.
type CustomerPaymentMethodEdge ¶
type CustomerPaymentMethodEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *CustomerPaymentMethod `json:"node,omitempty"` // The item at the end of CustomerPaymentMethodEdge.
}
An auto-generated type which holds one CustomerPaymentMethod and a cursor during pagination.
type CustomerPaymentMethodRevocationReason ¶
type CustomerPaymentMethodRevocationReason string
The revocation reason types for a customer payment method.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerPaymentMethodRevocationReason
const ( CustomerPaymentMethodRevocationReasonAuthorizeNetGatewayNotEnabled CustomerPaymentMethodRevocationReason = "AUTHORIZE_NET_GATEWAY_NOT_ENABLED" // The Authorize.net payment gateway is not enabled. CustomerPaymentMethodRevocationReasonAuthorizeNetReturnedNoPaymentMethod CustomerPaymentMethodRevocationReason = "AUTHORIZE_NET_RETURNED_NO_PAYMENT_METHOD" // Authorize.net did not return any payment methods. Make sure that the correct Authorize.net account is linked. CustomerPaymentMethodRevocationReasonBraintreeAPIAuthenticationError CustomerPaymentMethodRevocationReason = "BRAINTREE_API_AUTHENTICATION_ERROR" // Failed to contact Braintree API. CustomerPaymentMethodRevocationReasonBraintreeGatewayNotEnabled CustomerPaymentMethodRevocationReason = "BRAINTREE_GATEWAY_NOT_ENABLED" // The Braintree payment gateway is not enabled. CustomerPaymentMethodRevocationReasonBraintreePaymentMethodNotCard CustomerPaymentMethodRevocationReason = "BRAINTREE_PAYMENT_METHOD_NOT_CARD" // The Braintree payment method type should be a credit card or Apple Pay card. CustomerPaymentMethodRevocationReasonBraintreeReturnedNoPaymentMethod CustomerPaymentMethodRevocationReason = "BRAINTREE_RETURNED_NO_PAYMENT_METHOD" // Braintree returned no payment methods. Make sure the correct Braintree account is linked. CustomerPaymentMethodRevocationReasonFailedToRetrieveBillingAddress CustomerPaymentMethodRevocationReason = "FAILED_TO_RETRIEVE_BILLING_ADDRESS" // The billing address failed to retrieve. CustomerPaymentMethodRevocationReasonFailedToUpdateCreditCard CustomerPaymentMethodRevocationReason = "FAILED_TO_UPDATE_CREDIT_CARD" // The credit card failed to update. CustomerPaymentMethodRevocationReasonManuallyRevoked CustomerPaymentMethodRevocationReason = "MANUALLY_REVOKED" // The payment method was manually revoked. CustomerPaymentMethodRevocationReasonMerged CustomerPaymentMethodRevocationReason = "MERGED" // The payment method was replaced with an existing payment method. The associated contracts have been migrated to the other payment method. CustomerPaymentMethodRevocationReasonPaymentMethodVerificationFailed CustomerPaymentMethodRevocationReason = "PAYMENT_METHOD_VERIFICATION_FAILED" // Verification of payment method failed. CustomerPaymentMethodRevocationReasonStripeAPIAuthenticationError CustomerPaymentMethodRevocationReason = "STRIPE_API_AUTHENTICATION_ERROR" // Failed to contact the Stripe API. CustomerPaymentMethodRevocationReasonStripeAPIInvalidRequestError CustomerPaymentMethodRevocationReason = "STRIPE_API_INVALID_REQUEST_ERROR" // Invalid request. Failed to retrieve payment method from Stripe. CustomerPaymentMethodRevocationReasonStripeGatewayNotEnabled CustomerPaymentMethodRevocationReason = "STRIPE_GATEWAY_NOT_ENABLED" // The Stripe payment gateway is not enabled. CustomerPaymentMethodRevocationReasonStripePaymentMethodNotCard CustomerPaymentMethodRevocationReason = "STRIPE_PAYMENT_METHOD_NOT_CARD" // The Stripe payment method type should be card. CustomerPaymentMethodRevocationReasonStripeReturnedNoPaymentMethod CustomerPaymentMethodRevocationReason = "STRIPE_RETURNED_NO_PAYMENT_METHOD" // Stripe did not return any payment methods. Make sure that the correct Stripe account is linked. CustomerPaymentMethodRevocationReason3DSecureFlowInVerificationNotImplemented CustomerPaymentMethodRevocationReason = "THREE_D_SECURE_FLOW_IN_VERIFICATION_NOT_IMPLEMENTED" // Verification of the payment method failed due to 3DS not being supported. )
func (CustomerPaymentMethodRevocationReason) Validate ¶
func (r CustomerPaymentMethodRevocationReason) Validate() error
Validate CustomerPaymentMethodRevocationReason
type CustomerPaypalBillingAgreement ¶
type CustomerPaypalBillingAgreement struct {
PaypalAccountEmail string `json:"paymentAccountEmail"` // The customers's PayPal account email address.
BillingAddress *CustomerPaymentInstrumentBillingAddress `json:"billingAddress,omitempty"` // The billing address of this payment method.
Inactive bool `json:"inactive"` // Whether the PayPal billing agreement is inactive.
IsRevocable bool `json:"isRevocable"` // Whether the payment method can be revoked.The payment method can be revoked if there are no active subscription contracts.
}
Represents a PayPal instrument for customer payment method.
Requires `read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerPaypalBillingAgreement
type CustomerProductSubscriberStatus ¶
type CustomerProductSubscriberStatus string
The possible product subscription states for a customer, as defined by the customer's subscription contracts.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerProductSubscriberStatus
const ( CustomerProductSubscriberStatusActive CustomerProductSubscriberStatus = "ACTIVE" // The customer has at least one active subscription contract. CustomerProductSubscriberStatusCancelled CustomerProductSubscriberStatus = "CANCELLED" // The customer's last subscription contract was cancelled and there are no other active or paused subscription contracts. CustomerProductSubscriberStatusExpired CustomerProductSubscriberStatus = "EXPIRED" // The customer's last subscription contract expired and there are no other active or paused subscription contracts. CustomerProductSubscriberStatusFailed CustomerProductSubscriberStatus = "FAILED" // The customer's last subscription contract failed and there are no other active or paused subscription contracts. CustomerProductSubscriberStatusNeverSubscribed CustomerProductSubscriberStatus = "NEVER_SUBSCRIBED" // The customer has never had a subscription contract. CustomerProductSubscriberStatusPaused CustomerProductSubscriberStatus = "PAUSED" // The customer has at least one paused subscription contract and there are no other active subscription contracts. )
func (CustomerProductSubscriberStatus) Validate ¶
func (status CustomerProductSubscriberStatus) Validate() error
Validate CustomerProductSubscriberStatus
type CustomerShopPayAgreement ¶
type CustomerShopPayAgreement struct {
Name string `json:"name"` // The name of the card holder.
MaskedNumber string `json:"maskedNumber"` // The masked card number with only the last 4 digits displayed.
LastDigits string `json:"lastDigits"` // The last 4 digits of the card.
ExpiryMonth int `json:"expiryMonth"` // The expiry month of the card.
ExpiryYear int `json:"expiryYear"` // The expiry year of the card.
ExpiresSoon bool `json:"expiresSoon"` // Whether the card is about to expire.
Inactive bool `json:"inactive"` // Whether the Shop Pay billing agreement is inactive.
BillingAddress *CustomerCreditCardBillingAddress `json:"billingAddress,omitempty"` // The billing address of the card.
IsRevocable bool `json:"isRevocable"` // The payment method can be revoked if there are no active subscription contracts.
}
Represents a Shop Pay card instrument for customer payment method.
Requires `read_customers` access scope. Also: Requires `read_customer_payment_methods` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerShopPayAgreement
type CustomerSmsMarketingConsentState ¶
type CustomerSmsMarketingConsentState struct {
CustomerMarketingOptInLevel CustomerMarketingOptInLevel `json:"marketingOptInLevel"` // The marketing subscription opt-in level that was set when the customer consented to receive marketing information.
MarketingState CustomerSmsMarketingState `json:"marketingState"` // The current SMS marketing state for the customer.
ConsentCollectedFrom CustomerConsentCollectedFrom `json:"consentCollectedFrom"` // The source from which the SMS marketing information for the customer was collected.
ConsentUpdatedAt DateTime `json:"consentUpdatedAt"` // The date and time when the customer consented to receive marketing material by SMS. If no date is provided, then the date and time when the consent information was sent is used.
}
The record of when a customer consented to receive marketing material by SMS.
The customer's consent state reflects the record with the most recent date when consent was updated.
Requires `read_customers` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerSmsMarketingConsentState
type CustomerSmsMarketingState ¶
type CustomerSmsMarketingState string
The valid SMS marketing states for a customer’s phone number.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerSmsMarketingState
const ( CustomerSmsMarketingStateNotSubscribed CustomerSmsMarketingState = "NOT_SUBSCRIBED" // The customer isn't subscribed to SMS marketing. CustomerSmsMarketingStatePending CustomerSmsMarketingState = "PENDING" // The customer is in the process of subscribing to SMS marketing. CustomerSmsMarketingStateRedacted CustomerSmsMarketingState = "REDACTED" // The customer's personal data is erased. This value is internally-set and read-only. CustomerSmsMarketingStateSubscribed CustomerSmsMarketingState = "SUBSCRIBED" // The customer is subscribed to SMS marketing. CustomerSmsMarketingStateUnsubscribed CustomerSmsMarketingState = "UNSUBSCRIBED" // The customer isn't currently subscribed to SMS marketing but was previously subscribed. )
func (CustomerSmsMarketingState) Validate ¶
func (state CustomerSmsMarketingState) Validate() error
Validate CustomerSmsMarketingState
type CustomerState ¶
type CustomerState string
The valid values for the state of a customer's account with a shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerState
const ( CustomerStateInvited CustomerState = "INVITED" // The customer has received an email invite to create an account. CustomerStateEnabled CustomerState = "ENABLED" // The customer has created an account. CustomerStateDeclined CustomerState = "DECLINED" // The customer declined the email invite to create an account. CustomerStateDisabled CustomerState = "DISABLED" // The customer doesn't have an active account. Customer accounts can be disabled from the Shopify admin at any time. )
type CustomerStatistics ¶
type CustomerStatistics struct {
PredictedSpendTier PredictedSpendTier `json:"predictedSpendTier"` // The predicted spend tier of a customer with a shop.
}
A customer's computed statistics.
Requires `read_customers` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerStatistics
type CustomerVisit ¶
type CustomerVisit struct {
ID string `json:"id"` // A globally-unique ID.
LandingPage URL `json:"landingPage"` // URL of the first page the customer landed on for the session.
LandingPageHTML string `json:"landingPageHtml"` // Landing page information with URL linked in HTML. For example, the first page the customer visited was store.myshopify.com/products/1.
MarketingEvent *MarketingEvent `json:"marketingEvent,omitempty"` // Represent actions taken by an app, on behalf of a merchant, to market Shopify resources such as products, collections, and discounts.
OccurredAt DateTime `json:"occurredAt"` // The date and time when the customer's session occurred.
ReferralCode string `json:"referralCode"` // Marketing referral code from the link that the customer clicked to visit the store. 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.
ReferralInfoHTML string `json:"referralInfoHtml"` // Referral information with URLs linked in HTML.
ReferralURL URL `json:"referralUrl"` // Webpage where the customer clicked a link that sent them to the online store. For example, https://randomblog.com/page1 or android-app://com.google.android.gm.
Source string `json:"source"` // Source from which the customer visited the store, such as a platform (Facebook, Google), email, direct, a website domain, QR code, or unknown.
SourceDescription string `json:"sourceDescription"` // Describes the source explicitly for first or last session.
SourceType MarketingTactic `json:"sourceType"` // Type of marketing tactic.
UTMParameters *UTMParameters `json:"utmParameters"` // A set of UTM parameters gathered from the URL parameters of the referrer.
}
Represents a customer's session visiting a shop's online store, including information about the marketing activity attributed to starting the session.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/CustomerVisit
type Date ¶
type Date string // Represents an ISO 8601-encoded date string. For example, September 7, 2019 is represented as "2019-07-16".
type DateTime ¶
type DateTime string // Represents an ISO 8601-encoded date and time string. For example, 3:50 pm on September 7, 2019 in the time zone of UTC (Coordinated Universal Time) is represented as "2019-09-07T15:50:00Z".
type DayOfTheWeek ¶
type DayOfTheWeek string
Days of the week from Monday to Sunday.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DayOfTheWeek
const ( DayOfTheWeekSunday DayOfTheWeek = "SUNDAY" // Sunday. DayOfTheWeekMonday DayOfTheWeek = "MONDAY" // Monday. DayOfTheWeekTuesday DayOfTheWeek = "TUESDAY" // Tuesday. DayOfTheWeekWednesday DayOfTheWeek = "WEDNESDAY" // Wednesday. DayOfTheWeekThusday DayOfTheWeek = "THURSDAY" // Thursday. DayOfTheWeekFriday DayOfTheWeek = "FRIDAY" // Friday. DayOfTheWeekSaturday DayOfTheWeek = "SATURDAY" // Saturday. )
type Decimal ¶
type Decimal string // A signed decimal number, which supports arbitrary precision and is serialized as a string.
type DeletionEvent ¶
type DeletionEvent struct {
SubjectID string `json:"subjectId"` // The ID of the resource that was deleted.
SubjectType DeletionEventSubjectType `json:"subjectType"` // The type of resource that was deleted.
OccuredAt DateTime `json:"occuredAt"` // The date and time when the deletion event for the related resource was generated.
}
Deletion events chronicle the destruction of resources (e.g. products and collections). Once deleted, the deletion event is the only trace of the original's existence, as the resource itself has been removed and can no longer be accessed.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeletionEvent
type DeletionEventSubjectType ¶
type DeletionEventSubjectType string
The supported subject types of deletion events.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DeletionEventSubjectType
const ( DeletionEventSubjectTypeCollection DeletionEventSubjectType = "COLLECTION" DeletionEventSubjectTypeProduct DeletionEventSubjectType = "PRODUCT" )
func (DeletionEventSubjectType) Validate ¶
func (t DeletionEventSubjectType) Validate() error
Validate DeletionEventSubjectType
type DeliveryAvailableService ¶
type DeliveryAvailableService struct {
Name string `json:"name"` // The name of the service.
Countries *DeliveryCountryCodesOrRestOfWorld `json:"countries,omitempty"` // The countries the service provider ships to.
}
A shipping service and a list of countries that the service is available for.
Requires Any of `orders` or `shipping` access scopes or `manage_delivery_settings` user permission.
https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryAvailableService
type DeliveryBrandedPromise ¶
type DeliveryBrandedPromise struct {
Name string `json:"name"` // The name of the branded promise. For example: `Shop Promise`.
Handle string `json:"handle"` // The handle of the branded promise. For example: `shop_promise`.
}
Represents a branded promise presented to buyers.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryBrandedPromise
type DeliveryCarrierService ¶
type DeliveryCarrierService struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The name of the shipping service provider.
FormattedName string `json:"formattedName"` // The properly formatted name of the shipping service provider, ready to display.
Icon *Image `json:"icon,omitempty"` // The logo of the service provider.
CallbackUrl URL `json:"callbackUrl"` // The URL endpoint that Shopify needs to retrieve shipping rates.
Active bool `json:"active"` // Whether the carrier service is active.
AvailableServicesForCountries []DeliveryAvailableService `json:"availableServicesForCountries"` // The list of services offered for given destinations.
SupportsServiceDiscovery bool `json:"supportsServiceDiscovery"` // Whether merchants are able to send dummy data to your service through the Shopify admin to see shipping rate examples.
}
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryCarrierService
type DeliveryCondition ¶
type DeliveryCondition[T DeliveryConditionCriteria] struct { ID string `json:"id"` // A globally-unique ID. Operator DeliveryConditionOperator `json:"operator"` // The operator to compare the field and criterion value. Field DeliveryConditionField `json:"field"` // The field to compare the criterion value against, using the operator. ConditionCriteria T `json:"conditionCriteria,omitempty"` // The value (weight or price) that the condition field is compared to. }
A condition that must pass for a delivery method definition to be applied to an order.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryCondition
type DeliveryConditionCriteria ¶
The value (weight or price) that the condition field is compared to.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/DeliveryConditionCriteria
type DeliveryConditionField ¶
type DeliveryConditionField string
The field type that the condition will be applied to.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DeliveryConditionField
const ( DeliveryConditionFieldTotalPrice DeliveryConditionField = "TOTAL_PRICE" // The condition will check against the total price of the order. DeliveryConditionFieldTotalWeight DeliveryConditionField = "TOTAL_WEIGHT" // The condition will check against the total weight of the order.. )
func (DeliveryConditionField) Validate ¶
func (operator DeliveryConditionField) Validate() error
Validate DeliveryConditionField
type DeliveryConditionOperator ¶
type DeliveryConditionOperator string
The operator to use to determine if the condition passes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DeliveryConditionOperator
const ( DeliveryConditionOperatorGTE DeliveryConditionOperator = "GREATER_THAN_OR_EQUAL_TO" // The condition will check whether the field is greater than or equal to the criterion. DeliveryConditionOperatorLTE DeliveryConditionOperator = "LESSER_THAN_OR_EQUAL_TO" // The condition will check if the field is less than or equal to the criterion. )
func (DeliveryConditionOperator) Validate ¶
func (operator DeliveryConditionOperator) Validate() error
Validate DeliveryConditionOperator
type DeliveryCountry ¶
type DeliveryCountry struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The full name of the country.
Code *DeliveryCountryCodeOrRestOfWorld `json:"code,omitempty"` // A two-letter country code in ISO 3166-1 alpha-2 standard. It also includes a flag indicating whether the country should be a part of the 'Rest Of World' shipping zone.
TranslatedName string `json:"translatedName"` // The translated name of the country. The translation returned is based on the system's locale.
Provinces []DeliveryProvince `json:"provinces"` // The list of regions associated with this country.
}
A country that is used to define a shipping zone.
type DeliveryCountryAndZone ¶
type DeliveryCountryAndZone struct {
Country *DeliveryCountry `json:"country,omitempty"` // The country details.
Zone string `json:"zone"` // The name of the shipping zone.
}
The country details and the associated shipping zone.
type DeliveryCountryCodeOrRestOfWorld ¶
type DeliveryCountryCodeOrRestOfWorld struct {
CountryCode CountryCode `json:"countryCode"` // The country code in the ISO 3166-1 alpha-2 format.
RestOfWorld bool `json:"restOfWorld"` // Whether the country is a part of the 'Rest of World' shipping zone.
}
The country code and whether the country is a part of the 'Rest Of World' shipping zone.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryCountryCodeOrRestOfWorld
type DeliveryCountryCodesOrRestOfWorld ¶
type DeliveryCountryCodesOrRestOfWorld struct {
CountryCodes []CountryCode `json:"countryCodes"` // List of applicable country codes in the ISO 3166-1 alpha-2 format.
RestOfWorld bool `json:"restOfWorld"` // Whether the country is a part of the 'Rest of World' shipping zone.
}
The list of country codes and information whether the countries are a part of the 'Rest Of World' shipping zone.
Requires Any of `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryCountryCodesOrRestOfWorld
type DeliveryLocalPickupSettings ¶
type DeliveryLocalPickupSettings struct {
Instructions string `json:"instructions"` // Additional instructions or information related to the local pickup.
PickupTime DeliveryLocalPickupTime `json:"pickupTime"` // The estimated pickup time to show customers at checkout.
}
Local pickup settings associated with a location.
Requires Any of `locations` or `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryLocalPickupSettings
type DeliveryLocalPickupTime ¶
type DeliveryLocalPickupTime string
Possible pickup time values that a location enabled for local pickup can have.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DeliveryLocalPickupTime
const ( DeliveryLocalPickupTimeFiveOrMoreDays DeliveryLocalPickupTime = "FIVE_OR_MORE_DAYS" // Usually ready in 5+ days. DeliveryLocalPickupTimeFourHours DeliveryLocalPickupTime = "FOUR_HOURS" // Usually ready in 4 hours. DeliveryLocalPickupTimeOneHour DeliveryLocalPickupTime = "ONE_HOUR" // Usually ready in 1 hour. DeliveryLocalPickupTimeTwentyFourHours DeliveryLocalPickupTime = "TWENTY_FOUR_HOURS" // Usually ready in 24 hours. DeliveryLocalPickupTimeTwoHours DeliveryLocalPickupTime = "TWO_HOURS" // Usually ready in 2 hours. DeliveryLocalPickupTimeTwoToFourDays DeliveryLocalPickupTime = "TWO_TO_FOUR_DAYS" // Usually ready in 2-4 days. )
func (DeliveryLocalPickupTime) Validate ¶
func (status DeliveryLocalPickupTime) Validate() error
Validate DeliveryLocalPickupTime
type DeliveryLocationGroup ¶
type DeliveryLocationGroup struct {
ID string `json:"id"` // A globally-unique ID.
Locations *LocationConnection `json:"locations,omitempty"` // A list of all locations that are part of this location group.
LocationsCount *Count `json:"locationsCount,omitempty"` // A count of all locations that are part of this location group.
}
A location group is a collection of locations. They share zones and delivery methods across delivery profiles.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryLocationGroup
type DeliveryLocationGroupZone ¶
type DeliveryLocationGroupZone[T DeliveryConditionCriteria, U DeliveryRateProvider] struct { Zone *DeliveryZone `json:"zone,omitempty"` // The zone associated to a location group. MethodDefinitionCounts *DeliveryMethodDefinitionCounts `json:"methodDefinitionCounts,omitempty"` // The number of method definitions for the zone. MethodDefinitions *DeliveryMethodDefinitionConnection[T, U] `json:"methodDefinitions,omitempty"` // The method definitions associated to a zone and location group. }
Links a location group with a zone and the associated method definitions.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryLocationGroupZone
type DeliveryLocationGroupZoneConnection ¶
type DeliveryLocationGroupZoneConnection[T DeliveryConditionCriteria, U DeliveryRateProvider] struct { Edges []DeliveryLocationGroupZoneEdge[T, U] `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. Nodes []DeliveryLocationGroupZone[T, U] `json:"nodes,omitempty"` // A list of nodes that are contained in DeliveryLocationGroupEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page. }
An auto-generated type for paginating through multiple DeliveryLocationGroupZones.
type DeliveryLocationGroupZoneEdge ¶
type DeliveryLocationGroupZoneEdge[T DeliveryConditionCriteria, U DeliveryRateProvider] struct { Cursor string `json:"cursor"` // The position of each node in an array, used in pagination. Node *DeliveryLocationGroupZone[T, U] `json:"node,omitempty"` // The item at the end of DeliveryLocationGroupZoneEdge. }
An auto-generated type which holds one DeliveryLocationGroupZone and a cursor during pagination.
type DeliveryMethod ¶
type DeliveryMethod struct {
ID string `json:"id"` // A globally-unique ID.
PresentedName string `json:"presentedName"` // The name of the delivery option that was presented to the buyer during checkout.
MethodType DeliveryMethodType `json:"methodType"` // The type of the delivery method.
ServiceCode string `json:"serviceCode"` // A reference to the shipping method.
SourceReference string `json:"sourceReference"` // Source reference is promise provider specific data associated with delivery promise.
MinDeliveryDateTime DateTime `json:"minDeliveryDateTime"` // The earliest delivery date and time when the fulfillment is expected to arrive at the buyer's location.
MaxDeliveryDateTime DateTime `json:"maxDeliveryDateTime"` // The latest delivery date and time when the fulfillment is expected to arrive at the buyer's location.
BrandedPromise *DeliveryBrandedPromise `json:"brandedPromise,omitempty"` // The branded promise that was presented to the buyer during checkout. For example: Shop Promise.
AdditionalInformation *DeliveryMethodAdditionalInformation `json:"additionalInformation,omitempty"` // The Additional information to consider when performing the delivery.
}
The delivery method used by a fulfillment order.
Requires either of `read_orders`, `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders`, `read_third_party_fulfillment_orders` or `read_marketplace_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryMethod
type DeliveryMethodAdditionalInformation ¶
type DeliveryMethodAdditionalInformation struct {
Instructions string `json:"instructions"` // The delivery instructions to follow when performing the delivery.
Phone string `json:"phone"` // The phone number to contact when performing the delivery.
}
Additional information included on a delivery method that will help during the delivery process.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryMethodAdditionalInformation
type DeliveryMethodDefinition ¶
type DeliveryMethodDefinition[T DeliveryConditionCriteria, U DeliveryRateProvider] struct { ID string `json:"id"` // A globally-unique ID. Name string `json:"name"` // The name of the method definition. Description string `json:"description"` // The description of the method definition. Only available on shipping rates that are custom. Active bool `json:"active"` // Whether this method definition is active. RateProvider U `json:"rateProvider,omitempty"` // The provided rate for this method definition, from a rate definition or participant. MethodConditions []DeliveryCondition[T] `json:"methodConditions"` // The method conditions that must pass for this method definition to be applied to an order. }
A method definition contains the delivery rate and the conditions that must be met for the method to be applied.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryMethodDefinition
type DeliveryMethodDefinitionConnection ¶
type DeliveryMethodDefinitionConnection[T DeliveryConditionCriteria, U DeliveryRateProvider] struct { Edges []DeliveryMethodDefinitionEdge[T, U] `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. Nodes []DeliveryMethodDefinition[T, U] `json:"nodes,omitempty"` // A list of nodes that are contained in DeliveryMethodDefinitionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page. }
An auto-generated type for paginating through multiple DeliveryMethodDefinitions.
type DeliveryMethodDefinitionCounts ¶
type DeliveryMethodDefinitionCounts struct {
ParticipantDefinitionsCount int `json:"participantDefinitionsCount"` // The number of participant method definitions for the specified zone.
RateDefinitionsCount int `json:"rateDefinitionsCount"` // The number of merchant-defined method definitions for the specified zone.
}
The number of method definitions for a zone, separated into merchant-owned and participant definitions.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryMethodDefinitionCounts
type DeliveryMethodDefinitionEdge ¶
type DeliveryMethodDefinitionEdge[T DeliveryConditionCriteria, U DeliveryRateProvider] struct { Cursor string `json:"cursor"` // The position of each node in an array, used in pagination. Node *DeliveryMethodDefinition[T, U] `json:"node,omitempty"` // The item at the end of DeliveryMethodDefinitionEdge. }
An auto-generated type which holds one DeliveryMethodDefinition and a cursor during pagination.
type DeliveryMethodType ¶
type DeliveryMethodType string
Possible method types that a delivery method can have.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DeliveryMethodType
const ( DeliveryMethodTypeLocal DeliveryMethodType = "LOCAL" // The order is delivered using a local delivery service. DeliveryMethodTypeNone DeliveryMethodType = "NONE" // Non-physical items, no delivery needed. DeliveryMethodTypePickupPoint DeliveryMethodType = "PICKUP_POINT" // The order is delivered to a pickup point. DeliveryMethodTypePickUp DeliveryMethodType = "PICK_UP" // The order is picked up by the customer. DeliveryMethodTypeRetail DeliveryMethodType = "RETAIL" // In-store sale, no delivery needed. DeliveryMethodTypeShipping DeliveryMethodType = "SHIPPING" // The order is shipped. )
func (DeliveryMethodType) Validate ¶
func (reason DeliveryMethodType) Validate() error
Validate DeliveryMethodType
type DeliveryParticipant ¶
type DeliveryParticipant struct {
ID string `json:"id"` // A globally-unique ID.
AdaptToNewServicesFlag bool `json:"adaptToNewServicesFlag"` // Whether to display new shipping services automatically to the customer when the service becomes available.
CarrierService *DeliveryCarrierService `json:"carrierService,omitempty"` // The carrier used for this participant.
FixedFee *MoneyV2 `json:"fixedFee,omitempty"` // The merchant-defined fixed fee for this participant.
ParticipantServices []DeliveryParticipantService `json:"participantServices"` // The carrier-specific services offered by the participant, and whether each service is active.
PercentageOfRateFee float64 `json:"percentageOfRateFee"` // The merchant-defined percentage-of-rate fee for this participant.
}
A participant defines carrier-calculated rates for shipping services with a possible merchant-defined fixed fee or a percentage-of-rate fee.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryParticipant
type DeliveryParticipantService ¶
type DeliveryParticipantService struct {
Name string `json:"name"` // The name of the service.
Active bool `json:"active"` // Whether the service is active.
}
A mail service provided by the participant.
Requires Any of `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryParticipantService
type DeliveryProfile ¶
type DeliveryProfile[T DeliveryConditionCriteria, U DeliveryRateProvider] struct { ID string `json:"id"` // A globally-unique ID. Name string `json:"name"` // The name of the delivery profile. Default bool `json:"default"` // Whether this is the default profile. ActiveMethodDefinitionsCount int `json:"activeMethodDefinitionsCount"` // The number of active shipping rates for the profile. LocationsWithoutRateCount int `json:"locationsWithoutRateCount"` // The number of locations without rates defined. OriginalLocationCount int `json:"originalLocationCount"` // The number of active origin locations for the profile. ProductVariantsCount *Count `json:"productVariantsCount,omitempty"` // How many product variants are in this profile. UnassignedLocations []Location `json:"unassignedLocations"` // List of locations that haven't been assigned to a location group for this profile. UnassignedLocationsPaginated *LocationConnection `json:"unassignedLocationsPaginated,omitempty"` // List of locations that have not been assigned to a location group for this profile. ProfileItems *DeliveryProfileItemConnection `json:"profileItems,omitempty"` // The location groups and associated zones using this profile. ProfileLocationGroups []DeliveryProfileLocationGroup[T, U] `json:"profileLocationGroups"` // The location groups and associated zones using this profile. SellingPlanGroups *SellingPlanGroupConnection `json:"sellingPlanGroups,omitempty"` // Selling plan groups associated with the specified delivery profile. ZoneCountryCount int `json:"zoneCountryCount"` // The number of countries with active rates to deliver to. LegacyMode bool `json:"legacyMode"` // Whether this shop has enabled legacy compatibility mode for delivery profiles. }
type DeliveryProfileItem ¶
type DeliveryProfileItem struct {
ID string `json:"id"` // A globally-unique ID.
Product *Product `json:"product,omitempty"` // A product associated with this profile.
Variants *ProductVariantConnection `json:"variants,omitempty"` // The product variants associated with this delivery profile.
}
A product and the subset of associated variants that are part of this delivery profile.
Requires Any of `shipping` access scopes or `manage_delivery_settings` user permission.
type DeliveryProfileItemConnection ¶
type DeliveryProfileItemConnection struct {
Edges []DeliveryProfileItemEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []DeliveryProfileItem `json:"nodes,omitempty"` // A list of nodes that are contained in DeliveryProfileItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple DeliveryProfileItems.
type DeliveryProfileItemEdge ¶
type DeliveryProfileItemEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *DeliveryProfileItem `json:"node,omitempty"` // The item at the end of DeliveryProfileItemEdge.
}
An auto-generated type which holds one DeliveryProfileItem and a cursor during pagination.
type DeliveryProfileLocationGroup ¶
type DeliveryProfileLocationGroup[T DeliveryConditionCriteria, U DeliveryRateProvider] struct { CountriesInAnyZone []DeliveryCountryAndZone `json:"countriesInAnyZone"` // The countries already selected in any zone for the specified location group. LocationGroup *DeliveryLocationGroup `json:"locationGroup,omitempty"` // The collection of locations that make up the specified location group. LocationGroupZones *DeliveryLocationGroupZoneConnection[T, U] `json:"locationGroupZones,omitempty"` // The applicable zones associated to the specified location group. }
Links a location group with zones. Both are associated to a delivery profile.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
type DeliveryProvince ¶
type DeliveryProvince struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The full name of the region.
Code string `json:"code"` // The code of the region.
TranslatedName string `json:"translatedName"` // The translated name of the region. The translation returned is based on the system's locale.
}
A region that is used to define a shipping zone.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryProvince
type DeliveryRateDefinition ¶
type DeliveryRateDefinition struct {
ID string `json:"id"` // A globally-unique ID.
Price *MoneyV2 `json:"price,omitempty"` // The price of this rate.
}
The merchant-defined rate of the DeliveryMethodDefinition.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryRateDefinition
type DeliveryRateProvider ¶
type DeliveryRateProvider interface {
*DeliveryParticipant | *DeliveryRateDefinition
}
A rate provided by a merchant-defined rate or a participant.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/DeliveryRateProvider
type DeliveryZone ¶
type DeliveryZone struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The name of the zone.
Countries []DeliveryCountry `json:"countries"` // The list of countries within the zone.
}
A zone is a group of countries that have the same shipping rates. Customers can order products from a store only if they choose a shipping destination that's included in one of the store's zones.
Requires Any of `assigned_shipping` or `shipping` access scopes or `manage_delivery_settings` user permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DeliveryZone
type DepositConfiguration ¶
type DepositConfiguration interface {
*DepositPercentage
}
Configuration of the deposit.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/DepositConfiguration
type DepositPercentage ¶
type DepositPercentage struct {
Percentage float64 `json:"percentage"` // The percentage value of the deposit.
}
A percentage deposit.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DepositPercentage
type DigitalWallet ¶
type DigitalWallet string
Digital wallet, such as Apple Pay, which can be used for accelerated checkouts.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DigitalWallet
const ( DigitalWalletAndroidPay DigitalWallet = "ANDROID_PAY" // Android Pay. DigitalWalletApplePay DigitalWallet = "APPLE_PAY" // Apple Pay. DigitalWalletGooglePay DigitalWallet = "GOOGLE_PAY" // Google Pay. DigitalWalletShopifyPay DigitalWallet = "SHOPIFY_PAY" // Shopify Pay. )
type DiscountAllocation ¶
type DiscountAllocation struct {
AllocatedAmountSet *MoneyBag `json:"allocatedAmountSet,omitempty"` // The money amount that's allocated to a line based on the associated discount application in shop and presentment currencies.
DiscountApplication *DiscountApplication `json:"discountApplication,omitempty"` // The discount application that the allocated amount originated from.
}
An amount that's allocated to a line based on an associated discount application.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountAllocation
type DiscountApplication ¶
type DiscountApplication struct {
Index int `json:"index"` // An ordered index that can be used to identify the discount application and indicate the precedence of the discount application for calculations.
AllocationMethod DiscountApplicationAllocationMethod `json:"allocationMethod"` // The method by which the discount's value is applied to its entitled items.
TargetType DiscountApplicationTargetType `json:"targetType"` // Whether the discount is applied on line items or shipping lines.
TargetSelection DiscountApplicationTargetSelection `json:"targetSelection"` // How the discount amount is distributed on the discounted lines.
Value interface{} `json:"value,omitempty"` // The value of the discount application.
}
Discount applications capture the intentions of a discount source at the time of application on an order's line items or shipping lines.
Discount applications don't represent the actual final amount discounted on a line (line item or shipping line). The actual amount discounted on a line is represented by the `DiscountAllocation` object.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/DiscountApplication
type DiscountApplicationAllocationMethod ¶
type DiscountApplicationAllocationMethod string
The method by which the discount's value is allocated onto its entitled lines.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DiscountApplicationAllocationMethod
const ( DiscountApplicationAllocationMethodAcross DiscountApplicationAllocationMethod = "ACROSS" // The value is spread across all entitled lines. DiscountApplicationAllocationMethodEach DiscountApplicationAllocationMethod = "EACH" // The value is applied onto every entitled line. DiscountApplicationAllocationMethodOne DiscountApplicationAllocationMethod = "ONE" // The value is specifically applied onto a particular line. Use `ACROSS` instead. )
func (DiscountApplicationAllocationMethod) Validate ¶
func (method DiscountApplicationAllocationMethod) Validate() error
Validate DiscountApplicationAllocationMethod
type DiscountApplicationConnection ¶
type DiscountApplicationConnection struct {
Edges []DiscountApplicationEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []DiscountApplication `json:"nodes,omitempty"` // A list of nodes that are contained in DiscountApplicationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple DiscountApplications.
type DiscountApplicationEdge ¶
type DiscountApplicationEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *DiscountApplication `json:"node,omitempty"` // The item at the end of DiscountApplicationEdge.
}
An auto-generated type which holds one DiscountApplication and a cursor during pagination.
type DiscountApplicationTargetSelection ¶
type DiscountApplicationTargetSelection string
The lines on the order to which the discount is applied, of the type defined by the discount application's `targetType`. For example, the value `ENTITLED`, combined with a `targetType` of `LINE_ITEM`, applies the discount on all line items that are entitled to the discount. The value `ALL`, combined with a `targetType` of `SHIPPING_LINE`, applies the discount on all shipping lines.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DiscountApplicationTargetSelection
const ( DiscountApplicationTargetSelectionAll DiscountApplicationTargetSelection = "ALL" // The discount is allocated onto all the lines. DiscountApplicationTargetSelectionEntitled DiscountApplicationTargetSelection = "ENTITLED" // The discount is allocated onto only the lines that it's entitled for. DiscountApplicationTargetSelectionExplicit DiscountApplicationTargetSelection = "EXPLICIT" // The discount is allocated onto explicitly chosen lines. )
func (DiscountApplicationTargetSelection) Validate ¶
func (t DiscountApplicationTargetSelection) Validate() error
Validate DiscountApplicationTargetSelection
type DiscountApplicationTargetType ¶
type DiscountApplicationTargetType string
The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DiscountApplicationTargetType
const ( DiscountApplicationTargetTypeLineItem DiscountApplicationTargetType = "LINE_ITEM" // The discount applies onto line items. DiscountApplicationTargetTypeShippingLine DiscountApplicationTargetType = "SHIPPING_LINE" // The discount applies onto shipping lines. )
func (DiscountApplicationTargetType) Validate ¶
func (t DiscountApplicationTargetType) Validate() error
Validate DiscountApplicationTargetType
type DiscountClass ¶
type DiscountClass string
The discount class that's used to control how discounts can be combined.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DiscountClass
const ( DiscountClassOrder DiscountClass = "ORDER" // The discount is combined with an [order discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations?shpxid=6ebfdca3-9192-4B96-223C-4FB2F948242C) class. DiscountClassProduct DiscountClass = "PRODUCT" // The discount is combined with a [product discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations?shpxid=6ebfdca3-9192-4B96-223C-4FB2F948242C) class. DiscountClassShipping DiscountClass = "SHIPPING" // The discount is combined with a [shipping discount](https://help.shopify.com/manual/discounts/combining-discounts/discount-combinations?shpxid=6ebfdca3-9192-4B96-223C-4FB2F948242C) class. )
type DiscountNode ¶
type DiscountNode struct {
ID string `json:"id"` //
Discount interface{} `json:"discount,omitempty"` // A discount that's applied at checkout or on cart. Discounts can be automatic or code-based.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
Events *EventConnection `json:"events,omitempty"` // The paginated list of events associated with the host subject.
}
The DiscountNode object enables you to manage discounts, which are applied at checkout or on a cart.
Discounts are a way for merchants to promote sales and special offers, or as customer loyalty rewards. Discounts can apply to orders, products, or shipping, and can be either automatic or code-based. For example, you can offer customers a buy X get Y discount that's automatically applied when purchases meet specific criteria. Or, you can offer discounts where customers have to enter a code to redeem an amount off discount on products, variants, or collections in a store.
Learn more about working with [Shopify's discount model](https://shopify.dev/docs/apps/build/discounts), including related mutations, limitations, and considerations.
Requires Apps must have `read_discounts` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DiscountNode
type DiscountTargetType ¶
type DiscountTargetType string
The type of line (line item or shipping line) on an order that the subscription discount is applicable towards.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DiscountTargetType
const ( DiscountTargetTypeLineItem DiscountTargetType = "LINE_ITEM" // The discount applies onto line items. DiscountTargetTypeShippingItem DiscountTargetType = "SHIPPING_ITEM" // The discount applies onto shipping lines. )
func (DiscountTargetType) Validate ¶
func (t DiscountTargetType) Validate() error
Validate DiscountTargetType
type DiscountType ¶
type DiscountType string
The type of the subscription discount.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DiscountType
const ( DiscountTypeAutomaticDiscount DiscountType = "AUTOMATIC_DISCOUNT" // Automatic discount type. DiscountTypeCodeDiscount DiscountType = "CODE_DISCOUNT" // Code discount type. DiscountTypeManual DiscountType = "MANUAL" // Manual discount type. )
type DisputeStatus ¶
type DisputeStatus string
The possible statuses of a dispute.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DisputeStatus
const ( DisputeStatusAccepted DisputeStatus = "ACCEPTED" DisputeStatusLost DisputeStatus = "LOST" DisputeStatusNeedsResponse DisputeStatus = "NEEDS_RESPONSE" DisputeStatusUnderReview DisputeStatus = "UNDER_REVIEW" DisputeStatusWon DisputeStatus = "WON" DisputeStatusChargeRefunded DisputeStatus = "CHARGE_REFUNDED" // (Deprecated) Status previously used by Stripe to indicate that a dispute led to a refund. CHARGE_REFUNDED is no longer supported. )
type DisputeType ¶
type DisputeType string
The possible types for a dispute.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DisputeType
const ( DisputeTypeChargeback DisputeType = "CHARGEBACK" // The dispute has turned into a chargeback. DisputeTypeInquiry DisputeType = "INQUIRY" // The dispute is in the inquiry phase. )
type Domain ¶
type Domain struct {
ID string `json:"id"` // A globally-unique ID.
Host string `json:"host"` // The host name of the domain. For example, `example.com`.
URL URL `json:"url"` // The URL of the domain (for example, `https://example.com`).
Localization *DomainLocalization `json:"localization,omitempty"` // The localization of the domain, if the domain doesn't redirect.
}
A unique string that represents the address of a Shopify store on the Internet.
type DomainLocalization ¶
type DomainLocalization struct {
Country string `json:"country"` // The ISO code for the country assigned to the domain. For example, "CA" or "*" for a domain set to "Rest of world".
DefaultLocale string `json:"defaultLocale"` // The ISO code for the domain’s default locale. For example, "en".
AlternateLocales []string `json:"alternateLocales"` // The ISO codes for the domain’s alternate locales. For example, ["en"].
}
The country and language settings assigned to a domain.
type DraftOrder ¶
type DraftOrder struct {
ID string `json:"id"` // A globally-unique ID.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
PONumber string `json:"poNumber"` // The purchase order number.
DefaultCursor string `json:"defaultCursor"` // A default cursor that returns the single next record, sorted ascending by ID.
Email string `json:"email"` // The email address of the customer, which is used to send notifications.
Phone string `json:"phone"` // The assigned phone number.
Status DraftOrderStatus `json:"status"` // The status of the draft order.
Customer *Customer `json:"customer,omitempty"` // The customer who will be sent an invoice.
Order *Order `json:"order,omitempty"` // The order that was created from the draft order.
VisibleToCustomer bool `json:"visibleToCustomer"` // Whether the draft order will be visible to the customer on the self-serve portal.
Ready bool `json:"ready"` // Whether the draft order is ready and can be completed. Draft orders might have asynchronous operations that can take time to finish.
BillingAddress *MailingAddress `json:"billingAddress,omitempty"` // The billing address of the customer.
BillingAddressMatchesShippingAddress bool `json:"billingAddressMatchesShippingAddress"` // Whether the billing address matches the shipping address.
ShippingAddress *MailingAddress `json:"shippingAddress,omitempty"` // The shipping address of the customer.
LineItems *DraftOrderLineItemConnection `json:"lineItems,omitempty"` // The list of the line items in the draft order.
LineItemsSubtotalPrice *MoneyBag `json:"lineItemsSubtotalPrice,omitempty"` // A subtotal of the line items and corresponding discounts, excluding include shipping charges, shipping discounts, taxes, or order discounts.
TotalQuantityOfLineItems int `json:"totalQuantityOfLineItems"` // The sum of individual line item quantities. If the draft order has bundle items, this is the sum containing the quantities of individual items in the bundle.
TotalWeight string `json:"totalWeight"` // The total weight in grams of the draft order.
ShippingLine *ShippingLine `json:"shippingLine,omitempty"` // The line item containing the shipping information and costs.
CurrencyCode CurrencyCode `json:"currencyCode"` // The shop currency used for calculation.
PresentmentCurrencyCode CurrencyCode `json:"presentmentCurrencyCode"` // The payment currency used for calculation.
AllVariantPricesOverridden bool `json:"allVariantPricesOverridden"` // Whether all variant prices have been overridden.
AnyVariantPricesOverridden bool `json:"anyVariantPricesOverridden"` // Whether any variant prices have been overridden.
InvoiceEmailTemplateSubject string `json:"invoiceEmailTemplateSubject"` // The subject defined for the draft invoice email template.
InvoiceURL URL `json:"invoiceUrl"` // The link to the checkout, which is sent to the customer in the invoice email.
PurchasingEntity interface{} `json:"purchasingEntity,omitempty"` // The purchasing entity.
// Whether or not to accept automatic discounts on the draft order during calculation.
// If false, only discount codes and custom draft order discounts (see appliedDiscount) will be applied.
// If true, eligible automatic discounts will be applied in addition to discount codes and custom draft order discounts.
AcceptAutomaticDiscounts bool `json:"acceptAutomaticDiscounts"`
AllowDiscountCodesInCheckout bool `json:"allowDiscountCodesInCheckout"` // Whether discount codes are allowed during checkout of this draft order.
PlatformDiscounts []DraftOrderPlatformDiscount `json:"platformDiscounts"` // The list of platform discounts applied.
AppliedDiscount *DraftOrderAppliedDiscount `json:"appliedDiscount,omitempty"` // The custom order-level discount applied.
DiscountCodes []string `json:"discountCodes"` // All discount codes applied.
CustomAttributes []Attribute `json:"customAttributes"` // The custom information added to the draft order on behalf of the customer.
LocalizedFields *LocalizedFieldConnection `json:"localizedFields,omitempty"` // List of localized fields for the resource.
TaxesIncluded bool `json:"taxesIncluded"` // Whether the line item prices include taxes.
TaxExempt bool `json:"taxExempt"` // Whether the draft order is tax exempt.
TaxLines []TaxLine `json:"taxLines"` // The list of of taxes lines charged for each line item and shipping line.
TotalTaxSet *MoneyBag `json:"totalTaxSet,omitempty"` // The total tax.
TotalDiscountsSet *MoneyBag `json:"totalDiscountsSet,omitempty"` // Total discounts.
TotalLineItemsPriceSet *MoneyBag `json:"totalLineItemsPriceSet,omitempty"` // Total price of line items.
TotalShippingPriceSet *MoneyBag `json:"totalShippingPriceSet,omitempty"` // The total shipping price.
TotalPriceSet *MoneyBag `json:"totalPriceSet,omitempty"` // The total price, includes taxes, shipping charges, and discounts.
Events *EventConnection `json:"events,omitempty"` // The list of events associated with the draft order.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
Tags []string `json:"tags"` // A comma-separated list of searchable keywords that are associated with the draft order. Updating `tags` overwrites any existing tags that were previously added to the draft order. To add new tags without overwriting existing tags, use the tagsAdd mutation.
Note2 string `json:"note2"` // The text from an optional note attached to the draft order.
HasTimelineComment bool `json:"hasTimelineComment"` // Whether the merchant has added timeline comments to the draft order.
TransformerFingerprint string `json:"transformerFingerprint"` // Fingerprint of the current cart. In order to have bundles work, the fingerprint must be passed to each request as it was previously returned, unmodified.
PaymentTerms *PaymentTerms `json:"paymentTerms,omitempty"` // The associated payment terms for this draft order.
Warnings []DraftOrderWarning `json:"warnings"` // The list of warnings raised while calculating.
CreatedAt DateTime `json:"createdAt"` // The date and time when the draft order was created in Shopify.
ReserveInventoryUntil DateTime `json:"reserveInventoryUntil"` // The time after which inventory will automatically be restocked.
CompletedAt DateTime `json:"completedAt"` // The date and time when the draft order was converted to a new order, and had it's status changed to Completed.
InvoiceSentAt DateTime `json:"invoiceSentAt"` // The date and time when the invoice was last emailed to the customer.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the draft order was last changed. The format is YYYY-MM-DD HH:mm:ss. For example, 2016-02-05 17:04:01.
}
An order that a merchant creates on behalf of a customer. Draft orders are useful for merchants that need to do the following tasks:
- Create new orders for sales made by phone, in person, by chat, or elsewhere. When a merchant accepts payment for a draft order, an order is created.
- Send invoices to customers to pay with a secure checkout link.
- Use custom items to represent additional costs or products that aren't displayed in a shop's inventory.
- Re-create orders manually from active sales channels.
- Sell products at discount or wholesale rates.
- Take pre-orders.
- Save an order as a draft and resume working on it later.
For draft orders in multiple currencies `presentment_money` is the source of truth for what a customer is going to be charged and `shop_money` is an estimate of what the merchant might receive in their shop currency.
Requires `read_draft_orders` access scope.
References: https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder
type DraftOrderAppliedDiscount ¶
type DraftOrderAppliedDiscount struct {
Title string `json:"title"` // Name of the order-level discount.
Description string `json:"description"` // Description of the order-level discount.
Value float64 `json:"value"` // The order level discount amount. If `valueType` is `"percentage"`, then `value` is the percentage discount.
ValueType DraftOrderAppliedDiscountType `json:"valueType"` // Type of the order-level discount.
AmountSet *MoneyBag `json:"amountSet,omitempty"` // The amount of money discounted, with values shown in both shop currency and presentment currency.
}
The order-level discount applied to a draft order.
Requires `read_draft_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderAppliedDiscount
type DraftOrderAppliedDiscountType ¶
type DraftOrderAppliedDiscountType string
The valid discount types that can be applied to a draft order.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DraftOrderAppliedDiscountType
const ( DraftOrderAppliedDiscountTypeFixedAmount DraftOrderAppliedDiscountType = "FIXED_AMOUNT" // A fixed amount in the store's currency. DraftOrderAppliedDiscountTypePercentage DraftOrderAppliedDiscountType = "PERCENTAGE" // A percentage of the order subtotal. )
func (DraftOrderAppliedDiscountType) Validate ¶
func (status DraftOrderAppliedDiscountType) Validate() error
Validate DraftOrderAppliedDiscountType
type DraftOrderConnection ¶
type DraftOrderConnection struct {
Edges []DraftOrderEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []DraftOrder `json:"nodes,omitempty"` // A list of nodes that are contained in DraftOrderEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple DraftOrders.
type DraftOrderEdge ¶
type DraftOrderEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *DraftOrder `json:"node"` // The item at the end of `DraftOrderEdge`.
}
An auto-generated type which holds one `DraftOrder` and a cursor during pagination.
type DraftOrderLineItem ¶
type DraftOrderLineItem struct {
ID string `json:"id"` // A globally-unique ID.
UUID string `json:"uuid"` // The UUID of the draft order line item. Must be unique and consistent across requests. This field is mandatory in order to manipulate drafts with bundles.
Name string `json:"name"` // The name of the product.
Title string `json:"title"` // The title of the product or variant. This field only applies to custom line items.
Image *Image `json:"image,omitempty"` // The image of the product variant.
SKU string `json:"sku"` // The variant SKU number.
Product *Product `json:"product,omitempty"` // The product for the line item.
Variant *ProductVariant `json:"variant,omitempty"` // The product variant for the line item.
VariantTitle string `json:"variantTitle"` // The title of the variant at time of order creation.
BundleComponents []DraftOrderLineItem `json:"bundleComponents"` // The list of bundle components if applicable.
Weight *Weight `json:"weight,omitempty"` // The weight unit and value.
Custom bool `json:"custom"` // Whether the line item is custom (`true`) or contains a product variant (`false`).
Vendor string `json:"vendor"` // The name of the vendor who made the variant.
CustomAttributes []Attribute `json:"customAttributes"` // A list of attributes that represent custom features or special requests.
CustomAttributesV2 []TypedAttribute `json:"customAttributesV2"` // The list of additional information (metafields) with the associated types.
Quantity int `json:"quantity"` // The number of units ordered, including refunded and removed units.
AppliedDiscount *DraftOrderAppliedDiscount `json:"appliedDiscount,omitempty"` // The custom applied discount.
ApproximateDiscountedUnitPriceSet *MoneyBag `json:"approximateDiscountedUnitPriceSet,omitempty"` // The `discountedTotal` divided by `quantity`, equal to the average value of the line item price per unit after discounts are applied. This value doesn't include discounts applied to the entire draft order.
TotalDiscountSet *MoneyBag `json:"totalDiscountSet,omitempty"` // The total discount allocated to the line item in shop and presentment currencies, including the total allocated to refunded and removed quantities. This value doesn't include order-level discounts.
DiscountedTotalSet *MoneyBag `json:"discountedTotalSet,omitempty"` // The total discounted price of the line item in shop and presentment currencies, including refunded and removed quantities. This value doesn't include order-level discounts. Code-based discounts aren't included by default.
OriginalUnitPriceWithCurrency *MoneyV2 `json:"originalUnitPriceWithCurrency,omitempty"` // The original custom line item input price.
OriginalUnitPriceSet *MoneyBag `json:"originalUnitPriceSet,omitempty"` // In shop and presentment currencies, the unit price of the line item when the order was created. This value doesn't include discounts.
OriginalTotalSet *MoneyBag `json:"originalTotalSet,omitempty"` // In shop and presentment currencies, the total price of the line item when the order was created. This value doesn't include discounts.
PriceOverride *MoneyV2 `json:"priceOverride,omitempty"` // The price override for the line item.
IsGiftCard bool `json:"isGiftCard"` // Whether the line item represents the purchase of a gift card.
RequiresShipping bool `json:"requiresShipping"` // Whether physical shipping is required for the variant.
FulfillmentService *FulfillmentService `json:"fulfillmentService,omitempty"` // Name of the service provider who fulfilled the order. Valid values are either manual or the name of the provider. For example, amazon, shipwire. Deleted fulfillment services will return null.
Taxable bool `json:"taxable"` // Whether the variant is taxable.
TaxLines []TaxLine `json:"taxLines"` // The taxes charged for the line item, including taxes charged for refunded and removed quantities.
}
The line item for a draft order.
Requires `read_draft_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderLineItem
type DraftOrderLineItemConnection ¶
type DraftOrderLineItemConnection struct {
Edges []ProductVariantComponentEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []DraftOrderLineItem `json:"nodes,omitempty"` // A list of nodes that are contained in ProductVariantComponentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple DraftOrderLineItems.
type DraftOrderLineItemEdge ¶
type DraftOrderLineItemEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *DraftOrderLineItem `json:"node"` // The item at the end of `ProductVariantComponentEdge`.
}
An auto-generated type which holds one `DraftOrderLineItem` and a cursor during pagination.
type DraftOrderPlatformDiscount ¶
type DraftOrderPlatformDiscount struct {
ID string `json:"id"` // A globally-unique ID.
Title string `json:"title"` // The name of the discount.
Summary string `json:"summary"` // The summary of the discount.
ShortSummary string `json:"shortSummary"` // The short summary of the discount.
AutomaticDiscount bool `json:"automaticDiscount"` // Whether the discount is an automatic discount.
BxgyDiscount bool `json:"bxgyDiscount"` // Whether the discount is a buy x get y discount.
Code string `json:"code"` // If a code-based discount, the code used to add the discount.
DiscountNode *DiscountNode `json:"discountNode,omitempty"` // The discount node for the platform discount.
DiscountClass DiscountClass `json:"discountClass"` // The discount class.
PresentationLevel string `json:"presentationLevel"` // Whether the discount is line, order or shipping level.
Allocations []DraftOrderPlatformDiscountAllocation `json:"allocations"` // Price reduction allocations across the draft order's lines.
TotalAmount *MoneyV2 `json:"totalAmount,omitempty"` // The discount total amount in shop currency.
TotalAmountPriceSet *MoneyBag `json:"totalAmountPriceSet,omitempty"` // The amount of money discounted, with values shown in both shop currency and presentment currency.
}
The platform discounts applied to the draft order.
Requires `read_draft_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderPlatformDiscount
type DraftOrderPlatformDiscountAllocation ¶
type DraftOrderPlatformDiscountAllocation struct {
ID string `json:"id"` // The ID of the allocation.
Quantity int `json:"quantity"` // The quantity of the target being discounted.
ReductionAmount *MoneyV2 `json:"reductionAmount,omitempty"` // Amount of the discount allocated to the target.
ReductionAmountSet *MoneyBag `json:"reductionAmountSet,omitempty"` // Amount of the discount allocated to the target in both shop currency and presentment currency.
Target interface{} `json:"target,omitempty"` // The element of the draft being discounted.
}
Price reduction allocations across the draft order's lines.
Requires `read_draft_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrderPlatformDiscountAllocation
type DraftOrderPlatformDiscountAllocationTarget ¶
type DraftOrderPlatformDiscountAllocationTarget interface {
*CalculatedDraftOrderLineItem | *DraftOrderLineItem | *ShippingLine
}
The element of the draft being discounted.
Requires `read_draft_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/DraftOrderPlatformDiscountAllocationTarget
type DraftOrderStatus ¶
type DraftOrderStatus string
The valid statuses for a draft order.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/DraftOrderStatus
const ( DraftOrderStatusOpen DraftOrderStatus = "OPEN" // The draft order is open. It has not been paid, and an invoice hasn't been sent. DraftOrderStatusInvoiceSent DraftOrderStatus = "INVOICE_SENT" // An invoice for the draft order has been sent to the customer. DraftOrderStatusCompleted DraftOrderStatus = "COMPLETED" // The draft order has been paid. )
func (DraftOrderStatus) Validate ¶
func (status DraftOrderStatus) Validate() error
Validate DraftOrderStatus
type DraftOrderWarning ¶
type DraftOrderWarning struct {
ErrorCode string `json:"errorCode"` // The error code.
Field string `json:"field"` // The input field that the warning applies to.
Message string `json:"message"` // The warning message.
}
A warning that is displayed to the merchant when a change is made to a draft order.
Requires `read_draft_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/DraftOrderWarning
type Duty ¶
type Duty struct {
ID string `json:"id"` // A globally-unique ID.
Price *MoneyBag `json:"price,omitempty"` // The amount of the duty.
TaxLines []TaxLine `json:"taxLines,omitempty"` // A list of taxes charged on the duty.
HarmonizedSystemCode string `json:"harmonizedSystemCode"` // The harmonized system code of the item used in calculating the duty.
CountryCodeOfOrigin CountryCode `json:"countryCodeOfOrigin"` // The ISO 3166-1 alpha-2 country code of the country of origin used in calculating the duty.
}
The duty details for a line item.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Duty
type EditableProperty ¶
type EditableProperty struct {
Locked bool `json:"locked"` // Whether the attribute is locked for editing.
Reason string `json:"reason"` // The reason the attribute is locked for editing.
}
The attribute editable information.
type Event ¶
type Event struct {
ID string `json:"id"` // Globally unique ID.
AppTitle string `json:"appTitle"` // The name of the app that created the event.
Action string `json:"action"` // The action that occured.
Message string `json:"message"` // Human readable text that describes the event.
AttributeToApp bool `json:"attributeToApp"` // Whether the event was created by an app.
AttributeToUser bool `json:"attributeToUser"` // Whether the event was caused by an admin user.
CriticalAlert bool `json:"criticalAlert"` // Whether the event is critical.
CreatedAt DateTime `json:"createdAt"` // The date and time when the event was created.
}
Events chronicle resource activities such as the creation of an article, the fulfillment of an order, or the addition of a product.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Event
type EventConnection ¶
type EventConnection struct {
Edges []EventEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Event `json:"nodes,omitempty"` // A list of nodes that are contained in EventEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
MediaConnection represents the media field for Events.
type EventEdge ¶
type EventEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Event `json:"node"` // The item at the end of EventEdge.
}
An auto-generated type which holds one Event and a cursor during pagination.
type ExchangeLineItem ¶
type ExchangeLineItem struct {
ID string `json:"id"` // A globally-unique ID.
LineItem *LineItem `json:"lineItem,omitempty"` // The order line item for the exchange.
}
An item for exchange.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ExchangeLineItem
type ExchangeLineItemConnection ¶
type ExchangeLineItemConnection struct {
Edges []ExchangeLineItemEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ExchangeLineItem `json:"nodes,omitempty"` // A list of nodes that are contained in ExchangeLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ExchangeLineItems.
type ExchangeLineItemEdge ¶
type ExchangeLineItemEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ExchangeLineItem `json:"node"` // The item at the end of `ExchangeLineItemEdge`.
}
An auto-generated type which holds one `ExchangeLineItem` and a cursor during pagination.
type FailedRequirement ¶
type FailedRequirement struct {
Action *NavigationItem `json:"action,omitempty"` // Action to be taken to resolve a failed requirement, including URL link.
Message string `json:"message"` // A concise set of copy strings to be displayed to merchants, to guide them in resolving problems your app encounters when trying to make use of their Shop and its resources.
}
Requirements that must be met before an app can be installed.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FailedRequirement
type FileError ¶
type FileError struct {
Code FileErrorCode `json:"code"` // Code representing the type of error.
Details string `json:"details"` // Additional details regarding the error.
Message string `json:"message"` // Translated error message.
}
A file error. This typically occurs when there is an issue with the file itself causing it to fail validation. Check the file before attempting to upload again.
Requires either `read_files`, `read_themes` or `read_images` access scope.
type FileErrorCode ¶
type FileErrorCode string // The error types for a file. (https://shopify.dev/docs/api/admin-graphql/2024-10/enums/FileErrorCode)
const ( FileErrorCodeDuplicateFilenameError FileErrorCode = "DUPLICATE_FILENAME_ERROR" // File could not be created because a file with the same name already exists. FileErrorCodeExternalVideoEmbedDisabled FileErrorCode = "EXTERNAL_VIDEO_EMBED_DISABLED" // File could not be created because embed permissions are disabled for this video. FileErrorCodeExternalVideoEmbedNotFoundOrTranscoding FileErrorCode = "EXTERNAL_VIDEO_EMBED_NOT_FOUND_OR_TRANSCODING" // File could not be created because video is either not found or still transcoding. FileErrorCodeExternalVideoInvalidAspectRatio FileErrorCode = "EXTERNAL_VIDEO_INVALID_ASPECT_RATIO" // File could not be created because the external video has an invalid aspect ratio. FileErrorCodeExternalVideoNotFound FileErrorCode = "EXTERNAL_VIDEO_NOT_FOUND" // File could not be created because the external video could not be found. FileErrorCodeExternalVideoUnlisted FileErrorCode = "EXTERNAL_VIDEO_UNLISTED" // File could not be created because the external video is not listed or is private. FileErrorCodeFileStorageLimitExceeded FileErrorCode = "FILE_STORAGE_LIMIT_EXCEEDED" // File could not be created because the cumulative file storage limit would be exceeded. FileErrorCodeGenericFileDownloadFailure FileErrorCode = "GENERIC_FILE_DOWNLOAD_FAILURE" // File could not be processed because the source could not be downloaded. FileErrorCodeGenericFileInvalidSize FileErrorCode = "GENERIC_FILE_INVALID_SIZE" // File could not be created because the size is too large. FileErrorCodeImageDownloadFailure FileErrorCode = "IMAGE_DOWNLOAD_FAILURE" // File could not be processed because the image could not be downloaded. FileErrorCodeImageProcessingFailure FileErrorCode = "IMAGE_PROCESSING_FAILURE" // File could not be processed because the image could not be processed. FileErrorCodeInvalidImageAspectRatio FileErrorCode = "INVALID_IMAGE_ASPECT_RATIO" // File could not be created because the image has an invalid aspect ratio. FileErrorCodeInvalidImageFileSize FileErrorCode = "INVALID_IMAGE_FILE_SIZE" // File could not be created because the image size is too large. FileErrorCodeInvalidImageResolution FileErrorCode = "INVALID_IMAGE_RESOLUTION" // File could not be created because the image's resolution exceeds the max limit. FileErrorCodeInvalidSignedUrl FileErrorCode = "INVALID_SIGNED_URL" // File could not be processed because the signed URL was invalid. FileErrorCodeMediaTimeoutError FileErrorCode = "MEDIA_TIMEOUT_ERROR" // File timed out because it is currently being modified by another operation. FileErrorCodeModel3DGLBOutputCreationError FileErrorCode = "MODEL3D_GLB_OUTPUT_CREATION_ERROR" // File could not be created because the model file failed processing. FileErrorCodeModel3DGLBToUSDZConversionError FileErrorCode = "MODEL3D_GLB_TO_USDZ_CONVERSION_ERROR" // File could not be created because the model can't be converted to USDZ format. FileErrorCodeModel3DProcessingFailure FileErrorCode = "MODEL3D_PROCESSING_FAILURE" // File could not be created because the model file failed processing. FileErrorCodeModel3DThumbnailGenerationError FileErrorCode = "MODEL3D_THUMBNAIL_GENERATION_ERROR" // File could not be created because the model's thumbnail generation failed. FileErrorCodeModel3DThumbnailRegenerationError FileErrorCode = "MODEL3D_THUMBNAIL_REGENERATION_ERROR" // There was an issue while trying to generate a new thumbnail. FileErrorCodeModel3DValidationError FileErrorCode = "MODEL3D_VALIDATION_ERROR" // Model failed validation. FileErrorCodeUnknown FileErrorCode = "UNKNOWN" // File error has occurred for an unknown reason. FileErrorCodeUnsupportedImageFileType FileErrorCode = "UNSUPPORTED_IMAGE_FILE_TYPE" // File could not be created because the image is an unsupported file type. FileErrorCodeVideoInvalidFiletypeError FileErrorCode = "VIDEO_INVALID_FILETYPE_ERROR" // File could not be created because it has an invalid file type. FileErrorCodeVideoMaxDurationError FileErrorCode = "VIDEO_MAX_DURATION_ERROR" // File could not be created because it does not meet the maximum duration requirement. FileErrorCodeVideoMaxHeightError FileErrorCode = "VIDEO_MAX_HEIGHT_ERROR" // File could not be created because it does not meet the maximum height requirement. FileErrorCodeVideoMaxWidthError FileErrorCode = "VIDEO_MAX_WIDTH_ERROR" // File could not be created because it does not meet the maximum width requirement. FileErrorCodeVideoMetadataReadError FileErrorCode = "VIDEO_METADATA_READ_ERROR" // File could not be created because the metadata could not be read. FileErrorCodeVideoMinDurationError FileErrorCode = "VIDEO_MIN_DURATION_ERROR" // File could not be created because it does not meet the minimum duration requirement. FileErrorCodeVideoMinHeightError FileErrorCode = "VIDEO_MIN_HEIGHT_ERROR" // File could not be created because it does not meet the minimum height requirement. FileErrorCodeVideoMinWidthError FileErrorCode = "VIDEO_MIN_WIDTH_ERROR" // File could not be created because it does not meet the minimum width requirement. FileErrorCodeVideoValidationError FileErrorCode = "VIDEO_VALIDATION_ERROR" // Video failed validation. )
type FileStatus ¶
type FileStatus string
The possible statuses for a file object.
const ( FileStatusFailed FileStatus = "FAILED" // File processing has failed. FileStatusProcessing FileStatus = "PROCESSING" // File is being processed. FileStatusReady FileStatus = "READY" // File is ready to be displayed. FileStatusUploaded FileStatus = "UPLOADED" // File has been uploaded but hasn't been processed. )
type FilterOption ¶
type FilterOption struct {
Label string `json:"label"` // The filter option's label for display purposes.
Value string `json:"value"` // The filter option's value.
}
A filter option is one possible value in a search filter.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FilterOption
type FinancialSummaryDiscountAllocation ¶
type FinancialSummaryDiscountAllocation struct {
// The money amount that's allocated per unit on the associated line based on the discount application in shop and presentment currencies.
// If the allocated amount for the line cannot be evenly divided by the quantity, then this amount will be an approximate amount, avoiding fractional pennies.
// For example, if the associated line had a quantity of 3 with a discount of 4 cents, then the discount distribution would be [0.01, 0.01, 0.02].
// This field returns the highest number of the distribution. In this example, this would be 0.02.
ApproximateAllocatedAmountPerItem *MoneyBag `json:"approximateAllocatedAmountPerItem,omitempty"`
DiscountApplication *FinancialSummaryDiscountApplication `json:"discountApplication,omitempty"` // The discount application that the allocated amount originated from.
}
An amount that's allocated to a line item based on an associated discount application.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders`, `read_third_party_fulfillment_orders` or `read_marketplace_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FinancialSummaryDiscountAllocation
type FinancialSummaryDiscountApplication ¶
type FinancialSummaryDiscountApplication struct {
AllocationMethod DiscountApplicationAllocationMethod `json:"allocationMethod"` // The method by which the discount's value is applied to its entitled items.
TargetSelection DiscountApplicationTargetSelection `json:"targetSelection"` // How the discount amount is distributed on the discounted lines.
TargetType DiscountApplicationTargetType `json:"targetType"` // Whether the discount is applied on line items or shipping lines.
}
Discount applications capture the intentions of a discount source at the time of application on an order's line items or shipping lines.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders`, `read_third_party_fulfillment_orders` or `read_marketplace_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FinancialSummaryDiscountApplication
type Fulfillment ¶
type Fulfillment struct {
ID string `json:"id"` // A globally-unique ID.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
Name string `json:"name"` // Human readable reference identifier for this fulfillment.
Status FulfillmentStatus `json:"status"` // The status of the fulfillment.
DisplayStatus FulfillmentDisplayStatus `json:"displayStatus"` // Human readable display status for this fulfillment.
Order *Order `json:"order,omitempty"` // The order for which the fulfillment was created
TotalQuantity int `json:"totalQuantity"` // Sum of all line item quantities for the fulfillment.
Location *Location `json:"location,omitempty"` // The location that the fulfillment was processed at.
FulfillmentLineItems *FulfillmentLineItemConnection `json:"fulfillmentLineItems,omitempty"` // List of the fulfillment's line items.
FulfillmentOrders *FulfillmentOrderConnection `json:"fulfillmentOrders,omitempty"` // A paginated list of fulfillment orders for the fulfillment.
RequiresShipping bool `json:"requiresShipping"` // Whether any of the line items in the fulfillment require shipping.
// The address at which the fulfillment occurred. This field is intended for tax purposes, as a full address is required for tax providers to accurately calculate taxes.
// Typically this is the address of the warehouse or fulfillment center. To retrieve a fulfillment location's address, use the `assignedLocation` field on the [FulfillmentOrder](https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder) object instead.
OriginAddress *FulfillmentOriginAddress `json:"originAddress,omitempty"`
Service *FulfillmentService `json:"service,omitempty"` // Fulfillment service associated with the fulfillment.
TrackingInfo []FulfillmentTrackingInfo `json:"trackingInfo"` // Tracking information associated with the fulfillment, such as the tracking company, tracking number, and tracking URL.
Events *FulfillmentEventConnection `json:"events,omitempty"` // The history of events associated with this fulfillment.
CreatedAt DateTime `json:"createdAt"` // The date and time when the fulfillment was created.
InTransitAt DateTime `json:"inTransitAt"` // The date and time when the fulfillment went into transit.
EstimatedDeliveryAt DateTime `json:"estimatedDeliveryAt"` // The estimated date that this fulfillment will arrive.
DeliveredAt DateTime `json:"deliveredAt"` // The date that this fulfillment was delivered.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the fulfillment was last modified.
}
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.
Requires either of `read_orders`, `read_marketplace_orders`, `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders`, `read_third_party_fulfillment_orders` or `read_marketplace_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Fulfillment
type FulfillmentConnection ¶
type FulfillmentConnection struct {
Edges []FulfillmentEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Fulfillment `json:"nodes,omitempty"` // A list of nodes that are contained in FulfillmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Fulfillments.
type FulfillmentDisplayStatus ¶
type FulfillmentDisplayStatus string
The display status of a fulfillment.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/FulfillmentDisplayStatus
const ( FulfillmentDisplayStatusAttemptedDelivery FulfillmentDisplayStatus = "ATTEMPTED_DELIVERY" // Displayed as Attempted delivery. FulfillmentDisplayStatusCanceled FulfillmentDisplayStatus = "CANCELED" // Displayed as Canceled. FulfillmentDisplayStatusConfirmed FulfillmentDisplayStatus = "CONFIRMED" // Displayed as Confirmed. FulfillmentDisplayStatusDelayed FulfillmentDisplayStatus = "DELAYED" // Displayed as Delayed. FulfillmentDisplayStatusDelivered FulfillmentDisplayStatus = "DELIVERED" // Displayed as Delivered. FulfillmentDisplayStatusFailure FulfillmentDisplayStatus = "FAILURE" // Displayed as Failure. FulfillmentDisplayStatusFulfilled FulfillmentDisplayStatus = "FULFILLED" // Displayed as Fulfilled. FulfillmentDisplayStatusInTransit FulfillmentDisplayStatus = "IN_TRANSIT" // Displayed as In transit. FulfillmentDisplayStatusLabelPrinted FulfillmentDisplayStatus = "LABEL_PRINTED" // Displayed as Label printed. FulfillmentDisplayStatusLabelPurchased FulfillmentDisplayStatus = "LABEL_PURCHASED" // Displayed as Label purchased. FulfillmentDisplayStatusLabelVoided FulfillmentDisplayStatus = "LABEL_VOIDED" // Displayed as Label voided. FulfillmentDisplayStatusMarkedAsFulfilled FulfillmentDisplayStatus = "MARKED_AS_FULFILLED" // Displayed as Marked as fulfilled. FulfillmentDisplayStatusNotDelivered FulfillmentDisplayStatus = "NOT_DELIVERED" // Displayed as Not delivered. FulfillmentDisplayStatusOutForDelivery FulfillmentDisplayStatus = "OUT_FOR_DELIVERY" // Displayed as Out for delivery. FulfillmentDisplayStatusPickedUp FulfillmentDisplayStatus = "PICKED_UP" // Displayed as Picked up. FulfillmentDisplayStatusReadyForPickup FulfillmentDisplayStatus = "READY_FOR_PICKUP" // Displayed as Ready for pickup. FulfillmentDisplayStatusSubmitted FulfillmentDisplayStatus = "SUBMITTED" // Displayed as Submitted. )
func (FulfillmentDisplayStatus) Validate ¶
func (status FulfillmentDisplayStatus) Validate() error
Validate FulfillmentDisplayStatus
type FulfillmentEdge ¶
type FulfillmentEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Fulfillment `json:"node"` // The item at the end of `FulfillmentEdge`.
}
An auto-generated type which holds one `Fulfillment` and a cursor during pagination.
type FulfillmentEvent ¶
type FulfillmentEvent struct {
ID string `json:"id"` // A globally-unique ID.
Status FulfillmentEventStatus `json:"status"` // The status of this fulfillment event.
Message string `json:"message"` // A message associated with this fulfillment event.
Address1 string `json:"address1"` // The street address where this fulfillment event occurred.
City string `json:"city"` // The city where this fulfillment event occurred.
Country string `json:"country"` // The country where this fulfillment event occurred.
Latitude string `json:"latitude"` // The latitude where this fulfillment event occurred.
Longitude string `json:"longitude"` // The longitude where this fulfillment event occurred.
Province string `json:"province"` // The province where this fulfillment event occurred.
Zip string `json:"zip"` // The zip code of the location where this fulfillment event occurred.
CreatedAt DateTime `json:"createdAt"` // The date and time when the fulfillment event was created.
EstimatedDeliveryAt DateTime `json:"estimatedDeliveryAt"` // The estimated delivery date and time of the fulfillment.
HappenedAt DateTime `json:"happenedAt"` // The time at which this fulfillment event happened.
}
The fulfillment event that describes the fulfilllment status at a particular time.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentEvent
type FulfillmentEventConnection ¶
type FulfillmentEventConnection struct {
Edges []FulfillmentEventEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []FulfillmentEvent `json:"nodes,omitempty"` // A list of nodes that are contained in FulfillmentEventEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple FulfillmentEvents.
type FulfillmentEventEdge ¶
type FulfillmentEventEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *FulfillmentEvent `json:"node"` // The item at the end of `FulfillmentEventEdge`.
}
An auto-generated type which holds one `FulfillmentEvent` and a cursor during pagination.
type FulfillmentEventStatus ¶
type FulfillmentEventStatus string
The status that describes a fulfillment or delivery event.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/FulfillmentEventStatus
const ( FulfillmentEventStatusAttemptedDelivery FulfillmentEventStatus = "ATTEMPTED_DELIVERY" // A delivery was attempted. FulfillmentEventStatusConfirmed FulfillmentEventStatus = "CONFIRMED" // The fulfillment is confirmed. This is the default value when no other information is available. FulfillmentEventStatusDelayed FulfillmentEventStatus = "DELAYED" // The fulfillment is delayed. FulfillmentEventStatusDelivered FulfillmentEventStatus = "DELIVERED" // The fulfillment was successfully delivered. FulfillmentEventStatusFailure FulfillmentEventStatus = "FAILURE" // The fulfillment request failed. FulfillmentEventStatusInTransit FulfillmentEventStatus = "IN_TRANSIT" // The fulfillment is in transit. FulfillmentEventStatusLabelPrinted FulfillmentEventStatus = "LABEL_PRINTED" // A purchased shipping label has been printed. FulfillmentEventStatusLabelPurchased FulfillmentEventStatus = "LABEL_PURCHASED" // A shipping label has been purchased. FulfillmentEventStatusOutForDelivery FulfillmentEventStatus = "OUT_FOR_DELIVERY" // The fulfillment is out for delivery. FulfillmentEventStatusReadyForPickup FulfillmentEventStatus = "READY_FOR_PICKUP" // The fulfillment is ready to be picked up. )
func (FulfillmentEventStatus) Validate ¶
func (status FulfillmentEventStatus) Validate() error
Validate FulfillmentEventStatus
type FulfillmentHold ¶
type FulfillmentHold struct {
ID string `json:"id"` // A globally-unique ID.
Handle string `json:"handle"` // An identifier an app can use to reference one of many holds it applied to a fulfillment order. This field must be unique among the holds that a single app applies to a single fulfillment order.
DisplayReason string `json:"displayReason"` // The localized reason for the fulfillment hold for display purposes.
Reason FulfillmentHoldReason `json:"reason"` // The reason for the fulfillment hold.
ReasonNotes string `json:"reasonNotes"` // Additional information about the fulfillment hold reason.
HeldByApp *App `json:"heldByApp,omitempty"` // The app that created the fulfillment hold.
HeldByRequestingApp bool `json:"heldByRequestingApp"` // A boolean value that indicates whether the requesting app created the fulfillment hold.
}
A fulfillment hold currently applied on a fulfillment order.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders`, `read_third_party_fulfillment_orders` or `read_marketplace_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentHold
type FulfillmentHoldReason ¶
type FulfillmentHoldReason string
The reason for a fulfillment hold.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/FulfillmentHoldReason
const ( FulfillmentHoldReasonAwaitingPayment FulfillmentHoldReason = "AWAITING_PAYMENT" // The fulfillment hold is applied because payment is pending. FulfillmentHoldReasonAwaitingReturnItems FulfillmentHoldReason = "AWAITING_RETURN_ITEMS" // The fulfillment hold is applied because of return items not yet received during an exchange. FulfillmentHoldReasonHighRiskOfFraud FulfillmentHoldReason = "HIGH_RISK_OF_FRAUD" // The fulfillment hold is applied because of a high risk of fraud. FulfillmentHoldReasonIncorrectAddress FulfillmentHoldReason = "INCORRECT_ADDRESS" // The fulfillment hold is applied because of an incorrect address. FulfillmentHoldReasonInventoryOutOfStock FulfillmentHoldReason = "INVENTORY_OUT_OF_STOCK" // The fulfillment hold is applied because inventory is out of stock. FulfillmentHoldReasonOnlineStorePostPurchaseCrossSell FulfillmentHoldReason = "ONLINE_STORE_POST_PURCHASE_CROSS_SELL" // The fulfillment hold is applied because of a post purchase upsell offer. FulfillmentHoldReasonOther FulfillmentHoldReason = "OTHER" // The fulfillment hold is applied for another reason. FulfillmentHoldReasonUnknownDeliveryDate FulfillmentHoldReason = "UNKNOWN_DELIVERY_DATE" // The fulfillment hold is applied because of an unknown delivery date. )
func (FulfillmentHoldReason) Validate ¶
func (reason FulfillmentHoldReason) Validate() error
Validate FulfillmentHoldReason
type FulfillmentLineItem ¶
type FulfillmentLineItem struct {
ID string `json:"id"` // A globally-unique ID.
LineItem *LineItem `json:"lineItem,omitempty"` // The associated order's line item.
Quantity int `json:"quantity"` // Number of line items in the fulfillment.
OriginalTotalSet *MoneyBag `json:"originalTotalSet,omitempty"` // The total price before discounts are applied in shop and presentment currencies.
DiscountedTotalSet *MoneyBag `json:"discountedTotalSet,omitempty"` // The total price after discounts are applied in shop and presentment currencies. This value doesn't include order-level discounts.
}
Represents a line item from an order that's included in a fulfillment.
Requires `read_orders` or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentLineItem
type FulfillmentLineItemConnection ¶
type FulfillmentLineItemConnection struct {
Edges []FulfillmentLineItemEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []FulfillmentLineItem `json:"nodes,omitempty"` // A list of nodes that are contained in FulfillmentLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple FulfillmentLineItems.
type FulfillmentLineItemEdge ¶
type FulfillmentLineItemEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *FulfillmentLineItem `json:"node"` // The item at the end of `FulfillmentLineItemEdge`.
}
An auto-generated type which holds one `FulfillmentLineItem` and a cursor during pagination.
type FulfillmentOrder ¶
type FulfillmentOrder struct {
ID string `json:"id"` // A globally-unique ID.
OrderID string `json:"orderId"` // ID of the order that's associated with the fulfillment order.
OrderName string `json:"orderName"` // The unique identifier for the order that appears on the order page in the Shopify admin and the Order status page. For example, "#1001", "EN1001", or "1001-A". This value isn't unique across multiple stores.
Order *Order `json:"order,omitempty"` // The order that's associated with the fulfillment order.
LineItems *FulfillmentOrderLineItemConnection `json:"lineItems,omitempty"` // A list of the fulfillment order's line items.
Status FulfillmentOrderStatus `json:"status"` // The status of the fulfillment order.
RequestStatus FulfillmentOrderRequestStatus `json:"requestStatus"` // The request status of the fulfillment order.
Fulfillments *FulfillmentConnection `json:"fulfillments,omitempty"` // A list of fulfillments for the fulfillment order.
FulfillmentHolds []FulfillmentHold `json:"fulfillmentHolds"` // The fulfillment holds applied on the fulfillment order.
FulfillmentOrdersForMerge *FulfillmentOrderConnection `json:"fulfillmentOrdersForMerge,omitempty"` // Fulfillment orders eligible for merging with the given fulfillment order.
SupportedActions []FulfillmentOrderSupportedAction `json:"supportedActions"` // The actions that can be performed on this fulfillment order.
Destination *FulfillmentOrderDestination `json:"destination,omitempty"` // The destination where the items should be sent.
DeliveryMethod *DeliveryMethod `json:"deliveryMethod,omitempty"` // Delivery method of this fulfillment order.
ChannelID string `json:"channelId"` // ID of the channel that created the order.
// The fulfillment order's assigned location. This is the location where the fulfillment is expected to happen.
//
// The fulfillment order's assigned location might change in the following cases:
//
// - The fulfillment order has been entirely moved to a new location. For example, the fulfillmentOrderMove mutation has been called, and you see the original fulfillment order in the movedFulfillmentOrder field within the mutation's response.
//
// - Work on the fulfillment order hasn't yet begun, which means that the fulfillment order has the `OPEN`, `SCHEDULED`, or `ON_HOLD` status, and the shop's location properties might be undergoing edits (for example, in the Shopify admin).
AssignedLocation *FulfillmentOrderAssignedLocation `json:"assignedLocation,omitempty"`
LocationsForMove *FulfillmentOrderLocationForMoveConnection `json:"locationsForMove,omitempty"` // A list of locations that the fulfillment order can potentially move to.
MerchantRequests *FulfillmentOrderMerchantRequestConnection `json:"merchantRequests,omitempty"` // A list of requests sent by the merchant or an order management app to the fulfillment service for the fulfillment order.
InternationalDuties *FulfillmentOrderInternationalDuties `json:"internationalDuties,omitempty"` // The duties delivery method of this fulfillment order.
CreatedAt DateTime `json:"createdAt"` // Date and time when the fulfillment order was created.
OrderProcessedAt DateTime `json:"orderProcessedAt"` // The date and time when the order was processed. This date and time might not match the date and time when the order was created.
FulfillBy DateTime `json:"fulfillBy"` // The latest date and time by which all items in the fulfillment order need to be fulfilled.
FulfillAt DateTime `json:"fulfillAt"` // The date and time at which the fulfillment order will be fulfillable. When this date and time is reached, the scheduled fulfillment order is automatically transitioned to open. For example, the `fulfill_at` date for a subscription order might be the 1st of each month, a pre-order `fulfill_at` date would be nil, and a standard order `fulfill_at` date would be the order creation date.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the fulfillment order was last updated.
}
The FulfillmentOrder object represents either an item or a group of items in an Order that are expected to be fulfilled from the same location. There can be more than one fulfillment order for an order at a given location.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders`, `read_third_party_fulfillment_orders` or `read_marketplace_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrder
type FulfillmentOrderAction ¶
type FulfillmentOrderAction string
The actions that can be taken on a fulfillment order.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/FulfillmentOrderAction
const ( FulfillmentOrderActionCancelFulfillmentOrder FulfillmentOrderAction = "CANCEL_FULFILLMENT_ORDER" // Cancels a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderCancel`. FulfillmentOrderActionCreateFulfillment FulfillmentOrderAction = "CREATE_FULFILLMENT" // Creates a fulfillment for selected line items in the fulfillment order. The corresponding mutation for this action is `fulfillmentCreateV2`. FulfillmentOrderActionExternal FulfillmentOrderAction = "EXTERNAL" // Opens an external URL to initiate the fulfillment process outside Shopify. This action should be paired with `FulfillmentOrderSupportedAction.externalUrl`. FulfillmentOrderActionHold FulfillmentOrderAction = "HOLD" // Applies a fulfillment hold on the fulfillment order. The corresponding mutation for this action is `fulfillmentOrderHold`. FulfillmentOrderActionMarkAsOpen FulfillmentOrderAction = "MARK_AS_OPEN" // Marks the fulfillment order as open. The corresponding mutation for this action is `fulfillmentOrderOpen`. FulfillmentOrderActionMerge FulfillmentOrderAction = "MERGE" // Merges a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderMerge`. FulfillmentOrderActionMove FulfillmentOrderAction = "MOVE" // Moves a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderMove`. FulfillmentOrderActionReleaseHold FulfillmentOrderAction = "RELEASE_HOLD" // Releases the fulfillment hold on the fulfillment order. The corresponding mutation for this action is `fulfillmentOrderReleaseHold`. FulfillmentOrderActionRequestCancellation FulfillmentOrderAction = "REQUEST_CANCELLATION" // Sends a cancellation request to the fulfillment service of a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderSubmitCancellationRequest`. FulfillmentOrderActionRequestFulfillment FulfillmentOrderAction = "REQUEST_FULFILLMENT" // Sends a request for fulfilling selected line items in a fulfillment order to a fulfillment service. The corresponding mutation for this action is `fulfillmentOrderSubmitFulfillmentRequest`. FulfillmentOrderActionSplit FulfillmentOrderAction = "SPLIT" // Splits a fulfillment order. The corresponding mutation for this action is `fulfillmentOrderSplit`. )
func (FulfillmentOrderAction) Validate ¶
func (reason FulfillmentOrderAction) Validate() error
Validate FulfillmentOrderAction
type FulfillmentOrderAssignedLocation ¶
type FulfillmentOrderAssignedLocation struct {
Name string `json:"name"` // The name of the location.
Location *Location `json:"location,omitempty"` // The location where the fulfillment is expected to happen. This value might be different from `FulfillmentOrderAssignedLocation` if the location's attributes were updated after the fulfillment order was taken into work of canceled.
Address1 string `json:"address1"` // The first line of the address for the location.
Address2 string `json:"address2"` // The second line of the address for the location.
City string `json:"city"` // The city of the location.
CountryCode CountryCode `json:"countryCode"` // The two-letter country code of the location.
Province string `json:"province"` // The province of the location.
Phone string `json:"phone"` // The phone number of the location.
Zip string `json:"zip"` // The ZIP code of the location.
}
The fulfillment order's assigned location. This is the location where the fulfillment is expected to happen.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders`, `read_third_party_fulfillment_orders` or `read_marketplace_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrderAssignedLocation
type FulfillmentOrderConnection ¶
type FulfillmentOrderConnection struct {
Edges []FulfillmentOrderEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []FulfillmentOrder `json:"nodes,omitempty"` // A list of nodes that are contained in FulfillmentOrderEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple FulfillmentOrders.
type FulfillmentOrderDestination ¶
type FulfillmentOrderDestination struct {
ID string `json:"id"` // A globally-unique ID.
FirstName string `json:"firstName"` // The first name of the customer at the destination.
LastName string `json:"lastName"` // The last name of the customer at the destination.
Email string `json:"email"` // The email of the customer at the destination.
Phone string `json:"phone"` // The phone number of the customer at the destination.
Location *Location `json:"location,omitempty"` // The location designated for the pick-up of the fulfillment order.
Address1 string `json:"address1"` // The first line of the address of the destination.
Address2 string `json:"address2"` // The second line of the address of the destination.
City string `json:"city"` // The city of the destination.
Company string `json:"company"` // The company of the destination.
Country string `json:"country"` // The company of the destination.
CountryCode CountryCode `json:"countryCode"` // The two-letter country code of the destination.
Province string `json:"province"` // The province of the destination.
Zip string `json:"zip"` // The ZIP code of the destination.
}
Represents the destination where the items should be sent upon fulfillment.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders` or `read_third_party_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrderDestination
type FulfillmentOrderEdge ¶
type FulfillmentOrderEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *FulfillmentOrder `json:"node"` // The item at the end of `FulfillmentOrderEdge`.
}
An auto-generated type which holds one `FulfillmentOrder` and a cursor during pagination.
type FulfillmentOrderInternationalDuties ¶
type FulfillmentOrderInternationalDuties struct {
Incoterm string `json:"incoterm"` // The method of duties payment. Example values: `DDP`, `DAP`.
}
The international duties relevant to a fulfillment order.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders` or `read_third_party_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrderInternationalDuties
type FulfillmentOrderLineItem ¶
type FulfillmentOrderLineItem struct {
ID string `json:"id"` // A globally-unique ID.
Image *Image `json:"image,omitempty"` // The image associated to the line item's variant.
ProductTitle string `json:"productTitle"` // The title of the product.
VariantTitle string `json:"variantTitle"` // The name of the variant.
SKU string `json:"sku"` // The variant SKU number.
InventoryItemID string `json:"inventoryItemId"` // The ID of the inventory item.
Variant *ProductVariant `json:"variant,omitempty"` // The product variant associated to the fulfillment order line item.
LineItem *LineItem `json:"lineItem,omitempty"` // The associated order line item.
Vendor string `json:"vendor"` // The name of the vendor who made the variant.
Weight *Weight `json:"weight,omitempty"` // The weight of a line item unit.
RequiresShipping bool `json:"requiresShipping"` // Whether physical shipping is required for the variant.
RemainingQuantity int `json:"remainingQuantity"` // The number of units remaining to be fulfilled.
TotalQuantity int `json:"totalQuantity"` // The total number of units to be fulfilled.
Warnings []FulfillmentOrderLineItemWarning `json:"warnings"` // Warning messages for a fulfillment order line item.
FinancialSummaries []FulfillmentOrderLineItemFinancialSummary `json:"financialSummaries"` // The financial summary for the Fulfillment Order's Line Items.
}
Associates an order line item with quantities requiring fulfillment from the respective fulfillment order.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders` or `read_third_party_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrderLineItem
type FulfillmentOrderLineItemConnection ¶
type FulfillmentOrderLineItemConnection struct {
Edges []FulfillmentOrderLineItemEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []FulfillmentOrderLineItem `json:"nodes,omitempty"` // A list of nodes that are contained in FulfillmentOrderLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple FulfillmentOrderLineItems.
type FulfillmentOrderLineItemEdge ¶
type FulfillmentOrderLineItemEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *FulfillmentOrderLineItem `json:"node"` // The item at the end of `FulfillmentOrderLineItemEdge`.
}
An auto-generated type which holds one `FulfillmentOrderLineItem` and a cursor during pagination.
type FulfillmentOrderLineItemFinancialSummary ¶
type FulfillmentOrderLineItemFinancialSummary struct {
Quantity int `json:"quantity"` // Number of line items that this financial summary applies to.
OriginalUnitPriceSet *MoneyBag `json:"originalUnitPriceSet,omitempty"` // The variant unit price without discounts applied, in shop and presentment currencies.
ApproximateDiscountedUnitPriceSet *MoneyBag `json:"approximateDiscountedUnitPriceSet,omitempty"` // The approximate split price of a line item unit, in shop and presentment currencies. This value doesn't include discounts applied to the entire order.For the full picture of applied discounts, see discountAllocations.
DiscountAllocations []FinancialSummaryDiscountAllocation `json:"discountAllocations"` // The discounts that have been allocated onto the line item by discount applications, not including order edits and refunds.
}
The financial details of a fulfillment order line item.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders`, `read_third_party_fulfillment_orders` or `read_marketplace_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrderLineItemFinancialSummary
type FulfillmentOrderLineItemWarning ¶
type FulfillmentOrderLineItemWarning struct {
Title string `json:"title"` // The title of warning.
Description string `json:"description"` // The description of warning.
}
A fulfillment order line item warning. For example, a warning about why a fulfillment request was rejected.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders` or `read_third_party_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrderLineItemWarning
type FulfillmentOrderLocationForMove ¶
type FulfillmentOrderLocationForMove struct {
AvailableLineItems *FulfillmentOrderLineItemConnection `json:"availableLineItems,omitempty"` // Fulfillment order line items that can be moved from their current location to the given location.
AvailableLineItemsCount *Count `json:"availableLineItemsCount,omitempty"` // Total number of fulfillment order line items that can be moved from their current assigned location to the given location.
Location *Location `json:"location,omitempty"` // The location being considered as the fulfillment order's new assigned location.
Message string `json:"message"` // A human-readable string with the reason why the fulfillment order, or some of its line items, can't be moved to the location.
Movable bool `json:"movable"` // Whether the fulfillment order can be moved to the location.
}
A location that a fulfillment order can potentially move to.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders` or `read_third_party_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrderLocationForMove
type FulfillmentOrderLocationForMoveConnection ¶
type FulfillmentOrderLocationForMoveConnection struct {
Edges []FulfillmentOrderLocationForMoveEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []FulfillmentOrderLocationForMove `json:"nodes,omitempty"` // A list of nodes that are contained in FulfillmentOrderLocationForMoveEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple FulfillmentOrderLocationForMoves.
type FulfillmentOrderLocationForMoveEdge ¶
type FulfillmentOrderLocationForMoveEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *FulfillmentOrderLocationForMove `json:"node"` // The item at the end of `FulfillmentOrderLocationForMoveEdge`.
}
An auto-generated type which holds one `FulfillmentOrderLocationForMove` and a cursor during pagination.
type FulfillmentOrderMerchantRequest ¶
type FulfillmentOrderMerchantRequest struct {
ID string `json:"id"` // A globally-unique ID.
FulfillmentOrder *FulfillmentOrder `json:"fulfillmentOrder,omitempty"` // The fulfillment order associated with the merchant request.
Kind FulfillmentOrderMerchantRequestKind `json:"kind"` // The kind of request made.
Message string `json:"message"` // The optional message that the merchant included in the request.
RequestOptions JSON `json:"requestOptions"` // Additional options requested by the merchant. These depend on the `kind` of the request. For example, for a `FULFILLMENT_REQUEST`, one option is `notify_customer`, which indicates whether the merchant intends to notify the customer upon fulfillment. The fulfillment service can then set `notifyCustomer` when making calls to `FulfillmentCreate`.
ResponseData JSON `json:"responseData"` // The response from the fulfillment service.
SentAt DateTime `json:"sentAt"` // The timestamp when the request was made.
}
A request made by the merchant or an order management app to a fulfillment service for a fulfillment order.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders` or `read_third_party_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrderMerchantRequest
type FulfillmentOrderMerchantRequestConnection ¶
type FulfillmentOrderMerchantRequestConnection struct {
Edges []FulfillmentOrderMerchantRequestEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []FulfillmentOrderMerchantRequest `json:"nodes,omitempty"` // A list of nodes that are contained in FulfillmentOrderMerchantRequestEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple FulfillmentOrderMerchantRequests.
type FulfillmentOrderMerchantRequestEdge ¶
type FulfillmentOrderMerchantRequestEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *FulfillmentOrderMerchantRequest `json:"node"` // The item at the end of `FulfillmentOrderMerchantRequestEdge`.
}
An auto-generated type which holds one `FulfillmentOrderMerchantRequest` and a cursor during pagination.
type FulfillmentOrderMerchantRequestKind ¶
type FulfillmentOrderMerchantRequestKind string
The kinds of request merchants can make to a fulfillment service.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/FulfillmentOrderMerchantRequestKind
const ( FulfillmentOrderMerchantRequestKindCancellationRequest FulfillmentOrderMerchantRequestKind = "CANCELLATION_REQUEST" // The merchant requests cancellation of an `IN_PROGRESS` fulfillment order. FulfillmentOrderMerchantRequestKindFulfillmentRequest FulfillmentOrderMerchantRequestKind = "FULFILLMENT_REQUEST" // The merchant requests fulfillment for an `OPEN` fulfillment order. )
func (FulfillmentOrderMerchantRequestKind) Validate ¶
func (reason FulfillmentOrderMerchantRequestKind) Validate() error
Validate FulfillmentOrderMerchantRequestKind
type FulfillmentOrderRequestStatus ¶
type FulfillmentOrderRequestStatus string
The request status of a fulfillment order.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/FulfillmentOrderRequestStatus
const ( FulfillmentOrderRequestStatusAccepted FulfillmentOrderRequestStatus = "ACCEPTED" // The fulfillment service accepted the merchant's fulfillment request. FulfillmentOrderRequestStatusCancellationAccepted FulfillmentOrderRequestStatus = "CANCELLATION_ACCEPTED" // The fulfillment service accepted the merchant's fulfillment cancellation request. FulfillmentOrderRequestStatusCancellationRejected FulfillmentOrderRequestStatus = "CANCELLATION_REJECTED" // The fulfillment service rejected the merchant's fulfillment cancellation request. FulfillmentOrderRequestStatusCancellationRequested FulfillmentOrderRequestStatus = "CANCELLATION_REQUESTED" // The merchant requested a cancellation of the fulfillment request for this fulfillment order. FulfillmentOrderRequestStatusClosed FulfillmentOrderRequestStatus = "CLOSED" // The fulfillment service closed the fulfillment order without completing it. FulfillmentOrderRequestStatusRejected FulfillmentOrderRequestStatus = "REJECTED" // The fulfillment service rejected the merchant's fulfillment request. FulfillmentOrderRequestStatusSubmitted FulfillmentOrderRequestStatus = "SUBMITTED" // The merchant requested fulfillment for this fulfillment order. FulfillmentOrderRequestStatusUnsubmitted FulfillmentOrderRequestStatus = "UNSUBMITTED" // The initial request status for the newly-created fulfillment orders. This is the only valid request status for fulfillment orders that aren't assigned to a fulfillment service. )
func (FulfillmentOrderRequestStatus) Validate ¶
func (status FulfillmentOrderRequestStatus) Validate() error
Validate FulfillmentOrderRequestStatus
type FulfillmentOrderStatus ¶
type FulfillmentOrderStatus string
The status of a fulfillment order.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/FulfillmentOrderStatus
const ( FulfillmentOrderStatusCancelled FulfillmentOrderStatus = "CANCELLED" // The fulfillment order has been cancelled by the merchant. FulfillmentOrderStatusClosed FulfillmentOrderStatus = "CLOSED" // The fulfillment order has been completed and closed. FulfillmentOrderStatusIncomplete FulfillmentOrderStatus = "INCOMPLETE" // The fulfillment order cannot be completed as requested. FulfillmentOrderStatusInProgress FulfillmentOrderStatus = "IN_PROGRESS" // The fulfillment order is being processed. FulfillmentOrderStatusOnHold FulfillmentOrderStatus = "ON_HOLD" // The fulfillment order is on hold. The fulfillment process can't be initiated until the hold on the fulfillment order is released. FulfillmentOrderStatusOpen FulfillmentOrderStatus = "OPEN" // The fulfillment order is ready for fulfillment. FulfillmentOrderStatusScheduled FulfillmentOrderStatus = "SCHEDULED" // The fulfillment order is deferred and will be ready for fulfillment after the date and time specified in `fulfill_at`. )
func (FulfillmentOrderStatus) Validate ¶
func (status FulfillmentOrderStatus) Validate() error
Validate FulfillmentOrderStatus
type FulfillmentOrderSupportedAction ¶
type FulfillmentOrderSupportedAction struct {
Action FulfillmentOrderAction `json:"action"` // The action value.
ExternalURL URL `json:"externalUrl"` // The external URL to be used to initiate the fulfillment process outside Shopify. Applicable only when the `action` value is `EXTERNAL`.
}
One of the actions that the fulfillment order supports in its current state.
Requires either of `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders` or `read_third_party_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOrderSupportedAction
type FulfillmentOriginAddress ¶
type FulfillmentOriginAddress struct {
Address1 string `json:"address1"` // The street address of the fulfillment location.
Address2 string `json:"address2"` // The second line of the address. Typically the number of the apartment, suite, or unit.
City string `json:"city"` // The city in which the fulfillment location is located.
ProvinceCode string `json:"provinceCode"` // The province code of the fulfillment location.
CountryCode string `json:"countryCode"` // The country code of the fulfillment location.
Zip string `json:"zip"` // The zip code of the fulfillment location.
}
The address at which the fulfillment occurred. This object is intended for tax purposes, as a full address is required for tax providers to accurately calculate taxes. Typically this is the address of the warehouse or fulfillment center. To retrieve a fulfillment location's address, use the assignedLocation field on the FulfillmentOrder object instead.
Requires `read_orders` or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentOriginAddress
type FulfillmentService ¶
type FulfillmentService struct {
ID string `json:"id"` // A globally-unique ID.
ServiceName string `json:"serviceName"` // The name of the fulfillment service as seen by merchants.
Handle string `json:"handle"` // Human-readable unique identifier for this fulfillment service.
Type FulfillmentServiceType `json:"type"` // Type associated with the fulfillment service.
Location *Location `json:"location"` // Location associated with the fulfillment service.
InventoryManagement bool `json:"inventoryManagement"` // Whether the fulfillment service tracks product inventory and provides updates to Shopify.
PermitsSKUSharing bool `json:"permitsSkuSharing"` // Whether the fulfillment service can stock inventory alongside other locations.
TrackingSupport bool `json:"trackingSupport"` // Whether the fulfillment service implemented the /fetch_tracking_numbers endpoint.
// The callback URL that the fulfillment service has registered for requests. The following considerations apply:
//
// - Shopify queries the `<callbackUrl>/fetch_tracking_numbers` endpoint to retrieve tracking numbers for orders, if `trackingSupport` is set to `true`.
//
// - Shopify queries the `<callbackUrl>/fetch_stock` endpoint to retrieve inventory levels, if `inventoryManagement` is set to `true`.
//
// - Shopify uses the `<callbackUrl>/fulfillment_order_notification` endpoint to send [fulfillment and cancellation requests](https://shopify.dev/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services#step-9-optional-enable-tracking-support).
CallbackURL URL `json:"callbackUrl"`
}
A Fulfillment Service is a third party warehouse that prepares and ships orders on behalf of the store owner.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentService
type FulfillmentServiceType ¶
type FulfillmentServiceType string
The type of a fulfillment service.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/FulfillmentServiceType
const ( FulfillmentServiceTypeGiftCard FulfillmentServiceType = "GIFT_CARD" // Fulfillment by gift card. FulfillmentServiceTypeManual FulfillmentServiceType = "MANUAL" // Manual fulfillment by the merchant. FulfillmentServiceTypeThirdParty FulfillmentServiceType = "THIRD_PARTY" // Fullfillment by a third-party fulfillment service. )
func (FulfillmentServiceType) Validate ¶
func (serviceType FulfillmentServiceType) Validate() error
Validate FulfillmentServiceType
type FulfillmentStatus ¶
type FulfillmentStatus string
The status of a fulfillment.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/FulfillmentStatus
const ( FulfillmentStatusCancelled FulfillmentStatus = "CANCELLED" // The fulfillment was canceled. FulfillmentStatusError FulfillmentStatus = "ERROR" // There was an error with the fulfillment request. FulfillmentStatusFailure FulfillmentStatus = "FAILURE" // The fulfillment request failed. FulfillmentStatusSuccess FulfillmentStatus = "SUCCESS" // The fulfillment was completed successfully. FulfillmentStatusOpen FulfillmentStatus = "OPEN" // (deprecated) The third-party fulfillment service has acknowledged the fulfillment and is processing it. This is a legacy status and is due to be deprecated. FulfillmentStatusPending FulfillmentStatus = "PENDING" // (deprecated) Shopify has created the fulfillment and is waiting for the third-party fulfillment service to transition it to `open` or `success`. This is a legacy status and is due to be deprecated. )
func (FulfillmentStatus) Validate ¶
func (status FulfillmentStatus) Validate() error
Validate FulfillmentStatus
type FulfillmentTrackingInfo ¶
type FulfillmentTrackingInfo struct {
Company string `json:"company"` // The name of the tracking company.
Number string `json:"number"` // The tracking number of the fulfillment.
URL URL `json:"url"` // The URLs to track the fulfillment.
}
Represents the tracking information for a fulfillment.
Requires either of `read_orders`, `read_marketplace_orders`, `read_assigned_fulfillment_orders`, `read_merchant_managed_fulfillment_orders`, `read_third_party_fulfillment_orders` or `read_marketplace_fulfillment_orders` access scopes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/FulfillmentTrackingInfo
type HasMetafields ¶
type HasMetafields struct {
Metafield *Metafield `json:"metafield"` // A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields"` // A list of custom fields that a merchant associates with a Shopify resource.
}
Represents information about the metafields associated to the specified resource.
type HasStoreCreditAccounts ¶
type HasStoreCreditAccounts struct {
StoreCreditAccounts *StoreCreditAccountConnection `json:"storeCreditAccounts,omitempty"`
}
Represents information about the store credit accounts associated to the specified owner.
Requires `read_store_credit_accounts` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/HasStoreCreditAccounts
type Image ¶
type Image struct {
ID string `json:"id"` // The globally unique ID of the image.
URL string `json:"url"` // The location of the image as a URL. If no transform options are specified, then the original image will be preserved including any pre-applied transforms.
AltText string `json:"altText"` // A word or phrase to share the nature or contents of an image.
Height int `json:"height"` // The original height of the image in pixels. Returns null if the image isn't hosted by Shopify.
Width int `json:"width"` // The original width of the image in pixels. Returns null if the image isn't hosted by Shopify.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
}
Image represents an image object in Shopify media.
type InventoryItem ¶
type InventoryItem struct {
ID string `json:"id"` // A globally-unique ID.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
CountryCodeOfOrigin CountryCode `json:"countryCodeOfOrigin"` // The ISO 3166-1 alpha-2 country code of where the item originated from.
CountryHarmonizedSystemCodes *CountryHarmonizedSystemCodeConnection `json:"countryHarmonizedSystemCodes,omitempty"` // A list of country specific harmonized system codes.
HarmonizedSystemCode string `json:"harmonizedSystemCode"` // The harmonized system code of the item.
CreatedAt DateTime `json:"createdAt,omitzero"` // The date and time when the inventory item was created.
DuplicateSKUCount int `json:"duplicateSkuCount"` // The number of inventory items that share the same SKU with this item.
InventoryHistoryUrl URL `json:"inventoryHistoryUrl"` // The URL that points to the inventory history for the item.
InventoryLevel *InventoryLevel `json:"inventoryLevel,omitempty"` // The inventory item's quantities at the specified location.
InventoryLevels *InventoryLevelConnection `json:"inventoryLevels,omitempty"` // A list of the inventory item's quantities for each location that the inventory item can be stocked at.
LocationsCount *Count `json:"locationsCount,omitempty"` // The number of locations where this inventory item is stocked.
Measurement *InventoryItemMeasurement `json:"measurement,omitempty"` // The packaging dimensions of the inventory item.
ProvinceCodeOfOrigin string `json:"provinceCodeOfOrigin"` // The ISO 3166-2 alpha-2 province code of where the item originated from.
RequiresShipping bool `json:"requiresShipping"` // Whether the inventory item requires shipping.
SKU string `json:"sku"` // Inventory item SKU. Case-sensitive string.
Tracked bool `json:"tracked"` // Whether inventory levels are tracked for the item.
TrackedEditable *EditableProperty `json:"trackedEditable,omitempty"` // Whether the value of the `tracked` field for the inventory item can be changed.
UnitCost *MoneyV2 `json:"unitCost,omitempty"` // Unit cost associated with the inventory item. Note: the user must have "View product costs" permission granted in order to access this field once product granular permissions are enabled.
UpdatedAt DateTime `json:"updatedAt,omitzero"` // The date and time when the inventory item was updated.
Variant *ProductVariant `json:"variant,omitempty"` // The variant that owns this inventory item.
}
Represents the goods available to be shipped to a customer. It holds essential information about the goods, including SKU and whether it is tracked. Learn [more about the relationships between inventory objects](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships).
type InventoryItemMeasurement ¶
type InventoryItemMeasurement struct {
ID string `json:"id"` // A globally-unique ID.
Weight *Weight `json:"weight,omitempty"` // The weight of the inventory item.
}
Represents the packaged dimension for an inventory item.
Requires `read_inventory` access scope or `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryItemMeasurement
type InventoryLevel ¶
type InventoryLevel struct {
ID string `json:"id"` // A globally-unique ID.
Item *InventoryItem `json:"item,omitempty"` // Inventory item associated with the inventory level.
Location *Location `json:"location,omitempty"` // The location associated with the inventory level.
Quantities []InventoryQuantity `json:"quantities"` // Quantities for the requested names.
ScheduledChanges *InventoryScheduleChangeConnection `json:"scheduledChanges,omitempty"` // Scheduled changes for the requested quantity names.
CanDeactivate bool `json:"canDeactivate"` // Whether the inventory items associated with the inventory level can be deactivated.
DeactivationAlert string `json:"deactivationAlert,omitzero"` // Describes either the impact of deactivating the inventory level, or why the inventory level can't be deactivated.
CreatedAt DateTime `json:"createdAt,omitzero"` // The date and time when the inventory level was created.
UpdatedAt DateTime `json:"updatedAt,omitzero"` // The date and time when the inventory level was updated.
}
The quantities of an inventory item that are related to a specific location. Learn [more about the relationships between inventory objects](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#inventory-object-relationships).
Requires `read_inventory` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryLevel
type InventoryLevelConnection ¶
type InventoryLevelConnection struct {
Edges []InventoryLevelEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []InventoryLevel `json:"nodes,omitempty"` // A list of nodes that are contained in InventoryLevelEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple InventoryLevels.
type InventoryLevelEdge ¶
type InventoryLevelEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Location `json:"node,omitempty"` // The item at the end of InventoryLevelEdge.
}
An auto-generated type which holds one InventoryLevel and a cursor during pagination.
type InventoryQuantity ¶
type InventoryQuantity struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The name that identifies the inventory quantity.
Quantity int `json:"quantity"` // The quantity for the quantity name.
UpdatedAt DateTime `json:"updatedAt"` // When the quantity was last updated.
}
Represents a quantity of an inventory item at a specific location, for a specific name.
Requires `read_inventory` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryQuantity
type InventoryScheduleChange ¶
type InventoryScheduleChange struct {
FromName string `json:"fromName"` // The quantity [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) to transition from.
ToName string `json:"toName"` // The quantity [name](https://shopify.dev/docs/apps/fulfillment/inventory-management-apps/quantities-states#move-inventory-quantities-between-states) to transition to.
Quantity int `json:"quantity"` // The quantity of the scheduled change associated with the ledger document in the `fromName` state.
InventoryLevel *InventoryLevel `json:"inventoryLevel,omitempty"` // The quantities of an inventory item that are related to a specific location.
LedgerDocumentUri URL `json:"ledgerDocumentUri"` // A freeform URI that represents what changed the inventory quantities.
ExpectedAt DateTime `json:"expectedAt"` // The date and time that the scheduled change is expected to happen.
}
Returns the scheduled changes to inventory states related to the ledger document.
Requires `read_inventory` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/InventoryScheduledChange
type InventoryScheduleChangeConnection ¶
type InventoryScheduleChangeConnection struct {
Edges []InventoryScheduleChangeEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []InventoryScheduleChange `json:"nodes,omitempty"` // A list of nodes that are contained in InventoryScheduleChangeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple InventoryScheduleChanges.
type InventoryScheduleChangeEdge ¶
type InventoryScheduleChangeEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Location `json:"node,omitempty"` // The item at the end of InventoryScheduleChangeEdge.
}
An auto-generated type which holds one InventoryScheduleChange and a cursor during pagination.
type LanguageCode ¶
type LanguageCode string
Language codes supported by Shopify.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/LanguageCode
type LineItem ¶
type LineItem struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The title of the product, optionally appended with the title of the variant (if applicable).
Title string `json:"title"` // The title of the product at time of order creation.
Image *Image `json:"image,omitempty"` // The image associated to the line item's variant.
SKU string `json:"sku"` // The variant SKU number.
Product *Product `json:"product,omitempty"` // The Product object associated with this line item's variant.
Variant *ProductVariant `json:"variant,omitempty"` // The Variant object associated with this line item.
VariantTitle string `json:"variantTitle"` // The title of the variant at time of order creation.
Vendor string `json:"vendor"` // The name of the vendor who made the variant.
LineItemGroup *LineItemGroup `json:"lineItemGroup,omitempty"` // The line item group associated to the line item.
CustomAttributes []Attribute `json:"customAttributes"` // A list of attributes that represent custom features or special requests.
Quantity int `json:"quantity"` // The number of units ordered, including refunded and removed units.
CurrentQuantity int `json:"currentQuantity"` // The number of units ordered, excluding refunded and removed units.
RefundableQuantity int `json:"refundableQuantity"` // The number of units ordered, excluding refunded units.
UnfulfilledQuantity int `json:"unfulfilledQuantity"` // The number of units not yet fulfilled.
DiscountAllocations []DiscountAllocation `json:"discountAllocations"` // The discounts that have been allocated to the line item by discount applications, including discounts allocated to refunded and removed quantities.
TotalDiscountSet *MoneyBag `json:"totalDiscountSet,omitempty"` // The total discount allocated to the line item in shop and presentment currencies, including the total allocated to refunded and removed quantities. This value doesn't include order-level discounts.
DiscountedUnitPriceSet *MoneyBag `json:"discountedUnitPriceSet,omitempty"` // The approximate unit price of the line item in shop and presentment currencies. This value includes line-level discounts and discounts applied to refunded and removed quantities. It doesn't include order-level or code-based discounts.
DiscountedUnitPriceAfterAllDiscountSet *MoneyBag `json:"discountedUnitPriceAfterAllDiscountSet,omitempty"` // The approximate unit price of the line item in shop and presentment currencies. This value includes discounts applied to refunded and removed quantities.
DiscountedTotalSet *MoneyBag `json:"discountedTotalSet,omitempty"` // The total discounted price of the line item in shop and presentment currencies, including refunded and removed quantities. This value doesn't include order-level discounts. Code-based discounts aren't included by default.
OriginalUnitPriceSet *MoneyBag `json:"originalUnitPriceSet,omitempty"` // In shop and presentment currencies, the unit price of the line item when the order was created. This value doesn't include discounts.
OriginalTotalSet *MoneyBag `json:"originalTotalSet,omitempty"` // In shop and presentment currencies, the total price of the line item when the order was created. This value doesn't include discounts.
UnfulfilledDiscountedTotalSet *MoneyBag `json:"unfulfilledDiscountedTotalSet,omitempty"` // In shop and presentment currencies, the total discounted price of the unfulfilled quantity for the line item.
UnfulfilledOriginalTotalSet *MoneyBag `json:"unfulfilledOriginalTotalSet,omitempty"` // In shop and presentment currencies, the total price of the unfulfilled quantity for the line item. This value doesn't include discounts.
IsGiftCard bool `json:"isGiftCard"` // Whether the line item represents the purchase of a gift card.
RequiresShipping bool `json:"requiresShipping"` // Whether physical shipping is required for the variant.
Restockable bool `json:"restockable"` // Whether the line item can be restocked.
MerchantEditable bool `json:"merchantEditable"` // Whether the line item can be edited or not.
NonFulfillableQuantity int `json:"nonFulfillableQuantity"` // The total number of units that can't be fulfilled. For example, if items have been refunded, or the item is not something that can be fulfilled, like a tip. Please see the FulfillmentOrder object for more fulfillment details.
Duties []Duty `json:"duties"` // The duties associated with the line item.
Contract *SubscriptionContract `json:"contract,omitempty"` // The subscription contract associated with this line item.
SellingPlan *LineItemSellingPlan `json:"sellingPlan,omitempty"` // The selling plan details associated with the line item.
StaffMember *StaffMember `json:"staffMember,omitempty"` // Staff attributed to the line item.
Taxable bool `json:"taxable"` // Whether the variant is taxable.
TaxLines []TaxLine `json:"taxLines"` // The taxes charged for the line item, including taxes charged for refunded and removed quantities.
}
Represents individual products and quantities purchased in the associated order.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
type LineItemConnection ¶
type LineItemConnection struct {
Edges []LineItemEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []LineItem `json:"nodes,omitempty"` // A list of nodes that are contained in LineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple LineItems.
type LineItemEdge ¶
type LineItemEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *LineItem `json:"node,omitempty"` // The item at the end of LineItemEdge.
}
An auto-generated type which holds one LineItem and a cursor during pagination.
type LineItemGroup ¶
type LineItemGroup struct {
ID string `json:"id"` // A globally-unique ID.
Title string `json:"title"` // Title of the line item group.
VariantID string `json:"variantId"` // ID of the variant of the line item group.
VariantSKU string `json:"variantSku"` // SKU of the variant of the line item group.
Quantity int `json:"quantity"` // Quantity of the line item group on the order.
CustomAttributes []Attribute // A list of attributes that represent custom features or special requests.
}
A line item group (bundle) to which a line item belongs to.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItemGroup
type LineItemSellingPlan ¶
type LineItemSellingPlan struct {
SellingPlanID string `json:"sellingPlanId"` // The ID of the selling plan associated with the line item.
Name string `json:"name"` // The name of the selling plan for display purposes.
}
Represents the selling plan for a line item.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/LineItemSellingPlan
type Link ¶
type Link struct {
Label string `json:"label"` // A context-sensitive label for the link.
URL URL `json:"url"` // The URL that the link visits.
Translations []Translation `json:"translations"` // The published translations associated with the resource.
}
A link to direct users to.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Link
type LinkedMetafield ¶
type LinkedMetafield struct {
Key string `json:"key"` // Key of the metafield the option is linked to.
Namespace string `json:"namespace"` // Namespace of the metafield the option is linked to.
}
The identifier for the metafield linked to this option.
This API is currently in early access. See [Metafield-linked product options](https://shopify.dev/docs/api/admin/migrate/new-product-model/metafield-linked) for more details.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/LinkedMetafield
type LocalizedField ¶
type LocalizedField struct {
Title string `json:"title"` // The localized field title.
Key LocalizedFieldKey `json:"key"` // The localized field keys that are allowed.
Value string `json:"value"` // The value of the field.
Purpose LocalizedFieldPurpose `json:"purpose"` // The purpose of this localized field.
CountryCode CountryCode `json:"countryCode"` // Country ISO 3166-1 alpha-2 code.
}
Represents the value captured by a localized field. Localized fields are additional fields required by certain countries on international orders. For example, some countries require additional fields for customs information or tax identification numbers.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/LocalizedField
type LocalizedFieldConnection ¶
type LocalizedFieldConnection struct {
Edges []LocalizedFieldEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []LocalizedField `json:"nodes,omitempty"` // A list of nodes that are contained in LocalizedFieldEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
MediaConnection represents the media field for LocalizedFields.
type LocalizedFieldEdge ¶
type LocalizedFieldEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *LocalizedField `json:"node"` // The item at the end of LocalizedFieldEdge.
}
An auto-generated type which holds one LocalizedField and a cursor during pagination.
type LocalizedFieldKey ¶
type LocalizedFieldKey string
The key of a localized field.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/LocalizedFieldKey
const ( LocalizedFieldKeyShippingCredentialBR LocalizedFieldKey = "SHIPPING_CREDENTIAL_BR" // Localized field key 'shipping_credential_br' for country Brazil. LocalizedFieldKeyShippingCredentialCL LocalizedFieldKey = "SHIPPING_CREDENTIAL_CL" // Localized field key 'shipping_credential_cl' for country Chile. LocalizedFieldKeyShippingCredentialCN LocalizedFieldKey = "SHIPPING_CREDENTIAL_CN" // Localized field key 'shipping_credential_cn' for country China. LocalizedFieldKeyShippingCredentialCO LocalizedFieldKey = "SHIPPING_CREDENTIAL_CO" // Localized field key 'shipping_credential_co' for country Colombia. LocalizedFieldKeyShippingCredentialCR LocalizedFieldKey = "SHIPPING_CREDENTIAL_CR" // Localized field key 'shipping_credential_cr' for country Costa Rica. LocalizedFieldKeyShippingCredentialEC LocalizedFieldKey = "SHIPPING_CREDENTIAL_EC" // Localized field key 'shipping_credential_ec' for country Ecuador. LocalizedFieldKeyShippingCredentialES LocalizedFieldKey = "SHIPPING_CREDENTIAL_ES" // Localized field key 'shipping_credential_es' for country Spain. LocalizedFieldKeyShippingCredentialGT LocalizedFieldKey = "SHIPPING_CREDENTIAL_GT" // Localized field key 'shipping_credential_gt' for country Guatemala. LocalizedFieldKeyShippingCredentialID LocalizedFieldKey = "SHIPPING_CREDENTIAL_ID" // Localized field key 'shipping_credential_id' for country Indonesia. LocalizedFieldKeyShippingCredentialKR LocalizedFieldKey = "SHIPPING_CREDENTIAL_KR" // Localized field key 'shipping_credential_kr' for country South Korea. LocalizedFieldKeyShippingCredentialMX LocalizedFieldKey = "SHIPPING_CREDENTIAL_MX" // Localized field key 'shipping_credential_mx' for country Mexico. LocalizedFieldKeyShippingCredentialMY LocalizedFieldKey = "SHIPPING_CREDENTIAL_MY" // Localized field key 'shipping_credential_my' for country Malaysia. LocalizedFieldKeyShippingCredentialPE LocalizedFieldKey = "SHIPPING_CREDENTIAL_PE" // Localized field key 'shipping_credential_pe' for country Peru. LocalizedFieldKeyShippingCredentialPT LocalizedFieldKey = "SHIPPING_CREDENTIAL_PT" // Localized field key 'shipping_credential_pt' for country Portugal. LocalizedFieldKeyShippingCredentialPY LocalizedFieldKey = "SHIPPING_CREDENTIAL_PY" // Localized field key 'shipping_credential_py' for country Paraguay. LocalizedFieldKeyShippingCredentialTR LocalizedFieldKey = "SHIPPING_CREDENTIAL_TR" // Localized field key 'shipping_credential_tr' for country Turkey. LocalizedFieldKeyShippingCredentialTW LocalizedFieldKey = "SHIPPING_CREDENTIAL_TW" // Localized field key 'shipping_credential_tw' for country Taiwan. LocalizedFieldKeyShippingCredentialTypeCO LocalizedFieldKey = "SHIPPING_CREDENTIAL_TYPE_CO" //Localized field key 'shipping_credential_type_co' for country Colombia. LocalizedFieldKeyTaxCredentialBR LocalizedFieldKey = "TAX_CREDENTIAL_BR" // Localized field key 'tax_credential_br' for country Brazil. LocalizedFieldKeyTaxCredentialCL LocalizedFieldKey = "TAX_CREDENTIAL_CL" // Localized field key 'tax_credential_cl' for country Chile. LocalizedFieldKeyTaxCredentialCO LocalizedFieldKey = "TAX_CREDENTIAL_CO" // Localized field key 'tax_credential_co' for country Colombia. LocalizedFieldKeyTaxCredentialCR LocalizedFieldKey = "TAX_CREDENTIAL_CR" // Localized field key 'tax_credential_cr' for country Costa Rica. LocalizedFieldKeyTaxCredentialEC LocalizedFieldKey = "TAX_CREDENTIAL_EC" // Localized field key 'tax_credential_ec' for country Ecuador. LocalizedFieldKeyTaxCredentialES LocalizedFieldKey = "TAX_CREDENTIAL_ES" // Localized field key 'tax_credential_es' for country Spain. LocalizedFieldKeyTaxCredentialGT LocalizedFieldKey = "TAX_CREDENTIAL_GT" // Localized field key 'tax_credential_gt' for country Guatemala. LocalizedFieldKeyTaxCredentialID LocalizedFieldKey = "TAX_CREDENTIAL_ID" // Localized field key 'tax_credential_id' for country Indonesia. LocalizedFieldKeyTaxCredentialIT LocalizedFieldKey = "TAX_CREDENTIAL_IT" // Localized field key 'tax_credential_it' for country Italy. LocalizedFieldKeyTaxCredentialMX LocalizedFieldKey = "TAX_CREDENTIAL_MX" // Localized field key 'tax_credential_mx' for country Mexico. LocalizedFieldKeyTaxCredentialMY LocalizedFieldKey = "TAX_CREDENTIAL_MY" // Localized field key 'tax_credential_my' for country Malaysia. LocalizedFieldKeyTaxCredentialPE LocalizedFieldKey = "TAX_CREDENTIAL_PE" // Localized field key 'tax_credential_pe' for country Peru. LocalizedFieldKeyTaxCredentialPT LocalizedFieldKey = "TAX_CREDENTIAL_PT" // Localized field key 'tax_credential_pt' for country Portugal. LocalizedFieldKeyTaxCredentialPY LocalizedFieldKey = "TAX_CREDENTIAL_PY" // Localized field key 'tax_credential_py' for country Paraguay. LocalizedFieldKeyTaxCredentialTR LocalizedFieldKey = "TAX_CREDENTIAL_TR" // Localized field key 'tax_credential_tr' for country Turkey. LocalizedFieldKeyTaxCredentialTypeCO LocalizedFieldKey = "TAX_CREDENTIAL_TYPE_CO" // Localized field key 'tax_credential_type_co' for country Colombia. LocalizedFieldKeyTaxCredentialTypeMX LocalizedFieldKey = "TAX_CREDENTIAL_TYPE_MX" // Localized field key 'tax_credential_type_mx' for country Mexico. LocalizedFieldKeyTaxCredentialUseMX LocalizedFieldKey = "TAX_CREDENTIAL_USE_MX" // Localized field key 'tax_credential_use_mx' for country Mexico. LocalizedFieldKeyTaxEmailIT LocalizedFieldKey = "TAX_EMAIL_IT" // Localized field key 'tax_email_it' for country Italy. )
func (LocalizedFieldKey) Validate ¶
func (p LocalizedFieldKey) Validate() error
Validate LocalizedFieldKey
type LocalizedFieldPurpose ¶
type LocalizedFieldPurpose string
The purpose of a localized field.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/LocalizedFieldPurpose
const ( LocalizedFieldPurposeShipping LocalizedFieldPurpose = "SHIPPING" // Fields that are used for shipping purposes, for example, customs clearance. LocalizedFieldPurposeTax LocalizedFieldPurpose = "TAX" // Fields that are used for taxes purposes, for example, invoicing. )
func (LocalizedFieldPurpose) Validate ¶
func (p LocalizedFieldPurpose) Validate() error
Validate LocalizedFieldPurpose
type Location ¶
type Location struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The name of the location.
Address *LocationAddress `json:"address,omitempty"` // The address of this location
AddressVerified bool `json:"addressVerified"` // Whether the location address has been verified.
SuggestedAddresses []LocationSuggestedAddress `json:"suggestedAddresses"` // List of suggested addresses for this location (empty if none).
Activatable bool `json:"activatable"` // Whether the location can be reactivated. If false, then trying to activate the location with the `LocationActivate` mutation will return an error that describes why the location can't be activated.
Deactivatable bool `json:"deactivatable"` // Whether this location can be deactivated. If true, then the location can be deactivated by calling the `LocationDeactivate` mutation. If false, then calling the mutation to deactivate it will return an error that describes why the location can't be deactivated.
Deletable bool `json:"deletable"` // Whether this location can be deleted.
IsActive bool `json:"isActive"` // Whether the location is active. A deactivated location can be activated (change `isActive: true`) if it has activatable set to true by calling the `locationActivate` mutation.
IsFulfillmentService bool `json:"isFulfillmentService"` // Whether this location is a fulfillment service.
HasUnfulfilledOrders bool `json:"hasUnfulfilledOrders"` // Whether this location has orders that need to be fulfilled.
FulfillmentService *FulfillmentService `json:"fulfillmentService,omitempty"` // Name of the service provider that fulfills from this location.
FulfillsOnlineOrders bool `json:"fulfillsOnlineOrders"` // Whether this location can fulfill online orders.
HasActiveInventory bool `json:"hasActiveInventory"` // Whether this location has active inventory.
ShipsInventory bool `json:"shipsInventory"` // Whether this location is used for calculating shipping rates. In multi-origin shipping mode, this flag is ignored.
InventoryLevel *InventoryLevel `json:"inventoryLevel,omitempty"` // The quantities of an inventory item at this location.
InventoryLevels *InventoryLevelConnection `json:"inventoryLevels,omitempty"` // A list of the quantities of the inventory items that can be stocked at this location.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
LocalPickupSettingsV2 *DeliveryLocalPickupSettings `json:"localPickupSettingsV2,omitempty"` // Local pickup settings for the location.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
CreatedAt DateTime `json:"createdAt"` // The date and time (ISO 8601 format) that the location was added to a shop.
UpdatedAt DateTime `json:"updatedAt"` // The date and time (ISO 8601 format) when the location was last updated.
DeactivatedAt string // The date and time (ISO 8601 format) that the location was deactivated at. For example, 3:30 pm on September 7, 2019 in the time zone of UTC (Universal Time Coordinated) is represented as "2019-09-07T15:50:00Z".
}
Represents the location where the physical good resides. You can stock inventory at active locations. Active locations that have `fulfills_online_orders: true` and are configured with a shipping rate, pickup enabled or local delivery will be able to sell from their storefront.
Requires the `read_locations` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Location
type LocationAddress ¶
type LocationAddress struct {
Address1 string `json:"address1"` // The first line of the address for the location.
Address2 string `json:"address2"` // The second line of the address for the location.
City string `json:"city"` // The city of the location.
Country string `json:"country"` // The country of the location.
CountryCode string `json:"countryCode"` // The country code of the location.
Formatted []string `json:"formatted"` // A formatted version of the address for the location.
Latitude string `json:"latitude"` // The approximate latitude coordinates of the location.
Longitude string `json:"longitude"` // The approximate longitude coordinates of the location.
Phone string `json:"phone"` // The phone number of the location.
Province string `json:"province"` // The province of the location.
ProvinceCode string `json:"provinceCode"` // The code for the province, state, or district of the address of the location.
Zip string `json:"zip"` // The ZIP code of the location.
}
Represents the address of a location.
type LocationConnection ¶
type LocationConnection struct {
Edges []LocationEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Location `json:"nodes,omitempty"` // A list of nodes that are contained in LocationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Locations.
type LocationEdge ¶
type LocationEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Location `json:"node,omitempty"` // The item at the end of LocationEdge.
}
An auto-generated type which holds one Location and a cursor during pagination.
type LocationSuggestedAddress ¶
type LocationSuggestedAddress struct {
Address1 string `json:"address1"` // The first line of the address for the location.
Address2 string `json:"address2"` // The second line of the address for the location.
City string `json:"city"` // The city of the location.
Country string `json:"country"` // The country of the location.
CountryCode CountryCode `json:"countryCode"` // The country code of the location.
Formatted []string `json:"formatted"` // A formatted version of the address for the location.
Latitude string `json:"latitude"` // The approximate latitude coordinates of the location.
Longitude string `json:"longitude"` // The approximate longitude coordinates of the location.
Phone string `json:"phone"` // The phone number of the location.
Province string `json:"province"` // The province of the location.
ProvinceCode string `json:"provinceCode"` // The code for the province, state, or district of the address of the location.
Zip string `json:"zip"` // The ZIP code of the location.
}
Represents a suggested address for a location.
type MailingAddress ¶
type MailingAddress struct {
ID string `json:"id"` // A globally-unique ID.
FirstName string `json:"firstName"` // The first name of the customer.
LastName string `json:"lastName"` // The last name of the customer.
Name string `json:"name"` // The full name of the customer, based on firstName and lastName.
Address1 string `json:"address1"` // The first line of the address. Typically the street address or PO Box number.
Address2 string `json:"address2"` // The second line of the address. Typically the number of the apartment, suite, or unit.
City string `json:"city"` // The name of the city, district, village, or town.
Company string `json:"company"` // The name of the customer's company or organization.
Province string `json:"province"` // The region of the address, such as the province, state, or district.
ProvinceCode string `json:"provinceCode"` // The alphanumeric code for the region. For example, `ON`.
Zip string `json:"zip"` // The zip or postal code of the address.
Country string `json:"country"` // The name of the country.
CountryCodeV2 CountryCode `json:"countryCodeV2"` // The two-letter code for the country of the address. For example, `US`.
Formatted []string `json:"formatted"` // A formatted version of the address, customized by the provided arguments.
FormattedArea string `json:"formattedArea"` // A comma-separated list of the values for city, province, and country.
Phone string `json:"phone"` // A unique phone number for the customer.
TimeZone string `json:"timeZone"` // The time zone of the address.
Latitude float64 `json:"latitude"` // The latitude coordinate of the customer address.
Longitude float64 `json:"longitude"` // The longitude coordinate of the customer address.
CoordinatesValidated bool `json:"coordinatesValidated"` // Whether the address corresponds to recognized latitude and longitude values.
ValidationResultSummary MailingAddressValidationResult `json:"validationResultSummary"` // The validation status that is leveraged by the address validation feature in the Shopify Admin. See "Validating addresses in your Shopify admin" for more details.
}
Represents a customer mailing address.
For example, a customer's default address and an order's billing address are both mailling addresses.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/MailingAddress
type MailingAddressConnection ¶
type MailingAddressConnection struct {
Edges []MailingAddressEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []MailingAddress `json:"nodes,omitempty"` // A list of nodes that are contained in MailingAddressEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple MailingAddresses.
type MailingAddressEdge ¶
type MailingAddressEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *MailingAddress `json:"node,omitempty"` // The item at the end of MailingAddressEdge.
}
An auto-generated type which holds one MailingAddress and a cursor during pagination.
type MailingAddressValidationResult ¶
type MailingAddressValidationResult string
Highest level of validation concerns identified for the address.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/MailingAddressValidationResult
const ( MailingAddressValidationResultError MailingAddressValidationResult = "ERROR" // Indicates that the address has been validated and is very likely to contain invalid information. MailingAddressValidationResultNoIssues MailingAddressValidationResult = "NO_ISSUES" // Indicates that the address has been validated and no issues were found. MailingAddressValidationResultWarning MailingAddressValidationResult = "WARNING" // Indicates that the address has been validated and might contain invalid information. )
func (MailingAddressValidationResult) Validate ¶
func (result MailingAddressValidationResult) Validate() error
Validate MailingAddressValidationResult
type Market ¶
type Market struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The name of the market. Not shown to customers.
Handle string `json:"handle"` // A short, human-readable unique identifier for the market. This is changeable by the merchant.
Catalogs *MarketCatalogConnection `json:"catalogs,omitempty"` // The catalogs that belong to the market.
CatalogsCount *Count `json:"catalogsCount"` // The number of catalogs that belong to the market.
CurrencySettings *MarketCurrencySettings // The market’s currency settings.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
WebPresences *MarketWebPresenceConnection `json:"webPresences,omitempty"` // The market’s web presences, which defines its SEO strategy. This can be a different domain, subdomain, or subfolders of the primary domain. Each web presence comprises one or more language variants. If a market doesn't have any web presences, then the market is accessible on the primary market's domains using country selectors.
}
A market is a group of one or more regions that you want to target for international sales. By creating a market, you can configure a distinct, localized shopping experience for customers from a specific area of the world. For example, you can change currency, configure international pricing, or add market-specific domains or subfolders.
Requires `read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.
type MarketCatalog ¶
type MarketCatalog struct {
ID string `json:"id"` // A globally-unique ID.
Title string `json:"title"` // The name of the catalog.
Markets *MarketConnection `json:"markets,omitempty"` // The markets associated with the catalog.
Status CatalogStatus `json:"status,omitempty"` // The status of the catalog.
Operations []ResourceOperation `json:"operations"` // Most recent catalog operations.
PriceList *PriceList `json:"priceList,omitempty"` // The price list associated with the catalog.
Publication *Publication `json:"publication,omitempty"` // A group of products and collections that's published to a catalog.
}
A list of products with publishing and pricing information associated with markets.
type MarketCatalogConnection ¶
type MarketCatalogConnection struct {
Edges []MarketCatalogEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []MarketCatalog `json:"nodes,omitempty"` // A list of nodes that are contained in MarketCatalogEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple MarketCatalogs.
type MarketCatalogEdge ¶
type MarketCatalogEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *MarketCatalog `json:"node"` // The item at the end of MarketWebPresenceEdge.
}
type MarketConnection ¶
type MarketConnection struct {
Edges []MarketEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Market `json:"nodes,omitempty"` // A list of nodes that are contained in MarketEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Markets.
type MarketCurrencySettings ¶
type MarketCurrencySettings struct {
BaseCurrency *CurrencySetting `json:"baseCurrency,omitempty"` // The currency which this market's prices are defined in, and the currency which its customers must use if local currencies are disabled.
LocalCurrencies bool `json:"localCurrencies"` // Whether or not local currencies are enabled. If enabled, then prices will be converted to give each customer the best experience based on their region. If disabled, then all customers in this market will see prices in the market's base currency. For single country markets this will be true when the market's base currency is the same as the default currency for the region.
}
A market's currency settings.
Requires `read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.
type MarketEdge ¶
type MarketEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Market `json:"node,omitempty"` // The item at the end of MarketEdge.
}
An auto-generated type which holds one Market and a cursor during pagination.
type MarketWebPresence ¶
type MarketWebPresence struct {
ID string `json:"id"` // A globally-unique ID.
Domain *Domain `json:"domain,omitempty"` // The web presence’s domain. This field will be null if subfolderSuffix isn't null.
Market *Market `json:"market,omitempty"` // The associated market.
DefaultLocale *ShopLocale `json:"defaultLocale,omitempty"` // The ShopLocale object for the default locale. When a domain is used, this is the locale that will be used when the domain root is accessed. For example, if French is the default locale, and example.ca is the market’s domain, then example.ca will load in French.
AlternateLocales []ShopLocale `json:"alternateLocales,omitempty"` // The ShopLocale object for the alternate locales. When a domain is used, these locales will be available as language-specific subfolders. For example, if English is an alternate locale, and example.ca is the market’s domain, then example.ca/en will load in English.
RootURLs *MarketWebPresenceRootURL `json:"rootUrLs,omitempty"` // The list of root URLs for each of the web presence’s locales. As of version `2024-04` this value will no longer have a trailing slash.
SubfolderSuffix string `json:"subfolderSuffix"` // The market-specific suffix of the subfolders defined by the web presence. Example: in `/en-us` the subfolder suffix is `us`. This field will be null if `domain` isn't null.
}
The market’s web presence, which defines its SEO strategy. This can be a different domain (e.g. example.ca), subdomain (e.g. ca.example.com), or subfolders of the primary domain (e.g. example.com/en-ca). Each web presence comprises one or more language variants. If a market does not have its own web presence, it is accessible on the shop’s primary domain via country selectors.
Note: while the domain/subfolders defined by a market’s web presence are not applicable to custom storefronts, which must manage their own domains and routing, the languages chosen here do govern the languages available on the Storefront API for the countries in this market.
type MarketWebPresenceConnection ¶
type MarketWebPresenceConnection struct {
Edges []MarketWebPresenceEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []MarketWebPresence `json:"nodes,omitempty"` // A list of nodes that are contained in MarketWebPresenceEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple MarketWebPresences.
type MarketWebPresenceEdge ¶
type MarketWebPresenceEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *MarketWebPresence `json:"node"` // The item at the end of MarketWebPresenceEdge.
}
An auto-generated type which holds one MarketWebPresence and a cursor during pagination.
type MarketWebPresenceRootURL ¶
type MarketWebPresenceRootURL struct {
Locale string `json:"locale"` // The locale that the storefront loads in.
URL URL `json:"url"` // The URL.
}
The URL for the homepage of the online store in the context of a particular market and a particular locale.
Requires `read_markets` for queries and both `read_markets` as well as `write_markets` for mutations.
type MarketingChannel ¶
type MarketingChannel string
The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/MarketingChannel
const ( MarketingChannelDisplay MarketingChannel = "DISPLAY" // Displayed ads. MarketingChannelEmail MarketingChannel = "EMAIL" // Email. MarketingChannelReferral MarketingChannel = "REFERRAL" // Referral links. MarketingChannelSearch MarketingChannel = "SEARCH" // Paid search. MarketingChannelSocial MarketingChannel = "SOCIAL" // Social media. )
func (MarketingChannel) Validate ¶
func (c MarketingChannel) Validate() error
Validate MarketingChannel
type MarketingEvent ¶
type MarketingEvent struct {
ID string `json:"id"` // A globally-unique ID.
App *App `json:"app,omitempty"` // The app that the marketing event is attributed to.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
RemoteID string `json:"remoteId"` // An optional ID that helps Shopify validate engagement data.
Type MarketingTactic `json:"type"` // The marketing event type.
Description string `json:"description"` // A human-readable description of the marketing event.
ChannelHandle string `json:"channelHandle"` // The unique string identifier of the channel to which this activity belongs. For the correct handle for your channel, contact your partner manager.
ManageURL URL `json:"manageUrl"` // The URL where the marketing event can be managed.
PreviewURL URL `json:"previewUrl"` // The URL where the marketing event can be previewed.
// Where the MarketingEvent occurred and what kind of content was used.
// Because `utmSource` and `utmMedium` are often used interchangeably, this is based on a combination of `marketingChannel`, `referringDomain`, and `type` to provide a consistent representation for any given piece of marketing regardless of the app that created it.
SourceAndMedium string `json:"sourceAndMedium"`
MarketingChannelType MarketingChannel `json:"marketingChannelType"` // The medium through which the marketing activity and event reached consumers. This is used for reporting aggregation.
StartedAt DateTime `json:"startedAt"` // The date and time when the marketing event started.
ScheduledToEndAt DateTime `json:"scheduledToEndAt"` // The date and time when the marketing event is scheduled to end.
EndedAt DateTime `json:"endedAt"` // The date and time when the marketing event ended.
UTMCampaign string `json:"utmCampaign"` // The name of the marketing campaign.
UTMMedium string `json:"utmMedium"` // The medium that the marketing campaign is using. Example values: `cpc`, `banner`.
UTMSource string `json:"utmSource"` // The referrer of the marketing event. Example values: `google`, `newsletter`.
}
Represents actions that market a merchant's store or products.
Requires `read_marketing_events` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/MarketingEvent
type MarketingTactic ¶
type MarketingTactic string
The available types of tactics for a marketing activity.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/MarketingTactic
const ( MarketingTacticAbandonedCart MarketingTactic = "ABANDONED_CART" // An abandoned cart recovery email. MarketingTacticAd MarketingTactic = "AD" // An ad, such as a Facebook ad. MarketingTacticAffiliate MarketingTactic = "AFFILIATE" // An affiliate link. MarketingTacticLink MarketingTactic = "LINK" // A link. MarketingTacticLoyalty MarketingTactic = "LOYALTY" // A loyalty program. MarketingTacticMessage MarketingTactic = "MESSAGE" // A messaging app, such as Facebook Messenger. MarketingTacticNewsletter MarketingTactic = "NEWSLETTER" // A newsletter. MarketingTacticNotification MarketingTactic = "NOTIFICATION" // A notification in the Shopify admin. MarketingTacticPost MarketingTactic = "POST" // A blog post. MarketingTacticRetargeting MarketingTactic = "RETARGETING" // A retargeting ad. MarketingTacticSEO MarketingTactic = "SEO" // Search engine optimization. MarketingTacticStorefrontApp MarketingTactic = "STOREFRONT_APP" // A popup on the online store. MarketingTacticTransactional MarketingTactic = "TRANSACTIONAL" // A transactional email. )
func (MarketingTactic) Validate ¶
func (t MarketingTactic) Validate() error
Validate MarketingTactic
type Media ¶
type Media struct {
ID string `json:"id"` // Globally unique ID.
Alt string `json:"alt,omitempty"` // A word or phrase to share the nature or contents of a media.
Status MediaStatus `json:"status,omitempty"` // Current status of the media.
Preview *MediaPreview `json:"preview,omitempty"` // The preview image for the media.
MediaContentType MediaContentType `json:"mediaContentType"` // Type of media.
MediaErrors []MediaError `json:"mediaErrors,omitempty"` // Any errors which have occurred on the media.
MediaWarnings []MediaWarning `json:"mediaWarnings,omitempty"` // The warnings attached to the media.
}
Represents a media interface.
Requires `read_products access` scope, `read_files access` scope, `read_themes access` scope, `read_orders access` scope, `read_draft_orders access` scope or `read_images access` scope.
type MediaConnection ¶
type MediaConnection struct {
Edges []MediaEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Media `json:"nodes,omitempty"` // A list of media items.
PageInfo *PageInfo `json:"pageInfo"` // Pagination information.
}
MediaConnection represents the media field for products.
type MediaContentType ¶
type MediaContentType string // MediaContentType represents the type of media (Valid values: `IMAGE`, `VIDEO`, `EXTERNAL_VIDEO`, MODEL_3D).
type MediaEdge ¶
type MediaEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Media `json:"node"` // The item at the end of ProductEdge.
}
An auto-generated type which holds one Media and a cursor during pagination.
type MediaError ¶
type MediaError struct {
Code MediaErrorCode `json:"code"` // Code representing the type of error.
Details string `json:"details"` // Additional details regarding the error.
Message string `json:"message"` // Translated error message.
}
Represents a media error. This typically occurs when there is an issue with the media itself causing it to fail validation. Check the media before attempting to upload again.
type MediaErrorCode ¶
type MediaErrorCode string // Code representing the type of error. (Reference: https://shopify.dev/docs/api/admin-graphql/2024-10/objects/MediaError)
type MediaImage ¶
type MediaImage struct {
ID string `json:"id"` // A globally-unique ID.
Image *Image `json:"image"` // The image for the media. Returns null until status is READY.
Alt string `json:"alt"` // A word or phrase to share the nature or contents of a media.
FileErrors []FileError `json:"fileErrors"` // Any errors that have occurred on the file.
FileStatus FileStatus `json:"fileStatus"` // The status of the file.
MediaContentType MediaContentType `json:"mediaContentType"` // The media content type.
MediaErrors []MediaError `json:"mediaErrors"` // Any errors which have occurred on the media.
MediaWarnings []MediaWarning `json:"mediaWarnings"` // The warnings attached to the media.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
MimeType string `json:"mimeType"` // The MIME type of the image.
OriginalSource *MediaImageOriginalSource `json:"originalSource,omitempty"` // The original source of the image.
Preview *MediaPreviewImage `json:"preview,omitempty"` // The preview image for the media.
Status MediaStatus `json:"status,omitempty"` // Current status of the media.
CreatedAt DateTime `json:"createdAt"` // The date and time (ISO 8601 format) when the file was created.
UpdatedAt DateTime `json:"updatedAt"` // The date and time (ISO 8601 format) when the file was updated.
}
An image hosted on Shopify.
Requires `read_products`, `read_files`, `read_themes`, `read_orders`, `read_draft_orders` or `read_images` access scope.
type MediaImageOriginalSource ¶
type MediaImageOriginalSource struct {
FileSize int `json:"fileSize"` // The size of the original file in bytes.
URL URL `json:"url"` // The URL of the original image, valid only for a short period.
}
The original source for an image.
Requires `read_products`, `read_files`, `read_themes`, `read_orders`, `read_draft_orders` or `read_images`.
type MediaPreview ¶
type MediaPreview struct {
Image *Image `json:"image,omitempty"` // The preview image for the media. Returns `null` until status is `READY`.
Status MediaPreviewImageStatus `json:"status,omitempty"` // Current status of the preview image (Valid values: `FAILED`, `PROCESSING`, `READY`, `UPLOADED`).
}
MediaPreview represents a media preview.
type MediaPreviewImage ¶
type MediaPreviewImage struct {
Image *Image `json:"image,omitempty"` // The preview image for the media. Returns `null` until `status` is `READY`.
Status MediaPreviewImageStatus `json:"status"` // Current status of the preview image.
}
Represents the preview image for a media.
Requires `read_products`, `read_files` or `read_images` access scope.
type MediaPreviewImageStatus ¶
type MediaPreviewImageStatus string // The possible statuses for a media object (Valid values: `FAILED`, `PROCESSING`, `READY`, `UPLOADED`).
type MediaStatus ¶
type MediaStatus string // The possible statuses for a media preview image (Valid values: `FAILED`, `PROCESSING`, `READY`, `UPLOADED`).
type MediaWarning ¶
type MediaWarning struct {
Code MediaWarningCode `json:"code"` // The code representing the type of warning.
Message string `json:"message"` // Translated warning message.
}
Represents a media warning. This occurs when there is a non-blocking concern regarding your media. Consider reviewing your media to ensure it is correct and its parameters are as expected.
type MediaWarningCode ¶
type MediaWarningCode string // The code representing the type of warning. (Valid values: `MODEL_LARGE_PHYSICAL_SIZE`, `MODEL_SMALL_PHYSICAL_SIZE`)
type MerchantApprovalSignals ¶
type MerchantApprovalSignals struct {
IdentityVerified bool `json:"identityVerified"` // Whether the shop's Shopify Payments account identity is verified. Returns `false` if the identity is unverified or if the shop doesn't have a Shopify Payments account.
VerifiedByShopify bool `json:"verifiedByShopify"` // Whether Shopify has pre-verified the merchant's business for onboarding to channel integration apps. Returns `false` if the shop isn't marked for verification.
VerifiedByShopifyTier string `json:"verifiedByShopifyTier"` // Which tier of the Shopify verification was determined for the merchant's business for onboarding to channel integration apps.
}
Merchant approval for accelerated onboarding to channel integration apps.
Requires `read_merchant_approval_signals` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/MerchantApprovalSignals
type Metafield ¶
type Metafield struct {
ID string `json:"id"` // A globally-unique ID.
Key string `json:"key"` // The unique identifier for the metafield within its namespace.
Value string `json:"value"` // The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
Namespace string `json:"namespace"` // The container for a group of metafields that the metafield is associated with.
Description string `json:"description"` // The description of the metafield.
Owner *HasMetafields `json:"owner"` // The resource that the metafield is attached to.
OwnerType MetafieldOwnerType `json:"ownerType"` // The type of resource that the metafield is attached to.
CompareDigest string `json:"compareDigest"` // The data stored in the resource, represented as a digest.
Definition *MetafieldDefinition `json:"definition,omitempty"` // The metafield definition that the metafield belongs to, if any.
JSONValue JSON `json:"jsonValue"` // The data stored in the metafield in JSON format.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
CreatedAt DateTime `json:"createdAt"` // The date and time when the metafield was created.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the metafield was updated.
}
Metafields enable you to attach additional information to a Shopify resource, such as a Product or a Collection. For more information about where you can attach metafields refer to HasMetafields. Some examples of the data that metafields enable you to store are specifications, size charts, downloadable documents, release dates, images, or part numbers. Metafields are identified by an owner resource, namespace, and key. and store a value along with type information for that value.
type MetafieldAccess ¶
type MetafieldAccess struct {
Admin MetafieldAdminAccess `json:"admin"` // The default admin access setting used for the metafields under this definition.
CustomerAccount MetafieldCustomerAccountAccess `json:"customerAccount"` // The customer account access setting used for the metafields under this definition.
Storefront MetafieldStorefrontAccess `json:"storefront"` // The storefront access setting used for the metafields under this definition.
}
The access settings for this metafield definition.
type MetafieldAdminAccess ¶
type MetafieldAdminAccess string // Possible admin access settings for metafields (Valid values: `MERCHANT_READ`, `MERCHANT_READ_WRITE`, `PRIVATE`, `PUBLIC_READ`, `PUBLIC_READ_WRITE`).
type MetafieldArgs ¶
type MetafieldCapabilities ¶
type MetafieldCapabilities struct {
AdminFilterable *MetafieldCapabilityAdminFilterable // Indicate whether a metafield definition is configured for filtering.
SmartCollectionCondition *MetafieldCapabilitySmartCollectionCondition // Indicate whether a metafield definition can be used as a smart collection condition.
}
Provides the capabilities of a metafield definition.
type MetafieldCapabilityAdminFilterable ¶
type MetafieldCapabilityAdminFilterable struct {
Eligible bool `json:"eligible"` // Indicates if the definition is eligible to have the capability.
Enabled bool `json:"enabled"` // Indicates if the capability is enabled.
Status MetafieldDefinitionAdminFilterStatus `json:"status"` // Determines the metafield definition's filter status for use in admin filtering.
}
Information about the admin filterable capability on a metafield definition.
type MetafieldCapabilitySmartCollectionCondition ¶
type MetafieldCapabilitySmartCollectionCondition struct {
Eligible bool `json:"eligible"` // Indicates if the definition is eligible to have the capability.
Enabled bool `json:"enabled"` // Indicates if the capability is enabled.
}
Information about the smart collection condition capability on a metafield definition.
type MetafieldConnection ¶
type MetafieldConnection struct {
Edges []MetafieldEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Metafield `json:"nodes,omitempty"` // A list of nodes that are contained in MetafieldEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // Pagination information.
}
type MetafieldCustomerAccountAccess ¶
type MetafieldCustomerAccountAccess string // Defines how the metafields of a definition can be accessed in the Customer Account API (Valid values: `NONE`, `READ`, `READ_WRITE`).
type MetafieldDefinition ¶
type MetafieldDefinition struct {
ID string `json:"id"` // A globally-unique ID.
Key string `json:"key"` // The unique identifier for the metafield definition within its namespace.
Name string `json:"name"` // The human-readable name of the metafield definition.
Namespace string `json:"namespace"` // The container for a group of metafields that the metafield definition is associated with.
Description string `json:"description"` // The description of the metafield definition.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // The metafields that belong to the metafield definition.
MetafieldsCount int `json:"metafieldsCount"` // The count of the metafields that belong to the metafield definition.
OwnerType MetafieldOwnerType `json:"ownerType"` // The resource type that the metafield definition is attached to.
PinnedPosition int `json:"pinnedPosition"` // The position of the metafield definition in the pinned list.
StandardTemplate *StandardMetafieldDefinitionTemplate `json:"standardTemplate,omitempty"` // The standard metafield definition template associated with the metafield definition.
Type *MetafieldDefinitionType `json:"type,omitempty"` // The type of data that each of the metafields that belong to the metafield definition will store. Refer to the list of supported types.
UseAsCollectionCondition bool `json:"useAsCollectionCondition"` // Whether the metafield definition can be used as a collection condition.
Validations []MetafieldDefinitionValidation `json:"validations"` // A list of validation options for the metafields that belong to the metafield definition. For example, for a metafield definition with the type date, you can set a minimum date validation so that each of the metafields that belong to it can only store dates after the specified minimum.
ValidationStatus MetafieldDefinitionValidationStatus `json:"validationStatus"` // The validation status for the metafields that belong to the metafield definition.
Access *MetafieldAccess `json:"access,omitempty"` // The access settings associated with the metafield definition.
Capabilities *MetafieldCapabilities `json:"capabilities,omitempty"` // The capabilities of the metafield definition.
Constraints *MetafieldDefinitionConstraints `json:"constraints,omitempty"` // The constraints that determine what subtypes of resources a metafield definition applies to.
}
Metafield definitions enable you to define additional validation constraints for metafields, and enable the merchant to edit metafield values in context.
type MetafieldDefinitionAdminFilterStatus ¶
type MetafieldDefinitionAdminFilterStatus string // Possible filter statuses associated with a metafield definition for use in admin filtering (Valid values: `FAILED`, `FILTERABLE`, `IN_PROGRESS`, `NOT_FILTERABLE`).
type MetafieldDefinitionConstraintValue ¶
type MetafieldDefinitionConstraintValue struct {
Value string // The subtype value of the constraint.
}
A constraint subtype value that the metafield definition applies to.
type MetafieldDefinitionConstraintValueConnection ¶
type MetafieldDefinitionConstraintValueConnection struct {
Edges []MetafieldDefinitionConstraintValueEdge // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []MetafieldDefinitionConstraintValue // A list of nodes that are contained in MetafieldDefinitionConstraintValueEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple MetafieldDefinitionConstraintValues.
type MetafieldDefinitionConstraintValueEdge ¶
type MetafieldDefinitionConstraintValueEdge struct {
Cursor string // The position of each node in an array, used in pagination.
Node *MetafieldDefinitionConstraintValue // The item at the end of MetafieldDefinitionConstraintValueEdge.
}
An auto-generated type which holds one MetafieldDefinitionConstraintValue and a cursor during pagination.
type MetafieldDefinitionConstraints ¶
type MetafieldDefinitionConstraints struct {
Key string `json:"key"` // The category of resource subtypes that the definition applies to.
Values *MetafieldDefinitionConstraintValueConnection `json:"values"` // The specific constraint subtype values that the definition applies to.
}
The constraints that determine what subtypes of resources a metafield definition applies to.
type MetafieldDefinitionType ¶
type MetafieldDefinitionType struct {
Category string `json:"category"` // The category associated with the metafield definition type.
Name string `json:"name"` // The name of the type for the metafield definition. See the list of supported types. See the list of supported types (https://shopify.dev/docs/apps/build/custom-data/metafields/list-of-data-types).
SupportedValidations []MetafieldDefinitionSupportedValidation `json:"supportedValidations,omitempty"` // The supported validations for a metafield definition type.
SupportsDefinitionMigrations bool `json:"supportsDefinitionMigrations"` // Whether metafields without a definition can be migrated to a definition of this type.
}
A metafield definition type provides basic foundation and validation for a metafield.
type MetafieldDefinitionValidation ¶
type MetafieldDefinitionValidation struct {
Name string `json:"name"` // The validation name.
Type string `json:"type"` // The name for the metafield type of this validation.
Value string `json:"value"` // The validation value.
}
A configured metafield definition validation.
For example, for a metafield definition of `number_integer` type, you can set a validation with the name `max` and a value of `15`. This validation will ensure that the value of the metafield is a number `<= 15`.
Refer to the list of supported validations (https://shopify.dev/docs/api/admin-graphql/unstable/queries/metafieldDefinitionTypes#examples-Fetch_all_metafield_definition_types)
type MetafieldDefinitionValidationStatus ¶
type MetafieldDefinitionValidationStatus string // Possible metafield definition validation statuses (Valid values: `ALL_VALID`, `IN_PROGRESS`, `SOME_VALID`).
type MetafieldEdge ¶
type MetafieldOwnerType ¶
type MetafieldOwnerType string // Possible types of a metafield's owner resource. (Reference: https://shopify.dev/docs/api/admin-graphql/2024-10/enums/MetafieldOwnerType)
type MetafieldStorefrontAccess ¶
type MetafieldStorefrontAccess string // Defines how the metafields of a definition can be accessed in Storefront API surface areas, including Liquid and the GraphQL Storefront API. (Valid values: `NONE`, `LEGACY_LIQUID_ONLY`, `PUBLIC_READ`).
type Money ¶
type Money string // A monetary value string without a currency symbol or code. Example value: "100.57".
type MoneyBag ¶
type MoneyBag struct {
PresentmentMoney *MoneyV2 `json:"presentmentMoney,omitempty"` // Amount in presentment currency.
ShopMoney *MoneyV2 `json:"shopMoney,omitempty"` // Amount in shop currency.
}
A collection of monetary values in their respective currencies. Typically used in the context of multi-currency pricing and transactions, when an amount in the shop's currency is converted to the customer's currency of choice (the presentment currency).
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/MoneyBag
type MoneyV2 ¶
type MoneyV2 struct {
Amount Decimal `json:"amount"` // Decimal money amount.
CurrencyCode CurrencyCode `json:"currencyCode"` // Currency of the money.
}
A monetary value with currency.
type NavigationItem ¶
type NavigationItem struct {
}
A navigation item, holding basic link attributes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/NavigationItem
type Node ¶
type Node struct {
ID string `json:"id"` // A globally-unique ID.
}
An object with an ID field to support global identification, in accordance with the [Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface). This interface is used by the node and nodes queries.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Node
type OnlineStore ¶
type OnlineStore struct {
PasswordProtection *OnlineStorePasswordProtection `json:"passwordProtection,omitempty"` // Storefront password information.
}
The shop's online store channel.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStore
type OnlineStorePasswordProtection ¶
type OnlineStorePasswordProtection struct {
Enabled bool `json:"enabled"` // Whether the storefront password is enabled.
}
Storefront password information.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/OnlineStorePasswordProtection
type Order ¶
type Order struct {
ID string `json:"id"` // A globally-unique ID.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
Test bool `json:"test"` // Whether the order is a test. Test orders are made using the Shopify Bogus Gateway or a payment provider with test mode enabled. A test order can't be converted into a real order and vice versa.
Name string `json:"name"` // The unique identifier for the order that appears on the order page in the Shopify admin and the Order status page. For example, "#1001", "EN1001", or "1001-A". This value isn't unique across multiple stores.
Email string `json:"email"` // The email address associated with the customer.
Phone string `json:"phone"` // The phone number associated with the customer.
PONumber string `json:"poNumber"` // The PO number associated with the order.
DisplayAddress *MailingAddress `json:"displayAddress,omitempty"` // The primary address of the customer. Returns null if neither the shipping address nor the billing address was provided.
BillingAddress *MailingAddress `json:"billingAddress,omitempty"` // The billing address of the customer.
BillingAddressMatchesShippingAddress bool `json:"billingAddressMatchesShippingAddress"` // Whether the billing address matches the shipping address.
ShippingAddress *MailingAddress `json:"shippingAddress,omitempty"` // The mailing address of the customer.
StatusPageURL URL `json:"statusPageUrl"` // The URL where the customer can check the order's current status.
DisplayFinancialStatus OrderDisplayFinancialStatus `json:"displayFinancialStatus"` // The financial status of the order that can be shown to the merchant. This field doesn't capture all the details of an order's financial state. It should only be used for display summary purposes.
DisplayFulfillmentStatus OrderDisplayFulfillmentStatus `json:"displayFulfillmentStatus"` // The fulfillment status for the order that can be shown to the merchant. This field does not capture all the details of an order's fulfillment state. It should only be used for display summary purposes. For a more granular view of the fulfillment status, refer to the FulfillmentOrder object.
LineItems *LineItemConnection `json:"lineItems,omitempty"` // A list of the order's line items.
NonFulfillableLineItems *LineItemConnection `json:"nonFulfillableLineItems,omitempty"` // A list of line items that can't be fulfilled. For example, tips and fully refunded line items can't be fulfilled. For a more granular view of the fulfillment status, refer to the FulfillmentOrder object.
ShippingLine *ShippingLine `json:"shippingLine,omitempty"` // A summary of all shipping costs on the order.
ShippingLines *ShippingLineConnection `json:"shippingLines,omitempty"` // A list of the order's shipping lines.
ClientIP string `json:"clientIp"` // The IP address of the API client that created the order.
Customer *Customer `json:"customer,omitempty"` // The customer that placed the order.
CustomerAcceptsMarketing bool `json:"customerAcceptsMarketing"` // Whether the customer agreed to receive marketing materials.
CustomerJourneySummary *CustomerJourneySummary `json:"customerJourneySummary,omitempty"` // The customer's visits and interactions with the online store before placing the order.
CustomerLocale string `json:"customerLocale"` // A two-letter or three-letter language code, optionally followed by a region modifier.
Confirmed bool `json:"confirmed"` // Whether inventory has been reserved for the order.
ConfirmationNumber string `json:"confirmationNumber"` // // A randomly generated alpha-numeric identifier for the order that may be shown to the customer instead of the sequential order name. For example, "XPAV284CT", "R50KELTJP" or "35PKUN0UJ". This value isn't guaranteed to be unique.
CanMarkAsPaid bool `json:"canMarkAsPaid"` // Whether the order can be manually marked as paid.
RequiresShipping bool `json:"requiresShipping"` // Whether the order has shipping lines or at least one line item on the order that requires shipping.
CanNotifyCustomer bool `json:"canNotifyCustomer"` // Whether a customer email exists for the order.
Capturable bool `json:"capturable"` // Whether payment for the order can be captured.
Fulfillable bool `json:"fulfillable"` // Whether there are line items that can be fulfilled. This field returns false when the order has no fulfillable line items. For a more granular view of the fulfillment status, refer to the FulfillmentOrder object.
Refundable bool `json:"refundable"` // Whether the order can be refunded.
Restockable bool `json:"restockable"` // Whether any line item on the order can be restocked.
Edited bool `json:"edited"` // Whether the order has had any edits applied.
HasTimelineComment bool `json:"hasTimelineComment"` // Whether the merchant added a timeline comment to the order.
FullyPaid bool `json:"fullyPaid"` // Whether the order has been paid in full.
Unpaid bool `json:"unpaid"` // Whether no payments have been made for the order.
Closed bool `json:"closed"` // Whether the order is closed.
ClosedAt DateTime `json:"closedAt"` // The date and time when the order was closed. Returns null if the order isn't closed.
FulfillmentOrders *FulfillmentOrderConnection `json:"fulfillmentOrders,omitempty"` // A list of fulfillment orders for a specific order.
Fulfillments []Fulfillment `json:"fulfillments"` // List of shipments for the order.
FulfillmentsCount *Count `json:"fulfillmentsCount,omitempty"` // The count of fulfillments including the cancelled fulfillments.
PresentmentCurrencyCode CurrencyCode `json:"presentmentCurrencyCode"` // The payment `CurrencyCode` of the customer for the order.
CurrencyCode CurrencyCode `json:"currencyCode"` // The shop currency when the order was placed.
Returns *ReturnConnection `json:"returns,omitempty"` // A list of returns for the order.
ReturnStatus OrderReturnStatus `json:"returnStatus"` // The order's aggregated return status for display purposes.
SuggestedRefunds *SuggestedRefund `json:"suggestedRefunds,omitempty"` // A suggested refund for the order.
Refunds []Refund `json:"refunds"` // A list of refunds that have been applied to the order.
RefundDiscrepancySet *MoneyBag `json:"refundDiscrepancySet,omitempty"` // The difference between the suggested and actual refund amount of all refunds that have been applied to the order. A positive value indicates a difference in the merchant's favor, and a negative value indicates a difference in the customer's favor.
DiscountCode string `json:"discountCode"` // The discount code used for the order.
DiscountCodes []string `json:"discountCodes"` // The discount codes used for the order.
DiscountApplications *DiscountApplicationConnection `json:"discountApplications,omitempty"` // A list of discounts that are applied to the order, not including order edits and refunds.
TotalDiscountsSet *MoneyBag `json:"totalDiscountsSet,omitempty"` // The total amount discounted on the order before returns, in shop and presentment currencies. This includes both order and line level discounts.
CurrentTotalDiscountsSet *MoneyBag `json:"currentTotalDiscountsSet,omitempty"` // The total amount discounted on the order after returns, in shop and presentment currencies. This includes both order and line level discounts.
CartDiscountAmountSet *MoneyBag `json:"cartDiscountAmountSet,omitempty"` // The total order-level discount amount, before returns, in shop and presentment currencies.
CurrentCardDiscountAmountSet *MoneyBag `json:"currentCardDiscountAmountSet,omitempty"` // The current order-level discount amount after all order updates, in shop and presentment currencies.
CurrentShippingPriceSet *MoneyBag `json:"currentShippingPriceSet,omitempty"` // The current shipping price after applying refunds and discounts. If the parent `order.taxesIncluded` field is true, then this price includes taxes. Otherwise, this field is the pre-tax price.
AdditionalFees []AdditionalFee `json:"additionalFees"` // A list of additional fees applied to the order.
OriginalTotalAdditionalFeesSet *MoneyBag `json:"originalTotalAdditionalFeesSet,omitempty"` // The total amount of additional fees at the time of order creation, in shop and presentment currencies. Returns `null` if additional fees aren't applicable.
CurrentTotalAdditionalFeesSet *MoneyBag `json:"currentTotalAdditionalFeesSet,omitempty"` // The total amount of additional fees after returns, in shop and presentment currencies. Returns `null` if there are no additional fees for the order.
TotalWeight string `json:"totalWeight"` // The total weight of the order before returns, in grams.
CurrentTotalWeight string `json:"currentTotalWeight"` // The total weight of the order after returns, in grams.
SubtotalLineItemsQuantity int `json:"subtotalLineItemsQuantity"` // The sum of the quantities for all line items that contribute to the order's subtotal price.
CurrentSubtotalLineItemsQuantity int `json:"currentSubtotalLineItemsQuantity"` // The sum of the quantities for all line items that contribute to the order's current subtotal price.
SubtotalPriceSet *MoneyBag `json:"subtotalPriceSet,omitempty"` // The sum of the prices for all line items after discounts and before returns, in shop and presentment currencies. If taxesIncluded is true, then the subtotal also includes tax.
CurrentSubtotalPriceSet *MoneyBag `json:"currentSubtotalPriceSet,omitempty"` // The sum of the prices for all line items after discounts and returns, in shop and presentment currencies. If `taxesIncluded` is `true`, then the subtotal also includes tax.
OriginalTotalPriceSet *MoneyBag `json:"originalTotalPriceSet,omitempty"` // The total price of the order at the time of order creation, in shop and presentment currencies.
CurrentTotalPriceSet *MoneyBag `json:"currentTotalPriceSet,omitempty"` // The total price of the order, after returns, in shop and presentment currencies. This includes taxes and discounts.
TotalCapturableSet *MoneyBag `json:"totalCapturableSet,omitempty"` // The authorized amount that's uncaptured or undercaptured, in shop and presentment currencies. This amount isn't adjusted for returns.
TotalOutstandingSet *MoneyBag `json:"totalOutstandingSet,omitempty"` // The total amount not yet transacted for the order, in shop and presentment currencies. A positive value indicates a difference in the merchant's favor (payment from customer to merchant) and a negative value indicates a difference in the customer's favor (refund from merchant to customer).
TotalPriceSet *MoneyBag `json:"totalPriceSet,omitempty"` // The total price of the order, before returns, in shop and presentment currencies. This includes taxes and discounts.
TotalReceivedSet *MoneyBag `json:"totalReceivedSet,omitempty"` // The total amount received from the customer before returns, in shop and presentment currencies.
TotalRefundedSet *MoneyBag `json:"totalRefundedSet,omitempty"` // The total amount that was refunded, in shop and presentment currencies.
TotalRefundedShippingSet *MoneyBag `json:"totalRefundedShippingSet,omitempty"` // The total amount of shipping that was refunded, in shop and presentment currencies.
TotalShippingPriceSet *MoneyBag `json:"totalShippingPriceSet,omitempty"` // The total shipping amount before discounts and returns, in shop and presentment currencies.
TotalTaxSet *MoneyBag `json:"totalTaxSet,omitempty"` // The total tax amount before returns, in shop and presentment currencies.
CurrentTotalTaxSet *MoneyBag `json:"currentTotalTaxSet,omitempty"` // The sum of the prices of all tax lines applied to line items on the order, after returns, in shop and presentment currencies.
TotalTipReceivedSet *MoneyBag `json:"totalTipReceivedSet,omitempty"` // The sum of all tip amounts for the order, in shop and presentment currencies.
TotalCashRoundingAdjustment *CashRoundingAdjustment `json:"totalCashRoundingAdjustment,omitempty"` // The total rounding adjustment applied to payments or refunds for an Order involving cash payments. Applies to some countries where cash transactions are rounded to the nearest currency denomination.
RetailLocation *Location `json:"retailLocation,omitempty"` // The physical location where a retail order is created or completed, except for draft POS orders completed via the “mark as paid” flow in Admin, which return null.
CustomAttributes []Attribute `json:"customAttributes"` // A list of additional merchant-facing details that have been added to the order. For example, whether an order is a customer's first.
SourceIdentifier string `json:"sourceIdentifier"` // A unique POS or third party order identifier. For example, "1234-12-1000" or "111-98567-54". The `receipt_number` field is derived from this value for POS orders.
SourceName string `json:"sourceName"` // The name of the source associated with the order.
RegisteredSourceURL URL `json:"registeredSourceUrl"` // The URL of the source that the order originated from, if found in the domain registry.
Risk *OrderRiskSummary `json:"risk,omitempty"` // The risk characteristics for the order.
ShopifyProtect *ShopifyProtectOrderSummary `json:"shopifyProtect,omitempty"` // The Shopify Protect details for the order. If Shopify Protect is disabled for the shop, then this will be null.
Note string `json:"note"` // The contents of the note associated with the order.
Tags []string `json:"tags"` // A comma separated list of tags associated with the order. Updating tags overwrites any existing tags that were previously added to the order. To add new tags without overwriting existing tags, use the `tagsAdd` mutation.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
MerchantBusinessEntity *BusinessEntity `json:"merchantBusinessEntity,omitempty"` // The merchant's business entity associated with the order.
MerchantEditable bool `json:"merchantEditable"` // Whether the order can be edited by the merchant. For example, canceled orders can’t be edited.
MerchantEditableErrors []string `json:"merchantEditableErrors"` // A list of reasons why the order can't be edited. For example, "Canceled orders can't be edited".
MerchantOfRecordApp *OrderApp `json:"merchantOfRecordApp,omitempty"` // The application acting as the Merchant of Record for the order.
LocalizedFields *LocalizedFieldConnection `json:"localizedFields,omitempty"` // List of localized fields for the resource.
Cancellation *OrderCancellation `json:"cancellation,omitempty"` // Cancellation details for the order.
CancelledAt DateTime `json:"cancelledAt"` // The date and time when the order was canceled. Returns null if the order wasn't canceled.
CancelReason OrderCancelReason `json:"cancelReason"` // The reason provided when the order was canceled. Returns null if the order wasn't canceled.
Agreements *SalesAgreementConnection `json:"agreements,omitempty"` // A list of sales agreements associated with the order.
PurchasingEntity interface{} `json:"purchasingEntity,omitempty"` // The purchasing entity for the order.
ChannelInformation *ChannelInformation `json:"channelInformation,omitempty"` // Details about the channel that created the order.
PaymentCollectionDetails *OrderPaymentCollectionDetails `json:"paymentCollectionDetails,omitempty"` // The payment collection details for the order.
PaymentGatewayNames []string `json:"paymentGatewayNames"` // A list of the names of all payment gateways used for the order. For example, "Shopify Payments" and "Cash on Delivery (COD)".
PaymentTerms *PaymentTerms `json:"paymentTerms,omitempty"` // The payment terms associated with the order.
NetPaymentSet *MoneyBag `json:"netPaymentSet,omitempty"` // The net payment for the order, based on the total amount received minus the total amount refunded, in shop and presentment currencies.
Events *EventConnection `json:"events,omitempty"` // A list of events associated with the order.
Publication *Publication `json:"publication,omitempty"` // The publication that the order was created from.
Disputes []OrderDisputeSummary `json:"disputes"` // A list of the disputes associated with the order.
Transactions []OrderTransaction `json:"transactions"` // A list of transactions associated with the order.
TransactionsCount *Count `json:"transactionsCount,omitempty"` // The number of transactions associated with the order.
DutiesIncluded bool `json:"dutiesIncluded"` // Whether duties are included in the subtotal price of the order.
OriginalTotalDutiesSet *MoneyBag `json:"originalTotalDutiesSet,omitempty"` // The total amount of duties at the time of order creation, in shop and presentment currencies. Returns `null` if duties aren't applicable.
CurrentTotalDutiesSet *MoneyBag `json:"currentTotalDutiesSet,omitempty"` // The total amount of duties after returns, in shop and presentment currencies. Returns `null` if duties aren't applicable.
TaxesIncluded bool `json:"taxesIncluded"` // Whether taxes are included in the subtotal price of the order.
TaxExempt bool `json:"taxExempt"` // Whether taxes are exempt on the order.
EstimatedTaxes bool `json:"estimatedTaxes"` // Whether taxes on the order are estimated. This field returns false when taxes on the order are finalized and aren't subject to any changes.
CurrentTaxLines []TaxLine `json:"currentTaxLines"` // A list of all tax lines applied to line items on the order, after returns. Tax line prices represent the total price for all tax lines with the same `rate` and `title`.
App *OrderApp `json:"app,omitempty"` // The application that created the order.
Alerts []ResourceAlert `json:"alerts"` // A list of messages that appear on the order page in the Shopify admin.
StaffMember *StaffMember `json:"staffMember,omitempty"` // The staff member associated with the order.
CreatedAt DateTime `json:"createdAt"` // Date and time when the order was created in Shopify.
ProcessedAt DateTime `json:"processedAt"` // The date and time when the order was processed. This date and time might not match the date and time when the order was created.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the order was modified last.
}
An order is a customer's request to purchase one or more products from a shop. You can retrieve and update orders using the Order object.
Only the last 60 days' worth of orders from a store are accessible from the Order object by default. If you want to access older orders, then you need to request access to all orders. If your app is granted access, then you can add the `read_all_orders` scope to your app along with `read_orders` or `write_orders`. Private apps are not affected by this change and are automatically granted the scope.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Order
type OrderActionType ¶
type OrderActionType string
The possible order action types for a sales agreement.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderActionType
const ( OrderActionTypeOrder OrderActionType = "ORDER" // An order with a purchase or charge. OrderActionTypeOrderEdit OrderActionType = "ORDER_EDIT" // An edit to the order. OrderActionTypeReturn OrderActionType = "RETURN" // A return on the order. OrderActionTypeRefund OrderActionType = "REFUND" // A refund on the order. OrderActionTypeUnknown OrderActionType = "UNKNOWN" // An unknown agreement action. Represents new actions that may be added in future versions. )
func (OrderActionType) Validate ¶
func (t OrderActionType) Validate() error
Validate OrderActionType
type OrderAdjustment ¶
type OrderAdjustment struct {
ID string `json:"id"` // A globally-unique ID.
TaxAmountSet *MoneyBag `json:"taxAmountSet,omitempty"` // The tax amount of the order adjustment in shop and presentment currencies.
AmountSet *MoneyBag `json:"amountSet,omitempty"` // The amount of the order adjustment in shop and presentment currencies.
Reason OrderAdjustmentDiscrepancyReason `json:"reason"` // An optional reason that explains a discrepancy between calculated and actual refund amounts.
}
An order adjustment accounts for the difference between a calculated and actual refund amount.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderAdjustment
type OrderAdjustmentConnection ¶
type OrderAdjustmentConnection struct {
Edges []OrderAdjustmentEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []OrderAdjustment `json:"nodes,omitempty"` // A list of nodes that are contained in OrderAdjustmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple OrderAdjustments.
type OrderAdjustmentDiscrepancyReason ¶
type OrderAdjustmentDiscrepancyReason string
Discrepancy reasons for order adjustments.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderAdjustmentDiscrepancyReason
const ( OrderAdjustmentDiscrepancyReasonCustomer OrderAdjustmentDiscrepancyReason = "CUSTOMER" // The discrepancy reason is customer. OrderAdjustmentDiscrepancyReasonDamage OrderAdjustmentDiscrepancyReason = "DAMAGE" // The discrepancy reason is damage. OrderAdjustmentDiscrepancyReasonFullReturnBalancingAdjustment OrderAdjustmentDiscrepancyReason = "FULL_RETURN_BALANCING_ADJUSTMENT" // The discrepancy reason is balance adjustment. OrderAdjustmentDiscrepancyReasonPendingRefundDiscrepancy OrderAdjustmentDiscrepancyReason = "PENDING_RETURN_DISCREPANCY" // The discrepancy reason is pending refund. OrderAdjustmentDiscrepancyReasonRefundDiscrepancy OrderAdjustmentDiscrepancyReason = "RETURN_DISCREPANCY" // The discrepancy reason is not one of the predefined reasons. OrderAdjustmentDiscrepancyReasonRestock OrderAdjustmentDiscrepancyReason = "RESTOCK" // The discrepancy reason is restocking. )
func (OrderAdjustmentDiscrepancyReason) Validate ¶
func (reason OrderAdjustmentDiscrepancyReason) Validate() error
Validate OrderAdjustmentDiscrepancyReason
type OrderAdjustmentEdge ¶
type OrderAdjustmentEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *OrderAdjustment `json:"node"` // The item at the end of `OrderAdjustmentEdge`.
}
An auto-generated type which holds one `OrderAdjustment` and a cursor during pagination.
type OrderApp ¶
type OrderApp struct {
ID string `json:"id"` // The application ID.
Name string `json:"name"` // The name of the application.
Image *Image `json:"image,omitempty"` // The application icon.
}
The application that created the order.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderApp
type OrderCancelReason ¶
type OrderCancelReason string
Represents the reason for the order's cancellation.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderCancelReason
const ( OrderCancelReasonCustomer OrderCancelReason = "CUSTOMER" // The customer wanted to cancel the order. OrderCancelReasonDeclined OrderCancelReason = "DECLINED" // Payment was declined. OrderCancelReasonFraud OrderCancelReason = "FRAUD" // The order was fraudulent. OrderCancelReasonInventory OrderCancelReason = "INVENTORY" // There was insufficient inventory. OrderCancelReasonOther OrderCancelReason = "OTHER" // The order was canceled for an unlisted reason. OrderCancelReasonStaff OrderCancelReason = "STAFF" // Staff made an error. )
func (OrderCancelReason) Validate ¶
func (r OrderCancelReason) Validate() error
Validate OrderCancelReason
type OrderCancellation ¶
type OrderCancellation struct {
StaffNote string `json:"staffNote"` // Staff provided note for the order cancellation.
}
Details about the order cancellation.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderCancellation
type OrderConnection ¶
type OrderConnection struct {
Edges []OrderEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Order `json:"nodes,omitempty"` // A list of nodes that are contained in OrderEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Orders.
type OrderDisplayFinancialStatus ¶
type OrderDisplayFinancialStatus string
Represents the order's current financial status.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderDisplayFinancialStatus
const ( OrderDisplayFinancialStatusAuthorized OrderDisplayFinancialStatus = "AUTHORIZED" // Displayed as Authorized. The payment provider has validated the customer's payment information. This status appears only for manual payment capture and indicates payments should be captured before the authorization period expires. OrderDisplayFinancialStatusExpired OrderDisplayFinancialStatus = "EXPIRED" // Displayed as Expired. Payment wasn't captured before the payment provider's deadline on an authorized order. Some payment providers use this status to indicate failed payment processing. OrderDisplayFinancialStatusPaid OrderDisplayFinancialStatus = "PAID" // Displayed as Paid. Payment was automatically or manually captured, or the order was marked as paid. OrderDisplayFinancialStatusPartiallyPaid OrderDisplayFinancialStatus = "PARTIALLY_PAID" // Displayed as Partially paid. A payment was manually captured for the order with an amount less than the full order value. OrderDisplayFinancialStatusPartiallyRefunded OrderDisplayFinancialStatus = "PARTIALLY_REFUNDED" // Displayed as Partially refunded. The amount refunded to a customer is less than the full amount paid for an order. OrderDisplayFinancialStatusPending OrderDisplayFinancialStatus = "PENDING" // Displayed as Pending. Orders have this status when the payment provider needs time to complete the payment, or when manual payment methods are being used. OrderDisplayFinancialStatusRefunded OrderDisplayFinancialStatus = "REFUNDED" // Displayed as Refunded. The full amount paid for an order was refunded to the customer. OrderDisplayFinancialStatusVoided OrderDisplayFinancialStatus = "VOIDED" // Displayed as Voided. An unpaid (payment authorized but not captured) order was manually canceled. )
func (OrderDisplayFinancialStatus) Validate ¶
func (s OrderDisplayFinancialStatus) Validate() error
Validate OrderDisplayFinancialStatus
type OrderDisplayFulfillmentStatus ¶
type OrderDisplayFulfillmentStatus string
Represents the order's aggregated fulfillment status for display purposes.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderDisplayFulfillmentStatus
const ( OrderDisplayFulfillmentStatusFulfilled OrderDisplayFulfillmentStatus = "FULFILLED" // Displayed as Fulfilled. All the items in the order have been fulfilled. OrderDisplayFulfillmentStatusInProgress OrderDisplayFulfillmentStatus = "IN_PROGRESS" // Displayed as In progress. Some of the items in the order have been fulfilled, or a request for fulfillment has been sent to the fulfillment service. OrderDisplayFulfillmentStatusOnHold OrderDisplayFulfillmentStatus = "ON_HOLD" // Displayed as On hold. All of the unfulfilled items in this order are on hold. OrderDisplayFulfillmentStatusOpen OrderDisplayFulfillmentStatus = "OPEN" // Displayed as Open. None of the items in the order have been fulfilled. Replaced by "UNFULFILLED" status. OrderDisplayFulfillmentStatusPartiallyFulfilled OrderDisplayFulfillmentStatus = "PARTIALLY_FULFILLED" // Displayed as Partially fulfilled. Some of the items in the order have been fulfilled. OrderDisplayFulfillmentStatusPendingFulfillment OrderDisplayFulfillmentStatus = "PENDING_FULFILLMENT" // Displayed as Pending fulfillment. A request for fulfillment of some items awaits a response from the fulfillment service. Replaced by the "IN_PROGRESS" status. OrderDisplayFulfillmentStatusRequestDeclined OrderDisplayFulfillmentStatus = "REQUEST_DECLINED" // Displayed as Request declined. Some of the items in the order have been rejected for fulfillment by the fulfillment service. OrderDisplayFulfillmentStatusRestocked OrderDisplayFulfillmentStatus = "RESTOCKED" // Displayed as Restocked. All the items in the order have been restocked. Replaced by the "UNFULFILLED" status. OrderDisplayFulfillmentStatusScheduled OrderDisplayFulfillmentStatus = "SCHEDULED" // Displayed as Scheduled. All of the unfulfilled items in this order are scheduled for fulfillment at later time. OrderDisplayFulfillmentStatusUnfulfilled OrderDisplayFulfillmentStatus = "UNFULFILLED" // Displayed as Unfulfilled. None of the items in the order have been fulfilled. )
func (OrderDisplayFulfillmentStatus) Validate ¶
func (s OrderDisplayFulfillmentStatus) Validate() error
Validate OrderDisplayFulfillmentStatus
type OrderDisputeSummary ¶
type OrderDisputeSummary struct {
ID string `json:"id"` // A globally-unique ID.
InitiatedAs DisputeType `json:"initiatedAs"` // The type that the dispute was initiated as.
Status DisputeStatus `json:"status"` // The current status of the dispute.
}
A summary of the important details for a dispute on an order.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderDisputeSummary
type OrderEdge ¶
type OrderEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Order `json:"node,omitempty"` // The item at the end of OrderEdge.
}
An auto-generated type which holds one Order and a cursor during pagination.
type OrderPaymentCollectionDetails ¶
type OrderPaymentCollectionDetails struct {
AdditionalPaymentCollectionURL URL `json:"additionalPaymentCollectionUrl"` // The URL to use for collecting an additional payment on the order.
VaultedPaymentMethods []PaymentMandate `json:"vaultedPaymentMethods"` // The list of vaulted payment methods for the order with their permissions.
}
The payment collection details for an order that requires additional payment following an edit to the order.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderPaymentCollectionDetails
type OrderReturnStatus ¶
type OrderReturnStatus string
The order's aggregated return status that's used for display purposes. An order might have multiple returns, so this field communicates the prioritized return status. The `OrderReturnStatus` enum is a supported filter parameter in the orders query.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderReturnStatus
const ( OrderReturnStatusInspectionComplete OrderReturnStatus = "INSPECTION_COMPLETE" // All return shipments from a return in this order were inspected. OrderReturnStatusInProgress OrderReturnStatus = "IN_PROGRESS" // Some items in the order are being returned. OrderReturnStatusNoReturn OrderReturnStatus = "NO_RETURN" // No items in the order were returned. OrderReturnStatusReturned OrderReturnStatus = "RETURNED" // Some items in the order were returned. OrderReturnStatusReturnFailed OrderReturnStatus = "RETURN_FAILED" // Some returns in the order were not completed successfully. OrderReturnStatusReturnRequested OrderReturnStatus = "RETURN_REQUESTED" // A return was requested for some items in the order. )
func (OrderReturnStatus) Validate ¶
func (s OrderReturnStatus) Validate() error
Validate OrderReturnStatus
type OrderRiskAssessment ¶
type OrderRiskAssessment struct {
Provider *App `json:"provider,omitempty"` // The app that provided the assessment, `null` if the assessment was provided by Shopify.
Facts []RiskFact `json:"facts"` // Optional facts used to describe the risk assessment. The values in here are specific to the provider. See the [examples for the mutation `orderRiskAssessmentCreate`](https://shopify.dev/api/admin-graphql/unstable/mutations/orderRiskAssessmentCreate#section-examples).
RiskLevel RiskAssessmentResult `json:"riskLevel"` // The likelihood that the order is fraudulent, based on this risk assessment.
}
The risk assessments for an order.
See the example query ["Retrieves a list of all order risks for an order"](https://shopify.dev/docs/api/admin-graphql/unstable/queries/order?example=Retrieves+a+list+of+all+order+risks+for+an+order).
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderRiskAssessment
type OrderRiskRecommendationResult ¶
type OrderRiskRecommendationResult string
List of possible values for an OrderRiskRecommendation recommendation.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderRiskRecommendationResult
const ( OrderRiskRecommendationResultAccept OrderRiskRecommendationResult = "ACCEPT" // Recommends fulfilling the order. OrderRiskRecommendationResultCancel OrderRiskRecommendationResult = "CANCEL" // Recommends cancelling the order. OrderRiskRecommendationResultInvestigate OrderRiskRecommendationResult = "INVESTIGATE" // Recommends investigating the order by contacting buyers. OrderRiskRecommendationResultNone OrderRiskRecommendationResult = "NONE" // There is no recommended action for the order. )
func (OrderRiskRecommendationResult) Validate ¶
func (r OrderRiskRecommendationResult) Validate() error
Validate OrderRiskRecommendationResult
type OrderRiskSummary ¶
type OrderRiskSummary struct {
Assessments []OrderRiskAssessment `json:"assessments"` // The list of risk assessments for the order.
Recommendation OrderRiskRecommendationResult `json:"recommendation"` // The recommendation for the order based on the results of the risk assessments. This suggests the action the merchant should take with regards to its risk of fraud.
}
Summary of risk characteristics for an order.
See the example query ["Retrieves a list of all order risks for an order"](https://shopify.dev/docs/api/admin-graphql/unstable/queries/order?example=Retrieves+a+list+of+all+order+risks+for+an+order).
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderRiskSummary
type OrderTransaction ¶
type OrderTransaction struct {
ID string `json:"id"` // A globally-unique ID.
AccountNumber string `json:"accountNumber"` // The masked account number associated with the payment method.
AuthorizationCode string `json:"authorizationCode"` // Authorization code associated with the transaction.
AuthorizationExpiresAt DateTime `json:"authorizationExpiresAt"` // The time when the authorization expires. This field is available only to stores on a Shopify Plus plan.
Kind OrderTransactionKind `json:"kind"` // The kind of transaction.
Test bool `json:"test"` // Whether the transaction is a test transaction.
MultiCapturable bool `json:"multiCapturable"` // Whether the transaction can be captured multiple times.
Status OrderTransactionStatus `json:"status"` // The status of this transaction.
PaymentID string `json:"paymentId"` // The payment ID associated with the transaction.
PaymentIcon *Image `json:"paymentIcon,omitempty"` // The payment icon to display for the transaction.
PaymentDetails interface{} `json:"paymentDetails,omitempty"` // The payment details for the transaction.
ParentTransaction *OrderTransaction `json:"parentTransaction,omitempty"` // The associated parent transaction, for example the authorization of a capture.
Order *Order `json:"order,omitempty"` // The associated order.
AmountRoundingSet *MoneyBag `json:"amountRoundingSet,omitempty"` // The rounding adjustment applied on the cash amount in shop and presentment currencies.
AmountSet *MoneyBag `json:"amountSet,omitempty"` // The amount and currency of the transaction in shop and presentment currencies.
Gateway string `json:"gateway"` // The payment gateway used to process the transaction.
FormattedGateway string `json:"formattedGateway"` // The human-readable payment gateway name used to process the transaction.
ManuallyCapturable bool `json:"manuallyCapturable"` // Whether the transaction can be manually captured.
ManualPaymentGateway bool `json:"manualPaymentGateway"` // Whether the transaction is processed by manual payment gateway.
MaximumRefundableV2 *MoneyV2 `json:"maximumRefundableV2,omitempty"` // Specifies the available amount with currency to refund on the gateway. This value is only available for transactions of type `SuggestedRefund`.
Fees []TransactionFee `json:"fees"` // The transaction fees charged on the order transaction. Only present for Shopify Payments transactions.
SettlementCurrencyRate Decimal `json:"settlementCurrencyRate"` // The rate used when converting the transaction amount to settlement currency.
SettlementCurrency CurrencyCode `json:"settlementCurrency"` // The settlement currency.
TotalUnsettledSet *MoneyBag `json:"totalUnsettledSet,omitempty"` // Specifies the available amount with currency to capture on the gateway in shop and presentment currencies. Only available when an amount is capturable or manually mark as paid.
ShopifyPaymentsSet *ShopifyPaymentsTransactionSet `json:"shopifyPaymentsSet,omitempty"` // Contains all Shopify Payments information related to an order transaction. This field is available only to stores on a Shopify Plus plan.
ReceiptJSON JSON `json:"receiptJson"` // The transaction receipt that the payment gateway attaches to the transaction. The value of this field depends on which payment gateway processed the transaction.
User *StaffMember `json:"user,omitempty"` // Staff member who was logged into the Shopify POS device when the transaction was processed.
ErrorCode OrderTransactionErrorCode `json:"errorCode"` // A standardized error code, independent of the payment provider.
CreatedAt DateTime `json:"createdAt"` // Date and time when the transaction was created.
ProcessedAt DateTime `json:"processedAt"` // Date and time when the transaction was processed.
}
A payment transaction in the context of an order.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction
type OrderTransactionConnection ¶
type OrderTransactionConnection struct {
Edges []OrderTransactionEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []OrderTransaction `json:"nodes,omitempty"` // A list of nodes that are contained in OrderTransactionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple OrderTransactions.
type OrderTransactionEdge ¶
type OrderTransactionEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *OrderTransaction `json:"node"` // The item at the end of `OrderTransactionEdge`.
}
An auto-generated type which holds one `OrderTransaction` and a cursor during pagination.
type OrderTransactionErrorCode ¶
type OrderTransactionErrorCode string
A standardized error code, independent of the payment provider.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderTransactionErrorCode
const ( OrderTransactionErrorCodeAmazonPaymentsInvalidPaymentMethod OrderTransactionErrorCode = "AMAZON_PAYMENTS_INVALID_PAYMENT_METHOD" // The payment method was invalid. OrderTransactionErrorCodeAmazonPaymentsMaxAmountCharged OrderTransactionErrorCode = "AMAZON_PAYMENTS_MAX_AMOUNT_CHARGED" // The maximum amount has been captured. OrderTransactionErrorCodeAmazonPaymentsMaxAmountRefunded OrderTransactionErrorCode = "AMAZON_PAYMENTS_MAX_AMOUNT_REFUNDED" // The maximum amount has been refunded. OrderTransactionErrorCodeAmazonPaymentsMaxAuthorizationsCaptured OrderTransactionErrorCode = "AMAZON_PAYMENTS_MAX_AUTHORIZATIONS_CAPTURED" // The maximum of 10 authorizations has been captured for an order. OrderTransactionErrorCodeAmazonPaymentsMaxRefundsProcessed OrderTransactionErrorCode = "AMAZON_PAYMENTS_MAX_REFUNDS_PROCESSED" // The maximum of 10 refunds has been processed for an order. OrderTransactionErrorCodeAmazonPaymentsOrderReferenceCanceled OrderTransactionErrorCode = "AMAZON_PAYMENTS_ORDER_REFERENCE_CANCELED" // The order was canceled, which canceled all open authorizations. OrderTransactionErrorCodeAmazonPaymentsStale OrderTransactionErrorCode = "AMAZON_PAYMENTS_STALE" // The order was not confirmed within three hours. OrderTransactionErrorCodeCallIssuer OrderTransactionErrorCode = "CALL_ISSUER" // Call the card issuer. OrderTransactionErrorCodeCardDeclined OrderTransactionErrorCode = "CARD_DECLINED" // The card was declined. OrderTransactionErrorCodeConfigError OrderTransactionErrorCode = "CONFIG_ERROR" // There is an error in the gateway or merchant configuration. OrderTransactionErrorCodeExpiredCard OrderTransactionErrorCode = "EXPIRED_CARD" // The card is expired. OrderTransactionErrorCodeGenericError OrderTransactionErrorCode = "GENERIC_ERROR" // There was an unknown error with processing the payment. OrderTransactionErrorCodeIncorrectAddress OrderTransactionErrorCode = "INCORRECT_ADDRESS" // The address does not match the card number. OrderTransactionErrorCodeIncorrectCVC OrderTransactionErrorCode = "INCORRECT_CVC" // The CVC does not match the card number. OrderTransactionErrorCodeIncorrectNumber OrderTransactionErrorCode = "INCORRECT_NUMBER" // The card number is incorrect. OrderTransactionErrorCodeIncorrectPIN OrderTransactionErrorCode = "INCORRECT_PIN" // The entered PIN is incorrect. OrderTransactionErrorCodeIncorrectZip OrderTransactionErrorCode = "INCORRECT_ZIP" // The ZIP or postal code does not match the card number. OrderTransactionErrorCodeInvalidAmount OrderTransactionErrorCode = "INVALID_AMOUNT" // The amount is either too high or too low for the provider. OrderTransactionErrorCodeInvalidCountry OrderTransactionErrorCode = "INVALID_COUNTRY" // The payment method is not available in the customer's country. OrderTransactionErrorCodeInvalidCVC OrderTransactionErrorCode = "INVALID_CVC" // The format of the CVC is incorrect. OrderTransactionErrorCodeInvalidExpiryDate OrderTransactionErrorCode = "INVALID_EXPIRY_DATE" // The format of the expiry date is incorrect. OrderTransactionErrorCodeInvalidNumber OrderTransactionErrorCode = "INVALID_NUMBER" // The format of the card number is incorrect. OrderTransactionErrorCodePickUpCard OrderTransactionErrorCode = "PICK_UP_CARD" // 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. OrderTransactionErrorCodeProcessingError OrderTransactionErrorCode = "PROCESSING_ERROR" // There was an error while processing the payment. OrderTransactionErrorCodeTestModeLiveCard OrderTransactionErrorCode = "TEST_MODE_LIVE_CARD" // A real card was used but the gateway was in test mode. OrderTransactionErrorCodeUnsupportedFeature OrderTransactionErrorCode = "UNSUPPORTED_FEATURE" // The gateway or merchant configuration doesn't support a feature, such as network tokenization. )
func (OrderTransactionErrorCode) Validate ¶
func (code OrderTransactionErrorCode) Validate() error
Validate OrderTransactionErrorCode
type OrderTransactionKind ¶
type OrderTransactionKind string
The different kinds of order transactions.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderTransactionKind
const ( OrderTransactionKindAuthorization OrderTransactionKind = "AUTHORIZATION" // An amount reserved against the cardholder's funding source. Money does not change hands until the authorization is captured. OrderTransactionKindCapture OrderTransactionKind = "CAPTURE" // A transfer of the money that was reserved by an authorization. OrderTransactionKindChange OrderTransactionKind = "CHANGE" // The money returned to the customer when they've paid too much during a cash transaction. OrderTransactionKindEMVAuthorization OrderTransactionKind = "EMV_AUTHORIZATION" // An authorization for a payment taken with an EMV credit card reader. OrderTransactionKindRefund OrderTransactionKind = "REFUND" // A partial or full return of captured funds to the cardholder. A refund can happen only after a capture is processed. OrderTransactionKindSale OrderTransactionKind = "SALE" // An authorization and capture performed together in a single step. OrderTransactionKindSuggestedRefund OrderTransactionKind = "SUGGESTED_REFUND" // A suggested refund transaction that can be used to create a refund. OrderTransactionKindVoid OrderTransactionKind = "VOID" // A cancelation of an authorization transaction. )
func (OrderTransactionKind) Validate ¶
func (status OrderTransactionKind) Validate() error
Validate OrderTransactionKind
type OrderTransactionStatus ¶
type OrderTransactionStatus string
The different states that an OrderTransaction can have.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/OrderTransactionStatus
const ( OrderTransactionStatusAwaitingResponse OrderTransactionStatus = "AWAITING_RESPONSE" // Awaiting a response. OrderTransactionStatusError OrderTransactionStatus = "ERROR" // There was an error while processing the transaction. OrderTransactionStatusFailure OrderTransactionStatus = "FAILURE" // The transaction failed. OrderTransactionStatusPending OrderTransactionStatus = "PENDING" // The transaction is pending. OrderTransactionStatusSuccess OrderTransactionStatus = "SUCCESS" // The transaction succeeded. OrderTransactionStatusUnknown OrderTransactionStatus = "UNKNOWN" // The transaction status is unknown. )
func (OrderTransactionStatus) Validate ¶
func (status OrderTransactionStatus) Validate() error
Validate OrderTransactionStatus
type PageInfo ¶
type PageInfo struct {
EndCursor string `json:"endCursor,omitempty"` // The cursor corresponding to the last node in edges.
HasNextPage bool `json:"hasNextPage"` // Whether there are more pages to fetch following the current page.
HasPreviousPage bool `json:"hasPreviousPage"` // Whether there are any pages prior to the current page.
StartCursor string `json:"startCursor,omitempty"` // The cursor corresponding to the first node in edges.
}
Returns information about pagination in a connection, in accordance with the [Relay specification](https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo). For more information, please read Shopify's [GraphQL Pagination Usage Guide](https://shopify.dev/docs/api/usage/pagination-graphql).
type PaymentInstrument ¶
type PaymentInstrument interface {
*VaultCreditCard | *VaultPaypalBillingAgreement
}
All possible instrument outputs for Payment Mandates.
Requires `read_payment_mandate` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/PaymentInstrument
type PaymentMandate ¶
type PaymentMandate struct {
ID string `json:"id"` // The unique ID of a payment mandate.
PaymentInstrument interface{} `json:"paymentInstrument,omitempty"` // The outputs details of the payment instrument.
}
A payment instrument and the permission the owner of the instrument gives to the merchant to debit it.
Requires `read_payment_mandate` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentMandate
type PaymentSchedule ¶
type PaymentSchedule struct {
ID string `json:"id"` // A globally-unique ID.
PaymentTerms *PaymentTerms `json:"paymentTerms,omitempty"` // The payment terms the payment schedule belongs to.
IssuedAt DateTime `json:"issuedAt"` // Date and time when the invoice is sent.
DueAt DateTime `json:"dueAt"` // Date and time when the payment schedule is due.
CompletedAt DateTime `json:"completedAt"` // Date and time when the payment schedule is paid or fulfilled.
}
Represents the payment schedule for a single payment defined in the payment terms.
Requires `read_payment_terms` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentSchedule
type PaymentScheduleConnection ¶
type PaymentScheduleConnection struct {
Edges []PaymentScheduleEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []PaymentSchedule `json:"nodes,omitempty"` // A list of nodes that are contained in PaymentScheduleEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple PaymentSchedules.
type PaymentScheduleEdge ¶
type PaymentScheduleEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *PaymentSchedule `json:"node"` // The item at the end of `PaymentScheduleEdge`.
}
An auto-generated type which holds one `PaymentSchedule` and a cursor during pagination.
type PaymentSettings ¶
type PaymentSettings struct {
SupportedDigitalWallets []DigitalWallet `json:"supportedDigitalWallets"` // List of the digital wallets which the shop supports.
}
Settings related to payments.
type PaymentTerms ¶
type PaymentTerms struct {
ID string `json:"id"` // A globally-unique ID.
PaymentTermsName string `json:"paymentTermsName"` // The name of the payment terms template used to create the payment terms.
PaymentTermsType PaymentTermsType `json:"paymentTermsType"` // The payment terms template type used to create the payment terms.
TranslatedName string `json:"translatedName"` // The payment terms name, translated into the shop admin's preferred language.
DraftOrder *DraftOrder `json:"draftOrder,omitempty"` // The draft order associated with the payment terms.
Order *Order `json:"order,omitempty"` // The order associated with the payment terms.
DueInDays int `json:"dueInDays"` // Duration of payment terms in days based on the payment terms template used to create the payment terms.
Overdue bool `json:"overdue"` // Whether the payment terms have overdue payment schedules.
PaymentSchedules *PaymentScheduleConnection `json:"paymentSchedules,omitempty"` // List of schedules for the payment terms.
}
Represents the payment terms for an order or draft order.
Requires `read_payment_terms` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTerms
type PaymentTermsTemplate ¶
type PaymentTermsTemplate struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The name of the payment terms template.
TranslatedName string `json:"translatedName"` // The translated payment terms template name.
Description string `json:"description"` // The description of the payment terms template.
DueInDays int `json:"dueInDays"` // The number of days between the issued date and due date if this is the net type of payment terms.
PaymentTermsType PaymentTermsType `json:"paymentTermsType"` // The type of the payment terms template.
}
Represents the payment terms template object.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/PaymentTermsTemplate
type PaymentTermsType ¶
type PaymentTermsType string
The type of a payment terms or a payment terms template.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/PaymentTermsType
const ( PaymentTermsTypeFixed PaymentTermsType = "FIXED" // The payment terms or payment terms template is a fixed type. It's due on a specified date. PaymentTermsTypeFulfillment PaymentTermsType = "FULFILLMENT" // The payment terms or payment terms template is due on fulfillment. PaymentTermsTypeNet PaymentTermsType = "NET" // The payment terms or payment terms template is a net type. It's due a number of days after issue. PaymentTermsTypeReceipt PaymentTermsType = "RECEIPT" // The payment terms or payment terms template is due on receipt. PaymentTermsTypeUnknown PaymentTermsType = "UNKNOWN" // The type of the payment terms or payment terms template is unknown. )
func (PaymentTermsType) Validate ¶
func (s PaymentTermsType) Validate() error
Validate PaymentTermsType
type PaypalExpressSubscriptionsGatewayStatus ¶
type PaypalExpressSubscriptionsGatewayStatus string
Represents a valid PayPal Express subscriptions gateway status.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/PaypalExpressSubscriptionsGatewayStatus
const ( PaypalExpressSubscriptionsGatewayStatusPending PaypalExpressSubscriptionsGatewayStatus = "PENDING" // The status is pending. PaypalExpressSubscriptionsGatewayStatusEnabled PaypalExpressSubscriptionsGatewayStatus = "ENABLED" // The status is enabled. PaypalExpressSubscriptionsGatewayStatusDisabled PaypalExpressSubscriptionsGatewayStatus = "DISABLED" // The status is disabled. )
func (PaypalExpressSubscriptionsGatewayStatus) Validate ¶
func (status PaypalExpressSubscriptionsGatewayStatus) Validate() error
Validate PaypalExpressSubscriptionsGatewayStatus
type Plan ¶
type Plan struct {
PricingDetails *PricingDetails `json:"pricingDetails"` // The plan billed to a shop on a recurring basis.
}
The pricing model for the app subscription.
type PredictedSpendTier ¶
type PredictedSpendTier string
The valid tiers for the predicted spend of a customer with a shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/CustomerPredictedSpendTier
const ( PredictedSpendTierHigh PredictedSpendTier = "HIGH" // The customer's spending is predicted to be in the top spending range for the shop in the following year. PredictedSpendTierMedium PredictedSpendTier = "MEDIUM" // The customer's spending is predicted to be in the normal spending range for the shop in the following year. PredictedSpendTierLow PredictedSpendTier = "LOW" // The customer's spending is predicted to be zero, or in the lowest spending range for the shop in the following year. )
func (PredictedSpendTier) Validate ¶
func (t PredictedSpendTier) Validate() error
Validate PredictedSpendTier
type PriceList ¶
type PriceList struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The unique name of the price list, used as a human-readable identifier.
Catalog *Catalog `json:"catalog,omitempty"` // The catalog that the price list is associated with.
Currency CurrencyCode `json:"currency"` // The currency for fixed prices associated with this price list.
FixedPricesCount int `json:"fixedPricesCount"` // The number of fixed prices on the price list.
Parent *PriceListParent `json:"parent,omitempty"` // Relative adjustments to other prices.
Prices *PriceListPriceConnection `json:"prices,omitempty"` // A list of prices associated with the price list.
QuantityRules *QuantityRuleConnection `json:"quantityRules,omitempty"` // A list of quantity rules associated with the price list, ordered by product variants.
}
Represents a price list, including information about related prices and eligibility rules. You can use price lists to specify either fixed prices or adjusted relative prices that override initial product variant prices. Price lists are applied to customers using context rules, which determine price list eligibility.
For more information on price lists, refer to Support different pricing models (https://shopify.dev/apps/internationalization/product-price-lists).
Requires `read_products` access scope. Also: The user must have a permission to view catalogs.
type PriceListAdjustment ¶
type PriceListAdjustment struct {
Type PriceListAdjustmentType `json:"type"` // The type of price adjustment, such as percentage increase or decrease.
Value float64 `json:"value"` // The value of price adjustment, where positive numbers reduce the prices and negative numbers increase them.
}
The type and value of a price list adjustment.
For more information on price lists, refer to Support different pricing models (https://shopify.dev/apps/internationalization/product-price-lists).
Requires `read_products` access scope.
type PriceListAdjustmentSettings ¶
type PriceListAdjustmentSettings struct {
CompareAtMode PriceListCompareAtMode `json:"compareAtMode"` // The type of price list adjustment setting for compare at price.
}
Represents the settings of price list adjustments.
Requires `read_products` access scope. Also: The user must have a permission to view.
type PriceListAdjustmentType ¶
type PriceListAdjustmentType string // // Represents a percentage price adjustment type (Valid values: `PERCENTAGE_DECREASE`, `PERCENTAGE_INCREASE`).
const ( PriceListAdjustmentTypePercentageDecrease PriceListAdjustmentType = "PERCENTAGE_DECREASE" // Percentage decrease type. Prices will have a lower value. PriceListAdjustmentTypePercentageIncrease PriceListAdjustmentType = "PERCENTAGE_INCREASE" // Percentage increase type. Prices will have a higher value. )
func (PriceListAdjustmentType) Validate ¶
func (adjustmentType PriceListAdjustmentType) Validate() error
Validate PriceListAdjustmentType
type PriceListCompareAtMode ¶
type PriceListCompareAtMode string
const ( PriceListCompareAtModeAdjusted PriceListCompareAtMode = "ADJUSTED" // The compare at price is adjusted based on percentage specified in price list. PriceListCompareAtModeNullify PriceListCompareAtMode = "NULLIFY" // The compare at prices are set to `null` unless explicitly defined by a fixed price value. )
type PriceListParent ¶
type PriceListParent struct {
Adjustment *PriceListAdjustment `json:"adjustment,omitempty"` // A price list adjustment.
Settings *PriceListAdjustmentSettings `json:"settings,omitempty"` // A price list's settings for adjustment.
}
Represents relative adjustments from one price list to other prices. You can use a PriceListParent to specify an adjusted relative price using a percentage-based adjustment. Adjusted prices work in conjunction with exchange rules and rounding.
Adjustment types support both percentage increases and decreases.
Requires `read_products` access scope.
type PriceListPrice ¶
type PriceListPrice struct {
Variant *ProductVariant `json:"variant,omitempty"` // The product variant associated with this price.
CompareAtPrice *MoneyV2 `json:"compareAtPrice,omitempty"` // The compare-at price of the product variant on this price list.
Price *MoneyV2 `json:"price,omitempty"` // The price of the product variant on this price list.
OriginType PriceListPriceOriginType `json:"originType"` // The origin of a price, either fixed (defined on the price list) or relative (calculated using a price list adjustment configuration).
QuantityPriceBreaks *QuantityPriceBreakConnection `json:"quantityPriceBreaks,omitempty"` // A list of quantity breaks for the product variant.
}
Represents information about pricing for a product variant as defined on a price list, such as the price, compare at price, and origin type. You can use a PriceListPrice to specify a fixed price for a specific product variant. For examples, refer to `PriceListFixedPricesAdd` and `PriceList`.
Requires `read_products` access scope. Also: The user must have a permission to view.
type PriceListPriceConnection ¶
type PriceListPriceConnection struct {
Edges []PriceListPriceEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []PriceListPrice `json:"nodes,omitempty"` // A list of nodes that are contained in PriceListPriceEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple PriceListPrices.
type PriceListPriceEdge ¶
type PriceListPriceEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *PriceListPrice `json:"node"` // The item at the end of `PriceListPriceEdge`.
}
An auto-generated type which holds one PriceListPrice and a cursor during pagination.
type PriceListPriceOriginType ¶
type PriceListPriceOriginType string // Represents the origin of a price, either fixed (defined on the price list) or relative (calculated using a price list adjustment configuration). For examples, refer to PriceList.
const ( PriceListPriceOriginTypeFixed PriceListPriceOriginType = "FIXED" PriceListPriceOriginTypeRelative PriceListPriceOriginType = "RELATIVE" )
func (PriceListPriceOriginType) Validate ¶
func (originType PriceListPriceOriginType) Validate() error
Validate PriceListPriceOriginType
type PricingDetails ¶
type PricingDetails struct {
AppRecurringPricing *AppRecurringPricing `json:"appRecurringPricing,omitempty"` // The pricing information about a subscription app. The object contains an interval (the frequency at which the shop is billed for an app subscription) and a price (the amount to be charged to the subscribing shop at each interval).
AppUsagePricing *AppUsagePricing `json:"appUsagePricing,omitempty"` // Defines a usage pricing model for the app subscription. These charges are variable based on how much the merchant uses the app.
Typename string `json:"__typename,omitempty"`
}
The plan billed to a shop on a recurring basis.
type PricingPercentageValue ¶
type PricingPercentageValue struct {
Percentage float64 `json:"percentage"`
}
One type of value given to a customer when a discount is applied to an order. The application of a discount with this value gives the customer the specified percentage off a specified item.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/PricingPercentageValue
type PricingValue ¶
type PricingValue interface {
*MoneyV2 | *PricingPercentageValue
}
The type of value given to a customer when a discount is applied to an order. For example, the application of the discount might give the customer a percentage off a specified item. Alternatively, the application of the discount might give the customer a monetary value in a given currency off an order.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/PricingValue
type Product ¶
type Product struct {
ID string `json:"id"` // A globally-unique ID.
Handle string `json:"handle,omitempty"` // A unique, human-readable string of the product's title. A handle can contain letters, hyphens (-), and numbers, but no spaces. The handle is used in the online store URL for the product.
Title string `json:"title,omitempty"` // The name for the product that displays to customers. The title is used to construct the product's handle. For example, if a product is titled "Black Sunglasses", then the handle is `black-sunglasses`.
ProductType string `json:"productType,omitempty"` // The product type that merchants define.
Status ProductStatus `json:"status"` // The product status, which controls visibility across all sales channels.
PriceRangeV2 *ProductPriceRangeV2 `json:"priceRangeV2,omitempty"` // The minimum and maximum prices of a product, expressed in decimal numbers. For example, if the product is priced between $10.00 and $50.00, then the price range is $10.00 - $50.00.
Variants *ProductVariantConnection `json:"variants,omitempty"` // A list of variants associated with the product.
VariantsCount *Count `json:"variantsCount,omitempty"` // The number of variants that are associated with the product.
Vendor string `json:"vendor,omitempty"` // The name of the product's vendor.
PublishedOnCurrentPublication bool `json:"publishedOnCurrentPublication,omitempty"` // Whether the resource is published to the app's publication. For example, the resource might be published to the app's online store channel.
AvailablePublicationsCount *Count `json:"availablePublicationsCount,omitempty"` // The number of publications that a resource is published to, without feedback errors.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
Media *MediaConnection `json:"media,omitempty"` // The media associated with the product. Valid media are images, 3D models, videos.
MediaCount *Count `json:"mediaCount,omitempty"` // The total count of media that's associated with a product.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
TracksInventory bool `json:"tracksInventory"` // Whether inventory tracking has been enabled for the product.
TotalInventory int `json:"totalInventory"` // The quantity of inventory that's in stock.
Translations []Translation `json:"translations"` // The published translations associated with the resource.
Tags []string `json:"tags"` // A comma-separated list of searchable keywords that are associated with the product. For example, a merchant might apply the sports and summer tags to products that are associated with sportwear for summer. Updating tags overwrites any existing tags that were previously added to the product. To add new tags without overwriting existing tags, use the `tagsAdd` mutation.
PublishedAt DateTime `json:"publishedAt"` // The date and time when the product was published to the online store.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the product was last modified. A product's `updatedAt` value can change for different reasons. For example, if an order is placed for a product that has inventory tracking set up, then the inventory adjustment is counted as an update.
}
ShopifyProduct represents a product from Shopify
type ProductBundleComponent ¶
type ProductBundleComponent struct {
ComponentProduct *Product `json:"componentProduct,omitempty"` // The product that's related as a component.
ComponentVariants *ProductVariantConnection `json:"componentVariants,omitempty"` // The list of products' variants that are components.
ComponentVariantsCount *Count `json:"componentVariantsCount,omitempty"` // The number of component variants for the product component.
OptionSelections []ProductBundleComponentOptionSelection `json:"optionSelections"` // The options in the parent and the component options they're connected to, along with the chosen option values that appear in the bundle.
Quantity int `json:"quantity"` // The quantity of the component product set for this bundle line. It will be null if there's a quantityOption present.
QuantityOption *ProductBundleComponentQuantityOption `json:"quantityOption,omitempty"` // The quantity as option of the component product. It will be null if there's a quantity set.
}
The product's component information.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductBundleComponent
type ProductBundleComponentConnection ¶
type ProductBundleComponentConnection struct {
Edges []ProductBundleComponentEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ProductBundleComponent `json:"nodes,omitempty"` // A list of nodes that are contained in ProductBundleComponentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ProductBundleComponents.
type ProductBundleComponentEdge ¶
type ProductBundleComponentEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ProductBundleComponent `json:"node,omitempty"` // The item at the end of ProductBundleComponentEdge.
}
An auto-generated type which holds one ProductBundleComponent and a cursor during pagination.
type ProductBundleComponentOptionSelection ¶
type ProductBundleComponentOptionSelection struct {
ComponentOption *ProductOption `json:"componentOption,omitempty"` // The option that existed on the component product prior to the fixed bundle creation.
ParentOption *ProductOption `json:"parentOption,omitempty"` // The option that was created on the parent product.
Values []ProductBundleComponentOptionSelectionValue `json:"values"` // The component option values that are actively selected for this relationship.
}
A relationship between a component option and a parent option.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductBundleComponentOptionSelection
type ProductBundleComponentOptionSelectionStatus ¶
type ProductBundleComponentOptionSelectionStatus string
The status of a component option value related to a bundle.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ProductBundleComponentOptionSelectionStatus
const ( ProductBundleComponentOptionSelectionStatusDeselected ProductBundleComponentOptionSelectionStatus = "DESELECTED" // The component option value is not selected as sellable in the bundle. ProductBundleComponentOptionSelectionStatusNew ProductBundleComponentOptionSelectionStatus = "NEW" // The component option value was not initially selected, but is now available for the bundle. ProductBundleComponentOptionSelectionStatusSelected ProductBundleComponentOptionSelectionStatus = "SELECTED" // The component option value is selected as sellable in the bundle. )
func (ProductBundleComponentOptionSelectionStatus) Validate ¶
func (s ProductBundleComponentOptionSelectionStatus) Validate() error
Validate ProductBundleComponentOptionSelectionStatus
type ProductBundleComponentOptionSelectionValue ¶
type ProductBundleComponentOptionSelectionValue struct {
Value string `json:"value"` // The value of the option.
SelectionStatus ProductBundleComponentOptionSelectionStatus `json:"selectionStatus"` // Selection status of the option.
}
A component option value related to a bundle line.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductBundleComponentOptionSelectionValue
type ProductBundleComponentQuantityOption ¶
type ProductBundleComponentQuantityOption struct {
Name string `json:"name"` // The name of the option value.
ParentOption *ProductOption `json:"parentOption,omitempty"` // The option that was created on the parent product.
Values []ProductBundleComponentQuantityOptionValue `json:"values"` // The quantity values of the option.
}
A quantity option related to a bundle.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductBundleComponentQuantityOption
type ProductBundleComponentQuantityOptionValue ¶
type ProductBundleComponentQuantityOptionValue struct {
Name string `json:"name"` // The name of the option value.
Quantity int `json:"quantity"` // The quantity of the option value.
}
A quantity option value related to a componentized product.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductBundleComponentQuantityOptionValue
type ProductConnection ¶
type ProductConnection struct {
Edges []ProductEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Product `json:"nodes,omitempty"` // A list of nodes that are contained in ProductEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Products.
type ProductEdge ¶
type ProductFeed ¶
type ProductFeed struct {
ID string `json:"id"` // A globally-unique ID.
Country CountryCode `json:"country"` // The country of the product feed.
Language LanguageCode `json:"language"` // The language of the product feed.
Status ProductFeedStatus `json:"status"` // The status of the product feed.
}
A product feed.
Requires `read_product_listings` access scope.
type ProductFeedStatus ¶
type ProductFeedStatus string
The valid values for the status of product feed.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ProductFeedStatus
const ( ProductFeedStatusActive ProductFeedStatus = "ACTIVE" // The product feed is active. ProductFeedStatusInactive ProductFeedStatus = "INACTIVE" // The product feed is inactive. )
func (ProductFeedStatus) Validate ¶
func (status ProductFeedStatus) Validate() error
Validate ProductFeedStatus
type ProductOption ¶
type ProductOption struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The product option’s name.
Position int `json:"position"` // The product option's position.
Values []string `json:"values"` // The corresponding value to the product option name.
OptionValues []ProductOptionValue `json:"optionValues"` // Similar to values, option_values returns all the corresponding option value objects to the product option, including values not assigned to any variants.
LinkedMetafield *LinkedMetafield `json:"linkedMetafield,omitempty"` // The metafield identifier linked to this option.
Translations []Translation `json:"translations"` // The published translations associated with the resource.
}
The product property names. For example, "Size", "Color", and "Material". Variants are selected based on permutations of these options. The limit for each product property name is 255 characters.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption
type ProductOptionValue ¶
type ProductOptionValue struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The name of the product option value.
LinkedMetafieldValue string `json:"linkedMetafieldValue"` // The value of the linked metafield.
HasVariants bool `json:"hasVariants"` // Whether the product option value has any linked variants.
Swatch *ProductOptionValueSwatch `json:"swatch"` // The swatch associated with the product option value.
Translations []Translation `json:"translations"` // The published translations associated with the resource.
}
The product option value names. For example, "Red", "Blue", and "Green" for a "Color" option.
Requires `read_products` access scope.
type ProductOptionValueSwatch ¶
type ProductOptionValueSwatch struct {
Color Color `json:"color"` // The color representation of the swatch.
Image *MediaImage `json:"image"` // An image representation of the swatch.
}
A swatch associated with a product option value.
Requires `read_products` access scope.
type ProductPriceRangeV2 ¶
type ProductPriceRangeV2 struct {
MaxVariantPrice MoneyV2 `json:"maxVariantPrice"` // The highest variant's price.
MinVariantPrice MoneyV2 `json:"minVariantPrice"` // The lowest variant's price.
}
The price range of the product. Requires `read_products` access scope.
type ProductStatus ¶
type ProductStatus string // The possible product statuses (Valid values: `ACTIVE`, `ARCHIVED`, `DRAFT`).
const ( ProductStatusActive ProductStatus = "ACTIVE" // The product is active. ProductStatusArchived ProductStatus = "ARCHIVED" // The product is archived. ProductStatusDraft ProductStatus = "DRAFT" // The product is in draft. )
type ProductVariant ¶
type ProductVariant struct {
ID string `json:"id"` // A globally-unique ID.
Image *Image `json:"image"` // The featured image for the variant.
AvailableForSale bool `json:"availableForSale"` // Whether the product variant is available for sale.
SKU string `json:"sku"` // A case-sensitive identifier for the product variant in the shop. Required in order to connect to a fulfillment service.
Barcode string `json:"barcode"` // The value of the barcode associated with the product.
CompareAtPrice string `json:"compareAtPrice"` // The compare-at price of the variant in the default shop currency.
ContextualPricing *ProductVariantContextualPricing `json:"contextualPricing"` // The pricing that applies for a customer in a given context. As of API version 2025-04, only active markets are considered in the price resolution.
CreatedAt DateTime `json:"createdAt"` // The date and time when the variant was created.
DefaultCursor string `json:"defaultCursor"` // A default cursor that returns the single next record, sorted ascending by ID.
DeliveryProfile interface{} `json:"deliveryProfile,omitempty"` // The delivery profile for the variant.
DisplayName string `json:"displayName"` // Display name of the variant, based on product's title + variant's title.
Events *EventConnection `json:"events,omitempty"` // The paginated list of events associated with the host subject.
InventoryItem *InventoryItem `json:"inventoryItem,omitempty"` // The inventory item, which is used to query for inventory information.
InventoryPolicy ProductVariantInventoryPolicy `json:"inventoryPolicy"` // Whether customers are allowed to place an order for the product variant when it's out of stock.
InventoryQuantity int `json:"inventoryQuantity"` // The total sellable quantity of the variant.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
Media *MediaConnection `json:"media,omitempty"` // The media associated with the product variant.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
Position int `json:"position"` // The order of the product variant in the list of product variants. The first position in the list is 1.
Price Money `json:"price"` // The price of the product variant in the default shop currency.
Product *Product `json:"product,omitempty"` // The product that this variant belongs to.
ProductVariantComponents *ProductVariantComponentConnection `json:"productVariantComponents,omitempty"` // A list of the product variant components.
RequiresComponents bool `json:"requiresComponents"` // Whether a product variant requires components. The default value is false. If true, then the product variant can only be purchased as a parent bundle with components and it will be omitted from channels that don't support bundles.
SelectedOptions []SelectedOption `json:"selectedOptions"` // List of product options applied to the variant.
SellableOnlineQuantity int `json:"sellableOnlineQuantity"` // The total sellable quantity of the variant for online channels. This doesn't represent the total available inventory or capture limitations based on customer location.
SellingPlanGroups *SellingPlanGroupConnection `json:"sellingPlanGroups,omitempty"` // A list of all selling plan groups defined in the current shop associated with the product variant.
SellingPlanGroupsCount *Count `json:"sellingPlanGroupsCount,omitempty"` // Count of selling plan groups associated with the product variant.
Taxable bool `json:"taxable"` // Whether a tax is charged when the product variant is sold.
TaxCode string `json:"taxCode"` // The tax code for the product variant.
Translations []Translation `json:"translations"` // The published translations associated with the resource.
UnitPriceMeasurement *UnitPriceMeasurement `json:"unitPriceMeasurement,omitempty"` // The unit price measurement for the variant.
UpdatedAt DateTime `json:"updatedAt"` // The date and time (ISO 8601 format) when the product variant was last modified.
}
Represents a product variant.
Requires `read_products` access scope.
type ProductVariantComponent ¶
type ProductVariantComponent struct {
ID string `json:"id"` // A globally-unique ID.
ProductVariant *ProductVariant `json:"productVariant,omitempty"` // The product variant associated with the component.
Quantity int `json:"quantity"` // The required quantity of the component.
}
A product variant component associated with a product variant.
Requires `read_products` access scope.
https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariantComponent
type ProductVariantComponentConnection ¶
type ProductVariantComponentConnection struct {
Edges []ProductVariantComponentEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ProductVariantComponent `json:"nodes,omitempty"` // A list of nodes that are contained in ProductVariantComponentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ProductVariantComponents.
type ProductVariantComponentEdge ¶
type ProductVariantComponentEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ProductVariantComponent `json:"node"` // The item at the end of `ProductVariantComponentEdge`.
}
An auto-generated type which holds one `ProductVariantComponent` and a cursor during pagination.
type ProductVariantConnection ¶
type ProductVariantConnection struct {
Edges []ProductVariantEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ProductVariant `json:"nodes,omitempty"` // A list of nodes that are contained in ProductVariantEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ProductVariants.
type ProductVariantContextualPricing ¶
type ProductVariantContextualPricing struct {
CompareAtPrice *MoneyV2 `json:"compareAtPrice,omitempty"` // The final compare-at price after all adjustments are applied.
Price *MoneyV2 `json:"price,omitempty"` // The final price after all adjustments are applied.
QuantityPriceBreaks *QuantityPriceBreakConnection `json:"quantityPriceBreaks,omitempty"` // A list of quantity breaks for the product variant.
QuantityRule *QuantityRule `json:"quantityRule,omitempty"` // The quantity rule applied for a given context.
}
The price of a product variant in a specific country. Prices vary between countries.
Requires `read_products` access scope.
type ProductVariantEdge ¶
type ProductVariantEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ProductVariant `json:"node"` // The item at the end of `ProductVariantEdge`.
}
An auto-generated type which holds one `ProductVariant` and a cursor during pagination.
type ProductVariantInventoryPolicy ¶
type ProductVariantInventoryPolicy string // The valid values for the inventory policy of a product variant once it is out of stock (Valid values: `CONTINUE`, `DENY`).
type Publication ¶
type Publication struct {
ID string `json:"id"` // A globally-unique ID.
AutoPublish bool `json:"autoPublish"` // Whether new products are automatically published to this publication.
Catalog *Catalog `json:"catalog,omitempty"` // The catalog associated with the publication.
CollectionPublicationsV3 *ResourcePublicationConnection `json:"collectionPublicationsV3,omitempty"` // The collection publications for the list of collections published to the publication.
Collections *CollectionConnection `json:"collections,omitempty"` // The list of collections published to the publication.
HasCollection bool `json:"hasCollection"` // Whether the collection is available to the publication.
Operation interface{} `json:"operation,omitempty"` // A background operation associated with this publication.
ProductPublicationsV3 *ResourcePublicationConnection `json:"productPublicationsV3,omitempty"` // The product publications for the list of products published to the publication.
Products *ProductConnection `json:"products,omitempty"` // The list of products published to the publication.
SupportsFuturePublishing bool `json:"supportsFuturePublishing"` // Whether the publication supports future publishing.
}
A publication is a group of products and collections that is published to an app.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication
type PublicationConnection ¶
type PublicationConnection struct {
Edges []PublicationEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Publication `json:"nodes,omitempty"` // A list of nodes that are contained in PublicationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Publications.
type PublicationEdge ¶
type PublicationEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Publication `json:"node,omitempty"` // The item at the end of PublicationEdge.
}
An auto-generated type which holds one Publication and a cursor during pagination.
type PublicationOperation ¶
type PublicationOperation interface {
*AddAllProductsOperation | *CatalogCsvOperation | *PublicationResourceOperation
}
The possible types of publication operations.
Requires The user must have `read_products` or `read_publications` access.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/PublicationOperation
type PublicationResourceOperation ¶
type PublicationResourceOperation struct {
ID string `json:"id"` // A globally-unique ID.
Status ResourceOperationStatus `json:"status"` // The status of this operation.
ProcessedRowCount int `json:"processedRowCount"` // The count of processed rows, summing imported, failed, and skipped rows.
RowCount *RowCount `json:"rowCount,omitempty"` // Represents a rows objects within this background operation.
}
A bulk update operation on a publication.
Requires `read_products` access scope or `read_publications` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/PublicationResourceOperation
type Publishable ¶
type Publishable struct {
AvailablePublicationsCount *Count `json:"availablePublicationsCount,omitempty"` // The number of publications that a resource is published to, without feedback errors.
PublishedOnCurrentPublication bool `json:"publishedOnCurrentPublication"` // Whether the resource is published to the app's publication. For example, the resource might be published to the app's online store channel.
PublishedOnPublication bool `json:"publishedOnPublication"` // Whether the resource is published to a specified publication.
ResourcePublicationsCount *Count `json:"resourcePublicationsCount,omitempty"` // The number of publications that a resource is published to, without feedback errors.
ResourcePublications *ResourcePublicationConnection `json:"resourcePublications,omitempty"` // The list of resources that are published to a publication.
ResourcePublicationsV2 *ResourcePublicationV2Connection `json:"resourcePublicationsV2,omitempty"` // The list of resources that are either published or staged to be published to a publication.
UnpublishedPublications *PublicationConnection `json:"unpublishedPublications,omitempty"` // The list of publications that the resource isn't published to.
}
Represents a resource that can be published to a channel. A publishable resource can be either a Product or Collection.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Publishable
type PurchasingCompany ¶
type PurchasingCompany struct {
Company *Company `json:"company,omitempty"` // The company associated to the order or draft order.
Contact *CompanyContact `json:"contact,omitempty"` // The company contact associated to the order or draft order.
Location *CompanyLocation `json:"location,omitempty"` // The company location associated to the order or draft order.
}
Represents information about the purchasing company for the order or draft order.
Requires The user must have access to orders or draft orders.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/PurchasingCompany
type PurchasingEntity ¶
type PurchasingEntity interface {
*Customer | *PurchasingCompany
}
Represents information about the purchasing entity for the order or draft order.
Requires The user must have access to orders or draft orders.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/PurchasingEntity
type QuantityPriceBreak ¶
type QuantityPriceBreak struct {
ID string `json:"id"` // A globally-unique ID.
Variant *ProductVariant `json:"variant,omitempty"` // The product variant associated with this quantity break.
MinimumQuantity int `json:"minimumQuantity"` // Minimum quantity required to reach new quantity break price.
Price *MoneyV2 `json:"price,omitempty"` // The price of variant after reaching the minimum quanity.
PriceList *PriceList `json:"priceList,omitempty"` // The price list associated with this quantity break.
}
Quantity price breaks lets you offer different rates that are based on the amount of a specific variant being ordered.
Requires `read_products` access scope. Also: The shop has the `international_price_overrides` or Markets or B2B features enabled.
type QuantityPriceBreakConnection ¶
type QuantityPriceBreakConnection struct {
Edges []QuantityPriceBreakEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []QuantityPriceBreak `json:"nodes,omitempty"` // A list of nodes that are contained in QuantityPriceBreakEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple QuantityPriceBreaks.
type QuantityPriceBreakEdge ¶
type QuantityPriceBreakEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *QuantityPriceBreak `json:"node"` // The item at the end of `QuantityPriceBreak`.
}
An auto-generated type which holds one QuantityPriceBreak and a cursor during pagination.
type QuantityRule ¶
type QuantityRule struct {
Increment int `json:"increment"` // The value that specifies the quantity increment between minimum and maximum of the rule. Only quantities divisible by this value will be considered valid. The increment must be lower than or equal to the minimum and the maximum, and both minimum and maximum must be divisible by this value.
IsDefault bool `json:"isDefault"` // Whether the quantity rule fields match one increment, one minimum and no maximum.
Maximum int `json:"maximum"` // An optional value that defines the highest allowed quantity purchased by the customer. If defined, maximum must be lower than or equal to the minimum and must be a multiple of the increment.
Minimum int `json:"minimum"` // The value that defines the lowest allowed quantity purchased by the customer. The minimum must be a multiple of the quantity rule's increment.
OriginType QuantityRuleOriginType `json:"originType"` // Whether the values of the quantity rule were explicitly set.
ProductVariant *ProductVariant `json:"productVariant,omitempty"` // The product variant for which the quantity rule is applied.
}
The quantity rule for the product variant in a given context.
Requires `read_products` access scope.
type QuantityRuleConnection ¶
type QuantityRuleConnection struct {
Edges []QuantityRuleEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []QuantityRule `json:"nodes,omitempty"` // A list of nodes that are contained in QuantityRuleEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple QuantityRules.
type QuantityRuleEdge ¶
type QuantityRuleEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *QuantityRule `json:"node"` // The item at the end of `QuantityRuleEdge`.
}
An auto-generated type which holds one QuantityRule and a cursor during pagination.
type QuantityRuleOriginType ¶
type QuantityRuleOriginType string
The origin of quantity rule on a price list.
const ( QuantityRuleOriginTypeFixed QuantityRuleOriginType = "FIXED" QuantityRuleOriginTypeRelative QuantityRuleOriginType = "RELATIVE" )
func (QuantityRuleOriginType) Validate ¶
func (originType QuantityRuleOriginType) Validate() error
Validate QuantityRuleOriginType
type Refund ¶
type Refund struct {
ID string `json:"id"` // A globally-unique ID.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
Order *Order `json:"order,omitempty"` // The order associated with the refund.
OrderAdjustments *OrderAdjustmentConnection `json:"orderAdjustments,omitempty"` // The order adjustments that are attached with the refund.
Return *Return `json:"return,omitempty"` // The return associated with the refund.
RefundLineItems *RefundLineItemConnection `json:"refundLineItems,omitempty"` // The `RefundLineItem` resources attached to the refund.
RefundShippingLines *RefundShippingLineConnection `json:"refundShippingLines,omitempty"` // The `RefundShippingLine` resources attached to the refund.
TotalRefundedSet *MoneyBag `json:"totalRefundedSet,omitempty"` // The total amount across all transactions for the refund, in shop and presentment currencies.
Duties []RefundDuty `json:"duties"` // A list of the refunded duties as part of this refund.
Transactions *OrderTransactionConnection `json:"transactions,omitempty"` // The transactions associated with the refund.
Note string `json:"note"` // The optional note associated with the refund.
StaffMember *StaffMember `json:"staffMember,omitempty"` // The staff member who created the refund.
CreatedAt DateTime `json:"createdAt"` // The date and time when the refund was created.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the refund was updated.
}
The record of the line items and transactions that were refunded to a customer, along with restocking instructions for refunded line items.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Refund
type RefundConnection ¶
type RefundConnection struct {
Edges []RefundEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Refund `json:"nodes,omitempty"` // A list of nodes that are contained in RefundEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Refunds.
type RefundDuty ¶
type RefundDuty struct {
AmountSet *MoneyBag `json:"amountSet,omitempty"` // The amount of a refunded duty in shop and presentment currencies.
OriginalDuty *Duty `json:"originalDuty,omitempty"` // The duty associated with this refunded duty.
}
Represents a refunded duty.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundDuty
type RefundEdge ¶
type RefundEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Refund `json:"node"` // The item at the end of `RefundEdge`.
}
An auto-generated type which holds one `Refund` and a cursor during pagination.
type RefundLineItem ¶
type RefundLineItem struct {
ID string `json:"id"` // A globally-unique ID.
LineItem *LineItem `json:"lineItem,omitempty"` // The `LineItem` resource associated to the refunded line item.
Location *Location `json:"location,omitempty"` // The inventory restock location.
Restocked bool `json:"restocked"` // Whether the refunded line item was restocked. Not applicable in the context of a SuggestedRefund.
RestockType RefundLineItemRestockType `json:"restockType"` // The type of restock for the refunded line item.
Quantity int `json:"quantity"` // The quantity of a refunded line item.
PriceSet *MoneyBag `json:"priceSet,omitempty"` // The price of a refunded line item in shop and presentment currencies.
TotalTaxSet *MoneyBag `json:"totalTaxSet,omitempty"` // The total tax charged on a refunded line item in shop and presentment currencies.
SubtotalSet *MoneyBag `json:"subtotalSet,omitempty"` // The subtotal price of a refunded line item in shop and presentment currencies.
}
A line item that's included in a refund.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundLineItem
type RefundLineItemConnection ¶
type RefundLineItemConnection struct {
Edges []RefundLineItemEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []RefundLineItem `json:"nodes,omitempty"` // A list of nodes that are contained in RefundLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple RefundLineItems.
type RefundLineItemEdge ¶
type RefundLineItemEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *RefundLineItem `json:"node"` // The item at the end of `RefundLineItemEdge`.
}
An auto-generated type which holds one `RefundLineItem` and a cursor during pagination.
type RefundLineItemRestockType ¶
type RefundLineItemRestockType string
The type of restock performed for a particular refund line item.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/RefundLineItemRestockType
const ( RefundLineItemRestockTypeCancel RefundLineItemRestockType = "CANCEL" // The refund line item was canceled. Use this when restocking unfulfilled line items. RefundLineItemRestockTypeLegacyRestock RefundLineItemRestockType = "LEGACY_RESTOCK" // (Deprecated) The refund line item was restocked, without specifically beingidentified as a return or cancelation. This value is not accepted when creating new refunds. RefundLineItemRestockTypeNoRestock RefundLineItemRestockType = "NO_RESTOCK" // Refund line item was not restocked. RefundLineItemRestockTypeReturn RefundLineItemRestockType = "RETURN" // The refund line item was returned. Use this when restocking line items that were fulfilled. )
func (RefundLineItemRestockType) Validate ¶
func (t RefundLineItemRestockType) Validate() error
Validate RefundLineItemRestockType
type RefundShippingLine ¶
type RefundShippingLine struct {
ID string `json:"id"` // A globally-unique ID.
ShippingLine *ShippingLine `json:"shippingLine,omitempty"` // The `ShippingLine` resource associated to the refunded shipping line item.
TaxAmountSet *MoneyBag `json:"taxAmountSet,omitempty"` // The tax amount of the refund shipping line in shop and presentment currencies.
SubtotalAmountSet *MoneyBag `json:"subtotalAmountSet,omitempty"` // The subtotal amount of the refund shipping line in shop and presentment currencies.
}
A shipping line item that's included in a refund.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/RefundShippingLine
type RefundShippingLineConnection ¶
type RefundShippingLineConnection struct {
Edges []RefundShippingLineEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []RefundShippingLine `json:"nodes,omitempty"` // A list of nodes that are contained in RefundShippingLineEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple RefundShippingLines.
type RefundShippingLineEdge ¶
type RefundShippingLineEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *RefundShippingLine `json:"node"` // The item at the end of `RefundShippingLineEdge`.
}
An auto-generated type which holds one `RefundShippingLine` and a cursor during pagination.
type ResourceAlert ¶
type ResourceAlert struct {
Title string `json:"title"` // The primary text in the alert that includes information or describes the problem.
Icon ResourceAlertIcon `json:"icon"` // An icon that's optionally displayed with the alert.
Content string `json:"content"` // The secondary text in the alert that includes further information or instructions about how to solve a problem.
DismissableHandle string `json:"dismissableHandle"` // Unique identifier that appears when an alert is manually closed by the merchant. Most alerts can't be manually closed.
Severity ResourceAlertSeverity `json:"severity"` // Indication of how important the alert is.
Actions []ResourceAlertAction `json:"actions"` // Buttons in the alert that link to related information. For example, Edit variants.
}
An alert message that appears in the Shopify admin about a problem with a store resource, with 1 or more actions to take. For example, you could use an alert to indicate that you're not charging taxes on some product variants. They can optionally have a specific icon and be dismissed by merchants.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceAlert
type ResourceAlertAction ¶
type ResourceAlertAction struct {
Title string `json:"title"` // The text for the button in the alert. For example, Edit variants.
Show string `json:"show"` // Resource for the action to show.
Primary bool `json:"primary"` // Whether the action appears as a button or as a link.
URL URL `json:"url"` // The target URL that the button links to.
}
An action associated to a resource alert, such as editing variants.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceAlertAction
type ResourceAlertIcon ¶
type ResourceAlertIcon string
The available icons for resource alerts.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ResourceAlertIcon
const ( ResourceAlertIconCheckmarkCircle ResourceAlertIcon = "CHECKMARK_CIRCLE" // A checkmark inside a circle. ResourceAlertIconInformationCircle ResourceAlertIcon = "INFORMATION_CIRCLE" // A lowercase `i` inside a circle. )
func (ResourceAlertIcon) Validate ¶
func (icon ResourceAlertIcon) Validate() error
Validate ResourceAlertIcon
type ResourceAlertSeverity ¶
type ResourceAlertSeverity string
The possible severity levels for a resource alert.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ResourceAlertSeverity
const ( ResourceAlertSeverityCritical ResourceAlertSeverity = "CRITICAL" // Indicates a critical alert. For example, a blocked app. ResourceAlertSeverityDefault ResourceAlertSeverity = "DEFAULT" // Indicates a neutral alert. For example, an accepted dispute. ResourceAlertSeverityInfo ResourceAlertSeverity = "INFO" // Indicates an informative alert. For example, an escalated dispute. ResourceAlertSeveritySuccess ResourceAlertSeverity = "SUCCESS" // Indicates a success alert. For example, a winning a dispute. ResourceAlertSeverityWarning ResourceAlertSeverity = "WARNING" // Indicates an informative alert. For example, a new dispute. ResourceAlertSeverityError ResourceAlertSeverity = "ERROR" // `ERROR` severity is being deprecated in favour of `WARNING` or `CRITICAL` instead. )
func (ResourceAlertSeverity) Validate ¶
func (s ResourceAlertSeverity) Validate() error
Validate ResourceAlertSeverity
type ResourceFeedback ¶
type ResourceFeedback struct {
Details []AppFeedback `json:"details"` // List of AppFeedback detailing issues regarding a resource.
Summary string `json:"summary"` // Summary of resource feedback pertaining to the resource.
}
Represents feedback from apps about a resource, and the steps required to set up the apps on the shop.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback
type ResourceFeedbackState ¶
type ResourceFeedbackState string
The state of the resource feedback.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ResourceFeedbackState
const ( ResourceFeedbackStateAccepted ResourceFeedbackState = "ACCEPTED" // No action required from merchant. ResourceFeedbackStateRequiresAction ResourceFeedbackState = "REQUIRES_ACTION" // The merchant needs to resolve an issue with the resource. )
func (ResourceFeedbackState) Validate ¶
func (state ResourceFeedbackState) Validate() error
Validate ResourceFeedbackState
type ResourceOperation ¶
type ResourceOperation struct {
ID string `json:"id"` // A globally-unique ID.
Status ResourceOperationStatus `json:"status"` // The status of this operation.
ProcessedRowCount int `json:"processedRowCount"` // The count of processed rows, summing imported, failed, and skipped rows.
RowCount *RowCount `json:"rowCount,omitempty"` // Represents a rows objects within this background operation.
}
Represents a merchandising background operation interface.
Requires `read_products` or `read_publications` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/ResourceOperation
type ResourceOperationStatus ¶
type ResourceOperationStatus string
Represents the state of this catalog operation.
const ( ResourceOperationStatusCreated ResourceOperationStatus = "CREATED" // Operation is created. ResourceOperationStatusActive ResourceOperationStatus = "ACTIVE" // Operation is currently running. ResourceOperationStatusComplete ResourceOperationStatus = "COMPLETE" // Operation is complete. )
func (ResourceOperationStatus) Validate ¶
func (status ResourceOperationStatus) Validate() error
Validate ResourceOperationStatus
type ResourcePublication ¶
type ResourcePublication struct {
Publishable *Publishable `json:"publishable"` // The resource published to the publication.
IsPublished bool `json:"isPublished"` // Whether the resource publication is published. Also returns true if the resource publication is scheduled to be published. If false, then the resource publication is neither published nor scheduled to be published.
Publication *Publication `json:"publication,omitempty"` // The publication the resource publication is published to.
PublishDate DateTime `json:"publishDate"` // The date that the resource publication was or is going to be published to the publication. If the product isn't published, then this field returns an epoch timestamp.
}
A resource publication represents information about the publication of a resource. An instance of `ResourcePublication`, unlike `ResourcePublicationV2`, can be neither published or scheduled to be published.
See ResourcePublicationV2(https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourcePublicationV2) for more context.
Reference: https://shopify.dev/api/admin-graphql/latest/objects/ResourcePublication
type ResourcePublicationConnection ¶
type ResourcePublicationConnection struct {
Edges []ResourcePublicationEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ResourcePublication `json:"nodes,omitempty"` // A list of nodes that are contained in ResourcePublicationEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ResourcePublications.
type ResourcePublicationEdge ¶
type ResourcePublicationEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ResourcePublication `json:"node,omitempty"` // The item at the end of ResourcePublicationEdge.
}
An auto-generated type which holds one ResourcePublication and a cursor during pagination.
type ResourcePublicationV2 ¶
type ResourcePublicationV2 struct {
Publishable *Publishable `json:"publishable"` // The resource published to the publication.
IsPublished bool `json:"isPublished"` // Whether the resource publication is published. Also returns true if the resource publication is scheduled to be published. If false, then the resource publication is neither published nor scheduled to be published.
Publication *Publication `json:"publication,omitempty"` // The publication the resource publication is published to.
PublishDate DateTime `json:"publishDate"` // The date that the resource publication was or is going to be published to the publication. If the product isn't published, then this field returns an epoch timestamp.
}
A resource publication represents information about the publication of a resource. An instance of `ResourcePublication`, unlike `ResourcePublicationV2`, can be neither published or scheduled to be published.
See ResourcePublication(https://shopify.dev/api/admin-graphql/latest/objects/ResourcePublication) for more context.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourcePublicationV2
type ResourcePublicationV2Connection ¶
type ResourcePublicationV2Connection struct {
Edges []ResourcePublicationV2Edge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ResourcePublicationV2 `json:"nodes,omitempty"` // A list of nodes that are contained in ResourcePublicationV2Edge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ResourcePublicationV2s.
type ResourcePublicationV2Edge ¶
type ResourcePublicationV2Edge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ResourcePublicationV2 `json:"node,omitempty"` // The item at the end of ResourcePublicationV2Edge.
}
An auto-generated type which holds one ResourcePublicationV2 and a cursor during pagination.
type Return ¶
type Return struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The name of the return.
Status ReturnStatus `json:"status"` // The status of the return.
Order *Order `json:"order,omitempty"` // The order that the return belongs to.
Decline *ReturnDecline `json:"decline,omitempty"` // Additional information about the declined return.
ExchangeLineItems *ExchangeLineItemConnection `json:"exchangeLineItems,omitempty"` // The exchange line items attached to the return.
ReturnLineItems *ReturnLineItemTypeConnection `json:"returnLineItems,omitempty"` // The return line items attached to the return.
ReturnShippingFees []ReturnShippingFee `json:"returnShippingFees"` // The return shipping fees for the return.
SuggestedRefund *SuggestedReturnRefund `json:"suggestedRefund,omitempty"` // A suggested refund for the return.
Refunds *RefundConnection `json:"refunds,omitempty"` // The list of refunds associated with the return.
ReverseFulfillmentOrders *ReverseFulfillmentOrderConnection `json:"reverseFulfillmentOrders,omitempty"` // The list of reverse fulfillment orders for the return.
TotalQuantity int `json:"totalQuantity"` // The sum of all return line item quantities for the return.
}
Represents a return.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Return
type ReturnConnection ¶
type ReturnConnection struct {
Edges []ReturnEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Return `json:"nodes,omitempty"` // A list of nodes that are contained in ReturnEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Returns.
type ReturnDecline ¶
type ReturnDecline struct {
Reason ReturnDeclineReason `json:"reason"` // The reason the customer's return request was declined.
Note string `json:"note"` // The notification message sent to the customer about their declined return request. Maximum length: 500 characters.
}
Additional information about why a merchant declined the customer's return request.
Requires `read_returns` access scope or `read_marketplace_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ReturnDecline
type ReturnDeclineReason ¶
type ReturnDeclineReason string
The reason why the merchant declined a customer's return request.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ReturnDeclineReason
const ( ReturnDeclineReasonFinalSale ReturnDeclineReason = "FINAL_SALE" // The return contains final sale items. ReturnDeclineReasonOther ReturnDeclineReason = "OTHER" // The return is declined for another reason. ReturnDeclineReasonReturnPeriodEnded ReturnDeclineReason = "RETURN_PERIOD_ENDED" // The return period has ended. )
func (ReturnDeclineReason) Validate ¶
func (r ReturnDeclineReason) Validate() error
Validate ReturnDeclineReason
type ReturnEdge ¶
type ReturnEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Return `json:"node"` // The item at the end of `ReturnEdge`.
}
An auto-generated type which holds one `Return` and a cursor during pagination.
type ReturnLineItemType ¶
type ReturnLineItemType struct {
ID string `json:"id"` // A globally-unique ID.
Quantity int `json:"quantity"` // The quantity being returned.
RefundableQuantity int `json:"refundableQuantity"` // The quantity that can be refunded.
RefundedQuantity int `json:"refundedQuantity"` // The quantity that was refunded.
ReturnReason ReturnReason `json:"returnReason"` // The reason for returning the item.
ReturnReasonNote string `json:"returnReasonNote"` // Additional information about the reason for the return. Maximum length: 255 characters.
CustomerNote string `json:"customerNote"` // A note from the customer that describes the item to be returned. Maximum length: 300 characters.
}
A return line item of any type.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/ReturnLineItemType
type ReturnLineItemTypeConnection ¶
type ReturnLineItemTypeConnection struct {
Edges []ReturnLineItemTypeEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ReturnLineItemType `json:"nodes,omitempty"` // A list of nodes that are contained in ReturnLineItemTypeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ReturnLineItemTypes.
type ReturnLineItemTypeEdge ¶
type ReturnLineItemTypeEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ExchangeLineItem `json:"node"` // The item at the end of `ReturnLineItemTypeEdge`.
}
An auto-generated type which holds one `ReturnLineItemType` and a cursor during pagination.
type ReturnReason ¶
type ReturnReason string
The reason for returning the return line item.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ReturnReason
const ( ReturnReasonColor ReturnReason = "COLOR" // The item is returned because the buyer did not like the color. Displays as Color. ReturnReasonDefective ReturnReason = "DEFECTIVE" // The item is returned because it is damaged or defective. Displays as Damaged or defective. ReturnReasonNotAsDescribed ReturnReason = "NOT_AS_DESCRIBED" // The item is returned because it was not as described. Displays as Item not as described. ReturnReasonOther ReturnReason = "OTHER" // The item is returned for another reason. For this value, a return reason note is also provided. Displays as Other. ReturnReasonSizeTooLarge ReturnReason = "SIZE_TOO_LARGE" // The item is returned because the size was too large. Displays as Size was too large. ReturnReasonSizeTooSmall ReturnReason = "SIZE_TOO_SMALL" // The item is returned because the size was too small. Displays as Size was too small. ReturnReasonStyle ReturnReason = "STYLE" // The item is returned because the buyer did not like the style. Displays as Style. ReturnReasonUnknown ReturnReason = "UNKNOWN" // The item is returned because of an unknown reason. Displays as Unknown. ReturnReasonUnwanted ReturnReason = "UNWANTED" // The item is returned because the customer changed their mind. Displays as Customer changed their mind. ReturnReasonWrongItem ReturnReason = "WRONG_ITEM" // The item is returned because the customer received the wrong one. Displays as Received the wrong item. )
type ReturnShippingFee ¶
type ReturnShippingFee struct {
ID string `json:"id"` // A globally-unique ID.
AmountSet *MoneyBag `json:"amountSet,omitempty"` // The amount of the return shipping fee, in shop and presentment currencies.
}
A return shipping fee is a fee captured as part of a return to cover the costs of shipping the return.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ReturnShippingFee
type ReturnStatus ¶
type ReturnStatus string
The status of a return.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ReturnStatus
const ( ReturnStatusCanceled ReturnStatus = "CANCELED" // The return has been canceled. ReturnStatusClosed ReturnStatus = "CLOSED" // The return has been completed. ReturnStatusDeclined ReturnStatus = "DECLINED" // The return was declined. ReturnStatusOpen ReturnStatus = "OPEN" // The return is in progress. ReturnStatusRequested ReturnStatus = "REQUESTED" // The return was requested. )
type ReverseDelivery ¶
type ReverseDelivery struct {
ID string `json:"id"` // A globally-unique ID.
Deliverable *ReverseDeliveryShippingDeliverable `json:"deliverable,omitempty"` // The deliverable associated with the reverse delivery.
ReverseDeliveryLineItems *ReverseDeliveryLineItemConnection `json:"reverseDeliveryLineItems,omitempty"` // The reverse delivery line items attached to the reverse delivery.
ReverseFulfillmentOrder *ReverseFulfillmentOrder `json:"reverseFulfillmentOrder,omitempty"` // The `ReverseFulfillmentOrder` associated with the reverse delivery.
}
A reverse delivery is a post-fulfillment object that represents a buyer sending a package to a merchant. For example, a buyer requests a return, and a merchant sends the buyer a shipping label. The reverse delivery contains the context of the items sent back, how they're being sent back (for example, a shipping label), and the current state of the delivery (tracking information).
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ReverseDelivery
type ReverseDeliveryConnection ¶
type ReverseDeliveryConnection struct {
Edges []ReverseDeliveryEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ReverseDelivery `json:"nodes,omitempty"` // A list of nodes that are contained in ReverseDeliveryEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ReverseDeliveries.
type ReverseDeliveryDeliverable ¶
type ReverseDeliveryDeliverable interface {
*ReverseDeliveryShippingDeliverable
}
The delivery method and artifacts associated with a reverse delivery.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/ReverseDeliveryDeliverable
type ReverseDeliveryEdge ¶
type ReverseDeliveryEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ReverseDelivery `json:"node"` // The item at the end of `ReverseDeliveryEdge`.
}
An auto-generated type which holds one `ReverseDelivery` and a cursor during pagination.
type ReverseDeliveryLabelV2 ¶
type ReverseDeliveryLabelV2 struct {
PublicFileURL URL `json:"publicFileUrl"` // A public link that can be used to download the label image.
CreatedAt DateTime `json:"createdAt"` // The date and time when the reverse delivery label was created.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the reverse delivery label was updated.
}
The return label file information for a reverse delivery.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ReverseDeliveryLabelV2
type ReverseDeliveryLineItem ¶
type ReverseDeliveryLineItem struct {
ID string `json:"id"` // A globally-unique ID.
Dispositions []ReverseFulfillmentOrderDisposition `json:"dispositions"` // The dispositions of the item.
ReverseFulfillmentOrderLineItem *ReverseFulfillmentOrderLineItem `json:"reverseFulfillmentOrderLineItem,omitempty"` // The corresponding reverse fulfillment order line item.
Quantity int `json:"quantity"` // The expected number of units.
}
The details about a reverse delivery line item.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ReverseDeliveryLineItem
type ReverseDeliveryLineItemConnection ¶
type ReverseDeliveryLineItemConnection struct {
Edges []ReverseDeliveryLineItemEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ReverseDeliveryLineItem `json:"nodes,omitempty"` // A list of nodes that are contained in ReverseDeliveryLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ReverseDeliveryLineItems.
type ReverseDeliveryLineItemEdge ¶
type ReverseDeliveryLineItemEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ReverseDeliveryLineItem `json:"node"` // The item at the end of `ReverseDeliveryLineItemEdge`.
}
An auto-generated type which holds one `ReverseDeliveryLineItem` and a cursor during pagination.
type ReverseDeliveryShippingDeliverable ¶
type ReverseDeliveryShippingDeliverable struct {
Label *ReverseDeliveryLabelV2 `json:"label,omitempty"` // The return label attached to the reverse delivery.
Tracking *ReverseDeliveryTrackingV2 `json:"tracking,omitempty"` // The information to track the reverse delivery.
}
A reverse shipping deliverable that may include a label and tracking information.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ReverseDeliveryShippingDeliverable
type ReverseDeliveryTrackingV2 ¶
type ReverseDeliveryTrackingV2 struct {
CarrierName string `json:"carrierName"` // The provider of the tracking information, in a human-readable format for display purposes.
Number string `json:"number"` // The identifier used by the courier to identify the shipment.
URL URL `json:"url"` // The URL to track a shipment.
}
Represents the information used to track a reverse delivery.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ReverseDeliveryTrackingV2
type ReverseFulfillmentOrder ¶
type ReverseFulfillmentOrder struct {
ID string `json:"id"` // A globally-unique ID.
Order *Order `json:"order,omitempty"` // The order associated with the reverse fulfillment order.
Status ReverseFulfillmentOrderStatus `json:"status"` // The status of the reverse fulfillment order.
LineItems *ReverseFulfillmentOrderLineItemConnection `json:"lineItems,omitempty"` // The list of reverse fulfillment order line items for the reverse fulfillment order.
ReverseDeliveries *ReverseDeliveryConnection `json:"reverseDeliveries,omitempty"` // The list of reverse deliveries for the reverse fulfillment order.
ThirdPartyConfirmation *ReverseFulfillmentOrderThirdPartyConfirmation `json:"thirdPartyConfirmation"` // The current confirmation for the reverse fulfillment order from a third-party logistics service. If no third-party service is involved, then this value is `nil`.
}
A group of one or more items in a return that will be processed at a fulfillment service. There can be more than one reverse fulfillment order for a return at a given location.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ReverseFulfillmentOrder
type ReverseFulfillmentOrderConnection ¶
type ReverseFulfillmentOrderConnection struct {
Edges []ReverseFulfillmentOrderEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ReverseFulfillmentOrder `json:"nodes,omitempty"` // A list of nodes that are contained in ReverseFulfillmentOrderEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ReverseFulfillmentOrders.
type ReverseFulfillmentOrderDisposition ¶
type ReverseFulfillmentOrderDisposition struct {
ID string `json:"id"` // A globally-unique ID.
Type ReverseFulfillmentOrderDispositionType `json:"type"` // The final arrangement of an item.
Location *Location `json:"location,omitempty"` // The location where the disposition occurred.
Quantity int `json:"quantity"` // The number of disposed units.
}
The details of the arrangement of an item.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ReverseFulfillmentOrderDisposition
type ReverseFulfillmentOrderDispositionType ¶
type ReverseFulfillmentOrderDispositionType string
The final arrangement of an item from a reverse fulfillment order.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ReverseFulfillmentOrderDispositionType
const ( ReverseFulfillmentOrderDispositionTypeMissing ReverseFulfillmentOrderDispositionType = "MISSING" // An item that was expected but absent. ReverseFulfillmentOrderDispositionTypeNotRestocked ReverseFulfillmentOrderDispositionType = "NOT_RESTOCKED" // An item that wasn't restocked. ReverseFulfillmentOrderDispositionTypeProcessingRequired ReverseFulfillmentOrderDispositionType = "PROCESSING_REQUIRED" // An item that requires further processing before being restocked or discarded. ReverseFulfillmentOrderDispositionTypeRestocked ReverseFulfillmentOrderDispositionType = "RESTOCKED" // An item that was restocked. )
func (ReverseFulfillmentOrderDispositionType) Validate ¶
func (t ReverseFulfillmentOrderDispositionType) Validate() error
Validate ReverseFulfillmentOrderDispositionType
type ReverseFulfillmentOrderEdge ¶
type ReverseFulfillmentOrderEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ReverseFulfillmentOrder `json:"node"` // The item at the end of `ReverseFulfillmentOrderEdge`.
}
An auto-generated type which holds one `ReverseFulfillmentOrder` and a cursor during pagination.
type ReverseFulfillmentOrderLineItem ¶
type ReverseFulfillmentOrderLineItem struct {
ID string `json:"id"` // A globally-unique ID.
FulfillmentLineItem *FulfillmentLineItem `json:"fulfillmentLineItem,omitempty"` // The corresponding fulfillment line item for a reverse fulfillment order line item.
TotalQuantity int `json:"totalQuantity"` // The total number of units to be processed.
Dispositions []ReverseFulfillmentOrderDisposition `json:"dispositions"` // The dispositions of the item.
}
The details about a reverse fulfillment order line item.
Requires `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ReverseFulfillmentOrderLineItem
type ReverseFulfillmentOrderLineItemConnection ¶
type ReverseFulfillmentOrderLineItemConnection struct {
Edges []ReverseFulfillmentOrderLineItemEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ReverseFulfillmentOrderLineItem `json:"nodes,omitempty"` // A list of nodes that are contained in ReverseFulfillmentOrderLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ReverseFulfillmentOrderLineItems.
type ReverseFulfillmentOrderLineItemEdge ¶
type ReverseFulfillmentOrderLineItemEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ReverseFulfillmentOrderLineItem `json:"node"` // The item at the end of `ReverseFulfillmentOrderLineItemEdge`.
}
An auto-generated type which holds one `ReverseFulfillmentOrderLineItem` and a cursor during pagination.
type ReverseFulfillmentOrderStatus ¶
type ReverseFulfillmentOrderStatus string
The status of a reverse fulfillment order.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ReverseFulfillmentOrderStatus
const ( ReverseFulfillmentOrderStatusCanceled ReverseFulfillmentOrderStatus = "CANCELED" // The reverse fulfillment order has been canceled. ReverseFulfillmentOrderStatusClosed ReverseFulfillmentOrderStatus = "CLOSED" // The reverse fulfillment order has been completed. ReverseFulfillmentOrderStatusOpen ReverseFulfillmentOrderStatus = "OPEN" // The reverse fulfillment order is in progress. )
func (ReverseFulfillmentOrderStatus) Validate ¶
func (status ReverseFulfillmentOrderStatus) Validate() error
Validate ReverseFulfillmentOrderStatus
type ReverseFulfillmentOrderThirdPartyConfirmation ¶
type ReverseFulfillmentOrderThirdPartyConfirmation struct {
Status ReverseFulfillmentOrderThirdPartyConfirmationStatus `json:"status"` // The status of the reverse fulfillment order third-party confirmation.
}
The third-party confirmation of a reverse fulfillment order.
Requires `read_returns` access scope.
type ReverseFulfillmentOrderThirdPartyConfirmationStatus ¶
type ReverseFulfillmentOrderThirdPartyConfirmationStatus string
The status of a reverse fulfillment order third-party confirmation.
const ( ReverseFulfillmentOrderThirdPartyConfirmationStatusAccepted ReverseFulfillmentOrderThirdPartyConfirmationStatus = "ACCEPTED" // The reverse fulfillment order was accepted by the fulfillment service. ReverseFulfillmentOrderThirdPartyConfirmationStatusCancelAccepted ReverseFulfillmentOrderThirdPartyConfirmationStatus = "CANCEL_ACCEPTED" // The reverse fulfillment order cancelation was accepted by the fulfillment service. ReverseFulfillmentOrderThirdPartyConfirmationStatusCancelRejected ReverseFulfillmentOrderThirdPartyConfirmationStatus = "CANCEL_REJECTED" // The reverse fulfillment order cancelation was rejected by the fulfillment service. ReverseFulfillmentOrderThirdPartyConfirmationStatusPendingAcceptance ReverseFulfillmentOrderThirdPartyConfirmationStatus = "PENDING_ACCEPTANCE" // The reverse fulfillment order is awaiting acceptance by the fulfillment service. ReverseFulfillmentOrderThirdPartyConfirmationStatusPendingCancelation ReverseFulfillmentOrderThirdPartyConfirmationStatus = "PENDING_CANCELATION" // The reverse fulfillment order is awaiting cancelation by the fulfillment service. ReverseFulfillmentOrderThirdPartyConfirmationStatusRejected ReverseFulfillmentOrderThirdPartyConfirmationStatus = "REJECTED" // The reverse fulfillment order was rejected by the fulfillment service. )
func (ReverseFulfillmentOrderThirdPartyConfirmationStatus) Validate ¶
func (status ReverseFulfillmentOrderThirdPartyConfirmationStatus) Validate() error
Validate ReverseFulfillmentOrderThirdPartyConfirmationStatus
type RiskAssessmentResult ¶
type RiskAssessmentResult string
List of possible values for a RiskAssessment result.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/RiskAssessmentResult
const ( RiskAssessmentResultPending RiskAssessmentResult = "PENDING" // Indicates that the risk assessment is still pending. RiskAssessmentResultLow RiskAssessmentResult = "LOW" // Indicates a low likelihood that the order is fraudulent. RiskAssessmentResultMedium RiskAssessmentResult = "MEDIUM" // Indicates a medium likelihood that the order is fraudulent. RiskAssessmentResultHigh RiskAssessmentResult = "HIGH" // Indicates a high likelihood that the order is fraudulent. RiskAssessmentResultNone RiskAssessmentResult = "NONE" // Indicates that the risk assessment will not provide a recommendation for the order. )
func (RiskAssessmentResult) Validate ¶
func (r RiskAssessmentResult) Validate() error
Validate RiskAssessmentResult
type RiskFact ¶
type RiskFact struct {
Description string `json:"description"` // A description of the fact.
Sentiment RiskFactSentiment `json:"sentiment"` // Indicates whether the fact is a negative, neutral or positive contributor with regards to risk.
}
A risk fact belongs to a single risk assessment and serves to provide additional context for an assessment. Risk facts are not necessarily tied to the result of the recommendation.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/RiskFact
type RiskFactSentiment ¶
type RiskFactSentiment string
List of possible values for a RiskFact sentiment.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/RiskFactSentiment
const ( RiskFactSentimentNegative RiskFactSentiment = "NEGATIVE" // A negative contributor that increases the risk. RiskFactSentimentNeutral RiskFactSentiment = "NEUTRAL" // A neutral contributor with regards to risk. RiskFactSentimentPositive RiskFactSentiment = "POSITIVE" // A positive contributor that lowers the risk. )
func (RiskFactSentiment) Validate ¶
func (r RiskFactSentiment) Validate() error
Validate RiskFactSentiment
type RowCount ¶
type RowCount struct {
Count int `json:"count"` // Estimated number of rows contained within this background operation.
ExceedsMax bool `json:"exceedsMax"` // Whether the operation exceeds max number of reportable rows.
}
A row count represents rows on background operation.
Requires `read_products` access scope. Also: The shop has the `international_price_overrides` or Markets or B2B features enabled.
type SEO ¶
type SEO struct {
Title string `json:"title"` // SEO Title.
Description string `json:"description"` // SEO Description.
}
SEO information.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SEO
type Sale ¶
type Sale struct {
ID string `json:"id"` // The unique ID for the sale.
ActionType SaleActionType `json:"actionType"` // The type of order action that the sale represents.
LineType SaleLineType `json:"lineType"` // The line type assocated with the sale.
Quantity int `json:"quantity"` // The number of units either ordered or intended to be returned.
Taxes []SaleTax `json:"taxes"` // All individual taxes associated with the sale.
TotalDiscountAmountBeforeTaxes *MoneyBag `json:"totalDiscountAmountBeforeTaxes,omitempty"` // The total discounts allocated to the sale before taxes.
TotalDiscountAmountAfterTaxes *MoneyBag `json:"totalDiscountAmountAfterTaxes,omitempty"` // The total discounts allocated to the sale after taxes.
TotalTaxAmount *MoneyBag `json:"totalTaxAmount,omitempty"` // The total amount of taxes for the sale.
TotalAmount *MoneyBag `json:"totalAmount,omitempty"` // The total sale amount after taxes and discounts.
}
An individual sale record associated with a sales agreement. Every money value in an order's sales data is represented in the currency's smallest unit. When amounts are divided across multiple line items, such as taxes or order discounts, the amounts might not divide evenly across all of the line items on the order. To address this, the remaining currency units that couldn't be divided evenly are allocated one at a time, starting with the first line item, until they are all accounted for. In aggregate, the values sum up correctly. In isolation, one line item might have a different tax or discount amount than another line item of the same price, before taxes and discounts. This is because the amount could not be divided evenly across the items. The allocation of currency units across line items is immutable. After they are allocated, currency units are never reallocated or redistributed among the line items.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Sale
type SaleActionType ¶
type SaleActionType string
The possible order action types for a sale.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SaleActionType
const ( SaleActionTypeOrder SaleActionType = "ORDER" // A purchase or charge. SaleActionTypeUpdate SaleActionType = "UPDATE" // A change to the price, taxes, or discounts for a prior purchase. SaleActionTypeReturn SaleActionType = "RETURN" // A removal or return. SaleActionTypeUnknown SaleActionType = "UNKNOWN" // An unknown order action. Represents new actions that may be added in future versions. )
type SaleConnection ¶
type SaleConnection struct {
Edges []SaleEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []Sale `json:"nodes,omitempty"` // A list of nodes that are contained in SaleEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple Sales.
type SaleEdge ¶
type SaleEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *Sale `json:"node"` // The item at the end of `SaleEdge`.
}
An auto-generated type which holds one `Sale` and a cursor during pagination.
type SaleLineType ¶
type SaleLineType string
The possible line types for a sale record. One of the possible order line types for a sale is an adjustment. Sales adjustments occur when a refund is issued for a line item that is either more or less than the total value of the line item. Examples are restocking fees and goodwill payments.When this happens, Shopify produces a sales agreement with sale records for each line item that is returned or refunded and an additional sale record for the adjustment (for example, a restocking fee). The sales records for the returned or refunded items represent the reversal of the original line item sale value. The additional adjustment sale record represents the difference between the original total value of all line items that were refunded, and the actual amount refunded.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SaleLineType
const ( SaleLineTypeAdditionalFee SaleLineType = "ADDITIONAL_FEE" // An additional fee. SaleLineTypeAdjustment SaleLineType = "ADJUSTMENT" // A sale adjustment. SaleLineTypeDuty SaleLineType = "DUTY" // A duty charge. SaleLineTypeFee SaleLineType = "FEE" // A fee charge. SaleLineTypeGiftCard SaleLineType = "GIFT_CARD" // A gift card. SaleLineTypeProduct SaleLineType = "PRODUCT" // A product purchased, returned or exchanged. SaleLineTypeShipping SaleLineType = "SHIPPING" // A shipping cost. SaleLineTypeTip SaleLineType = "TIP" // A tip added by the customer. SaleLineTypeUnknown SaleLineType = "UNKNOWN" // An unknown sale line. Represents new types that may be added in future versions. )
type SaleTax ¶
type SaleTax struct {
ID string `json:"id"` // The unique ID for the sale tax.
TaxLine *TaxLine `json:"taxLine,omitempty"` // The tax line associated with the sale.
Amount *MoneyBag `json:"amount,omitempty"` // The portion of the total tax amount on the related sale that comes from the associated tax line.
}
The tax allocated to a sale from a single tax line.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SaleTax
type SalesAgreement ¶
type SalesAgreement struct {
ID string `json:"id"` // The unique ID for the agreement.
App *App `json:"app,omitempty"` // The application that created the agreement.
User *StaffMember `json:"user,omitempty"` // The staff member associated with the agreement.
Reason OrderActionType `json:"reason"` // The reason the agremeent was created.
Sales *SaleConnection `json:"sales,omitempty"` // The sales associated with the agreement.
HappendAt DateTime `json:"happendAt"` // The date and time at which the agreement occured.
}
A contract between a merchant and a customer to do business. Shopify creates a sales agreement whenever an order is placed, edited, or refunded. A sales agreement has one or more sales records, which provide itemized details about the initial agreement or subsequent changes made to the order. For example, when a customer places an order, Shopify creates the order, generates a sales agreement, and records a sale for each line item purchased in the order. A sale record is specific to a type of order line. Order lines can represent different things such as a purchased product, a tip added by a customer, shipping costs collected at checkout, and more.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/SalesAgreement
type SalesAgreementConnection ¶
type SalesAgreementConnection struct {
Edges []SalesAgreementEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []SalesAgreement `json:"nodes,omitempty"` // A list of nodes that are contained in SalesAgreementEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple SalesAgreements.
type SalesAgreementEdge ¶
type SalesAgreementEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *SalesAgreement `json:"node"` // The item at the end of `SalesAgreementEdge`.
}
An auto-generated type which holds one `SalesAgreement` and a cursor during pagination.
type SearchFilterOptions ¶
type SearchFilterOptions struct {
ProductAvailability []FilterOption `json:"productAvailability"` // A list of options that can be use to filter product availability.
}
A list of search filters along with their specific options in value and label pair for filtering.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SearchFilterOptions
type SearchResult ¶
type SearchResult struct {
Title string `json:"title"` // Returns the resource title.
Description string `json:"description"` // Returns the search result description text.
URL URL `json:"url"` // Returns the absolute URL to the resource in the search result.
Image *Image `json:"image,omitempty"` // Returns the Image resource presented to accompany a search result.
Reference *Node `json:"reference,omitempty"` // Returns the ID of the resource returned in the search result.
}
Represents an individual result returned from a search.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SearchResult
type SearchResultConnection ¶
type SearchResultConnection struct {
Edges []StringEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
The connection type for SearchResult.
type SearchResultEdge ¶
type SearchResultEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *SearchResult `json:"node"` // The item at the end of SearchResultEdge.
}
An auto-generated type which holds one SearchResult and a cursor during pagination.
type SelectedOption ¶
type SelectedOption struct {
Name string `json:"name"` // The product option’s name.
Value string `json:"value"` // The product option’s value.
OptionValue *ProductOptionValue // The product option’s value object.
}
Properties used by customers to select a product variant. Products can have multiple options, like different sizes or colors.
type SellingPlan ¶
type SellingPlan struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The buyer-facing label of the selling plan.
Description string `json:"description"` // Buyer facing string which describes the selling plan commitment.
Category SellingPlanCategory `json:"category"` // The category used to classify the selling plan for reporting purposes.
Options []string `json:"options"` // The values of all options available on the selling plan group. Selling plans are grouped together in Liquid when they're created by the same app, and have the same `selling_plan_group.name` and `selling_plan_group.options` values.
Position int `json:"position"` // The relative position of the selling plan for display. A lower position will be displayed before a higher position.
BillingPolicy interface{} `json:"billingPolicy,omitempty"` // A selling plan policy which describes the recurring billing details.
DeliveryPolicy interface{} `json:"deliveryPolicy,omitempty"` // A selling plan policy which describes the delivery details.
InventoryPolicy *SellingPlanInventoryPolicy `json:"inventoryPolicy,omitempty"` // When to reserve inventory for a selling plan.
PricingPolicies []SellingPlanPricingPolicy `json:"pricingPolicies,omitempty"` // Selling plan pricing details.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
Translations []Translation `json:"translations"` // The published translations associated with the resource.
CreatedAt DateTime `json:"createdAt"` // The date and time when the selling plan was created.
}
Represents how a product can be sold and purchased. Selling plans and associated records (selling plan groups and policies) are deleted 48 hours after a merchant uninstalls their subscriptions app. We recommend backing up these records if you need to restore them later.
For more information on selling plans, refer to [Creating and managing selling plans](https://shopify.dev/docs/apps/selling-strategies/subscriptions/selling-plans).
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlan
type SellingPlanAnchor ¶
type SellingPlanAnchor struct {
Type SellingPlanAnchorType `json:"type"` // Represents the anchor type, it can be one one of WEEKDAY, MONTHDAY, YEARDAY.
Day int `json:"day"` // The day of the anchor. If type is `WEEKDAY`, then the value must be between `1-7`. Shopify interprets the days of the week according to ISO 8601, where 1 is Monday. If type isn't `WEEKDAY`, then the value must be between `1-31`.
Month int `json:"month"` // The month of the anchor. If type is different than `YEARDAY`, then the value must be null or between `1-12`.
// The cutoff day for the anchor. Specifies a buffer period before the anchor date for orders to be included in a delivery or fulfillment cycle.
//
// If `type` is `WEEKDAY`, then the value must be between `1-7`. Shopify interprets the days of the week according to ISO 8601, where 1 is Monday.
//
// If `type` is `MONTHDAY`, then the value must be between `1-31`.
//
// If `type` is `YEARDAY`, then the value must be `null`.
CutOffDay int `json:"cutOffDay"`
}
Specifies the date when delivery or fulfillment is completed by a merchant for a given time cycle. You can also define a cutoff for which customers are eligible to enter this cycle and the desired behavior for customers who start their subscription inside the cutoff period.
Some example scenarios where anchors can be useful to implement advanced delivery behavior:
- A merchant starts fulfillment on a specific date every month.
- A merchant wants to bill the 1st of every quarter.
- A customer expects their delivery every Tuesday.
For more details, see [About Selling Plans](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans#anchors).
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanAnchor
type SellingPlanAnchorType ¶
type SellingPlanAnchorType string
Represents the anchor type.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SellingPlanAnchorType
const ( SellingPlanAnchorTypeWeekDay SellingPlanAnchorType = "WEEKDAY" // Which day of the week, between 1-7. SellingPlanAnchorTypeMonthDay SellingPlanAnchorType = "MONTHDAY" // Which day of the month, between 1-31. SellingPlanAnchorTypeYearDay SellingPlanAnchorType = "YEARDAY" // Which days of the month and year, month between 1-12, and day between 1-31. )
func (SellingPlanAnchorType) Validate ¶
func (interval SellingPlanAnchorType) Validate() error
Validate SellingPlanAnchorType
type SellingPlanBillingPolicy ¶
type SellingPlanBillingPolicy interface {
// contains filtered or unexported methods
}
type SellingPlanCategory ¶
type SellingPlanCategory string
The category of the selling plan. For the `OTHER` category, you must fill out our request form, where we'll review your request for a new purchase option.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SellingPlanCategory
const ( SellingPlanCategoryOther SellingPlanCategory = "OTHER" // The selling plan is for anything not in one of the other categories. SellingPlanCategoryPreOrder SellingPlanCategory = "PRE_ORDER" // The selling plan is for pre-orders. SellingPlanCategorySubscription SellingPlanCategory = "SUBSCRIPTION" // The selling plan is for subscriptions. SellingPlanCategoryTryBeforeYouBuy SellingPlanCategory = "TRY_BEFORE_YOU_BUY" // The selling plan is for try before you buy purchases. )
func (SellingPlanCategory) Validate ¶
func (category SellingPlanCategory) Validate() error
Validate SellingPlanCategory
type SellingPlanCheckoutCharge ¶
type SellingPlanCheckoutCharge[V SellingPlanCheckoutChargeValue] struct { Type SellingPlanCheckoutChargeType `json:"type"` // The charge type for the checkout charge. Value V `json:"value,omitempty"` // The charge value for the checkout charge. }
The amount charged at checkout when the full amount isn't charged at checkout.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanCheckoutCharge
type SellingPlanCheckoutChargePercentageValue ¶
type SellingPlanCheckoutChargePercentageValue struct {
Percentage float64 `json:"percentage"` // The percentage value of the price used for checkout charge.
}
The percentage value of the price used for checkout charge.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanCheckoutChargePercentageValue
type SellingPlanCheckoutChargeType ¶
type SellingPlanCheckoutChargeType string
The checkout charge when the full amount isn't charged at checkout.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SellingPlanCheckoutChargeType
const ( SellingPlanCheckoutChargeTypePercentage SellingPlanCheckoutChargeType = "PERCENTAGE" // The checkout charge is a percentage of the product or variant price. SellingPlanCheckoutChargeTypePrice SellingPlanCheckoutChargeType = "PRICE" // The checkout charge is a fixed price amount. )
func (SellingPlanCheckoutChargeType) Validate ¶
func (chargeType SellingPlanCheckoutChargeType) Validate() error
Validate SellingPlanCheckoutChargeType
type SellingPlanCheckoutChargeValue ¶
type SellingPlanCheckoutChargeValue interface {
*MoneyV2 | *SellingPlanCheckoutChargePercentageValue
}
The portion of the price to be charged at checkout.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/SellingPlanCheckoutChargeValue
type SellingPlanConnection ¶
type SellingPlanConnection struct {
Edges []SellingPlanEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []SellingPlan `json:"nodes,omitempty"` // A list of nodes that are contained in SellingPlanEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple SellingPlans.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/connections/SellingPlanConnection
type SellingPlanDeliveryPolicy ¶
type SellingPlanDeliveryPolicy interface {
*SellingPlanFixedDeliveryPolicy | *SellingPlanRecurringDeliveryPolicy
}
Represents the delivery frequency associated to the selling plan (for example, deliver every month, or deliver every other week). The selling plan delivery policy and associated records (selling plan groups, selling plans, pricing policies, and billing policy) are deleted 48 hours after a merchant uninstalls their subscriptions app. We recommend backing up these records if you need to restore them later.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/SellingPlanDeliveryPolicy
type SellingPlanEdge ¶
type SellingPlanEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *SellingPlan `json:"node"` // The item at the end of SellingPlan.
}
An auto-generated type which holds one SellingPlan and a cursor during pagination.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanEdge
type SellingPlanFixedBillingPolicy ¶
type SellingPlanFixedBillingPolicy[V SellingPlanCheckoutChargeValue] struct { CheckoutCharge *SellingPlanCheckoutCharge[V] `json:"checkoutCharge,omitempty"` // The checkout charge when the full amount isn't charged at checkout. RemainingBalanceChargeExactTime DateTime `json:"remainingBalanceChargeExactTime"` // The exact time when to capture the full payment. RemainingBalanceChargeTimeAfterCheckout string `json:"remainingBalanceChargeTimeAfterCheckout"` // The period after remaining_balance_charge_trigger, before capturing the full payment. Expressed as an ISO8601 duration. RemainingBalanceChargeTrigger SellingPlanRemainingBalanceChargeTrigger `json:"remainingBalanceChargeTrigger"` // When to capture payment for amount due. }
The fixed selling plan billing policy defines how much of the price of the product will be billed to customer at checkout. If there is an outstanding balance, it determines when it will be paid.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanFixedBillingPolicy
func (*SellingPlanFixedBillingPolicy[V]) IsBillingPolicy ¶
func (p *SellingPlanFixedBillingPolicy[V]) IsBillingPolicy() bool
type SellingPlanFixedDeliveryPolicy ¶
type SellingPlanFixedDeliveryPolicy struct {
Anchors []SellingPlanAnchor `json:"anchors"` // The specific anchor dates upon which the delivery interval calculations should be made.
Cutoff int `json:"cutoff"` // A buffer period for orders to be included in next fulfillment anchor.
FulfillmentExactTime DateTime `json:"fulfillmentExactTime"` // The date and time when the fulfillment should trigger.
FulfillmentTrigger SellingPlanFulfillmentTrigger `json:"fulfillmentTrigger"` // What triggers the fulfillment. The value must be one of `ANCHOR`, `ASAP`, `EXACT_TIME`, or `UNKNOWN`.
Intent SellingPlanFixedDeliveryPolicyIntent `json:"intent"` // Whether the delivery policy is merchant or buyer-centric. Buyer-centric delivery policies state the time when the buyer will receive the goods. Merchant-centric delivery policies state the time when the fulfillment should be started. Currently, only merchant-centric delivery policies are supported.
PreAnchorBehaviour SellingPlanFixedDeliveryPolicyPreAnchorBehavior `json:"preAnchorBehaviour"` // The fulfillment or delivery behavior of the first fulfillment when the order is placed before the anchor. The default value for this field is `ASAP`.
}
Represents a fixed selling plan delivery policy.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanFixedDeliveryPolicy
type SellingPlanFixedDeliveryPolicyIntent ¶
type SellingPlanFixedDeliveryPolicyIntent string
Possible intentions of a Delivery Policy.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SellingPlanFixedDeliveryPolicyIntent
const (
SellingPlanFixedDeliveryPolicyIntentFulfillmentBegin SellingPlanFixedDeliveryPolicyIntent = "FULFILLMENT_BEGIN" // A merchant-centric delivery policy. Mark this delivery policy to define when the merchant should start fulfillment.
)
func (SellingPlanFixedDeliveryPolicyIntent) Validate ¶
func (intent SellingPlanFixedDeliveryPolicyIntent) Validate() error
Validate SellingPlanFixedDeliveryPolicyIntent
type SellingPlanFixedDeliveryPolicyPreAnchorBehavior ¶
type SellingPlanFixedDeliveryPolicyPreAnchorBehavior string
The fulfillment or delivery behavior of the first fulfillment when the orderis placed before the anchor.
const ( SellingPlanFixedDeliveryPolicyPreAnchorBehaviorASAP SellingPlanFixedDeliveryPolicyPreAnchorBehavior = "ASAP" // Orders placed can be fulfilled / delivered immediately. Orders placed inside a cutoff can be fulfilled / delivered at the next anchor. SellingPlanFixedDeliveryPolicyPreAnchorBehaviorNext SellingPlanFixedDeliveryPolicyPreAnchorBehavior = "NEXT" // Orders placed can be fulfilled / delivered at the next anchor date. Orders placed inside a cutoff will skip the next anchor and can be fulfilled / delivered at the following anchor. )
func (SellingPlanFixedDeliveryPolicyPreAnchorBehavior) Validate ¶
func (intent SellingPlanFixedDeliveryPolicyPreAnchorBehavior) Validate() error
Validate SellingPlanFixedDeliveryPolicyPreAnchorBehavior
type SellingPlanFixedPricingPolicy ¶
type SellingPlanFixedPricingPolicy[V SellingPlanPricingPolicyAdjustmentValue] struct { AdjustmentType SellingPlanPricingPolicyAdjustmentType `json:"adjustmentType"` // The price adjustment type. AdjustmentValue V `json:"adjustmentValue,omitempty"` // The price adjustment value. CreatedAt DateTime `json:"createdAt"` // The date and time when the fixed selling plan pricing policy was created. }
Represents the pricing policy of a subscription or deferred purchase option selling plan. The selling plan fixed pricing policy works with the billing and delivery policy to determine the final price. Discounts are divided among fulfillments. For example, a subscription with a $10 discount and two deliveries will have a $5 discount applied to each delivery.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanFixedPricingPolicy
func (*SellingPlanFixedPricingPolicy[AV]) IsPricingPolicy ¶
func (p *SellingPlanFixedPricingPolicy[AV]) IsPricingPolicy() bool
type SellingPlanFulfillmentTrigger ¶
type SellingPlanFulfillmentTrigger string
Describes what triggers fulfillment.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SellingPlanFulfillmentTrigger
const ( SellingPlanFulfillmentTriggerAnchor SellingPlanFulfillmentTrigger = "ANCHOR" // Use the anchor values to calculate fulfillment date. SellingPlanFulfillmentTriggerASAP SellingPlanFulfillmentTrigger = "ASAP" // As soon as possible. SellingPlanFulfillmentTriggerExactTime SellingPlanFulfillmentTrigger = "EXACT_TIME" // At an exact time defined by the fulfillment_exact_time field. SellingPlanFulfillmentTriggerUnknown SellingPlanFulfillmentTrigger = "UNKNOWN" // Unknown. Usually to be determined in the future. )
func (SellingPlanFulfillmentTrigger) Validate ¶
func (trigger SellingPlanFulfillmentTrigger) Validate() error
Validate SellingPlanFulfillmentTrigger
type SellingPlanGroup ¶
type SellingPlanGroup struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The buyer-facing label of the selling plan group.
AppID string `json:"appId"` // The ID for app, exposed in Liquid and product JSON.
Description string `json:"description"` // The merchant-facing description of the selling plan group.
AppliesToProduct bool `json:"appliesToProduct"` // Whether the given product is directly associated to the selling plan group.
AppliesToProductVariants bool `json:"appliesToProductVariants"` // Whether any of the product variants of the given product are associated to the selling plan group.
MerchantCode string `json:"merchantCode"` // The merchant-facing label of the selling plan group.
Options []string `json:"options"` // The values of all options available on the selling plan group. Selling plans are grouped together in Liquid when they're created by the same app, and have the same `selling_plan_group.name` and `selling_plan_group.options` values.
Position int `json:"position"` // The relative position of the selling plan group for display.
Products *ProductConnection `json:"products,omitempty"` // Products associated to the selling plan group.
ProductsCount *Count `json:"productsCount,omitempty"` // A count of products associated to the selling plan group.
ProductVariants *ProductVariantConnection `json:"productVariants,omitempty"` // Product variants associated to the selling plan group.
ProductVariantsCount *Count `json:"productVariantsCount,omitempty"` // A count of product variants associated to the selling plan group.
SellingPlans *SellingPlanConnection `json:"sellingPlans,omitempty"` // Selling plans associated to the selling plan group.
Summary string `json:"summary"` // A summary of the policies associated to the selling plan group.
Translations []Translation `json:"translations"` // The published translations associated with the resource.
CreatedAt DateTime `json:"createdAt"` // The date and time when the selling plan group was created.
}
Represents a selling method (for example, "Subscribe and save" or "Pre-paid"). Selling plan groups and associated records (selling plans and policies) are deleted 48 hours after a merchant uninstalls their subscriptions app. We recommend backing up these records if you need to restore them later.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroup
type SellingPlanGroupConnection ¶
type SellingPlanGroupConnection struct {
Edges []SellingPlanGroupEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []SellingPlanGroup `json:"nodes,omitempty"` // A list of nodes that are contained in SellingPlanGroupEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple SellingPlanGroups.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/connections/SellingPlanGroupConnection
type SellingPlanGroupEdge ¶
type SellingPlanGroupEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *SellingPlanGroup `json:"node"` // The item at the end of SellingPlanGroup.
}
An auto-generated type which holds one SellingPlanGroup and a cursor during pagination.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanGroupEdge
type SellingPlanInterval ¶
type SellingPlanInterval string
Represents valid selling plan interval. Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SellingPlanInterval
const ( SellingPlanIntervalDay SellingPlanInterval = "DAY" // Day interval SellingPlanIntervalWeek SellingPlanInterval = "WEEK" // Week interval SellingPlanIntervalMonth SellingPlanInterval = "MONTH" // Month interval SellingPlanIntervalYear SellingPlanInterval = "YEAR" // Year interval )
func (SellingPlanInterval) Validate ¶
func (interval SellingPlanInterval) Validate() error
Validate SellingPlanInterval
type SellingPlanInventoryPolicy ¶
type SellingPlanInventoryPolicy struct {
Reserve SellingPlanReserve `json:"reserve"` // When to reserve inventory for the order.
}
The selling plan inventory policy.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanInventoryPolicy
type SellingPlanPricingPolicy ¶
type SellingPlanPricingPolicy interface {
// contains filtered or unexported methods
}
type SellingPlanPricingPolicyAdjustmentType ¶
type SellingPlanPricingPolicyAdjustmentType string
Represents a selling plan pricing policy adjustment type.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SellingPlanPricingPolicyAdjustmentType
const ( SellingPlanPricingPolicyAdjustmentTypeFixedAmount SellingPlanPricingPolicyAdjustmentType = "FIXED_AMOUNT" // Fixed amount off adjustment. SellingPlanPricingPolicyAdjustmentTypePercentage SellingPlanPricingPolicyAdjustmentType = "PERCENTAGE" // Percentage off adjustment. SellingPlanPricingPolicyAdjustmentTypePrice SellingPlanPricingPolicyAdjustmentType = "PRICE" // Price of the policy. )
func (SellingPlanPricingPolicyAdjustmentType) Validate ¶
func (reserve SellingPlanPricingPolicyAdjustmentType) Validate() error
Validate SellingPlanPricingPolicyAdjustmentType
type SellingPlanPricingPolicyAdjustmentValue ¶
type SellingPlanPricingPolicyAdjustmentValue interface {
*MoneyV2 | *SellingPlanPricingPolicyPercentageValue
}
Represents a selling plan pricing policy adjustment value type.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/SellingPlanPricingPolicyAdjustmentValue
type SellingPlanPricingPolicyPercentageValue ¶
type SellingPlanPricingPolicyPercentageValue struct {
Percentage float64 `json:"percentage"` // The percentage value.
}
The percentage value of a selling plan pricing policy percentage type.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanPricingPolicyPercentageValue
type SellingPlanRecurringBillingPolicy ¶
type SellingPlanRecurringBillingPolicy struct {
Anchors []SellingPlanAnchor `json:"anchors"` // Specific anchor dates upon which the billing interval calculations should be made.
Interval SellingPlanInterval `json:"interval"` // The billing frequency, it can be either: day, week, month or year.
IntervalCount int `json:"intervalCount"` // The number of intervals between billings.
MaxCycles int `json:"maxCycles"` // Maximum number of billing iterations.
MinCycles int `json:"minCycles"` // Minimum number of billing iterations.
CreatedAt DateTime `json:"createdAt"` // The date and time when the selling plan billing policy was created.
}
Represents a recurring selling plan billing policy.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanRecurringBillingPolicy
func (*SellingPlanRecurringBillingPolicy) IsBillingPolicy ¶
func (p *SellingPlanRecurringBillingPolicy) IsBillingPolicy() bool
type SellingPlanRecurringDeliveryPolicy ¶
type SellingPlanRecurringDeliveryPolicy struct {
Anchors []SellingPlanAnchor `json:"anchors"` // The specific anchor dates upon which the delivery interval calculations should be made.
Cutoff int `json:"cutoff"` // Number of days which represent a buffer period for orders to be included in a cycle.
Intent SellingPlanRecurringDeliveryPolicyIntent `json:"intent"` // Whether the delivery policy is merchant or buyer-centric. Buyer-centric delivery policies state the time when the buyer will receive the goods. Merchant-centric delivery policies state the time when the fulfillment should be started. Currently, only merchant-centric delivery policies are supported.
Interval SellingPlanInterval `json:"interval"` // The delivery frequency, it can be either: day, week, month or year.
IntervalCount int `json:"intervalCount"` // The number of intervals between deliveries.
PreAnchorBehaviour SellingPlanRecurringDeliveryPolicyPreAnchorBehavior `json:"preAnchorBehaviour"` // The fulfillment or delivery behavior of the first fulfillment when the order is placed before the anchor. The default value for this field is `ASAP`.
CreatedAt DateTime `json:"createdAt"` // The date and time when the selling plan delivery policy was created.
}
Represents a recurring selling plan delivery policy.
Requires `read_products` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SellingPlanRecurringDeliveryPolicy
type SellingPlanRecurringDeliveryPolicyIntent ¶
type SellingPlanRecurringDeliveryPolicyIntent string
Whether the delivery policy is merchant or buyer-centric.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SellingPlanRecurringDeliveryPolicyIntent
const (
SellingPlanRecurringDeliveryPolicyIntentFulfillmentBegin SellingPlanRecurringDeliveryPolicyIntent = "FULFILLMENT_BEGIN" // A merchant-centric delivery policy. Mark this delivery policy to define when the merchant should start fulfillment.
)
func (SellingPlanRecurringDeliveryPolicyIntent) Validate ¶
func (intent SellingPlanRecurringDeliveryPolicyIntent) Validate() error
Validate SellingPlanRecurringDeliveryPolicyIntent
type SellingPlanRecurringDeliveryPolicyPreAnchorBehavior ¶
type SellingPlanRecurringDeliveryPolicyPreAnchorBehavior string
The fulfillment or delivery behaviors of the first fulfillment when the orderis placed before the anchor.
const ( SellingPlanRecurringDeliveryPolicyPreAnchorBehaviorASAP SellingPlanRecurringDeliveryPolicyPreAnchorBehavior = "ASAP" // Orders placed can be fulfilled / delivered immediately. Orders placed inside a cutoff can be fulfilled / delivered at the next anchor. SellingPlanRecurringDeliveryPolicyPreAnchorBehaviorNext SellingPlanRecurringDeliveryPolicyPreAnchorBehavior = "NEXT" // Orders placed can be fulfilled / delivered at the next anchor date. Orders placed inside a cutoff will skip the next anchor and can be fulfilled / delivered at the following anchor. )
func (SellingPlanRecurringDeliveryPolicyPreAnchorBehavior) Validate ¶
func (intent SellingPlanRecurringDeliveryPolicyPreAnchorBehavior) Validate() error
Validate SellingPlanRecurringDeliveryPolicyPreAnchorBehavior
type SellingPlanRecurringPricingPolicy ¶
type SellingPlanRecurringPricingPolicy[V SellingPlanPricingPolicyAdjustmentValue] struct { AdjustmentType SellingPlanPricingPolicyAdjustmentType `json:"adjustmentType"` // The price adjustment type. AdjustmentValue V `json:"adjustmentValue,omitempty"` // The price adjustment value. AfterCycle int `json:"afterCycle"` // Cycle after which this pricing policy applies. CreatedAt DateTime `json:"createdAt"` // The date and time when the recurring selling plan pricing policy was created. }
Represents a recurring selling plan pricing policy. It applies after the fixed pricing policy. By using the afterCycle parameter, you can specify the cycle when the recurring pricing policy comes into effect. Recurring pricing policies are not available for deferred purchase options.
Requires `read_products` access scope.
func (*SellingPlanRecurringPricingPolicy[AV]) IsPricingPolicy ¶
func (p *SellingPlanRecurringPricingPolicy[AV]) IsPricingPolicy() bool
type SellingPlanRemainingBalanceChargeTrigger ¶
type SellingPlanRemainingBalanceChargeTrigger string
When to capture the payment for the remaining amount due.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SellingPlanRemainingBalanceChargeTrigger
const ( SellingPlanRemainingBalanceChargeTriggerExactTime SellingPlanRemainingBalanceChargeTrigger = "EXACT_TIME" // At an exact time defined by the remaining_balance_charge_exact_time field. SellingPlanRemainingBalanceChargeTriggerNoRemainingBalance SellingPlanRemainingBalanceChargeTrigger = "NO_REMAINING_BALANCE" // When there's no remaining balance to be charged after checkout. SellingPlanRemainingBalanceChargeTriggerTimeAfterCheckout SellingPlanRemainingBalanceChargeTrigger = "TIME_AFTER_CHECKOUT" // After the duration defined by the remaining_balance_charge_time_after_checkout field. )
func (SellingPlanRemainingBalanceChargeTrigger) Validate ¶
func (trigger SellingPlanRemainingBalanceChargeTrigger) Validate() error
Validate SellingPlanRemainingBalanceChargeTrigger
type SellingPlanReserve ¶
type SellingPlanReserve string
When to reserve inventory for a selling plan.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SellingPlanReserve
const ( SellingPlanReserveOnFulfillment SellingPlanReserve = "ON_FULFILLMENT" // Reserve inventory when order is fulfilled. SellingPlanReserveOnSale SellingPlanReserve = "ON_SALE" // Reserve inventory at time of sale. )
func (SellingPlanReserve) Validate ¶
func (reserve SellingPlanReserve) Validate() error
Validate SellingPlanReserve
type ShippingLine ¶
type ShippingLine struct {
ID string `json:"id"` // A globally-unique ID.
Title string `json:"title"` // Returns the title of the shipping line.
Code string `json:"code"` // A reference to the shipping method.
CarrierIdentitfier string `json:"carrierIdentitfier"` // A reference to the carrier service that provided the rate. Present when the rate was computed by a third-party carrier service.
ShippingRateHandle string `json:"shippingRateHandle"` // A unique identifier for the shipping rate. The format can change without notice and isn't meant to be shown to users.
Custom bool `json:"custom"` // Whether the shipping line is custom or not.
IsRemoved bool `json:"isRemoved"` // Whether the shipping line has been removed.
DeliveryCategory string `json:"deliveryCategory"` // The general classification of the delivery method.
DiscountAllocations []DiscountAllocation `json:"discountAllocations"` // The discounts that have been allocated to the shipping line.
DiscountedPriceSet *MoneyBag `json:"discountedPriceSet,omitempty"` // The shipping price after applying discounts. If the parent order.taxesIncluded field is true, then this price includes taxes. If not, it's the pre-tax price. As of API version 2024-07, this will be calculated including cart level discounts, such as the free shipping discount.
OriginalPriceSet *MoneyBag `json:"originalPriceSet,omitempty"` // The pre-tax shipping price without any discounts applied.
Phone string `json:"phone"` // The phone number at the shipping address.
Source string `json:"source"` // Returns the rate source for the shipping line.
TaxLines []TaxLine `json:"taxLines"` // The TaxLine objects connected to this shipping line.
}
Represents the shipping details that the customer chose for their order.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingLine
type ShippingLineConnection ¶
type ShippingLineConnection struct {
Edges []ShippingLineEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ShippingLine `json:"nodes,omitempty"` // A list of nodes that are contained in ShippingLineEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ShippingLines.
type ShippingLineEdge ¶
type ShippingLineEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ShippingLine `json:"node"` // The item at the end of `ShippingLineEdge`.
}
An auto-generated type which holds one `ShippingLine` and a cursor during pagination.
type ShippingRefund ¶
type ShippingRefund struct {
MaximumRefundableSet *MoneyBag `json:"maximumRefundableSet,omitempty"` // The maximum amount of shipping fees currently refundable in shop and presentment currencies.
TaxSet *MoneyBag `json:"taxSet,omitempty"` // The monetary value of the tax allocated to shipping fees to be refunded in shop and presentment currencies.
AmountSet *MoneyBag `json:"amountSet,omitempty"` // The monetary value of the shipping fees to be refunded in shop and presentment currencies.
}
Represents the shipping costs refunded on the Refund.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShippingRefund
type Shop ¶
type Shop struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The shop's name.
Description string `json:"description"` // The shop's meta description used in search engine results.
Email string `json:"email"` // The shop owner's email address. Shopify will use this email address to communicate with the shop owner.
ShopOwnerName string `json:"shopOwnerName"` // The name of the shop owner.
AccountOwner *StaffMember `json:"accountOwner,omitempty"` // Account owner information.
MyShopifyDomain string `json:"myshopifyDomain"` // The shop's .myshopify.com domain name.
PrimaryDomain *Domain `json:"primaryDomain,omitempty"` // The primary domain of the shop's online store.
Alerts []ShopAlert `json:"alerts"` // A list of the shop's active alert messages that appear in the Shopify admin.
AllProductCategoriesList []TaxonomyCategory `json:"allProductCategoriesList"` // A list of the shop's product categories. Limit: 1000 product categories.
AvailableChannelApps *AppConnection `json:"availableChannelApps,omitempty"` // The list of sales channels not currently installed on the shop.
BillingAddress *ShopAddress `json:"billingAddress,omitempty"` // The shop's billing address information.
ChannelDefinitionsForInstalledChannels []AvailableChannelDefinitionsByChannel `json:"channelDefinitionsForInstalledChannels"` // List of all channel definitions associated with a shop.
CheckoutAPISupported bool `json:"checkoutApiSupported"` // Specifies whether the shop supports checkouts via Checkout API.
ContactEmail string `json:"contactEmail"` // The public-facing contact email address for the shop. Customers will use this email to communicate with the shop owner.
CountriesInShippingZones *CountriesInShippingZones `json:"countriesInShippingZones,omitempty"` // Countries that have been defined in shipping zones for the shop.
CurrencyCode CurrencyCode `json:"currencyCode"` // The three letter code for the currency that the shop sells in.
CurrencyFormats *CurrencyFormats `json:"currencyFormats,omitempty"` // How currencies are displayed on your store.
CurrencySettings *CurrencySettingConnection `json:"currencySettings,omitempty"` // The presentment currency settings for the shop excluding the shop's own currency.
CustomerAccounts ShopCustomerAccountSetting `json:"customerAccounts"` // Whether customer accounts are required, optional, or disabled for the shop.
CustomerAccountsV2 *CustomerAccountsV2 `json:"customerAccountsV2,omitempty"` // Information about the shop's customer accounts.
CustomerTags *StringConnection `json:"customerTags,omitempty"` // A list of tags that have been added to customer accounts.
DraftOrderTags *StringConnection `json:"draftOrderTags,omitempty"` // A list of tags that have been added to draft orders.
EnabledPresentmentCurrencies []CurrencyCode `json:"enabledPresentmentCurrencies"` // The presentment currencies enabled for the shop.
Features *ShopFeatures `json:"features,omitempty"` // The set of features enabled for the shop.
FulfillmentServices []FulfillmentService `json:"fulfillmentServices"` // List of the shop's installed fulfillment services.
IanaTimezone string `json:"ianaTimezone"` // The shop's time zone as defined by the IANA.
MarketingSMSConsentEnabledAtCheckout bool `json:"marketingSmsConsentEnabledAtCheckout"` // Whether SMS marketing has been enabled on the shop's checkout configuration settings.
MerchantApprovalSignals *MerchantApprovalSignals `json:"merchantApprovalSignals,omitempty"` // The approval signals for a shop to support onboarding to channel apps.
Metafield *Metafield `json:"metafield,omitempty"` // A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.
Metafields *MetafieldConnection `json:"metafields,omitempty"` // A list of custom fields that a merchant associates with a Shopify resource.
OrderNumberFormatPrefix string `json:"orderNumberFormatPrefix"` // The prefix that appears before order numbers.
OrderNumberFormatSuffix string `json:"orderNumberFormatSuffix"` // The suffix that appears after order numbers.
OrderTags *StringConnection `json:"orderTags,omitempty"` // A list of tags that have been added to orders.
PaymentSettings *PaymentSettings `json:"paymentSettings,omitempty"` // The shop's settings related to payments.
Plan *ShopPlan `json:"plan,omitempty"` // The shop's billing plan.
ResourceLimits *ShopResourceLimits `json:"resourceLimits,omitempty"` // The shop's limits for specific resources. For example, the maximum number ofvariants allowed per product, or the maximum number of locations allowed.
RichTextEditorURL URL `json:"richTextEditorUrl"` // The URL of the rich text editor that can be used for mobile devices.
Search *SearchResultConnection `json:"search,omitempty"` // Fetches a list of admin search results by a specified query.
SearchFilters *SearchFilterOptions `json:"searchFilters,omitempty"` // The list of search filter options for the shop. These can be used to filter productvisibility for the shop.
SetupRequired bool `json:"setupRequired"` // Whether the shop has outstanding setup steps.
ShipsToCountries []CountryCode `json:"shipsToCountries"` // The list of countries that the shop ships to.
ShopPolicies []ShopPolicy `json:"shopPolicies"` // The list of all legal policies associated with a shop.
StorefrontAccessTokens *StorefrontAccessTokenConnection `json:"storefrontAccessTokens,omitempty"` // The storefront access token of a private application. These are scoped per-application.
TaxesIncluded bool `json:"taxesIncluded"` // Whether applicable taxes are included in the shop's product prices.
TaxShipping bool `json:"taxShipping"` // Whether the shop charges taxes for shipping.
TimezoneAbbreviation string `json:"timezoneAbbreviation"` // The shop's time zone abbreviation.
TimezoneOffset string `json:"timezoneOffset"` // The shop's time zone offset.
TimezoneOffsetMinutes int `json:"timezoneOffsetMinutes"` // The shop's time zone offset expressed as a number of minutes.
TransactionalSMSDisabled bool `json:"transactionalSmsDisabled"` // Whether transactional SMS sent by Shopify have been disabled for a shop.
Translations []Translation `json:"translations"` // The published translations associated with the resource.
UnitSystem UnitSystem `json:"unitSystem"` // The shop's unit system for weights and measures.
URL URL `json:"url"` // The URL of the shop's online store.
WeightUnit WeightUnit `json:"weightUnit"` // The shop's primary unit of weight for products and shipping.
CreatedAt DateTime `json:"createdAt"` // The date and time when the shop was created.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the shop was last updated.
}
Returns the Shop resource corresponding to the access token used in the request. The Shop resource contains business and store management settings for the shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/queries/shop
type ShopAddress ¶
type ShopAddress struct {
Address1 string `json:"address1"` // The first line of the address. Typically the street address or PO Box number.
Address2 string `json:"address2"` // The second line of the address. Typically the number of the apartment, suite, or unit.
Company string `json:"company"` // The name of the company or organization.
City string `json:"city"` // The name of the city, district, village, or town.
Province string `json:"province"` // The region of the address, such as the province, state, or district.
ProvinceCode string `json:"provinceCode"` // The alphanumeric code for the region. For example, `ON`.
Country string `json:"country"` // The name of the country.
CountryCode CountryCode `json:"countryCode"` // The two-letter code for the country of the address. For example, `US`.
Formatted []string `json:"formatted"` // A formatted version of the address, customized by the provided arguments.
FormattedArea string `json:"formattedArea"` // A comma-separated list of the values for city, province, and country.
Latitude string `json:"latitude"` // The latitude coordinate of the address.
Longitude string `json:"longitude"` // The longitude coordinate of the address.
CoordinatesValidated bool `json:"coordinatesValidated"` // Whether the address coordinates are valid.
Phone string `json:"phone"` // A phone number associated with the address. Formatted using E.164 standard. For example, +16135551111.
Zip string `json:"zip"` // The zip or postal code of the address.
}
An address for a shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopAddress
type ShopAlert ¶
type ShopAlert struct {
Action *ShopAlertAction `json:"action,omitempty"` // The text for the button in the alert that links to related information. For example, Add credit card.
Description string `json:"description"` // A description of the alert and further information, such as whether the merchant will be charged.
}
An alert message that appears in the Shopify admin about a problem with a store setting, with an action to take. For example, you could show an alert to ask the merchant to enter their billing information to activate Shopify Plus.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopAlert
type ShopAlertAction ¶
type ShopAlertAction struct {
Title string `json:"title"` // The text for the button in the alert. For example, Add credit card.
URL URL `json:"url"` // The target URL that the button links to.
}
An action associated to a shop alert, such as adding a credit card.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopAlertAction
type ShopBranding ¶
type ShopBranding string
Possible branding of a shop. Branding can be used to define the look of a shop including its styling and logo in the Shopify Admin.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopBranding
const ( ShopBrandingRogers ShopBranding = "ROGERS" // Shop has Rogers branding. ShopBrandingShopify ShopBranding = "SHOPIFY" // Shop has Shopify branding. ShopBrandingShopifyGold ShopBranding = "SHOPIFY_GOLD" // Shop has Shopify Gold branding. ShopBrandingShopifyPlus ShopBranding = "SHOPIFY_PLUS" // Shop has Shopify Plus branding. )
type ShopCustomerAccountSetting ¶
type ShopCustomerAccountSetting string
Represents the shop's customer account requirement preference.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopCustomerAccountsSetting
const ( ShopCustomerAccountSettingDisabled ShopCustomerAccountSetting = "DISABLED" ShopCustomerAccountSettingOptional ShopCustomerAccountSetting = "OPTIONAL" ShopCustomerAccountSettingRequired ShopCustomerAccountSetting = "REQUIRED" )
func (ShopCustomerAccountSetting) Validate ¶
func (category ShopCustomerAccountSetting) Validate() error
Validate ShopCustomerAccountSetting
type ShopFeatures ¶
type ShopFeatures struct {
AvalaraAvaTax bool `json:"avalaraAvatax"` // Whether a shop has access to Avalara AvaTax.
Branding ShopBranding `json:"branding"` // The branding of the shop, which influences its look and feel in the Shopify admin.
Bundles *BundlesFeature `json:"bundles,omitempty"` // Represents the Bundles feature configuration for the shop.
Captcha bool `json:"captcha"` // Whether a shop's online store can have CAPTCHA protection.
CartTransform *CartTransformFeature // Represents the cart transform feature configuration for the shop.
DynamicRemarketing bool `json:"dynamicRemarketing"` // Whether a shop has access to the Google Analytics dynamic remarketing feature.
EligibleForSubscriptionMigration bool `json:"eligibleForSubscriptionMigration"` // Whether a shop can be migrated to use Shopify subscriptions.
EligibleForSubscriptions bool `json:"eligibleForSubscriptions"` // Whether a shop is configured properly to sell subscriptions.
GiftCards bool `json:"giftCards"` // Whether a shop can create gift cards.
HarmonizedSystemCode bool `json:"harmonizedSystemCode"` // Whether a shop displays Harmonized System codes on products. This is used for customs when shipping internationally.
InternationalPriceOverrides bool `json:"internationalPriceOverrides"` // Whether a shop can enable international price overrides.
InternationalPriceRules bool `json:"internationalPriceRules"` // Whether a shop can enable international price rules.
LegacySubscriptionGatewayEnabled bool `json:"legacySubscriptionGatewayEnabled"` // Whether a shop has enabled a legacy subscription gateway to handle older subscriptions.
LiveView bool `json:"liveView"` // Whether to show the Live View metrics in the Shopify admin. Live view is hidden from merchants that are on a trial or don't have a storefront.
PaypalExpressSubscriptionsGatewayStatus PaypalExpressSubscriptionsGatewayStatus `json:"paypalExpressSubscriptionsGatewayStatus"` // Whether a shop is configured to sell subscriptions with PayPal Express.
Reports bool `json:"reports"` // Whether a shop has access to all reporting features.
SellsSubscriptions bool `json:"sellsSubscriptions"` // Whether a shop has ever had subscription products.
ShowMetrics bool `json:"showMetrics"` // Whether to show metrics in the Shopify admin. Metrics are hidden for new merchants until they become meaningful.
Storefront bool `json:"storefront"` // Whether a shop has an online store.
UsingShopifyBalance bool `json:"usingShopifyBalance"` // Whether a shop is using Shopify Balance.
}
Represents the feature set available to the shop. Most fields specify whether a feature is enabled for a shop, and some fields return information related to specific features.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopFeatures
type ShopLocale ¶
type ShopLocale struct {
Name string `json:"name"` // The human-readable locale name.
Locale string `json:"locale"` // The locale ISO code.
Primary bool `json:"primary"` // Whether the locale is the default locale for the shop.
Visible bool `json:"visible"` // Whether the locale is visible to buyers.
MarketWebPresence *MarketWebPresence // The market web presences that use the locale.
}
A locale that's been enabled on a shop.
Requires `read_locales` access scope or `read_markets_home` access scope.
type ShopPlan ¶
type ShopPlan struct {
DisplayName string `json:"displayName"` // The name of the shop's billing plan.
PartnerDevelopment bool `json:"partnerDevelopment"` // Whether the shop is a partner development shop for testing purposes.
ShopifyPlus bool `json:"shopifyPlus"` // Whether the shop has a Shopify Plus subscription.
}
The billing plan of the shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopPlan
type ShopPolicy ¶
type ShopPolicy struct {
ID string `json:"id"` // A globally-unique ID.
Type ShopPolicyType `json:"type"` // The shop policy type.
Title string `json:"title"` // The translated title of the policy. For example, Refund Policy or Politique de remboursement.
URL URL `json:"url"` // The public URL of the policy.
Body string `json:"body"` // The text of the policy. The maximum size is 512kb.
Translations []Translation `json:"translations"` // The published translations associated with the resource.
CreatedAt DateTime `json:"createdAt"` // The date and time (ISO 8601 format) when the policy was created.
UpdatedAt DateTime `json:"updatedAt"` // The date and time (ISO 8601 format) when the policy was last modified.
}
Policy that a merchant has configured for their store, such as their refund or privacy policy.
Reference: Requires `read_legal_policies` access scope.
type ShopPolicyType ¶
type ShopPolicyType string
Available shop policy types.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopPolicyType
const ( ShopPolicyTypeContactInformation ShopPolicyType = "CONTACT_INFORMATION" // The contact information. ShopPolicyTypeLegalNotice ShopPolicyType = "LEGAL_NOTICE" // The legal notice. ShopPolicyTypePrivacyPolicy ShopPolicyType = "PRIVACY_POLICY" // The privacy policy. ShopPolicyTypeRefundPolicy ShopPolicyType = "REFUND_POLICY" // The refund policy. ShopPolicyTypeShippingPolicy ShopPolicyType = "SHIPPING_POLICY" // The shipping policy. ShopPolicyTypeSubscriptionPolicy ShopPolicyType = "SUBSCRIPTION_POLICY" // The cancellation policy. ShopPolicyTypeTermsOfSale ShopPolicyType = "TERMS_OF_SALE" // The terms of sale. ShopPolicyTypeTermsOfService ShopPolicyType = "TERMS_OF_SERVICE" // The terms of service. )
func (ShopPolicyType) Validate ¶
func (branding ShopPolicyType) Validate() error
Validate ShopPolicyType
type ShopResourceLimits ¶
type ShopResourceLimits struct {
LocationLimit int `json:"locationLimit"` // Maximum number of locations allowed.
MaxProductOptions int `json:"maxProductOptions"` // Maximum number of product options allowed.
MaxProductVariants int `json:"maxProductVariants"` // The maximum number of variants allowed per product.
RedirectLimitReached bool `json:"redirectLimitReached"` // Whether the shop has reached the limit of the number of URL redirects it can make for resources.
}
Resource limits of a shop.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopResourceLimits
type ShopifyPaymentsAccount ¶
type ShopifyPaymentsAccount struct {
ID string `json:"id"` // A globally-unique ID.
AccountOpenerName string `json:"accountOpenerName"` // The name of the account opener.
Activated bool `json:"activated"` // Whether the Shopify Payments setup is completed.
Balance []MoneyV2 `json:"balance,omitempty"` // Current balances in all currencies for the account.
BalanceTransactions *ShopifyPaymentsBalanceTransactionConnection `json:"balanceTransactions,omitempty"` // A list of balance transactions associated with the shop.
BankAccounts *ShopifyPaymentsBankAccountConnection `json:"bankAccounts,omitempty"` // All bank accounts configured for the Shopify Payments account.
ChargeStatementDescriptors *ShopifyPaymentsChargeStatementDescriptor `json:"chargeStatementDescriptors,omitempty"` // The statement descriptors used for charges. These descriptors appear on a customer's credit card or bank statement when they make a purchase.
Country string `json:"country"` // The Shopify Payments account country.
DefaultCurrency CurrencyCode `json:"defaultCurrency"` // The default payout currency for the Shopify Payments account.
Disputes *ShopifyPaymentsDisputeConnection `json:"disputes,omitempty"` // All disputes that originated from a transaction made with the Shopify Payments account.
Onboardable bool `json:"onboardable"` // Whether the Shopify Payments account can be onboarded.
Payouts *ShopifyPaymentsPayoutConnection `json:"payouts,omitempty"` // All current and previous payouts made between the account and the bank account.
PayoutSchedule *ShopifyPaymentsPayoutSchedule `json:"payoutSchedule,omitempty"` // The payout schedule for the account.
PayoutStatementDescriptor string `json:"payoutStatementDescriptor"` // The descriptor used for payouts. The descriptor appears on a merchant's bank statement when they receive a payout.
}
Balance and payout information for a Shopify Payments account. Balance includes all balances for the currencies supported by the shop. You can also query for a list of payouts, where each payout includes the corresponding `currencyCode` field.
Requires the `read_shopify_payments` or the `read_shopify_payments_accounts` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsAccount
type ShopifyPaymentsAdjustmentOrder ¶
type ShopifyPaymentsAdjustmentOrder struct {
Name string `json:"name"` // The name of the adjustment order.
OrderTransactionID string `json:"orderTransactionId"` // The ID of the order transaction.
Link URL `json:"link"` // The link to the adjustment order.
Amount *MoneyV2 `json:"amount,omitempty"` // The amount of the adjustment order.
}
The adjustment order object.
Requires The user must have access to payouts.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsAdjustmentOrder
type ShopifyPaymentsAssociatedOrder ¶
type ShopifyPaymentsAssociatedOrder struct {
ID string `json:"id"` // The ID of the associated order.
Name string `json:"name"` // The name of the associated order.
}
The order associated to the balance transaction.
Requires The user must have access to payouts.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsAssociatedOrder
type ShopifyPaymentsBalanceTransaction ¶
type ShopifyPaymentsBalanceTransaction struct {
ID string `json:"id"` // A globally-unique ID.
SourceID string `json:"sourceId"` // The ID of the resource leading to the transaction.
SourceOrderTransactionID string `json:"sourceOrderTransactionId"` // The id of the Order Transaction that resulted in this balance transaction.
Type ShopifyPaymentsTransactionType `json:"type"` // The type of transaction.
SourceType ShopifyPaymentsSourceType `json:"sourceType"` // The source type of the balance transaction.
AssociatedOrder *ShopifyPaymentsAssociatedOrder `json:"associatedOrder,omitempty"` // The associated order for the balance transaction.
AssociatedPayout *ShopifyPaymentsBalanceTransactionAssociatedPayout `json:"associatedPayout,omitempty"` // Payout assoicated with the transaction.
AdjustmentOrders []ShopifyPaymentsAdjustmentOrder `json:"adjustmentOrders"` // The adjustment orders associated to the transaction.
AdjustmentReason string `json:"adjustmentReason"` // The reason for the adjustment that's associated with the transaction. If the source_type isn't an adjustment, the value will be null.
Test bool `json:"test"` // Whether the tranaction was created in test mode.
TransactionDate DateTime `json:"transactionDate"` // The date and time when the balance transaction was processed.
Amount *MoneyV2 `json:"amount,omitempty"` // The amount contributing to the balance transaction.
Fee *MoneyV2 `json:"fee,omitempty"` // The fee amount contributing to the balance transaction.
Net *MoneyV2 `json:"net,omitempty"` // The net amount contributing to the merchant's balance.
}
A transaction that contributes to a Shopify Payments account balance.
Requires The user must have access to payouts.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBalanceTransaction
type ShopifyPaymentsBalanceTransactionAssociatedPayout ¶
type ShopifyPaymentsBalanceTransactionAssociatedPayout struct {
ID string `json:"id"` // The ID of the payout associated with the balance transaction.
Status ShopifyPaymentsBalanceTransactionPayoutStatus `json:"status"` // The status of the payout associated with the balance transaction.
}
The payout associated with a balance transaction.
Requires The user must have access to payouts.
type ShopifyPaymentsBalanceTransactionConnection ¶
type ShopifyPaymentsBalanceTransactionConnection struct {
Edges []ShopifyPaymentsBalanceTransactionEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ShopifyPaymentsBalanceTransaction `json:"nodes,omitempty"` // A list of nodes that are contained in ShopifyPaymentsBalanceTransactionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ShopifyPaymentsBalanceTransactions.
type ShopifyPaymentsBalanceTransactionEdge ¶
type ShopifyPaymentsBalanceTransactionEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ShopifyPaymentsBalanceTransaction `json:"node"` // The item at the end of ShopifyPaymentsBalanceTransactionEdge.
}
An auto-generated type which holds one ShopifyPaymentsBalanceTransaction and a cursor during pagination.
type ShopifyPaymentsBalanceTransactionPayoutStatus ¶
type ShopifyPaymentsBalanceTransactionPayoutStatus string
The payout status of the balance transaction.
const ( ShopifyPaymentsBalanceTransactionPayoutStatusActionRequired ShopifyPaymentsBalanceTransactionPayoutStatus = "ACTION_REQUIRED" // The transaction requires action before it can be paid out. ShopifyPaymentsBalanceTransactionPayoutStatusCanceled ShopifyPaymentsBalanceTransactionPayoutStatus = "CANCELED" // The payout has been canceled by Shopify. ShopifyPaymentsBalanceTransactionPayoutStatusFailed ShopifyPaymentsBalanceTransactionPayoutStatus = "FAILED" // The payout has been declined by the bank. ShopifyPaymentsBalanceTransactionPayoutStatusPaid ShopifyPaymentsBalanceTransactionPayoutStatus = "PAID" // The payout has been successfully deposited into the bank. ShopifyPaymentsBalanceTransactionPayoutStatusPending ShopifyPaymentsBalanceTransactionPayoutStatus = "PENDING" // The transaction has not been assigned a payout yet. ShopifyPaymentsBalanceTransactionPayoutStatusScheduled ShopifyPaymentsBalanceTransactionPayoutStatus = "SCHEDULED" // The payout has been created and had transactions assigned to it, but it has not yet been submitted to the bank. ShopifyPaymentsBalanceTransactionPayoutStatusInTransit ShopifyPaymentsBalanceTransactionPayoutStatus = "IN_TRANSIT" // (Deprecated) The payout has been submitted to the bank. Use `SCHEDULED` instead. )
func (ShopifyPaymentsBalanceTransactionPayoutStatus) Validate ¶
func (s ShopifyPaymentsBalanceTransactionPayoutStatus) Validate() error
Validate ShopifyPaymentsBalanceTransactionPayoutStatus
type ShopifyPaymentsBankAccount ¶
type ShopifyPaymentsBankAccount struct {
ID string `json:"id"` //
AccountNumberLastDigits string `json:"accountNumberLastDigits"` // The last digits of the account number (the rest is redacted).
BankName string `json:"bankName"` // The name of the bank.
Country CountryCode `json:"country"` // The country of the bank.
Currency CurrencyCode `json:"currency"` // The currency of the bank account.
Status ShopifyPaymentsBankAccountStatus `json:"status"` // The status of the bank account.
Payouts *ShopifyPaymentsPayoutConnection `json:"payouts,omitempty"` // All current and previous payouts made between the account and the bank account.
CreatedAt DateTime `json:"createdAt"` // The date that the bank account was created.
}
A bank account that can receive payouts.
Requires `read_shopify_payments_bank_accounts` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBankAccount
type ShopifyPaymentsBankAccountConnection ¶
type ShopifyPaymentsBankAccountConnection struct {
Edges []ShopifyPaymentsBankAccountEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ShopifyPaymentsBankAccount `json:"nodes,omitempty"` // A list of nodes that are contained in ShopifyPaymentsBankAccountEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ShopifyPaymentsBankAccounts.
type ShopifyPaymentsBankAccountEdge ¶
type ShopifyPaymentsBankAccountEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ShopifyPaymentsBankAccount `json:"node"` // The item at the end of ShopifyPaymentsBankAccountEdge.
}
An auto-generated type which holds one ShopifyPaymentsBankAccount and a cursor during pagination.
type ShopifyPaymentsBankAccountStatus ¶
type ShopifyPaymentsBankAccountStatus string
The bank account status.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyPaymentsBankAccountStatus
const ( ShopifyPaymentsBankAccountStatusErrored ShopifyPaymentsBankAccountStatus = "ERRORED" // A payout to the bank account failed. ShopifyPaymentsBankAccountStatusNew ShopifyPaymentsBankAccountStatus = "NEW" // A bank account that hasn't had any activity and that's not validated. ShopifyPaymentsBankAccountStatusValidated ShopifyPaymentsBankAccountStatus = "VALIDATED" // It was determined that the bank account exists. ShopifyPaymentsBankAccountStatusVerified ShopifyPaymentsBankAccountStatus = "VERIFIED" // Bank account validation was successful. )
func (ShopifyPaymentsBankAccountStatus) Validate ¶
func (status ShopifyPaymentsBankAccountStatus) Validate() error
Validate ShopifyPaymentsBankAccountStatus
type ShopifyPaymentsChargeStatementDescriptor ¶
type ShopifyPaymentsChargeStatementDescriptor struct {
Default string `json:"default"` // The default charge statement descriptor.
Prefix string `json:"prefix"` // The prefix of the statement descriptor.
}
The charge descriptors for a payments account.
Requires `read_shopify_payments` access scope.
type ShopifyPaymentsDispute ¶
type ShopifyPaymentsDispute struct {
ID string `json:"id"` // A globally-unique ID.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
Type DisputeType `json:"type"` // Indicates if this dispute is still in the inquiry phase or has turned into a chargeback.
Status DisputeStatus `json:"status"` // The current state of the dispute.
Order *Order `json:"order,omitempty"` // The order that contains the charge that's under dispute.
ReasonDetails *ShopifyPaymentsDisputeReasonDetails `json:"reasonDetails,omitempty"` // The reason of the dispute.
InitiatedAt DateTime `json:"initiatedAt"` // The date when this dispute was initiated.
FinalizedOn Date `json:"finalizedOn"` // The date when this dispute was resolved. Returns null if the dispute isn't yet resolved.
EvidenceDueBy Date `json:"evidenceDueBy"` // The deadline for evidence submission.
EvidenceSetOn Date `json:"evidenceSetOn"` // The date when evidence was sent. Returns null if evidence hasn't yet been sent.
Amount *MoneyV2 `json:"amount,omitempty"` // The total amount disputed by the cardholder.
}
A dispute occurs when a buyer questions the legitimacy of a charge with their financial institution.
Requires User must have `read_shopify_payments_disputes` access.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsDispute
type ShopifyPaymentsDisputeConnection ¶
type ShopifyPaymentsDisputeConnection struct {
Edges []ShopifyPaymentsDisputeEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ShopifyPaymentsDispute `json:"nodes,omitempty"` // A list of nodes that are contained in ShopifyPaymentsDisputeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ShopifyPaymentsDisputes.
type ShopifyPaymentsDisputeEdge ¶
type ShopifyPaymentsDisputeEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ShopifyPaymentsDispute `json:"node"` // The item at the end of ShopifyPaymentsDisputeEdge.
}
An auto-generated type which holds one ShopifyPaymentsDispute and a cursor during pagination.
type ShopifyPaymentsDisputeReason ¶
type ShopifyPaymentsDisputeReason string
The reason for the dispute provided by the cardholder's bank.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyPaymentsDisputeReason
const ( ShopifyPaymentsDisputeReasonBankCannotProcess ShopifyPaymentsDisputeReason = "BANK_CANNOT_PROCESS" // The customer's bank can't process the charge. ShopifyPaymentsDisputeReasonCreditNotProcessed ShopifyPaymentsDisputeReason = "CREDIT_NOT_PROCESSED" // The customer claims that the purchased product was returned or the transaction was otherwise canceled, but you haven't yet provided a refund or credit. ShopifyPaymentsDisputeReasonCustomerInitiated ShopifyPaymentsDisputeReason = "CUSTOMER_INITIATED" // The customer initiated the dispute. Contact the customer for additional details on why the payment was disputed. ShopifyPaymentsDisputeReasonDebitNotAuthorized ShopifyPaymentsDisputeReason = "DEBIT_NOT_AUTHORIZED" // The customer's bank can't proceed with the debit since it hasn't been authorized. ShopifyPaymentsDisputeReasonDuplicate ShopifyPaymentsDisputeReason = "DUPLICATE" // The customer claims they were charged multiple times for the same product or service. ShopifyPaymentsDisputeReasonFraudulent ShopifyPaymentsDisputeReason = "FRAUDULENT" // The cardholder claims that they didn’t authorize the payment. ShopifyPaymentsDisputeReasonGeneral ShopifyPaymentsDisputeReason = "GENERAL" // The dispute is uncategorized, so you should contact the customer for additional details to find out why the payment was disputed. ShopifyPaymentsDisputeReasonIncorrectAccountDetails ShopifyPaymentsDisputeReason = "INCORRECT_ACCOUNT_DETAILS" // The customer account associated with the purchase is incorrect. ShopifyPaymentsDisputeReasonInsufficientFunds ShopifyPaymentsDisputeReason = "INSUFFICIENT_FUNDS" // The customer's bank account has insufficient funds. ShopifyPaymentsDisputeReasonProductNotReceived ShopifyPaymentsDisputeReason = "PRODUCT_NOT_RECEIVED" // The customer claims they did not receive the products or services purchased. ShopifyPaymentsDisputeReasonProductUnacceptable ShopifyPaymentsDisputeReason = "PRODUCT_UNACCEPTABLE" // The product or service was received but was defective, damaged, or not as described. ShopifyPaymentsDisputeReasonSubscriptionCancelled ShopifyPaymentsDisputeReason = "SUBSCRIPTION_CANCELLED" // The customer claims that you continued to charge them after a subscription was canceled. ShopifyPaymentsDisputeReasonUnrecognized ShopifyPaymentsDisputeReason = "UNRECOGNIZED" // The customer doesn’t recognize the payment appearing on their card statement. )
func (ShopifyPaymentsDisputeReason) Validate ¶
func (t ShopifyPaymentsDisputeReason) Validate() error
Validate ShopifyPaymentsDisputeReason
type ShopifyPaymentsDisputeReasonDetails ¶
type ShopifyPaymentsDisputeReasonDetails struct {
Reason ShopifyPaymentsDisputeReason `json:"reason"` // The reason for the dispute provided by the cardholder's banks.
NetworkReasonCode string `json:"networkReasonCode"` // The raw code provided by the payment network.
}
Details regarding a dispute reason.
Requires User must have `read_shopify_payments_disputes` access.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsDisputeReasonDetails
type ShopifyPaymentsExtendedAuthorization ¶
type ShopifyPaymentsExtendedAuthorization struct {
ExtendedAuthorizationExpiresAt DateTime `json:"extendedAuthorizationExpiresAt"` // The time after which the extended authorization expires. After the expiry, the merchant is unable to capture the payment.
StandardAuthorizationExpiresAt DateTime `json:"standardAuthorizationExpiresAt"` // The time after which capture will incur an additional fee.
}
Presents all Shopify Payments information related to an extended authorization.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsExtendedAuthorization
type ShopifyPaymentsPayout ¶
type ShopifyPaymentsPayout struct {
ID string `json:"id"` // A globally-unique ID.
LegacyResourceID string `json:"legacyResourceId"` // The ID of the corresponding resource in the REST Admin API.
Status ShopifyPaymentsPayoutStatus `json:"status"` // The transfer status of the payout.
BusinessEntity *BusinessEntity `json:"businessEntity,omitempty"` // The business entity associated with the payout.
Net *MoneyV2 `json:"net,omitempty"` // The total amount and currency of the payout.
Summary *ShopifyPaymentsPayoutSummary `json:"summary,omitempty"` // The summary of the payout.
TransactionType ShopifyPaymentsPayoutTransactionType `json:"transactionType"` // The direction of the payout.
IssuedAt DateTime `json:"issuedAt"` // The exact time when the payout was issued. The payout only contains balance transactions that were available at this time.
}
Payouts represent the movement of money between a merchant's Shopify Payments balance and their bank account.
Requires The user must have access to payouts.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayout
type ShopifyPaymentsPayoutConnection ¶
type ShopifyPaymentsPayoutConnection struct {
Edges []ShopifyPaymentsPayoutEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []ShopifyPaymentsPayout `json:"nodes,omitempty"` // A list of nodes that are contained in ShopifyPaymentsPayoutEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple ShopifyPaymentsPayouts.
type ShopifyPaymentsPayoutEdge ¶
type ShopifyPaymentsPayoutEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *ShopifyPaymentsPayout `json:"node"` // The item at the end of ShopifyPaymentsPayoutEdge.
}
An auto-generated type which holds one ShopifyPaymentsPayout and a cursor during pagination.
type ShopifyPaymentsPayoutInterval ¶
type ShopifyPaymentsPayoutInterval string
The interval at which payouts are sent to the connected bank account.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyPaymentsPayoutInterval
const ( ShopifyPaymentsPayoutIntervalDaily ShopifyPaymentsPayoutInterval = "DAILY" // Each business day. ShopifyPaymentsPayoutIntervalWeekly ShopifyPaymentsPayoutInterval = "WEEKLY" // Each week, on the day of week specified by weeklyAnchor. ShopifyPaymentsPayoutIntervalMonthly ShopifyPaymentsPayoutInterval = "MONTHLY" // Each month, on the day of month specified by monthlyAnchor. ShopifyPaymentsPayoutIntervalManual ShopifyPaymentsPayoutInterval = "MANUAL" // Payouts will not be automatically made. )
func (ShopifyPaymentsPayoutInterval) Validate ¶
func (interval ShopifyPaymentsPayoutInterval) Validate() error
Validate ShopifyPaymentsPayoutInterval
type ShopifyPaymentsPayoutSchedule ¶
type ShopifyPaymentsPayoutSchedule struct {
Interval ShopifyPaymentsPayoutInterval `json:"interval"` // The interval at which payouts are sent to the connected bank account.
// The day of the month funds will be paid out.
//
// The value can be any day of the month from the 1st to the 31st. If the payment interval is set to monthly, this value will be used.
// Payouts scheduled between 29-31st of the month are sent on the last day of shorter months.
MonthlyAnchor int `json:"monthlyAnchor"`
// The day of the week funds will be paid out.
//
// The value can be any weekday from Monday to Friday. If the payment interval is set to weekly, this value will be used.
WeeklyAnchor DayOfTheWeek `json:"weeklyAnchor"`
}
The payment schedule for a payments account.
Requires `read_shopify_payments` access scope. Also: User must have the `shopify_payments_transfers` permission.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayoutSchedule
type ShopifyPaymentsPayoutStatus ¶
type ShopifyPaymentsPayoutStatus string
The transfer status of the payout.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyPaymentsPayoutStatus
const ( ShopifyPaymentsPayoutStatusCanceled ShopifyPaymentsPayoutStatus = "CANCELED" // The payout has been canceled by Shopify. ShopifyPaymentsPayoutStatusFailed ShopifyPaymentsPayoutStatus = "FAILED" // The payout has been declined by the bank. ShopifyPaymentsPayoutStatusPaid ShopifyPaymentsPayoutStatus = "PAID" // The payout has been successfully deposited into the bank. ShopifyPaymentsPayoutStatusScheduled ShopifyPaymentsPayoutStatus = "SCHEDULED" // The payout has been created and had transactions assigned to it, but it has not yet been submitted to the bank. ShopifyPaymentsPayoutStatusInTransit ShopifyPaymentsPayoutStatus = "IN_TRANSIT" // (Deprecated) The payout has been submitted to the bank. Use `SCHEDULED` instead. )
func (ShopifyPaymentsPayoutStatus) Validate ¶
func (status ShopifyPaymentsPayoutStatus) Validate() error
Validate ShopifyPaymentsPayoutStatus
type ShopifyPaymentsPayoutSummary ¶
type ShopifyPaymentsPayoutSummary struct {
AdjustmentsFee *MoneyV2 `json:"adjustmentsFee,omitempty"` // Total fees for all adjustments including disputes.
AdjustmentsGross *MoneyV2 `json:"adjustmentsGross,omitempty"` // Total gross amount for all adjustments including disputes.
AdvanceFees *MoneyV2 `json:"advanceFees,omitempty"` // Total fees for all advances.
AdvanceGross *MoneyV2 `json:"advanceGross,omitempty"` // Total gross amount for all advances.
ChargesFee *MoneyV2 `json:"chargesFee,omitempty"` // Total fees for all charges.
ChargesGross *MoneyV2 `json:"chargesGross,omitempty"` // Total gross amount for all charges.
RefundsFee *MoneyV2 `json:"refundsFee,omitempty"` // Total fees for all refunds.
RefundsFeeGross *MoneyV2 `json:"refundsFeeGross,omitempty"` // Total gross amount for all refunds.
ReservedFundsFee *MoneyV2 `json:"reservedFundsFee,omitempty"` // Total fees for all reserved funds.
ReservedFundsGross *MoneyV2 `json:"reservedFundsGross,omitempty"` // Total gross amount for all reserved funds.
RetriedPayoutsFee *MoneyV2 `json:"retriedPayoutsFee,omitempty"` // Total fees for all retried payouts.
RetriedPayoutsGross *MoneyV2 `json:"retriedPayoutsGross,omitempty"` // Total gross amount for all retried payouts.
}
Breakdown of the total fees and gross of each of the different types of transactions associated with the payout.
Requires The user must have access to payouts.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsPayoutSummary
type ShopifyPaymentsPayoutTransactionType ¶
type ShopifyPaymentsPayoutTransactionType string
The possible transaction types for a payout.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyPaymentsPayoutTransactionType
const ( ShopifyPaymentsPayoutTransactionTypeDeposit ShopifyPaymentsPayoutTransactionType = "DEPOSIT" // The payout is a deposit. ShopifyPaymentsPayoutTransactionTypeWithdrawal ShopifyPaymentsPayoutTransactionType = "WITHDRAWAL" // The payout is a withdrawal. )
func (ShopifyPaymentsPayoutTransactionType) Validate ¶
func (t ShopifyPaymentsPayoutTransactionType) Validate() error
Validate ShopifyPaymentsPayoutTransactionType
type ShopifyPaymentsRefundSet ¶
type ShopifyPaymentsRefundSet struct {
AcquirerReferenceNumber string `json:"acquirerReferenceNumber"` // The acquirer reference number (ARN) code generated for Visa/Mastercard transactions.
}
Presents all Shopify Payments specific information related to an order refund.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsRefundSet
type ShopifyPaymentsSourceType ¶
type ShopifyPaymentsSourceType string
The possible source types for a balance transaction.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyPaymentsSourceType
const ( ShopifyPaymentsSourceTypeAdjustment ShopifyPaymentsSourceType = "ADJUSTMENT" // The adjustment source type. ShopifyPaymentsSourceTypeAdjustmentReversal ShopifyPaymentsSourceType = "ADJUSTMENT_REVERSAL" // The adjustment_reversal source type. ShopifyPaymentsSourceTypeCharge ShopifyPaymentsSourceType = "CHARGE" // The charge source type. ShopifyPaymentsSourceTypeDispute ShopifyPaymentsSourceType = "DISPUTE" // The dispute source type. ShopifyPaymentsSourceTypeRefund ShopifyPaymentsSourceType = "REFUND" // The refund source type. ShopifyPaymentsSourceTypeSystemAdjustment ShopifyPaymentsSourceType = "SYSTEM_ADJUSTMENT" // The system_adjustment source type. ShopifyPaymentsSourceTypeTransfer ShopifyPaymentsSourceType = "TRANSFER" // The transfer source type. )
func (ShopifyPaymentsSourceType) Validate ¶
func (t ShopifyPaymentsSourceType) Validate() error
Validate ShopifyPaymentsSourceType
type ShopifyPaymentsTransactionSet ¶
type ShopifyPaymentsTransactionSet struct {
ExtendedAuthorizationSet *ShopifyPaymentsExtendedAuthorization `json:"extendedAuthorizationSet,omitempty"` // Contains all fields related to an extended authorization.
RefundSet *ShopifyPaymentsRefundSet `json:"refundSet,omitempty"` // Contains all fields related to a refund.
}
Presents all Shopify Payments specific information related to an order transaction.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsTransactionSet
type ShopifyPaymentsTransactionType ¶
type ShopifyPaymentsTransactionType string
The possible types of transactions.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyPaymentsTransactionType
const ( ShopifyPaymentsTransactionTypeAdjustment ShopifyPaymentsTransactionType = "ADJUSTMENT" // The adjustment transaction type. ShopifyPaymentsTransactionTypeAdvance ShopifyPaymentsTransactionType = "ADVANCE" // The advance transaction type. ShopifyPaymentsTransactionTypeAdvanceFunding ShopifyPaymentsTransactionType = "ADVANCE_FUNDING" // The advance funding transaction type. ShopifyPaymentsTransactionTypeAnomalyCredit ShopifyPaymentsTransactionType = "ANOMALY_CREDIT" // The anomaly_credit transaction type. ShopifyPaymentsTransactionTypeAnomalyCreditReversal ShopifyPaymentsTransactionType = "ANOMALY_CREDIT_REVERSAL" // The anomaly_credit_reversal transaction type. ShopifyPaymentsTransactionTypeAnomalyDebit ShopifyPaymentsTransactionType = "ANOMALY_DEBIT" // The anomaly_debit transaction type. ShopifyPaymentsTransactionTypeAnomalyDebitReversal ShopifyPaymentsTransactionType = "ANOMALY_DEBIT_REVERSAL" // The anomaly_debit_reversal transaction type. ShopifyPaymentsTransactionTypeApplicationFeeRefund ShopifyPaymentsTransactionType = "APPLICATION_FEE_REFUND" // The application_fee_refund transaction type. ShopifyPaymentsTransactionTypeBalanceTransferInbound ShopifyPaymentsTransactionType = "BALANCE_TRANSFER_INBOUND" // The balance_transfer_inbound transaction type. ShopifyPaymentsTransactionTypeBillingDebit ShopifyPaymentsTransactionType = "BILLING_DEBIT" // The billing_debit transaction type. ShopifyPaymentsTransactionTypeBillingDebitReversal ShopifyPaymentsTransactionType = "BILLING_DEBIT_REVERSAL" // The billing_debit_reversal transaction type. ShopifyPaymentsTransactionTypeChannelCredit ShopifyPaymentsTransactionType = "CHANNEL_CREDIT" // The channel_credit transaction type. ShopifyPaymentsTransactionTypeChannelCreditReversal ShopifyPaymentsTransactionType = "CHANNEL_CREDIT_REVERSAL" // The channel_credit_reversal transaction type. ShopifyPaymentsTransactionTypeChannelPromotionCredit ShopifyPaymentsTransactionType = "CHANNEL_PROMOTION_CREDIT" // The channel_promotion_credit transaction type. ShopifyPaymentsTransactionTypeChannelPromotionCreditReversal ShopifyPaymentsTransactionType = "CHANNEL_PROMOTION_CREDIT_REVERSAL" // The channel_promotion_credit_reversal transaction type. ShopifyPaymentsTransactionTypeChannelTransferCredit ShopifyPaymentsTransactionType = "CHANNEL_TRANSFER_CREDIT" // The channel_transfer_credit transaction type. ShopifyPaymentsTransactionTypeChannelTransferCreditReversal ShopifyPaymentsTransactionType = "CHANNEL_TRANSFER_CREDIT_REVERSAL" // The channel_transfer_credit_reversal transaction type. ShopifyPaymentsTransactionTypeChannelTransferDebit ShopifyPaymentsTransactionType = "CHANNEL_TRANSFER_DEBIT" // The channel_transfer_debit transaction type. ShopifyPaymentsTransactionTypeChannelTransferDebitReversal ShopifyPaymentsTransactionType = "CHANNEL_TRANSFER_DEBIT_REVERSAL" // The channel_transfer_debit_reversal transaction type. ShopifyPaymentsTransactionTypeCharge ShopifyPaymentsTransactionType = "CHARGE" // The charge transaction type. ShopifyPaymentsTransactionTypeChargebackFee ShopifyPaymentsTransactionType = "CHARGEBACK_FEE" // The chargeback_fee transaction type. ShopifyPaymentsTransactionTypeChargebackFeeRefund ShopifyPaymentsTransactionType = "CHARGEBACK_FEE_REFUND" // The chargeback_fee_refund transaction type. ShopifyPaymentsTransactionTypeChargebackHold ShopifyPaymentsTransactionType = "CHARGEBACK_HOLD" // The chargeback_hold transaction type. ShopifyPaymentsTransactionTypeChargebackHoldRelease ShopifyPaymentsTransactionType = "CHARGEBACK_HOLD_RELEASE" // The chargeback_hold_release transaction type. ShopifyPaymentsTransactionTypeChargebackProtectionCredit ShopifyPaymentsTransactionType = "CHARGEBACK_PROTECTION_CREDIT" // The chargeback_protection_credit transaction type. ShopifyPaymentsTransactionTypeChargebackProtectionCreditReversal ShopifyPaymentsTransactionType = "CHARGEBACK_PROTECTION_CREDIT_REVERSAL" // The chargeback_protection_credit_reversal transaction type. ShopifyPaymentsTransactionTypeChargebackProtectionDebit ShopifyPaymentsTransactionType = "CHARGEBACK_PROTECTION_DEBIT" // The chargeback_protection_debit transaction type. ShopifyPaymentsTransactionTypeChargebackProtectionDebitReversal ShopifyPaymentsTransactionType = "CHARGEBACK_PROTECTION_DEBIT_REVERSAL" // The chargeback_protection_debit_reversal transaction type. ShopifyPaymentsTransactionTypeChargeAdjustment ShopifyPaymentsTransactionType = "CHARGE_ADJUSTMENT" // The charge_adjustment transaction type. ShopifyPaymentsTransactionTypeCollectionsCredit ShopifyPaymentsTransactionType = "COLLECTIONS_CREDIT" // The collections_credit transaction type. ShopifyPaymentsTransactionTypeCollectionsCreditReversal ShopifyPaymentsTransactionType = "COLLECTIONS_CREDIT_REVERSAL" // The collections_credit_reversal transaction type. ShopifyPaymentsTransactionTypeCustomsDuty ShopifyPaymentsTransactionType = "CUSTOMS_DUTY" // The customs_duty transaction type. ShopifyPaymentsTransactionTypeCustomsDutyAdjustment ShopifyPaymentsTransactionType = "CUSTOMS_DUTY_ADJUSTMENT" // The customs_duty_adjustment transaction type. ShopifyPaymentsTransactionTypeDisputeReversal ShopifyPaymentsTransactionType = "DISPUTE_REVERSAL" // The dispute_reversal transaction type. ShopifyPaymentsTransactionTypeDisputeWithdrawal ShopifyPaymentsTransactionType = "DISPUTE_WITHDRAWAL" // The dispute_withdrawal transaction type. ShopifyPaymentsTransactionTypeImportTax ShopifyPaymentsTransactionType = "IMPORT_TAX" // The import_tax transaction type. ShopifyPaymentsTransactionTypeImportTaxAdjustment ShopifyPaymentsTransactionType = "IMPORT_TAX_ADJUSTMENT" // The import_tax_adjustment transaction type. ShopifyPaymentsTransactionTypeMarketplaceFeeCredit ShopifyPaymentsTransactionType = "MARKETPLACE_FEE_CREDIT" // The marketplace_fee_credit transaction type. ShopifyPaymentsTransactionTypeMarketplaceFeeCreditReversal ShopifyPaymentsTransactionType = "MARKETPLACE_FEE_CREDIT_REVERSAL" // The marketplace_fee_credit_reversal transaction type. ShopifyPaymentsTransactionTypeMarketsProCredit ShopifyPaymentsTransactionType = "MARKETS_PRO_CREDIT" // The markets_pro_credit transaction type. ShopifyPaymentsTransactionTypeMerchantGoodwillCredit ShopifyPaymentsTransactionType = "MERCHANT_GOODWILL_CREDIT" // The merchant_goodwill_credit transaction type. ShopifyPaymentsTransactionTypeMerchantGoodwillCreditReversal ShopifyPaymentsTransactionType = "MERCHANT_GOODWILL_CREDIT_REVERSAL" // The merchant_goodwill_credit_reversal transaction type. ShopifyPaymentsTransactionTypeMerchantToMerchantCredit ShopifyPaymentsTransactionType = "MERCHANT_TO_MERCHANT_CREDIT" // The merchant_to_merchant_credit transaction type. ShopifyPaymentsTransactionTypeMerchantToMerchantCreditReversal ShopifyPaymentsTransactionType = "MERCHANT_TO_MERCHANT_CREDIT_REVERSAL" // The merchant_to_merchant_credit_reversal transaction type. ShopifyPaymentsTransactionTypeMerchantToMerchantDebit ShopifyPaymentsTransactionType = "MERCHANT_TO_MERCHANT_DEBIT" // The merchant_to_merchant_debit transaction type. ShopifyPaymentsTransactionTypeMerchantToMerchantDebitReversal ShopifyPaymentsTransactionType = "MERCHANT_TO_MERCHANT_DEBIT_REVERSAL" // The merchant_to_merchant_debit_reversal transaction type. ShopifyPaymentsTransactionTypePromotionCredit ShopifyPaymentsTransactionType = "PROMOTION_CREDIT" // The promotion_credit transaction type. ShopifyPaymentsTransactionTypePromotionCreditReversal ShopifyPaymentsTransactionType = "PROMOTION_CREDIT_REVERSAL" // The promotion_credit_reversal transaction type. ShopifyPaymentsTransactionTypeRefund ShopifyPaymentsTransactionType = "REFUND" // The refund transaction type. ShopifyPaymentsTransactionTypeRefundAdjustment ShopifyPaymentsTransactionType = "REFUND_ADJUSTMENT" // The refund_adjustment transaction type. ShopifyPaymentsTransactionTypeRefundFailure ShopifyPaymentsTransactionType = "REFUND_FAILURE" // The refund_failure transaction type. ShopifyPaymentsTransactionTypeReservedFunds ShopifyPaymentsTransactionType = "RESERVED_FUNDS" // The reserved_funds transaction type. ShopifyPaymentsTransactionTypeReservedFundsReversal ShopifyPaymentsTransactionType = "RESERVED_FUNDS_REVERSAL" // The reserved_funds_reversal transaction type. ShopifyPaymentsTransactionTypeReservedFundsWithdrawal ShopifyPaymentsTransactionType = "RESERVED_FUNDS_WITHDRAWAL" // The reserved_funds_withdrawal transaction type. ShopifyPaymentsTransactionTypeRiskReversal ShopifyPaymentsTransactionType = "RISK_REVERSAL" // The risk_reversal transaction type. ShopifyPaymentsTransactionTypeRiskWithdrawal ShopifyPaymentsTransactionType = "RISK_WITHDRAWAL" // The risk_withdrawal transaction type. ShopifyPaymentsTransactionTypeSellerProtectionCredit ShopifyPaymentsTransactionType = "SELLER_PROTECTION_CREDIT" // The seller_protection_credit transaction type. ShopifyPaymentsTransactionTypeSellerProtectionCreditReversal ShopifyPaymentsTransactionType = "SELLER_PROTECTION_CREDIT_REVERSAL" // The seller_protection_credit_reversal transaction type. ShopifyPaymentsTransactionTypeShippingLabel ShopifyPaymentsTransactionType = "SHIPPING_LABEL" // The shipping_label transaction type. ShopifyPaymentsTransactionTypeShippingLabelAdjustment ShopifyPaymentsTransactionType = "SHIPPING_LABEL_ADJUSTMENT" // The shipping_label_adjustment transaction type. ShopifyPaymentsTransactionTypeShippingLabelAdjustmentBase ShopifyPaymentsTransactionType = "SHIPPING_LABEL_ADJUSTMENT_BASE" // The shipping_label_adjustment_base transaction type. ShopifyPaymentsTransactionTypeShippingLabelAdjustmentSurcharge ShopifyPaymentsTransactionType = "SHIPPING_LABEL_ADJUSTMENT_SURCHARGE" // The shipping_label_adjustment_surcharge transaction type. ShopifyPaymentsTransactionTypeShippingOtherCarrierChargeAdjustment ShopifyPaymentsTransactionType = "SHIPPING_OTHER_CARRIER_CHARGE_ADJUSTMENT" // The shipping_other_carrier_charge_adjustment transaction type. ShopifyPaymentsTransactionTypeShippingReturnToOriginAdjustment ShopifyPaymentsTransactionType = "SHIPPING_RETURN_TO_ORIGIN_ADJUSTMENT" // The shipping_return_to_origin_adjustment transaction type. ShopifyPaymentsTransactionTypeShopifyCollectiveCredit ShopifyPaymentsTransactionType = "SHOPIFY_COLLECTIVE_CREDIT" // The shopify_collective_credit transaction type. ShopifyPaymentsTransactionTypeShopifyCollectiveCreditReversal ShopifyPaymentsTransactionType = "SHOPIFY_COLLECTIVE_CREDIT_REVERSAL" // The shopify_collective_credit_reversal transaction type. ShopifyPaymentsTransactionTypeShopifyCollectiveDebit ShopifyPaymentsTransactionType = "SHOPIFY_COLLECTIVE_DEBIT" // The shopify_collective_debit transaction type. ShopifyPaymentsTransactionTypeShopifyCollectiveDebitReversal ShopifyPaymentsTransactionType = "SHOPIFY_COLLECTIVE_DEBIT_REVERSAL" // The shopify_collective_debit_reversal transaction type. ShopifyPaymentsTransactionTypeShopifySourceCredit ShopifyPaymentsTransactionType = "SHOPIFY_SOURCE_CREDIT" // The shopify_source_credit transaction type. ShopifyPaymentsTransactionTypeShopifySourceCreditReversal ShopifyPaymentsTransactionType = "SHOPIFY_SOURCE_CREDIT_REVERSAL" // The shopify_source_credit_reversal transaction type. ShopifyPaymentsTransactionTypeShopifySourceDebit ShopifyPaymentsTransactionType = "SHOPIFY_SOURCE_DEBIT" // The shopify_source_debit transaction type. ShopifyPaymentsTransactionTypeShopifySourceDebitReversal ShopifyPaymentsTransactionType = "SHOPIFY_SOURCE_DEBIT_REVERSAL" // The shopify_source_debit_reversal transaction type. ShopifyPaymentsTransactionTypeShopCashBillingDebit ShopifyPaymentsTransactionType = "SHOP_CASH_BILLING_DEBIT" // The shop_cash_billing_debit transaction type. ShopifyPaymentsTransactionTypeShopCashBillingDebitReversal ShopifyPaymentsTransactionType = "SHOP_CASH_BILLING_DEBIT_REVERSAL" // The shop_cash_billing_debit_reversal transaction type. ShopifyPaymentsTransactionTypeShopCashCampaignBillingCredit ShopifyPaymentsTransactionType = "SHOP_CASH_CAMPAIGN_BILLING_CREDIT" // The shop_cash_campaign_billing_credit transaction type. ShopifyPaymentsTransactionTypeShopCashCampaignBillingCreditReversal ShopifyPaymentsTransactionType = "SHOP_CASH_CAMPAIGN_BILLING_CREDIT_REVERSAL" // The shop_cash_campaign_billing_credit_reversal transaction type. ShopifyPaymentsTransactionTypeShopCashCampaignBillingDebit ShopifyPaymentsTransactionType = "SHOP_CASH_CAMPAIGN_BILLING_DEBIT" // The shop_cash_campaign_billing_debit transaction type. ShopifyPaymentsTransactionTypeShopCashCampaignBillingDebitReversal ShopifyPaymentsTransactionType = "SHOP_CASH_CAMPAIGN_BILLING_DEBIT_REVERSAL" // The shop_cash_campaign_billing_debit_reversal transaction type. ShopifyPaymentsTransactionTypeShopCashCredit ShopifyPaymentsTransactionType = "SHOP_CASH_CREDIT" // The shop_cash_credit transaction type. ShopifyPaymentsTransactionTypeShopCashCreditReversal ShopifyPaymentsTransactionType = "SHOP_CASH_CREDIT_REVERSAL" // The shop_cash_credit_reversal transaction type. ShopifyPaymentsTransactionTypeShopCashRefundDebit ShopifyPaymentsTransactionType = "SHOP_CASH_REFUND_DEBIT" // The shop_cash_refund_debit transaction type. ShopifyPaymentsTransactionTypeShopCashRefundDebitReversal ShopifyPaymentsTransactionType = "SHOP_CASH_REFUND_DEBIT_REVERSAL" // The shop_cash_refund_debit_reversal transaction type. ShopifyPaymentsTransactionTypeStripeFee ShopifyPaymentsTransactionType = "STRIPE_FEE" // The stripe_fee transaction type. ShopifyPaymentsTransactionTypeTaxAdjustmentCredit ShopifyPaymentsTransactionType = "TAX_ADJUSTMENT_CREDIT" // The tax_adjustment_credit transaction type. ShopifyPaymentsTransactionTypeTaxAdjustmentCreditReversal ShopifyPaymentsTransactionType = "TAX_ADJUSTMENT_CREDIT_REVERSAL" // The tax_adjustment_credit_reversal transaction type. ShopifyPaymentsTransactionTypeTaxAdjustmentDebit ShopifyPaymentsTransactionType = "TAX_ADJUSTMENT_DEBIT" // The tax_adjustment_debit transaction type. ShopifyPaymentsTransactionTypeTaxAdjustmentDebitReversal ShopifyPaymentsTransactionType = "TAX_ADJUSTMENT_DEBIT_REVERSAL" // The tax_adjustment_debit_reversal transaction type. ShopifyPaymentsTransactionTypeTransfer ShopifyPaymentsTransactionType = "TRANSFER" // The transfer transaction type. ShopifyPaymentsTransactionTypeTransferCancel ShopifyPaymentsTransactionType = "TRANSFER_CANCEL" // The transfer_cancel transaction type. ShopifyPaymentsTransactionTypeTransferFailure ShopifyPaymentsTransactionType = "TRANSFER_FAILURE" // The transfer_failure transaction type. ShopifyPaymentsTransactionTypeTransferRefund ShopifyPaymentsTransactionType = "TRANSFER_REFUND" // The transfer_refund transaction type. ShopifyPaymentsTransactionTypeVATRefundCredit ShopifyPaymentsTransactionType = "VAT_REFUND_CREDIT" // The vat_refund_credit transaction type. ShopifyPaymentsTransactionTypeVATRefundCreditReversal ShopifyPaymentsTransactionType = "VAT_REFUND_CREDIT_REVERSAL" // The vat_refund_credit_reversal transaction type. )
func (ShopifyPaymentsTransactionType) Validate ¶
func (t ShopifyPaymentsTransactionType) Validate() error
Validate ShopifyPaymentsTransactionType
type ShopifyProtectEligibilityStatus ¶
type ShopifyProtectEligibilityStatus string
The status of an order's eligibility for protection against fraudulent chargebacks by Shopify Protect.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyProtectEligibilityStatus
const ( ShopifyProtectEligibilityStatusPending ShopifyProtectEligibilityStatus = "PENDING" // The eligibility of the order is pending and has not yet been determined. ShopifyProtectEligibilityStatusEligible ShopifyProtectEligibilityStatus = "ELIGIBLE" // The order is eligible for protection against fraudulent chargebacks. If an order is updated, the order's eligibility may change and protection could be removed. ShopifyProtectEligibilityStatusNotEligible ShopifyProtectEligibilityStatus = "NOT_ELIGIBLE" // The order isn't eligible for protection against fraudulent chargebacks. )
func (ShopifyProtectEligibilityStatus) Validate ¶
func (s ShopifyProtectEligibilityStatus) Validate() error
Validate ShopifyProtectEligibilityStatus
type ShopifyProtectOrderEligibility ¶
type ShopifyProtectOrderEligibility struct {
Status ShopifyProtectEligibilityStatus `json:"status"` // The status of whether an order is eligible for protection against fraudulent chargebacks.
}
The eligibility details of an order's protection against fraudulent chargebacks by Shopify Protect.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyProtectOrderEligibility
type ShopifyProtectOrderSummary ¶
type ShopifyProtectOrderSummary struct {
Eligibility *ShopifyProtectOrderEligibility `json:"eligibility,omitempty"` // The eligibility details of an order's protection against fraudulent chargebacks.
Status ShopifyProtectStatus `json:"status"` // The status of the order's protection against fraudulent chargebacks.
}
A summary of Shopify Protect details for an order.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyProtectOrderSummary
type ShopifyProtectStatus ¶
type ShopifyProtectStatus string
The status of an order's protection with Shopify Protect.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/ShopifyProtectStatus
const ( ShopifyProtectStatusActive ShopifyProtectStatus = "ACTIVE" // The protection for the order is active and eligible for reimbursement against fraudulent chargebacks. If an order is updated, the order's eligibility may change and protection could become inactive. ShopifyProtectStatusInactive ShopifyProtectStatus = "INACTIVE" // The protection for an order isn't active because the order didn't meet eligibility requirements. ShopifyProtectStatusNotProtected ShopifyProtectStatus = "NOT_PROTECTED" // The order received a chargeback but the order wasn't protected because it didn't meet coverage requirements. ShopifyProtectStatusPending ShopifyProtectStatus = "PENDING" // The protection for the order is pending and has not yet been determined. ShopifyProtectStatusProtected ShopifyProtectStatus = "PROTECTED" // The order received a fraudulent chargeback and it was protected. )
func (ShopifyProtectStatus) Validate ¶
func (s ShopifyProtectStatus) Validate() error
Validate ShopifyProtectStatus
type StaffMember ¶
type StaffMember struct {
ID string `json:"id"` // A globally-unique ID.
FirstName string `json:"firstName"` // The staff member's first name.
LastName string `json:"lastName"` // The staff member's last name.
Name string `json:"name"` // The staff member's full name.
Initials string `json:"initials"` // The staff member's initials, if available.
Email string `json:"email"` // The staff member's email address.
Phone string `json:"phone"` // The staff member's phone number.
Avatar *Image `json:"avatar,omitempty"` // The image used as the staff member's avatar in the Shopify admin.
AccountType AccountType `json:"accountType"` // The type of account the staff member has.
Active bool `json:"active"` // Whether the staff member is active.
Exists bool `json:"exists"` // Whether the staff member's account exists.
IsShopOwner bool `json:"isShopOwner"` // Whether the staff member is the shop owner.
Locale string `json:"locale"` // The staff member's preferred locale. Locale values use the format `language` or `language-COUNTRY`, where `language` is a two-letter language code, and `COUNTRY` is a two-letter country code. For example: `en` or `en-US`
PrivateData *StaffMemberPrivateData `json:"privateData,omitempty"` // The data used to customize the Shopify admin experience for the staff member.
}
Represents the data about a staff member's Shopify account. Merchants can use staff member data to get more information about the staff members in their store.
Requires `read_users` access scope. Also: The app must be a finance embedded app or installed on a Shopify Plus or Advanced store. Contact Shopify Support to enable this scope for your app.
type StaffMemberPrivateData ¶
type StaffMemberPrivateData struct {
AccountSettingsURL URL `json:"accountSettingsUrl"` // The URL to the staff member's account settings page.
CreatedAt DateTime `json:"createdAt"` // The date and time when the staff member was created.
}
Represents the data used to customize the Shopify admin experience for a logged-in staff member.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMemberPrivateData
type StandardMetafieldDefinitionTemplate ¶
type StandardMetafieldDefinitionTemplate struct {
ID string `json:"id"` // A globally-unique ID.
Name string `json:"name"` // The human-readable name for the standard metafield definition.
Description string `json:"description"` // The description of the standard metafield definition.
Key string `json:"key"` // The key owned by the definition after the definition has been activated.
Namespace string `json:"namespace"` // The namespace owned by the definition after the definition has been activated.
OwnerTypes []MetafieldOwnerType `json:"ownerTypes"` // The list of resource types that the standard metafield definition can be applied to.
Type *MetafieldDefinitionType `json:"type"` // The associated metafield definition type that the metafield stores.
Validations []MetafieldDefinitionValidation `json:"validations"` // The configured validations for the standard metafield definition.
VisibleToStorefrontAPI bool `json:"visibleToStorefrontApi"` // Whether metafields for the definition are by default visible using the Storefront API.
}
Standard metafield definition templates provide preset configurations to create metafield definitions. Each template has a specific namespace and key that we've reserved to have specific meanings for common use cases.
Refer to the list of standard metafield definitions (https://shopify.dev/apps/metafields/definitions/standard-definitions).
type StoreCreditAccount ¶
type StoreCreditAccount struct {
ID string `json:"id"` // A globally-unique ID.
Owner *HasStoreCreditAccounts `json:"owner"` // The first name of the customer.
Balance *MoneyV2 `json:"balance,omitempty"` // The current balance of the store credit account.
Transactions *StoreCreditAccountTransactionConnection `json:"transactions,omitempty"` // The transaction history of the store credit account.
}
A store credit account contains a monetary balance that can be redeemed at checkout for purchases in the shop. The account is held in the specified currency and has an owner that cannot be transferred.
The account balance is redeemable at checkout only when the owner is authenticated via [new customer accounts authentication](https://shopify.dev/docs/api/customer).
Requires `read_store_credit_accounts` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/StoreCreditAccount
type StoreCreditAccountConnection ¶
type StoreCreditAccountConnection struct {
Edges []StoreCreditAccountEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []StoreCreditAccount `json:"nodes,omitempty"` // A list of nodes that are contained in StoreCreditAccountEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple StoreCreditAccounts.
type StoreCreditAccountEdge ¶
type StoreCreditAccountEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *StoreCreditAccount `json:"node,omitempty"` // The item at the end of StoreCreditAccountEdge.
}
An auto-generated type which holds one StoreCreditAccount and a cursor during pagination.
type StoreCreditAccountTransaction ¶
type StoreCreditAccountTransaction struct {
Account *StoreCreditAccount `json:"account,omitempty"` // The store credit account that the transaction belongs to.
Amount *MoneyV2 `json:"amount,omitempty"` // The amount of the transaction.
BalanceAfterTransaction *MoneyV2 `json:"balanceAfterTransaction,omitempty"` // The balance of the account after the transaction.
Event StoreCreditSystemEvent `json:"event"` // The event that caused the store credit account transaction.
Origin interface{} `json:"origin"` // The origin of the store credit account transaction.
CreatedAt DateTime `json:"createdAt"` // The date and time when the transaction was created.
}
Interface for a store credit account transaction.
Requires `read_store_credit_account_transactions` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/interfaces/StoreCreditAccountTransaction
type StoreCreditAccountTransactionConnection ¶
type StoreCreditAccountTransactionConnection struct {
Edges []StoreCreditAccountTransactionEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []StoreCreditAccountTransaction `json:"nodes,omitempty"` // A list of nodes that are contained in StoreCreditAccountTransactionEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple StoreCreditAccountTransactions.
type StoreCreditAccountTransactionEdge ¶
type StoreCreditAccountTransactionEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *StoreCreditAccountTransaction `json:"node,omitempty"` // The item at the end of StoreCreditAccountTransactionEdge.
}
An auto-generated type which holds one StoreCreditAccountTransaction and a cursor during pagination.
type StoreCreditAccountTransactionOrigin ¶
type StoreCreditAccountTransactionOrigin interface {
*OrderTransaction
}
The origin of a store credit account transaction.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/StoreCreditAccountTransactionOrigin
type StoreCreditSystemEvent ¶
type StoreCreditSystemEvent string
The event that caused the store credit account transaction.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/StoreCreditSystemEvent
const ( StoreCreditSystemEventAdjustment StoreCreditSystemEvent = "ADJUSTMENT" // An adjustment was made to the store credit account. StoreCreditSystemEventOrderCancellation StoreCreditSystemEvent = "ORDER_CANCELLATION" // Store credit was returned when an authorized payment was voided. StoreCreditSystemEventOrderPayment StoreCreditSystemEvent = "ORDER_PAYMENT" // Store credit was used as payment for an order. StoreCreditSystemEventOrderRefund StoreCreditSystemEvent = "ORDER_REFUND" // Store credit was refunded from an order. StoreCreditSystemEventPaymentFailure StoreCreditSystemEvent = "PAYMENT_FAILURE" // A store credit payment was reverted due to another payment method failing. StoreCreditSystemEventPaymentReturned StoreCreditSystemEvent = "PAYMENT_RETURNED" // A smaller amount of store credit was captured than was originally authorized. StoreCreditSystemEventTaxFinalization StoreCreditSystemEvent = "TAX_FINALIZATION" // Tax finalization affected the store credit payment. )
func (StoreCreditSystemEvent) Validate ¶
func (e StoreCreditSystemEvent) Validate() error
Validate StoreCreditSystemEvent
type StorefrontAccessToken ¶
type StorefrontAccessToken struct {
ID string `json:"id"` // A globally-unique ID.
Title string `json:"title"` // An arbitrary title for each token determined by the developer, used for reference purposes.
AccessToken string `json:"accessToken"` // The issued public access token.
AccessScopes []AccessScope `json:"accessScopes"` // List of permissions associated with the token.
CreatedAt DateTime `json:"createdAt"` // The date and time when the public access token was created.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the storefront access token was updated.
}
A token that's used to delegate unauthenticated access scopes to clients that need to access the unauthenticated Storefront API.
An app can have a maximum of 100 active storefront access tokens for each shop.
[Get started with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/getting-started).
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/StorefrontAccessToken
type StorefrontAccessTokenConnection ¶
type StorefrontAccessTokenConnection struct {
Edges []StorefrontAccessTokenEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []StorefrontAccessToken `json:"nodes,omitempty"` // A list of nodes that are contained in StorefrontAccessTokenEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple StorefrontAccessTokens.
type StorefrontAccessTokenEdge ¶
type StorefrontAccessTokenEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *StorefrontAccessToken `json:"node,omitempty"` // The item at the end of StorefrontAccessTokenEdge.
}
An auto-generated type which holds one StorefrontAccessToken and a cursor during pagination.
type String ¶
type String string
Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/scalars/String
type StringConnection ¶
type StringConnection struct {
Edges []StringEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []String `json:"nodes,omitempty"` // A list of nodes that are contained in StringEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo"` // An object that’s used to retrieve cursor information about the current page.
}
MediaConnection represents the media field for Strings.
type StringEdge ¶
type StringEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *String `json:"node"` // The item at the end of StringEdge.
}
An auto-generated type which holds one String and a cursor during pagination.
type SubscriptionAppliedCodeDiscount ¶
type SubscriptionAppliedCodeDiscount struct {
ID string `json:"id"` // The unique ID.
RedeemCode string `json:"redeemCode"` // The redeem code of the discount that applies on the subscription.
RejectionReason SubscriptionDiscountRejectionReason `json:"rejectionReason"` // The reason that the discount on the subscription draft is rejected.
}
Represents an applied code discount.
Requires the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionAppliedCodeDiscount
type SubscriptionBillingAttempt ¶
type SubscriptionBillingAttempt struct {
ID string `json:"id"` // A globally-unique ID.
IdempotencyKey string `json:"idempotencyKey"` // A unique key generated by the client to avoid duplicate payments.
Order *Order `json:"order,omitempty"` // The result of this billing attempt if completed successfully.
OriginTime DateTime `json:"originTime"` // The date and time used to calculate fulfillment intervals for a billing attempt that successfully completed after the current anchor date. To prevent fulfillment from being pushed to the next anchor date, this field can override the billing attempt date.
CreatedAt DateTime `json:"createdAt"` // The date and time when the billing attempt was created.
CompletedAt DateTime `json:"completedAt"` // The date and time when the billing attempt was completed.
Ready bool `json:"ready"` // Whether the billing attempt is still processing.
RespectInventoryPolicy bool `json:"respectInventoryPolicy"` // Whether the billing attempt respects the merchant's inventory policy.
SubscriptionContract *SubscriptionContract `json:"subscriptionContract,omitempty"` // The subscription contract.
Transactions *OrderTransactionConnection `json:"transactions,omitempty"` // The transactions created by the billing attempt.
PaymentGroupID string `json:"paymentGroupId"` // The reference shared between retried payment attempts.
PaymentSessionID string `json:"paymentSessionId"` // The reference shared between payment attempts with similar payment details.
ProcessingError *SubscriptionBillingAttemptProcessingError `json:"processingError,omitempty"` // Error information from processing the billing attempt.
NextActionURL URL `json:"nextActionUrl"` // The URL where the customer needs to be redirected so they can complete the 3D Secure payment flow.
}
A record of an execution of the subscription billing process. Billing attempts use idempotency keys to avoid duplicate order creation. A successful billing attempt will create an order.
Requires `read_own_subscription_contracts` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingAttempt
type SubscriptionBillingAttemptConnection ¶
type SubscriptionBillingAttemptConnection struct {
Edges []SubscriptionBillingAttemptEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []SubscriptionBillingAttempt `json:"nodes,omitempty"` // A list of nodes that are contained in SubscriptionBillingAttemptEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple SubscriptionBillingAttempts.
type SubscriptionBillingAttemptEdge ¶
type SubscriptionBillingAttemptEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *SubscriptionBillingAttempt `json:"node,omitempty"` // The item at the end of SubscriptionBillingAttemptEdge.
}
An auto-generated type which holds one SubscriptionBillingAttempt and a cursor during pagination.
type SubscriptionBillingAttemptErrorCode ¶
type SubscriptionBillingAttemptErrorCode string
The possible error codes associated with making billing attempts. The error codes supplement the `error_message` to provide consistent results and help with dunning management.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SubscriptionBillingAttemptErrorCode
const ( SubscriptionBillingAttemptErrorCodeAmountTooSmall SubscriptionBillingAttemptErrorCode = "AMOUNT_TOO_SMALL" // The amount is too small. SubscriptionBillingAttemptErrorCodeAuthenticationError SubscriptionBillingAttemptErrorCode = "AUTHENTICATION_ERROR" // There was an error during the authentication. SubscriptionBillingAttemptErrorCodeBuyerCanceledPaymentMethod SubscriptionBillingAttemptErrorCode = "BUYER_CANCELED_PAYMENT_METHOD" // Payment method was canceled by buyer. SubscriptionBillingAttemptErrorCodeCardNumberIncorrect SubscriptionBillingAttemptErrorCode = "CARD_NUMBER_INCORRECT" // Card number was incorrect. SubscriptionBillingAttemptErrorCodeCustomerInvalid SubscriptionBillingAttemptErrorCode = "CUSTOMER_INVALID" // Customer is invalid. SubscriptionBillingAttemptErrorCodeCustomerNotFound SubscriptionBillingAttemptErrorCode = "CUSTOMER_NOT_FOUND" // Customer was not found. SubscriptionBillingAttemptErrorCodeExpiredPaymentMethod SubscriptionBillingAttemptErrorCode = "EXPIRED_PAYMENT_METHOD" // Payment method is expired. SubscriptionBillingAttemptErrorCodeFraudSuspected SubscriptionBillingAttemptErrorCode = "FRAUD_SUSPECTED" // Fraud was suspected. SubscriptionBillingAttemptErrorCodeInsufficientFunds SubscriptionBillingAttemptErrorCode = "INSUFFICIENT_FUNDS" // Insufficient funds. SubscriptionBillingAttemptErrorCodeInsufficientInventory SubscriptionBillingAttemptErrorCode = "INSUFFICIENT_INVENTORY" // Not enough inventory found. SubscriptionBillingAttemptErrorCodeInvalidCustomerBillingAgreement SubscriptionBillingAttemptErrorCode = "INVALID_CUSTOMER_BILLING_AGREEMENT" // The billing agreement ID or the transaction ID for the customer's payment method is invalid. SubscriptionBillingAttemptErrorCodeInvalidPaymentMethod SubscriptionBillingAttemptErrorCode = "INVALID_PAYMENT_METHOD" // Payment method is invalid. Please update or create a new payment method. SubscriptionBillingAttemptErrorCodeInvalidShippingAddress SubscriptionBillingAttemptErrorCode = "INVALID_SHIPPING_ADDRESS" // The shipping address is either missing or invalid. SubscriptionBillingAttemptErrorCodeInventoryAllocationsNotFound SubscriptionBillingAttemptErrorCode = "INVENTORY_ALLOCATIONS_NOT_FOUND" // No inventory location found or enabled. SubscriptionBillingAttemptErrorCodeInvoiceAlreadyPaid SubscriptionBillingAttemptErrorCode = "INVOICE_ALREADY_PAID" // A payment has already been made for this invoice. SubscriptionBillingAttemptErrorCodePaymentMethodDeclined SubscriptionBillingAttemptErrorCode = "PAYMENT_METHOD_DECLINED" // Payment method was declined by processor. SubscriptionBillingAttemptErrorCodePaymentMethodIncompatibleWithGatewayConfig SubscriptionBillingAttemptErrorCode = "PAYMENT_METHOD_INCOMPATIBLE_WITH_GATEWAY_CONFIG" // Payment method cannot be used with the current payment gateway test mode configuration. SubscriptionBillingAttemptErrorCodePaymentMethodNotFound SubscriptionBillingAttemptErrorCode = "PAYMENT_METHOD_NOT_FOUND" // Payment method was not found. SubscriptionBillingAttemptErrorCodePaymentProviderIsNotEnabled SubscriptionBillingAttemptErrorCode = "PAYMENT_PROVIDED_IS_NOT_ENABLED" // Payment provider is not enabled. SubscriptionBillingAttemptErrorCodePaypalErrorGeneral SubscriptionBillingAttemptErrorCode = "PAYPAL_ERROR_GENERAL" // Paypal Error General. SubscriptionBillingAttemptErrorCodePurchaseTypeNotSupported SubscriptionBillingAttemptErrorCode = "PURCHASE_TYPE_NOT_SUPPORTED" // Purchase Type is not supported. SubscriptionBillingAttemptErrorCodeTestMode SubscriptionBillingAttemptErrorCode = "TEST_MODE" // Gateway is in test mode and attempted to bill a live payment method. SubscriptionBillingAttemptErrorCodeTransientError SubscriptionBillingAttemptErrorCode = "TRANSIENT_ERROR" // Transient error, try again later. SubscriptionBillingAttemptErrorCodeUnexpectedError SubscriptionBillingAttemptErrorCode = "UNEXPECTED_ERROR" // There was an unexpected error during the billing attempt. )
func (SubscriptionBillingAttemptErrorCode) Validate ¶
func (e SubscriptionBillingAttemptErrorCode) Validate() error
Validate SubscriptionBillingAttemptErrorCode
type SubscriptionBillingAttemptProcessingError ¶
type SubscriptionBillingAttemptProcessingError struct {
Code SubscriptionBillingAttemptErrorCode `json:"code"` // The code for the error.
Message string `json:"message"` // An explanation of the error.
}
An error that prevented a billing attempt.
type SubscriptionBillingPolicy ¶
type SubscriptionBillingPolicy struct {
Anchors []SellingPlanAnchor `json:"anchors"` // The specific anchor dates upon which the billing interval calculations should be made.
Interval SellingPlanInterval `json:"interval,omitempty"` // The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc).
IntervalCount int `json:"intervalCount"` // The number of delivery intervals between deliveries.
MaxCycles int `json:"maxCycles"` // Maximum amount of cycles after which the subscription ends.
MinCycles int `json:"minCycles"` // Minimum amount of cycles required in the subscription.
}
Represents a Subscription Billing Policy.
Requires the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDeliveryPolicy
type SubscriptionContract ¶
type SubscriptionContract struct {
ID string `json:"id"` // A globally-unique ID.
App *App `json:"app,omitempty"` // The subscription app that the subscription contract is registered to.
AppAdminURL URL `json:"appAdminUrl"` // The URL of the subscription contract page on the subscription app.
RevisionID string `json:"revisionId"` // The revision id of the contract.
Customer *Customer `json:"customer,omitempty"` // The customer to whom the subscription contract belongs.
CustomerPaymentMethod *CustomerPaymentMethod `json:"customerPaymentMethod,omitempty"` // The customer payment method that's used for the subscription contract.
Status SubscriptionContractSubscriptionStatus `json:"status"` // The current status of the subscription contract.
LastPaymentStatus SubscriptionContractLastPaymentStatus `json:"lastPaymentStatus"` // The current status of the last payment.
OriginOrder *Order `json:"originOrder,omitempty"` // The order from which this contract originated.
Orders *OrderConnection `json:"orders,omitempty"` // A list of the subscription contract's orders.
Lines *SubscriptionLineConnection `json:"lines,omitempty"` // The list of subscription lines associated with the subscription contract.
LinesCount *Count `json:"linesCount,omitempty"` // The number of lines associated with the subscription contract.
CurrencyCode CurrencyCode `json:"currencyCode"` // The currency that's used for the subscription contract.
CustomAttributes []Attribute `json:"customAttributes"` // A list of the custom attributes to be added to the generated orders.
BillingPolicy *SubscriptionBillingPolicy `json:"billingPolicy,omitempty"` // The billing policy associated with the subscription contract.
BillingAttempts *SubscriptionBillingAttemptConnection `json:"billingAttempts,omitempty"` // The list of billing attempts associated with the subscription contract.
NextBillingDate DateTime `json:"nextBillingDate"` // The next billing date for the subscription contract. This field is managed by the apps. Alternatively you can utilize our Billing Cycles APIs, which provide auto-computed billing dates and additional functionalities.
LastBillingErrorAccountType SubscriptionContractLastBillingErrorType `json:"lastBillingErrorAccountType"` // The last billing error type of the contract.
DeliveryMethod interface{} `json:"deliveryMethod,omitempty"` // The delivery method for each billing of the subscription contract.
DeliveryPolicy *SubscriptionDeliveryPolicy `json:"deliveryPolicy,omitempty"` // The delivery policy associated with the subscription contract.
DeliveryPrice *MoneyV2 `json:"deliveryPrice,omitempty"` // The delivery price for each billing of the subscription contract.
Discounts *SubscriptionManualDiscountConnection `json:"discounts,omitempty"` // The list of subscription discounts associated with the subscription contract.
Note string `json:"note"` // The note field that will be applied to the generated orders.
CreatedAt DateTime `json:"createdAt"` // The date and time when the subscription contract was created.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the subscription contract was updated.
}
Represents a Subscription Contract.
Requires the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.
type SubscriptionContractConnection ¶
type SubscriptionContractConnection struct {
Edges []SubscriptionContractEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []SubscriptionContract `json:"nodes,omitempty"` // A list of nodes that are contained in SubscriptionContractEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple SubscriptionContracts.
type SubscriptionContractEdge ¶
type SubscriptionContractEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *SubscriptionContract `json:"node,omitempty"` // The item at the end of SubscriptionContractEdge.
}
An auto-generated type which holds one SubscriptionContract and a cursor during pagination.
type SubscriptionContractLastBillingErrorType ¶
type SubscriptionContractLastBillingErrorType string
The possible values of the last billing error on a subscription contract.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SubscriptionContractLastBillingErrorType
const ( SubscriptionContractLastBillingErrorTypeCustomerError SubscriptionContractLastBillingErrorType = "CUSTOMER_ERROR" // Subscription billing attempt error due to customer error. SubscriptionContractLastBillingErrorTypeInventoryError SubscriptionContractLastBillingErrorType = "INVENTORY_ERROR" // Subscription billing attempt error due to inventory error. SubscriptionContractLastBillingErrorTypePaymentError SubscriptionContractLastBillingErrorType = "PAYMENT_ERROR" // Subscription billing attempt error due to payment error. SubscriptionContractLastBillingErrorTypeOther SubscriptionContractLastBillingErrorType = "OTHER" // All other billing attempt errors. )
func (SubscriptionContractLastBillingErrorType) Validate ¶
func (t SubscriptionContractLastBillingErrorType) Validate() error
Validate SubscriptionContractLastBillingErrorType
type SubscriptionContractLastPaymentStatus ¶
type SubscriptionContractLastPaymentStatus string
The possible status values of the last payment on a subscription contract.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SubscriptionContractLastPaymentStatus
const ( SubscriptionContractLastPaymentStatusFailed SubscriptionContractLastPaymentStatus = "FAILED" // Failed subscription billing attempt. SubscriptionContractLastPaymentStatusSucceeded SubscriptionContractLastPaymentStatus = "SUCCEEDED" // Successful subscription billing attempt. )
func (SubscriptionContractLastPaymentStatus) Validate ¶
func (status SubscriptionContractLastPaymentStatus) Validate() error
Validate SubscriptionContractLastPaymentStatus
type SubscriptionContractSubscriptionStatus ¶
type SubscriptionContractSubscriptionStatus string
The possible status values of a subscription.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SubscriptionContractSubscriptionStatus
const ( SubscriptionContractSubscriptionStatusActive SubscriptionContractSubscriptionStatus = "ACTIVE" // The contract is active and continuing per its policies. SubscriptionContractSubscriptionStatusCancelled SubscriptionContractSubscriptionStatus = "CANCELLED" // The contract was ended by an unplanned customer action. SubscriptionContractSubscriptionStatusExpired SubscriptionContractSubscriptionStatus = "EXPIRED" // The contract has ended per the expected circumstances. All billing and deliverycycles of the subscriptions were executed. SubscriptionContractSubscriptionStatusFailed SubscriptionContractSubscriptionStatus = "FAILED" // The contract ended because billing failed and no further billing attempts are expected. SubscriptionContractSubscriptionStatusPaused SubscriptionContractSubscriptionStatus = "PAUSED" // The contract is temporarily paused and is expected to resume in the future. )
func (SubscriptionContractSubscriptionStatus) Validate ¶
func (status SubscriptionContractSubscriptionStatus) Validate() error
Validate SubscriptionContractSubscriptionStatus
type SubscriptionCyclePriceAdjustment ¶
type SubscriptionCyclePriceAdjustment struct {
AdjustmentType SellingPlanPricingPolicyAdjustmentType `json:"adjustmentType"` // Price adjustment type.
AdjustmentValue interface{} `json:"adjustmentValue,omitempty"` // Price adjustment value.
AfterCycle int `json:"afterCycle"` // The number of cycles required before this pricing policy applies.
ComputedPrice *MoneyV2 `json:"computedPrice,omitempty"` // The computed price after the adjustments applied.
}
Represents a Subscription Line Pricing Cycle Adjustment.
Requires the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionCyclePriceAdjustment
type SubscriptionDeliveryPolicy ¶
type SubscriptionDeliveryPolicy struct {
Anchors []SellingPlanAnchor `json:"anchors"` // The specific anchor dates upon which the delivery interval calculations should be made.
Interval SellingPlanInterval `json:"interval,omitempty"` // The kind of interval that's associated with this schedule (e.g. Monthly, Weekly, etc).
IntervalCount int `json:"intervalCount"` // The number of delivery intervals between deliveries.
}
Represents a Subscription Delivery Policy.
Requires the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDeliveryPolicy
type SubscriptionDiscount ¶
type SubscriptionDiscount interface {
*SubscriptionAppliedCodeDiscount | *SubscriptionManualDiscount
}
Subscription draft discount types.
Requires the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/SubscriptionDiscount
type SubscriptionDiscountAllocation ¶
type SubscriptionDiscountAllocation struct {
Amount *MoneyV2 `json:"amount,omitempty"` // Allocation amount.
Discount interface{} `json:"discount,omitempty"` // Discount that created the allocation.
}
Represents what a particular discount reduces from a line price.
Requires the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDiscountAllocation
type SubscriptionDiscountEntitledLines ¶
type SubscriptionDiscountEntitledLines struct {
All bool `json:"all"` // Specify whether the subscription discount will apply on all subscription lines.
Lines *SubscriptionLineConnection `json:"lines,omitempty"` // The list of subscription lines associated with the subscription discount.
}
Represents the subscription lines the discount applies on.
Requires the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDiscountEntitledLines
type SubscriptionDiscountFixedAmountValue ¶
type SubscriptionDiscountFixedAmountValue struct {
Amount *MoneyV2 `json:"amount,omitempty"` // The fixed amount value of the discount.
AppliesOnEachItem bool `json:"appliesOnEachItem"` // Whether the amount is applied per item.
}
The value of the discount and how it will be applied.
Requires `read_own_subscription_contracts` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDiscountFixedAmountValue
type SubscriptionDiscountPercentageValue ¶
type SubscriptionDiscountPercentageValue struct {
Percentage int `json:"percentage"` // The percentage value of the discount.
}
The percentage value of the discount.
Requires `read_own_subscription_contracts` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionDiscountPercentageValue
type SubscriptionDiscountRejectionReason ¶
type SubscriptionDiscountRejectionReason string
The reason a discount on a subscription draft was rejected.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SubscriptionDiscountRejectionReason
const ( SubscriptionDiscountRejectionReasonCurrentlyInactive SubscriptionDiscountRejectionReason = "CURRENTLY_INACTIVE" // Discount is inactive. SubscriptionDiscountRejectionReasonCustomerNotEligible SubscriptionDiscountRejectionReason = "CUSTOMER_NOT_ELIGIBLE" // Given customer does not qualify for the discount. SubscriptionDiscountRejectionReasonCustomerUsageLimitReached SubscriptionDiscountRejectionReason = "CUSTOMER_USAGE_LIMIT_REACHED" // Customer usage limit has been reached. SubscriptionDiscountRejectionReasonIncompatiblePurchaseType SubscriptionDiscountRejectionReason = "INCOMPATIBLE_PURCHASE_TYPE" // Purchase type does not qualify for the discount. SubscriptionDiscountRejectionReasonInternalError SubscriptionDiscountRejectionReason = "INTERNAL_ERROR" // Internal error during discount code validation. SubscriptionDiscountRejectionReasonNotFound SubscriptionDiscountRejectionReason = "NOT_FOUND" // Discount code is not found. SubscriptionDiscountRejectionReasonNoEntitledLineItems SubscriptionDiscountRejectionReason = "NO_ENTITLED_LINE_ITEMS" // Discount does not apply to any of the given line items. SubscriptionDiscountRejectionReasonNoEntitledShippingLines SubscriptionDiscountRejectionReason = "NO_ENTITLED_SHIPPING_LINES" // No applicable shipping lines. SubscriptionDiscountRejectionReasonPurchaseNotInRange SubscriptionDiscountRejectionReason = "PURCHASE_NOT_IN_RANGE" // Purchase amount of items does not qualify for the discount. SubscriptionDiscountRejectionReasonQuantityNotInRange SubscriptionDiscountRejectionReason = "QUANTITY_NOT_IN_RANGE" // Quantity of items does not qualify for the discount. SubscriptionDiscountRejectionReasonUsageLimitReached SubscriptionDiscountRejectionReason = "USAGE_LIMIT_REACHED" // Discount usage limit has been reached. )
func (SubscriptionDiscountRejectionReason) Validate ¶
func (r SubscriptionDiscountRejectionReason) Validate() error
Validate SubscriptionDiscountRejectionReason
type SubscriptionDiscountValue ¶
type SubscriptionDiscountValue interface {
*SubscriptionDiscountFixedAmountValue | *SubscriptionDiscountPercentageValue
}
The value of the discount and how it will be applied.
Requires `read_own_subscription_contracts` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/SubscriptionDiscountValue
type SubscriptionLine ¶
type SubscriptionLine struct {
ID string `json:"id"` // The unique ID.
Title string `json:"title"` // Product title of the item associated with the subscription line.
ProductID string `json:"productId"` // The product ID associated with the subscription line.
VariantID string `json:"variantId"` // The product variant ID associated with the subscription line.
VariantTitle string `json:"variantTitle"` // Product variant title of the item associated with the subscription line.
VariantImage *Image `json:"variantImage,omitempty"` // The image associated with the line item's variant or product.
ConcatenatedOriginContract *SubscriptionContract `json:"concatenatedOriginContract,omitempty"` // The origin contract of the line if it was concatenated from another contract.
// The selling plan ID associated to the line.
//
// Indicates which selling plan was used to create this contract line initially.
// The selling plan ID is also used to find the associated delivery profile.
//
// The subscription contract, subscription line, or selling plan might have changed.
// As a result, the selling plan's attributes might not match the information on the contract.
SellingPlanID string `json:"sellingPlanId"`
SellingPlanName string `json:"sellingPlanName"` // The selling plan name associated to the line. This name describes the order line items created from this subscription line for both merchants and customers.
CustomAttributes []Attribute `json:"customAttributes"` // List of custom attributes associated to the line item.
DiscountAllocations []SubscriptionDiscountAllocation `json:"discountAllocations"` // Discount allocations.
LineDiscountedPrice *MoneyV2 `json:"lineDiscountedPrice,omitempty"` // Total line price including all discounts.
CurrentPrice *MoneyV2 `json:"currentPrice,omitempty"` // The price per unit for the subscription line in the contract's currency.
PricingPolicy *SubscriptionPricingPolicy `json:"pricingPolicy,omitempty"` // Describe the price changes of the line over time.
SKU string `json:"sku"` // Variant SKU number of the item associated with the subscription line.
Quantity int `json:"quantity"` // The quantity of the unit selected for the subscription line.
RequiresShipping bool `json:"requiresShipping"` // Whether physical shipping is required for the variant.
Taxable bool `json:"taxable"` // Whether the variant is taxable.
}
Represents a Subscription Line.
Requires the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionLine
type SubscriptionLineConnection ¶
type SubscriptionLineConnection struct {
Edges []SubscriptionLineEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []SubscriptionLine `json:"nodes,omitempty"` // A list of nodes that are contained in SubscriptionLineEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple SubscriptionLines.
type SubscriptionLineEdge ¶
type SubscriptionLineEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *SubscriptionLine `json:"node,omitempty"` // The item at the end of SubscriptionLineEdge.
}
An auto-generated type which holds one SubscriptionLine and a cursor during pagination.
type SubscriptionManualDiscount ¶
type SubscriptionManualDiscount struct {
ID string `json:"id"` // The unique ID.
Title string `json:"title"` // The title associated with the subscription discount.
Type DiscountType `json:"type"` // The type of the subscription discount.
TargetType DiscountTargetType `json:"targetType"` // Type of line the discount applies on.
Value interface{} `json:"value,omitempty"` // The value of the subscription discount.
UsageCount int `json:"usageCount"` // The number of times the discount was applied.
RecurringCycleLimit int `json:"recurringCycleLimit"` // The maximum number of times the subscription discount will be applied on orders.
RejectionReason SubscriptionDiscountRejectionReason `json:"rejectionReason"` // The reason that the discount on the subscription draft is rejected.
EntitledLines *SubscriptionDiscountEntitledLines `json:"entitledLines,omitempty"` // Entitled line items used to apply the subscription discount on.
}
Custom subscription discount.
Requires the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionManualDiscount
type SubscriptionManualDiscountConnection ¶
type SubscriptionManualDiscountConnection struct {
Edges []SubscriptionManualDiscountEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []SubscriptionManualDiscount `json:"nodes,omitempty"` // A list of nodes that are contained in SubscriptionManualDiscountEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple SubscriptionManualDiscounts.
type SubscriptionManualDiscountEdge ¶
type SubscriptionManualDiscountEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *SubscriptionManualDiscount `json:"node,omitempty"` // The item at the end of SubscriptionManualDiscountEdge.
}
An auto-generated type which holds one SubscriptionManualDiscount and a cursor during pagination.
type SubscriptionPricingPolicy ¶
type SubscriptionPricingPolicy struct {
BasePrice *MoneyV2 `json:"basePrice,omitempty"` // The base price per unit for the subscription line in the contract's currency.
CycleDiscounts []SubscriptionCyclePriceAdjustment `json:"cycleDiscounts"` // The adjustments per cycle for the subscription line.
}
Represents a Subscription Line Pricing Policy.
Requires the `read_own_subscription_contracts` or `write_own_subscription_contracts` scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionPricingPolicy
type SuggestedOrderTransaction ¶
type SuggestedOrderTransaction struct {
AccountNumber string `json:"accountNumber"` // The masked account number associated with the payment method.
AmountSet *MoneyBag `json:"amountSet,omitempty"` // The amount and currency of the suggested order transaction in shop and presentment currencies.
Gateway string `json:"gateway"` // The suggested payment gateway used to process the transaction.
FormattedGateway string `json:"formattedGateway"` // The human-readable payment gateway name suggested to process the transaction.
Kind SuggestedOrderTransactionKind `json:"kind"` // Specifies the kind of the suggested order transaction.
MaximumRefundableSet *MoneyBag `json:"maximumRefundableSet,omitempty"` // Specifies the available amount to refund on the gateway in shop and presentment currencies. Only available within SuggestedRefund.
ParentTransaction *OrderTransaction `json:"parentTransaction,omitempty"` // The associated parent transaction, for example the authorization of a capture.
PaymentDetails interface{}
}
A suggested transaction. Suggested transaction are usually used in the context of refunds and exchanges.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SuggestedOrderTransaction
type SuggestedOrderTransactionKind ¶
type SuggestedOrderTransactionKind string
Specifies the kind of the suggested order transaction.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/SuggestedOrderTransactionKind
const (
SuggestedOrderTransactionKindSuggestedRefund SuggestedOrderTransactionKind = "SUGGESTED_REFUND" // A suggested refund transaction for an order.
)
func (SuggestedOrderTransactionKind) Validate ¶
func (reason SuggestedOrderTransactionKind) Validate() error
Validate SuggestedOrderTransactionKind
type SuggestedRefund ¶
type SuggestedRefund struct {
AmountSet *MoneyBag `json:"amountSet,omitempty"` // The total monetary value to be refunded in shop and presentment currencies.
DiscountedSubtotalSet *MoneyBag `json:"discountedSubtotalSet,omitempty"` // The sum of all the discounted prices of the line items being refunded.
MaximumRefundableSet *MoneyBag `json:"maximumRefundableSet,omitempty"` // The total monetary value available to refund in shop and presentment currencies.
RefundDuties []RefundDuty `json:"refundDuties"` // A list of duties to be refunded from the order.
RefundLineItems []RefundLineItem `json:"refundLineItems"` // A list of line items to be refunded, along with restock instructions.
Shipping *ShippingRefund `json:"shipping,omitempty"` // The shipping costs to be refunded from the order.
SubtotalSet *MoneyBag `json:"subtotalSet,omitempty"` // The sum of all the prices of the line items being refunded in shop and presentment currencies.
SuggestedTransactions []SuggestedOrderTransaction `json:"suggestedTransactions"` // A list of suggested order transactions.
TotalCartDiscountAmountSet *MoneyBag `json:"totalCartDiscountAmountSet,omitempty"` // The total cart discount amount that was applied to all line items in this refund.
TotalDutiesSet *MoneyBag `json:"totalDutiesSet,omitempty"` // The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive.
TotalTaxSet *MoneyBag `json:"totalTaxSet,omitempty"` // The sum of the taxes being refunded from the order in shop and presentment currencies. The value must be positive.
}
Represents a refund suggested by Shopify based on the items being reimbursed. You can then use the suggested refund object to generate an actual refund.
Requires `read_orders` access scope or `read_marketplace_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SuggestedRefund
type SuggestedReturnRefund ¶
type SuggestedReturnRefund struct {
Shipping *ShippingRefund `json:"shipping,omitempty"` // The shipping costs to be refunded from the order.
SuggestedTransactions []SuggestedOrderTransaction `json:"suggestedTransactions"` // A list of suggested order transactions.
MaximumRefundable *MoneyBag `json:"maximumRefundable,omitempty"` // The total monetary value available to refund in shop and presentment currencies.
RefundDuties []RefundDuty `json:"refundDuties"` // A list of duties to be refunded from the order.
TotalCartDiscountAmount *MoneyBag `json:"totalCartDiscountAmount,omitempty"` // The total cart discount amount that was applied to all line items in this refund.
TotalDuties *MoneyBag `json:"totalDuties,omitempty"` // The sum of all the duties being refunded from the order in shop and presentment currencies. The value must be positive.
TotalTax *MoneyBag `json:"totalTax,omitempty"` // The sum of the taxes being refunded in shop and presentment currencies. The value must be positive.
Subtotal *MoneyBag `json:"subtotal,omitempty"` // The sum of all the prices of the line items being refunded in shop and presentment currencies.
DiscountedSubtotal *MoneyBag `json:"discountedSubtotal,omitempty"` // The sum of all the discounted prices of the line items being refunded.
Amount *MoneyBag `json:"amount,omitempty"` // The total monetary value to be refunded in shop and presentment currencies.
}
Represents a return refund suggested by Shopify based on the items being reimbursed. You can then use the suggested refund object to generate an actual refund for the return.
Requires `read_orders` access scope or `read_marketplace_orders` access scope. Also: Requires the `read_returns` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/SuggestedReturnRefund
type TaxExemption ¶
type TaxExemption string
Available customer tax exemptions.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/TaxExemption
const ( TaxExemptionCABCCommercialFisheryExemption TaxExemption = "CA_BC_COMMERCIAL_FISHERY_EXEMPTION" // This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in British Columbia. TaxExemptionCABCContractorExemption TaxExemption = "CA_BC_CONTRACTOR_EXEMPTION" // This customer is exempt from specific taxes for holding a valid CONTRACTOR_EXEMPTION in British Columbia. TaxExemptionCABCProductionAndMachineryExemption TaxExemption = "CA_BC_PRODUCTION_AND_MACHINERY_EXEMPTION" // This customer is exempt from specific taxes for holding a valid PRODUCTION_AND_MACHINERY_EXEMPTION in British Columbia. TaxExemptionCABCResellerExemption TaxExemption = "CA_BC_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in British Columbia. TaxExemptionCABCSubContractorExemption TaxExemption = "CA_BC_SUB_CONTRACTOR_EXEMPTION" // This customer is exempt from specific taxes for holding a valid SUB_CONTRACTOR_EXEMPTION in British Columbia. TaxExemptionCADiplomatExemption TaxExemption = "CA_DIPLOMAT_EXEMPTION" // This customer is exempt from specific taxes for holding a valid DIPLOMAT_EXEMPTION in Canada. TaxExemptionCAMBCommercialFisheryExemption TaxExemption = "CA_MB_COMMERCIAL_FISHERY_EXEMPTION" // This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Manitoba. TaxExemptionCAMBFarmerExemption TaxExemption = "CA_MB_FARMER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Manitoba. TaxExemptionCAMBResellerExemption TaxExemption = "CA_MB_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Manitoba. TaxExemptionCANSCommercialFisheryExemption TaxExemption = "CA_NS_COMMERCIAL_FISHERY_EXEMPTION" // This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Nova Scotia. TaxExemptionCANSFarmerExemption TaxExemption = "CA_NS_FARMER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Nova Scotia. TaxExemptionCAONPurchaseExemption TaxExemption = "CA_ON_PURCHASE_EXEMPTION" // This customer is exempt from specific taxes for holding a valid PURCHASE_EXEMPTION in Ontario. TaxExemptionCAPECommercialFisheryExemption TaxExemption = "CA_PE_COMMERCIAL_FISHERY_EXEMPTION" // This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Prince Edward Island. TaxExemptionCASKCommercialFisheryExemption TaxExemption = "CA_SK_COMMERCIAL_FISHERY_EXEMPTION" // This customer is exempt from specific taxes for holding a valid COMMERCIAL_FISHERY_EXEMPTION in Saskatchewan. TaxExemptionCASKContractorExemption TaxExemption = "CA_SK_CONTRACTOR_EXEMPTION" // This customer is exempt from specific taxes for holding a valid CONTRACTOR_EXEMPTION in Saskatchewan. TaxExemptionCASKFarmerExemption TaxExemption = "CA_SK_FARMER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid FARMER_EXEMPTION in Saskatchewan. TaxExemptionCASKProductionAndMachineryExemption TaxExemption = "CA_SK_PRODUCTION_AND_MACHINERY_EXEMPTION" // This customer is exempt from specific taxes for holding a valid PRODUCTION_AND_MACHINERY_EXEMPTION in Saskatchewan. TaxExemptionCASKResellerExemption TaxExemption = "CA_SK_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Saskatchewan. TaxExemptionCASKSubContractorExemption TaxExemption = "CA_SK_SUB_CONTRACTOR_EXEMPTION" // This customer is exempt from specific taxes for holding a valid SUB_CONTRACTOR_EXEMPTION in Saskatchewan. TaxExemptionCAStatusCardExemption TaxExemption = "CA_STATUS_CARD_EXEMPTION" // This customer is exempt from specific taxes for holding a valid STATUS_CARD_EXEMPTION in Canada. TaxExemptionEUReverseChargeExemptionRule TaxExemption = "EU_REVERSE_CHARGE_EXEMPTION_RULE" // This customer is exempt from VAT for purchases within the EU that is shipping from outside of customer's country. TaxExemptionUSAKResellerExemption TaxExemption = "US_AK_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Alaska. TaxExemptionUSALResellerExemption TaxExemption = "US_AL_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Alabama. TaxExemptionUSARResellerExemption TaxExemption = "US_AR_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Arkansas. TaxExemptionUSAZResellerExemption TaxExemption = "US_AZ_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Arizona. TaxExemptionUSCAResellerExemption TaxExemption = "US_CA_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in California. TaxExemptionUSCOResellerExemption TaxExemption = "US_CO_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Colorado. TaxExemptionUSCTResellerExemption TaxExemption = "US_CT_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Connecticut. TaxExemptionUSDCResellerExemption TaxExemption = "US_DC_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Washington DC. TaxExemptionUSDEResellerExemption TaxExemption = "US_DE_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Delaware. TaxExemptionUSFLResellerExemption TaxExemption = "US_FL_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Florida. TaxExemptionUSGAResellerExemption TaxExemption = "US_GA_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Georgia. TaxExemptionUSHIResellerExemption TaxExemption = "US_HI_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Hawaii. TaxExemptionUSIAResellerExemption TaxExemption = "US_IA_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Iowa. TaxExemptionUSIDResellerExemption TaxExemption = "US_ID_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Idaho. TaxExemptionUSILResellerExemption TaxExemption = "US_IL_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Illinois. TaxExemptionUSINResellerExemption TaxExemption = "US_IN_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Indiana. TaxExemptionUSKSResellerExemption TaxExemption = "US_KS_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Kansas. TaxExemptionUSKYResellerExemption TaxExemption = "US_KY_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Kentucky. TaxExemptionUSLAResellerExemption TaxExemption = "US_LA_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Louisiana. TaxExemptionUSMAResellerExemption TaxExemption = "US_MA_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Massachusetts. TaxExemptionUSMDResellerExemption TaxExemption = "US_MD_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Maryland. TaxExemptionUSMEResellerExemption TaxExemption = "US_ME_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Maine. TaxExemptionUSMIResellerExemption TaxExemption = "US_MI_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Michigan. TaxExemptionUSMNResellerExemption TaxExemption = "US_MN_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Minnesota. TaxExemptionUSMOResellerExemption TaxExemption = "US_MO_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Missouri. TaxExemptionUSMSResellerExemption TaxExemption = "US_MS_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Mississippi. TaxExemptionUSMTResellerExemption TaxExemption = "US_MT_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Montana. TaxExemptionUSNCResellerExemption TaxExemption = "US_NC_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in North Carolina. TaxExemptionUSNDResellerExemption TaxExemption = "US_ND_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in North Dakota. TaxExemptionUSNEResellerExemption TaxExemption = "US_NE_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Nebraska. TaxExemptionUSNHResellerExemption TaxExemption = "US_NH_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Hampshire. TaxExemptionUSNJResellerExemption TaxExemption = "US_NJ_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Jersey. TaxExemptionUSNMResellerExemption TaxExemption = "US_NM_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New Mexico. TaxExemptionUSNVResellerExemption TaxExemption = "US_NV_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Nevada. TaxExemptionUSNYResellerExemption TaxExemption = "US_NY_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in New York. TaxExemptionUSOHResellerExemption TaxExemption = "US_OH_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Ohio. TaxExemptionUSOKResellerExemption TaxExemption = "US_OK_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Oklahoma. TaxExemptionUSORResellerExemption TaxExemption = "US_OR_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Oregon. TaxExemptionUSPAResellerExemption TaxExemption = "US_PA_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Pennsylvania. TaxExemptionUSRIResellerExemption TaxExemption = "US_RI_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Rhode Island. TaxExemptionUSSCResellerExemption TaxExemption = "US_SC_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in South Carolina. TaxExemptionUSSDResellerExemption TaxExemption = "US_SD_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in South Dakota. TaxExemptionUSTNResellerExemption TaxExemption = "US_TN_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Tennessee. TaxExemptionUSTXResellerExemption TaxExemption = "US_TX_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Texas. TaxExemptionUSUTResellerExemption TaxExemption = "US_UT_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Utah. TaxExemptionUSVAResellerExemption TaxExemption = "US_VA_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Virginia. TaxExemptionUSVTResellerExemption TaxExemption = "US_VT_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Vermont. TaxExemptionUSWAResellerExemption TaxExemption = "US_WA_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Washington. TaxExemptionUSWIResellerExemption TaxExemption = "US_WI_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Wisconsin. TaxExemptionUSWVResellerExemption TaxExemption = "US_WV_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in West Virginia. TaxExemptionUSWYResellerExemption TaxExemption = "US_WY_RESELLER_EXEMPTION" // This customer is exempt from specific taxes for holding a valid RESELLER_EXEMPTION in Wyoming. )
type TaxLine ¶
type TaxLine struct {
Title string `json:"title"` // The name of the tax.
Source string `json:"source"` // The source of the tax.
Rate float64 `json:"rate"` // The proportion of the line item price that the tax represents as a decimal.
RatePercentage float64 `json:"ratePercentage"` // The proportion of the line item price that the tax represents as a percentage.
PriceSet *MoneyBag `json:"priceSet,omitempty"` // The amount of tax, in shop and presentment currencies, after discounts and before returns.
ChannelLiable bool `json:"channelLiable"` // Whether the channel that submitted the tax line is liable for remitting. A value of null indicates unknown liability for this tax line.
}
Represents a single tax applied to the associated line item.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxLine
type TaxonomyAttribute ¶
type TaxonomyAttribute struct {
ID string `json:"id"` // A globally-unique ID.
}
A Shopify product taxonomy attribute.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxonomyAttribute
type TaxonomyCategory ¶
type TaxonomyCategory struct {
ID string `json:"id"` // The globally-unique ID of the TaxonomyCategory.
Name string `json:"name"` // The name of the taxonomy category. For example, Dog Beds.
FullName string `json:"fullName"` // The full name of the taxonomy category. For example, Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Beds.
ParentID string `json:"parentId"` // The ID of the category's parent category.
AncestorIDs []string `json:"ancestorIds"` // The IDs of the category's ancestor categories.
ChildrenIDs []string `json:"childrenIds"` // The IDs of the category's child categories.
Level int `json:"level"` // The level of the category in the taxonomy tree. Levels indicate the depth of the category from the root. For example, in Animals & Pet Supplies > Pet Supplies > Dog Supplies, Animals & Pet Supplies is at level 1, Animals & Pet Supplies > Pet Supplies is at level 2, and Animals & Pet Supplies > Pet Supplies > Dog Supplies is at level 3.
IsRoot bool `json:"isRoot"` // Whether the category is a root category. A root category is at the top level of the category hierarchy and doesn't have a parent category. For example, Animals & Pet Supplies. The value is `true` when there's no `parentId` specified.
IsLeaf bool `json:"isLeaf"` // Whether the category is a leaf category. A leaf category doesn't have any subcategories beneath it. For example, in Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Treadmills, Dog Treadmills is a leaf category. The value is true when there are no `childrenIds` specified.
IsArchived bool `json:"isArchived"` // Whether the category is archived. The default value is false.
Attributes interface{} `json:"attributes,omitempty"` // The attributes of the taxonomy category.
}
The details of a specific product category within the [Shopify product taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17&shpxid=83947a0f-2938-43E1-F0BF-057C89A43F56).
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxonomyCategory
type TaxonomyCategoryAttribute ¶
type TaxonomyCategoryAttribute interface {
*TaxonomyAttribute | *TaxonomyChoiceListAttribute | *TaxonomyMeasurementAttribute
}
A product taxonomy attribute interface.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/unions/TaxonomyCategoryAttribute
type TaxonomyCategoryAttributeConnection ¶
type TaxonomyCategoryAttributeConnection[T TaxonomyCategoryAttribute] struct { Edges []TaxonomyCategoryAttributeEdge[T] `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. Nodes []T `json:"nodes,omitempty"` // A list of nodes that are contained in TaxonomyCategoryAttributeEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page. }
An auto-generated type for paginating through multiple TaxonomyCategoryAttributes.
type TaxonomyCategoryAttributeEdge ¶
type TaxonomyCategoryAttributeEdge[T TaxonomyCategoryAttribute] struct { Cursor string `json:"cursor"` // The position of each node in an array, used in pagination. Node T `json:"node,omitempty"` // The item at the end of TaxonomyCategoryAttributeEdge. }
An auto-generated type which holds one TaxonomyCategoryAttribute and a cursor during pagination.
type TaxonomyChoiceListAttribute ¶
type TaxonomyChoiceListAttribute struct {
ID string `json:"id"` // The unique ID of the TaxonomyAttribute.
Name string `json:"name"` // The name of the product taxonomy attribute. For example, Color.
Values *TaxonomyValueConnection `json:"values,omitempty"` // A list of values on the choice list attribute.
}
A Shopify product taxonomy choice list attribute.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxonomyChoiceListAttribute
type TaxonomyMeasurementAttribute ¶
type TaxonomyMeasurementAttribute struct {
ID string `json:"id"` // The unique ID of the TaxonomyAttribute.
Name string `json:"name"` // The name of the product taxonomy attribute. For example, Color.
Options []Attribute `json:"options"` // The product taxonomy attribute options.
}
A Shopify product taxonomy measurement attribute.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxonomyMeasurementAttribute
type TaxonomyValue ¶
type TaxonomyValue struct {
ID string `json:"id"` // The unique ID of the TaxonomyAttribute.
Name string `json:"name"` //The name of the product taxonomy value. For example, Red.
}
Represents a Shopify product taxonomy value.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxonomyValue
type TaxonomyValueConnection ¶
type TaxonomyValueConnection struct {
Edges []TaxonomyValueEdge `json:"edges,omitempty"` // The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.
Nodes []TaxonomyValue `json:"nodes,omitempty"` // A list of nodes that are contained in TaxonomyValueEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.
PageInfo *PageInfo `json:"pageInfo,omitempty"` // An object that’s used to retrieve cursor information about the current page.
}
An auto-generated type for paginating through multiple TaxonomyValues.
type TaxonomyValueEdge ¶
type TaxonomyValueEdge struct {
Cursor string `json:"cursor"` // The position of each node in an array, used in pagination.
Node *TaxonomyValue `json:"node,omitempty"` // The item at the end of TaxonomyValueEdge.
}
An auto-generated type which holds one TaxonomyValue and a cursor during pagination.
type TransactionFee ¶
type TransactionFee struct {
ID string `json:"id"` // A globally-unique ID.
Type string `json:"type"` // Name of the type of fee.
Rate Decimal `json:"rate"` // Percentage charge.
RateName string `json:"rateName"` // Name of the credit card rate.
TaxAmount *MoneyV2 `json:"taxAmount,omitempty"` // Tax amount charged on the fee.
FlatFee *MoneyV2 `json:"flatFee,omitempty"` // The amount of the fee.
FlatFeeName string `json:"flatFeeName"` // Name of the credit card flat fee.
Amount *MoneyV2 `json:"amount,omitempty"` // The amount of the fee.
}
Transaction fee related to an order transaction.
Requires `read_orders` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/TransactionFee
type Translation ¶
type Translation struct {
Key string `json:"key"` // On the resource that this translation belongs to, the reference to the value being translated.
Value string `json:"value"` // Translation value.
Locale string `json:"locale"` // ISO code of the translation locale.
Market *Market `json:"market,omitempty"` // The market that the translation is specific to. Null value means the translation is available in all markets.
Outdated bool `json:"outdated"` // Whether the original content has changed since this translation was updated.
UpdatedAt DateTime `json:"updatedAt"` // The date and time when the translation was updated.
}
Translation of a field of a resource.
type TypedAttribute ¶
type TypedAttribute struct {
Key string `json:"key"` // Key or name of the attribute.
Value string `json:"value"` // Value of the attribute.
}
Represents a typed custom attribute.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/TypedAttribute
type URL ¶
type URL string // Represents an RFC 3986 and RFC 3987-compliant URI string. For example, `"https://example.myshopify.com"` is a valid URL. It includes a scheme (`https`) and a host (`example.myshopify.com`).
type UTMParameters ¶
type UTMParameters struct {
Campaign string `json:"campaign"` // The name of a marketing campaign.
Content string `json:"content"` // 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.
Medium string `json:"medium"` // The medium of a marketing campaign, such as a banner or email newsletter.
Source string `json:"source"` // The source of traffic to the merchant's store, such as Google or an email newsletter.
Term string `json:"term"` // Paid search terms used by a marketing campaign.
}
Represents a set of UTM parameters.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/UTMParameters
type UnitPriceMeasurement ¶
type UnitPriceMeasurement struct {
MeasuredType UnitPriceMeasurementMeasuredType `json:"measuredType"` // The type of unit of measurement for the unit price measurement.
QuantityUnit UnitPriceMeasurementMeasuredUnit `json:"quantityUnit"` // The quantity unit for the unit price measurement.
QuantityValue float64 `json:"quantityValue"` // The quantity value for the unit price measurement.
ReferenceUnit UnitPriceMeasurementMeasuredUnit `json:"referenceUnit"` // The reference unit for the unit price measurement.
ReferenceValue int `json:"referenceValue"` // The reference value for the unit price measurement.
}
The measurement used to calculate a unit price for a product variant (e.g. $9.99 / 100ml).
type UnitPriceMeasurementMeasuredType ¶
type UnitPriceMeasurementMeasuredType string
The accepted types of unit of measurement.
const ( UnitPriceMeasurementMeasuredTypeArea UnitPriceMeasurementMeasuredType = "AREA" // Unit of measurements representing areas. UnitPriceMeasurementMeasuredTypeLength UnitPriceMeasurementMeasuredType = "LENGTH" // Unit of measurements representing lengths. UnitPriceMeasurementMeasuredTypeVolume UnitPriceMeasurementMeasuredType = "VOLUME" // Unit of measurements representing volumes. UnitPriceMeasurementMeasuredTypeWeight UnitPriceMeasurementMeasuredType = "WEIGHT" // Unit of measurements representing weights. )
func (UnitPriceMeasurementMeasuredType) Validate ¶
func (measuredType UnitPriceMeasurementMeasuredType) Validate() error
Validate UnitPriceMeasurementMeasuredType
type UnitPriceMeasurementMeasuredUnit ¶
type UnitPriceMeasurementMeasuredUnit string // The valid units of measurement for a unit price measurement.
const ( UnitPriceMeasurementMeasuredUnitCL UnitPriceMeasurementMeasuredUnit = "CL" // 100 centiliters equals 1 liter. UnitPriceMeasurementMeasuredUnitCM UnitPriceMeasurementMeasuredUnit = "CM" // 100 centimeters equals 1 meter. UnitPriceMeasurementMeasuredUnitG UnitPriceMeasurementMeasuredUnit = "G" // Metric system unit of weight. UnitPriceMeasurementMeasuredUnitKG UnitPriceMeasurementMeasuredUnit = "KG" // 1 kilogram equals 1000 grams. UnitPriceMeasurementMeasuredUnitL UnitPriceMeasurementMeasuredUnit = "L" // Metric system unit of volume. UnitPriceMeasurementMeasuredUnitM UnitPriceMeasurementMeasuredUnit = "M" // Metric system unit of length. UnitPriceMeasurementMeasuredUnitM2 UnitPriceMeasurementMeasuredUnit = "M2" // Metric system unit of area. UnitPriceMeasurementMeasuredUnitM3 UnitPriceMeasurementMeasuredUnit = "M3" // 1 cubic meter equals 1000 liters. UnitPriceMeasurementMeasuredUnitMG UnitPriceMeasurementMeasuredUnit = "MG" // 1000 milligrams equals 1 gram. UnitPriceMeasurementMeasuredUnitML UnitPriceMeasurementMeasuredUnit = "ML" // 1000 milliliters equals 1 liter. UnitPriceMeasurementMeasuredUnitMM UnitPriceMeasurementMeasuredUnit = "MM" // 1000 millimeters equals 1 meter. )
func (UnitPriceMeasurementMeasuredUnit) Validate ¶
func (measuredType UnitPriceMeasurementMeasuredUnit) Validate() error
Validate UnitPriceMeasurementMeasuredUnit
type UnitSystem ¶
type UnitSystem string
Systems of weights and measures.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/UnitSystem
const ( UnitSystemImperialSystem UnitSystem = "IMPERIAL_SYSTEM" // Imperial system of weights and measures. UnitSystemMetricSystem UnitSystem = "METRIC_SYSTEM" // Metric system of weights and measures. )
type UserError ¶
type UserError struct {
Field string `json:"field"` // The path to the input field that caused the error.
Message string `json:"message"` // The error message.
}
Represents an error in the input of a mutation.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/UserError
type VaultCreditCard ¶
type VaultCreditCard struct {
Name string `json:"name"` // The name of the card holder.
Brand string `json:"brand"` // The brand for the card.
BillingAddress *CustomerCreditCardBillingAddress `json:"billingAddress,omitempty"`
LastDigits string `json:"lastDigits"` // The last four digits for the card.
Expired bool `json:"expired"` // Whether the card has been expired.
ExpiryMonth int `json:"expiryMonth"` // The expiry month of the card.
ExpiryYear int `json:"expiryYear"` // The expiry year of the card.
}
Represents a credit card payment instrument.
Requires `read_payment_mandate` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/VaultCreditCard
type VaultPaypalBillingAgreement ¶
type VaultPaypalBillingAgreement struct {
Name string `json:"name"` // The paypal account name.
PaypalAccountEmail string `json:"paypalAccountEmail"` // The paypal account email address.
Inactive bool `json:"inactive"` // Whether the paypal billing agreement is inactive.
}
Represents a paypal billing agreement payment instrument.
Requires `read_payment_mandate` access scope.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/VaultPaypalBillingAgreement
type Weight ¶
type Weight struct {
Unit *WeightUnit `json:"unit,omitempty"` // The unit of measurement for value.
Value float64 `json:"value"` // The weight value using the unit system specified with `unit`.
}
A weight, which includes a numeric value and a unit of measurement.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/objects/Weight
type WeightUnit ¶
type WeightUnit string
Units of measurement for weight.
Reference: https://shopify.dev/docs/api/admin-graphql/latest/enums/WeightUnit
const ( WeightUnitGrams WeightUnit = "GRAMS" // Metric system unit of mass. WeightUnitKilograms WeightUnit = "KILOGRAMS" // 1 kilogram equals 1000 grams. WeightUnitOunces WeightUnit = "OUNCES" // Imperial system unit of mass. WeightUnitPounds WeightUnit = "POUNDS" // 1 pound equals 16 ounces. )
Source Files
¶
- shopify.access.go
- shopify.app.go
- shopify.common.go
- shopify.companies.go
- shopify.customers.go
- shopify.discounts.go
- shopify.draft-orders.go
- shopify.events.go
- shopify.files.go
- shopify.fulfillment-orders.go
- shopify.inventory.go
- shopify.locations.go
- shopify.marketplaces.go
- shopify.markets.go
- shopify.orders.go
- shopify.payment-mandate.go
- shopify.payment-terms.go
- shopify.payments.go
- shopify.products.go
- shopify.publications.go
- shopify.returns.go
- shopify.shipping.go
- shopify.shop.channels.go
- shopify.shop.go
- shopify.subscription-contracts.go
- shopify.users.go