From 3934dde58f6a3335d3220c8d15fbdb277504ddb6 Mon Sep 17 00:00:00 2001 From: runner Date: Fri, 1 Jul 2022 14:18:27 +0000 Subject: [PATCH 1/3] Update schema (auto-generated) --- Buy/Generated/Storefront.Schema.swift | 2 +- Buy/Generated/Storefront/Article.swift | 75 +-- Buy/Generated/Storefront/Blog.swift | 75 +-- Buy/Generated/Storefront/Cart.swift | 140 ++++- Buy/Generated/Storefront/CartCost.swift | 309 +++++++++ .../CartCustomDiscountAllocation.swift | 111 ++++ .../Storefront/CartDiscountAllocation.swift | 11 + .../Storefront/CartEstimatedCost.swift | 43 +- Buy/Generated/Storefront/CartInput.swift | 6 +- Buy/Generated/Storefront/CartLine.swift | 79 +++ Buy/Generated/Storefront/CartLineCost.swift | 177 ++++++ .../Storefront/CartLineEstimatedCost.swift | 61 ++ .../CheckoutAttributesUpdateInput.swift | 109 ---- .../CheckoutAttributesUpdatePayload.swift | 151 ----- ...heckoutCompleteWithCreditCardPayload.swift | 183 ------ ...tCompleteWithTokenizedPaymentPayload.swift | 183 ------ ...ompleteWithTokenizedPaymentV2Payload.swift | 186 ------ .../Storefront/CheckoutCreateInput.swift | 6 +- .../CheckoutCustomerAssociatePayload.swift | 150 ----- .../CheckoutCustomerDisassociatePayload.swift | 151 ----- .../CheckoutDiscountCodeApplyPayload.swift | 151 ----- .../CheckoutEmailUpdatePayload.swift | 151 ----- .../CheckoutGiftCardApplyPayload.swift | 151 ----- .../CheckoutGiftCardRemovePayload.swift | 151 ----- ...CheckoutShippingAddressUpdatePayload.swift | 151 ----- Buy/Generated/Storefront/Collection.swift | 75 +-- Buy/Generated/Storefront/CountryCode.swift | 7 +- .../Storefront/CreditCardPaymentInput.swift | 110 ---- Buy/Generated/Storefront/CurrencyCode.swift | 7 + Buy/Generated/Storefront/Customer.swift | 75 +-- .../DiscountApplicationTargetSelection.swift | 10 +- Buy/Generated/Storefront/FilterType.swift | 4 +- Buy/Generated/Storefront/HasMetafields.swift | 79 +-- .../Storefront/HasMetafieldsIdentifier.swift | 69 ++ .../Storefront/ImageTransformInput.swift | 12 +- Buy/Generated/Storefront/LanguageCode.swift | 2 +- Buy/Generated/Storefront/MoneyV2.swift | 2 +- Buy/Generated/Storefront/Mutation.swift | 588 +----------------- Buy/Generated/Storefront/Node.swift | 17 + Buy/Generated/Storefront/Order.swift | 75 +-- Buy/Generated/Storefront/Page.swift | 75 +-- Buy/Generated/Storefront/Payment.swift | 4 +- Buy/Generated/Storefront/Product.swift | 75 +-- Buy/Generated/Storefront/ProductVariant.swift | 75 +-- Buy/Generated/Storefront/QueryRoot.swift | 65 ++ Buy/Generated/Storefront/SellingPlan.swift | 50 +- .../Storefront/SellingPlanAllocation.swift | 58 ++ .../SellingPlanCheckoutCharge.swift | 98 +++ ...ingPlanCheckoutChargePercentageValue.swift | 73 +++ .../SellingPlanCheckoutChargeType.swift | 40 ++ .../SellingPlanCheckoutChargeValue.swift | 92 +++ Buy/Generated/Storefront/Shop.swift | 75 +-- .../Storefront/StoreAvailability.swift | 4 +- .../Storefront/TokenizedPaymentInput.swift | 135 ---- .../Storefront/TokenizedPaymentInputV2.swift | 136 ---- Buy/Generated/Storefront/UrlRedirect.swift | 119 ++++ ...tion.swift => UrlRedirectConnection.swift} | 52 +- ...afieldEdge.swift => UrlRedirectEdge.swift} | 38 +- 58 files changed, 1969 insertions(+), 3390 deletions(-) create mode 100644 Buy/Generated/Storefront/CartCost.swift create mode 100644 Buy/Generated/Storefront/CartCustomDiscountAllocation.swift create mode 100644 Buy/Generated/Storefront/CartLineCost.swift delete mode 100644 Buy/Generated/Storefront/CheckoutAttributesUpdateInput.swift delete mode 100644 Buy/Generated/Storefront/CheckoutAttributesUpdatePayload.swift delete mode 100644 Buy/Generated/Storefront/CheckoutCompleteWithCreditCardPayload.swift delete mode 100644 Buy/Generated/Storefront/CheckoutCompleteWithTokenizedPaymentPayload.swift delete mode 100644 Buy/Generated/Storefront/CheckoutCompleteWithTokenizedPaymentV2Payload.swift delete mode 100644 Buy/Generated/Storefront/CheckoutCustomerAssociatePayload.swift delete mode 100644 Buy/Generated/Storefront/CheckoutCustomerDisassociatePayload.swift delete mode 100644 Buy/Generated/Storefront/CheckoutDiscountCodeApplyPayload.swift delete mode 100644 Buy/Generated/Storefront/CheckoutEmailUpdatePayload.swift delete mode 100644 Buy/Generated/Storefront/CheckoutGiftCardApplyPayload.swift delete mode 100644 Buy/Generated/Storefront/CheckoutGiftCardRemovePayload.swift delete mode 100644 Buy/Generated/Storefront/CheckoutShippingAddressUpdatePayload.swift delete mode 100644 Buy/Generated/Storefront/CreditCardPaymentInput.swift create mode 100644 Buy/Generated/Storefront/HasMetafieldsIdentifier.swift create mode 100644 Buy/Generated/Storefront/SellingPlanCheckoutCharge.swift create mode 100644 Buy/Generated/Storefront/SellingPlanCheckoutChargePercentageValue.swift create mode 100644 Buy/Generated/Storefront/SellingPlanCheckoutChargeType.swift create mode 100644 Buy/Generated/Storefront/SellingPlanCheckoutChargeValue.swift delete mode 100644 Buy/Generated/Storefront/TokenizedPaymentInput.swift delete mode 100644 Buy/Generated/Storefront/TokenizedPaymentInputV2.swift create mode 100644 Buy/Generated/Storefront/UrlRedirect.swift rename Buy/Generated/Storefront/{MetafieldConnection.swift => UrlRedirectConnection.swift} (66%) rename Buy/Generated/Storefront/{MetafieldEdge.swift => UrlRedirectEdge.swift} (68%) diff --git a/Buy/Generated/Storefront.Schema.swift b/Buy/Generated/Storefront.Schema.swift index 627abf741..b2ec67c4c 100644 --- a/Buy/Generated/Storefront.Schema.swift +++ b/Buy/Generated/Storefront.Schema.swift @@ -26,6 +26,6 @@ extension Storefront { enum Schema { - static let version = "2022-04" + static let version = "2022-07" } } diff --git a/Buy/Generated/Storefront/Article.swift b/Buy/Generated/Storefront/Article.swift index 4c9e3f2a3..f8368c1a9 100644 --- a/Buy/Generated/Storefront/Article.swift +++ b/Buy/Generated/Storefront/Article.swift @@ -184,8 +184,8 @@ extension Storefront { /// Returns a metafield found by namespace and key. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - key: Identifier for the metafield (maximum of 30 characters). + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. /// @discardableResult open func metafield(alias: String? = nil, namespace: String, key: String, _ subfields: (MetafieldQuery) -> Void) -> ArticleQuery { @@ -204,48 +204,21 @@ extension Storefront { return self } - /// A paginated list of metafields associated with the resource. + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - first: Returns up to the first `n` elements from the list. - /// - after: Returns the elements that come after the specified cursor. - /// - last: Returns up to the last `n` elements from the list. - /// - before: Returns the elements that come before the specified cursor. - /// - reverse: Reverse the order of the underlying list. + /// - identifiers: The list of metafields to retrieve by namespace and key. /// - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") @discardableResult - open func metafields(alias: String? = nil, namespace: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (MetafieldConnectionQuery) -> Void) -> ArticleQuery { + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> ArticleQuery { var args: [String] = [] - if let namespace = namespace { - args.append("namespace:\(GraphQL.quoteString(input: namespace))") - } - - if let first = first { - args.append("first:\(first)") - } - - if let after = after { - args.append("after:\(GraphQL.quoteString(input: after))") - } - - if let last = last { - args.append("last:\(last)") - } - - if let before = before { - args.append("before:\(GraphQL.quoteString(input: before))") - } - - if let reverse = reverse { - args.append("reverse:\(reverse)") - } + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") - let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + let argsString = "(\(args.joined(separator: ",")))" - let subquery = MetafieldConnectionQuery() + let subquery = MetafieldQuery() subfields(subquery) addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) @@ -378,10 +351,14 @@ extension Storefront { return try Metafield(fields: value) case "metafields": - guard let value = value as? [String: Any] else { + guard let value = value as? [Any] else { throw SchemaViolationError(type: Article.self, field: fieldName, value: fieldValue) } - return try MetafieldConnection(fields: value) + return try value.map { if $0 is NSNull { return nil } + guard let value = $0 as? [String: Any] else { + throw SchemaViolationError(type: Article.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) } as [Any?] case "onlineStoreUrl": if value is NSNull { return nil } @@ -546,20 +523,18 @@ extension Storefront { return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? } - /// A paginated list of metafields associated with the resource. - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - open var metafields: Storefront.MetafieldConnection { + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { return internalGetMetafields() } - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - - open func aliasedMetafields(alias: String) -> Storefront.MetafieldConnection { + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { return internalGetMetafields(alias: alias) } - func internalGetMetafields(alias: String? = nil) -> Storefront.MetafieldConnection { - return field(field: "metafields", aliasSuffix: alias) as! Storefront.MetafieldConnection + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] } /// The URL used for viewing the resource on the shop's Online Store. Returns @@ -644,8 +619,12 @@ extension Storefront { } case "metafields": - response.append(internalGetMetafields()) - response.append(contentsOf: internalGetMetafields().childResponseObjectMap()) + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } case "seo": if let value = internalGetSeo() { diff --git a/Buy/Generated/Storefront/Blog.swift b/Buy/Generated/Storefront/Blog.swift index 191d54592..b766e6400 100644 --- a/Buy/Generated/Storefront/Blog.swift +++ b/Buy/Generated/Storefront/Blog.swift @@ -140,8 +140,8 @@ extension Storefront { /// Returns a metafield found by namespace and key. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - key: Identifier for the metafield (maximum of 30 characters). + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. /// @discardableResult open func metafield(alias: String? = nil, namespace: String, key: String, _ subfields: (MetafieldQuery) -> Void) -> BlogQuery { @@ -160,48 +160,21 @@ extension Storefront { return self } - /// A paginated list of metafields associated with the resource. + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - first: Returns up to the first `n` elements from the list. - /// - after: Returns the elements that come after the specified cursor. - /// - last: Returns up to the last `n` elements from the list. - /// - before: Returns the elements that come before the specified cursor. - /// - reverse: Reverse the order of the underlying list. + /// - identifiers: The list of metafields to retrieve by namespace and key. /// - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") @discardableResult - open func metafields(alias: String? = nil, namespace: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (MetafieldConnectionQuery) -> Void) -> BlogQuery { + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> BlogQuery { var args: [String] = [] - if let namespace = namespace { - args.append("namespace:\(GraphQL.quoteString(input: namespace))") - } - - if let first = first { - args.append("first:\(first)") - } - - if let after = after { - args.append("after:\(GraphQL.quoteString(input: after))") - } - - if let last = last { - args.append("last:\(last)") - } - - if let before = before { - args.append("before:\(GraphQL.quoteString(input: before))") - } - - if let reverse = reverse { - args.append("reverse:\(reverse)") - } + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") - let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + let argsString = "(\(args.joined(separator: ",")))" - let subquery = MetafieldConnectionQuery() + let subquery = MetafieldQuery() subfields(subquery) addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) @@ -281,10 +254,14 @@ extension Storefront { return try Metafield(fields: value) case "metafields": - guard let value = value as? [String: Any] else { + guard let value = value as? [Any] else { throw SchemaViolationError(type: Blog.self, field: fieldName, value: fieldValue) } - return try MetafieldConnection(fields: value) + return try value.map { if $0 is NSNull { return nil } + guard let value = $0 as? [String: Any] else { + throw SchemaViolationError(type: Blog.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) } as [Any?] case "onlineStoreUrl": if value is NSNull { return nil } @@ -378,20 +355,18 @@ extension Storefront { return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? } - /// A paginated list of metafields associated with the resource. - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - open var metafields: Storefront.MetafieldConnection { + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { return internalGetMetafields() } - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - - open func aliasedMetafields(alias: String) -> Storefront.MetafieldConnection { + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { return internalGetMetafields(alias: alias) } - func internalGetMetafields(alias: String? = nil) -> Storefront.MetafieldConnection { - return field(field: "metafields", aliasSuffix: alias) as! Storefront.MetafieldConnection + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] } /// The URL used for viewing the resource on the shop's Online Store. Returns @@ -450,8 +425,12 @@ extension Storefront { } case "metafields": - response.append(internalGetMetafields()) - response.append(contentsOf: internalGetMetafields().childResponseObjectMap()) + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } case "seo": if let value = internalGetSeo() { diff --git a/Buy/Generated/Storefront/Cart.swift b/Buy/Generated/Storefront/Cart.swift index 977549635..ea1c2d7d4 100644 --- a/Buy/Generated/Storefront/Cart.swift +++ b/Buy/Generated/Storefront/Cart.swift @@ -34,6 +34,26 @@ extension Storefront { open class CartQuery: GraphQL.AbstractQuery, GraphQLQuery { public typealias Response = Cart + /// An attribute associated with the cart. + /// + /// - parameters: + /// - key: The key of the attribute. + /// + @discardableResult + open func attribute(alias: String? = nil, key: String, _ subfields: (AttributeQuery) -> Void) -> CartQuery { + var args: [String] = [] + + args.append("key:\(GraphQL.quoteString(input: key))") + + let argsString = "(\(args.joined(separator: ",")))" + + let subquery = AttributeQuery() + subfields(subquery) + + addField(field: "attribute", aliasSuffix: alias, args: argsString, subfields: subquery) + return self + } + /// The attributes associated with the cart. Attributes are represented as /// key-value pairs. @discardableResult @@ -62,6 +82,19 @@ extension Storefront { return self } + /// The estimated costs that the buyer will pay at checkout. The costs are + /// subject to change and changes will be reflected at checkout. The `cost` + /// field uses the `buyerIdentity` field to determine [international + /// pricing](https://shopify.dev/api/examples/international-pricing#create-a-cart). + @discardableResult + open func cost(alias: String? = nil, _ subfields: (CartCostQuery) -> Void) -> CartQuery { + let subquery = CartCostQuery() + subfields(subquery) + + addField(field: "cost", aliasSuffix: alias, subfields: subquery) + return self + } + /// The date and time when the cart was created. @discardableResult open func createdAt(alias: String? = nil) -> CartQuery { @@ -112,7 +145,17 @@ extension Storefront { return self } - /// The discount codes that have been applied to the cart. + /// The discounts that have been applied to the entire cart. + @discardableResult + open func discountAllocations(alias: String? = nil, _ subfields: (CartDiscountAllocationQuery) -> Void) -> CartQuery { + let subquery = CartDiscountAllocationQuery() + subfields(subquery) + + addField(field: "discountAllocations", aliasSuffix: alias, subfields: subquery) + return self + } + + /// The case-insensitive discount codes that the customer added at checkout. @discardableResult open func discountCodes(alias: String? = nil, _ subfields: (CartDiscountCodeQuery) -> Void) -> CartQuery { let subquery = CartDiscountCodeQuery() @@ -127,6 +170,7 @@ extension Storefront { /// `estimatedCost` field uses the `buyerIdentity` field to determine /// [international /// pricing](https://shopify.dev/api/examples/international-pricing#create-a-cart). + @available(*, deprecated, message:"Use `cost` instead") @discardableResult open func estimatedCost(alias: String? = nil, _ subfields: (CartEstimatedCostQuery) -> Void) -> CartQuery { let subquery = CartEstimatedCostQuery() @@ -194,6 +238,13 @@ extension Storefront { return self } + /// The total number of items in the cart. + @discardableResult + open func totalQuantity(alias: String? = nil) -> CartQuery { + addField(field: "totalQuantity", aliasSuffix: alias) + return self + } + /// The date and time when the cart was updated. @discardableResult open func updatedAt(alias: String? = nil) -> CartQuery { @@ -212,6 +263,13 @@ extension Storefront { internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { let fieldValue = value switch fieldName { + case "attribute": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: Cart.self, field: fieldName, value: fieldValue) + } + return try Attribute(fields: value) + case "attributes": guard let value = value as? [[String: Any]] else { throw SchemaViolationError(type: Cart.self, field: fieldName, value: fieldValue) @@ -230,6 +288,12 @@ extension Storefront { } return URL(string: value)! + case "cost": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: Cart.self, field: fieldName, value: fieldValue) + } + return try CartCost(fields: value) + case "createdAt": guard let value = value as? String else { throw SchemaViolationError(type: Cart.self, field: fieldName, value: fieldValue) @@ -242,6 +306,12 @@ extension Storefront { } return try CartDeliveryGroupConnection(fields: value) + case "discountAllocations": + guard let value = value as? [[String: Any]] else { + throw SchemaViolationError(type: Cart.self, field: fieldName, value: fieldValue) + } + return try value.map { return try UnknownCartDiscountAllocation.create(fields: $0) } + case "discountCodes": guard let value = value as? [[String: Any]] else { throw SchemaViolationError(type: Cart.self, field: fieldName, value: fieldValue) @@ -273,6 +343,12 @@ extension Storefront { } return value + case "totalQuantity": + guard let value = value as? Int else { + throw SchemaViolationError(type: Cart.self, field: fieldName, value: fieldValue) + } + return Int32(value) + case "updatedAt": guard let value = value as? String else { throw SchemaViolationError(type: Cart.self, field: fieldName, value: fieldValue) @@ -284,6 +360,19 @@ extension Storefront { } } + /// An attribute associated with the cart. + open var attribute: Storefront.Attribute? { + return internalGetAttribute() + } + + open func aliasedAttribute(alias: String) -> Storefront.Attribute? { + return internalGetAttribute(alias: alias) + } + + func internalGetAttribute(alias: String? = nil) -> Storefront.Attribute? { + return field(field: "attribute", aliasSuffix: alias) as! Storefront.Attribute? + } + /// The attributes associated with the cart. Attributes are represented as /// key-value pairs. open var attributes: [Storefront.Attribute] { @@ -312,6 +401,18 @@ extension Storefront { return field(field: "checkoutUrl", aliasSuffix: alias) as! URL } + /// The estimated costs that the buyer will pay at checkout. The costs are + /// subject to change and changes will be reflected at checkout. The `cost` + /// field uses the `buyerIdentity` field to determine [international + /// pricing](https://shopify.dev/api/examples/international-pricing#create-a-cart). + open var cost: Storefront.CartCost { + return internalGetCost() + } + + func internalGetCost(alias: String? = nil) -> Storefront.CartCost { + return field(field: "cost", aliasSuffix: alias) as! Storefront.CartCost + } + /// The date and time when the cart was created. open var createdAt: Date { return internalGetCreatedAt() @@ -335,7 +436,16 @@ extension Storefront { return field(field: "deliveryGroups", aliasSuffix: alias) as! Storefront.CartDeliveryGroupConnection } - /// The discount codes that have been applied to the cart. + /// The discounts that have been applied to the entire cart. + open var discountAllocations: [CartDiscountAllocation] { + return internalGetDiscountAllocations() + } + + func internalGetDiscountAllocations(alias: String? = nil) -> [CartDiscountAllocation] { + return field(field: "discountAllocations", aliasSuffix: alias) as! [CartDiscountAllocation] + } + + /// The case-insensitive discount codes that the customer added at checkout. open var discountCodes: [Storefront.CartDiscountCode] { return internalGetDiscountCodes() } @@ -349,6 +459,7 @@ extension Storefront { /// `estimatedCost` field uses the `buyerIdentity` field to determine /// [international /// pricing](https://shopify.dev/api/examples/international-pricing#create-a-cart). + @available(*, deprecated, message:"Use `cost` instead") open var estimatedCost: Storefront.CartEstimatedCost { return internalGetEstimatedCost() } @@ -390,6 +501,15 @@ extension Storefront { return field(field: "note", aliasSuffix: alias) as! String? } + /// The total number of items in the cart. + open var totalQuantity: Int32 { + return internalGetTotalQuantity() + } + + func internalGetTotalQuantity(alias: String? = nil) -> Int32 { + return field(field: "totalQuantity", aliasSuffix: alias) as! Int32 + } + /// The date and time when the cart was updated. open var updatedAt: Date { return internalGetUpdatedAt() @@ -403,6 +523,12 @@ extension Storefront { var response: [GraphQL.AbstractResponse] = [] objectMap.keys.forEach { switch($0) { + case "attribute": + if let value = internalGetAttribute() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + case "attributes": internalGetAttributes().forEach { response.append($0) @@ -413,10 +539,20 @@ extension Storefront { response.append(internalGetBuyerIdentity()) response.append(contentsOf: internalGetBuyerIdentity().childResponseObjectMap()) + case "cost": + response.append(internalGetCost()) + response.append(contentsOf: internalGetCost().childResponseObjectMap()) + case "deliveryGroups": response.append(internalGetDeliveryGroups()) response.append(contentsOf: internalGetDeliveryGroups().childResponseObjectMap()) + case "discountAllocations": + internalGetDiscountAllocations().forEach { + response.append(($0 as! GraphQL.AbstractResponse)) + response.append(contentsOf: ($0 as! GraphQL.AbstractResponse).childResponseObjectMap()) + } + case "discountCodes": internalGetDiscountCodes().forEach { response.append($0) diff --git a/Buy/Generated/Storefront/CartCost.swift b/Buy/Generated/Storefront/CartCost.swift new file mode 100644 index 000000000..8fa759f98 --- /dev/null +++ b/Buy/Generated/Storefront/CartCost.swift @@ -0,0 +1,309 @@ +// +// CartCost.swift +// Buy +// +// Created by Shopify. +// Copyright (c) 2017 Shopify Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Storefront { + /// The costs that the buyer will pay at checkout. It uses + /// [`CartBuyerIdentity`](https://shopify.dev/api/storefront/reference/cart/cartbuyeridentity) + /// to determine [international + /// pricing](https://shopify.dev/api/examples/international-pricing#create-a-cart). + open class CartCostQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = CartCost + + /// The estimated amount, before taxes and discounts, for the customer to pay + /// at checkout. The checkout charge amount doesn't include any deferred + /// payments that'll be paid at a later date. If the cart has no deferred + /// payments, the checkout charge amount is equivalent to subtotalAmount. + @discardableResult + open func checkoutChargeAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "checkoutChargeAmount", aliasSuffix: alias, subfields: subquery) + return self + } + + /// The amount, before taxes and cart-level discounts, for the customer to pay. + @discardableResult + open func subtotalAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "subtotalAmount", aliasSuffix: alias, subfields: subquery) + return self + } + + /// Whether or not the subtotal amount is estimated. + @discardableResult + open func subtotalAmountEstimated(alias: String? = nil) -> CartCostQuery { + addField(field: "subtotalAmountEstimated", aliasSuffix: alias) + return self + } + + /// The total amount for the customer to pay. + @discardableResult + open func totalAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "totalAmount", aliasSuffix: alias, subfields: subquery) + return self + } + + /// Whether or not the total amount is estimated. + @discardableResult + open func totalAmountEstimated(alias: String? = nil) -> CartCostQuery { + addField(field: "totalAmountEstimated", aliasSuffix: alias) + return self + } + + /// The duty amount for the customer to pay at checkout. + @discardableResult + open func totalDutyAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "totalDutyAmount", aliasSuffix: alias, subfields: subquery) + return self + } + + /// Whether or not the total duty amount is estimated. + @discardableResult + open func totalDutyAmountEstimated(alias: String? = nil) -> CartCostQuery { + addField(field: "totalDutyAmountEstimated", aliasSuffix: alias) + return self + } + + /// The tax amount for the customer to pay at checkout. + @discardableResult + open func totalTaxAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "totalTaxAmount", aliasSuffix: alias, subfields: subquery) + return self + } + + /// Whether or not the total tax amount is estimated. + @discardableResult + open func totalTaxAmountEstimated(alias: String? = nil) -> CartCostQuery { + addField(field: "totalTaxAmountEstimated", aliasSuffix: alias) + return self + } + } + + /// The costs that the buyer will pay at checkout. It uses + /// [`CartBuyerIdentity`](https://shopify.dev/api/storefront/reference/cart/cartbuyeridentity) + /// to determine [international + /// pricing](https://shopify.dev/api/examples/international-pricing#create-a-cart). + open class CartCost: GraphQL.AbstractResponse, GraphQLObject { + public typealias Query = CartCostQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "checkoutChargeAmount": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + case "subtotalAmount": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + case "subtotalAmountEstimated": + guard let value = value as? Bool else { + throw SchemaViolationError(type: CartCost.self, field: fieldName, value: fieldValue) + } + return value + + case "totalAmount": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + case "totalAmountEstimated": + guard let value = value as? Bool else { + throw SchemaViolationError(type: CartCost.self, field: fieldName, value: fieldValue) + } + return value + + case "totalDutyAmount": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + case "totalDutyAmountEstimated": + guard let value = value as? Bool else { + throw SchemaViolationError(type: CartCost.self, field: fieldName, value: fieldValue) + } + return value + + case "totalTaxAmount": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + case "totalTaxAmountEstimated": + guard let value = value as? Bool else { + throw SchemaViolationError(type: CartCost.self, field: fieldName, value: fieldValue) + } + return value + + default: + throw SchemaViolationError(type: CartCost.self, field: fieldName, value: fieldValue) + } + } + + /// The estimated amount, before taxes and discounts, for the customer to pay + /// at checkout. The checkout charge amount doesn't include any deferred + /// payments that'll be paid at a later date. If the cart has no deferred + /// payments, the checkout charge amount is equivalent to subtotalAmount. + open var checkoutChargeAmount: Storefront.MoneyV2 { + return internalGetCheckoutChargeAmount() + } + + func internalGetCheckoutChargeAmount(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "checkoutChargeAmount", aliasSuffix: alias) as! Storefront.MoneyV2 + } + + /// The amount, before taxes and cart-level discounts, for the customer to pay. + open var subtotalAmount: Storefront.MoneyV2 { + return internalGetSubtotalAmount() + } + + func internalGetSubtotalAmount(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "subtotalAmount", aliasSuffix: alias) as! Storefront.MoneyV2 + } + + /// Whether or not the subtotal amount is estimated. + open var subtotalAmountEstimated: Bool { + return internalGetSubtotalAmountEstimated() + } + + func internalGetSubtotalAmountEstimated(alias: String? = nil) -> Bool { + return field(field: "subtotalAmountEstimated", aliasSuffix: alias) as! Bool + } + + /// The total amount for the customer to pay. + open var totalAmount: Storefront.MoneyV2 { + return internalGetTotalAmount() + } + + func internalGetTotalAmount(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "totalAmount", aliasSuffix: alias) as! Storefront.MoneyV2 + } + + /// Whether or not the total amount is estimated. + open var totalAmountEstimated: Bool { + return internalGetTotalAmountEstimated() + } + + func internalGetTotalAmountEstimated(alias: String? = nil) -> Bool { + return field(field: "totalAmountEstimated", aliasSuffix: alias) as! Bool + } + + /// The duty amount for the customer to pay at checkout. + open var totalDutyAmount: Storefront.MoneyV2? { + return internalGetTotalDutyAmount() + } + + func internalGetTotalDutyAmount(alias: String? = nil) -> Storefront.MoneyV2? { + return field(field: "totalDutyAmount", aliasSuffix: alias) as! Storefront.MoneyV2? + } + + /// Whether or not the total duty amount is estimated. + open var totalDutyAmountEstimated: Bool { + return internalGetTotalDutyAmountEstimated() + } + + func internalGetTotalDutyAmountEstimated(alias: String? = nil) -> Bool { + return field(field: "totalDutyAmountEstimated", aliasSuffix: alias) as! Bool + } + + /// The tax amount for the customer to pay at checkout. + open var totalTaxAmount: Storefront.MoneyV2? { + return internalGetTotalTaxAmount() + } + + func internalGetTotalTaxAmount(alias: String? = nil) -> Storefront.MoneyV2? { + return field(field: "totalTaxAmount", aliasSuffix: alias) as! Storefront.MoneyV2? + } + + /// Whether or not the total tax amount is estimated. + open var totalTaxAmountEstimated: Bool { + return internalGetTotalTaxAmountEstimated() + } + + func internalGetTotalTaxAmountEstimated(alias: String? = nil) -> Bool { + return field(field: "totalTaxAmountEstimated", aliasSuffix: alias) as! Bool + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "checkoutChargeAmount": + response.append(internalGetCheckoutChargeAmount()) + response.append(contentsOf: internalGetCheckoutChargeAmount().childResponseObjectMap()) + + case "subtotalAmount": + response.append(internalGetSubtotalAmount()) + response.append(contentsOf: internalGetSubtotalAmount().childResponseObjectMap()) + + case "totalAmount": + response.append(internalGetTotalAmount()) + response.append(contentsOf: internalGetTotalAmount().childResponseObjectMap()) + + case "totalDutyAmount": + if let value = internalGetTotalDutyAmount() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + + case "totalTaxAmount": + if let value = internalGetTotalTaxAmount() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + + default: + break + } + } + return response + } + } +} diff --git a/Buy/Generated/Storefront/CartCustomDiscountAllocation.swift b/Buy/Generated/Storefront/CartCustomDiscountAllocation.swift new file mode 100644 index 000000000..d3ca0aee4 --- /dev/null +++ b/Buy/Generated/Storefront/CartCustomDiscountAllocation.swift @@ -0,0 +1,111 @@ +// +// CartCustomDiscountAllocation.swift +// Buy +// +// Created by Shopify. +// Copyright (c) 2017 Shopify Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Storefront { + /// The discounts automatically applied to the cart line based on prerequisites + /// that have been met. + open class CartCustomDiscountAllocationQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = CartCustomDiscountAllocation + + /// The discounted amount that has been applied to the cart line. + @discardableResult + open func discountedAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartCustomDiscountAllocationQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "discountedAmount", aliasSuffix: alias, subfields: subquery) + return self + } + + /// The title of the allocated discount. + @discardableResult + open func title(alias: String? = nil) -> CartCustomDiscountAllocationQuery { + addField(field: "title", aliasSuffix: alias) + return self + } + } + + /// The discounts automatically applied to the cart line based on prerequisites + /// that have been met. + open class CartCustomDiscountAllocation: GraphQL.AbstractResponse, GraphQLObject, CartDiscountAllocation { + public typealias Query = CartCustomDiscountAllocationQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "discountedAmount": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartCustomDiscountAllocation.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + case "title": + guard let value = value as? String else { + throw SchemaViolationError(type: CartCustomDiscountAllocation.self, field: fieldName, value: fieldValue) + } + return value + + default: + throw SchemaViolationError(type: CartCustomDiscountAllocation.self, field: fieldName, value: fieldValue) + } + } + + /// The discounted amount that has been applied to the cart line. + open var discountedAmount: Storefront.MoneyV2 { + return internalGetDiscountedAmount() + } + + func internalGetDiscountedAmount(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "discountedAmount", aliasSuffix: alias) as! Storefront.MoneyV2 + } + + /// The title of the allocated discount. + open var title: String { + return internalGetTitle() + } + + func internalGetTitle(alias: String? = nil) -> String { + return field(field: "title", aliasSuffix: alias) as! String + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "discountedAmount": + response.append(internalGetDiscountedAmount()) + response.append(contentsOf: internalGetDiscountedAmount().childResponseObjectMap()) + + default: + break + } + } + return response + } + } +} diff --git a/Buy/Generated/Storefront/CartDiscountAllocation.swift b/Buy/Generated/Storefront/CartDiscountAllocation.swift index b73da6b30..bb94c8687 100644 --- a/Buy/Generated/Storefront/CartDiscountAllocation.swift +++ b/Buy/Generated/Storefront/CartDiscountAllocation.swift @@ -68,6 +68,15 @@ extension Storefront { addInlineFragment(on: "CartCodeDiscountAllocation", subfields: subquery) return self } + + /// The discounts that have been applied to the cart line. + @discardableResult + open func onCartCustomDiscountAllocation(subfields: (CartCustomDiscountAllocationQuery) -> Void) -> CartDiscountAllocationQuery { + let subquery = CartCustomDiscountAllocationQuery() + subfields(subquery) + addInlineFragment(on: "CartCustomDiscountAllocation", subfields: subquery) + return self + } } /// The discounts that have been applied to the cart line. @@ -97,6 +106,8 @@ extension Storefront { case "CartCodeDiscountAllocation": return try CartCodeDiscountAllocation.init(fields: fields) + case "CartCustomDiscountAllocation": return try CartCustomDiscountAllocation.init(fields: fields) + default: return try UnknownCartDiscountAllocation.init(fields: fields) } diff --git a/Buy/Generated/Storefront/CartEstimatedCost.swift b/Buy/Generated/Storefront/CartEstimatedCost.swift index fac40c44a..f8cf9c6de 100644 --- a/Buy/Generated/Storefront/CartEstimatedCost.swift +++ b/Buy/Generated/Storefront/CartEstimatedCost.swift @@ -35,7 +35,20 @@ extension Storefront { public typealias Response = CartEstimatedCost /// The estimated amount, before taxes and discounts, for the customer to pay - /// at checkout. + /// at checkout. The checkout charge amount doesn't include any deferred + /// payments that'll be paid at a later date. If the cart has no deferred + /// payments, then the checkout charge amount is equivalent + /// to`subtotal_amount`. + @discardableResult + open func checkoutChargeAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartEstimatedCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "checkoutChargeAmount", aliasSuffix: alias, subfields: subquery) + return self + } + + /// The estimated amount, before taxes and discounts, for the customer to pay. @discardableResult open func subtotalAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartEstimatedCostQuery { let subquery = MoneyV2Query() @@ -45,7 +58,7 @@ extension Storefront { return self } - /// The estimated total amount for the customer to pay at checkout. + /// The estimated total amount for the customer to pay. @discardableResult open func totalAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartEstimatedCostQuery { let subquery = MoneyV2Query() @@ -86,6 +99,12 @@ extension Storefront { internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { let fieldValue = value switch fieldName { + case "checkoutChargeAmount": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartEstimatedCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + case "subtotalAmount": guard let value = value as? [String: Any] else { throw SchemaViolationError(type: CartEstimatedCost.self, field: fieldName, value: fieldValue) @@ -118,7 +137,19 @@ extension Storefront { } /// The estimated amount, before taxes and discounts, for the customer to pay - /// at checkout. + /// at checkout. The checkout charge amount doesn't include any deferred + /// payments that'll be paid at a later date. If the cart has no deferred + /// payments, then the checkout charge amount is equivalent + /// to`subtotal_amount`. + open var checkoutChargeAmount: Storefront.MoneyV2 { + return internalGetCheckoutChargeAmount() + } + + func internalGetCheckoutChargeAmount(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "checkoutChargeAmount", aliasSuffix: alias) as! Storefront.MoneyV2 + } + + /// The estimated amount, before taxes and discounts, for the customer to pay. open var subtotalAmount: Storefront.MoneyV2 { return internalGetSubtotalAmount() } @@ -127,7 +158,7 @@ extension Storefront { return field(field: "subtotalAmount", aliasSuffix: alias) as! Storefront.MoneyV2 } - /// The estimated total amount for the customer to pay at checkout. + /// The estimated total amount for the customer to pay. open var totalAmount: Storefront.MoneyV2 { return internalGetTotalAmount() } @@ -158,6 +189,10 @@ extension Storefront { var response: [GraphQL.AbstractResponse] = [] objectMap.keys.forEach { switch($0) { + case "checkoutChargeAmount": + response.append(internalGetCheckoutChargeAmount()) + response.append(contentsOf: internalGetCheckoutChargeAmount().childResponseObjectMap()) + case "subtotalAmount": response.append(internalGetSubtotalAmount()) response.append(contentsOf: internalGetSubtotalAmount().childResponseObjectMap()) diff --git a/Buy/Generated/Storefront/CartInput.swift b/Buy/Generated/Storefront/CartInput.swift index 08f47ecc3..413f691e6 100644 --- a/Buy/Generated/Storefront/CartInput.swift +++ b/Buy/Generated/Storefront/CartInput.swift @@ -36,7 +36,7 @@ extension Storefront { /// A list of merchandise lines to add to the cart. open var lines: Input<[CartLineInput]> - /// The discount codes to apply to the cart. + /// The case-insensitive discount codes that the customer added at checkout. open var discountCodes: Input<[String]> /// A note that is associated with the cart. For example, the note can be a @@ -53,7 +53,7 @@ extension Storefront { /// - parameters: /// - attributes: An array of key-value pairs that contains additional information about the cart. /// - lines: A list of merchandise lines to add to the cart. - /// - discountCodes: The discount codes to apply to the cart. + /// - discountCodes: The case-insensitive discount codes that the customer added at checkout. /// - note: A note that is associated with the cart. For example, the note can be a personalized message to the buyer. /// - buyerIdentity: The customer associated with the cart. Used to determine [international pricing](https://shopify.dev/api/examples/international-pricing#create-a-checkout). Buyer identity should match the customer's shipping address. /// @@ -74,7 +74,7 @@ extension Storefront { /// - parameters: /// - attributes: An array of key-value pairs that contains additional information about the cart. /// - lines: A list of merchandise lines to add to the cart. - /// - discountCodes: The discount codes to apply to the cart. + /// - discountCodes: The case-insensitive discount codes that the customer added at checkout. /// - note: A note that is associated with the cart. For example, the note can be a personalized message to the buyer. /// - buyerIdentity: The customer associated with the cart. Used to determine [international pricing](https://shopify.dev/api/examples/international-pricing#create-a-checkout). Buyer identity should match the customer's shipping address. /// diff --git a/Buy/Generated/Storefront/CartLine.swift b/Buy/Generated/Storefront/CartLine.swift index 3e8aa7f97..ce5855341 100644 --- a/Buy/Generated/Storefront/CartLine.swift +++ b/Buy/Generated/Storefront/CartLine.swift @@ -31,6 +31,26 @@ extension Storefront { open class CartLineQuery: GraphQL.AbstractQuery, GraphQLQuery { public typealias Response = CartLine + /// An attribute associated with the cart line. + /// + /// - parameters: + /// - key: The key of the attribute. + /// + @discardableResult + open func attribute(alias: String? = nil, key: String, _ subfields: (AttributeQuery) -> Void) -> CartLineQuery { + var args: [String] = [] + + args.append("key:\(GraphQL.quoteString(input: key))") + + let argsString = "(\(args.joined(separator: ",")))" + + let subquery = AttributeQuery() + subfields(subquery) + + addField(field: "attribute", aliasSuffix: alias, args: argsString, subfields: subquery) + return self + } + /// The attributes associated with the cart line. Attributes are represented as /// key-value pairs. @discardableResult @@ -42,6 +62,17 @@ extension Storefront { return self } + /// The cost of the merchandise that the buyer will pay for at checkout. The + /// costs are subject to change and changes will be reflected at checkout. + @discardableResult + open func cost(alias: String? = nil, _ subfields: (CartLineCostQuery) -> Void) -> CartLineQuery { + let subquery = CartLineCostQuery() + subfields(subquery) + + addField(field: "cost", aliasSuffix: alias, subfields: subquery) + return self + } + /// The discounts that have been applied to the cart line. @discardableResult open func discountAllocations(alias: String? = nil, _ subfields: (CartDiscountAllocationQuery) -> Void) -> CartLineQuery { @@ -55,6 +86,7 @@ extension Storefront { /// The estimated cost of the merchandise that the buyer will pay for at /// checkout. The estimated costs are subject to change and changes will be /// reflected at checkout. + @available(*, deprecated, message:"Use `cost` instead") @discardableResult open func estimatedCost(alias: String? = nil, _ subfields: (CartLineEstimatedCostQuery) -> Void) -> CartLineQuery { let subquery = CartLineEstimatedCostQuery() @@ -107,12 +139,25 @@ extension Storefront { internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { let fieldValue = value switch fieldName { + case "attribute": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartLine.self, field: fieldName, value: fieldValue) + } + return try Attribute(fields: value) + case "attributes": guard let value = value as? [[String: Any]] else { throw SchemaViolationError(type: CartLine.self, field: fieldName, value: fieldValue) } return try value.map { return try Attribute(fields: $0) } + case "cost": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartLine.self, field: fieldName, value: fieldValue) + } + return try CartLineCost(fields: value) + case "discountAllocations": guard let value = value as? [[String: Any]] else { throw SchemaViolationError(type: CartLine.self, field: fieldName, value: fieldValue) @@ -155,6 +200,19 @@ extension Storefront { } } + /// An attribute associated with the cart line. + open var attribute: Storefront.Attribute? { + return internalGetAttribute() + } + + open func aliasedAttribute(alias: String) -> Storefront.Attribute? { + return internalGetAttribute(alias: alias) + } + + func internalGetAttribute(alias: String? = nil) -> Storefront.Attribute? { + return field(field: "attribute", aliasSuffix: alias) as! Storefront.Attribute? + } + /// The attributes associated with the cart line. Attributes are represented as /// key-value pairs. open var attributes: [Storefront.Attribute] { @@ -165,6 +223,16 @@ extension Storefront { return field(field: "attributes", aliasSuffix: alias) as! [Storefront.Attribute] } + /// The cost of the merchandise that the buyer will pay for at checkout. The + /// costs are subject to change and changes will be reflected at checkout. + open var cost: Storefront.CartLineCost { + return internalGetCost() + } + + func internalGetCost(alias: String? = nil) -> Storefront.CartLineCost { + return field(field: "cost", aliasSuffix: alias) as! Storefront.CartLineCost + } + /// The discounts that have been applied to the cart line. open var discountAllocations: [CartDiscountAllocation] { return internalGetDiscountAllocations() @@ -177,6 +245,7 @@ extension Storefront { /// The estimated cost of the merchandise that the buyer will pay for at /// checkout. The estimated costs are subject to change and changes will be /// reflected at checkout. + @available(*, deprecated, message:"Use `cost` instead") open var estimatedCost: Storefront.CartLineEstimatedCost { return internalGetEstimatedCost() } @@ -226,12 +295,22 @@ extension Storefront { var response: [GraphQL.AbstractResponse] = [] objectMap.keys.forEach { switch($0) { + case "attribute": + if let value = internalGetAttribute() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + case "attributes": internalGetAttributes().forEach { response.append($0) response.append(contentsOf: $0.childResponseObjectMap()) } + case "cost": + response.append(internalGetCost()) + response.append(contentsOf: internalGetCost().childResponseObjectMap()) + case "discountAllocations": internalGetDiscountAllocations().forEach { response.append(($0 as! GraphQL.AbstractResponse)) diff --git a/Buy/Generated/Storefront/CartLineCost.swift b/Buy/Generated/Storefront/CartLineCost.swift new file mode 100644 index 000000000..914ab1a6f --- /dev/null +++ b/Buy/Generated/Storefront/CartLineCost.swift @@ -0,0 +1,177 @@ +// +// CartLineCost.swift +// Buy +// +// Created by Shopify. +// Copyright (c) 2017 Shopify Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Storefront { + /// The cost of the merchandise line that the buyer will pay at checkout. + open class CartLineCostQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = CartLineCost + + /// The amount of the merchandise line. + @discardableResult + open func amountPerQuantity(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartLineCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "amountPerQuantity", aliasSuffix: alias, subfields: subquery) + return self + } + + /// The compare at amount of the merchandise line. + @discardableResult + open func compareAtAmountPerQuantity(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartLineCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "compareAtAmountPerQuantity", aliasSuffix: alias, subfields: subquery) + return self + } + + /// The cost of the merchandise line before line-level discounts. + @discardableResult + open func subtotalAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartLineCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "subtotalAmount", aliasSuffix: alias, subfields: subquery) + return self + } + + /// The total cost of the merchandise line. + @discardableResult + open func totalAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartLineCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "totalAmount", aliasSuffix: alias, subfields: subquery) + return self + } + } + + /// The cost of the merchandise line that the buyer will pay at checkout. + open class CartLineCost: GraphQL.AbstractResponse, GraphQLObject { + public typealias Query = CartLineCostQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "amountPerQuantity": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartLineCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + case "compareAtAmountPerQuantity": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartLineCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + case "subtotalAmount": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartLineCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + case "totalAmount": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartLineCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + default: + throw SchemaViolationError(type: CartLineCost.self, field: fieldName, value: fieldValue) + } + } + + /// The amount of the merchandise line. + open var amountPerQuantity: Storefront.MoneyV2 { + return internalGetAmountPerQuantity() + } + + func internalGetAmountPerQuantity(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "amountPerQuantity", aliasSuffix: alias) as! Storefront.MoneyV2 + } + + /// The compare at amount of the merchandise line. + open var compareAtAmountPerQuantity: Storefront.MoneyV2? { + return internalGetCompareAtAmountPerQuantity() + } + + func internalGetCompareAtAmountPerQuantity(alias: String? = nil) -> Storefront.MoneyV2? { + return field(field: "compareAtAmountPerQuantity", aliasSuffix: alias) as! Storefront.MoneyV2? + } + + /// The cost of the merchandise line before line-level discounts. + open var subtotalAmount: Storefront.MoneyV2 { + return internalGetSubtotalAmount() + } + + func internalGetSubtotalAmount(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "subtotalAmount", aliasSuffix: alias) as! Storefront.MoneyV2 + } + + /// The total cost of the merchandise line. + open var totalAmount: Storefront.MoneyV2 { + return internalGetTotalAmount() + } + + func internalGetTotalAmount(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "totalAmount", aliasSuffix: alias) as! Storefront.MoneyV2 + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "amountPerQuantity": + response.append(internalGetAmountPerQuantity()) + response.append(contentsOf: internalGetAmountPerQuantity().childResponseObjectMap()) + + case "compareAtAmountPerQuantity": + if let value = internalGetCompareAtAmountPerQuantity() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + + case "subtotalAmount": + response.append(internalGetSubtotalAmount()) + response.append(contentsOf: internalGetSubtotalAmount().childResponseObjectMap()) + + case "totalAmount": + response.append(internalGetTotalAmount()) + response.append(contentsOf: internalGetTotalAmount().childResponseObjectMap()) + + default: + break + } + } + return response + } + } +} diff --git a/Buy/Generated/Storefront/CartLineEstimatedCost.swift b/Buy/Generated/Storefront/CartLineEstimatedCost.swift index 9f6f31c8a..47d4cf4d5 100644 --- a/Buy/Generated/Storefront/CartLineEstimatedCost.swift +++ b/Buy/Generated/Storefront/CartLineEstimatedCost.swift @@ -32,6 +32,26 @@ extension Storefront { open class CartLineEstimatedCostQuery: GraphQL.AbstractQuery, GraphQLQuery { public typealias Response = CartLineEstimatedCost + /// The amount of the merchandise line. + @discardableResult + open func amount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartLineEstimatedCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "amount", aliasSuffix: alias, subfields: subquery) + return self + } + + /// The compare at amount of the merchandise line. + @discardableResult + open func compareAtAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartLineEstimatedCostQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "compareAtAmount", aliasSuffix: alias, subfields: subquery) + return self + } + /// The estimated cost of the merchandise line before discounts. @discardableResult open func subtotalAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> CartLineEstimatedCostQuery { @@ -61,6 +81,19 @@ extension Storefront { internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { let fieldValue = value switch fieldName { + case "amount": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartLineEstimatedCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + case "compareAtAmount": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartLineEstimatedCost.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + case "subtotalAmount": guard let value = value as? [String: Any] else { throw SchemaViolationError(type: CartLineEstimatedCost.self, field: fieldName, value: fieldValue) @@ -78,6 +111,24 @@ extension Storefront { } } + /// The amount of the merchandise line. + open var amount: Storefront.MoneyV2 { + return internalGetAmount() + } + + func internalGetAmount(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "amount", aliasSuffix: alias) as! Storefront.MoneyV2 + } + + /// The compare at amount of the merchandise line. + open var compareAtAmount: Storefront.MoneyV2? { + return internalGetCompareAtAmount() + } + + func internalGetCompareAtAmount(alias: String? = nil) -> Storefront.MoneyV2? { + return field(field: "compareAtAmount", aliasSuffix: alias) as! Storefront.MoneyV2? + } + /// The estimated cost of the merchandise line before discounts. open var subtotalAmount: Storefront.MoneyV2 { return internalGetSubtotalAmount() @@ -100,6 +151,16 @@ extension Storefront { var response: [GraphQL.AbstractResponse] = [] objectMap.keys.forEach { switch($0) { + case "amount": + response.append(internalGetAmount()) + response.append(contentsOf: internalGetAmount().childResponseObjectMap()) + + case "compareAtAmount": + if let value = internalGetCompareAtAmount() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + case "subtotalAmount": response.append(internalGetSubtotalAmount()) response.append(contentsOf: internalGetSubtotalAmount().childResponseObjectMap()) diff --git a/Buy/Generated/Storefront/CheckoutAttributesUpdateInput.swift b/Buy/Generated/Storefront/CheckoutAttributesUpdateInput.swift deleted file mode 100644 index 3866cb23e..000000000 --- a/Buy/Generated/Storefront/CheckoutAttributesUpdateInput.swift +++ /dev/null @@ -1,109 +0,0 @@ -// -// CheckoutAttributesUpdateInput.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Specifies the fields required to update a checkout's attributes. - open class CheckoutAttributesUpdateInput { - /// The text of an optional note that a shop owner can attach to the checkout. - open var note: Input - - /// A list of extra information that is added to the checkout. - open var customAttributes: Input<[AttributeInput]> - - /// Allows setting partial addresses on a Checkout, skipping the full - /// validation of attributes. The required attributes are city, province, and - /// country. Full validation of the addresses is still done at completion time. - /// Defaults to `false` with each operation. - open var allowPartialAddresses: Input - - /// Creates the input object. - /// - /// - parameters: - /// - note: The text of an optional note that a shop owner can attach to the checkout. - /// - customAttributes: A list of extra information that is added to the checkout. - /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of the addresses is still done at completion time. Defaults to `false` with each operation. - /// - public static func create(note: Input = .undefined, customAttributes: Input<[AttributeInput]> = .undefined, allowPartialAddresses: Input = .undefined) -> CheckoutAttributesUpdateInput { - return CheckoutAttributesUpdateInput(note: note, customAttributes: customAttributes, allowPartialAddresses: allowPartialAddresses) - } - - private init(note: Input = .undefined, customAttributes: Input<[AttributeInput]> = .undefined, allowPartialAddresses: Input = .undefined) { - self.note = note - self.customAttributes = customAttributes - self.allowPartialAddresses = allowPartialAddresses - } - - /// Creates the input object. - /// - /// - parameters: - /// - note: The text of an optional note that a shop owner can attach to the checkout. - /// - customAttributes: A list of extra information that is added to the checkout. - /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of the addresses is still done at completion time. Defaults to `false` with each operation. - /// - @available(*, deprecated, message: "Use the static create() method instead.") - public convenience init(note: String? = nil, customAttributes: [AttributeInput]? = nil, allowPartialAddresses: Bool? = nil) { - self.init(note: note.orUndefined, customAttributes: customAttributes.orUndefined, allowPartialAddresses: allowPartialAddresses.orUndefined) - } - - internal func serialize() -> String { - var fields: [String] = [] - - switch note { - case .value(let note): - guard let note = note else { - fields.append("note:null") - break - } - fields.append("note:\(GraphQL.quoteString(input: note))") - case .undefined: break - } - - switch customAttributes { - case .value(let customAttributes): - guard let customAttributes = customAttributes else { - fields.append("customAttributes:null") - break - } - fields.append("customAttributes:[\(customAttributes.map{ "\($0.serialize())" }.joined(separator: ","))]") - case .undefined: break - } - - switch allowPartialAddresses { - case .value(let allowPartialAddresses): - guard let allowPartialAddresses = allowPartialAddresses else { - fields.append("allowPartialAddresses:null") - break - } - fields.append("allowPartialAddresses:\(allowPartialAddresses)") - case .undefined: break - } - - return "{\(fields.joined(separator: ","))}" - } - } -} diff --git a/Buy/Generated/Storefront/CheckoutAttributesUpdatePayload.swift b/Buy/Generated/Storefront/CheckoutAttributesUpdatePayload.swift deleted file mode 100644 index ae18aa0dc..000000000 --- a/Buy/Generated/Storefront/CheckoutAttributesUpdatePayload.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// CheckoutAttributesUpdatePayload.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Return type for `checkoutAttributesUpdate` mutation. - open class CheckoutAttributesUpdatePayloadQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = CheckoutAttributesUpdatePayload - - /// The updated checkout object. - @discardableResult - open func checkout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CheckoutAttributesUpdatePayloadQuery { - let subquery = CheckoutQuery() - subfields(subquery) - - addField(field: "checkout", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @discardableResult - open func checkoutUserErrors(alias: String? = nil, _ subfields: (CheckoutUserErrorQuery) -> Void) -> CheckoutAttributesUpdatePayloadQuery { - let subquery = CheckoutUserErrorQuery() - subfields(subquery) - - addField(field: "checkoutUserErrors", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - @discardableResult - open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CheckoutAttributesUpdatePayloadQuery { - let subquery = UserErrorQuery() - subfields(subquery) - - addField(field: "userErrors", aliasSuffix: alias, subfields: subquery) - return self - } - } - - /// Return type for `checkoutAttributesUpdate` mutation. - open class CheckoutAttributesUpdatePayload: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = CheckoutAttributesUpdatePayloadQuery - - internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { - let fieldValue = value - switch fieldName { - case "checkout": - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutAttributesUpdatePayload.self, field: fieldName, value: fieldValue) - } - return try Checkout(fields: value) - - case "checkoutUserErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutAttributesUpdatePayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try CheckoutUserError(fields: $0) } - - case "userErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutAttributesUpdatePayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try UserError(fields: $0) } - - default: - throw SchemaViolationError(type: CheckoutAttributesUpdatePayload.self, field: fieldName, value: fieldValue) - } - } - - /// The updated checkout object. - open var checkout: Storefront.Checkout { - return internalGetCheckout() - } - - func internalGetCheckout(alias: String? = nil) -> Storefront.Checkout { - return field(field: "checkout", aliasSuffix: alias) as! Storefront.Checkout - } - - /// The list of errors that occurred from executing the mutation. - open var checkoutUserErrors: [Storefront.CheckoutUserError] { - return internalGetCheckoutUserErrors() - } - - func internalGetCheckoutUserErrors(alias: String? = nil) -> [Storefront.CheckoutUserError] { - return field(field: "checkoutUserErrors", aliasSuffix: alias) as! [Storefront.CheckoutUserError] - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - open var userErrors: [Storefront.UserError] { - return internalGetUserErrors() - } - - func internalGetUserErrors(alias: String? = nil) -> [Storefront.UserError] { - return field(field: "userErrors", aliasSuffix: alias) as! [Storefront.UserError] - } - - internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - var response: [GraphQL.AbstractResponse] = [] - objectMap.keys.forEach { - switch($0) { - case "checkout": - response.append(internalGetCheckout()) - response.append(contentsOf: internalGetCheckout().childResponseObjectMap()) - - case "checkoutUserErrors": - internalGetCheckoutUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - case "userErrors": - internalGetUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - default: - break - } - } - return response - } - } -} diff --git a/Buy/Generated/Storefront/CheckoutCompleteWithCreditCardPayload.swift b/Buy/Generated/Storefront/CheckoutCompleteWithCreditCardPayload.swift deleted file mode 100644 index c05e490e5..000000000 --- a/Buy/Generated/Storefront/CheckoutCompleteWithCreditCardPayload.swift +++ /dev/null @@ -1,183 +0,0 @@ -// -// CheckoutCompleteWithCreditCardPayload.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Return type for `checkoutCompleteWithCreditCard` mutation. - open class CheckoutCompleteWithCreditCardPayloadQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = CheckoutCompleteWithCreditCardPayload - - /// The checkout on which the payment was applied. - @discardableResult - open func checkout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CheckoutCompleteWithCreditCardPayloadQuery { - let subquery = CheckoutQuery() - subfields(subquery) - - addField(field: "checkout", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @discardableResult - open func checkoutUserErrors(alias: String? = nil, _ subfields: (CheckoutUserErrorQuery) -> Void) -> CheckoutCompleteWithCreditCardPayloadQuery { - let subquery = CheckoutUserErrorQuery() - subfields(subquery) - - addField(field: "checkoutUserErrors", aliasSuffix: alias, subfields: subquery) - return self - } - - /// A representation of the attempted payment. - @discardableResult - open func payment(alias: String? = nil, _ subfields: (PaymentQuery) -> Void) -> CheckoutCompleteWithCreditCardPayloadQuery { - let subquery = PaymentQuery() - subfields(subquery) - - addField(field: "payment", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - @discardableResult - open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CheckoutCompleteWithCreditCardPayloadQuery { - let subquery = UserErrorQuery() - subfields(subquery) - - addField(field: "userErrors", aliasSuffix: alias, subfields: subquery) - return self - } - } - - /// Return type for `checkoutCompleteWithCreditCard` mutation. - open class CheckoutCompleteWithCreditCardPayload: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = CheckoutCompleteWithCreditCardPayloadQuery - - internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { - let fieldValue = value - switch fieldName { - case "checkout": - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutCompleteWithCreditCardPayload.self, field: fieldName, value: fieldValue) - } - return try Checkout(fields: value) - - case "checkoutUserErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutCompleteWithCreditCardPayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try CheckoutUserError(fields: $0) } - - case "payment": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutCompleteWithCreditCardPayload.self, field: fieldName, value: fieldValue) - } - return try Payment(fields: value) - - case "userErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutCompleteWithCreditCardPayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try UserError(fields: $0) } - - default: - throw SchemaViolationError(type: CheckoutCompleteWithCreditCardPayload.self, field: fieldName, value: fieldValue) - } - } - - /// The checkout on which the payment was applied. - open var checkout: Storefront.Checkout { - return internalGetCheckout() - } - - func internalGetCheckout(alias: String? = nil) -> Storefront.Checkout { - return field(field: "checkout", aliasSuffix: alias) as! Storefront.Checkout - } - - /// The list of errors that occurred from executing the mutation. - open var checkoutUserErrors: [Storefront.CheckoutUserError] { - return internalGetCheckoutUserErrors() - } - - func internalGetCheckoutUserErrors(alias: String? = nil) -> [Storefront.CheckoutUserError] { - return field(field: "checkoutUserErrors", aliasSuffix: alias) as! [Storefront.CheckoutUserError] - } - - /// A representation of the attempted payment. - open var payment: Storefront.Payment? { - return internalGetPayment() - } - - func internalGetPayment(alias: String? = nil) -> Storefront.Payment? { - return field(field: "payment", aliasSuffix: alias) as! Storefront.Payment? - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - open var userErrors: [Storefront.UserError] { - return internalGetUserErrors() - } - - func internalGetUserErrors(alias: String? = nil) -> [Storefront.UserError] { - return field(field: "userErrors", aliasSuffix: alias) as! [Storefront.UserError] - } - - internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - var response: [GraphQL.AbstractResponse] = [] - objectMap.keys.forEach { - switch($0) { - case "checkout": - response.append(internalGetCheckout()) - response.append(contentsOf: internalGetCheckout().childResponseObjectMap()) - - case "checkoutUserErrors": - internalGetCheckoutUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - case "payment": - if let value = internalGetPayment() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - - case "userErrors": - internalGetUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - default: - break - } - } - return response - } - } -} diff --git a/Buy/Generated/Storefront/CheckoutCompleteWithTokenizedPaymentPayload.swift b/Buy/Generated/Storefront/CheckoutCompleteWithTokenizedPaymentPayload.swift deleted file mode 100644 index ee866ba16..000000000 --- a/Buy/Generated/Storefront/CheckoutCompleteWithTokenizedPaymentPayload.swift +++ /dev/null @@ -1,183 +0,0 @@ -// -// CheckoutCompleteWithTokenizedPaymentPayload.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Return type for `checkoutCompleteWithTokenizedPayment` mutation. - open class CheckoutCompleteWithTokenizedPaymentPayloadQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = CheckoutCompleteWithTokenizedPaymentPayload - - /// The checkout on which the payment was applied. - @discardableResult - open func checkout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CheckoutCompleteWithTokenizedPaymentPayloadQuery { - let subquery = CheckoutQuery() - subfields(subquery) - - addField(field: "checkout", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @discardableResult - open func checkoutUserErrors(alias: String? = nil, _ subfields: (CheckoutUserErrorQuery) -> Void) -> CheckoutCompleteWithTokenizedPaymentPayloadQuery { - let subquery = CheckoutUserErrorQuery() - subfields(subquery) - - addField(field: "checkoutUserErrors", aliasSuffix: alias, subfields: subquery) - return self - } - - /// A representation of the attempted payment. - @discardableResult - open func payment(alias: String? = nil, _ subfields: (PaymentQuery) -> Void) -> CheckoutCompleteWithTokenizedPaymentPayloadQuery { - let subquery = PaymentQuery() - subfields(subquery) - - addField(field: "payment", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - @discardableResult - open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CheckoutCompleteWithTokenizedPaymentPayloadQuery { - let subquery = UserErrorQuery() - subfields(subquery) - - addField(field: "userErrors", aliasSuffix: alias, subfields: subquery) - return self - } - } - - /// Return type for `checkoutCompleteWithTokenizedPayment` mutation. - open class CheckoutCompleteWithTokenizedPaymentPayload: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = CheckoutCompleteWithTokenizedPaymentPayloadQuery - - internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { - let fieldValue = value - switch fieldName { - case "checkout": - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutCompleteWithTokenizedPaymentPayload.self, field: fieldName, value: fieldValue) - } - return try Checkout(fields: value) - - case "checkoutUserErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutCompleteWithTokenizedPaymentPayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try CheckoutUserError(fields: $0) } - - case "payment": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutCompleteWithTokenizedPaymentPayload.self, field: fieldName, value: fieldValue) - } - return try Payment(fields: value) - - case "userErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutCompleteWithTokenizedPaymentPayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try UserError(fields: $0) } - - default: - throw SchemaViolationError(type: CheckoutCompleteWithTokenizedPaymentPayload.self, field: fieldName, value: fieldValue) - } - } - - /// The checkout on which the payment was applied. - open var checkout: Storefront.Checkout { - return internalGetCheckout() - } - - func internalGetCheckout(alias: String? = nil) -> Storefront.Checkout { - return field(field: "checkout", aliasSuffix: alias) as! Storefront.Checkout - } - - /// The list of errors that occurred from executing the mutation. - open var checkoutUserErrors: [Storefront.CheckoutUserError] { - return internalGetCheckoutUserErrors() - } - - func internalGetCheckoutUserErrors(alias: String? = nil) -> [Storefront.CheckoutUserError] { - return field(field: "checkoutUserErrors", aliasSuffix: alias) as! [Storefront.CheckoutUserError] - } - - /// A representation of the attempted payment. - open var payment: Storefront.Payment? { - return internalGetPayment() - } - - func internalGetPayment(alias: String? = nil) -> Storefront.Payment? { - return field(field: "payment", aliasSuffix: alias) as! Storefront.Payment? - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - open var userErrors: [Storefront.UserError] { - return internalGetUserErrors() - } - - func internalGetUserErrors(alias: String? = nil) -> [Storefront.UserError] { - return field(field: "userErrors", aliasSuffix: alias) as! [Storefront.UserError] - } - - internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - var response: [GraphQL.AbstractResponse] = [] - objectMap.keys.forEach { - switch($0) { - case "checkout": - response.append(internalGetCheckout()) - response.append(contentsOf: internalGetCheckout().childResponseObjectMap()) - - case "checkoutUserErrors": - internalGetCheckoutUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - case "payment": - if let value = internalGetPayment() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - - case "userErrors": - internalGetUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - default: - break - } - } - return response - } - } -} diff --git a/Buy/Generated/Storefront/CheckoutCompleteWithTokenizedPaymentV2Payload.swift b/Buy/Generated/Storefront/CheckoutCompleteWithTokenizedPaymentV2Payload.swift deleted file mode 100644 index c93320e39..000000000 --- a/Buy/Generated/Storefront/CheckoutCompleteWithTokenizedPaymentV2Payload.swift +++ /dev/null @@ -1,186 +0,0 @@ -// -// CheckoutCompleteWithTokenizedPaymentV2Payload.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Return type for `checkoutCompleteWithTokenizedPaymentV2` mutation. - open class CheckoutCompleteWithTokenizedPaymentV2PayloadQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = CheckoutCompleteWithTokenizedPaymentV2Payload - - /// The checkout on which the payment was applied. - @discardableResult - open func checkout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CheckoutCompleteWithTokenizedPaymentV2PayloadQuery { - let subquery = CheckoutQuery() - subfields(subquery) - - addField(field: "checkout", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @discardableResult - open func checkoutUserErrors(alias: String? = nil, _ subfields: (CheckoutUserErrorQuery) -> Void) -> CheckoutCompleteWithTokenizedPaymentV2PayloadQuery { - let subquery = CheckoutUserErrorQuery() - subfields(subquery) - - addField(field: "checkoutUserErrors", aliasSuffix: alias, subfields: subquery) - return self - } - - /// A representation of the attempted payment. - @discardableResult - open func payment(alias: String? = nil, _ subfields: (PaymentQuery) -> Void) -> CheckoutCompleteWithTokenizedPaymentV2PayloadQuery { - let subquery = PaymentQuery() - subfields(subquery) - - addField(field: "payment", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - @discardableResult - open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CheckoutCompleteWithTokenizedPaymentV2PayloadQuery { - let subquery = UserErrorQuery() - subfields(subquery) - - addField(field: "userErrors", aliasSuffix: alias, subfields: subquery) - return self - } - } - - /// Return type for `checkoutCompleteWithTokenizedPaymentV2` mutation. - open class CheckoutCompleteWithTokenizedPaymentV2Payload: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = CheckoutCompleteWithTokenizedPaymentV2PayloadQuery - - internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { - let fieldValue = value - switch fieldName { - case "checkout": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutCompleteWithTokenizedPaymentV2Payload.self, field: fieldName, value: fieldValue) - } - return try Checkout(fields: value) - - case "checkoutUserErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutCompleteWithTokenizedPaymentV2Payload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try CheckoutUserError(fields: $0) } - - case "payment": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutCompleteWithTokenizedPaymentV2Payload.self, field: fieldName, value: fieldValue) - } - return try Payment(fields: value) - - case "userErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutCompleteWithTokenizedPaymentV2Payload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try UserError(fields: $0) } - - default: - throw SchemaViolationError(type: CheckoutCompleteWithTokenizedPaymentV2Payload.self, field: fieldName, value: fieldValue) - } - } - - /// The checkout on which the payment was applied. - open var checkout: Storefront.Checkout? { - return internalGetCheckout() - } - - func internalGetCheckout(alias: String? = nil) -> Storefront.Checkout? { - return field(field: "checkout", aliasSuffix: alias) as! Storefront.Checkout? - } - - /// The list of errors that occurred from executing the mutation. - open var checkoutUserErrors: [Storefront.CheckoutUserError] { - return internalGetCheckoutUserErrors() - } - - func internalGetCheckoutUserErrors(alias: String? = nil) -> [Storefront.CheckoutUserError] { - return field(field: "checkoutUserErrors", aliasSuffix: alias) as! [Storefront.CheckoutUserError] - } - - /// A representation of the attempted payment. - open var payment: Storefront.Payment? { - return internalGetPayment() - } - - func internalGetPayment(alias: String? = nil) -> Storefront.Payment? { - return field(field: "payment", aliasSuffix: alias) as! Storefront.Payment? - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - open var userErrors: [Storefront.UserError] { - return internalGetUserErrors() - } - - func internalGetUserErrors(alias: String? = nil) -> [Storefront.UserError] { - return field(field: "userErrors", aliasSuffix: alias) as! [Storefront.UserError] - } - - internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - var response: [GraphQL.AbstractResponse] = [] - objectMap.keys.forEach { - switch($0) { - case "checkout": - if let value = internalGetCheckout() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - - case "checkoutUserErrors": - internalGetCheckoutUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - case "payment": - if let value = internalGetPayment() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - - case "userErrors": - internalGetUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - default: - break - } - } - return response - } - } -} diff --git a/Buy/Generated/Storefront/CheckoutCreateInput.swift b/Buy/Generated/Storefront/CheckoutCreateInput.swift index aaa528f5d..8ff1bb702 100644 --- a/Buy/Generated/Storefront/CheckoutCreateInput.swift +++ b/Buy/Generated/Storefront/CheckoutCreateInput.swift @@ -54,7 +54,7 @@ extension Storefront { /// The three-letter currency code of one of the shop's enabled presentment /// currencies. Including this field creates a checkout in the specified /// currency. By default, new checkouts are created in the shop's primary - /// currency. This argument is deprecated: Use `country` field instead. + /// currency. open var presentmentCurrencyCode: Input /// The identity of the customer associated with the checkout. @@ -69,7 +69,7 @@ extension Storefront { /// - note: The text of an optional note that a shop owner can attach to the checkout. /// - customAttributes: A list of extra information that is added to the checkout. /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of addresses is still done at completion time. Defaults to `null`. - /// - presentmentCurrencyCode: The three-letter currency code of one of the shop's enabled presentment currencies. Including this field creates a checkout in the specified currency. By default, new checkouts are created in the shop's primary currency. This argument is deprecated: Use `country` field instead. + /// - presentmentCurrencyCode: The three-letter currency code of one of the shop's enabled presentment currencies. Including this field creates a checkout in the specified currency. By default, new checkouts are created in the shop's primary currency. /// - buyerIdentity: The identity of the customer associated with the checkout. /// public static func create(email: Input = .undefined, lineItems: Input<[CheckoutLineItemInput]> = .undefined, shippingAddress: Input = .undefined, note: Input = .undefined, customAttributes: Input<[AttributeInput]> = .undefined, allowPartialAddresses: Input = .undefined, presentmentCurrencyCode: Input = .undefined, buyerIdentity: Input = .undefined) -> CheckoutCreateInput { @@ -96,7 +96,7 @@ extension Storefront { /// - note: The text of an optional note that a shop owner can attach to the checkout. /// - customAttributes: A list of extra information that is added to the checkout. /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of addresses is still done at completion time. Defaults to `null`. - /// - presentmentCurrencyCode: The three-letter currency code of one of the shop's enabled presentment currencies. Including this field creates a checkout in the specified currency. By default, new checkouts are created in the shop's primary currency. This argument is deprecated: Use `country` field instead. + /// - presentmentCurrencyCode: The three-letter currency code of one of the shop's enabled presentment currencies. Including this field creates a checkout in the specified currency. By default, new checkouts are created in the shop's primary currency. /// - buyerIdentity: The identity of the customer associated with the checkout. /// @available(*, deprecated, message: "Use the static create() method instead.") diff --git a/Buy/Generated/Storefront/CheckoutCustomerAssociatePayload.swift b/Buy/Generated/Storefront/CheckoutCustomerAssociatePayload.swift deleted file mode 100644 index 6048bc077..000000000 --- a/Buy/Generated/Storefront/CheckoutCustomerAssociatePayload.swift +++ /dev/null @@ -1,150 +0,0 @@ -// -// CheckoutCustomerAssociatePayload.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Return type for `checkoutCustomerAssociate` mutation. - open class CheckoutCustomerAssociatePayloadQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = CheckoutCustomerAssociatePayload - - /// The updated checkout object. - @discardableResult - open func checkout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CheckoutCustomerAssociatePayloadQuery { - let subquery = CheckoutQuery() - subfields(subquery) - - addField(field: "checkout", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The associated customer object. - @discardableResult - open func customer(alias: String? = nil, _ subfields: (CustomerQuery) -> Void) -> CheckoutCustomerAssociatePayloadQuery { - let subquery = CustomerQuery() - subfields(subquery) - - addField(field: "customer", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @discardableResult - open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CheckoutCustomerAssociatePayloadQuery { - let subquery = UserErrorQuery() - subfields(subquery) - - addField(field: "userErrors", aliasSuffix: alias, subfields: subquery) - return self - } - } - - /// Return type for `checkoutCustomerAssociate` mutation. - open class CheckoutCustomerAssociatePayload: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = CheckoutCustomerAssociatePayloadQuery - - internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { - let fieldValue = value - switch fieldName { - case "checkout": - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutCustomerAssociatePayload.self, field: fieldName, value: fieldValue) - } - return try Checkout(fields: value) - - case "customer": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutCustomerAssociatePayload.self, field: fieldName, value: fieldValue) - } - return try Customer(fields: value) - - case "userErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutCustomerAssociatePayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try UserError(fields: $0) } - - default: - throw SchemaViolationError(type: CheckoutCustomerAssociatePayload.self, field: fieldName, value: fieldValue) - } - } - - /// The updated checkout object. - open var checkout: Storefront.Checkout { - return internalGetCheckout() - } - - func internalGetCheckout(alias: String? = nil) -> Storefront.Checkout { - return field(field: "checkout", aliasSuffix: alias) as! Storefront.Checkout - } - - /// The associated customer object. - open var customer: Storefront.Customer? { - return internalGetCustomer() - } - - func internalGetCustomer(alias: String? = nil) -> Storefront.Customer? { - return field(field: "customer", aliasSuffix: alias) as! Storefront.Customer? - } - - /// The list of errors that occurred from executing the mutation. - open var userErrors: [Storefront.UserError] { - return internalGetUserErrors() - } - - func internalGetUserErrors(alias: String? = nil) -> [Storefront.UserError] { - return field(field: "userErrors", aliasSuffix: alias) as! [Storefront.UserError] - } - - internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - var response: [GraphQL.AbstractResponse] = [] - objectMap.keys.forEach { - switch($0) { - case "checkout": - response.append(internalGetCheckout()) - response.append(contentsOf: internalGetCheckout().childResponseObjectMap()) - - case "customer": - if let value = internalGetCustomer() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - - case "userErrors": - internalGetUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - default: - break - } - } - return response - } - } -} diff --git a/Buy/Generated/Storefront/CheckoutCustomerDisassociatePayload.swift b/Buy/Generated/Storefront/CheckoutCustomerDisassociatePayload.swift deleted file mode 100644 index 623a749c1..000000000 --- a/Buy/Generated/Storefront/CheckoutCustomerDisassociatePayload.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// CheckoutCustomerDisassociatePayload.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Return type for `checkoutCustomerDisassociate` mutation. - open class CheckoutCustomerDisassociatePayloadQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = CheckoutCustomerDisassociatePayload - - /// The updated checkout object. - @discardableResult - open func checkout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CheckoutCustomerDisassociatePayloadQuery { - let subquery = CheckoutQuery() - subfields(subquery) - - addField(field: "checkout", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @discardableResult - open func checkoutUserErrors(alias: String? = nil, _ subfields: (CheckoutUserErrorQuery) -> Void) -> CheckoutCustomerDisassociatePayloadQuery { - let subquery = CheckoutUserErrorQuery() - subfields(subquery) - - addField(field: "checkoutUserErrors", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - @discardableResult - open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CheckoutCustomerDisassociatePayloadQuery { - let subquery = UserErrorQuery() - subfields(subquery) - - addField(field: "userErrors", aliasSuffix: alias, subfields: subquery) - return self - } - } - - /// Return type for `checkoutCustomerDisassociate` mutation. - open class CheckoutCustomerDisassociatePayload: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = CheckoutCustomerDisassociatePayloadQuery - - internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { - let fieldValue = value - switch fieldName { - case "checkout": - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutCustomerDisassociatePayload.self, field: fieldName, value: fieldValue) - } - return try Checkout(fields: value) - - case "checkoutUserErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutCustomerDisassociatePayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try CheckoutUserError(fields: $0) } - - case "userErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutCustomerDisassociatePayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try UserError(fields: $0) } - - default: - throw SchemaViolationError(type: CheckoutCustomerDisassociatePayload.self, field: fieldName, value: fieldValue) - } - } - - /// The updated checkout object. - open var checkout: Storefront.Checkout { - return internalGetCheckout() - } - - func internalGetCheckout(alias: String? = nil) -> Storefront.Checkout { - return field(field: "checkout", aliasSuffix: alias) as! Storefront.Checkout - } - - /// The list of errors that occurred from executing the mutation. - open var checkoutUserErrors: [Storefront.CheckoutUserError] { - return internalGetCheckoutUserErrors() - } - - func internalGetCheckoutUserErrors(alias: String? = nil) -> [Storefront.CheckoutUserError] { - return field(field: "checkoutUserErrors", aliasSuffix: alias) as! [Storefront.CheckoutUserError] - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - open var userErrors: [Storefront.UserError] { - return internalGetUserErrors() - } - - func internalGetUserErrors(alias: String? = nil) -> [Storefront.UserError] { - return field(field: "userErrors", aliasSuffix: alias) as! [Storefront.UserError] - } - - internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - var response: [GraphQL.AbstractResponse] = [] - objectMap.keys.forEach { - switch($0) { - case "checkout": - response.append(internalGetCheckout()) - response.append(contentsOf: internalGetCheckout().childResponseObjectMap()) - - case "checkoutUserErrors": - internalGetCheckoutUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - case "userErrors": - internalGetUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - default: - break - } - } - return response - } - } -} diff --git a/Buy/Generated/Storefront/CheckoutDiscountCodeApplyPayload.swift b/Buy/Generated/Storefront/CheckoutDiscountCodeApplyPayload.swift deleted file mode 100644 index 447bb89cc..000000000 --- a/Buy/Generated/Storefront/CheckoutDiscountCodeApplyPayload.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// CheckoutDiscountCodeApplyPayload.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Return type for `checkoutDiscountCodeApply` mutation. - open class CheckoutDiscountCodeApplyPayloadQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = CheckoutDiscountCodeApplyPayload - - /// The updated checkout object. - @discardableResult - open func checkout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CheckoutDiscountCodeApplyPayloadQuery { - let subquery = CheckoutQuery() - subfields(subquery) - - addField(field: "checkout", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @discardableResult - open func checkoutUserErrors(alias: String? = nil, _ subfields: (CheckoutUserErrorQuery) -> Void) -> CheckoutDiscountCodeApplyPayloadQuery { - let subquery = CheckoutUserErrorQuery() - subfields(subquery) - - addField(field: "checkoutUserErrors", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - @discardableResult - open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CheckoutDiscountCodeApplyPayloadQuery { - let subquery = UserErrorQuery() - subfields(subquery) - - addField(field: "userErrors", aliasSuffix: alias, subfields: subquery) - return self - } - } - - /// Return type for `checkoutDiscountCodeApply` mutation. - open class CheckoutDiscountCodeApplyPayload: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = CheckoutDiscountCodeApplyPayloadQuery - - internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { - let fieldValue = value - switch fieldName { - case "checkout": - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutDiscountCodeApplyPayload.self, field: fieldName, value: fieldValue) - } - return try Checkout(fields: value) - - case "checkoutUserErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutDiscountCodeApplyPayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try CheckoutUserError(fields: $0) } - - case "userErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutDiscountCodeApplyPayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try UserError(fields: $0) } - - default: - throw SchemaViolationError(type: CheckoutDiscountCodeApplyPayload.self, field: fieldName, value: fieldValue) - } - } - - /// The updated checkout object. - open var checkout: Storefront.Checkout { - return internalGetCheckout() - } - - func internalGetCheckout(alias: String? = nil) -> Storefront.Checkout { - return field(field: "checkout", aliasSuffix: alias) as! Storefront.Checkout - } - - /// The list of errors that occurred from executing the mutation. - open var checkoutUserErrors: [Storefront.CheckoutUserError] { - return internalGetCheckoutUserErrors() - } - - func internalGetCheckoutUserErrors(alias: String? = nil) -> [Storefront.CheckoutUserError] { - return field(field: "checkoutUserErrors", aliasSuffix: alias) as! [Storefront.CheckoutUserError] - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - open var userErrors: [Storefront.UserError] { - return internalGetUserErrors() - } - - func internalGetUserErrors(alias: String? = nil) -> [Storefront.UserError] { - return field(field: "userErrors", aliasSuffix: alias) as! [Storefront.UserError] - } - - internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - var response: [GraphQL.AbstractResponse] = [] - objectMap.keys.forEach { - switch($0) { - case "checkout": - response.append(internalGetCheckout()) - response.append(contentsOf: internalGetCheckout().childResponseObjectMap()) - - case "checkoutUserErrors": - internalGetCheckoutUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - case "userErrors": - internalGetUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - default: - break - } - } - return response - } - } -} diff --git a/Buy/Generated/Storefront/CheckoutEmailUpdatePayload.swift b/Buy/Generated/Storefront/CheckoutEmailUpdatePayload.swift deleted file mode 100644 index a4125eae2..000000000 --- a/Buy/Generated/Storefront/CheckoutEmailUpdatePayload.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// CheckoutEmailUpdatePayload.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Return type for `checkoutEmailUpdate` mutation. - open class CheckoutEmailUpdatePayloadQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = CheckoutEmailUpdatePayload - - /// The checkout object with the updated email. - @discardableResult - open func checkout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CheckoutEmailUpdatePayloadQuery { - let subquery = CheckoutQuery() - subfields(subquery) - - addField(field: "checkout", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @discardableResult - open func checkoutUserErrors(alias: String? = nil, _ subfields: (CheckoutUserErrorQuery) -> Void) -> CheckoutEmailUpdatePayloadQuery { - let subquery = CheckoutUserErrorQuery() - subfields(subquery) - - addField(field: "checkoutUserErrors", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - @discardableResult - open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CheckoutEmailUpdatePayloadQuery { - let subquery = UserErrorQuery() - subfields(subquery) - - addField(field: "userErrors", aliasSuffix: alias, subfields: subquery) - return self - } - } - - /// Return type for `checkoutEmailUpdate` mutation. - open class CheckoutEmailUpdatePayload: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = CheckoutEmailUpdatePayloadQuery - - internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { - let fieldValue = value - switch fieldName { - case "checkout": - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutEmailUpdatePayload.self, field: fieldName, value: fieldValue) - } - return try Checkout(fields: value) - - case "checkoutUserErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutEmailUpdatePayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try CheckoutUserError(fields: $0) } - - case "userErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutEmailUpdatePayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try UserError(fields: $0) } - - default: - throw SchemaViolationError(type: CheckoutEmailUpdatePayload.self, field: fieldName, value: fieldValue) - } - } - - /// The checkout object with the updated email. - open var checkout: Storefront.Checkout { - return internalGetCheckout() - } - - func internalGetCheckout(alias: String? = nil) -> Storefront.Checkout { - return field(field: "checkout", aliasSuffix: alias) as! Storefront.Checkout - } - - /// The list of errors that occurred from executing the mutation. - open var checkoutUserErrors: [Storefront.CheckoutUserError] { - return internalGetCheckoutUserErrors() - } - - func internalGetCheckoutUserErrors(alias: String? = nil) -> [Storefront.CheckoutUserError] { - return field(field: "checkoutUserErrors", aliasSuffix: alias) as! [Storefront.CheckoutUserError] - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - open var userErrors: [Storefront.UserError] { - return internalGetUserErrors() - } - - func internalGetUserErrors(alias: String? = nil) -> [Storefront.UserError] { - return field(field: "userErrors", aliasSuffix: alias) as! [Storefront.UserError] - } - - internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - var response: [GraphQL.AbstractResponse] = [] - objectMap.keys.forEach { - switch($0) { - case "checkout": - response.append(internalGetCheckout()) - response.append(contentsOf: internalGetCheckout().childResponseObjectMap()) - - case "checkoutUserErrors": - internalGetCheckoutUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - case "userErrors": - internalGetUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - default: - break - } - } - return response - } - } -} diff --git a/Buy/Generated/Storefront/CheckoutGiftCardApplyPayload.swift b/Buy/Generated/Storefront/CheckoutGiftCardApplyPayload.swift deleted file mode 100644 index 947c3d7b0..000000000 --- a/Buy/Generated/Storefront/CheckoutGiftCardApplyPayload.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// CheckoutGiftCardApplyPayload.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Return type for `checkoutGiftCardApply` mutation. - open class CheckoutGiftCardApplyPayloadQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = CheckoutGiftCardApplyPayload - - /// The updated checkout object. - @discardableResult - open func checkout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CheckoutGiftCardApplyPayloadQuery { - let subquery = CheckoutQuery() - subfields(subquery) - - addField(field: "checkout", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @discardableResult - open func checkoutUserErrors(alias: String? = nil, _ subfields: (CheckoutUserErrorQuery) -> Void) -> CheckoutGiftCardApplyPayloadQuery { - let subquery = CheckoutUserErrorQuery() - subfields(subquery) - - addField(field: "checkoutUserErrors", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - @discardableResult - open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CheckoutGiftCardApplyPayloadQuery { - let subquery = UserErrorQuery() - subfields(subquery) - - addField(field: "userErrors", aliasSuffix: alias, subfields: subquery) - return self - } - } - - /// Return type for `checkoutGiftCardApply` mutation. - open class CheckoutGiftCardApplyPayload: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = CheckoutGiftCardApplyPayloadQuery - - internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { - let fieldValue = value - switch fieldName { - case "checkout": - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutGiftCardApplyPayload.self, field: fieldName, value: fieldValue) - } - return try Checkout(fields: value) - - case "checkoutUserErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutGiftCardApplyPayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try CheckoutUserError(fields: $0) } - - case "userErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutGiftCardApplyPayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try UserError(fields: $0) } - - default: - throw SchemaViolationError(type: CheckoutGiftCardApplyPayload.self, field: fieldName, value: fieldValue) - } - } - - /// The updated checkout object. - open var checkout: Storefront.Checkout { - return internalGetCheckout() - } - - func internalGetCheckout(alias: String? = nil) -> Storefront.Checkout { - return field(field: "checkout", aliasSuffix: alias) as! Storefront.Checkout - } - - /// The list of errors that occurred from executing the mutation. - open var checkoutUserErrors: [Storefront.CheckoutUserError] { - return internalGetCheckoutUserErrors() - } - - func internalGetCheckoutUserErrors(alias: String? = nil) -> [Storefront.CheckoutUserError] { - return field(field: "checkoutUserErrors", aliasSuffix: alias) as! [Storefront.CheckoutUserError] - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - open var userErrors: [Storefront.UserError] { - return internalGetUserErrors() - } - - func internalGetUserErrors(alias: String? = nil) -> [Storefront.UserError] { - return field(field: "userErrors", aliasSuffix: alias) as! [Storefront.UserError] - } - - internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - var response: [GraphQL.AbstractResponse] = [] - objectMap.keys.forEach { - switch($0) { - case "checkout": - response.append(internalGetCheckout()) - response.append(contentsOf: internalGetCheckout().childResponseObjectMap()) - - case "checkoutUserErrors": - internalGetCheckoutUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - case "userErrors": - internalGetUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - default: - break - } - } - return response - } - } -} diff --git a/Buy/Generated/Storefront/CheckoutGiftCardRemovePayload.swift b/Buy/Generated/Storefront/CheckoutGiftCardRemovePayload.swift deleted file mode 100644 index 5835a3d84..000000000 --- a/Buy/Generated/Storefront/CheckoutGiftCardRemovePayload.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// CheckoutGiftCardRemovePayload.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Return type for `checkoutGiftCardRemove` mutation. - open class CheckoutGiftCardRemovePayloadQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = CheckoutGiftCardRemovePayload - - /// The updated checkout object. - @discardableResult - open func checkout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CheckoutGiftCardRemovePayloadQuery { - let subquery = CheckoutQuery() - subfields(subquery) - - addField(field: "checkout", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @discardableResult - open func checkoutUserErrors(alias: String? = nil, _ subfields: (CheckoutUserErrorQuery) -> Void) -> CheckoutGiftCardRemovePayloadQuery { - let subquery = CheckoutUserErrorQuery() - subfields(subquery) - - addField(field: "checkoutUserErrors", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - @discardableResult - open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CheckoutGiftCardRemovePayloadQuery { - let subquery = UserErrorQuery() - subfields(subquery) - - addField(field: "userErrors", aliasSuffix: alias, subfields: subquery) - return self - } - } - - /// Return type for `checkoutGiftCardRemove` mutation. - open class CheckoutGiftCardRemovePayload: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = CheckoutGiftCardRemovePayloadQuery - - internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { - let fieldValue = value - switch fieldName { - case "checkout": - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutGiftCardRemovePayload.self, field: fieldName, value: fieldValue) - } - return try Checkout(fields: value) - - case "checkoutUserErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutGiftCardRemovePayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try CheckoutUserError(fields: $0) } - - case "userErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutGiftCardRemovePayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try UserError(fields: $0) } - - default: - throw SchemaViolationError(type: CheckoutGiftCardRemovePayload.self, field: fieldName, value: fieldValue) - } - } - - /// The updated checkout object. - open var checkout: Storefront.Checkout { - return internalGetCheckout() - } - - func internalGetCheckout(alias: String? = nil) -> Storefront.Checkout { - return field(field: "checkout", aliasSuffix: alias) as! Storefront.Checkout - } - - /// The list of errors that occurred from executing the mutation. - open var checkoutUserErrors: [Storefront.CheckoutUserError] { - return internalGetCheckoutUserErrors() - } - - func internalGetCheckoutUserErrors(alias: String? = nil) -> [Storefront.CheckoutUserError] { - return field(field: "checkoutUserErrors", aliasSuffix: alias) as! [Storefront.CheckoutUserError] - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - open var userErrors: [Storefront.UserError] { - return internalGetUserErrors() - } - - func internalGetUserErrors(alias: String? = nil) -> [Storefront.UserError] { - return field(field: "userErrors", aliasSuffix: alias) as! [Storefront.UserError] - } - - internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - var response: [GraphQL.AbstractResponse] = [] - objectMap.keys.forEach { - switch($0) { - case "checkout": - response.append(internalGetCheckout()) - response.append(contentsOf: internalGetCheckout().childResponseObjectMap()) - - case "checkoutUserErrors": - internalGetCheckoutUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - case "userErrors": - internalGetUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - default: - break - } - } - return response - } - } -} diff --git a/Buy/Generated/Storefront/CheckoutShippingAddressUpdatePayload.swift b/Buy/Generated/Storefront/CheckoutShippingAddressUpdatePayload.swift deleted file mode 100644 index 85f7025dd..000000000 --- a/Buy/Generated/Storefront/CheckoutShippingAddressUpdatePayload.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// CheckoutShippingAddressUpdatePayload.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Return type for `checkoutShippingAddressUpdate` mutation. - open class CheckoutShippingAddressUpdatePayloadQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = CheckoutShippingAddressUpdatePayload - - /// The updated checkout object. - @discardableResult - open func checkout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CheckoutShippingAddressUpdatePayloadQuery { - let subquery = CheckoutQuery() - subfields(subquery) - - addField(field: "checkout", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @discardableResult - open func checkoutUserErrors(alias: String? = nil, _ subfields: (CheckoutUserErrorQuery) -> Void) -> CheckoutShippingAddressUpdatePayloadQuery { - let subquery = CheckoutUserErrorQuery() - subfields(subquery) - - addField(field: "checkoutUserErrors", aliasSuffix: alias, subfields: subquery) - return self - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - @discardableResult - open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CheckoutShippingAddressUpdatePayloadQuery { - let subquery = UserErrorQuery() - subfields(subquery) - - addField(field: "userErrors", aliasSuffix: alias, subfields: subquery) - return self - } - } - - /// Return type for `checkoutShippingAddressUpdate` mutation. - open class CheckoutShippingAddressUpdatePayload: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = CheckoutShippingAddressUpdatePayloadQuery - - internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { - let fieldValue = value - switch fieldName { - case "checkout": - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: CheckoutShippingAddressUpdatePayload.self, field: fieldName, value: fieldValue) - } - return try Checkout(fields: value) - - case "checkoutUserErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutShippingAddressUpdatePayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try CheckoutUserError(fields: $0) } - - case "userErrors": - guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: CheckoutShippingAddressUpdatePayload.self, field: fieldName, value: fieldValue) - } - return try value.map { return try UserError(fields: $0) } - - default: - throw SchemaViolationError(type: CheckoutShippingAddressUpdatePayload.self, field: fieldName, value: fieldValue) - } - } - - /// The updated checkout object. - open var checkout: Storefront.Checkout { - return internalGetCheckout() - } - - func internalGetCheckout(alias: String? = nil) -> Storefront.Checkout { - return field(field: "checkout", aliasSuffix: alias) as! Storefront.Checkout - } - - /// The list of errors that occurred from executing the mutation. - open var checkoutUserErrors: [Storefront.CheckoutUserError] { - return internalGetCheckoutUserErrors() - } - - func internalGetCheckoutUserErrors(alias: String? = nil) -> [Storefront.CheckoutUserError] { - return field(field: "checkoutUserErrors", aliasSuffix: alias) as! [Storefront.CheckoutUserError] - } - - /// The list of errors that occurred from executing the mutation. - @available(*, deprecated, message:"Use `checkoutUserErrors` instead") - open var userErrors: [Storefront.UserError] { - return internalGetUserErrors() - } - - func internalGetUserErrors(alias: String? = nil) -> [Storefront.UserError] { - return field(field: "userErrors", aliasSuffix: alias) as! [Storefront.UserError] - } - - internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - var response: [GraphQL.AbstractResponse] = [] - objectMap.keys.forEach { - switch($0) { - case "checkout": - response.append(internalGetCheckout()) - response.append(contentsOf: internalGetCheckout().childResponseObjectMap()) - - case "checkoutUserErrors": - internalGetCheckoutUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - case "userErrors": - internalGetUserErrors().forEach { - response.append($0) - response.append(contentsOf: $0.childResponseObjectMap()) - } - - default: - break - } - } - return response - } - } -} diff --git a/Buy/Generated/Storefront/Collection.swift b/Buy/Generated/Storefront/Collection.swift index 011b05898..4b7a9575c 100644 --- a/Buy/Generated/Storefront/Collection.swift +++ b/Buy/Generated/Storefront/Collection.swift @@ -86,8 +86,8 @@ extension Storefront { /// Returns a metafield found by namespace and key. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - key: Identifier for the metafield (maximum of 30 characters). + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. /// @discardableResult open func metafield(alias: String? = nil, namespace: String, key: String, _ subfields: (MetafieldQuery) -> Void) -> CollectionQuery { @@ -106,48 +106,21 @@ extension Storefront { return self } - /// A paginated list of metafields associated with the resource. + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - first: Returns up to the first `n` elements from the list. - /// - after: Returns the elements that come after the specified cursor. - /// - last: Returns up to the last `n` elements from the list. - /// - before: Returns the elements that come before the specified cursor. - /// - reverse: Reverse the order of the underlying list. + /// - identifiers: The list of metafields to retrieve by namespace and key. /// - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") @discardableResult - open func metafields(alias: String? = nil, namespace: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (MetafieldConnectionQuery) -> Void) -> CollectionQuery { + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> CollectionQuery { var args: [String] = [] - if let namespace = namespace { - args.append("namespace:\(GraphQL.quoteString(input: namespace))") - } - - if let first = first { - args.append("first:\(first)") - } - - if let after = after { - args.append("after:\(GraphQL.quoteString(input: after))") - } - - if let last = last { - args.append("last:\(last)") - } - - if let before = before { - args.append("before:\(GraphQL.quoteString(input: before))") - } - - if let reverse = reverse { - args.append("reverse:\(reverse)") - } + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") - let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + let argsString = "(\(args.joined(separator: ",")))" - let subquery = MetafieldConnectionQuery() + let subquery = MetafieldQuery() subfields(subquery) addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) @@ -287,10 +260,14 @@ extension Storefront { return try Metafield(fields: value) case "metafields": - guard let value = value as? [String: Any] else { + guard let value = value as? [Any] else { throw SchemaViolationError(type: Collection.self, field: fieldName, value: fieldValue) } - return try MetafieldConnection(fields: value) + return try value.map { if $0 is NSNull { return nil } + guard let value = $0 as? [String: Any] else { + throw SchemaViolationError(type: Collection.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) } as [Any?] case "onlineStoreUrl": if value is NSNull { return nil } @@ -391,20 +368,18 @@ extension Storefront { return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? } - /// A paginated list of metafields associated with the resource. - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - open var metafields: Storefront.MetafieldConnection { + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { return internalGetMetafields() } - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - - open func aliasedMetafields(alias: String) -> Storefront.MetafieldConnection { + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { return internalGetMetafields(alias: alias) } - func internalGetMetafields(alias: String? = nil) -> Storefront.MetafieldConnection { - return field(field: "metafields", aliasSuffix: alias) as! Storefront.MetafieldConnection + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] } /// The URL used for viewing the resource on the shop's Online Store. Returns @@ -475,8 +450,12 @@ extension Storefront { } case "metafields": - response.append(internalGetMetafields()) - response.append(contentsOf: internalGetMetafields().childResponseObjectMap()) + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } case "products": response.append(internalGetProducts()) diff --git a/Buy/Generated/Storefront/CountryCode.swift b/Buy/Generated/Storefront/CountryCode.swift index f3beb0632..f9f4a6542 100644 --- a/Buy/Generated/Storefront/CountryCode.swift +++ b/Buy/Generated/Storefront/CountryCode.swift @@ -27,7 +27,12 @@ import Foundation extension Storefront { - /// ISO 3166-1 alpha-2 country codes with some differences. + /// 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`. public enum CountryCode: String { /// Ascension Island. case ac = "AC" diff --git a/Buy/Generated/Storefront/CreditCardPaymentInput.swift b/Buy/Generated/Storefront/CreditCardPaymentInput.swift deleted file mode 100644 index cbe75b18c..000000000 --- a/Buy/Generated/Storefront/CreditCardPaymentInput.swift +++ /dev/null @@ -1,110 +0,0 @@ -// -// CreditCardPaymentInput.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Specifies the fields required to complete a checkout with a Shopify vaulted - /// credit card payment. - open class CreditCardPaymentInput { - /// The amount of the payment. - open var amount: Decimal - - /// A unique client generated key used to avoid duplicate charges. When a - /// duplicate payment is found, the original is returned instead of creating a - /// new one. For more information, refer to [Idempotent - /// requests](https://shopify.dev/api/usage/idempotent-requests). - open var idempotencyKey: String - - /// The billing address for the payment. - open var billingAddress: MailingAddressInput - - /// The ID returned by Shopify's Card Vault. - open var vaultId: String - - /// Executes the payment in test mode if possible. Defaults to `false`. - open var test: Input - - /// Creates the input object. - /// - /// - parameters: - /// - amount: The amount of the payment. - /// - idempotencyKey: A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/api/usage/idempotent-requests). - /// - billingAddress: The billing address for the payment. - /// - vaultId: The ID returned by Shopify's Card Vault. - /// - test: Executes the payment in test mode if possible. Defaults to `false`. - /// - public static func create(amount: Decimal, idempotencyKey: String, billingAddress: MailingAddressInput, vaultId: String, test: Input = .undefined) -> CreditCardPaymentInput { - return CreditCardPaymentInput(amount: amount, idempotencyKey: idempotencyKey, billingAddress: billingAddress, vaultId: vaultId, test: test) - } - - private init(amount: Decimal, idempotencyKey: String, billingAddress: MailingAddressInput, vaultId: String, test: Input = .undefined) { - self.amount = amount - self.idempotencyKey = idempotencyKey - self.billingAddress = billingAddress - self.vaultId = vaultId - self.test = test - } - - /// Creates the input object. - /// - /// - parameters: - /// - amount: The amount of the payment. - /// - idempotencyKey: A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/api/usage/idempotent-requests). - /// - billingAddress: The billing address for the payment. - /// - vaultId: The ID returned by Shopify's Card Vault. - /// - test: Executes the payment in test mode if possible. Defaults to `false`. - /// - @available(*, deprecated, message: "Use the static create() method instead.") - public convenience init(amount: Decimal, idempotencyKey: String, billingAddress: MailingAddressInput, vaultId: String, test: Bool? = nil) { - self.init(amount: amount, idempotencyKey: idempotencyKey, billingAddress: billingAddress, vaultId: vaultId, test: test.orUndefined) - } - - internal func serialize() -> String { - var fields: [String] = [] - - fields.append("amount:\(GraphQL.quoteString(input: "\(String(describing: amount))"))") - - fields.append("idempotencyKey:\(GraphQL.quoteString(input: idempotencyKey))") - - fields.append("billingAddress:\(billingAddress.serialize())") - - fields.append("vaultId:\(GraphQL.quoteString(input: vaultId))") - - switch test { - case .value(let test): - guard let test = test else { - fields.append("test:null") - break - } - fields.append("test:\(test)") - case .undefined: break - } - - return "{\(fields.joined(separator: ","))}" - } - } -} diff --git a/Buy/Generated/Storefront/CurrencyCode.swift b/Buy/Generated/Storefront/CurrencyCode.swift index 2aeb6af27..a7deba56c 100644 --- a/Buy/Generated/Storefront/CurrencyCode.swift +++ b/Buy/Generated/Storefront/CurrencyCode.swift @@ -420,8 +420,12 @@ extension Storefront { case ssp = "SSP" /// Sao Tome And Principe Dobra (STD). + @available(*, deprecated, message:"`STD` is deprecated. Use `STN` available from version `2022-07` onwards instead.") case std = "STD" + /// Sao Tome And Principe Dobra (STN). + case stn = "STN" + /// Syrian Pound (SYP). case syp = "SYP" @@ -470,6 +474,9 @@ extension Storefront { /// Uzbekistan som (UZS). case uzs = "UZS" + /// Venezuelan Bolivares (VED). + case ved = "VED" + /// Venezuelan Bolivares (VEF). @available(*, deprecated, message:"`VEF` is deprecated. Use `VES` available from version `2020-10` onwards instead.") case vef = "VEF" diff --git a/Buy/Generated/Storefront/Customer.swift b/Buy/Generated/Storefront/Customer.swift index 0b9a0de99..11ef78f00 100644 --- a/Buy/Generated/Storefront/Customer.swift +++ b/Buy/Generated/Storefront/Customer.swift @@ -148,8 +148,8 @@ extension Storefront { /// Returns a metafield found by namespace and key. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - key: Identifier for the metafield (maximum of 30 characters). + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. /// @discardableResult open func metafield(alias: String? = nil, namespace: String, key: String, _ subfields: (MetafieldQuery) -> Void) -> CustomerQuery { @@ -168,48 +168,21 @@ extension Storefront { return self } - /// A paginated list of metafields associated with the resource. + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - first: Returns up to the first `n` elements from the list. - /// - after: Returns the elements that come after the specified cursor. - /// - last: Returns up to the last `n` elements from the list. - /// - before: Returns the elements that come before the specified cursor. - /// - reverse: Reverse the order of the underlying list. + /// - identifiers: The list of metafields to retrieve by namespace and key. /// - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") @discardableResult - open func metafields(alias: String? = nil, namespace: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (MetafieldConnectionQuery) -> Void) -> CustomerQuery { + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> CustomerQuery { var args: [String] = [] - if let namespace = namespace { - args.append("namespace:\(GraphQL.quoteString(input: namespace))") - } - - if let first = first { - args.append("first:\(first)") - } - - if let after = after { - args.append("after:\(GraphQL.quoteString(input: after))") - } - - if let last = last { - args.append("last:\(last)") - } - - if let before = before { - args.append("before:\(GraphQL.quoteString(input: before))") - } - - if let reverse = reverse { - args.append("reverse:\(reverse)") - } + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") - let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + let argsString = "(\(args.joined(separator: ",")))" - let subquery = MetafieldConnectionQuery() + let subquery = MetafieldQuery() subfields(subquery) addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) @@ -377,10 +350,14 @@ extension Storefront { return try Metafield(fields: value) case "metafields": - guard let value = value as? [String: Any] else { + guard let value = value as? [Any] else { throw SchemaViolationError(type: Customer.self, field: fieldName, value: fieldValue) } - return try MetafieldConnection(fields: value) + return try value.map { if $0 is NSNull { return nil } + guard let value = $0 as? [String: Any] else { + throw SchemaViolationError(type: Customer.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) } as [Any?] case "orders": guard let value = value as? [String: Any] else { @@ -520,20 +497,18 @@ extension Storefront { return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? } - /// A paginated list of metafields associated with the resource. - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - open var metafields: Storefront.MetafieldConnection { + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { return internalGetMetafields() } - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - - open func aliasedMetafields(alias: String) -> Storefront.MetafieldConnection { + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { return internalGetMetafields(alias: alias) } - func internalGetMetafields(alias: String? = nil) -> Storefront.MetafieldConnection { - return field(field: "metafields", aliasSuffix: alias) as! Storefront.MetafieldConnection + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] } /// The orders associated with the customer. @@ -604,8 +579,12 @@ extension Storefront { } case "metafields": - response.append(internalGetMetafields()) - response.append(contentsOf: internalGetMetafields().childResponseObjectMap()) + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } case "orders": response.append(internalGetOrders()) diff --git a/Buy/Generated/Storefront/DiscountApplicationTargetSelection.swift b/Buy/Generated/Storefront/DiscountApplicationTargetSelection.swift index b8222e814..6f3d39e72 100644 --- a/Buy/Generated/Storefront/DiscountApplicationTargetSelection.swift +++ b/Buy/Generated/Storefront/DiscountApplicationTargetSelection.swift @@ -27,13 +27,17 @@ import Foundation extension Storefront { - /// Which lines on the order that the discount is allocated over, of the type - /// defined by the Discount Application's target_type. + /// 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. public enum DiscountApplicationTargetSelection: String { /// The discount is allocated onto all the lines. case all = "ALL" - /// The discount is allocated onto only the lines it is entitled for. + /// The discount is allocated onto only the lines that it's entitled for. case entitled = "ENTITLED" /// The discount is allocated onto explicitly chosen lines. diff --git a/Buy/Generated/Storefront/FilterType.swift b/Buy/Generated/Storefront/FilterType.swift index d5e1db85d..8b4898285 100644 --- a/Buy/Generated/Storefront/FilterType.swift +++ b/Buy/Generated/Storefront/FilterType.swift @@ -27,7 +27,9 @@ import Foundation extension Storefront { - /// Denotes the type of data this filter group represents. + /// The type of data that the filter group represents. For more information, + /// refer to [Filter products in a collection with the Storefront API] + /// (https://shopify.dev/api/examples/filter-products). public enum FilterType: String { /// A boolean value. case boolean = "BOOLEAN" diff --git a/Buy/Generated/Storefront/HasMetafields.swift b/Buy/Generated/Storefront/HasMetafields.swift index e5da8f4b8..1de3e0644 100644 --- a/Buy/Generated/Storefront/HasMetafields.swift +++ b/Buy/Generated/Storefront/HasMetafields.swift @@ -31,9 +31,7 @@ import Foundation public protocol HasMetafields { var metafield: Storefront.Metafield? { get } - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - - var metafields: Storefront.MetafieldConnection { get } + var metafields: [Storefront.Metafield?] { get } } extension Storefront { @@ -45,8 +43,8 @@ extension Storefront { /// Returns a metafield found by namespace and key. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - key: Identifier for the metafield (maximum of 30 characters). + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. /// @discardableResult open func metafield(alias: String? = nil, namespace: String, key: String, _ subfields: (MetafieldQuery) -> Void) -> HasMetafieldsQuery { @@ -65,48 +63,21 @@ extension Storefront { return self } - /// A paginated list of metafields associated with the resource. + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - first: Returns up to the first `n` elements from the list. - /// - after: Returns the elements that come after the specified cursor. - /// - last: Returns up to the last `n` elements from the list. - /// - before: Returns the elements that come before the specified cursor. - /// - reverse: Reverse the order of the underlying list. + /// - identifiers: The list of metafields to retrieve by namespace and key. /// - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") @discardableResult - open func metafields(alias: String? = nil, namespace: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (MetafieldConnectionQuery) -> Void) -> HasMetafieldsQuery { + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> HasMetafieldsQuery { var args: [String] = [] - if let namespace = namespace { - args.append("namespace:\(GraphQL.quoteString(input: namespace))") - } - - if let first = first { - args.append("first:\(first)") - } - - if let after = after { - args.append("after:\(GraphQL.quoteString(input: after))") - } - - if let last = last { - args.append("last:\(last)") - } - - if let before = before { - args.append("before:\(GraphQL.quoteString(input: before))") - } + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") - if let reverse = reverse { - args.append("reverse:\(reverse)") - } - - let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + let argsString = "(\(args.joined(separator: ",")))" - let subquery = MetafieldConnectionQuery() + let subquery = MetafieldQuery() subfields(subquery) addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) @@ -225,10 +196,14 @@ extension Storefront { return try Metafield(fields: value) case "metafields": - guard let value = value as? [String: Any] else { + guard let value = value as? [Any] else { throw SchemaViolationError(type: UnknownHasMetafields.self, field: fieldName, value: fieldValue) } - return try MetafieldConnection(fields: value) + return try value.map { if $0 is NSNull { return nil } + guard let value = $0 as? [String: Any] else { + throw SchemaViolationError(type: UnknownHasMetafields.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) } as [Any?] default: throw SchemaViolationError(type: UnknownHasMetafields.self, field: fieldName, value: fieldValue) @@ -276,20 +251,18 @@ extension Storefront { return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? } - /// A paginated list of metafields associated with the resource. - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - open var metafields: Storefront.MetafieldConnection { + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { return internalGetMetafields() } - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - - open func aliasedMetafields(alias: String) -> Storefront.MetafieldConnection { + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { return internalGetMetafields(alias: alias) } - func internalGetMetafields(alias: String? = nil) -> Storefront.MetafieldConnection { - return field(field: "metafields", aliasSuffix: alias) as! Storefront.MetafieldConnection + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] } internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { @@ -303,8 +276,12 @@ extension Storefront { } case "metafields": - response.append(internalGetMetafields()) - response.append(contentsOf: internalGetMetafields().childResponseObjectMap()) + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } default: break diff --git a/Buy/Generated/Storefront/HasMetafieldsIdentifier.swift b/Buy/Generated/Storefront/HasMetafieldsIdentifier.swift new file mode 100644 index 000000000..3f783ad5c --- /dev/null +++ b/Buy/Generated/Storefront/HasMetafieldsIdentifier.swift @@ -0,0 +1,69 @@ +// +// HasMetafieldsIdentifier.swift +// Buy +// +// Created by Shopify. +// Copyright (c) 2017 Shopify Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Storefront { + /// Identifies a metafield on an owner resource by namespace and key. + open class HasMetafieldsIdentifier { + /// A container for a set of metafields. + open var namespace: String + + /// The identifier for the metafield. + open var key: String + + /// Creates the input object. + /// + /// - parameters: + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. + /// + public static func create(namespace: String, key: String) -> HasMetafieldsIdentifier { + return HasMetafieldsIdentifier(namespace: namespace, key: key) + } + + /// Creates the input object. + /// + /// - parameters: + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. + /// + public init(namespace: String, key: String) { + self.namespace = namespace + self.key = key + } + + internal func serialize() -> String { + var fields: [String] = [] + + fields.append("namespace:\(GraphQL.quoteString(input: namespace))") + + fields.append("key:\(GraphQL.quoteString(input: key))") + + return "{\(fields.joined(separator: ","))}" + } + } +} diff --git a/Buy/Generated/Storefront/ImageTransformInput.swift b/Buy/Generated/Storefront/ImageTransformInput.swift index 6f7c67d55..dd628138d 100644 --- a/Buy/Generated/Storefront/ImageTransformInput.swift +++ b/Buy/Generated/Storefront/ImageTransformInput.swift @@ -31,7 +31,13 @@ extension Storefront { /// are considered "best-effort". Any transformation that the original image /// type doesn't support will be ignored. open class ImageTransformInput { - /// Crop the image according to the specified region. + /// Region of the image to remain after cropping. Must be used in conjunction + /// with maxWidth and/or maxHeight fields where the maxWidth / maxHeight are + /// not equal. The crop parameter should coincide with the smaller value (i.e. + /// smaller maxWidth indicates a LEFT / RIGHT crop, while smaller maxHeight + /// indicates a TOP / BOTTOM crop). For example, { maxWidth: 5, maxHeight: 10, + /// crop: LEFT } will result in an image with width 5 and height 10, where the + /// right side of the image is removed. open var crop: Input /// Image width in pixels between 1 and 5760. @@ -52,7 +58,7 @@ extension Storefront { /// Creates the input object. /// /// - parameters: - /// - crop: Crop the image according to the specified region. + /// - crop: Region of the image to remain after cropping. Must be used in conjunction with maxWidth and/or maxHeight fields where the maxWidth / maxHeight are not equal. The crop parameter should coincide with the smaller value (i.e. smaller maxWidth indicates a LEFT / RIGHT crop, while smaller maxHeight indicates a TOP / BOTTOM crop). For example, { maxWidth: 5, maxHeight: 10, crop: LEFT } will result in an image with width 5 and height 10, where the right side of the image is removed. /// - maxWidth: Image width in pixels between 1 and 5760. /// - maxHeight: Image height in pixels between 1 and 5760. /// - scale: Image size multiplier for high-resolution retina displays. Must be within 1..3. @@ -73,7 +79,7 @@ extension Storefront { /// Creates the input object. /// /// - parameters: - /// - crop: Crop the image according to the specified region. + /// - crop: Region of the image to remain after cropping. Must be used in conjunction with maxWidth and/or maxHeight fields where the maxWidth / maxHeight are not equal. The crop parameter should coincide with the smaller value (i.e. smaller maxWidth indicates a LEFT / RIGHT crop, while smaller maxHeight indicates a TOP / BOTTOM crop). For example, { maxWidth: 5, maxHeight: 10, crop: LEFT } will result in an image with width 5 and height 10, where the right side of the image is removed. /// - maxWidth: Image width in pixels between 1 and 5760. /// - maxHeight: Image height in pixels between 1 and 5760. /// - scale: Image size multiplier for high-resolution retina displays. Must be within 1..3. diff --git a/Buy/Generated/Storefront/LanguageCode.swift b/Buy/Generated/Storefront/LanguageCode.swift index ee30bfea1..f127acbbc 100644 --- a/Buy/Generated/Storefront/LanguageCode.swift +++ b/Buy/Generated/Storefront/LanguageCode.swift @@ -27,7 +27,7 @@ import Foundation extension Storefront { - /// ISO 369 language codes supported by Shopify. + /// ISO 639-1 language codes supported by Shopify. public enum LanguageCode: String { /// Afrikaans. case af = "AF" diff --git a/Buy/Generated/Storefront/MoneyV2.swift b/Buy/Generated/Storefront/MoneyV2.swift index 7cd15be8c..c82471d7a 100644 --- a/Buy/Generated/Storefront/MoneyV2.swift +++ b/Buy/Generated/Storefront/MoneyV2.swift @@ -47,7 +47,7 @@ extension Storefront { } /// A monetary value with currency. - open class MoneyV2: GraphQL.AbstractResponse, GraphQLObject, PricingValue { + open class MoneyV2: GraphQL.AbstractResponse, GraphQLObject, PricingValue, SellingPlanCheckoutChargeValue { public typealias Query = MoneyV2Query internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { diff --git a/Buy/Generated/Storefront/Mutation.swift b/Buy/Generated/Storefront/Mutation.swift index a8bfb7564..4c5f8ea79 100644 --- a/Buy/Generated/Storefront/Mutation.swift +++ b/Buy/Generated/Storefront/Mutation.swift @@ -111,7 +111,7 @@ extension Storefront { /// /// - parameters: /// - cartId: The ID of the cart. - /// - discountCodes: The discount codes to apply to the cart. + /// - discountCodes: The case-insensitive discount codes that the customer added at checkout. /// @discardableResult open func cartDiscountCodesUpdate(alias: String? = nil, cartId: GraphQL.ID, discountCodes: [String]? = nil, _ subfields: (CartDiscountCodesUpdatePayloadQuery) -> Void) -> MutationQuery { @@ -226,30 +226,6 @@ extension Storefront { return self } - /// Updates the attributes of a checkout if `allowPartialAddresses` is `true`. - /// - /// - parameters: - /// - checkoutId: The ID of the checkout. - /// - input: The fields used to update a checkout's attributes. - /// - @available(*, deprecated, message:"Use `checkoutAttributesUpdateV2` instead") - @discardableResult - open func checkoutAttributesUpdate(alias: String? = nil, checkoutId: GraphQL.ID, input: CheckoutAttributesUpdateInput, _ subfields: (CheckoutAttributesUpdatePayloadQuery) -> Void) -> MutationQuery { - var args: [String] = [] - - args.append("checkoutId:\(GraphQL.quoteString(input: "\(checkoutId.rawValue)"))") - - args.append("input:\(input.serialize())") - - let argsString = "(\(args.joined(separator: ",")))" - - let subquery = CheckoutAttributesUpdatePayloadQuery() - subfields(subquery) - - addField(field: "checkoutAttributesUpdate", aliasSuffix: alias, args: argsString, subfields: subquery) - return self - } - /// Updates the attributes of a checkout if `allowPartialAddresses` is `true`. /// /// - parameters: @@ -295,30 +271,6 @@ extension Storefront { return self } - /// Completes a checkout using a credit card token from Shopify's Vault. - /// - /// - parameters: - /// - checkoutId: The ID of the checkout. - /// - payment: The credit card info to apply as a payment. - /// - @available(*, deprecated, message:"Use `checkoutCompleteWithCreditCardV2` instead") - @discardableResult - open func checkoutCompleteWithCreditCard(alias: String? = nil, checkoutId: GraphQL.ID, payment: CreditCardPaymentInput, _ subfields: (CheckoutCompleteWithCreditCardPayloadQuery) -> Void) -> MutationQuery { - var args: [String] = [] - - args.append("checkoutId:\(GraphQL.quoteString(input: "\(checkoutId.rawValue)"))") - - args.append("payment:\(payment.serialize())") - - let argsString = "(\(args.joined(separator: ",")))" - - let subquery = CheckoutCompleteWithCreditCardPayloadQuery() - subfields(subquery) - - addField(field: "checkoutCompleteWithCreditCard", aliasSuffix: alias, args: argsString, subfields: subquery) - return self - } - /// Completes a checkout using a credit card token from Shopify's card vault. /// Before you can complete checkouts using CheckoutCompleteWithCreditCardV2, /// you need to [_request payment @@ -345,54 +297,6 @@ extension Storefront { return self } - /// Completes a checkout with a tokenized payment. - /// - /// - parameters: - /// - checkoutId: The ID of the checkout. - /// - payment: The info to apply as a tokenized payment. - /// - @available(*, deprecated, message:"Use `checkoutCompleteWithTokenizedPaymentV2` instead") - @discardableResult - open func checkoutCompleteWithTokenizedPayment(alias: String? = nil, checkoutId: GraphQL.ID, payment: TokenizedPaymentInput, _ subfields: (CheckoutCompleteWithTokenizedPaymentPayloadQuery) -> Void) -> MutationQuery { - var args: [String] = [] - - args.append("checkoutId:\(GraphQL.quoteString(input: "\(checkoutId.rawValue)"))") - - args.append("payment:\(payment.serialize())") - - let argsString = "(\(args.joined(separator: ",")))" - - let subquery = CheckoutCompleteWithTokenizedPaymentPayloadQuery() - subfields(subquery) - - addField(field: "checkoutCompleteWithTokenizedPayment", aliasSuffix: alias, args: argsString, subfields: subquery) - return self - } - - /// Completes a checkout with a tokenized payment. - /// - /// - parameters: - /// - checkoutId: The ID of the checkout. - /// - payment: The info to apply as a tokenized payment. - /// - @available(*, deprecated, message:"Use `checkoutCompleteWithTokenizedPaymentV3` instead") - @discardableResult - open func checkoutCompleteWithTokenizedPaymentV2(alias: String? = nil, checkoutId: GraphQL.ID, payment: TokenizedPaymentInputV2, _ subfields: (CheckoutCompleteWithTokenizedPaymentV2PayloadQuery) -> Void) -> MutationQuery { - var args: [String] = [] - - args.append("checkoutId:\(GraphQL.quoteString(input: "\(checkoutId.rawValue)"))") - - args.append("payment:\(payment.serialize())") - - let argsString = "(\(args.joined(separator: ",")))" - - let subquery = CheckoutCompleteWithTokenizedPaymentV2PayloadQuery() - subfields(subquery) - - addField(field: "checkoutCompleteWithTokenizedPaymentV2", aliasSuffix: alias, args: argsString, subfields: subquery) - return self - } - /// Completes a checkout with a tokenized payment. /// /// - parameters: @@ -441,30 +345,6 @@ extension Storefront { return self } - /// Associates a customer to the checkout. - /// - /// - parameters: - /// - checkoutId: The ID of the checkout. - /// - customerAccessToken: The customer access token of the customer to associate. - /// - @available(*, deprecated, message:"Use `checkoutCustomerAssociateV2` instead") - @discardableResult - open func checkoutCustomerAssociate(alias: String? = nil, checkoutId: GraphQL.ID, customerAccessToken: String, _ subfields: (CheckoutCustomerAssociatePayloadQuery) -> Void) -> MutationQuery { - var args: [String] = [] - - args.append("checkoutId:\(GraphQL.quoteString(input: "\(checkoutId.rawValue)"))") - - args.append("customerAccessToken:\(GraphQL.quoteString(input: customerAccessToken))") - - let argsString = "(\(args.joined(separator: ",")))" - - let subquery = CheckoutCustomerAssociatePayloadQuery() - subfields(subquery) - - addField(field: "checkoutCustomerAssociate", aliasSuffix: alias, args: argsString, subfields: subquery) - return self - } - /// Associates a customer to the checkout. /// /// - parameters: @@ -488,27 +368,6 @@ extension Storefront { return self } - /// Disassociates the current checkout customer from the checkout. - /// - /// - parameters: - /// - checkoutId: The ID of the checkout. - /// - @available(*, deprecated, message:"Use `checkoutCustomerDisassociateV2` instead") - @discardableResult - open func checkoutCustomerDisassociate(alias: String? = nil, checkoutId: GraphQL.ID, _ subfields: (CheckoutCustomerDisassociatePayloadQuery) -> Void) -> MutationQuery { - var args: [String] = [] - - args.append("checkoutId:\(GraphQL.quoteString(input: "\(checkoutId.rawValue)"))") - - let argsString = "(\(args.joined(separator: ",")))" - - let subquery = CheckoutCustomerDisassociatePayloadQuery() - subfields(subquery) - - addField(field: "checkoutCustomerDisassociate", aliasSuffix: alias, args: argsString, subfields: subquery) - return self - } - /// Disassociates the current checkout customer from the checkout. /// /// - parameters: @@ -529,30 +388,6 @@ extension Storefront { return self } - /// Applies a discount to an existing checkout using a discount code. - /// - /// - parameters: - /// - discountCode: The discount code to apply to the checkout. - /// - checkoutId: The ID of the checkout. - /// - @available(*, deprecated, message:"Use `checkoutDiscountCodeApplyV2` instead") - @discardableResult - open func checkoutDiscountCodeApply(alias: String? = nil, discountCode: String, checkoutId: GraphQL.ID, _ subfields: (CheckoutDiscountCodeApplyPayloadQuery) -> Void) -> MutationQuery { - var args: [String] = [] - - args.append("discountCode:\(GraphQL.quoteString(input: discountCode))") - - args.append("checkoutId:\(GraphQL.quoteString(input: "\(checkoutId.rawValue)"))") - - let argsString = "(\(args.joined(separator: ",")))" - - let subquery = CheckoutDiscountCodeApplyPayloadQuery() - subfields(subquery) - - addField(field: "checkoutDiscountCodeApply", aliasSuffix: alias, args: argsString, subfields: subquery) - return self - } - /// Applies a discount to an existing checkout using a discount code. /// /// - parameters: @@ -576,7 +411,7 @@ extension Storefront { return self } - /// Removes the applied discount from an existing checkout. + /// Removes the applied discounts from an existing checkout. /// /// - parameters: /// - checkoutId: The ID of the checkout. @@ -596,30 +431,6 @@ extension Storefront { return self } - /// Updates the email on an existing checkout. - /// - /// - parameters: - /// - checkoutId: The ID of the checkout. - /// - email: The email to update the checkout with. - /// - @available(*, deprecated, message:"Use `checkoutEmailUpdateV2` instead") - @discardableResult - open func checkoutEmailUpdate(alias: String? = nil, checkoutId: GraphQL.ID, email: String, _ subfields: (CheckoutEmailUpdatePayloadQuery) -> Void) -> MutationQuery { - var args: [String] = [] - - args.append("checkoutId:\(GraphQL.quoteString(input: "\(checkoutId.rawValue)"))") - - args.append("email:\(GraphQL.quoteString(input: email))") - - let argsString = "(\(args.joined(separator: ",")))" - - let subquery = CheckoutEmailUpdatePayloadQuery() - subfields(subquery) - - addField(field: "checkoutEmailUpdate", aliasSuffix: alias, args: argsString, subfields: subquery) - return self - } - /// Updates the email on an existing checkout. /// /// - parameters: @@ -643,55 +454,6 @@ extension Storefront { return self } - /// Applies a gift card to an existing checkout using a gift card code. This - /// will replace all currently applied gift cards. - /// - /// - parameters: - /// - giftCardCode: The code of the gift card to apply on the checkout. - /// - checkoutId: The ID of the checkout. - /// - @available(*, deprecated, message:"Use `checkoutGiftCardsAppend` instead") - @discardableResult - open func checkoutGiftCardApply(alias: String? = nil, giftCardCode: String, checkoutId: GraphQL.ID, _ subfields: (CheckoutGiftCardApplyPayloadQuery) -> Void) -> MutationQuery { - var args: [String] = [] - - args.append("giftCardCode:\(GraphQL.quoteString(input: giftCardCode))") - - args.append("checkoutId:\(GraphQL.quoteString(input: "\(checkoutId.rawValue)"))") - - let argsString = "(\(args.joined(separator: ",")))" - - let subquery = CheckoutGiftCardApplyPayloadQuery() - subfields(subquery) - - addField(field: "checkoutGiftCardApply", aliasSuffix: alias, args: argsString, subfields: subquery) - return self - } - - /// Removes an applied gift card from the checkout. - /// - /// - parameters: - /// - appliedGiftCardId: The ID of the Applied Gift Card to remove from the Checkout. - /// - checkoutId: The ID of the checkout. - /// - @available(*, deprecated, message:"Use `checkoutGiftCardRemoveV2` instead") - @discardableResult - open func checkoutGiftCardRemove(alias: String? = nil, appliedGiftCardId: GraphQL.ID, checkoutId: GraphQL.ID, _ subfields: (CheckoutGiftCardRemovePayloadQuery) -> Void) -> MutationQuery { - var args: [String] = [] - - args.append("appliedGiftCardId:\(GraphQL.quoteString(input: "\(appliedGiftCardId.rawValue)"))") - - args.append("checkoutId:\(GraphQL.quoteString(input: "\(checkoutId.rawValue)"))") - - let argsString = "(\(args.joined(separator: ",")))" - - let subquery = CheckoutGiftCardRemovePayloadQuery() - subfields(subquery) - - addField(field: "checkoutGiftCardRemove", aliasSuffix: alias, args: argsString, subfields: subquery) - return self - } - /// Removes an applied gift card from the checkout. /// /// - parameters: @@ -830,30 +592,6 @@ extension Storefront { return self } - /// Updates the shipping address of an existing checkout. - /// - /// - parameters: - /// - shippingAddress: The shipping address to where the line items will be shipped. - /// - checkoutId: The ID of the checkout. - /// - @available(*, deprecated, message:"Use `checkoutShippingAddressUpdateV2` instead") - @discardableResult - open func checkoutShippingAddressUpdate(alias: String? = nil, shippingAddress: MailingAddressInput, checkoutId: GraphQL.ID, _ subfields: (CheckoutShippingAddressUpdatePayloadQuery) -> Void) -> MutationQuery { - var args: [String] = [] - - args.append("shippingAddress:\(shippingAddress.serialize())") - - args.append("checkoutId:\(GraphQL.quoteString(input: "\(checkoutId.rawValue)"))") - - let argsString = "(\(args.joined(separator: ",")))" - - let subquery = CheckoutShippingAddressUpdatePayloadQuery() - subfields(subquery) - - addField(field: "checkoutShippingAddressUpdate", aliasSuffix: alias, args: argsString, subfields: subquery) - return self - } - /// Updates the shipping address of an existing checkout. /// /// - parameters: @@ -1304,13 +1042,6 @@ extension Storefront { } return try CartNoteUpdatePayload(fields: value) - case "checkoutAttributesUpdate": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: Mutation.self, field: fieldName, value: fieldValue) - } - return try CheckoutAttributesUpdatePayload(fields: value) - case "checkoutAttributesUpdateV2": if value is NSNull { return nil } guard let value = value as? [String: Any] else { @@ -1325,13 +1056,6 @@ extension Storefront { } return try CheckoutCompleteFreePayload(fields: value) - case "checkoutCompleteWithCreditCard": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: Mutation.self, field: fieldName, value: fieldValue) - } - return try CheckoutCompleteWithCreditCardPayload(fields: value) - case "checkoutCompleteWithCreditCardV2": if value is NSNull { return nil } guard let value = value as? [String: Any] else { @@ -1339,20 +1063,6 @@ extension Storefront { } return try CheckoutCompleteWithCreditCardV2Payload(fields: value) - case "checkoutCompleteWithTokenizedPayment": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: Mutation.self, field: fieldName, value: fieldValue) - } - return try CheckoutCompleteWithTokenizedPaymentPayload(fields: value) - - case "checkoutCompleteWithTokenizedPaymentV2": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: Mutation.self, field: fieldName, value: fieldValue) - } - return try CheckoutCompleteWithTokenizedPaymentV2Payload(fields: value) - case "checkoutCompleteWithTokenizedPaymentV3": if value is NSNull { return nil } guard let value = value as? [String: Any] else { @@ -1367,13 +1077,6 @@ extension Storefront { } return try CheckoutCreatePayload(fields: value) - case "checkoutCustomerAssociate": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: Mutation.self, field: fieldName, value: fieldValue) - } - return try CheckoutCustomerAssociatePayload(fields: value) - case "checkoutCustomerAssociateV2": if value is NSNull { return nil } guard let value = value as? [String: Any] else { @@ -1381,13 +1084,6 @@ extension Storefront { } return try CheckoutCustomerAssociateV2Payload(fields: value) - case "checkoutCustomerDisassociate": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: Mutation.self, field: fieldName, value: fieldValue) - } - return try CheckoutCustomerDisassociatePayload(fields: value) - case "checkoutCustomerDisassociateV2": if value is NSNull { return nil } guard let value = value as? [String: Any] else { @@ -1395,13 +1091,6 @@ extension Storefront { } return try CheckoutCustomerDisassociateV2Payload(fields: value) - case "checkoutDiscountCodeApply": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: Mutation.self, field: fieldName, value: fieldValue) - } - return try CheckoutDiscountCodeApplyPayload(fields: value) - case "checkoutDiscountCodeApplyV2": if value is NSNull { return nil } guard let value = value as? [String: Any] else { @@ -1416,13 +1105,6 @@ extension Storefront { } return try CheckoutDiscountCodeRemovePayload(fields: value) - case "checkoutEmailUpdate": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: Mutation.self, field: fieldName, value: fieldValue) - } - return try CheckoutEmailUpdatePayload(fields: value) - case "checkoutEmailUpdateV2": if value is NSNull { return nil } guard let value = value as? [String: Any] else { @@ -1430,20 +1112,6 @@ extension Storefront { } return try CheckoutEmailUpdateV2Payload(fields: value) - case "checkoutGiftCardApply": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: Mutation.self, field: fieldName, value: fieldValue) - } - return try CheckoutGiftCardApplyPayload(fields: value) - - case "checkoutGiftCardRemove": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: Mutation.self, field: fieldName, value: fieldValue) - } - return try CheckoutGiftCardRemovePayload(fields: value) - case "checkoutGiftCardRemoveV2": if value is NSNull { return nil } guard let value = value as? [String: Any] else { @@ -1486,13 +1154,6 @@ extension Storefront { } return try CheckoutLineItemsUpdatePayload(fields: value) - case "checkoutShippingAddressUpdate": - if value is NSNull { return nil } - guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: Mutation.self, field: fieldName, value: fieldValue) - } - return try CheckoutShippingAddressUpdatePayload(fields: value) - case "checkoutShippingAddressUpdateV2": if value is NSNull { return nil } guard let value = value as? [String: Any] else { @@ -1724,22 +1385,6 @@ extension Storefront { return field(field: "cartNoteUpdate", aliasSuffix: alias) as! Storefront.CartNoteUpdatePayload? } - /// Updates the attributes of a checkout if `allowPartialAddresses` is `true`. - @available(*, deprecated, message:"Use `checkoutAttributesUpdateV2` instead") - open var checkoutAttributesUpdate: Storefront.CheckoutAttributesUpdatePayload? { - return internalGetCheckoutAttributesUpdate() - } - - @available(*, deprecated, message:"Use `checkoutAttributesUpdateV2` instead") - - open func aliasedCheckoutAttributesUpdate(alias: String) -> Storefront.CheckoutAttributesUpdatePayload? { - return internalGetCheckoutAttributesUpdate(alias: alias) - } - - func internalGetCheckoutAttributesUpdate(alias: String? = nil) -> Storefront.CheckoutAttributesUpdatePayload? { - return field(field: "checkoutAttributesUpdate", aliasSuffix: alias) as! Storefront.CheckoutAttributesUpdatePayload? - } - /// Updates the attributes of a checkout if `allowPartialAddresses` is `true`. open var checkoutAttributesUpdateV2: Storefront.CheckoutAttributesUpdateV2Payload? { return internalGetCheckoutAttributesUpdateV2() @@ -1768,22 +1413,6 @@ extension Storefront { return field(field: "checkoutCompleteFree", aliasSuffix: alias) as! Storefront.CheckoutCompleteFreePayload? } - /// Completes a checkout using a credit card token from Shopify's Vault. - @available(*, deprecated, message:"Use `checkoutCompleteWithCreditCardV2` instead") - open var checkoutCompleteWithCreditCard: Storefront.CheckoutCompleteWithCreditCardPayload? { - return internalGetCheckoutCompleteWithCreditCard() - } - - @available(*, deprecated, message:"Use `checkoutCompleteWithCreditCardV2` instead") - - open func aliasedCheckoutCompleteWithCreditCard(alias: String) -> Storefront.CheckoutCompleteWithCreditCardPayload? { - return internalGetCheckoutCompleteWithCreditCard(alias: alias) - } - - func internalGetCheckoutCompleteWithCreditCard(alias: String? = nil) -> Storefront.CheckoutCompleteWithCreditCardPayload? { - return field(field: "checkoutCompleteWithCreditCard", aliasSuffix: alias) as! Storefront.CheckoutCompleteWithCreditCardPayload? - } - /// Completes a checkout using a credit card token from Shopify's card vault. /// Before you can complete checkouts using CheckoutCompleteWithCreditCardV2, /// you need to [_request payment @@ -1800,38 +1429,6 @@ extension Storefront { return field(field: "checkoutCompleteWithCreditCardV2", aliasSuffix: alias) as! Storefront.CheckoutCompleteWithCreditCardV2Payload? } - /// Completes a checkout with a tokenized payment. - @available(*, deprecated, message:"Use `checkoutCompleteWithTokenizedPaymentV2` instead") - open var checkoutCompleteWithTokenizedPayment: Storefront.CheckoutCompleteWithTokenizedPaymentPayload? { - return internalGetCheckoutCompleteWithTokenizedPayment() - } - - @available(*, deprecated, message:"Use `checkoutCompleteWithTokenizedPaymentV2` instead") - - open func aliasedCheckoutCompleteWithTokenizedPayment(alias: String) -> Storefront.CheckoutCompleteWithTokenizedPaymentPayload? { - return internalGetCheckoutCompleteWithTokenizedPayment(alias: alias) - } - - func internalGetCheckoutCompleteWithTokenizedPayment(alias: String? = nil) -> Storefront.CheckoutCompleteWithTokenizedPaymentPayload? { - return field(field: "checkoutCompleteWithTokenizedPayment", aliasSuffix: alias) as! Storefront.CheckoutCompleteWithTokenizedPaymentPayload? - } - - /// Completes a checkout with a tokenized payment. - @available(*, deprecated, message:"Use `checkoutCompleteWithTokenizedPaymentV3` instead") - open var checkoutCompleteWithTokenizedPaymentV2: Storefront.CheckoutCompleteWithTokenizedPaymentV2Payload? { - return internalGetCheckoutCompleteWithTokenizedPaymentV2() - } - - @available(*, deprecated, message:"Use `checkoutCompleteWithTokenizedPaymentV3` instead") - - open func aliasedCheckoutCompleteWithTokenizedPaymentV2(alias: String) -> Storefront.CheckoutCompleteWithTokenizedPaymentV2Payload? { - return internalGetCheckoutCompleteWithTokenizedPaymentV2(alias: alias) - } - - func internalGetCheckoutCompleteWithTokenizedPaymentV2(alias: String? = nil) -> Storefront.CheckoutCompleteWithTokenizedPaymentV2Payload? { - return field(field: "checkoutCompleteWithTokenizedPaymentV2", aliasSuffix: alias) as! Storefront.CheckoutCompleteWithTokenizedPaymentV2Payload? - } - /// Completes a checkout with a tokenized payment. open var checkoutCompleteWithTokenizedPaymentV3: Storefront.CheckoutCompleteWithTokenizedPaymentV3Payload? { return internalGetCheckoutCompleteWithTokenizedPaymentV3() @@ -1858,22 +1455,6 @@ extension Storefront { return field(field: "checkoutCreate", aliasSuffix: alias) as! Storefront.CheckoutCreatePayload? } - /// Associates a customer to the checkout. - @available(*, deprecated, message:"Use `checkoutCustomerAssociateV2` instead") - open var checkoutCustomerAssociate: Storefront.CheckoutCustomerAssociatePayload? { - return internalGetCheckoutCustomerAssociate() - } - - @available(*, deprecated, message:"Use `checkoutCustomerAssociateV2` instead") - - open func aliasedCheckoutCustomerAssociate(alias: String) -> Storefront.CheckoutCustomerAssociatePayload? { - return internalGetCheckoutCustomerAssociate(alias: alias) - } - - func internalGetCheckoutCustomerAssociate(alias: String? = nil) -> Storefront.CheckoutCustomerAssociatePayload? { - return field(field: "checkoutCustomerAssociate", aliasSuffix: alias) as! Storefront.CheckoutCustomerAssociatePayload? - } - /// Associates a customer to the checkout. open var checkoutCustomerAssociateV2: Storefront.CheckoutCustomerAssociateV2Payload? { return internalGetCheckoutCustomerAssociateV2() @@ -1887,22 +1468,6 @@ extension Storefront { return field(field: "checkoutCustomerAssociateV2", aliasSuffix: alias) as! Storefront.CheckoutCustomerAssociateV2Payload? } - /// Disassociates the current checkout customer from the checkout. - @available(*, deprecated, message:"Use `checkoutCustomerDisassociateV2` instead") - open var checkoutCustomerDisassociate: Storefront.CheckoutCustomerDisassociatePayload? { - return internalGetCheckoutCustomerDisassociate() - } - - @available(*, deprecated, message:"Use `checkoutCustomerDisassociateV2` instead") - - open func aliasedCheckoutCustomerDisassociate(alias: String) -> Storefront.CheckoutCustomerDisassociatePayload? { - return internalGetCheckoutCustomerDisassociate(alias: alias) - } - - func internalGetCheckoutCustomerDisassociate(alias: String? = nil) -> Storefront.CheckoutCustomerDisassociatePayload? { - return field(field: "checkoutCustomerDisassociate", aliasSuffix: alias) as! Storefront.CheckoutCustomerDisassociatePayload? - } - /// Disassociates the current checkout customer from the checkout. open var checkoutCustomerDisassociateV2: Storefront.CheckoutCustomerDisassociateV2Payload? { return internalGetCheckoutCustomerDisassociateV2() @@ -1916,22 +1481,6 @@ extension Storefront { return field(field: "checkoutCustomerDisassociateV2", aliasSuffix: alias) as! Storefront.CheckoutCustomerDisassociateV2Payload? } - /// Applies a discount to an existing checkout using a discount code. - @available(*, deprecated, message:"Use `checkoutDiscountCodeApplyV2` instead") - open var checkoutDiscountCodeApply: Storefront.CheckoutDiscountCodeApplyPayload? { - return internalGetCheckoutDiscountCodeApply() - } - - @available(*, deprecated, message:"Use `checkoutDiscountCodeApplyV2` instead") - - open func aliasedCheckoutDiscountCodeApply(alias: String) -> Storefront.CheckoutDiscountCodeApplyPayload? { - return internalGetCheckoutDiscountCodeApply(alias: alias) - } - - func internalGetCheckoutDiscountCodeApply(alias: String? = nil) -> Storefront.CheckoutDiscountCodeApplyPayload? { - return field(field: "checkoutDiscountCodeApply", aliasSuffix: alias) as! Storefront.CheckoutDiscountCodeApplyPayload? - } - /// Applies a discount to an existing checkout using a discount code. open var checkoutDiscountCodeApplyV2: Storefront.CheckoutDiscountCodeApplyV2Payload? { return internalGetCheckoutDiscountCodeApplyV2() @@ -1945,7 +1494,7 @@ extension Storefront { return field(field: "checkoutDiscountCodeApplyV2", aliasSuffix: alias) as! Storefront.CheckoutDiscountCodeApplyV2Payload? } - /// Removes the applied discount from an existing checkout. + /// Removes the applied discounts from an existing checkout. open var checkoutDiscountCodeRemove: Storefront.CheckoutDiscountCodeRemovePayload? { return internalGetCheckoutDiscountCodeRemove() } @@ -1958,22 +1507,6 @@ extension Storefront { return field(field: "checkoutDiscountCodeRemove", aliasSuffix: alias) as! Storefront.CheckoutDiscountCodeRemovePayload? } - /// Updates the email on an existing checkout. - @available(*, deprecated, message:"Use `checkoutEmailUpdateV2` instead") - open var checkoutEmailUpdate: Storefront.CheckoutEmailUpdatePayload? { - return internalGetCheckoutEmailUpdate() - } - - @available(*, deprecated, message:"Use `checkoutEmailUpdateV2` instead") - - open func aliasedCheckoutEmailUpdate(alias: String) -> Storefront.CheckoutEmailUpdatePayload? { - return internalGetCheckoutEmailUpdate(alias: alias) - } - - func internalGetCheckoutEmailUpdate(alias: String? = nil) -> Storefront.CheckoutEmailUpdatePayload? { - return field(field: "checkoutEmailUpdate", aliasSuffix: alias) as! Storefront.CheckoutEmailUpdatePayload? - } - /// Updates the email on an existing checkout. open var checkoutEmailUpdateV2: Storefront.CheckoutEmailUpdateV2Payload? { return internalGetCheckoutEmailUpdateV2() @@ -1987,39 +1520,6 @@ extension Storefront { return field(field: "checkoutEmailUpdateV2", aliasSuffix: alias) as! Storefront.CheckoutEmailUpdateV2Payload? } - /// Applies a gift card to an existing checkout using a gift card code. This - /// will replace all currently applied gift cards. - @available(*, deprecated, message:"Use `checkoutGiftCardsAppend` instead") - open var checkoutGiftCardApply: Storefront.CheckoutGiftCardApplyPayload? { - return internalGetCheckoutGiftCardApply() - } - - @available(*, deprecated, message:"Use `checkoutGiftCardsAppend` instead") - - open func aliasedCheckoutGiftCardApply(alias: String) -> Storefront.CheckoutGiftCardApplyPayload? { - return internalGetCheckoutGiftCardApply(alias: alias) - } - - func internalGetCheckoutGiftCardApply(alias: String? = nil) -> Storefront.CheckoutGiftCardApplyPayload? { - return field(field: "checkoutGiftCardApply", aliasSuffix: alias) as! Storefront.CheckoutGiftCardApplyPayload? - } - - /// Removes an applied gift card from the checkout. - @available(*, deprecated, message:"Use `checkoutGiftCardRemoveV2` instead") - open var checkoutGiftCardRemove: Storefront.CheckoutGiftCardRemovePayload? { - return internalGetCheckoutGiftCardRemove() - } - - @available(*, deprecated, message:"Use `checkoutGiftCardRemoveV2` instead") - - open func aliasedCheckoutGiftCardRemove(alias: String) -> Storefront.CheckoutGiftCardRemovePayload? { - return internalGetCheckoutGiftCardRemove(alias: alias) - } - - func internalGetCheckoutGiftCardRemove(alias: String? = nil) -> Storefront.CheckoutGiftCardRemovePayload? { - return field(field: "checkoutGiftCardRemove", aliasSuffix: alias) as! Storefront.CheckoutGiftCardRemovePayload? - } - /// Removes an applied gift card from the checkout. open var checkoutGiftCardRemoveV2: Storefront.CheckoutGiftCardRemoveV2Payload? { return internalGetCheckoutGiftCardRemoveV2() @@ -2098,22 +1598,6 @@ extension Storefront { return field(field: "checkoutLineItemsUpdate", aliasSuffix: alias) as! Storefront.CheckoutLineItemsUpdatePayload? } - /// Updates the shipping address of an existing checkout. - @available(*, deprecated, message:"Use `checkoutShippingAddressUpdateV2` instead") - open var checkoutShippingAddressUpdate: Storefront.CheckoutShippingAddressUpdatePayload? { - return internalGetCheckoutShippingAddressUpdate() - } - - @available(*, deprecated, message:"Use `checkoutShippingAddressUpdateV2` instead") - - open func aliasedCheckoutShippingAddressUpdate(alias: String) -> Storefront.CheckoutShippingAddressUpdatePayload? { - return internalGetCheckoutShippingAddressUpdate(alias: alias) - } - - func internalGetCheckoutShippingAddressUpdate(alias: String? = nil) -> Storefront.CheckoutShippingAddressUpdatePayload? { - return field(field: "checkoutShippingAddressUpdate", aliasSuffix: alias) as! Storefront.CheckoutShippingAddressUpdatePayload? - } - /// Updates the shipping address of an existing checkout. open var checkoutShippingAddressUpdateV2: Storefront.CheckoutShippingAddressUpdateV2Payload? { return internalGetCheckoutShippingAddressUpdateV2() @@ -2396,12 +1880,6 @@ extension Storefront { response.append(contentsOf: value.childResponseObjectMap()) } - case "checkoutAttributesUpdate": - if let value = internalGetCheckoutAttributesUpdate() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - case "checkoutAttributesUpdateV2": if let value = internalGetCheckoutAttributesUpdateV2() { response.append(value) @@ -2414,30 +1892,12 @@ extension Storefront { response.append(contentsOf: value.childResponseObjectMap()) } - case "checkoutCompleteWithCreditCard": - if let value = internalGetCheckoutCompleteWithCreditCard() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - case "checkoutCompleteWithCreditCardV2": if let value = internalGetCheckoutCompleteWithCreditCardV2() { response.append(value) response.append(contentsOf: value.childResponseObjectMap()) } - case "checkoutCompleteWithTokenizedPayment": - if let value = internalGetCheckoutCompleteWithTokenizedPayment() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - - case "checkoutCompleteWithTokenizedPaymentV2": - if let value = internalGetCheckoutCompleteWithTokenizedPaymentV2() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - case "checkoutCompleteWithTokenizedPaymentV3": if let value = internalGetCheckoutCompleteWithTokenizedPaymentV3() { response.append(value) @@ -2450,36 +1910,18 @@ extension Storefront { response.append(contentsOf: value.childResponseObjectMap()) } - case "checkoutCustomerAssociate": - if let value = internalGetCheckoutCustomerAssociate() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - case "checkoutCustomerAssociateV2": if let value = internalGetCheckoutCustomerAssociateV2() { response.append(value) response.append(contentsOf: value.childResponseObjectMap()) } - case "checkoutCustomerDisassociate": - if let value = internalGetCheckoutCustomerDisassociate() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - case "checkoutCustomerDisassociateV2": if let value = internalGetCheckoutCustomerDisassociateV2() { response.append(value) response.append(contentsOf: value.childResponseObjectMap()) } - case "checkoutDiscountCodeApply": - if let value = internalGetCheckoutDiscountCodeApply() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - case "checkoutDiscountCodeApplyV2": if let value = internalGetCheckoutDiscountCodeApplyV2() { response.append(value) @@ -2492,30 +1934,12 @@ extension Storefront { response.append(contentsOf: value.childResponseObjectMap()) } - case "checkoutEmailUpdate": - if let value = internalGetCheckoutEmailUpdate() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - case "checkoutEmailUpdateV2": if let value = internalGetCheckoutEmailUpdateV2() { response.append(value) response.append(contentsOf: value.childResponseObjectMap()) } - case "checkoutGiftCardApply": - if let value = internalGetCheckoutGiftCardApply() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - - case "checkoutGiftCardRemove": - if let value = internalGetCheckoutGiftCardRemove() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - case "checkoutGiftCardRemoveV2": if let value = internalGetCheckoutGiftCardRemoveV2() { response.append(value) @@ -2552,12 +1976,6 @@ extension Storefront { response.append(contentsOf: value.childResponseObjectMap()) } - case "checkoutShippingAddressUpdate": - if let value = internalGetCheckoutShippingAddressUpdate() { - response.append(value) - response.append(contentsOf: value.childResponseObjectMap()) - } - case "checkoutShippingAddressUpdateV2": if let value = internalGetCheckoutShippingAddressUpdateV2() { response.append(value) diff --git a/Buy/Generated/Storefront/Node.swift b/Buy/Generated/Storefront/Node.swift index 529d6403c..32f3c50f1 100644 --- a/Buy/Generated/Storefront/Node.swift +++ b/Buy/Generated/Storefront/Node.swift @@ -450,6 +450,21 @@ extension Storefront { return self } + /// 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](https://shopify.dev/api/admin-graphql/unstable/queries/node) and + /// [nodes](https://shopify.dev/api/admin-graphql/unstable/queries/nodes) + /// queries. + @discardableResult + open func onUrlRedirect(subfields: (UrlRedirectQuery) -> Void) -> NodeQuery { + let subquery = UrlRedirectQuery() + subfields(subquery) + addInlineFragment(on: "UrlRedirect", subfields: subquery) + return self + } + /// 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). @@ -547,6 +562,8 @@ extension Storefront { case "ShopPolicy": return try ShopPolicy.init(fields: fields) + case "UrlRedirect": return try UrlRedirect.init(fields: fields) + case "Video": return try Video.init(fields: fields) default: diff --git a/Buy/Generated/Storefront/Order.swift b/Buy/Generated/Storefront/Order.swift index 94d3df220..ea0bc32a6 100644 --- a/Buy/Generated/Storefront/Order.swift +++ b/Buy/Generated/Storefront/Order.swift @@ -238,8 +238,8 @@ extension Storefront { /// Returns a metafield found by namespace and key. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - key: Identifier for the metafield (maximum of 30 characters). + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. /// @discardableResult open func metafield(alias: String? = nil, namespace: String, key: String, _ subfields: (MetafieldQuery) -> Void) -> OrderQuery { @@ -258,48 +258,21 @@ extension Storefront { return self } - /// A paginated list of metafields associated with the resource. + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - first: Returns up to the first `n` elements from the list. - /// - after: Returns the elements that come after the specified cursor. - /// - last: Returns up to the last `n` elements from the list. - /// - before: Returns the elements that come before the specified cursor. - /// - reverse: Reverse the order of the underlying list. + /// - identifiers: The list of metafields to retrieve by namespace and key. /// - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") @discardableResult - open func metafields(alias: String? = nil, namespace: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (MetafieldConnectionQuery) -> Void) -> OrderQuery { + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> OrderQuery { var args: [String] = [] - if let namespace = namespace { - args.append("namespace:\(GraphQL.quoteString(input: namespace))") - } - - if let first = first { - args.append("first:\(first)") - } - - if let after = after { - args.append("after:\(GraphQL.quoteString(input: after))") - } - - if let last = last { - args.append("last:\(last)") - } + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") - if let before = before { - args.append("before:\(GraphQL.quoteString(input: before))") - } - - if let reverse = reverse { - args.append("reverse:\(reverse)") - } - - let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + let argsString = "(\(args.joined(separator: ",")))" - let subquery = MetafieldConnectionQuery() + let subquery = MetafieldQuery() subfields(subquery) addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) @@ -622,10 +595,14 @@ extension Storefront { return try Metafield(fields: value) case "metafields": - guard let value = value as? [String: Any] else { + guard let value = value as? [Any] else { + throw SchemaViolationError(type: Order.self, field: fieldName, value: fieldValue) + } + return try value.map { if $0 is NSNull { return nil } + guard let value = $0 as? [String: Any] else { throw SchemaViolationError(type: Order.self, field: fieldName, value: fieldValue) } - return try MetafieldConnection(fields: value) + return try Metafield(fields: value) } as [Any?] case "name": guard let value = value as? String else { @@ -932,20 +909,18 @@ extension Storefront { return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? } - /// A paginated list of metafields associated with the resource. - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - open var metafields: Storefront.MetafieldConnection { + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { return internalGetMetafields() } - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - - open func aliasedMetafields(alias: String) -> Storefront.MetafieldConnection { + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { return internalGetMetafields(alias: alias) } - func internalGetMetafields(alias: String? = nil) -> Storefront.MetafieldConnection { - return field(field: "metafields", aliasSuffix: alias) as! Storefront.MetafieldConnection + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] } /// Unique identifier for the order that appears on the order. For example, @@ -1181,8 +1156,12 @@ extension Storefront { } case "metafields": - response.append(internalGetMetafields()) - response.append(contentsOf: internalGetMetafields().childResponseObjectMap()) + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } case "originalTotalDuties": if let value = internalGetOriginalTotalDuties() { diff --git a/Buy/Generated/Storefront/Page.swift b/Buy/Generated/Storefront/Page.swift index 94569c6a3..683c6df91 100644 --- a/Buy/Generated/Storefront/Page.swift +++ b/Buy/Generated/Storefront/Page.swift @@ -71,8 +71,8 @@ extension Storefront { /// Returns a metafield found by namespace and key. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - key: Identifier for the metafield (maximum of 30 characters). + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. /// @discardableResult open func metafield(alias: String? = nil, namespace: String, key: String, _ subfields: (MetafieldQuery) -> Void) -> PageQuery { @@ -91,48 +91,21 @@ extension Storefront { return self } - /// A paginated list of metafields associated with the resource. + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - first: Returns up to the first `n` elements from the list. - /// - after: Returns the elements that come after the specified cursor. - /// - last: Returns up to the last `n` elements from the list. - /// - before: Returns the elements that come before the specified cursor. - /// - reverse: Reverse the order of the underlying list. + /// - identifiers: The list of metafields to retrieve by namespace and key. /// - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") @discardableResult - open func metafields(alias: String? = nil, namespace: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (MetafieldConnectionQuery) -> Void) -> PageQuery { + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> PageQuery { var args: [String] = [] - if let namespace = namespace { - args.append("namespace:\(GraphQL.quoteString(input: namespace))") - } - - if let first = first { - args.append("first:\(first)") - } - - if let after = after { - args.append("after:\(GraphQL.quoteString(input: after))") - } - - if let last = last { - args.append("last:\(last)") - } - - if let before = before { - args.append("before:\(GraphQL.quoteString(input: before))") - } + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") - if let reverse = reverse { - args.append("reverse:\(reverse)") - } - - let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + let argsString = "(\(args.joined(separator: ",")))" - let subquery = MetafieldConnectionQuery() + let subquery = MetafieldQuery() subfields(subquery) addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) @@ -219,10 +192,14 @@ extension Storefront { return try Metafield(fields: value) case "metafields": - guard let value = value as? [String: Any] else { + guard let value = value as? [Any] else { throw SchemaViolationError(type: Page.self, field: fieldName, value: fieldValue) } - return try MetafieldConnection(fields: value) + return try value.map { if $0 is NSNull { return nil } + guard let value = $0 as? [String: Any] else { + throw SchemaViolationError(type: Page.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) } as [Any?] case "onlineStoreUrl": if value is NSNull { return nil } @@ -314,20 +291,18 @@ extension Storefront { return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? } - /// A paginated list of metafields associated with the resource. - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - open var metafields: Storefront.MetafieldConnection { + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { return internalGetMetafields() } - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - - open func aliasedMetafields(alias: String) -> Storefront.MetafieldConnection { + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { return internalGetMetafields(alias: alias) } - func internalGetMetafields(alias: String? = nil) -> Storefront.MetafieldConnection { - return field(field: "metafields", aliasSuffix: alias) as! Storefront.MetafieldConnection + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] } /// The URL used for viewing the resource on the shop's Online Store. Returns @@ -379,8 +354,12 @@ extension Storefront { } case "metafields": - response.append(internalGetMetafields()) - response.append(contentsOf: internalGetMetafields().childResponseObjectMap()) + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } case "seo": if let value = internalGetSeo() { diff --git a/Buy/Generated/Storefront/Payment.swift b/Buy/Generated/Storefront/Payment.swift index 8b23001cc..b229087da 100644 --- a/Buy/Generated/Storefront/Payment.swift +++ b/Buy/Generated/Storefront/Payment.swift @@ -110,7 +110,7 @@ extension Storefront { return self } - /// Whether or not the payment is still processing asynchronously. + /// Whether the payment is still processing asynchronously. @discardableResult open func ready(alias: String? = nil) -> PaymentQuery { addField(field: "ready", aliasSuffix: alias) @@ -312,7 +312,7 @@ extension Storefront { return field(field: "nextActionUrl", aliasSuffix: alias) as! URL? } - /// Whether or not the payment is still processing asynchronously. + /// Whether the payment is still processing asynchronously. open var ready: Bool { return internalGetReady() } diff --git a/Buy/Generated/Storefront/Product.swift b/Buy/Generated/Storefront/Product.swift index 5a786c8b6..b55722524 100644 --- a/Buy/Generated/Storefront/Product.swift +++ b/Buy/Generated/Storefront/Product.swift @@ -251,8 +251,8 @@ extension Storefront { /// Returns a metafield found by namespace and key. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - key: Identifier for the metafield (maximum of 30 characters). + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. /// @discardableResult open func metafield(alias: String? = nil, namespace: String, key: String, _ subfields: (MetafieldQuery) -> Void) -> ProductQuery { @@ -271,48 +271,21 @@ extension Storefront { return self } - /// A paginated list of metafields associated with the resource. + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - first: Returns up to the first `n` elements from the list. - /// - after: Returns the elements that come after the specified cursor. - /// - last: Returns up to the last `n` elements from the list. - /// - before: Returns the elements that come before the specified cursor. - /// - reverse: Reverse the order of the underlying list. + /// - identifiers: The list of metafields to retrieve by namespace and key. /// - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") @discardableResult - open func metafields(alias: String? = nil, namespace: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (MetafieldConnectionQuery) -> Void) -> ProductQuery { + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> ProductQuery { var args: [String] = [] - if let namespace = namespace { - args.append("namespace:\(GraphQL.quoteString(input: namespace))") - } - - if let first = first { - args.append("first:\(first)") - } - - if let after = after { - args.append("after:\(GraphQL.quoteString(input: after))") - } - - if let last = last { - args.append("last:\(last)") - } - - if let before = before { - args.append("before:\(GraphQL.quoteString(input: before))") - } - - if let reverse = reverse { - args.append("reverse:\(reverse)") - } + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") - let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + let argsString = "(\(args.joined(separator: ",")))" - let subquery = MetafieldConnectionQuery() + let subquery = MetafieldQuery() subfields(subquery) addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) @@ -634,10 +607,14 @@ extension Storefront { return try Metafield(fields: value) case "metafields": - guard let value = value as? [String: Any] else { + guard let value = value as? [Any] else { throw SchemaViolationError(type: Product.self, field: fieldName, value: fieldValue) } - return try MetafieldConnection(fields: value) + return try value.map { if $0 is NSNull { return nil } + guard let value = $0 as? [String: Any] else { + throw SchemaViolationError(type: Product.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) } as [Any?] case "onlineStoreUrl": if value is NSNull { return nil } @@ -868,20 +845,18 @@ extension Storefront { return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? } - /// A paginated list of metafields associated with the resource. - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - open var metafields: Storefront.MetafieldConnection { + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { return internalGetMetafields() } - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - - open func aliasedMetafields(alias: String) -> Storefront.MetafieldConnection { + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { return internalGetMetafields(alias: alias) } - func internalGetMetafields(alias: String? = nil) -> Storefront.MetafieldConnection { - return field(field: "metafields", aliasSuffix: alias) as! Storefront.MetafieldConnection + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] } /// The URL used for viewing the resource on the shop's Online Store. Returns @@ -1082,8 +1057,12 @@ extension Storefront { } case "metafields": - response.append(internalGetMetafields()) - response.append(contentsOf: internalGetMetafields().childResponseObjectMap()) + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } case "options": internalGetOptions().forEach { diff --git a/Buy/Generated/Storefront/ProductVariant.swift b/Buy/Generated/Storefront/ProductVariant.swift index 65c52f029..94bee9b35 100644 --- a/Buy/Generated/Storefront/ProductVariant.swift +++ b/Buy/Generated/Storefront/ProductVariant.swift @@ -95,8 +95,8 @@ extension Storefront { /// Returns a metafield found by namespace and key. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - key: Identifier for the metafield (maximum of 30 characters). + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. /// @discardableResult open func metafield(alias: String? = nil, namespace: String, key: String, _ subfields: (MetafieldQuery) -> Void) -> ProductVariantQuery { @@ -115,48 +115,21 @@ extension Storefront { return self } - /// A paginated list of metafields associated with the resource. + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - first: Returns up to the first `n` elements from the list. - /// - after: Returns the elements that come after the specified cursor. - /// - last: Returns up to the last `n` elements from the list. - /// - before: Returns the elements that come before the specified cursor. - /// - reverse: Reverse the order of the underlying list. + /// - identifiers: The list of metafields to retrieve by namespace and key. /// - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") @discardableResult - open func metafields(alias: String? = nil, namespace: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (MetafieldConnectionQuery) -> Void) -> ProductVariantQuery { + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> ProductVariantQuery { var args: [String] = [] - if let namespace = namespace { - args.append("namespace:\(GraphQL.quoteString(input: namespace))") - } - - if let first = first { - args.append("first:\(first)") - } - - if let after = after { - args.append("after:\(GraphQL.quoteString(input: after))") - } - - if let last = last { - args.append("last:\(last)") - } - - if let before = before { - args.append("before:\(GraphQL.quoteString(input: before))") - } - - if let reverse = reverse { - args.append("reverse:\(reverse)") - } + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") - let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + let argsString = "(\(args.joined(separator: ",")))" - let subquery = MetafieldConnectionQuery() + let subquery = MetafieldQuery() subfields(subquery) addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) @@ -414,10 +387,14 @@ extension Storefront { return try Metafield(fields: value) case "metafields": - guard let value = value as? [String: Any] else { + guard let value = value as? [Any] else { throw SchemaViolationError(type: ProductVariant.self, field: fieldName, value: fieldValue) } - return try MetafieldConnection(fields: value) + return try value.map { if $0 is NSNull { return nil } + guard let value = $0 as? [String: Any] else { + throw SchemaViolationError(type: ProductVariant.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) } as [Any?] case "price": guard let value = value as? String else { @@ -594,20 +571,18 @@ extension Storefront { return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? } - /// A paginated list of metafields associated with the resource. - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - open var metafields: Storefront.MetafieldConnection { + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { return internalGetMetafields() } - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - - open func aliasedMetafields(alias: String) -> Storefront.MetafieldConnection { + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { return internalGetMetafields(alias: alias) } - func internalGetMetafields(alias: String? = nil) -> Storefront.MetafieldConnection { - return field(field: "metafields", aliasSuffix: alias) as! Storefront.MetafieldConnection + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] } /// The product variant’s price. @@ -772,8 +747,12 @@ extension Storefront { } case "metafields": - response.append(internalGetMetafields()) - response.append(contentsOf: internalGetMetafields().childResponseObjectMap()) + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } case "priceV2": response.append(internalGetPriceV2()) diff --git a/Buy/Generated/Storefront/QueryRoot.swift b/Buy/Generated/Storefront/QueryRoot.swift index da3756fad..f285a26c4 100644 --- a/Buy/Generated/Storefront/QueryRoot.swift +++ b/Buy/Generated/Storefront/QueryRoot.swift @@ -777,6 +777,48 @@ extension Storefront { addField(field: "shop", aliasSuffix: alias, subfields: subquery) return self } + + /// A list of redirects for a shop. + /// + /// - parameters: + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. + /// + @discardableResult + open func urlRedirects(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (UrlRedirectConnectionQuery) -> Void) -> QueryRootQuery { + var args: [String] = [] + + if let first = first { + args.append("first:\(first)") + } + + if let after = after { + args.append("after:\(GraphQL.quoteString(input: after))") + } + + if let last = last { + args.append("last:\(last)") + } + + if let before = before { + args.append("before:\(GraphQL.quoteString(input: before))") + } + + if let reverse = reverse { + args.append("reverse:\(reverse)") + } + + let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + + let subquery = UrlRedirectConnectionQuery() + subfields(subquery) + + addField(field: "urlRedirects", aliasSuffix: alias, args: argsString, subfields: subquery) + return self + } } /// The schema’s entry-point for queries. This acts as the public, top-level @@ -954,6 +996,12 @@ extension Storefront { } return try Shop(fields: value) + case "urlRedirects": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: QueryRoot.self, field: fieldName, value: fieldValue) + } + return try UrlRedirectConnection(fields: value) + default: throw SchemaViolationError(type: QueryRoot.self, field: fieldName, value: fieldValue) } @@ -1291,6 +1339,19 @@ extension Storefront { return field(field: "shop", aliasSuffix: alias) as! Storefront.Shop } + /// A list of redirects for a shop. + open var urlRedirects: Storefront.UrlRedirectConnection { + return internalGetUrlRedirects() + } + + open func aliasedUrlRedirects(alias: String) -> Storefront.UrlRedirectConnection { + return internalGetUrlRedirects(alias: alias) + } + + func internalGetUrlRedirects(alias: String? = nil) -> Storefront.UrlRedirectConnection { + return field(field: "urlRedirects", aliasSuffix: alias) as! Storefront.UrlRedirectConnection + } + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { var response: [GraphQL.AbstractResponse] = [] objectMap.keys.forEach { @@ -1429,6 +1490,10 @@ extension Storefront { response.append(internalGetShop()) response.append(contentsOf: internalGetShop().childResponseObjectMap()) + case "urlRedirects": + response.append(internalGetUrlRedirects()) + response.append(contentsOf: internalGetUrlRedirects().childResponseObjectMap()) + default: break } diff --git a/Buy/Generated/Storefront/SellingPlan.swift b/Buy/Generated/Storefront/SellingPlan.swift index db8c53fcb..7d0ee15b5 100644 --- a/Buy/Generated/Storefront/SellingPlan.swift +++ b/Buy/Generated/Storefront/SellingPlan.swift @@ -31,6 +31,16 @@ extension Storefront { open class SellingPlanQuery: GraphQL.AbstractQuery, GraphQLQuery { public typealias Response = SellingPlan + /// The initial payment due for the purchase. + @discardableResult + open func checkoutCharge(alias: String? = nil, _ subfields: (SellingPlanCheckoutChargeQuery) -> Void) -> SellingPlanQuery { + let subquery = SellingPlanCheckoutChargeQuery() + subfields(subquery) + + addField(field: "checkoutCharge", aliasSuffix: alias, subfields: subquery) + return self + } + /// The description of the selling plan. @discardableResult open func description(alias: String? = nil) -> SellingPlanQuery { @@ -91,6 +101,12 @@ extension Storefront { internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { let fieldValue = value switch fieldName { + case "checkoutCharge": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: SellingPlan.self, field: fieldName, value: fieldValue) + } + return try SellingPlanCheckoutCharge(fields: value) + case "description": if value is NSNull { return nil } guard let value = value as? String else { @@ -133,6 +149,15 @@ extension Storefront { } } + /// The initial payment due for the purchase. + open var checkoutCharge: Storefront.SellingPlanCheckoutCharge { + return internalGetCheckoutCharge() + } + + func internalGetCheckoutCharge(alias: String? = nil) -> Storefront.SellingPlanCheckoutCharge { + return field(field: "checkoutCharge", aliasSuffix: alias) as! Storefront.SellingPlanCheckoutCharge + } + /// The description of the selling plan. open var description: String? { return internalGetDescription() @@ -192,7 +217,30 @@ extension Storefront { } internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - return [] + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "checkoutCharge": + response.append(internalGetCheckoutCharge()) + response.append(contentsOf: internalGetCheckoutCharge().childResponseObjectMap()) + + case "options": + internalGetOptions().forEach { + response.append($0) + response.append(contentsOf: $0.childResponseObjectMap()) + } + + case "priceAdjustments": + internalGetPriceAdjustments().forEach { + response.append($0) + response.append(contentsOf: $0.childResponseObjectMap()) + } + + default: + break + } + } + return response } } } diff --git a/Buy/Generated/Storefront/SellingPlanAllocation.swift b/Buy/Generated/Storefront/SellingPlanAllocation.swift index e2a21f7f4..165cd7e0a 100644 --- a/Buy/Generated/Storefront/SellingPlanAllocation.swift +++ b/Buy/Generated/Storefront/SellingPlanAllocation.swift @@ -33,6 +33,16 @@ extension Storefront { open class SellingPlanAllocationQuery: GraphQL.AbstractQuery, GraphQLQuery { public typealias Response = SellingPlanAllocation + /// The checkout charge amount due for the purchase. + @discardableResult + open func checkoutChargeAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> SellingPlanAllocationQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "checkoutChargeAmount", aliasSuffix: alias, subfields: subquery) + return self + } + /// A list of price adjustments, with a maximum of two. When there are two, the /// first price adjustment goes into effect at the time of purchase, while the /// second one starts after a certain number of orders. A price adjustment @@ -48,6 +58,16 @@ extension Storefront { return self } + /// The remaining balance charge amount due for the purchase. + @discardableResult + open func remainingBalanceChargeAmount(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> SellingPlanAllocationQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "remainingBalanceChargeAmount", aliasSuffix: alias, subfields: subquery) + return self + } + /// A representation of how products and variants can be sold and purchased. /// For example, an individual selling plan could be '6 weeks of prepaid /// granola, delivered weekly'. @@ -70,12 +90,24 @@ extension Storefront { internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { let fieldValue = value switch fieldName { + case "checkoutChargeAmount": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: SellingPlanAllocation.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + case "priceAdjustments": guard let value = value as? [[String: Any]] else { throw SchemaViolationError(type: SellingPlanAllocation.self, field: fieldName, value: fieldValue) } return try value.map { return try SellingPlanAllocationPriceAdjustment(fields: $0) } + case "remainingBalanceChargeAmount": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: SellingPlanAllocation.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + case "sellingPlan": guard let value = value as? [String: Any] else { throw SchemaViolationError(type: SellingPlanAllocation.self, field: fieldName, value: fieldValue) @@ -87,6 +119,15 @@ extension Storefront { } } + /// The checkout charge amount due for the purchase. + open var checkoutChargeAmount: Storefront.MoneyV2 { + return internalGetCheckoutChargeAmount() + } + + func internalGetCheckoutChargeAmount(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "checkoutChargeAmount", aliasSuffix: alias) as! Storefront.MoneyV2 + } + /// A list of price adjustments, with a maximum of two. When there are two, the /// first price adjustment goes into effect at the time of purchase, while the /// second one starts after a certain number of orders. A price adjustment @@ -101,6 +142,15 @@ extension Storefront { return field(field: "priceAdjustments", aliasSuffix: alias) as! [Storefront.SellingPlanAllocationPriceAdjustment] } + /// The remaining balance charge amount due for the purchase. + open var remainingBalanceChargeAmount: Storefront.MoneyV2 { + return internalGetRemainingBalanceChargeAmount() + } + + func internalGetRemainingBalanceChargeAmount(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "remainingBalanceChargeAmount", aliasSuffix: alias) as! Storefront.MoneyV2 + } + /// A representation of how products and variants can be sold and purchased. /// For example, an individual selling plan could be '6 weeks of prepaid /// granola, delivered weekly'. @@ -116,12 +166,20 @@ extension Storefront { var response: [GraphQL.AbstractResponse] = [] objectMap.keys.forEach { switch($0) { + case "checkoutChargeAmount": + response.append(internalGetCheckoutChargeAmount()) + response.append(contentsOf: internalGetCheckoutChargeAmount().childResponseObjectMap()) + case "priceAdjustments": internalGetPriceAdjustments().forEach { response.append($0) response.append(contentsOf: $0.childResponseObjectMap()) } + case "remainingBalanceChargeAmount": + response.append(internalGetRemainingBalanceChargeAmount()) + response.append(contentsOf: internalGetRemainingBalanceChargeAmount().childResponseObjectMap()) + case "sellingPlan": response.append(internalGetSellingPlan()) response.append(contentsOf: internalGetSellingPlan().childResponseObjectMap()) diff --git a/Buy/Generated/Storefront/SellingPlanCheckoutCharge.swift b/Buy/Generated/Storefront/SellingPlanCheckoutCharge.swift new file mode 100644 index 000000000..16a3f6215 --- /dev/null +++ b/Buy/Generated/Storefront/SellingPlanCheckoutCharge.swift @@ -0,0 +1,98 @@ +// +// SellingPlanCheckoutCharge.swift +// Buy +// +// Created by Shopify. +// Copyright (c) 2017 Shopify Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Storefront { + /// The initial payment due for the purchase. + open class SellingPlanCheckoutChargeQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = SellingPlanCheckoutCharge + + /// The charge type for the checkout charge. + @discardableResult + open func type(alias: String? = nil) -> SellingPlanCheckoutChargeQuery { + addField(field: "type", aliasSuffix: alias) + return self + } + + /// The charge value for the checkout charge. + @discardableResult + open func value(alias: String? = nil, _ subfields: (SellingPlanCheckoutChargeValueQuery) -> Void) -> SellingPlanCheckoutChargeQuery { + let subquery = SellingPlanCheckoutChargeValueQuery() + subfields(subquery) + + addField(field: "value", aliasSuffix: alias, subfields: subquery) + return self + } + } + + /// The initial payment due for the purchase. + open class SellingPlanCheckoutCharge: GraphQL.AbstractResponse, GraphQLObject { + public typealias Query = SellingPlanCheckoutChargeQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "type": + guard let value = value as? String else { + throw SchemaViolationError(type: SellingPlanCheckoutCharge.self, field: fieldName, value: fieldValue) + } + return SellingPlanCheckoutChargeType(rawValue: value) ?? .unknownValue + + case "value": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: SellingPlanCheckoutCharge.self, field: fieldName, value: fieldValue) + } + return try UnknownSellingPlanCheckoutChargeValue.create(fields: value) + + default: + throw SchemaViolationError(type: SellingPlanCheckoutCharge.self, field: fieldName, value: fieldValue) + } + } + + /// The charge type for the checkout charge. + open var type: Storefront.SellingPlanCheckoutChargeType { + return internalGetType() + } + + func internalGetType(alias: String? = nil) -> Storefront.SellingPlanCheckoutChargeType { + return field(field: "type", aliasSuffix: alias) as! Storefront.SellingPlanCheckoutChargeType + } + + /// The charge value for the checkout charge. + open var value: SellingPlanCheckoutChargeValue { + return internalGetValue() + } + + func internalGetValue(alias: String? = nil) -> SellingPlanCheckoutChargeValue { + return field(field: "value", aliasSuffix: alias) as! SellingPlanCheckoutChargeValue + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + return [] + } + } +} diff --git a/Buy/Generated/Storefront/SellingPlanCheckoutChargePercentageValue.swift b/Buy/Generated/Storefront/SellingPlanCheckoutChargePercentageValue.swift new file mode 100644 index 000000000..257452d4e --- /dev/null +++ b/Buy/Generated/Storefront/SellingPlanCheckoutChargePercentageValue.swift @@ -0,0 +1,73 @@ +// +// SellingPlanCheckoutChargePercentageValue.swift +// Buy +// +// Created by Shopify. +// Copyright (c) 2017 Shopify Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Storefront { + /// The percentage value of the price used for checkout charge. + open class SellingPlanCheckoutChargePercentageValueQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = SellingPlanCheckoutChargePercentageValue + + /// The percentage value of the price used for checkout charge. + @discardableResult + open func percentage(alias: String? = nil) -> SellingPlanCheckoutChargePercentageValueQuery { + addField(field: "percentage", aliasSuffix: alias) + return self + } + } + + /// The percentage value of the price used for checkout charge. + open class SellingPlanCheckoutChargePercentageValue: GraphQL.AbstractResponse, GraphQLObject, SellingPlanCheckoutChargeValue { + public typealias Query = SellingPlanCheckoutChargePercentageValueQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "percentage": + guard let value = value as? Double else { + throw SchemaViolationError(type: SellingPlanCheckoutChargePercentageValue.self, field: fieldName, value: fieldValue) + } + return value + + default: + throw SchemaViolationError(type: SellingPlanCheckoutChargePercentageValue.self, field: fieldName, value: fieldValue) + } + } + + /// The percentage value of the price used for checkout charge. + open var percentage: Double { + return internalGetPercentage() + } + + func internalGetPercentage(alias: String? = nil) -> Double { + return field(field: "percentage", aliasSuffix: alias) as! Double + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + return [] + } + } +} diff --git a/Buy/Generated/Storefront/SellingPlanCheckoutChargeType.swift b/Buy/Generated/Storefront/SellingPlanCheckoutChargeType.swift new file mode 100644 index 000000000..4689431de --- /dev/null +++ b/Buy/Generated/Storefront/SellingPlanCheckoutChargeType.swift @@ -0,0 +1,40 @@ +// +// SellingPlanCheckoutChargeType.swift +// Buy +// +// Created by Shopify. +// Copyright (c) 2017 Shopify Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Storefront { + /// The checkout charge when the full amount isn't charged at checkout. + public enum SellingPlanCheckoutChargeType: String { + /// The checkout charge is a percentage of the product or variant price. + case percentage = "PERCENTAGE" + + /// The checkout charge is a fixed price amount. + case price = "PRICE" + + case unknownValue = "" + } +} diff --git a/Buy/Generated/Storefront/SellingPlanCheckoutChargeValue.swift b/Buy/Generated/Storefront/SellingPlanCheckoutChargeValue.swift new file mode 100644 index 000000000..71574402a --- /dev/null +++ b/Buy/Generated/Storefront/SellingPlanCheckoutChargeValue.swift @@ -0,0 +1,92 @@ +// +// SellingPlanCheckoutChargeValue.swift +// Buy +// +// Created by Shopify. +// Copyright (c) 2017 Shopify Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +/// The portion of the price to be charged at checkout. +public protocol SellingPlanCheckoutChargeValue { +} + +extension Storefront { + /// The portion of the price to be charged at checkout. + open class SellingPlanCheckoutChargeValueQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = SellingPlanCheckoutChargeValue + + override init() { + super.init() + addField(field: "__typename") + } + + /// The portion of the price to be charged at checkout. + @discardableResult + open func onMoneyV2(subfields: (MoneyV2Query) -> Void) -> SellingPlanCheckoutChargeValueQuery { + let subquery = MoneyV2Query() + subfields(subquery) + addInlineFragment(on: "MoneyV2", subfields: subquery) + return self + } + + /// The portion of the price to be charged at checkout. + @discardableResult + open func onSellingPlanCheckoutChargePercentageValue(subfields: (SellingPlanCheckoutChargePercentageValueQuery) -> Void) -> SellingPlanCheckoutChargeValueQuery { + let subquery = SellingPlanCheckoutChargePercentageValueQuery() + subfields(subquery) + addInlineFragment(on: "SellingPlanCheckoutChargePercentageValue", subfields: subquery) + return self + } + } + + /// The portion of the price to be charged at checkout. + open class UnknownSellingPlanCheckoutChargeValue: GraphQL.AbstractResponse, GraphQLObject, SellingPlanCheckoutChargeValue { + public typealias Query = SellingPlanCheckoutChargeValueQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + default: + throw SchemaViolationError(type: UnknownSellingPlanCheckoutChargeValue.self, field: fieldName, value: fieldValue) + } + } + + internal static func create(fields: [String: Any]) throws -> SellingPlanCheckoutChargeValue { + guard let typeName = fields["__typename"] as? String else { + throw SchemaViolationError(type: UnknownSellingPlanCheckoutChargeValue.self, field: "__typename", value: fields["__typename"] ?? NSNull()) + } + switch typeName { + case "MoneyV2": return try MoneyV2.init(fields: fields) + + case "SellingPlanCheckoutChargePercentageValue": return try SellingPlanCheckoutChargePercentageValue.init(fields: fields) + + default: + return try UnknownSellingPlanCheckoutChargeValue.init(fields: fields) + } + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + return [] + } + } +} diff --git a/Buy/Generated/Storefront/Shop.swift b/Buy/Generated/Storefront/Shop.swift index 33b0e5a7b..62b22f08a 100644 --- a/Buy/Generated/Storefront/Shop.swift +++ b/Buy/Generated/Storefront/Shop.swift @@ -49,8 +49,8 @@ extension Storefront { /// Returns a metafield found by namespace and key. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - key: Identifier for the metafield (maximum of 30 characters). + /// - namespace: A container for a set of metafields. + /// - key: The identifier for the metafield. /// @discardableResult open func metafield(alias: String? = nil, namespace: String, key: String, _ subfields: (MetafieldQuery) -> Void) -> ShopQuery { @@ -69,48 +69,21 @@ extension Storefront { return self } - /// A paginated list of metafields associated with the resource. + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. /// /// - parameters: - /// - namespace: Container for a set of metafields (maximum of 20 characters). - /// - first: Returns up to the first `n` elements from the list. - /// - after: Returns the elements that come after the specified cursor. - /// - last: Returns up to the last `n` elements from the list. - /// - before: Returns the elements that come before the specified cursor. - /// - reverse: Reverse the order of the underlying list. + /// - identifiers: The list of metafields to retrieve by namespace and key. /// - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") @discardableResult - open func metafields(alias: String? = nil, namespace: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (MetafieldConnectionQuery) -> Void) -> ShopQuery { + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> ShopQuery { var args: [String] = [] - if let namespace = namespace { - args.append("namespace:\(GraphQL.quoteString(input: namespace))") - } - - if let first = first { - args.append("first:\(first)") - } - - if let after = after { - args.append("after:\(GraphQL.quoteString(input: after))") - } - - if let last = last { - args.append("last:\(last)") - } - - if let before = before { - args.append("before:\(GraphQL.quoteString(input: before))") - } + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") - if let reverse = reverse { - args.append("reverse:\(reverse)") - } - - let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + let argsString = "(\(args.joined(separator: ",")))" - let subquery = MetafieldConnectionQuery() + let subquery = MetafieldQuery() subfields(subquery) addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) @@ -239,10 +212,14 @@ extension Storefront { return try Metafield(fields: value) case "metafields": - guard let value = value as? [String: Any] else { + guard let value = value as? [Any] else { throw SchemaViolationError(type: Shop.self, field: fieldName, value: fieldValue) } - return try MetafieldConnection(fields: value) + return try value.map { if $0 is NSNull { return nil } + guard let value = $0 as? [String: Any] else { + throw SchemaViolationError(type: Shop.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) } as [Any?] case "moneyFormat": guard let value = value as? String else { @@ -345,20 +322,18 @@ extension Storefront { return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? } - /// A paginated list of metafields associated with the resource. - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - open var metafields: Storefront.MetafieldConnection { + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { return internalGetMetafields() } - @available(*, deprecated, message:"The `metafields` field will be removed in the future in favor of using [aliases](https://graphql.org/learn/queries/#aliases) with the `metafield` field.\n") - - open func aliasedMetafields(alias: String) -> Storefront.MetafieldConnection { + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { return internalGetMetafields(alias: alias) } - func internalGetMetafields(alias: String? = nil) -> Storefront.MetafieldConnection { - return field(field: "metafields", aliasSuffix: alias) as! Storefront.MetafieldConnection + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] } /// A string representing the way currency is formatted when the currency isn’t @@ -463,8 +438,12 @@ extension Storefront { } case "metafields": - response.append(internalGetMetafields()) - response.append(contentsOf: internalGetMetafields().childResponseObjectMap()) + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } case "paymentSettings": response.append(internalGetPaymentSettings()) diff --git a/Buy/Generated/Storefront/StoreAvailability.swift b/Buy/Generated/Storefront/StoreAvailability.swift index bf51e9ebc..65a2a579f 100644 --- a/Buy/Generated/Storefront/StoreAvailability.swift +++ b/Buy/Generated/Storefront/StoreAvailability.swift @@ -33,7 +33,7 @@ extension Storefront { open class StoreAvailabilityQuery: GraphQL.AbstractQuery, GraphQLQuery { public typealias Response = StoreAvailability - /// Whether or not this product variant is in-stock at this location. + /// Whether the product variant is in-stock at this location. @discardableResult open func available(alias: String? = nil) -> StoreAvailabilityQuery { addField(field: "available", aliasSuffix: alias) @@ -91,7 +91,7 @@ extension Storefront { } } - /// Whether or not this product variant is in-stock at this location. + /// Whether the product variant is in-stock at this location. open var available: Bool { return internalGetAvailable() } diff --git a/Buy/Generated/Storefront/TokenizedPaymentInput.swift b/Buy/Generated/Storefront/TokenizedPaymentInput.swift deleted file mode 100644 index 9e82d0e62..000000000 --- a/Buy/Generated/Storefront/TokenizedPaymentInput.swift +++ /dev/null @@ -1,135 +0,0 @@ -// -// TokenizedPaymentInput.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Specifies the fields required to complete a checkout with a tokenized - /// payment. - open class TokenizedPaymentInput { - /// The amount of the payment. - open var amount: Decimal - - /// A unique client generated key used to avoid duplicate charges. When a - /// duplicate payment is found, the original is returned instead of creating a - /// new one. For more information, refer to [Idempotent - /// requests](https://shopify.dev/api/usage/idempotent-requests). - open var idempotencyKey: String - - /// The billing address for the payment. - open var billingAddress: MailingAddressInput - - /// The type of payment token. - open var type: String - - /// A simple string or JSON containing the required payment data for the - /// tokenized payment. - open var paymentData: String - - /// Executes the payment in test mode if possible. Defaults to `false`. - open var test: Input - - /// Public Hash Key used for AndroidPay payments only. - open var identifier: Input - - /// Creates the input object. - /// - /// - parameters: - /// - amount: The amount of the payment. - /// - idempotencyKey: A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/api/usage/idempotent-requests). - /// - billingAddress: The billing address for the payment. - /// - type: The type of payment token. - /// - paymentData: A simple string or JSON containing the required payment data for the tokenized payment. - /// - test: Executes the payment in test mode if possible. Defaults to `false`. - /// - identifier: Public Hash Key used for AndroidPay payments only. - /// - public static func create(amount: Decimal, idempotencyKey: String, billingAddress: MailingAddressInput, type: String, paymentData: String, test: Input = .undefined, identifier: Input = .undefined) -> TokenizedPaymentInput { - return TokenizedPaymentInput(amount: amount, idempotencyKey: idempotencyKey, billingAddress: billingAddress, type: type, paymentData: paymentData, test: test, identifier: identifier) - } - - private init(amount: Decimal, idempotencyKey: String, billingAddress: MailingAddressInput, type: String, paymentData: String, test: Input = .undefined, identifier: Input = .undefined) { - self.amount = amount - self.idempotencyKey = idempotencyKey - self.billingAddress = billingAddress - self.type = type - self.paymentData = paymentData - self.test = test - self.identifier = identifier - } - - /// Creates the input object. - /// - /// - parameters: - /// - amount: The amount of the payment. - /// - idempotencyKey: A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/api/usage/idempotent-requests). - /// - billingAddress: The billing address for the payment. - /// - type: The type of payment token. - /// - paymentData: A simple string or JSON containing the required payment data for the tokenized payment. - /// - test: Executes the payment in test mode if possible. Defaults to `false`. - /// - identifier: Public Hash Key used for AndroidPay payments only. - /// - @available(*, deprecated, message: "Use the static create() method instead.") - public convenience init(amount: Decimal, idempotencyKey: String, billingAddress: MailingAddressInput, type: String, paymentData: String, test: Bool? = nil, identifier: String? = nil) { - self.init(amount: amount, idempotencyKey: idempotencyKey, billingAddress: billingAddress, type: type, paymentData: paymentData, test: test.orUndefined, identifier: identifier.orUndefined) - } - - internal func serialize() -> String { - var fields: [String] = [] - - fields.append("amount:\(GraphQL.quoteString(input: "\(String(describing: amount))"))") - - fields.append("idempotencyKey:\(GraphQL.quoteString(input: idempotencyKey))") - - fields.append("billingAddress:\(billingAddress.serialize())") - - fields.append("type:\(GraphQL.quoteString(input: type))") - - fields.append("paymentData:\(GraphQL.quoteString(input: paymentData))") - - switch test { - case .value(let test): - guard let test = test else { - fields.append("test:null") - break - } - fields.append("test:\(test)") - case .undefined: break - } - - switch identifier { - case .value(let identifier): - guard let identifier = identifier else { - fields.append("identifier:null") - break - } - fields.append("identifier:\(GraphQL.quoteString(input: identifier))") - case .undefined: break - } - - return "{\(fields.joined(separator: ","))}" - } - } -} diff --git a/Buy/Generated/Storefront/TokenizedPaymentInputV2.swift b/Buy/Generated/Storefront/TokenizedPaymentInputV2.swift deleted file mode 100644 index 2e989190a..000000000 --- a/Buy/Generated/Storefront/TokenizedPaymentInputV2.swift +++ /dev/null @@ -1,136 +0,0 @@ -// -// TokenizedPaymentInputV2.swift -// Buy -// -// Created by Shopify. -// Copyright (c) 2017 Shopify Inc. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Storefront { - /// Specifies the fields required to complete a checkout with a tokenized - /// payment. - open class TokenizedPaymentInputV2 { - /// The amount and currency of the payment. - open var paymentAmount: MoneyInput - - /// A unique client generated key used to avoid duplicate charges. When a - /// duplicate payment is found, the original is returned instead of creating a - /// new one. For more information, refer to [Idempotent - /// requests](https://shopify.dev/api/usage/idempotent-requests). - open var idempotencyKey: String - - /// The billing address for the payment. - open var billingAddress: MailingAddressInput - - /// A simple string or JSON containing the required payment data for the - /// tokenized payment. - open var paymentData: String - - /// Whether to execute the payment in test mode, if possible. Test mode is not - /// supported in production stores. Defaults to `false`. - open var test: Input - - /// Public Hash Key used for AndroidPay payments only. - open var identifier: Input - - /// The type of payment token. - open var type: String - - /// Creates the input object. - /// - /// - parameters: - /// - paymentAmount: The amount and currency of the payment. - /// - idempotencyKey: A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/api/usage/idempotent-requests). - /// - billingAddress: The billing address for the payment. - /// - paymentData: A simple string or JSON containing the required payment data for the tokenized payment. - /// - test: Whether to execute the payment in test mode, if possible. Test mode is not supported in production stores. Defaults to `false`. - /// - identifier: Public Hash Key used for AndroidPay payments only. - /// - type: The type of payment token. - /// - public static func create(paymentAmount: MoneyInput, idempotencyKey: String, billingAddress: MailingAddressInput, paymentData: String, type: String, test: Input = .undefined, identifier: Input = .undefined) -> TokenizedPaymentInputV2 { - return TokenizedPaymentInputV2(paymentAmount: paymentAmount, idempotencyKey: idempotencyKey, billingAddress: billingAddress, paymentData: paymentData, type: type, test: test, identifier: identifier) - } - - private init(paymentAmount: MoneyInput, idempotencyKey: String, billingAddress: MailingAddressInput, paymentData: String, type: String, test: Input = .undefined, identifier: Input = .undefined) { - self.paymentAmount = paymentAmount - self.idempotencyKey = idempotencyKey - self.billingAddress = billingAddress - self.paymentData = paymentData - self.test = test - self.identifier = identifier - self.type = type - } - - /// Creates the input object. - /// - /// - parameters: - /// - paymentAmount: The amount and currency of the payment. - /// - idempotencyKey: A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. For more information, refer to [Idempotent requests](https://shopify.dev/api/usage/idempotent-requests). - /// - billingAddress: The billing address for the payment. - /// - paymentData: A simple string or JSON containing the required payment data for the tokenized payment. - /// - test: Whether to execute the payment in test mode, if possible. Test mode is not supported in production stores. Defaults to `false`. - /// - identifier: Public Hash Key used for AndroidPay payments only. - /// - type: The type of payment token. - /// - @available(*, deprecated, message: "Use the static create() method instead.") - public convenience init(paymentAmount: MoneyInput, idempotencyKey: String, billingAddress: MailingAddressInput, paymentData: String, type: String, test: Bool? = nil, identifier: String? = nil) { - self.init(paymentAmount: paymentAmount, idempotencyKey: idempotencyKey, billingAddress: billingAddress, paymentData: paymentData, type: type, test: test.orUndefined, identifier: identifier.orUndefined) - } - - internal func serialize() -> String { - var fields: [String] = [] - - fields.append("paymentAmount:\(paymentAmount.serialize())") - - fields.append("idempotencyKey:\(GraphQL.quoteString(input: idempotencyKey))") - - fields.append("billingAddress:\(billingAddress.serialize())") - - fields.append("paymentData:\(GraphQL.quoteString(input: paymentData))") - - switch test { - case .value(let test): - guard let test = test else { - fields.append("test:null") - break - } - fields.append("test:\(test)") - case .undefined: break - } - - switch identifier { - case .value(let identifier): - guard let identifier = identifier else { - fields.append("identifier:null") - break - } - fields.append("identifier:\(GraphQL.quoteString(input: identifier))") - case .undefined: break - } - - fields.append("type:\(GraphQL.quoteString(input: type))") - - return "{\(fields.joined(separator: ","))}" - } - } -} diff --git a/Buy/Generated/Storefront/UrlRedirect.swift b/Buy/Generated/Storefront/UrlRedirect.swift new file mode 100644 index 000000000..64dc192c6 --- /dev/null +++ b/Buy/Generated/Storefront/UrlRedirect.swift @@ -0,0 +1,119 @@ +// +// UrlRedirect.swift +// Buy +// +// Created by Shopify. +// Copyright (c) 2017 Shopify Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Storefront { + /// A redirect on the online store. + open class UrlRedirectQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = UrlRedirect + + /// The ID of the URL redirect. + @discardableResult + open func id(alias: String? = nil) -> UrlRedirectQuery { + addField(field: "id", aliasSuffix: alias) + return self + } + + /// The old path to be redirected from. When the user visits this path, they'll + /// be redirected to the target location. + @discardableResult + open func path(alias: String? = nil) -> UrlRedirectQuery { + addField(field: "path", aliasSuffix: alias) + return self + } + + /// The target location where the user will be redirected to. + @discardableResult + open func target(alias: String? = nil) -> UrlRedirectQuery { + addField(field: "target", aliasSuffix: alias) + return self + } + } + + /// A redirect on the online store. + open class UrlRedirect: GraphQL.AbstractResponse, GraphQLObject, Node { + public typealias Query = UrlRedirectQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "id": + guard let value = value as? String else { + throw SchemaViolationError(type: UrlRedirect.self, field: fieldName, value: fieldValue) + } + return GraphQL.ID(rawValue: value) + + case "path": + guard let value = value as? String else { + throw SchemaViolationError(type: UrlRedirect.self, field: fieldName, value: fieldValue) + } + return value + + case "target": + guard let value = value as? String else { + throw SchemaViolationError(type: UrlRedirect.self, field: fieldName, value: fieldValue) + } + return value + + default: + throw SchemaViolationError(type: UrlRedirect.self, field: fieldName, value: fieldValue) + } + } + + /// The ID of the URL redirect. + open var id: GraphQL.ID { + return internalGetId() + } + + func internalGetId(alias: String? = nil) -> GraphQL.ID { + return field(field: "id", aliasSuffix: alias) as! GraphQL.ID + } + + /// The old path to be redirected from. When the user visits this path, they'll + /// be redirected to the target location. + open var path: String { + return internalGetPath() + } + + func internalGetPath(alias: String? = nil) -> String { + return field(field: "path", aliasSuffix: alias) as! String + } + + /// The target location where the user will be redirected to. + open var target: String { + return internalGetTarget() + } + + func internalGetTarget(alias: String? = nil) -> String { + return field(field: "target", aliasSuffix: alias) as! String + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + return [] + } + } +} diff --git a/Buy/Generated/Storefront/MetafieldConnection.swift b/Buy/Generated/Storefront/UrlRedirectConnection.swift similarity index 66% rename from Buy/Generated/Storefront/MetafieldConnection.swift rename to Buy/Generated/Storefront/UrlRedirectConnection.swift index 3651593a1..22725043f 100644 --- a/Buy/Generated/Storefront/MetafieldConnection.swift +++ b/Buy/Generated/Storefront/UrlRedirectConnection.swift @@ -1,5 +1,5 @@ // -// MetafieldConnection.swift +// UrlRedirectConnection.swift // Buy // // Created by Shopify. @@ -27,24 +27,24 @@ import Foundation extension Storefront { - /// An auto-generated type for paginating through multiple Metafields. - open class MetafieldConnectionQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = MetafieldConnection + /// An auto-generated type for paginating through multiple UrlRedirects. + open class UrlRedirectConnectionQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = UrlRedirectConnection /// A list of edges. @discardableResult - open func edges(alias: String? = nil, _ subfields: (MetafieldEdgeQuery) -> Void) -> MetafieldConnectionQuery { - let subquery = MetafieldEdgeQuery() + open func edges(alias: String? = nil, _ subfields: (UrlRedirectEdgeQuery) -> Void) -> UrlRedirectConnectionQuery { + let subquery = UrlRedirectEdgeQuery() subfields(subquery) addField(field: "edges", aliasSuffix: alias, subfields: subquery) return self } - /// A list of the nodes contained in MetafieldEdge. + /// A list of the nodes contained in UrlRedirectEdge. @discardableResult - open func nodes(alias: String? = nil, _ subfields: (MetafieldQuery) -> Void) -> MetafieldConnectionQuery { - let subquery = MetafieldQuery() + open func nodes(alias: String? = nil, _ subfields: (UrlRedirectQuery) -> Void) -> UrlRedirectConnectionQuery { + let subquery = UrlRedirectQuery() subfields(subquery) addField(field: "nodes", aliasSuffix: alias, subfields: subquery) @@ -53,7 +53,7 @@ extension Storefront { /// Information to aid in pagination. @discardableResult - open func pageInfo(alias: String? = nil, _ subfields: (PageInfoQuery) -> Void) -> MetafieldConnectionQuery { + open func pageInfo(alias: String? = nil, _ subfields: (PageInfoQuery) -> Void) -> UrlRedirectConnectionQuery { let subquery = PageInfoQuery() subfields(subquery) @@ -62,52 +62,52 @@ extension Storefront { } } - /// An auto-generated type for paginating through multiple Metafields. - open class MetafieldConnection: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = MetafieldConnectionQuery + /// An auto-generated type for paginating through multiple UrlRedirects. + open class UrlRedirectConnection: GraphQL.AbstractResponse, GraphQLObject { + public typealias Query = UrlRedirectConnectionQuery internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { let fieldValue = value switch fieldName { case "edges": guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: MetafieldConnection.self, field: fieldName, value: fieldValue) + throw SchemaViolationError(type: UrlRedirectConnection.self, field: fieldName, value: fieldValue) } - return try value.map { return try MetafieldEdge(fields: $0) } + return try value.map { return try UrlRedirectEdge(fields: $0) } case "nodes": guard let value = value as? [[String: Any]] else { - throw SchemaViolationError(type: MetafieldConnection.self, field: fieldName, value: fieldValue) + throw SchemaViolationError(type: UrlRedirectConnection.self, field: fieldName, value: fieldValue) } - return try value.map { return try Metafield(fields: $0) } + return try value.map { return try UrlRedirect(fields: $0) } case "pageInfo": guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: MetafieldConnection.self, field: fieldName, value: fieldValue) + throw SchemaViolationError(type: UrlRedirectConnection.self, field: fieldName, value: fieldValue) } return try PageInfo(fields: value) default: - throw SchemaViolationError(type: MetafieldConnection.self, field: fieldName, value: fieldValue) + throw SchemaViolationError(type: UrlRedirectConnection.self, field: fieldName, value: fieldValue) } } /// A list of edges. - open var edges: [Storefront.MetafieldEdge] { + open var edges: [Storefront.UrlRedirectEdge] { return internalGetEdges() } - func internalGetEdges(alias: String? = nil) -> [Storefront.MetafieldEdge] { - return field(field: "edges", aliasSuffix: alias) as! [Storefront.MetafieldEdge] + func internalGetEdges(alias: String? = nil) -> [Storefront.UrlRedirectEdge] { + return field(field: "edges", aliasSuffix: alias) as! [Storefront.UrlRedirectEdge] } - /// A list of the nodes contained in MetafieldEdge. - open var nodes: [Storefront.Metafield] { + /// A list of the nodes contained in UrlRedirectEdge. + open var nodes: [Storefront.UrlRedirect] { return internalGetNodes() } - func internalGetNodes(alias: String? = nil) -> [Storefront.Metafield] { - return field(field: "nodes", aliasSuffix: alias) as! [Storefront.Metafield] + func internalGetNodes(alias: String? = nil) -> [Storefront.UrlRedirect] { + return field(field: "nodes", aliasSuffix: alias) as! [Storefront.UrlRedirect] } /// Information to aid in pagination. diff --git a/Buy/Generated/Storefront/MetafieldEdge.swift b/Buy/Generated/Storefront/UrlRedirectEdge.swift similarity index 68% rename from Buy/Generated/Storefront/MetafieldEdge.swift rename to Buy/Generated/Storefront/UrlRedirectEdge.swift index a56a5b38b..5c1be3103 100644 --- a/Buy/Generated/Storefront/MetafieldEdge.swift +++ b/Buy/Generated/Storefront/UrlRedirectEdge.swift @@ -1,5 +1,5 @@ // -// MetafieldEdge.swift +// UrlRedirectEdge.swift // Buy // // Created by Shopify. @@ -27,22 +27,22 @@ import Foundation extension Storefront { - /// An auto-generated type which holds one Metafield and a cursor during + /// An auto-generated type which holds one UrlRedirect and a cursor during /// pagination. - open class MetafieldEdgeQuery: GraphQL.AbstractQuery, GraphQLQuery { - public typealias Response = MetafieldEdge + open class UrlRedirectEdgeQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = UrlRedirectEdge /// A cursor for use in pagination. @discardableResult - open func cursor(alias: String? = nil) -> MetafieldEdgeQuery { + open func cursor(alias: String? = nil) -> UrlRedirectEdgeQuery { addField(field: "cursor", aliasSuffix: alias) return self } - /// The item at the end of MetafieldEdge. + /// The item at the end of UrlRedirectEdge. @discardableResult - open func node(alias: String? = nil, _ subfields: (MetafieldQuery) -> Void) -> MetafieldEdgeQuery { - let subquery = MetafieldQuery() + open func node(alias: String? = nil, _ subfields: (UrlRedirectQuery) -> Void) -> UrlRedirectEdgeQuery { + let subquery = UrlRedirectQuery() subfields(subquery) addField(field: "node", aliasSuffix: alias, subfields: subquery) @@ -50,28 +50,28 @@ extension Storefront { } } - /// An auto-generated type which holds one Metafield and a cursor during + /// An auto-generated type which holds one UrlRedirect and a cursor during /// pagination. - open class MetafieldEdge: GraphQL.AbstractResponse, GraphQLObject { - public typealias Query = MetafieldEdgeQuery + open class UrlRedirectEdge: GraphQL.AbstractResponse, GraphQLObject { + public typealias Query = UrlRedirectEdgeQuery internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { let fieldValue = value switch fieldName { case "cursor": guard let value = value as? String else { - throw SchemaViolationError(type: MetafieldEdge.self, field: fieldName, value: fieldValue) + throw SchemaViolationError(type: UrlRedirectEdge.self, field: fieldName, value: fieldValue) } return value case "node": guard let value = value as? [String: Any] else { - throw SchemaViolationError(type: MetafieldEdge.self, field: fieldName, value: fieldValue) + throw SchemaViolationError(type: UrlRedirectEdge.self, field: fieldName, value: fieldValue) } - return try Metafield(fields: value) + return try UrlRedirect(fields: value) default: - throw SchemaViolationError(type: MetafieldEdge.self, field: fieldName, value: fieldValue) + throw SchemaViolationError(type: UrlRedirectEdge.self, field: fieldName, value: fieldValue) } } @@ -84,13 +84,13 @@ extension Storefront { return field(field: "cursor", aliasSuffix: alias) as! String } - /// The item at the end of MetafieldEdge. - open var node: Storefront.Metafield { + /// The item at the end of UrlRedirectEdge. + open var node: Storefront.UrlRedirect { return internalGetNode() } - func internalGetNode(alias: String? = nil) -> Storefront.Metafield { - return field(field: "node", aliasSuffix: alias) as! Storefront.Metafield + func internalGetNode(alias: String? = nil) -> Storefront.UrlRedirect { + return field(field: "node", aliasSuffix: alias) as! Storefront.UrlRedirect } internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { From c0560a94ed8c59311769ca9d7717849bfb852c80 Mon Sep 17 00:00:00 2001 From: runner Date: Fri, 1 Jul 2022 14:18:34 +0000 Subject: [PATCH 2/3] Bump Version --- Buy/Info.plist | 2 +- Buy/Utilities/SDK.swift | 2 +- BuyTests/Info.plist | 2 +- Mobile-Buy-SDK.podspec | 2 +- Pay/Info.plist | 2 +- PayTests/Info.plist | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Buy/Info.plist b/Buy/Info.plist index 1233bcf9b..9dc3c8d7b 100644 --- a/Buy/Info.plist +++ b/Buy/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 7.1.0 + 8.0.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Buy/Utilities/SDK.swift b/Buy/Utilities/SDK.swift index 778b8a240..38536d170 100644 --- a/Buy/Utilities/SDK.swift +++ b/Buy/Utilities/SDK.swift @@ -27,5 +27,5 @@ import Foundation internal enum SDK { - static let version = "7.1.0" + static let version = "8.0.0" } diff --git a/BuyTests/Info.plist b/BuyTests/Info.plist index 4498768f5..3ae7ac95e 100644 --- a/BuyTests/Info.plist +++ b/BuyTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 7.1.0 + 8.0.0 CFBundleVersion 1 diff --git a/Mobile-Buy-SDK.podspec b/Mobile-Buy-SDK.podspec index a7cfe9873..3c20e18cc 100644 --- a/Mobile-Buy-SDK.podspec +++ b/Mobile-Buy-SDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'Mobile-Buy-SDK' - s.version = '7.1.0' + s.version = '8.0.0' s.summary = 'Create custom Shopify storefront on iOS.' s.description = 'Shopify’s Mobile Buy SDK makes it simple to create custom storefronts in your mobile app. Utitlizing the power and flexibility of GraphQL you can build native storefront experiences using the Shopify platform.' s.homepage = 'https://github.com/Shopify/mobile-buy-sdk-ios' diff --git a/Pay/Info.plist b/Pay/Info.plist index 1233bcf9b..9dc3c8d7b 100644 --- a/Pay/Info.plist +++ b/Pay/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 7.1.0 + 8.0.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/PayTests/Info.plist b/PayTests/Info.plist index 4498768f5..3ae7ac95e 100644 --- a/PayTests/Info.plist +++ b/PayTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 7.1.0 + 8.0.0 CFBundleVersion 1 From ba50d23248ff12b839e0eae98eda00c64538398a Mon Sep 17 00:00:00 2001 From: Jonathan Baker Date: Fri, 1 Jul 2022 10:26:25 -0400 Subject: [PATCH 3/3] Update project.pbxproj --- Buy.xcodeproj/project.pbxproj | 224 +++++++++++++--------------------- 1 file changed, 88 insertions(+), 136 deletions(-) diff --git a/Buy.xcodeproj/project.pbxproj b/Buy.xcodeproj/project.pbxproj index 15dded835..4b43bcf72 100644 --- a/Buy.xcodeproj/project.pbxproj +++ b/Buy.xcodeproj/project.pbxproj @@ -126,6 +126,39 @@ 4E28FF1C270780B500F9EBED /* OnlineStorePublishable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E28FECD270780B500F9EBED /* OnlineStorePublishable.swift */; }; 4E28FF1D270780B500F9EBED /* OnlineStorePublishable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E28FECD270780B500F9EBED /* OnlineStorePublishable.swift */; }; 4E28FF1E270780B500F9EBED /* OnlineStorePublishable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E28FECD270780B500F9EBED /* OnlineStorePublishable.swift */; }; + 4E87F1D9286F3B1900BFF389 /* CartLineCost.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1CE286F3B1900BFF389 /* CartLineCost.swift */; }; + 4E87F1DA286F3B1900BFF389 /* CartLineCost.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1CE286F3B1900BFF389 /* CartLineCost.swift */; }; + 4E87F1DB286F3B1900BFF389 /* CartLineCost.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1CE286F3B1900BFF389 /* CartLineCost.swift */; }; + 4E87F1DC286F3B1900BFF389 /* CartCost.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1CF286F3B1900BFF389 /* CartCost.swift */; }; + 4E87F1DD286F3B1900BFF389 /* CartCost.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1CF286F3B1900BFF389 /* CartCost.swift */; }; + 4E87F1DE286F3B1900BFF389 /* CartCost.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1CF286F3B1900BFF389 /* CartCost.swift */; }; + 4E87F1DF286F3B1900BFF389 /* SellingPlanCheckoutCharge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D0286F3B1900BFF389 /* SellingPlanCheckoutCharge.swift */; }; + 4E87F1E0286F3B1900BFF389 /* SellingPlanCheckoutCharge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D0286F3B1900BFF389 /* SellingPlanCheckoutCharge.swift */; }; + 4E87F1E1286F3B1900BFF389 /* SellingPlanCheckoutCharge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D0286F3B1900BFF389 /* SellingPlanCheckoutCharge.swift */; }; + 4E87F1E2286F3B1900BFF389 /* HasMetafieldsIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D1286F3B1900BFF389 /* HasMetafieldsIdentifier.swift */; }; + 4E87F1E3286F3B1900BFF389 /* HasMetafieldsIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D1286F3B1900BFF389 /* HasMetafieldsIdentifier.swift */; }; + 4E87F1E4286F3B1900BFF389 /* HasMetafieldsIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D1286F3B1900BFF389 /* HasMetafieldsIdentifier.swift */; }; + 4E87F1E5286F3B1900BFF389 /* UrlRedirectEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D2286F3B1900BFF389 /* UrlRedirectEdge.swift */; }; + 4E87F1E6286F3B1900BFF389 /* UrlRedirectEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D2286F3B1900BFF389 /* UrlRedirectEdge.swift */; }; + 4E87F1E7286F3B1900BFF389 /* UrlRedirectEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D2286F3B1900BFF389 /* UrlRedirectEdge.swift */; }; + 4E87F1E8286F3B1A00BFF389 /* SellingPlanCheckoutChargeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D3286F3B1900BFF389 /* SellingPlanCheckoutChargeType.swift */; }; + 4E87F1E9286F3B1A00BFF389 /* SellingPlanCheckoutChargeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D3286F3B1900BFF389 /* SellingPlanCheckoutChargeType.swift */; }; + 4E87F1EA286F3B1A00BFF389 /* SellingPlanCheckoutChargeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D3286F3B1900BFF389 /* SellingPlanCheckoutChargeType.swift */; }; + 4E87F1EB286F3B1A00BFF389 /* UrlRedirectConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D4286F3B1900BFF389 /* UrlRedirectConnection.swift */; }; + 4E87F1EC286F3B1A00BFF389 /* UrlRedirectConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D4286F3B1900BFF389 /* UrlRedirectConnection.swift */; }; + 4E87F1ED286F3B1A00BFF389 /* UrlRedirectConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D4286F3B1900BFF389 /* UrlRedirectConnection.swift */; }; + 4E87F1EE286F3B1A00BFF389 /* SellingPlanCheckoutChargeValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D5286F3B1900BFF389 /* SellingPlanCheckoutChargeValue.swift */; }; + 4E87F1EF286F3B1A00BFF389 /* SellingPlanCheckoutChargeValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D5286F3B1900BFF389 /* SellingPlanCheckoutChargeValue.swift */; }; + 4E87F1F0286F3B1A00BFF389 /* SellingPlanCheckoutChargeValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D5286F3B1900BFF389 /* SellingPlanCheckoutChargeValue.swift */; }; + 4E87F1F1286F3B1A00BFF389 /* UrlRedirect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D6286F3B1900BFF389 /* UrlRedirect.swift */; }; + 4E87F1F2286F3B1A00BFF389 /* UrlRedirect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D6286F3B1900BFF389 /* UrlRedirect.swift */; }; + 4E87F1F3286F3B1A00BFF389 /* UrlRedirect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D6286F3B1900BFF389 /* UrlRedirect.swift */; }; + 4E87F1F4286F3B1A00BFF389 /* CartCustomDiscountAllocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D7286F3B1900BFF389 /* CartCustomDiscountAllocation.swift */; }; + 4E87F1F5286F3B1A00BFF389 /* CartCustomDiscountAllocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D7286F3B1900BFF389 /* CartCustomDiscountAllocation.swift */; }; + 4E87F1F6286F3B1A00BFF389 /* CartCustomDiscountAllocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D7286F3B1900BFF389 /* CartCustomDiscountAllocation.swift */; }; + 4E87F1F7286F3B1A00BFF389 /* SellingPlanCheckoutChargePercentageValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D8286F3B1900BFF389 /* SellingPlanCheckoutChargePercentageValue.swift */; }; + 4E87F1F8286F3B1A00BFF389 /* SellingPlanCheckoutChargePercentageValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D8286F3B1900BFF389 /* SellingPlanCheckoutChargePercentageValue.swift */; }; + 4E87F1F9286F3B1A00BFF389 /* SellingPlanCheckoutChargePercentageValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E87F1D8286F3B1900BFF389 /* SellingPlanCheckoutChargePercentageValue.swift */; }; 4EC8A6F7278792B400FC193B /* MetafieldReference.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC8A6ED278792B400FC193B /* MetafieldReference.swift */; }; 4EC8A6F8278792B400FC193B /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC8A6EE278792B400FC193B /* Filter.swift */; }; 4EC8A6F9278792B400FC193B /* ProductFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC8A6EF278792B400FC193B /* ProductFilter.swift */; }; @@ -330,12 +363,6 @@ 81F02041243391F100826BEC /* Storefront.Schema.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F02040243391F000826BEC /* Storefront.Schema.swift */; }; 81F02042243391F100826BEC /* Storefront.Schema.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F02040243391F000826BEC /* Storefront.Schema.swift */; }; 81F02043243391F100826BEC /* Storefront.Schema.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F02040243391F000826BEC /* Storefront.Schema.swift */; }; - 9A035E102177B764008596C9 /* TokenizedPaymentInputV2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A035E0F2177B763008596C9 /* TokenizedPaymentInputV2.swift */; }; - 9A035E112177B764008596C9 /* TokenizedPaymentInputV2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A035E0F2177B763008596C9 /* TokenizedPaymentInputV2.swift */; }; - 9A035E122177B764008596C9 /* TokenizedPaymentInputV2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A035E0F2177B763008596C9 /* TokenizedPaymentInputV2.swift */; }; - 9A035E132177B775008596C9 /* CheckoutCompleteWithTokenizedPaymentV2Payload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A42EA312177B6A900006EC3 /* CheckoutCompleteWithTokenizedPaymentV2Payload.swift */; }; - 9A035E162177B778008596C9 /* CheckoutCompleteWithTokenizedPaymentV2Payload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A42EA312177B6A900006EC3 /* CheckoutCompleteWithTokenizedPaymentV2Payload.swift */; }; - 9A035E172177B779008596C9 /* CheckoutCompleteWithTokenizedPaymentV2Payload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A42EA312177B6A900006EC3 /* CheckoutCompleteWithTokenizedPaymentV2Payload.swift */; }; 9A0C7FCD1EA6631B0020F187 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FCC1EA6631B0020F187 /* Models.swift */; }; 9A0C7FD11EA669C80020F187 /* PayDiscount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FD01EA669C80020F187 /* PayDiscount.swift */; }; 9A0C7FD31EA66DF70020F187 /* PayDiscountTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FD21EA66DF70020F187 /* PayDiscountTests.swift */; }; @@ -357,18 +384,9 @@ 9A0C805A1EAA51C50020F187 /* AttributeInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FFB1EAA51C50020F187 /* AttributeInput.swift */; }; 9A0C805B1EAA51C50020F187 /* AvailableShippingRates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FFC1EAA51C50020F187 /* AvailableShippingRates.swift */; }; 9A0C805C1EAA51C50020F187 /* Checkout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FFD1EAA51C50020F187 /* Checkout.swift */; }; - 9A0C805D1EAA51C50020F187 /* CheckoutAttributesUpdateInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FFE1EAA51C50020F187 /* CheckoutAttributesUpdateInput.swift */; }; - 9A0C805E1EAA51C50020F187 /* CheckoutAttributesUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FFF1EAA51C50020F187 /* CheckoutAttributesUpdatePayload.swift */; }; 9A0C805F1EAA51C50020F187 /* CheckoutCompleteFreePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80001EAA51C50020F187 /* CheckoutCompleteFreePayload.swift */; }; - 9A0C80601EAA51C50020F187 /* CheckoutCompleteWithCreditCardPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80011EAA51C50020F187 /* CheckoutCompleteWithCreditCardPayload.swift */; }; - 9A0C80611EAA51C50020F187 /* CheckoutCompleteWithTokenizedPaymentPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80021EAA51C50020F187 /* CheckoutCompleteWithTokenizedPaymentPayload.swift */; }; 9A0C80621EAA51C50020F187 /* CheckoutCreateInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80031EAA51C50020F187 /* CheckoutCreateInput.swift */; }; 9A0C80631EAA51C50020F187 /* CheckoutCreatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80041EAA51C50020F187 /* CheckoutCreatePayload.swift */; }; - 9A0C80641EAA51C50020F187 /* CheckoutCustomerAssociatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80051EAA51C50020F187 /* CheckoutCustomerAssociatePayload.swift */; }; - 9A0C80651EAA51C50020F187 /* CheckoutCustomerDisassociatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80061EAA51C50020F187 /* CheckoutCustomerDisassociatePayload.swift */; }; - 9A0C80661EAA51C50020F187 /* CheckoutEmailUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80071EAA51C50020F187 /* CheckoutEmailUpdatePayload.swift */; }; - 9A0C80671EAA51C50020F187 /* CheckoutGiftCardApplyPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80081EAA51C50020F187 /* CheckoutGiftCardApplyPayload.swift */; }; - 9A0C80681EAA51C50020F187 /* CheckoutGiftCardRemovePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80091EAA51C50020F187 /* CheckoutGiftCardRemovePayload.swift */; }; 9A0C80691EAA51C50020F187 /* CheckoutLineItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800A1EAA51C50020F187 /* CheckoutLineItem.swift */; }; 9A0C806A1EAA51C50020F187 /* CheckoutLineItemConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800B1EAA51C50020F187 /* CheckoutLineItemConnection.swift */; }; 9A0C806B1EAA51C50020F187 /* CheckoutLineItemEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800C1EAA51C50020F187 /* CheckoutLineItemEdge.swift */; }; @@ -377,14 +395,12 @@ 9A0C806E1EAA51C50020F187 /* CheckoutLineItemsRemovePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800F1EAA51C50020F187 /* CheckoutLineItemsRemovePayload.swift */; }; 9A0C806F1EAA51C50020F187 /* CheckoutLineItemsUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80101EAA51C50020F187 /* CheckoutLineItemsUpdatePayload.swift */; }; 9A0C80701EAA51C50020F187 /* CheckoutLineItemUpdateInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80111EAA51C50020F187 /* CheckoutLineItemUpdateInput.swift */; }; - 9A0C80711EAA51C50020F187 /* CheckoutShippingAddressUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80121EAA51C50020F187 /* CheckoutShippingAddressUpdatePayload.swift */; }; 9A0C80721EAA51C50020F187 /* CheckoutShippingLineUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80131EAA51C50020F187 /* CheckoutShippingLineUpdatePayload.swift */; }; 9A0C80731EAA51C50020F187 /* Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80141EAA51C50020F187 /* Collection.swift */; }; 9A0C80741EAA51C50020F187 /* CollectionConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80151EAA51C50020F187 /* CollectionConnection.swift */; }; 9A0C80751EAA51C50020F187 /* CollectionEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80161EAA51C50020F187 /* CollectionEdge.swift */; }; 9A0C80761EAA51C50020F187 /* CollectionSortKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80171EAA51C50020F187 /* CollectionSortKeys.swift */; }; 9A0C80771EAA51C50020F187 /* CreditCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80181EAA51C50020F187 /* CreditCard.swift */; }; - 9A0C80781EAA51C50020F187 /* CreditCardPaymentInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80191EAA51C50020F187 /* CreditCardPaymentInput.swift */; }; 9A0C80791EAA51C50020F187 /* CropRegion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C801A1EAA51C50020F187 /* CropRegion.swift */; }; 9A0C807A1EAA51C50020F187 /* CurrencyCode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C801B1EAA51C50020F187 /* CurrencyCode.swift */; }; 9A0C807B1EAA51C50020F187 /* Customer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C801C1EAA51C50020F187 /* Customer.swift */; }; @@ -438,7 +454,6 @@ 9A0C80AD1EAA51C50020F187 /* ShippingRate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C804E1EAA51C50020F187 /* ShippingRate.swift */; }; 9A0C80AE1EAA51C50020F187 /* Shop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C804F1EAA51C50020F187 /* Shop.swift */; }; 9A0C80AF1EAA51C50020F187 /* ShopPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80501EAA51C50020F187 /* ShopPolicy.swift */; }; - 9A0C80B01EAA51C50020F187 /* TokenizedPaymentInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80511EAA51C50020F187 /* TokenizedPaymentInput.swift */; }; 9A0C80B11EAA51C50020F187 /* Transaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80521EAA51C50020F187 /* Transaction.swift */; }; 9A0C80B21EAA51C50020F187 /* TransactionKind.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80531EAA51C50020F187 /* TransactionKind.swift */; }; 9A0C80B31EAA51C50020F187 /* TransactionStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80541EAA51C50020F187 /* TransactionStatus.swift */; }; @@ -500,9 +515,6 @@ 9A4069CA1E8EA6DB000254CD /* Graph.RetryHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A4069C91E8EA6DB000254CD /* Graph.RetryHandler.swift */; }; 9A4069CC1E8EA710000254CD /* Graph.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A4069CB1E8EA710000254CD /* Graph.swift */; }; 9A4069CF1E8ED98A000254CD /* Graph.Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A4069CE1E8ED98A000254CD /* Graph.Task.swift */; }; - 9A41E2A61F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A41E2A51F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift */; }; - 9A41E2A71F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A41E2A51F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift */; }; - 9A41E2A81F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A41E2A51F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift */; }; 9A41E2AA1F8509770059485A /* CustomerDefaultAddressUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A41E2A91F8509770059485A /* CustomerDefaultAddressUpdatePayload.swift */; }; 9A41E2AB1F8509770059485A /* CustomerDefaultAddressUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A41E2A91F8509770059485A /* CustomerDefaultAddressUpdatePayload.swift */; }; 9A41E2AC1F8509770059485A /* CustomerDefaultAddressUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A41E2A91F8509770059485A /* CustomerDefaultAddressUpdatePayload.swift */; }; @@ -619,12 +631,6 @@ 9AA9A3F62279E79B0002DFDA /* Metafield.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A3EF2279E79A0002DFDA /* Metafield.swift */; }; 9AA9A3F72279E79B0002DFDA /* Metafield.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A3EF2279E79A0002DFDA /* Metafield.swift */; }; 9AA9A3F82279E79B0002DFDA /* Metafield.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A3EF2279E79A0002DFDA /* Metafield.swift */; }; - 9AA9A3FC2279E79B0002DFDA /* MetafieldEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A3F12279E79A0002DFDA /* MetafieldEdge.swift */; }; - 9AA9A3FD2279E79B0002DFDA /* MetafieldEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A3F12279E79A0002DFDA /* MetafieldEdge.swift */; }; - 9AA9A3FE2279E79B0002DFDA /* MetafieldEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A3F12279E79A0002DFDA /* MetafieldEdge.swift */; }; - 9AA9A3FF2279E79B0002DFDA /* MetafieldConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A3F22279E79B0002DFDA /* MetafieldConnection.swift */; }; - 9AA9A4002279E79B0002DFDA /* MetafieldConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A3F22279E79B0002DFDA /* MetafieldConnection.swift */; }; - 9AA9A4012279E79B0002DFDA /* MetafieldConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A3F22279E79B0002DFDA /* MetafieldConnection.swift */; }; 9AA9A4032279E7AF0002DFDA /* HasMetafields.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A4022279E7AF0002DFDA /* HasMetafields.swift */; }; 9AA9A4042279E7AF0002DFDA /* HasMetafields.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A4022279E7AF0002DFDA /* HasMetafields.swift */; }; 9AA9A4052279E7AF0002DFDA /* HasMetafields.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA9A4022279E7AF0002DFDA /* HasMetafields.swift */; }; @@ -669,13 +675,10 @@ 9AC2EF3E1F6818180037E0D7 /* ProductOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80471EAA51C50020F187 /* ProductOption.swift */; }; 9AC2EF3F1F6818180037E0D7 /* QueryRoot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C804C1EAA51C50020F187 /* QueryRoot.swift */; }; 9AC2EF401F6818180037E0D7 /* ShippingRate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C804E1EAA51C50020F187 /* ShippingRate.swift */; }; - 9AC2EF411F6818180037E0D7 /* CheckoutCustomerAssociatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80051EAA51C50020F187 /* CheckoutCustomerAssociatePayload.swift */; }; 9AC2EF421F6818180037E0D7 /* Blog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416CC1EE095B20060029B /* Blog.swift */; }; 9AC2EF431F6818180037E0D7 /* AvailableShippingRates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FFC1EAA51C50020F187 /* AvailableShippingRates.swift */; }; 9AC2EF441F6818180037E0D7 /* CollectionConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80151EAA51C50020F187 /* CollectionConnection.swift */; }; - 9AC2EF451F6818180037E0D7 /* CheckoutGiftCardApplyPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80081EAA51C50020F187 /* CheckoutGiftCardApplyPayload.swift */; }; 9AC2EF471F6818180037E0D7 /* ProductEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80461EAA51C50020F187 /* ProductEdge.swift */; }; - 9AC2EF481F6818180037E0D7 /* CheckoutAttributesUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FFF1EAA51C50020F187 /* CheckoutAttributesUpdatePayload.swift */; }; 9AC2EF491F6818180037E0D7 /* WeightUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80561EAA51C50020F187 /* WeightUnit.swift */; }; 9AC2EF4A1F6818180037E0D7 /* CustomerUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C802D1EAA51C50020F187 /* CustomerUpdatePayload.swift */; }; 9AC2EF4B1F6818180037E0D7 /* Graph.Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A4069CE1E8ED98A000254CD /* Graph.Task.swift */; }; @@ -687,7 +690,6 @@ 9AC2EF521F6818180037E0D7 /* CurrencyCode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C801B1EAA51C50020F187 /* CurrencyCode.swift */; }; 9AC2EF531F6818180037E0D7 /* ShopPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80501EAA51C50020F187 /* ShopPolicy.swift */; }; 9AC2EF541F6818180037E0D7 /* CheckoutShippingLineUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80131EAA51C50020F187 /* CheckoutShippingLineUpdatePayload.swift */; }; - 9AC2EF551F6818180037E0D7 /* CheckoutGiftCardRemovePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80091EAA51C50020F187 /* CheckoutGiftCardRemovePayload.swift */; }; 9AC2EF561F6818180037E0D7 /* CheckoutCompleteFreePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80001EAA51C50020F187 /* CheckoutCompleteFreePayload.swift */; }; 9AC2EF571F6818180037E0D7 /* DigitalWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A52D3A41F3CA5DB00C093C8 /* DigitalWallet.swift */; }; 9AC2EF581F6818180037E0D7 /* MailingAddressInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80351EAA51C50020F187 /* MailingAddressInput.swift */; }; @@ -699,7 +701,6 @@ 9AC2EF5E1F6818180037E0D7 /* CheckoutCreatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80041EAA51C50020F187 /* CheckoutCreatePayload.swift */; }; 9AC2EF5F1F6818180037E0D7 /* Graph.Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C81041EBA66440020F187 /* Graph.Cache.swift */; }; 9AC2EF601F6818180037E0D7 /* Node.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80371EAA51C50020F187 /* Node.swift */; }; - 9AC2EF611F6818180037E0D7 /* CheckoutShippingAddressUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80121EAA51C50020F187 /* CheckoutShippingAddressUpdatePayload.swift */; }; 9AC2EF621F6818180037E0D7 /* OrderLineItemEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80401EAA51C50020F187 /* OrderLineItemEdge.swift */; }; 9AC2EF631F6818180037E0D7 /* Card.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80EF1EB773310020F187 /* Card.swift */; }; 9AC2EF641F6818180037E0D7 /* CheckoutLineItemUpdateInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80111EAA51C50020F187 /* CheckoutLineItemUpdateInput.swift */; }; @@ -716,7 +717,6 @@ 9AC2EF6F1F6818180037E0D7 /* Comment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416D41EE095BB0060029B /* Comment.swift */; }; 9AC2EF701F6818180037E0D7 /* CustomerResetInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C802A1EAA51C50020F187 /* CustomerResetInput.swift */; }; 9AC2EF711F6818180037E0D7 /* CustomerAccessTokenDeletePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80201EAA51C50020F187 /* CustomerAccessTokenDeletePayload.swift */; }; - 9AC2EF721F6818180037E0D7 /* CheckoutCompleteWithTokenizedPaymentPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80021EAA51C50020F187 /* CheckoutCompleteWithTokenizedPaymentPayload.swift */; }; 9AC2EF731F6818180037E0D7 /* BlogConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416CD1EE095B20060029B /* BlogConnection.swift */; }; 9AC2EF741F6818180037E0D7 /* CreditCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80181EAA51C50020F187 /* CreditCard.swift */; }; 9AC2EF761F6818180037E0D7 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C802F1EAA51C50020F187 /* Image.swift */; }; @@ -762,16 +762,13 @@ 9AC2EF9E1F6818180037E0D7 /* ArticleAuthor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416C31EE095AA0060029B /* ArticleAuthor.swift */; }; 9AC2EF9F1F6818180037E0D7 /* SelectedOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C804D1EAA51C50020F187 /* SelectedOption.swift */; }; 9AC2EFA01F6818180037E0D7 /* OrderLineItemConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C803F1EAA51C50020F187 /* OrderLineItemConnection.swift */; }; - 9AC2EFA11F6818180037E0D7 /* CheckoutAttributesUpdateInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FFE1EAA51C50020F187 /* CheckoutAttributesUpdateInput.swift */; }; 9AC2EFA21F6818180037E0D7 /* CheckoutLineItemsAddPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800E1EAA51C50020F187 /* CheckoutLineItemsAddPayload.swift */; }; - 9AC2EFA31F6818180037E0D7 /* CreditCardPaymentInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80191EAA51C50020F187 /* CreditCardPaymentInput.swift */; }; 9AC2EFA41F6818180037E0D7 /* StringEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A125CFD1F16A0D7008DCF38 /* StringEdge.swift */; }; 9AC2EFA51F6818180037E0D7 /* Graph.Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AEF61B81E5F64230067FA90 /* Graph.Client.swift */; }; 9AC2EFA61F6818180037E0D7 /* Graph.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A4069CB1E8EA710000254CD /* Graph.swift */; }; 9AC2EFA71F6818180037E0D7 /* ProductSortKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80481EAA51C50020F187 /* ProductSortKeys.swift */; }; 9AC2EFA81F6818180037E0D7 /* Graph.QueryError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AAFAB761E6080A500864A17 /* Graph.QueryError.swift */; }; 9AC2EFA91F6818180037E0D7 /* OrderEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C803D1EAA51C50020F187 /* OrderEdge.swift */; }; - 9AC2EFAA1F6818180037E0D7 /* CheckoutEmailUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80071EAA51C50020F187 /* CheckoutEmailUpdatePayload.swift */; }; 9AC2EFAB1F6818180037E0D7 /* Card.Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80F31EB785310020F187 /* Card.Client.swift */; }; 9AC2EFAC1F6818180037E0D7 /* Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80141EAA51C50020F187 /* Collection.swift */; }; 9AC2EFAD1F6818180037E0D7 /* CustomerResetPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C802B1EAA51C50020F187 /* CustomerResetPayload.swift */; }; @@ -779,17 +776,14 @@ 9AC2EFAF1F6818180037E0D7 /* CardBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A52D3A11F3CA58E00C093C8 /* CardBrand.swift */; }; 9AC2EFB01F6818180037E0D7 /* CheckoutCreateInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80031EAA51C50020F187 /* CheckoutCreateInput.swift */; }; 9AC2EFB11F6818180037E0D7 /* OrderSortKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80411EAA51C50020F187 /* OrderSortKeys.swift */; }; - 9AC2EFB21F6818180037E0D7 /* CheckoutCompleteWithCreditCardPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80011EAA51C50020F187 /* CheckoutCompleteWithCreditCardPayload.swift */; }; 9AC2EFB31F6818180037E0D7 /* CheckoutLineItemEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800C1EAA51C50020F187 /* CheckoutLineItemEdge.swift */; }; 9AC2EFB41F6818180037E0D7 /* ProductConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80451EAA51C50020F187 /* ProductConnection.swift */; }; 9AC2EFB51F6818180037E0D7 /* CustomerAccessToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C801D1EAA51C50020F187 /* CustomerAccessToken.swift */; }; 9AC2EFB61F6818180037E0D7 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80381EAA51C50020F187 /* Order.swift */; }; 9AC2EFB71F6818180037E0D7 /* CheckoutLineItemInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800D1EAA51C50020F187 /* CheckoutLineItemInput.swift */; }; - 9AC2EFB81F6818180037E0D7 /* TokenizedPaymentInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80511EAA51C50020F187 /* TokenizedPaymentInput.swift */; }; 9AC2EFB91F6818180037E0D7 /* CheckoutLineItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800A1EAA51C50020F187 /* CheckoutLineItem.swift */; }; 9AC2EFBB1F6818180037E0D7 /* ProductVariantEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C804B1EAA51C50020F187 /* ProductVariantEdge.swift */; }; 9AC2EFBC1F6818180037E0D7 /* AppliedGiftCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FF91EAA51C50020F187 /* AppliedGiftCard.swift */; }; - 9AC2EFBD1F6818180037E0D7 /* CheckoutCustomerDisassociatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80061EAA51C50020F187 /* CheckoutCustomerDisassociatePayload.swift */; }; 9AC2EFBE1F6818180037E0D7 /* CommentEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416D71EE095BB0060029B /* CommentEdge.swift */; }; 9AC2EFBF1F6818180037E0D7 /* GraphQL+ScalarSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AEF61A01E5F5A190067FA90 /* GraphQL+ScalarSupport.swift */; }; 9AC2EFC21F6818180037E0D7 /* Buy.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AEF60F61E5F42D90067FA90 /* Buy.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -822,13 +816,10 @@ 9AF255B81F6FEE50005BB0C9 /* ProductOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80471EAA51C50020F187 /* ProductOption.swift */; }; 9AF255B91F6FEE50005BB0C9 /* QueryRoot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C804C1EAA51C50020F187 /* QueryRoot.swift */; }; 9AF255BA1F6FEE50005BB0C9 /* ShippingRate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C804E1EAA51C50020F187 /* ShippingRate.swift */; }; - 9AF255BB1F6FEE50005BB0C9 /* CheckoutCustomerAssociatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80051EAA51C50020F187 /* CheckoutCustomerAssociatePayload.swift */; }; 9AF255BC1F6FEE50005BB0C9 /* Blog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416CC1EE095B20060029B /* Blog.swift */; }; 9AF255BD1F6FEE50005BB0C9 /* AvailableShippingRates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FFC1EAA51C50020F187 /* AvailableShippingRates.swift */; }; 9AF255BE1F6FEE50005BB0C9 /* CollectionConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80151EAA51C50020F187 /* CollectionConnection.swift */; }; - 9AF255BF1F6FEE50005BB0C9 /* CheckoutGiftCardApplyPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80081EAA51C50020F187 /* CheckoutGiftCardApplyPayload.swift */; }; 9AF255C11F6FEE50005BB0C9 /* ProductEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80461EAA51C50020F187 /* ProductEdge.swift */; }; - 9AF255C21F6FEE50005BB0C9 /* CheckoutAttributesUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FFF1EAA51C50020F187 /* CheckoutAttributesUpdatePayload.swift */; }; 9AF255C31F6FEE50005BB0C9 /* WeightUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80561EAA51C50020F187 /* WeightUnit.swift */; }; 9AF255C41F6FEE50005BB0C9 /* CustomerUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C802D1EAA51C50020F187 /* CustomerUpdatePayload.swift */; }; 9AF255C51F6FEE50005BB0C9 /* Graph.Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A4069CE1E8ED98A000254CD /* Graph.Task.swift */; }; @@ -840,7 +831,6 @@ 9AF255CC1F6FEE50005BB0C9 /* CurrencyCode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C801B1EAA51C50020F187 /* CurrencyCode.swift */; }; 9AF255CD1F6FEE50005BB0C9 /* ShopPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80501EAA51C50020F187 /* ShopPolicy.swift */; }; 9AF255CE1F6FEE50005BB0C9 /* CheckoutShippingLineUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80131EAA51C50020F187 /* CheckoutShippingLineUpdatePayload.swift */; }; - 9AF255CF1F6FEE50005BB0C9 /* CheckoutGiftCardRemovePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80091EAA51C50020F187 /* CheckoutGiftCardRemovePayload.swift */; }; 9AF255D01F6FEE50005BB0C9 /* CheckoutCompleteFreePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80001EAA51C50020F187 /* CheckoutCompleteFreePayload.swift */; }; 9AF255D11F6FEE50005BB0C9 /* DigitalWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A52D3A41F3CA5DB00C093C8 /* DigitalWallet.swift */; }; 9AF255D21F6FEE50005BB0C9 /* MailingAddressInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80351EAA51C50020F187 /* MailingAddressInput.swift */; }; @@ -852,7 +842,6 @@ 9AF255D81F6FEE50005BB0C9 /* CheckoutCreatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80041EAA51C50020F187 /* CheckoutCreatePayload.swift */; }; 9AF255D91F6FEE50005BB0C9 /* Graph.Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C81041EBA66440020F187 /* Graph.Cache.swift */; }; 9AF255DA1F6FEE50005BB0C9 /* Node.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80371EAA51C50020F187 /* Node.swift */; }; - 9AF255DB1F6FEE50005BB0C9 /* CheckoutShippingAddressUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80121EAA51C50020F187 /* CheckoutShippingAddressUpdatePayload.swift */; }; 9AF255DC1F6FEE50005BB0C9 /* OrderLineItemEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80401EAA51C50020F187 /* OrderLineItemEdge.swift */; }; 9AF255DD1F6FEE50005BB0C9 /* Card.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80EF1EB773310020F187 /* Card.swift */; }; 9AF255DE1F6FEE50005BB0C9 /* CheckoutLineItemUpdateInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80111EAA51C50020F187 /* CheckoutLineItemUpdateInput.swift */; }; @@ -869,7 +858,6 @@ 9AF255E91F6FEE50005BB0C9 /* Comment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416D41EE095BB0060029B /* Comment.swift */; }; 9AF255EA1F6FEE50005BB0C9 /* CustomerResetInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C802A1EAA51C50020F187 /* CustomerResetInput.swift */; }; 9AF255EB1F6FEE50005BB0C9 /* CustomerAccessTokenDeletePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80201EAA51C50020F187 /* CustomerAccessTokenDeletePayload.swift */; }; - 9AF255EC1F6FEE50005BB0C9 /* CheckoutCompleteWithTokenizedPaymentPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80021EAA51C50020F187 /* CheckoutCompleteWithTokenizedPaymentPayload.swift */; }; 9AF255ED1F6FEE50005BB0C9 /* BlogConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416CD1EE095B20060029B /* BlogConnection.swift */; }; 9AF255EE1F6FEE50005BB0C9 /* CreditCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80181EAA51C50020F187 /* CreditCard.swift */; }; 9AF255F01F6FEE50005BB0C9 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C802F1EAA51C50020F187 /* Image.swift */; }; @@ -915,16 +903,13 @@ 9AF256181F6FEE50005BB0C9 /* ArticleAuthor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416C31EE095AA0060029B /* ArticleAuthor.swift */; }; 9AF256191F6FEE50005BB0C9 /* SelectedOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C804D1EAA51C50020F187 /* SelectedOption.swift */; }; 9AF2561A1F6FEE50005BB0C9 /* OrderLineItemConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C803F1EAA51C50020F187 /* OrderLineItemConnection.swift */; }; - 9AF2561B1F6FEE50005BB0C9 /* CheckoutAttributesUpdateInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FFE1EAA51C50020F187 /* CheckoutAttributesUpdateInput.swift */; }; 9AF2561C1F6FEE50005BB0C9 /* CheckoutLineItemsAddPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800E1EAA51C50020F187 /* CheckoutLineItemsAddPayload.swift */; }; - 9AF2561D1F6FEE50005BB0C9 /* CreditCardPaymentInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80191EAA51C50020F187 /* CreditCardPaymentInput.swift */; }; 9AF2561E1F6FEE50005BB0C9 /* StringEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A125CFD1F16A0D7008DCF38 /* StringEdge.swift */; }; 9AF2561F1F6FEE50005BB0C9 /* Graph.Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AEF61B81E5F64230067FA90 /* Graph.Client.swift */; }; 9AF256201F6FEE50005BB0C9 /* Graph.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A4069CB1E8EA710000254CD /* Graph.swift */; }; 9AF256211F6FEE50005BB0C9 /* ProductSortKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80481EAA51C50020F187 /* ProductSortKeys.swift */; }; 9AF256221F6FEE50005BB0C9 /* Graph.QueryError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AAFAB761E6080A500864A17 /* Graph.QueryError.swift */; }; 9AF256231F6FEE50005BB0C9 /* OrderEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C803D1EAA51C50020F187 /* OrderEdge.swift */; }; - 9AF256241F6FEE50005BB0C9 /* CheckoutEmailUpdatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80071EAA51C50020F187 /* CheckoutEmailUpdatePayload.swift */; }; 9AF256251F6FEE50005BB0C9 /* Card.Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80F31EB785310020F187 /* Card.Client.swift */; }; 9AF256261F6FEE50005BB0C9 /* Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80141EAA51C50020F187 /* Collection.swift */; }; 9AF256271F6FEE50005BB0C9 /* CustomerResetPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C802B1EAA51C50020F187 /* CustomerResetPayload.swift */; }; @@ -932,17 +917,14 @@ 9AF256291F6FEE50005BB0C9 /* CardBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A52D3A11F3CA58E00C093C8 /* CardBrand.swift */; }; 9AF2562A1F6FEE50005BB0C9 /* CheckoutCreateInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80031EAA51C50020F187 /* CheckoutCreateInput.swift */; }; 9AF2562B1F6FEE50005BB0C9 /* OrderSortKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80411EAA51C50020F187 /* OrderSortKeys.swift */; }; - 9AF2562C1F6FEE50005BB0C9 /* CheckoutCompleteWithCreditCardPayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80011EAA51C50020F187 /* CheckoutCompleteWithCreditCardPayload.swift */; }; 9AF2562D1F6FEE50005BB0C9 /* CheckoutLineItemEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800C1EAA51C50020F187 /* CheckoutLineItemEdge.swift */; }; 9AF2562E1F6FEE50005BB0C9 /* ProductConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80451EAA51C50020F187 /* ProductConnection.swift */; }; 9AF2562F1F6FEE50005BB0C9 /* CustomerAccessToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C801D1EAA51C50020F187 /* CustomerAccessToken.swift */; }; 9AF256301F6FEE50005BB0C9 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80381EAA51C50020F187 /* Order.swift */; }; 9AF256311F6FEE50005BB0C9 /* CheckoutLineItemInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800D1EAA51C50020F187 /* CheckoutLineItemInput.swift */; }; - 9AF256321F6FEE50005BB0C9 /* TokenizedPaymentInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80511EAA51C50020F187 /* TokenizedPaymentInput.swift */; }; 9AF256331F6FEE50005BB0C9 /* CheckoutLineItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C800A1EAA51C50020F187 /* CheckoutLineItem.swift */; }; 9AF256351F6FEE50005BB0C9 /* ProductVariantEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C804B1EAA51C50020F187 /* ProductVariantEdge.swift */; }; 9AF256361F6FEE50005BB0C9 /* AppliedGiftCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C7FF91EAA51C50020F187 /* AppliedGiftCard.swift */; }; - 9AF256371F6FEE50005BB0C9 /* CheckoutCustomerDisassociatePayload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0C80061EAA51C50020F187 /* CheckoutCustomerDisassociatePayload.swift */; }; 9AF256381F6FEE50005BB0C9 /* CommentEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416D71EE095BB0060029B /* CommentEdge.swift */; }; 9AF256391F6FEE50005BB0C9 /* GraphQL+ScalarSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AEF61A01E5F5A190067FA90 /* GraphQL+ScalarSupport.swift */; }; 9AF2563C1F6FEE50005BB0C9 /* Buy.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AEF60F61E5F42D90067FA90 /* Buy.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1014,6 +996,17 @@ 4E28FECB270780B500F9EBED /* CartBuyerIdentity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CartBuyerIdentity.swift; sourceTree = ""; }; 4E28FECC270780B500F9EBED /* Merchandise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Merchandise.swift; sourceTree = ""; }; 4E28FECD270780B500F9EBED /* OnlineStorePublishable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnlineStorePublishable.swift; sourceTree = ""; }; + 4E87F1CE286F3B1900BFF389 /* CartLineCost.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CartLineCost.swift; sourceTree = ""; }; + 4E87F1CF286F3B1900BFF389 /* CartCost.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CartCost.swift; sourceTree = ""; }; + 4E87F1D0286F3B1900BFF389 /* SellingPlanCheckoutCharge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SellingPlanCheckoutCharge.swift; sourceTree = ""; }; + 4E87F1D1286F3B1900BFF389 /* HasMetafieldsIdentifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HasMetafieldsIdentifier.swift; sourceTree = ""; }; + 4E87F1D2286F3B1900BFF389 /* UrlRedirectEdge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UrlRedirectEdge.swift; sourceTree = ""; }; + 4E87F1D3286F3B1900BFF389 /* SellingPlanCheckoutChargeType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SellingPlanCheckoutChargeType.swift; sourceTree = ""; }; + 4E87F1D4286F3B1900BFF389 /* UrlRedirectConnection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UrlRedirectConnection.swift; sourceTree = ""; }; + 4E87F1D5286F3B1900BFF389 /* SellingPlanCheckoutChargeValue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SellingPlanCheckoutChargeValue.swift; sourceTree = ""; }; + 4E87F1D6286F3B1900BFF389 /* UrlRedirect.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UrlRedirect.swift; sourceTree = ""; }; + 4E87F1D7286F3B1900BFF389 /* CartCustomDiscountAllocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CartCustomDiscountAllocation.swift; sourceTree = ""; }; + 4E87F1D8286F3B1900BFF389 /* SellingPlanCheckoutChargePercentageValue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SellingPlanCheckoutChargePercentageValue.swift; sourceTree = ""; }; 4EC8A6ED278792B400FC193B /* MetafieldReference.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetafieldReference.swift; sourceTree = ""; }; 4EC8A6EE278792B400FC193B /* Filter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Filter.swift; sourceTree = ""; }; 4EC8A6EF278792B400FC193B /* ProductFilter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProductFilter.swift; sourceTree = ""; }; @@ -1082,7 +1075,6 @@ 8128551023C4AC7E00ADA66E /* MediaImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaImage.swift; sourceTree = ""; }; 8128551123C4AC7E00ADA66E /* UnitPriceMeasurementMeasuredType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnitPriceMeasurementMeasuredType.swift; sourceTree = ""; }; 81F02040243391F000826BEC /* Storefront.Schema.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Storefront.Schema.swift; path = Buy/Generated/Storefront.Schema.swift; sourceTree = SOURCE_ROOT; }; - 9A035E0F2177B763008596C9 /* TokenizedPaymentInputV2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TokenizedPaymentInputV2.swift; sourceTree = ""; }; 9A0C7FCC1EA6631B0020F187 /* Models.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; 9A0C7FD01EA669C80020F187 /* PayDiscount.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PayDiscount.swift; sourceTree = ""; }; 9A0C7FD21EA66DF70020F187 /* PayDiscountTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PayDiscountTests.swift; sourceTree = ""; }; @@ -1097,18 +1089,9 @@ 9A0C7FFB1EAA51C50020F187 /* AttributeInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AttributeInput.swift; sourceTree = ""; }; 9A0C7FFC1EAA51C50020F187 /* AvailableShippingRates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AvailableShippingRates.swift; sourceTree = ""; }; 9A0C7FFD1EAA51C50020F187 /* Checkout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Checkout.swift; sourceTree = ""; }; - 9A0C7FFE1EAA51C50020F187 /* CheckoutAttributesUpdateInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutAttributesUpdateInput.swift; sourceTree = ""; }; - 9A0C7FFF1EAA51C50020F187 /* CheckoutAttributesUpdatePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutAttributesUpdatePayload.swift; sourceTree = ""; }; 9A0C80001EAA51C50020F187 /* CheckoutCompleteFreePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutCompleteFreePayload.swift; sourceTree = ""; }; - 9A0C80011EAA51C50020F187 /* CheckoutCompleteWithCreditCardPayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutCompleteWithCreditCardPayload.swift; sourceTree = ""; }; - 9A0C80021EAA51C50020F187 /* CheckoutCompleteWithTokenizedPaymentPayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutCompleteWithTokenizedPaymentPayload.swift; sourceTree = ""; }; 9A0C80031EAA51C50020F187 /* CheckoutCreateInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutCreateInput.swift; sourceTree = ""; }; 9A0C80041EAA51C50020F187 /* CheckoutCreatePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutCreatePayload.swift; sourceTree = ""; }; - 9A0C80051EAA51C50020F187 /* CheckoutCustomerAssociatePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutCustomerAssociatePayload.swift; sourceTree = ""; }; - 9A0C80061EAA51C50020F187 /* CheckoutCustomerDisassociatePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutCustomerDisassociatePayload.swift; sourceTree = ""; }; - 9A0C80071EAA51C50020F187 /* CheckoutEmailUpdatePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutEmailUpdatePayload.swift; sourceTree = ""; }; - 9A0C80081EAA51C50020F187 /* CheckoutGiftCardApplyPayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutGiftCardApplyPayload.swift; sourceTree = ""; }; - 9A0C80091EAA51C50020F187 /* CheckoutGiftCardRemovePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutGiftCardRemovePayload.swift; sourceTree = ""; }; 9A0C800A1EAA51C50020F187 /* CheckoutLineItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutLineItem.swift; sourceTree = ""; }; 9A0C800B1EAA51C50020F187 /* CheckoutLineItemConnection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutLineItemConnection.swift; sourceTree = ""; }; 9A0C800C1EAA51C50020F187 /* CheckoutLineItemEdge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutLineItemEdge.swift; sourceTree = ""; }; @@ -1117,14 +1100,12 @@ 9A0C800F1EAA51C50020F187 /* CheckoutLineItemsRemovePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutLineItemsRemovePayload.swift; sourceTree = ""; }; 9A0C80101EAA51C50020F187 /* CheckoutLineItemsUpdatePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutLineItemsUpdatePayload.swift; sourceTree = ""; }; 9A0C80111EAA51C50020F187 /* CheckoutLineItemUpdateInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutLineItemUpdateInput.swift; sourceTree = ""; }; - 9A0C80121EAA51C50020F187 /* CheckoutShippingAddressUpdatePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutShippingAddressUpdatePayload.swift; sourceTree = ""; }; 9A0C80131EAA51C50020F187 /* CheckoutShippingLineUpdatePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutShippingLineUpdatePayload.swift; sourceTree = ""; }; 9A0C80141EAA51C50020F187 /* Collection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Collection.swift; sourceTree = ""; }; 9A0C80151EAA51C50020F187 /* CollectionConnection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionConnection.swift; sourceTree = ""; }; 9A0C80161EAA51C50020F187 /* CollectionEdge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionEdge.swift; sourceTree = ""; }; 9A0C80171EAA51C50020F187 /* CollectionSortKeys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionSortKeys.swift; sourceTree = ""; }; 9A0C80181EAA51C50020F187 /* CreditCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CreditCard.swift; sourceTree = ""; }; - 9A0C80191EAA51C50020F187 /* CreditCardPaymentInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CreditCardPaymentInput.swift; sourceTree = ""; }; 9A0C801A1EAA51C50020F187 /* CropRegion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CropRegion.swift; sourceTree = ""; }; 9A0C801B1EAA51C50020F187 /* CurrencyCode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CurrencyCode.swift; sourceTree = ""; }; 9A0C801C1EAA51C50020F187 /* Customer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Customer.swift; sourceTree = ""; }; @@ -1178,7 +1159,6 @@ 9A0C804E1EAA51C50020F187 /* ShippingRate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShippingRate.swift; sourceTree = ""; }; 9A0C804F1EAA51C50020F187 /* Shop.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Shop.swift; sourceTree = ""; }; 9A0C80501EAA51C50020F187 /* ShopPolicy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShopPolicy.swift; sourceTree = ""; }; - 9A0C80511EAA51C50020F187 /* TokenizedPaymentInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TokenizedPaymentInput.swift; sourceTree = ""; }; 9A0C80521EAA51C50020F187 /* Transaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Transaction.swift; sourceTree = ""; }; 9A0C80531EAA51C50020F187 /* TransactionKind.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransactionKind.swift; sourceTree = ""; }; 9A0C80541EAA51C50020F187 /* TransactionStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransactionStatus.swift; sourceTree = ""; }; @@ -1224,9 +1204,7 @@ 9A4069C91E8EA6DB000254CD /* Graph.RetryHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Graph.RetryHandler.swift; sourceTree = ""; }; 9A4069CB1E8EA710000254CD /* Graph.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Graph.swift; sourceTree = ""; }; 9A4069CE1E8ED98A000254CD /* Graph.Task.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Graph.Task.swift; sourceTree = ""; }; - 9A41E2A51F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckoutDiscountCodeApplyPayload.swift; sourceTree = ""; }; 9A41E2A91F8509770059485A /* CustomerDefaultAddressUpdatePayload.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomerDefaultAddressUpdatePayload.swift; sourceTree = ""; }; - 9A42EA312177B6A900006EC3 /* CheckoutCompleteWithTokenizedPaymentV2Payload.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckoutCompleteWithTokenizedPaymentV2Payload.swift; sourceTree = ""; }; 9A43489A20C84A56005EAD56 /* CheckoutDiscountCodeRemovePayload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutDiscountCodeRemovePayload.swift; sourceTree = ""; }; 9A47C046218087870043525D /* CheckoutCustomerAssociateV2Payload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutCustomerAssociateV2Payload.swift; sourceTree = ""; }; 9A47C047218087880043525D /* CheckoutGiftCardRemoveV2Payload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckoutGiftCardRemoveV2Payload.swift; sourceTree = ""; }; @@ -1288,8 +1266,6 @@ 9AA997EB2046EC470096734F /* ImageContentType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageContentType.swift; sourceTree = ""; }; 9AA9A3EE2279E7990002DFDA /* MetafieldParentResource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetafieldParentResource.swift; sourceTree = ""; }; 9AA9A3EF2279E79A0002DFDA /* Metafield.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Metafield.swift; sourceTree = ""; }; - 9AA9A3F12279E79A0002DFDA /* MetafieldEdge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetafieldEdge.swift; sourceTree = ""; }; - 9AA9A3F22279E79B0002DFDA /* MetafieldConnection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetafieldConnection.swift; sourceTree = ""; }; 9AA9A4022279E7AF0002DFDA /* HasMetafields.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HasMetafields.swift; sourceTree = ""; }; 9AADF1C61EA63ED000D22740 /* MockPaymentMethod.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockPaymentMethod.swift; sourceTree = ""; }; 9AADF1C81EA63FB900D22740 /* MockPaymentToken.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockPaymentToken.swift; sourceTree = ""; }; @@ -1408,7 +1384,9 @@ 4E28FEB6270780B400F9EBED /* CartBuyerIdentityInput.swift */, 4E28FEC1270780B400F9EBED /* CartBuyerIdentityUpdatePayload.swift */, 4E28FEC8270780B400F9EBED /* CartCodeDiscountAllocation.swift */, + 4E87F1CF286F3B1900BFF389 /* CartCost.swift */, 4E28FEBB270780B400F9EBED /* CartCreatePayload.swift */, + 4E87F1D7286F3B1900BFF389 /* CartCustomDiscountAllocation.swift */, 4ECBE3FF27FB45D200CB544E /* CartDeliveryGroup.swift */, 4ECBE40727FB45D200CB544E /* CartDeliveryGroupConnection.swift */, 4ECBE3FE27FB45D200CB544E /* CartDeliveryGroupEdge.swift */, @@ -1421,6 +1399,7 @@ 4E28FEC4270780B400F9EBED /* CartInput.swift */, 4E28FEBE270780B400F9EBED /* CartLine.swift */, 4E28FEC7270780B400F9EBED /* CartLineConnection.swift */, + 4E87F1CE286F3B1900BFF389 /* CartLineCost.swift */, 4E28FEBF270780B400F9EBED /* CartLineEdge.swift */, 4E28FEB7270780B400F9EBED /* CartLineEstimatedCost.swift */, 4E28FEBA270780B400F9EBED /* CartLineInput.swift */, @@ -1431,32 +1410,21 @@ 4E28FEC9270780B400F9EBED /* CartNoteUpdatePayload.swift */, 4E28FEBD270780B400F9EBED /* CartUserError.swift */, 9A0C7FFD1EAA51C50020F187 /* Checkout.swift */, - 9A0C7FFE1EAA51C50020F187 /* CheckoutAttributesUpdateInput.swift */, - 9A0C7FFF1EAA51C50020F187 /* CheckoutAttributesUpdatePayload.swift */, 9AD577642153E315006BD1C5 /* CheckoutAttributesUpdateV2Input.swift */, 9AD577632153E314006BD1C5 /* CheckoutAttributesUpdateV2Payload.swift */, 4EFBFABD2694B89B0054C426 /* CheckoutBuyerIdentity.swift */, 4EFBFAC22694B89C0054C426 /* CheckoutBuyerIdentityInput.swift */, 9A0C80001EAA51C50020F187 /* CheckoutCompleteFreePayload.swift */, - 9A0C80011EAA51C50020F187 /* CheckoutCompleteWithCreditCardPayload.swift */, 9A6711372166678500A57A3F /* CheckoutCompleteWithCreditCardV2Payload.swift */, - 9A0C80021EAA51C50020F187 /* CheckoutCompleteWithTokenizedPaymentPayload.swift */, - 9A42EA312177B6A900006EC3 /* CheckoutCompleteWithTokenizedPaymentV2Payload.swift */, 21751EE9243D1369005001D4 /* CheckoutCompleteWithTokenizedPaymentV3Payload.swift */, 9A0C80031EAA51C50020F187 /* CheckoutCreateInput.swift */, 9A0C80041EAA51C50020F187 /* CheckoutCreatePayload.swift */, - 9A0C80051EAA51C50020F187 /* CheckoutCustomerAssociatePayload.swift */, 9A47C046218087870043525D /* CheckoutCustomerAssociateV2Payload.swift */, - 9A0C80061EAA51C50020F187 /* CheckoutCustomerDisassociatePayload.swift */, 9A47C048218087880043525D /* CheckoutCustomerDisassociateV2Payload.swift */, - 9A41E2A51F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift */, 9A656CBF2183B04700D3A41C /* CheckoutDiscountCodeApplyV2Payload.swift */, 9A43489A20C84A56005EAD56 /* CheckoutDiscountCodeRemovePayload.swift */, - 9A0C80071EAA51C50020F187 /* CheckoutEmailUpdatePayload.swift */, 9A656CBD2183B04600D3A41C /* CheckoutEmailUpdateV2Payload.swift */, 9A67114121666A6600A57A3F /* CheckoutErrorCode.swift */, - 9A0C80081EAA51C50020F187 /* CheckoutGiftCardApplyPayload.swift */, - 9A0C80091EAA51C50020F187 /* CheckoutGiftCardRemovePayload.swift */, 9A47C047218087880043525D /* CheckoutGiftCardRemoveV2Payload.swift */, 9ABEB3C02122FFE900A373F2 /* CheckoutGiftCardsAppendPayload.swift */, 9A0C800A1EAA51C50020F187 /* CheckoutLineItem.swift */, @@ -1468,7 +1436,6 @@ 9A2ACDDA21CABB7000C09FF7 /* CheckoutLineItemsReplacePayload.swift */, 9A0C80101EAA51C50020F187 /* CheckoutLineItemsUpdatePayload.swift */, 9A0C80111EAA51C50020F187 /* CheckoutLineItemUpdateInput.swift */, - 9A0C80121EAA51C50020F187 /* CheckoutShippingAddressUpdatePayload.swift */, 9A656CBE2183B04700D3A41C /* CheckoutShippingAddressUpdateV2Payload.swift */, 9A0C80131EAA51C50020F187 /* CheckoutShippingLineUpdatePayload.swift */, 9A67114521666A7700A57A3F /* CheckoutUserError.swift */, @@ -1483,7 +1450,6 @@ 4EFBFAD12694B89D0054C426 /* Country.swift */, 9AF1C1861F13ACCF0064AEA0 /* CountryCode.swift */, 9A0C80181EAA51C50020F187 /* CreditCard.swift */, - 9A0C80191EAA51C50020F187 /* CreditCardPaymentInput.swift */, 9A6711302166678100A57A3F /* CreditCardPaymentInputV2.swift */, 9A0C801A1EAA51C50020F187 /* CropRegion.swift */, 4EFBFABE2694B89B0054C426 /* Currency.swift */, @@ -1536,6 +1502,7 @@ 4ECBE40227FB45D200CB544E /* GenericFile.swift */, 4EFBFAD42694B89D0054C426 /* GeoCoordinateInput.swift */, 9AA9A4022279E7AF0002DFDA /* HasMetafields.swift */, + 4E87F1D1286F3B1900BFF389 /* HasMetafieldsIdentifier.swift */, 9A0C802F1EAA51C50020F187 /* Image.swift */, 9A0C80301EAA51C50020F187 /* ImageConnection.swift */, 9AA997EB2046EC470096734F /* ImageContentType.swift */, @@ -1566,8 +1533,6 @@ 4ECBE40627FB45D200CB544E /* MenuItemType.swift */, 4E28FECC270780B500F9EBED /* Merchandise.swift */, 9AA9A3EF2279E79A0002DFDA /* Metafield.swift */, - 9AA9A3F22279E79B0002DFDA /* MetafieldConnection.swift */, - 9AA9A3F12279E79A0002DFDA /* MetafieldEdge.swift */, 4EC8A6F0278792B400FC193B /* MetafieldFilter.swift */, 9AA9A3EE2279E7990002DFDA /* MetafieldParentResource.swift */, 4EC8A6ED278792B400FC193B /* MetafieldReference.swift */, @@ -1622,6 +1587,10 @@ 4EFBFACA2694B89C0054C426 /* SellingPlanAllocationConnection.swift */, 4EFBFAC12694B89C0054C426 /* SellingPlanAllocationEdge.swift */, 4EFBFAD82694B89D0054C426 /* SellingPlanAllocationPriceAdjustment.swift */, + 4E87F1D0286F3B1900BFF389 /* SellingPlanCheckoutCharge.swift */, + 4E87F1D8286F3B1900BFF389 /* SellingPlanCheckoutChargePercentageValue.swift */, + 4E87F1D3286F3B1900BFF389 /* SellingPlanCheckoutChargeType.swift */, + 4E87F1D5286F3B1900BFF389 /* SellingPlanCheckoutChargeValue.swift */, 4EFBFAC72694B89C0054C426 /* SellingPlanConnection.swift */, 4EFBFAC52694B89C0054C426 /* SellingPlanEdge.swift */, 4EFBFAD22694B89D0054C426 /* SellingPlanFixedAmountPriceAdjustment.swift */, @@ -1644,8 +1613,6 @@ 4EFBFABB2694B89B0054C426 /* StoreAvailabilityEdge.swift */, 9A125CFE1F16A0D7008DCF38 /* StringConnection.swift */, 9A125CFD1F16A0D7008DCF38 /* StringEdge.swift */, - 9A0C80511EAA51C50020F187 /* TokenizedPaymentInput.swift */, - 9A035E0F2177B763008596C9 /* TokenizedPaymentInputV2.swift */, 21751EEC243D136A005001D4 /* TokenizedPaymentInputV3.swift */, 9A0C80521EAA51C50020F187 /* Transaction.swift */, 9A0C80531EAA51C50020F187 /* TransactionKind.swift */, @@ -1654,6 +1621,9 @@ 8128551123C4AC7E00ADA66E /* UnitPriceMeasurementMeasuredType.swift */, 8128550823C4AC7E00ADA66E /* UnitPriceMeasurementMeasuredUnit.swift */, 4EFBFABF2694B89C0054C426 /* UnitSystem.swift */, + 4E87F1D6286F3B1900BFF389 /* UrlRedirect.swift */, + 4E87F1D4286F3B1900BFF389 /* UrlRedirectConnection.swift */, + 4E87F1D2286F3B1900BFF389 /* UrlRedirectEdge.swift */, 9A0C80551EAA51C50020F187 /* UserError.swift */, 4EC8A6F2278792B400FC193B /* VariantOptionFilter.swift */, 8128550723C4AC7E00ADA66E /* Video.swift */, @@ -2269,7 +2239,9 @@ 4E28FED9270780B500F9EBED /* CartBuyerIdentityInput.swift in Sources */, 4E28FEFA270780B500F9EBED /* CartBuyerIdentityUpdatePayload.swift in Sources */, 4E28FF0F270780B500F9EBED /* CartCodeDiscountAllocation.swift in Sources */, + 4E87F1DE286F3B1900BFF389 /* CartCost.swift in Sources */, 4E28FEE8270780B500F9EBED /* CartCreatePayload.swift in Sources */, + 4E87F1F6286F3B1A00BFF389 /* CartCustomDiscountAllocation.swift in Sources */, 4ECBE40E27FB45D200CB544E /* CartDeliveryGroup.swift in Sources */, 4ECBE42627FB45D200CB544E /* CartDeliveryGroupConnection.swift in Sources */, 4ECBE40B27FB45D200CB544E /* CartDeliveryGroupEdge.swift in Sources */, @@ -2282,6 +2254,7 @@ 4E28FF03270780B500F9EBED /* CartInput.swift in Sources */, 4E28FEF1270780B500F9EBED /* CartLine.swift in Sources */, 4E28FF0C270780B500F9EBED /* CartLineConnection.swift in Sources */, + 4E87F1DB286F3B1900BFF389 /* CartLineCost.swift in Sources */, 4E28FEF4270780B500F9EBED /* CartLineEdge.swift in Sources */, 4E28FEDC270780B500F9EBED /* CartLineEstimatedCost.swift in Sources */, 4E28FEE5270780B500F9EBED /* CartLineInput.swift in Sources */, @@ -2292,32 +2265,21 @@ 4E28FF12270780B500F9EBED /* CartNoteUpdatePayload.swift in Sources */, 4E28FEEE270780B500F9EBED /* CartUserError.swift in Sources */, 9AC2EF8F1F6818180037E0D7 /* Checkout.swift in Sources */, - 9AC2EFA11F6818180037E0D7 /* CheckoutAttributesUpdateInput.swift in Sources */, - 9AC2EF481F6818180037E0D7 /* CheckoutAttributesUpdatePayload.swift in Sources */, 9AD577692153E315006BD1C5 /* CheckoutAttributesUpdateV2Input.swift in Sources */, 9AD577662153E315006BD1C5 /* CheckoutAttributesUpdateV2Payload.swift in Sources */, 4EFBFAE22694B89D0054C426 /* CheckoutBuyerIdentity.swift in Sources */, 4EFBFAF12694B89D0054C426 /* CheckoutBuyerIdentityInput.swift in Sources */, 9AC2EF561F6818180037E0D7 /* CheckoutCompleteFreePayload.swift in Sources */, - 9AC2EFB21F6818180037E0D7 /* CheckoutCompleteWithCreditCardPayload.swift in Sources */, 9A67113F2166678500A57A3F /* CheckoutCompleteWithCreditCardV2Payload.swift in Sources */, - 9AC2EF721F6818180037E0D7 /* CheckoutCompleteWithTokenizedPaymentPayload.swift in Sources */, - 9A035E162177B778008596C9 /* CheckoutCompleteWithTokenizedPaymentV2Payload.swift in Sources */, 21751EF7243D136A005001D4 /* CheckoutCompleteWithTokenizedPaymentV3Payload.swift in Sources */, 9AC2EFB01F6818180037E0D7 /* CheckoutCreateInput.swift in Sources */, 9AC2EF5E1F6818180037E0D7 /* CheckoutCreatePayload.swift in Sources */, - 9AC2EF411F6818180037E0D7 /* CheckoutCustomerAssociatePayload.swift in Sources */, 9A47C04A218087880043525D /* CheckoutCustomerAssociateV2Payload.swift in Sources */, - 9AC2EFBD1F6818180037E0D7 /* CheckoutCustomerDisassociatePayload.swift in Sources */, 9A47C050218087880043525D /* CheckoutCustomerDisassociateV2Payload.swift in Sources */, - 9A41E2A61F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift in Sources */, 9A656CC72183B04700D3A41C /* CheckoutDiscountCodeApplyV2Payload.swift in Sources */, 9A43489C20C84A56005EAD56 /* CheckoutDiscountCodeRemovePayload.swift in Sources */, - 9AC2EFAA1F6818180037E0D7 /* CheckoutEmailUpdatePayload.swift in Sources */, 9A656CC12183B04700D3A41C /* CheckoutEmailUpdateV2Payload.swift in Sources */, 9A67114321666A6700A57A3F /* CheckoutErrorCode.swift in Sources */, - 9AC2EF451F6818180037E0D7 /* CheckoutGiftCardApplyPayload.swift in Sources */, - 9AC2EF551F6818180037E0D7 /* CheckoutGiftCardRemovePayload.swift in Sources */, 9A47C04D218087880043525D /* CheckoutGiftCardRemoveV2Payload.swift in Sources */, 9ABEB3C22122FFE900A373F2 /* CheckoutGiftCardsAppendPayload.swift in Sources */, 9AC2EFB91F6818180037E0D7 /* CheckoutLineItem.swift in Sources */, @@ -2329,7 +2291,6 @@ 9A2ACDDC21CABB7100C09FF7 /* CheckoutLineItemsReplacePayload.swift in Sources */, 9AC2EF7F1F6818180037E0D7 /* CheckoutLineItemsUpdatePayload.swift in Sources */, 9AC2EF641F6818180037E0D7 /* CheckoutLineItemUpdateInput.swift in Sources */, - 9AC2EF611F6818180037E0D7 /* CheckoutShippingAddressUpdatePayload.swift in Sources */, 9A656CC42183B04700D3A41C /* CheckoutShippingAddressUpdateV2Payload.swift in Sources */, 9AC2EF541F6818180037E0D7 /* CheckoutShippingLineUpdatePayload.swift in Sources */, 9A67114721666A7700A57A3F /* CheckoutUserError.swift in Sources */, @@ -2344,7 +2305,6 @@ 4EFBFB1E2694B89D0054C426 /* Country.swift in Sources */, 9AC2EF9B1F6818180037E0D7 /* CountryCode.swift in Sources */, 9AC2EF741F6818180037E0D7 /* CreditCard.swift in Sources */, - 9AC2EFA31F6818180037E0D7 /* CreditCardPaymentInput.swift in Sources */, 9A6711392166678500A57A3F /* CreditCardPaymentInputV2.swift in Sources */, 9AC2EF8A1F6818180037E0D7 /* CropRegion.swift in Sources */, 4EFBFAE52694B89D0054C426 /* Currency.swift in Sources */, @@ -2408,6 +2368,7 @@ 9A371419251A21BE00FE742B /* GraphQL.swift in Sources */, 9AC2EFBF1F6818180037E0D7 /* GraphQL+ScalarSupport.swift in Sources */, 9AA9A4042279E7AF0002DFDA /* HasMetafields.swift in Sources */, + 4E87F1E4286F3B1900BFF389 /* HasMetafieldsIdentifier.swift in Sources */, 9AC2EF6C1F6818180037E0D7 /* Header.swift in Sources */, 9AC2EF761F6818180037E0D7 /* Image.swift in Sources */, 9AC2EF811F6818180037E0D7 /* ImageConnection.swift in Sources */, @@ -2441,8 +2402,6 @@ 4ECBE42327FB45D200CB544E /* MenuItemType.swift in Sources */, 4E28FF1B270780B500F9EBED /* Merchandise.swift in Sources */, 9AA9A3F72279E79B0002DFDA /* Metafield.swift in Sources */, - 9AA9A4002279E79B0002DFDA /* MetafieldConnection.swift in Sources */, - 9AA9A3FD2279E79B0002DFDA /* MetafieldEdge.swift in Sources */, 4EC8A70D2787946400FC193B /* MetafieldFilter.swift in Sources */, 9AA9A3F42279E79B0002DFDA /* MetafieldParentResource.swift in Sources */, 4EC8A7102787946400FC193B /* MetafieldReference.swift in Sources */, @@ -2499,6 +2458,10 @@ 4EFBFB092694B89D0054C426 /* SellingPlanAllocationConnection.swift in Sources */, 4EFBFAEE2694B89D0054C426 /* SellingPlanAllocationEdge.swift in Sources */, 4EFBFB332694B89D0054C426 /* SellingPlanAllocationPriceAdjustment.swift in Sources */, + 4E87F1E1286F3B1900BFF389 /* SellingPlanCheckoutCharge.swift in Sources */, + 4E87F1F9286F3B1A00BFF389 /* SellingPlanCheckoutChargePercentageValue.swift in Sources */, + 4E87F1EA286F3B1A00BFF389 /* SellingPlanCheckoutChargeType.swift in Sources */, + 4E87F1F0286F3B1A00BFF389 /* SellingPlanCheckoutChargeValue.swift in Sources */, 4EFBFB002694B89D0054C426 /* SellingPlanConnection.swift in Sources */, 4EFBFAFA2694B89D0054C426 /* SellingPlanEdge.swift in Sources */, 4EFBFB212694B89D0054C426 /* SellingPlanFixedAmountPriceAdjustment.swift in Sources */, @@ -2524,8 +2487,6 @@ 81F02042243391F100826BEC /* Storefront.Schema.swift in Sources */, 9AC2EF8C1F6818180037E0D7 /* StringConnection.swift in Sources */, 9AC2EFA41F6818180037E0D7 /* StringEdge.swift in Sources */, - 9AC2EFB81F6818180037E0D7 /* TokenizedPaymentInput.swift in Sources */, - 9A035E112177B764008596C9 /* TokenizedPaymentInputV2.swift in Sources */, 21751F00243D136A005001D4 /* TokenizedPaymentInputV3.swift in Sources */, 9AC2EF5D1F6818180037E0D7 /* Transaction.swift in Sources */, 9AC2EF931F6818180037E0D7 /* TransactionKind.swift in Sources */, @@ -2534,6 +2495,9 @@ 815FAB5423C4B82D00F98749 /* UnitPriceMeasurementMeasuredType.swift in Sources */, 815FAB5523C4B82D00F98749 /* UnitPriceMeasurementMeasuredUnit.swift in Sources */, 4EFBFAE82694B89D0054C426 /* UnitSystem.swift in Sources */, + 4E87F1F3286F3B1A00BFF389 /* UrlRedirect.swift in Sources */, + 4E87F1ED286F3B1A00BFF389 /* UrlRedirectConnection.swift in Sources */, + 4E87F1E7286F3B1900BFF389 /* UrlRedirectEdge.swift in Sources */, 9AC2EF961F6818180037E0D7 /* UserError.swift in Sources */, 4EC8A70B2787946400FC193B /* VariantOptionFilter.swift in Sources */, 815FAB5623C4B82D00F98749 /* Video.swift in Sources */, @@ -2572,7 +2536,9 @@ 4E28FED7270780B500F9EBED /* CartBuyerIdentityInput.swift in Sources */, 4E28FEF8270780B500F9EBED /* CartBuyerIdentityUpdatePayload.swift in Sources */, 4E28FF0D270780B500F9EBED /* CartCodeDiscountAllocation.swift in Sources */, + 4E87F1DC286F3B1900BFF389 /* CartCost.swift in Sources */, 4E28FEE6270780B500F9EBED /* CartCreatePayload.swift in Sources */, + 4E87F1F4286F3B1A00BFF389 /* CartCustomDiscountAllocation.swift in Sources */, 4ECBE40C27FB45D200CB544E /* CartDeliveryGroup.swift in Sources */, 4ECBE42427FB45D200CB544E /* CartDeliveryGroupConnection.swift in Sources */, 4ECBE40927FB45D200CB544E /* CartDeliveryGroupEdge.swift in Sources */, @@ -2585,6 +2551,7 @@ 4E28FF01270780B500F9EBED /* CartInput.swift in Sources */, 4E28FEEF270780B500F9EBED /* CartLine.swift in Sources */, 4E28FF0A270780B500F9EBED /* CartLineConnection.swift in Sources */, + 4E87F1D9286F3B1900BFF389 /* CartLineCost.swift in Sources */, 4E28FEF2270780B500F9EBED /* CartLineEdge.swift in Sources */, 4E28FEDA270780B500F9EBED /* CartLineEstimatedCost.swift in Sources */, 4E28FEE3270780B500F9EBED /* CartLineInput.swift in Sources */, @@ -2595,32 +2562,21 @@ 4E28FF10270780B500F9EBED /* CartNoteUpdatePayload.swift in Sources */, 4E28FEEC270780B500F9EBED /* CartUserError.swift in Sources */, 9A0C805C1EAA51C50020F187 /* Checkout.swift in Sources */, - 9A0C805D1EAA51C50020F187 /* CheckoutAttributesUpdateInput.swift in Sources */, - 9A0C805E1EAA51C50020F187 /* CheckoutAttributesUpdatePayload.swift in Sources */, 9AD577682153E315006BD1C5 /* CheckoutAttributesUpdateV2Input.swift in Sources */, 9AD577652153E315006BD1C5 /* CheckoutAttributesUpdateV2Payload.swift in Sources */, 4EFBFAE12694B89D0054C426 /* CheckoutBuyerIdentity.swift in Sources */, 4EFBFAF02694B89D0054C426 /* CheckoutBuyerIdentityInput.swift in Sources */, 9A0C805F1EAA51C50020F187 /* CheckoutCompleteFreePayload.swift in Sources */, - 9A0C80601EAA51C50020F187 /* CheckoutCompleteWithCreditCardPayload.swift in Sources */, 9A67113E2166678500A57A3F /* CheckoutCompleteWithCreditCardV2Payload.swift in Sources */, - 9A0C80611EAA51C50020F187 /* CheckoutCompleteWithTokenizedPaymentPayload.swift in Sources */, - 9A035E132177B775008596C9 /* CheckoutCompleteWithTokenizedPaymentV2Payload.swift in Sources */, 21751EF6243D136A005001D4 /* CheckoutCompleteWithTokenizedPaymentV3Payload.swift in Sources */, 9A0C80621EAA51C50020F187 /* CheckoutCreateInput.swift in Sources */, 9A0C80631EAA51C50020F187 /* CheckoutCreatePayload.swift in Sources */, - 9A0C80641EAA51C50020F187 /* CheckoutCustomerAssociatePayload.swift in Sources */, 9A47C049218087880043525D /* CheckoutCustomerAssociateV2Payload.swift in Sources */, - 9A0C80651EAA51C50020F187 /* CheckoutCustomerDisassociatePayload.swift in Sources */, 9A47C04F218087880043525D /* CheckoutCustomerDisassociateV2Payload.swift in Sources */, - 9A41E2A71F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift in Sources */, 9A656CC62183B04700D3A41C /* CheckoutDiscountCodeApplyV2Payload.swift in Sources */, 9A43489B20C84A56005EAD56 /* CheckoutDiscountCodeRemovePayload.swift in Sources */, - 9A0C80661EAA51C50020F187 /* CheckoutEmailUpdatePayload.swift in Sources */, 9A656CC02183B04700D3A41C /* CheckoutEmailUpdateV2Payload.swift in Sources */, 9A67114221666A6700A57A3F /* CheckoutErrorCode.swift in Sources */, - 9A0C80671EAA51C50020F187 /* CheckoutGiftCardApplyPayload.swift in Sources */, - 9A0C80681EAA51C50020F187 /* CheckoutGiftCardRemovePayload.swift in Sources */, 9A47C04C218087880043525D /* CheckoutGiftCardRemoveV2Payload.swift in Sources */, 9ABEB3C12122FFE900A373F2 /* CheckoutGiftCardsAppendPayload.swift in Sources */, 9A0C80691EAA51C50020F187 /* CheckoutLineItem.swift in Sources */, @@ -2632,7 +2588,6 @@ 9A2ACDDB21CABB7100C09FF7 /* CheckoutLineItemsReplacePayload.swift in Sources */, 9A0C806F1EAA51C50020F187 /* CheckoutLineItemsUpdatePayload.swift in Sources */, 9A0C80701EAA51C50020F187 /* CheckoutLineItemUpdateInput.swift in Sources */, - 9A0C80711EAA51C50020F187 /* CheckoutShippingAddressUpdatePayload.swift in Sources */, 9A656CC32183B04700D3A41C /* CheckoutShippingAddressUpdateV2Payload.swift in Sources */, 9A0C80721EAA51C50020F187 /* CheckoutShippingLineUpdatePayload.swift in Sources */, 9A67114621666A7700A57A3F /* CheckoutUserError.swift in Sources */, @@ -2647,7 +2602,6 @@ 4EFBFB1D2694B89D0054C426 /* Country.swift in Sources */, 9AF1C1871F13B4530064AEA0 /* CountryCode.swift in Sources */, 9A0C80771EAA51C50020F187 /* CreditCard.swift in Sources */, - 9A0C80781EAA51C50020F187 /* CreditCardPaymentInput.swift in Sources */, 9A6711382166678500A57A3F /* CreditCardPaymentInputV2.swift in Sources */, 9A0C80791EAA51C50020F187 /* CropRegion.swift in Sources */, 4EFBFAE42694B89D0054C426 /* Currency.swift in Sources */, @@ -2711,6 +2665,7 @@ 9A371411251A21BE00FE742B /* GraphQL.swift in Sources */, 9AEF61A11E5F5A190067FA90 /* GraphQL+ScalarSupport.swift in Sources */, 9AA9A4032279E7AF0002DFDA /* HasMetafields.swift in Sources */, + 4E87F1E2286F3B1900BFF389 /* HasMetafieldsIdentifier.swift in Sources */, 9A49DC831EC4AD580053710B /* Header.swift in Sources */, 9A0C808E1EAA51C50020F187 /* Image.swift in Sources */, 9A0C808F1EAA51C50020F187 /* ImageConnection.swift in Sources */, @@ -2744,8 +2699,6 @@ 4ECBE42127FB45D200CB544E /* MenuItemType.swift in Sources */, 4E28FF19270780B500F9EBED /* Merchandise.swift in Sources */, 9AA9A3F62279E79B0002DFDA /* Metafield.swift in Sources */, - 9AA9A3FF2279E79B0002DFDA /* MetafieldConnection.swift in Sources */, - 9AA9A3FC2279E79B0002DFDA /* MetafieldEdge.swift in Sources */, 4EC8A6FA278792B400FC193B /* MetafieldFilter.swift in Sources */, 9AA9A3F32279E79B0002DFDA /* MetafieldParentResource.swift in Sources */, 4EC8A6F7278792B400FC193B /* MetafieldReference.swift in Sources */, @@ -2802,6 +2755,10 @@ 4EFBFB082694B89D0054C426 /* SellingPlanAllocationConnection.swift in Sources */, 4EFBFAED2694B89D0054C426 /* SellingPlanAllocationEdge.swift in Sources */, 4EFBFB322694B89D0054C426 /* SellingPlanAllocationPriceAdjustment.swift in Sources */, + 4E87F1DF286F3B1900BFF389 /* SellingPlanCheckoutCharge.swift in Sources */, + 4E87F1F7286F3B1A00BFF389 /* SellingPlanCheckoutChargePercentageValue.swift in Sources */, + 4E87F1E8286F3B1A00BFF389 /* SellingPlanCheckoutChargeType.swift in Sources */, + 4E87F1EE286F3B1A00BFF389 /* SellingPlanCheckoutChargeValue.swift in Sources */, 4EFBFAFF2694B89D0054C426 /* SellingPlanConnection.swift in Sources */, 4EFBFAF92694B89D0054C426 /* SellingPlanEdge.swift in Sources */, 4EFBFB202694B89D0054C426 /* SellingPlanFixedAmountPriceAdjustment.swift in Sources */, @@ -2827,8 +2784,6 @@ 81F02041243391F100826BEC /* Storefront.Schema.swift in Sources */, 9A125CFF1F16A0E0008DCF38 /* StringConnection.swift in Sources */, 9A125D001F16A0E0008DCF38 /* StringEdge.swift in Sources */, - 9A0C80B01EAA51C50020F187 /* TokenizedPaymentInput.swift in Sources */, - 9A035E102177B764008596C9 /* TokenizedPaymentInputV2.swift in Sources */, 21751EFF243D136A005001D4 /* TokenizedPaymentInputV3.swift in Sources */, 9A0C80B11EAA51C50020F187 /* Transaction.swift in Sources */, 9A0C80B21EAA51C50020F187 /* TransactionKind.swift in Sources */, @@ -2837,6 +2792,9 @@ 8128552023C4AC7E00ADA66E /* UnitPriceMeasurementMeasuredType.swift in Sources */, 8128551723C4AC7E00ADA66E /* UnitPriceMeasurementMeasuredUnit.swift in Sources */, 4EFBFAE72694B89D0054C426 /* UnitSystem.swift in Sources */, + 4E87F1F1286F3B1A00BFF389 /* UrlRedirect.swift in Sources */, + 4E87F1EB286F3B1A00BFF389 /* UrlRedirectConnection.swift in Sources */, + 4E87F1E5286F3B1900BFF389 /* UrlRedirectEdge.swift in Sources */, 9A0C80B41EAA51C50020F187 /* UserError.swift in Sources */, 4EC8A6FC278792B400FC193B /* VariantOptionFilter.swift in Sources */, 8128551623C4AC7E00ADA66E /* Video.swift in Sources */, @@ -2875,7 +2833,9 @@ 4E28FED8270780B500F9EBED /* CartBuyerIdentityInput.swift in Sources */, 4E28FEF9270780B500F9EBED /* CartBuyerIdentityUpdatePayload.swift in Sources */, 4E28FF0E270780B500F9EBED /* CartCodeDiscountAllocation.swift in Sources */, + 4E87F1DD286F3B1900BFF389 /* CartCost.swift in Sources */, 4E28FEE7270780B500F9EBED /* CartCreatePayload.swift in Sources */, + 4E87F1F5286F3B1A00BFF389 /* CartCustomDiscountAllocation.swift in Sources */, 4ECBE40D27FB45D200CB544E /* CartDeliveryGroup.swift in Sources */, 4ECBE42527FB45D200CB544E /* CartDeliveryGroupConnection.swift in Sources */, 4ECBE40A27FB45D200CB544E /* CartDeliveryGroupEdge.swift in Sources */, @@ -2888,6 +2848,7 @@ 4E28FF02270780B500F9EBED /* CartInput.swift in Sources */, 4E28FEF0270780B500F9EBED /* CartLine.swift in Sources */, 4E28FF0B270780B500F9EBED /* CartLineConnection.swift in Sources */, + 4E87F1DA286F3B1900BFF389 /* CartLineCost.swift in Sources */, 4E28FEF3270780B500F9EBED /* CartLineEdge.swift in Sources */, 4E28FEDB270780B500F9EBED /* CartLineEstimatedCost.swift in Sources */, 4E28FEE4270780B500F9EBED /* CartLineInput.swift in Sources */, @@ -2898,32 +2859,21 @@ 4E28FF11270780B500F9EBED /* CartNoteUpdatePayload.swift in Sources */, 4E28FEED270780B500F9EBED /* CartUserError.swift in Sources */, 9AF256091F6FEE50005BB0C9 /* Checkout.swift in Sources */, - 9AF2561B1F6FEE50005BB0C9 /* CheckoutAttributesUpdateInput.swift in Sources */, - 9AF255C21F6FEE50005BB0C9 /* CheckoutAttributesUpdatePayload.swift in Sources */, 9AD5776A2153E315006BD1C5 /* CheckoutAttributesUpdateV2Input.swift in Sources */, 9AD577672153E315006BD1C5 /* CheckoutAttributesUpdateV2Payload.swift in Sources */, 4EFBFAE32694B89D0054C426 /* CheckoutBuyerIdentity.swift in Sources */, 4EFBFAF22694B89D0054C426 /* CheckoutBuyerIdentityInput.swift in Sources */, 9AF255D01F6FEE50005BB0C9 /* CheckoutCompleteFreePayload.swift in Sources */, - 9AF2562C1F6FEE50005BB0C9 /* CheckoutCompleteWithCreditCardPayload.swift in Sources */, 9A6711402166678500A57A3F /* CheckoutCompleteWithCreditCardV2Payload.swift in Sources */, - 9AF255EC1F6FEE50005BB0C9 /* CheckoutCompleteWithTokenizedPaymentPayload.swift in Sources */, - 9A035E172177B779008596C9 /* CheckoutCompleteWithTokenizedPaymentV2Payload.swift in Sources */, 21751EF8243D136A005001D4 /* CheckoutCompleteWithTokenizedPaymentV3Payload.swift in Sources */, 9AF2562A1F6FEE50005BB0C9 /* CheckoutCreateInput.swift in Sources */, 9AF255D81F6FEE50005BB0C9 /* CheckoutCreatePayload.swift in Sources */, - 9AF255BB1F6FEE50005BB0C9 /* CheckoutCustomerAssociatePayload.swift in Sources */, 9A47C04B218087880043525D /* CheckoutCustomerAssociateV2Payload.swift in Sources */, - 9AF256371F6FEE50005BB0C9 /* CheckoutCustomerDisassociatePayload.swift in Sources */, 9A47C051218087880043525D /* CheckoutCustomerDisassociateV2Payload.swift in Sources */, - 9A41E2A81F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift in Sources */, 9A656CC82183B04700D3A41C /* CheckoutDiscountCodeApplyV2Payload.swift in Sources */, 9A43489D20C84A56005EAD56 /* CheckoutDiscountCodeRemovePayload.swift in Sources */, - 9AF256241F6FEE50005BB0C9 /* CheckoutEmailUpdatePayload.swift in Sources */, 9A656CC22183B04700D3A41C /* CheckoutEmailUpdateV2Payload.swift in Sources */, 9A67114421666A6700A57A3F /* CheckoutErrorCode.swift in Sources */, - 9AF255BF1F6FEE50005BB0C9 /* CheckoutGiftCardApplyPayload.swift in Sources */, - 9AF255CF1F6FEE50005BB0C9 /* CheckoutGiftCardRemovePayload.swift in Sources */, 9A47C04E218087880043525D /* CheckoutGiftCardRemoveV2Payload.swift in Sources */, 9ABEB3C32122FFE900A373F2 /* CheckoutGiftCardsAppendPayload.swift in Sources */, 9AF256331F6FEE50005BB0C9 /* CheckoutLineItem.swift in Sources */, @@ -2935,7 +2885,6 @@ 9A2ACDDD21CABB7100C09FF7 /* CheckoutLineItemsReplacePayload.swift in Sources */, 9AF255F91F6FEE50005BB0C9 /* CheckoutLineItemsUpdatePayload.swift in Sources */, 9AF255DE1F6FEE50005BB0C9 /* CheckoutLineItemUpdateInput.swift in Sources */, - 9AF255DB1F6FEE50005BB0C9 /* CheckoutShippingAddressUpdatePayload.swift in Sources */, 9A656CC52183B04700D3A41C /* CheckoutShippingAddressUpdateV2Payload.swift in Sources */, 9AF255CE1F6FEE50005BB0C9 /* CheckoutShippingLineUpdatePayload.swift in Sources */, 9A67114821666A7700A57A3F /* CheckoutUserError.swift in Sources */, @@ -2950,7 +2899,6 @@ 4EFBFB1F2694B89D0054C426 /* Country.swift in Sources */, 9AF256151F6FEE50005BB0C9 /* CountryCode.swift in Sources */, 9AF255EE1F6FEE50005BB0C9 /* CreditCard.swift in Sources */, - 9AF2561D1F6FEE50005BB0C9 /* CreditCardPaymentInput.swift in Sources */, 9A67113A2166678500A57A3F /* CreditCardPaymentInputV2.swift in Sources */, 9AF256041F6FEE50005BB0C9 /* CropRegion.swift in Sources */, 4EFBFAE62694B89D0054C426 /* Currency.swift in Sources */, @@ -3014,6 +2962,7 @@ 9A37141A251A21BF00FE742B /* GraphQL.swift in Sources */, 9AF256391F6FEE50005BB0C9 /* GraphQL+ScalarSupport.swift in Sources */, 9AA9A4052279E7AF0002DFDA /* HasMetafields.swift in Sources */, + 4E87F1E3286F3B1900BFF389 /* HasMetafieldsIdentifier.swift in Sources */, 9AF255E61F6FEE50005BB0C9 /* Header.swift in Sources */, 9AF255F01F6FEE50005BB0C9 /* Image.swift in Sources */, 9AF255FB1F6FEE50005BB0C9 /* ImageConnection.swift in Sources */, @@ -3047,8 +2996,6 @@ 4ECBE42227FB45D200CB544E /* MenuItemType.swift in Sources */, 4E28FF1A270780B500F9EBED /* Merchandise.swift in Sources */, 9AA9A3F82279E79B0002DFDA /* Metafield.swift in Sources */, - 9AA9A4012279E79B0002DFDA /* MetafieldConnection.swift in Sources */, - 9AA9A3FE2279E79B0002DFDA /* MetafieldEdge.swift in Sources */, 4EC8A7032787946300FC193B /* MetafieldFilter.swift in Sources */, 9AA9A3F52279E79B0002DFDA /* MetafieldParentResource.swift in Sources */, 4EC8A7062787946300FC193B /* MetafieldReference.swift in Sources */, @@ -3105,6 +3052,10 @@ 4EFBFB0A2694B89D0054C426 /* SellingPlanAllocationConnection.swift in Sources */, 4EFBFAEF2694B89D0054C426 /* SellingPlanAllocationEdge.swift in Sources */, 4EFBFB342694B89D0054C426 /* SellingPlanAllocationPriceAdjustment.swift in Sources */, + 4E87F1E0286F3B1900BFF389 /* SellingPlanCheckoutCharge.swift in Sources */, + 4E87F1F8286F3B1A00BFF389 /* SellingPlanCheckoutChargePercentageValue.swift in Sources */, + 4E87F1E9286F3B1A00BFF389 /* SellingPlanCheckoutChargeType.swift in Sources */, + 4E87F1EF286F3B1A00BFF389 /* SellingPlanCheckoutChargeValue.swift in Sources */, 4EFBFB012694B89D0054C426 /* SellingPlanConnection.swift in Sources */, 4EFBFAFB2694B89D0054C426 /* SellingPlanEdge.swift in Sources */, 4EFBFB222694B89D0054C426 /* SellingPlanFixedAmountPriceAdjustment.swift in Sources */, @@ -3130,8 +3081,6 @@ 81F02043243391F100826BEC /* Storefront.Schema.swift in Sources */, 9AF256061F6FEE50005BB0C9 /* StringConnection.swift in Sources */, 9AF2561E1F6FEE50005BB0C9 /* StringEdge.swift in Sources */, - 9AF256321F6FEE50005BB0C9 /* TokenizedPaymentInput.swift in Sources */, - 9A035E122177B764008596C9 /* TokenizedPaymentInputV2.swift in Sources */, 21751F01243D136A005001D4 /* TokenizedPaymentInputV3.swift in Sources */, 9AF255D71F6FEE50005BB0C9 /* Transaction.swift in Sources */, 9AF2560D1F6FEE50005BB0C9 /* TransactionKind.swift in Sources */, @@ -3140,6 +3089,9 @@ 815FAB4523C4B81500F98749 /* UnitPriceMeasurementMeasuredType.swift in Sources */, 815FAB4623C4B81500F98749 /* UnitPriceMeasurementMeasuredUnit.swift in Sources */, 4EFBFAE92694B89D0054C426 /* UnitSystem.swift in Sources */, + 4E87F1F2286F3B1A00BFF389 /* UrlRedirect.swift in Sources */, + 4E87F1EC286F3B1A00BFF389 /* UrlRedirectConnection.swift in Sources */, + 4E87F1E6286F3B1900BFF389 /* UrlRedirectEdge.swift in Sources */, 9AF256101F6FEE50005BB0C9 /* UserError.swift in Sources */, 4EC8A7012787946300FC193B /* VariantOptionFilter.swift in Sources */, 815FAB4723C4B81500F98749 /* Video.swift in Sources */,