From 8a2935d198f9e3e72a5bb3a816e9c59a9ea0936a Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 1 Apr 2024 16:55:49 +0000 Subject: [PATCH 1/4] Update schema (auto-generated) --- Buy/Generated/Storefront.Schema.swift | 2 +- Buy/Generated/Storefront/BuyerInput.swift | 83 +++++ .../Storefront/CartBuyerIdentity.swift | 32 ++ .../Storefront/CartBuyerIdentityInput.swift | 26 +- .../Storefront/CartDeliveryGroup.swift | 22 ++ .../Storefront/CartDeliveryGroupType.swift | 41 +++ Buy/Generated/Storefront/CartErrorCode.swift | 48 +++ Buy/Generated/Storefront/Checkout.swift | 12 +- Buy/Generated/Storefront/Company.swift | 285 ++++++++++++++++ Buy/Generated/Storefront/CompanyContact.swift | 171 ++++++++++ .../Storefront/CompanyLocation.swift | 306 ++++++++++++++++++ Buy/Generated/Storefront/Customer.swift | 2 + .../Storefront/DeliveryAddressInput.swift | 26 +- .../DeliveryAddressValidationStrategy.swift | 43 +++ Buy/Generated/Storefront/Filter.swift | 25 ++ .../Storefront/FilterPresentation.swift | 44 +++ Buy/Generated/Storefront/FilterValue.swift | 73 ++++- Buy/Generated/Storefront/HasMetafields.swift | 24 ++ Buy/Generated/Storefront/InContext.swift | 7 +- .../Storefront/MetafieldParentResource.swift | 22 ++ .../Storefront/MetafieldReference.swift | 11 + Buy/Generated/Storefront/Model3d.swift | 2 +- Buy/Generated/Storefront/Mutation.swift | 80 ++++- Buy/Generated/Storefront/Node.swift | 51 +++ Buy/Generated/Storefront/ProductVariant.swift | 89 +++++ .../Storefront/PurchasingCompany.swift | 148 +++++++++ .../Storefront/QuantityPriceBreak.swift | 111 +++++++ .../QuantityPriceBreakConnection.swift | 149 +++++++++ .../Storefront/QuantityPriceBreakEdge.swift | 111 +++++++ Buy/Generated/Storefront/QuantityRule.swift | 130 ++++++++ Buy/Generated/Storefront/QueryRoot.swift | 2 +- Buy/Generated/Storefront/Swatch.swift | 113 +++++++ 32 files changed, 2269 insertions(+), 22 deletions(-) create mode 100644 Buy/Generated/Storefront/BuyerInput.swift create mode 100644 Buy/Generated/Storefront/CartDeliveryGroupType.swift create mode 100644 Buy/Generated/Storefront/Company.swift create mode 100644 Buy/Generated/Storefront/CompanyContact.swift create mode 100644 Buy/Generated/Storefront/CompanyLocation.swift create mode 100644 Buy/Generated/Storefront/DeliveryAddressValidationStrategy.swift create mode 100644 Buy/Generated/Storefront/FilterPresentation.swift create mode 100644 Buy/Generated/Storefront/PurchasingCompany.swift create mode 100644 Buy/Generated/Storefront/QuantityPriceBreak.swift create mode 100644 Buy/Generated/Storefront/QuantityPriceBreakConnection.swift create mode 100644 Buy/Generated/Storefront/QuantityPriceBreakEdge.swift create mode 100644 Buy/Generated/Storefront/QuantityRule.swift create mode 100644 Buy/Generated/Storefront/Swatch.swift diff --git a/Buy/Generated/Storefront.Schema.swift b/Buy/Generated/Storefront.Schema.swift index d7051140..ec211c6c 100644 --- a/Buy/Generated/Storefront.Schema.swift +++ b/Buy/Generated/Storefront.Schema.swift @@ -26,6 +26,6 @@ extension Storefront { enum Schema { - static let version = "2024-01" + static let version = "2024-04" } } diff --git a/Buy/Generated/Storefront/BuyerInput.swift b/Buy/Generated/Storefront/BuyerInput.swift new file mode 100644 index 00000000..105e386e --- /dev/null +++ b/Buy/Generated/Storefront/BuyerInput.swift @@ -0,0 +1,83 @@ +// +// BuyerInput.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 input fields for obtaining the buyer's identity. + open class BuyerInput { + /// The storefront customer access token retrieved from the [Customer Accounts + /// API](https://shopify.dev/docs/api/customer/reference/mutations/storefrontCustomerAccessTokenCreate). + open var customerAccessToken: String + + /// The identifier of the company location. + open var companyLocationId: Input + + /// Creates the input object. + /// + /// - parameters: + /// - customerAccessToken: The storefront customer access token retrieved from the [Customer Accounts API](https://shopify.dev/docs/api/customer/reference/mutations/storefrontCustomerAccessTokenCreate). + /// - companyLocationId: The identifier of the company location. + /// + public static func create(customerAccessToken: String, companyLocationId: Input = .undefined) -> BuyerInput { + return BuyerInput(customerAccessToken: customerAccessToken, companyLocationId: companyLocationId) + } + + private init(customerAccessToken: String, companyLocationId: Input = .undefined) { + self.customerAccessToken = customerAccessToken + self.companyLocationId = companyLocationId + } + + /// Creates the input object. + /// + /// - parameters: + /// - customerAccessToken: The storefront customer access token retrieved from the [Customer Accounts API](https://shopify.dev/docs/api/customer/reference/mutations/storefrontCustomerAccessTokenCreate). + /// - companyLocationId: The identifier of the company location. + /// + @available(*, deprecated, message: "Use the static create() method instead.") + public convenience init(customerAccessToken: String, companyLocationId: GraphQL.ID? = nil) { + self.init(customerAccessToken: customerAccessToken, companyLocationId: companyLocationId.orUndefined) + } + + internal func serialize() -> String { + var fields: [String] = [] + + fields.append("customerAccessToken:\(GraphQL.quoteString(input: customerAccessToken))") + + switch companyLocationId { + case .value(let companyLocationId): + guard let companyLocationId = companyLocationId else { + fields.append("companyLocationId:null") + break + } + fields.append("companyLocationId:\(GraphQL.quoteString(input: "\(companyLocationId.rawValue)"))") + case .undefined: break + } + + return "{\(fields.joined(separator: ","))}" + } + } +} diff --git a/Buy/Generated/Storefront/CartBuyerIdentity.swift b/Buy/Generated/Storefront/CartBuyerIdentity.swift index 6a444de6..111ca06c 100644 --- a/Buy/Generated/Storefront/CartBuyerIdentity.swift +++ b/Buy/Generated/Storefront/CartBuyerIdentity.swift @@ -75,6 +75,16 @@ extension Storefront { return self } + /// The purchasing company associated with the cart. + @discardableResult + open func purchasingCompany(alias: String? = nil, _ subfields: (PurchasingCompanyQuery) -> Void) -> CartBuyerIdentityQuery { + let subquery = PurchasingCompanyQuery() + subfields(subquery) + + addField(field: "purchasingCompany", aliasSuffix: alias, subfields: subquery) + return self + } + /// A set of wallet preferences tied to the buyer that is interacting with the /// cart. Preferences can be used to populate relevant payment fields in the /// checkout flow. @@ -126,6 +136,13 @@ extension Storefront { } return value + case "purchasingCompany": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CartBuyerIdentity.self, field: fieldName, value: fieldValue) + } + return try PurchasingCompany(fields: value) + case "walletPreferences": guard let value = value as? [String] else { throw SchemaViolationError(type: CartBuyerIdentity.self, field: fieldName, value: fieldValue) @@ -185,6 +202,15 @@ extension Storefront { return field(field: "phone", aliasSuffix: alias) as! String? } + /// The purchasing company associated with the cart. + open var purchasingCompany: Storefront.PurchasingCompany? { + return internalGetPurchasingCompany() + } + + func internalGetPurchasingCompany(alias: String? = nil) -> Storefront.PurchasingCompany? { + return field(field: "purchasingCompany", aliasSuffix: alias) as! Storefront.PurchasingCompany? + } + /// A set of wallet preferences tied to the buyer that is interacting with the /// cart. Preferences can be used to populate relevant payment fields in the /// checkout flow. @@ -212,6 +238,12 @@ extension Storefront { response.append(contentsOf: ($0 as! GraphQL.AbstractResponse).childResponseObjectMap()) } + case "purchasingCompany": + if let value = internalGetPurchasingCompany() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + default: break } diff --git a/Buy/Generated/Storefront/CartBuyerIdentityInput.swift b/Buy/Generated/Storefront/CartBuyerIdentityInput.swift index 9a7fe5cb..357c9f05 100644 --- a/Buy/Generated/Storefront/CartBuyerIdentityInput.swift +++ b/Buy/Generated/Storefront/CartBuyerIdentityInput.swift @@ -38,6 +38,9 @@ extension Storefront { /// The phone number of the buyer that is interacting with the cart. open var phone: Input + /// The company location of the buyer that is interacting with the cart. + open var companyLocationId: Input + /// The country where the buyer is located. open var countryCode: Input @@ -62,18 +65,20 @@ extension Storefront { /// - parameters: /// - email: The email address of the buyer that is interacting with the cart. /// - phone: The phone number of the buyer that is interacting with the cart. + /// - companyLocationId: The company location of the buyer that is interacting with the cart. /// - countryCode: The country where the buyer is located. /// - customerAccessToken: The access token used to identify the customer associated with the cart. /// - deliveryAddressPreferences: An ordered set of delivery addresses tied to the buyer that is interacting with the cart. The rank of the preferences is determined by the order of the addresses in the array. Preferences can be used to populate relevant fields in the checkout flow. The input must not contain more than `250` values. /// - walletPreferences: A set of wallet preferences tied to the buyer that is interacting with the cart. Preferences can be used to populate relevant payment fields in the checkout flow. Accepted value: `["shop_pay"]`. The input must not contain more than `250` values. /// - public static func create(email: Input = .undefined, phone: Input = .undefined, countryCode: Input = .undefined, customerAccessToken: Input = .undefined, deliveryAddressPreferences: Input<[DeliveryAddressInput]> = .undefined, walletPreferences: Input<[String]> = .undefined) -> CartBuyerIdentityInput { - return CartBuyerIdentityInput(email: email, phone: phone, countryCode: countryCode, customerAccessToken: customerAccessToken, deliveryAddressPreferences: deliveryAddressPreferences, walletPreferences: walletPreferences) + public static func create(email: Input = .undefined, phone: Input = .undefined, companyLocationId: Input = .undefined, countryCode: Input = .undefined, customerAccessToken: Input = .undefined, deliveryAddressPreferences: Input<[DeliveryAddressInput]> = .undefined, walletPreferences: Input<[String]> = .undefined) -> CartBuyerIdentityInput { + return CartBuyerIdentityInput(email: email, phone: phone, companyLocationId: companyLocationId, countryCode: countryCode, customerAccessToken: customerAccessToken, deliveryAddressPreferences: deliveryAddressPreferences, walletPreferences: walletPreferences) } - private init(email: Input = .undefined, phone: Input = .undefined, countryCode: Input = .undefined, customerAccessToken: Input = .undefined, deliveryAddressPreferences: Input<[DeliveryAddressInput]> = .undefined, walletPreferences: Input<[String]> = .undefined) { + private init(email: Input = .undefined, phone: Input = .undefined, companyLocationId: Input = .undefined, countryCode: Input = .undefined, customerAccessToken: Input = .undefined, deliveryAddressPreferences: Input<[DeliveryAddressInput]> = .undefined, walletPreferences: Input<[String]> = .undefined) { self.email = email self.phone = phone + self.companyLocationId = companyLocationId self.countryCode = countryCode self.customerAccessToken = customerAccessToken self.deliveryAddressPreferences = deliveryAddressPreferences @@ -85,14 +90,15 @@ extension Storefront { /// - parameters: /// - email: The email address of the buyer that is interacting with the cart. /// - phone: The phone number of the buyer that is interacting with the cart. + /// - companyLocationId: The company location of the buyer that is interacting with the cart. /// - countryCode: The country where the buyer is located. /// - customerAccessToken: The access token used to identify the customer associated with the cart. /// - deliveryAddressPreferences: An ordered set of delivery addresses tied to the buyer that is interacting with the cart. The rank of the preferences is determined by the order of the addresses in the array. Preferences can be used to populate relevant fields in the checkout flow. The input must not contain more than `250` values. /// - walletPreferences: A set of wallet preferences tied to the buyer that is interacting with the cart. Preferences can be used to populate relevant payment fields in the checkout flow. Accepted value: `["shop_pay"]`. The input must not contain more than `250` values. /// @available(*, deprecated, message: "Use the static create() method instead.") - public convenience init(email: String? = nil, phone: String? = nil, countryCode: CountryCode? = nil, customerAccessToken: String? = nil, deliveryAddressPreferences: [DeliveryAddressInput]? = nil, walletPreferences: [String]? = nil) { - self.init(email: email.orUndefined, phone: phone.orUndefined, countryCode: countryCode.orUndefined, customerAccessToken: customerAccessToken.orUndefined, deliveryAddressPreferences: deliveryAddressPreferences.orUndefined, walletPreferences: walletPreferences.orUndefined) + public convenience init(email: String? = nil, phone: String? = nil, companyLocationId: GraphQL.ID? = nil, countryCode: CountryCode? = nil, customerAccessToken: String? = nil, deliveryAddressPreferences: [DeliveryAddressInput]? = nil, walletPreferences: [String]? = nil) { + self.init(email: email.orUndefined, phone: phone.orUndefined, companyLocationId: companyLocationId.orUndefined, countryCode: countryCode.orUndefined, customerAccessToken: customerAccessToken.orUndefined, deliveryAddressPreferences: deliveryAddressPreferences.orUndefined, walletPreferences: walletPreferences.orUndefined) } internal func serialize() -> String { @@ -118,6 +124,16 @@ extension Storefront { case .undefined: break } + switch companyLocationId { + case .value(let companyLocationId): + guard let companyLocationId = companyLocationId else { + fields.append("companyLocationId:null") + break + } + fields.append("companyLocationId:\(GraphQL.quoteString(input: "\(companyLocationId.rawValue)"))") + case .undefined: break + } + switch countryCode { case .value(let countryCode): guard let countryCode = countryCode else { diff --git a/Buy/Generated/Storefront/CartDeliveryGroup.swift b/Buy/Generated/Storefront/CartDeliveryGroup.swift index d42000f0..377ed4bd 100644 --- a/Buy/Generated/Storefront/CartDeliveryGroup.swift +++ b/Buy/Generated/Storefront/CartDeliveryGroup.swift @@ -94,6 +94,13 @@ extension Storefront { return self } + /// The type of merchandise in the delivery group. + @discardableResult + open func groupType(alias: String? = nil) -> CartDeliveryGroupQuery { + addField(field: "groupType", aliasSuffix: alias) + return self + } + /// The ID for the delivery group. @discardableResult open func id(alias: String? = nil) -> CartDeliveryGroupQuery { @@ -138,6 +145,12 @@ extension Storefront { } return try value.map { return try CartDeliveryOption(fields: $0) } + case "groupType": + guard let value = value as? String else { + throw SchemaViolationError(type: CartDeliveryGroup.self, field: fieldName, value: fieldValue) + } + return CartDeliveryGroupType(rawValue: value) ?? .unknownValue + case "id": guard let value = value as? String else { throw SchemaViolationError(type: CartDeliveryGroup.self, field: fieldName, value: fieldValue) @@ -187,6 +200,15 @@ extension Storefront { return field(field: "deliveryOptions", aliasSuffix: alias) as! [Storefront.CartDeliveryOption] } + /// The type of merchandise in the delivery group. + open var groupType: Storefront.CartDeliveryGroupType { + return internalGetGroupType() + } + + func internalGetGroupType(alias: String? = nil) -> Storefront.CartDeliveryGroupType { + return field(field: "groupType", aliasSuffix: alias) as! Storefront.CartDeliveryGroupType + } + /// The ID for the delivery group. open var id: GraphQL.ID { return internalGetId() diff --git a/Buy/Generated/Storefront/CartDeliveryGroupType.swift b/Buy/Generated/Storefront/CartDeliveryGroupType.swift new file mode 100644 index 00000000..92938775 --- /dev/null +++ b/Buy/Generated/Storefront/CartDeliveryGroupType.swift @@ -0,0 +1,41 @@ +// +// CartDeliveryGroupType.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 { + /// Defines what type of merchandise is in the delivery group. + public enum CartDeliveryGroupType: String { + /// The delivery group only contains merchandise that is either a one time + /// purchase or a first delivery of subscription merchandise. + case oneTimePurchase = "ONE_TIME_PURCHASE" + + /// The delivery group only contains subscription merchandise. + case subscription = "SUBSCRIPTION" + + case unknownValue = "" + } +} diff --git a/Buy/Generated/Storefront/CartErrorCode.swift b/Buy/Generated/Storefront/CartErrorCode.swift index 6501659a..45aa8dcd 100644 --- a/Buy/Generated/Storefront/CartErrorCode.swift +++ b/Buy/Generated/Storefront/CartErrorCode.swift @@ -29,15 +29,39 @@ import Foundation extension Storefront { /// Possible error codes that can be returned by `CartUserError`. public enum CartErrorCode: String { + /// The specified address field contains emojis. + case addressFieldContainsEmojis = "ADDRESS_FIELD_CONTAINS_EMOJIS" + + /// The specified address field contains HTML tags. + case addressFieldContainsHtmlTags = "ADDRESS_FIELD_CONTAINS_HTML_TAGS" + + /// The specified address field contains a URL. + case addressFieldContainsUrl = "ADDRESS_FIELD_CONTAINS_URL" + + /// The specified address field does not match the expected pattern. + case addressFieldDoesNotMatchExpectedPattern = "ADDRESS_FIELD_DOES_NOT_MATCH_EXPECTED_PATTERN" + + /// The specified address field is required. + case addressFieldIsRequired = "ADDRESS_FIELD_IS_REQUIRED" + + /// The specified address field is too long. + case addressFieldIsTooLong = "ADDRESS_FIELD_IS_TOO_LONG" + /// The input value is invalid. case invalid = "INVALID" + /// Company location not found or not allowed. + case invalidCompanyLocation = "INVALID_COMPANY_LOCATION" + /// Delivery group was not found in cart. case invalidDeliveryGroup = "INVALID_DELIVERY_GROUP" /// Delivery option was not valid. case invalidDeliveryOption = "INVALID_DELIVERY_OPTION" + /// The quantity must be a multiple of the specified increment. + case invalidIncrement = "INVALID_INCREMENT" + /// Merchandise line was not found in cart. case invalidMerchandiseLine = "INVALID_MERCHANDISE_LINE" @@ -50,9 +74,24 @@ extension Storefront { /// Cannot update payment on an empty cart case invalidPaymentEmptyCart = "INVALID_PAYMENT_EMPTY_CART" + /// The given zip code is invalid for the provided country. + case invalidZipCodeForCountry = "INVALID_ZIP_CODE_FOR_COUNTRY" + + /// The given zip code is invalid for the provided province. + case invalidZipCodeForProvince = "INVALID_ZIP_CODE_FOR_PROVINCE" + /// The input value should be less than the maximum value allowed. case lessThan = "LESS_THAN" + /// The quantity must be below the specified maximum for the item. + case maximumExceeded = "MAXIMUM_EXCEEDED" + + /// The quantity must be above the specified minimum for the item. + case minimumNotMet = "MINIMUM_NOT_MET" + + /// The customer access token is required when setting a company location. + case missingCustomerAccessToken = "MISSING_CUSTOMER_ACCESS_TOKEN" + /// Missing discount code. case missingDiscountCode = "MISSING_DISCOUNT_CODE" @@ -62,9 +101,18 @@ extension Storefront { /// The payment method is not supported. case paymentMethodNotSupported = "PAYMENT_METHOD_NOT_SUPPORTED" + /// The given province cannot be found. + case provinceNotFound = "PROVINCE_NOT_FOUND" + + /// A general error occurred during address validation. + case unspecifiedAddressError = "UNSPECIFIED_ADDRESS_ERROR" + /// Validation failed. case validationCustom = "VALIDATION_CUSTOM" + /// The given zip code is unsupported. + case zipCodeNotSupported = "ZIP_CODE_NOT_SUPPORTED" + case unknownValue = "" } } diff --git a/Buy/Generated/Storefront/Checkout.swift b/Buy/Generated/Storefront/Checkout.swift index 06225854..f09b714e 100644 --- a/Buy/Generated/Storefront/Checkout.swift +++ b/Buy/Generated/Storefront/Checkout.swift @@ -27,7 +27,11 @@ import Foundation extension Storefront { - /// A container for all the information required to checkout items and pay. + /// A container for all the information required to checkout items and pay. The + /// Storefront GraphQL Checkout API is deprecated and will be removed in a + /// future version. Please see + /// https://shopify.dev/changelog/deprecation-of-checkout-apis for more + /// information. open class CheckoutQuery: GraphQL.AbstractQuery, GraphQLQuery { public typealias Response = Checkout @@ -406,7 +410,11 @@ extension Storefront { } } - /// A container for all the information required to checkout items and pay. + /// A container for all the information required to checkout items and pay. The + /// Storefront GraphQL Checkout API is deprecated and will be removed in a + /// future version. Please see + /// https://shopify.dev/changelog/deprecation-of-checkout-apis for more + /// information. open class Checkout: GraphQL.AbstractResponse, GraphQLObject, Node { public typealias Query = CheckoutQuery diff --git a/Buy/Generated/Storefront/Company.swift b/Buy/Generated/Storefront/Company.swift new file mode 100644 index 00000000..a8eac2a5 --- /dev/null +++ b/Buy/Generated/Storefront/Company.swift @@ -0,0 +1,285 @@ +// +// Company.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 { + /// Represents information about a company which is also a customer of the + /// shop. + open class CompanyQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = Company + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was + /// created in Shopify. + @discardableResult + open func createdAt(alias: String? = nil) -> CompanyQuery { + addField(field: "createdAt", aliasSuffix: alias) + return self + } + + /// A unique externally-supplied ID for the company. + @discardableResult + open func externalId(alias: String? = nil) -> CompanyQuery { + addField(field: "externalId", aliasSuffix: alias) + return self + } + + /// A globally-unique ID. + @discardableResult + open func id(alias: String? = nil) -> CompanyQuery { + addField(field: "id", aliasSuffix: alias) + return self + } + + /// Returns a metafield found by namespace and key. + /// + /// - parameters: + /// - namespace: The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + /// - key: The identifier for the metafield. + /// + @discardableResult + open func metafield(alias: String? = nil, namespace: String? = nil, key: String, _ subfields: (MetafieldQuery) -> Void) -> CompanyQuery { + var args: [String] = [] + + args.append("key:\(GraphQL.quoteString(input: key))") + + if let namespace = namespace { + args.append("namespace:\(GraphQL.quoteString(input: namespace))") + } + + let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + + let subquery = MetafieldQuery() + subfields(subquery) + + addField(field: "metafield", aliasSuffix: alias, args: argsString, subfields: subquery) + return self + } + + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + /// + /// - parameters: + /// - identifiers: The list of metafields to retrieve by namespace and key. + /// + /// The input must not contain more than `250` values. + /// + @discardableResult + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> CompanyQuery { + var args: [String] = [] + + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") + + let argsString = "(\(args.joined(separator: ",")))" + + let subquery = MetafieldQuery() + subfields(subquery) + + addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) + return self + } + + /// The name of the company. + @discardableResult + open func name(alias: String? = nil) -> CompanyQuery { + addField(field: "name", aliasSuffix: alias) + return self + } + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was + /// last modified. + @discardableResult + open func updatedAt(alias: String? = nil) -> CompanyQuery { + addField(field: "updatedAt", aliasSuffix: alias) + return self + } + } + + /// Represents information about a company which is also a customer of the + /// shop. + open class Company: GraphQL.AbstractResponse, GraphQLObject, HasMetafields, MetafieldParentResource, Node { + public typealias Query = CompanyQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "createdAt": + guard let value = value as? String else { + throw SchemaViolationError(type: Company.self, field: fieldName, value: fieldValue) + } + return GraphQL.iso8601DateParser.date(from: value)! + + case "externalId": + if value is NSNull { return nil } + guard let value = value as? String else { + throw SchemaViolationError(type: Company.self, field: fieldName, value: fieldValue) + } + return value + + case "id": + guard let value = value as? String else { + throw SchemaViolationError(type: Company.self, field: fieldName, value: fieldValue) + } + return GraphQL.ID(rawValue: value) + + case "metafield": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: Company.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) + + case "metafields": + guard let value = value as? [Any] else { + throw SchemaViolationError(type: Company.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: Company.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) } as [Any?] + + case "name": + guard let value = value as? String else { + throw SchemaViolationError(type: Company.self, field: fieldName, value: fieldValue) + } + return value + + case "updatedAt": + guard let value = value as? String else { + throw SchemaViolationError(type: Company.self, field: fieldName, value: fieldValue) + } + return GraphQL.iso8601DateParser.date(from: value)! + + default: + throw SchemaViolationError(type: Company.self, field: fieldName, value: fieldValue) + } + } + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was + /// created in Shopify. + open var createdAt: Date { + return internalGetCreatedAt() + } + + func internalGetCreatedAt(alias: String? = nil) -> Date { + return field(field: "createdAt", aliasSuffix: alias) as! Date + } + + /// A unique externally-supplied ID for the company. + open var externalId: String? { + return internalGetExternalId() + } + + func internalGetExternalId(alias: String? = nil) -> String? { + return field(field: "externalId", aliasSuffix: alias) as! String? + } + + /// A globally-unique ID. + open var id: GraphQL.ID { + return internalGetId() + } + + func internalGetId(alias: String? = nil) -> GraphQL.ID { + return field(field: "id", aliasSuffix: alias) as! GraphQL.ID + } + + /// Returns a metafield found by namespace and key. + open var metafield: Storefront.Metafield? { + return internalGetMetafield() + } + + open func aliasedMetafield(alias: String) -> Storefront.Metafield? { + return internalGetMetafield(alias: alias) + } + + func internalGetMetafield(alias: String? = nil) -> Storefront.Metafield? { + return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? + } + + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { + return internalGetMetafields() + } + + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { + return internalGetMetafields(alias: alias) + } + + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] + } + + /// The name of the company. + open var name: String { + return internalGetName() + } + + func internalGetName(alias: String? = nil) -> String { + return field(field: "name", aliasSuffix: alias) as! String + } + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was + /// last modified. + open var updatedAt: Date { + return internalGetUpdatedAt() + } + + func internalGetUpdatedAt(alias: String? = nil) -> Date { + return field(field: "updatedAt", aliasSuffix: alias) as! Date + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "metafield": + if let value = internalGetMetafield() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + + case "metafields": + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } + + default: + break + } + } + return response + } + } +} diff --git a/Buy/Generated/Storefront/CompanyContact.swift b/Buy/Generated/Storefront/CompanyContact.swift new file mode 100644 index 00000000..ac91f0ba --- /dev/null +++ b/Buy/Generated/Storefront/CompanyContact.swift @@ -0,0 +1,171 @@ +// +// CompanyContact.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 company's main point of contact. + open class CompanyContactQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = CompanyContact + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company + /// contact was created in Shopify. + @discardableResult + open func createdAt(alias: String? = nil) -> CompanyContactQuery { + addField(field: "createdAt", aliasSuffix: alias) + return self + } + + /// A globally-unique ID. + @discardableResult + open func id(alias: String? = nil) -> CompanyContactQuery { + addField(field: "id", aliasSuffix: alias) + return self + } + + /// The company contact's locale (language). + @discardableResult + open func locale(alias: String? = nil) -> CompanyContactQuery { + addField(field: "locale", aliasSuffix: alias) + return self + } + + /// The company contact's job title. + @discardableResult + open func title(alias: String? = nil) -> CompanyContactQuery { + addField(field: "title", aliasSuffix: alias) + return self + } + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company + /// contact was last modified. + @discardableResult + open func updatedAt(alias: String? = nil) -> CompanyContactQuery { + addField(field: "updatedAt", aliasSuffix: alias) + return self + } + } + + /// A company's main point of contact. + open class CompanyContact: GraphQL.AbstractResponse, GraphQLObject, Node { + public typealias Query = CompanyContactQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "createdAt": + guard let value = value as? String else { + throw SchemaViolationError(type: CompanyContact.self, field: fieldName, value: fieldValue) + } + return GraphQL.iso8601DateParser.date(from: value)! + + case "id": + guard let value = value as? String else { + throw SchemaViolationError(type: CompanyContact.self, field: fieldName, value: fieldValue) + } + return GraphQL.ID(rawValue: value) + + case "locale": + if value is NSNull { return nil } + guard let value = value as? String else { + throw SchemaViolationError(type: CompanyContact.self, field: fieldName, value: fieldValue) + } + return value + + case "title": + if value is NSNull { return nil } + guard let value = value as? String else { + throw SchemaViolationError(type: CompanyContact.self, field: fieldName, value: fieldValue) + } + return value + + case "updatedAt": + guard let value = value as? String else { + throw SchemaViolationError(type: CompanyContact.self, field: fieldName, value: fieldValue) + } + return GraphQL.iso8601DateParser.date(from: value)! + + default: + throw SchemaViolationError(type: CompanyContact.self, field: fieldName, value: fieldValue) + } + } + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company + /// contact was created in Shopify. + open var createdAt: Date { + return internalGetCreatedAt() + } + + func internalGetCreatedAt(alias: String? = nil) -> Date { + return field(field: "createdAt", aliasSuffix: alias) as! Date + } + + /// A globally-unique ID. + open var id: GraphQL.ID { + return internalGetId() + } + + func internalGetId(alias: String? = nil) -> GraphQL.ID { + return field(field: "id", aliasSuffix: alias) as! GraphQL.ID + } + + /// The company contact's locale (language). + open var locale: String? { + return internalGetLocale() + } + + func internalGetLocale(alias: String? = nil) -> String? { + return field(field: "locale", aliasSuffix: alias) as! String? + } + + /// The company contact's job title. + open var title: String? { + return internalGetTitle() + } + + func internalGetTitle(alias: String? = nil) -> String? { + return field(field: "title", aliasSuffix: alias) as! String? + } + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company + /// contact was last modified. + open var updatedAt: Date { + return internalGetUpdatedAt() + } + + func internalGetUpdatedAt(alias: String? = nil) -> Date { + return field(field: "updatedAt", aliasSuffix: alias) as! Date + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + return [] + } + } +} diff --git a/Buy/Generated/Storefront/CompanyLocation.swift b/Buy/Generated/Storefront/CompanyLocation.swift new file mode 100644 index 00000000..d1fa9ae9 --- /dev/null +++ b/Buy/Generated/Storefront/CompanyLocation.swift @@ -0,0 +1,306 @@ +// +// CompanyLocation.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 company's location. + open class CompanyLocationQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = CompanyLocation + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company + /// location was created in Shopify. + @discardableResult + open func createdAt(alias: String? = nil) -> CompanyLocationQuery { + addField(field: "createdAt", aliasSuffix: alias) + return self + } + + /// A unique externally-supplied ID for the company. + @discardableResult + open func externalId(alias: String? = nil) -> CompanyLocationQuery { + addField(field: "externalId", aliasSuffix: alias) + return self + } + + /// A globally-unique ID. + @discardableResult + open func id(alias: String? = nil) -> CompanyLocationQuery { + addField(field: "id", aliasSuffix: alias) + return self + } + + /// The preferred locale of the company location. + @discardableResult + open func locale(alias: String? = nil) -> CompanyLocationQuery { + addField(field: "locale", aliasSuffix: alias) + return self + } + + /// Returns a metafield found by namespace and key. + /// + /// - parameters: + /// - namespace: The container the metafield belongs to. If omitted, the app-reserved namespace will be used. + /// - key: The identifier for the metafield. + /// + @discardableResult + open func metafield(alias: String? = nil, namespace: String? = nil, key: String, _ subfields: (MetafieldQuery) -> Void) -> CompanyLocationQuery { + var args: [String] = [] + + args.append("key:\(GraphQL.quoteString(input: key))") + + if let namespace = namespace { + args.append("namespace:\(GraphQL.quoteString(input: namespace))") + } + + let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + + let subquery = MetafieldQuery() + subfields(subquery) + + addField(field: "metafield", aliasSuffix: alias, args: argsString, subfields: subquery) + return self + } + + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + /// + /// - parameters: + /// - identifiers: The list of metafields to retrieve by namespace and key. + /// + /// The input must not contain more than `250` values. + /// + @discardableResult + open func metafields(alias: String? = nil, identifiers: [HasMetafieldsIdentifier], _ subfields: (MetafieldQuery) -> Void) -> CompanyLocationQuery { + var args: [String] = [] + + args.append("identifiers:[\(identifiers.map{ "\($0.serialize())" }.joined(separator: ","))]") + + let argsString = "(\(args.joined(separator: ",")))" + + let subquery = MetafieldQuery() + subfields(subquery) + + addField(field: "metafields", aliasSuffix: alias, args: argsString, subfields: subquery) + return self + } + + /// The name of the company location. + @discardableResult + open func name(alias: String? = nil) -> CompanyLocationQuery { + addField(field: "name", aliasSuffix: alias) + return self + } + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company + /// location was last modified. + @discardableResult + open func updatedAt(alias: String? = nil) -> CompanyLocationQuery { + addField(field: "updatedAt", aliasSuffix: alias) + return self + } + } + + /// A company's location. + open class CompanyLocation: GraphQL.AbstractResponse, GraphQLObject, HasMetafields, MetafieldParentResource, Node { + public typealias Query = CompanyLocationQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "createdAt": + guard let value = value as? String else { + throw SchemaViolationError(type: CompanyLocation.self, field: fieldName, value: fieldValue) + } + return GraphQL.iso8601DateParser.date(from: value)! + + case "externalId": + if value is NSNull { return nil } + guard let value = value as? String else { + throw SchemaViolationError(type: CompanyLocation.self, field: fieldName, value: fieldValue) + } + return value + + case "id": + guard let value = value as? String else { + throw SchemaViolationError(type: CompanyLocation.self, field: fieldName, value: fieldValue) + } + return GraphQL.ID(rawValue: value) + + case "locale": + if value is NSNull { return nil } + guard let value = value as? String else { + throw SchemaViolationError(type: CompanyLocation.self, field: fieldName, value: fieldValue) + } + return value + + case "metafield": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CompanyLocation.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) + + case "metafields": + guard let value = value as? [Any] else { + throw SchemaViolationError(type: CompanyLocation.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: CompanyLocation.self, field: fieldName, value: fieldValue) + } + return try Metafield(fields: value) } as [Any?] + + case "name": + guard let value = value as? String else { + throw SchemaViolationError(type: CompanyLocation.self, field: fieldName, value: fieldValue) + } + return value + + case "updatedAt": + guard let value = value as? String else { + throw SchemaViolationError(type: CompanyLocation.self, field: fieldName, value: fieldValue) + } + return GraphQL.iso8601DateParser.date(from: value)! + + default: + throw SchemaViolationError(type: CompanyLocation.self, field: fieldName, value: fieldValue) + } + } + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company + /// location was created in Shopify. + open var createdAt: Date { + return internalGetCreatedAt() + } + + func internalGetCreatedAt(alias: String? = nil) -> Date { + return field(field: "createdAt", aliasSuffix: alias) as! Date + } + + /// A unique externally-supplied ID for the company. + open var externalId: String? { + return internalGetExternalId() + } + + func internalGetExternalId(alias: String? = nil) -> String? { + return field(field: "externalId", aliasSuffix: alias) as! String? + } + + /// A globally-unique ID. + open var id: GraphQL.ID { + return internalGetId() + } + + func internalGetId(alias: String? = nil) -> GraphQL.ID { + return field(field: "id", aliasSuffix: alias) as! GraphQL.ID + } + + /// The preferred locale of the company location. + open var locale: String? { + return internalGetLocale() + } + + func internalGetLocale(alias: String? = nil) -> String? { + return field(field: "locale", aliasSuffix: alias) as! String? + } + + /// Returns a metafield found by namespace and key. + open var metafield: Storefront.Metafield? { + return internalGetMetafield() + } + + open func aliasedMetafield(alias: String) -> Storefront.Metafield? { + return internalGetMetafield(alias: alias) + } + + func internalGetMetafield(alias: String? = nil) -> Storefront.Metafield? { + return field(field: "metafield", aliasSuffix: alias) as! Storefront.Metafield? + } + + /// The metafields associated with the resource matching the supplied list of + /// namespaces and keys. + open var metafields: [Storefront.Metafield?] { + return internalGetMetafields() + } + + open func aliasedMetafields(alias: String) -> [Storefront.Metafield?] { + return internalGetMetafields(alias: alias) + } + + func internalGetMetafields(alias: String? = nil) -> [Storefront.Metafield?] { + return field(field: "metafields", aliasSuffix: alias) as! [Storefront.Metafield?] + } + + /// The name of the company location. + open var name: String { + return internalGetName() + } + + func internalGetName(alias: String? = nil) -> String { + return field(field: "name", aliasSuffix: alias) as! String + } + + /// The date and time ([ISO 8601 + /// format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company + /// location was last modified. + open var updatedAt: Date { + return internalGetUpdatedAt() + } + + func internalGetUpdatedAt(alias: String? = nil) -> Date { + return field(field: "updatedAt", aliasSuffix: alias) as! Date + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "metafield": + if let value = internalGetMetafield() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + + case "metafields": + internalGetMetafields().forEach { + if let value = $0 { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + } + + default: + break + } + } + return response + } + } +} diff --git a/Buy/Generated/Storefront/Customer.swift b/Buy/Generated/Storefront/Customer.swift index 161f738f..e7b05bb1 100644 --- a/Buy/Generated/Storefront/Customer.swift +++ b/Buy/Generated/Storefront/Customer.swift @@ -129,6 +129,7 @@ extension Storefront { } /// The customer's most recently updated, incomplete checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func lastIncompleteCheckout(alias: String? = nil, _ subfields: (CheckoutQuery) -> Void) -> CustomerQuery { let subquery = CheckoutQuery() @@ -485,6 +486,7 @@ extension Storefront { } /// The customer's most recently updated, incomplete checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var lastIncompleteCheckout: Storefront.Checkout? { return internalGetLastIncompleteCheckout() } diff --git a/Buy/Generated/Storefront/DeliveryAddressInput.swift b/Buy/Generated/Storefront/DeliveryAddressInput.swift index 51ababca..53220205 100644 --- a/Buy/Generated/Storefront/DeliveryAddressInput.swift +++ b/Buy/Generated/Storefront/DeliveryAddressInput.swift @@ -32,6 +32,9 @@ extension Storefront { /// A delivery address preference of a buyer that is interacting with the cart. open var deliveryAddress: Input + /// Defines what kind of address validation is requested. + open var deliveryAddressValidationStrategy: Input + /// The ID of a customer address that is associated with the buyer that is /// interacting with the cart. open var customerAddressId: Input @@ -40,14 +43,16 @@ extension Storefront { /// /// - parameters: /// - deliveryAddress: A delivery address preference of a buyer that is interacting with the cart. + /// - deliveryAddressValidationStrategy: Defines what kind of address validation is requested. /// - customerAddressId: The ID of a customer address that is associated with the buyer that is interacting with the cart. /// - public static func create(deliveryAddress: Input = .undefined, customerAddressId: Input = .undefined) -> DeliveryAddressInput { - return DeliveryAddressInput(deliveryAddress: deliveryAddress, customerAddressId: customerAddressId) + public static func create(deliveryAddress: Input = .undefined, deliveryAddressValidationStrategy: Input = .undefined, customerAddressId: Input = .undefined) -> DeliveryAddressInput { + return DeliveryAddressInput(deliveryAddress: deliveryAddress, deliveryAddressValidationStrategy: deliveryAddressValidationStrategy, customerAddressId: customerAddressId) } - private init(deliveryAddress: Input = .undefined, customerAddressId: Input = .undefined) { + private init(deliveryAddress: Input = .undefined, deliveryAddressValidationStrategy: Input = .undefined, customerAddressId: Input = .undefined) { self.deliveryAddress = deliveryAddress + self.deliveryAddressValidationStrategy = deliveryAddressValidationStrategy self.customerAddressId = customerAddressId } @@ -55,11 +60,12 @@ extension Storefront { /// /// - parameters: /// - deliveryAddress: A delivery address preference of a buyer that is interacting with the cart. + /// - deliveryAddressValidationStrategy: Defines what kind of address validation is requested. /// - customerAddressId: The ID of a customer address that is associated with the buyer that is interacting with the cart. /// @available(*, deprecated, message: "Use the static create() method instead.") - public convenience init(deliveryAddress: MailingAddressInput? = nil, customerAddressId: GraphQL.ID? = nil) { - self.init(deliveryAddress: deliveryAddress.orUndefined, customerAddressId: customerAddressId.orUndefined) + public convenience init(deliveryAddress: MailingAddressInput? = nil, deliveryAddressValidationStrategy: DeliveryAddressValidationStrategy? = nil, customerAddressId: GraphQL.ID? = nil) { + self.init(deliveryAddress: deliveryAddress.orUndefined, deliveryAddressValidationStrategy: deliveryAddressValidationStrategy.orUndefined, customerAddressId: customerAddressId.orUndefined) } internal func serialize() -> String { @@ -75,6 +81,16 @@ extension Storefront { case .undefined: break } + switch deliveryAddressValidationStrategy { + case .value(let deliveryAddressValidationStrategy): + guard let deliveryAddressValidationStrategy = deliveryAddressValidationStrategy else { + fields.append("deliveryAddressValidationStrategy:null") + break + } + fields.append("deliveryAddressValidationStrategy:\(deliveryAddressValidationStrategy.rawValue)") + case .undefined: break + } + switch customerAddressId { case .value(let customerAddressId): guard let customerAddressId = customerAddressId else { diff --git a/Buy/Generated/Storefront/DeliveryAddressValidationStrategy.swift b/Buy/Generated/Storefront/DeliveryAddressValidationStrategy.swift new file mode 100644 index 00000000..de9d7f59 --- /dev/null +++ b/Buy/Generated/Storefront/DeliveryAddressValidationStrategy.swift @@ -0,0 +1,43 @@ +// +// DeliveryAddressValidationStrategy.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 { + /// Defines the types of available validation strategies for delivery + /// addresses. + public enum DeliveryAddressValidationStrategy: String { + /// Only the country code is validated. + case countryCodeOnly = "COUNTRY_CODE_ONLY" + + /// Strict validation is performed, i.e. all fields in the address are + /// validated according to Shopify's checkout rules. If the address fails + /// validation, the cart will not be updated. + case strict = "STRICT" + + case unknownValue = "" + } +} diff --git a/Buy/Generated/Storefront/Filter.swift b/Buy/Generated/Storefront/Filter.swift index 8e8029ef..fa1f18ef 100644 --- a/Buy/Generated/Storefront/Filter.swift +++ b/Buy/Generated/Storefront/Filter.swift @@ -45,6 +45,14 @@ extension Storefront { return self } + /// Describes how to present the filter values. Returns a value only for + /// filters of type `LIST`. Returns null for other types. + @discardableResult + open func presentation(alias: String? = nil) -> FilterQuery { + addField(field: "presentation", aliasSuffix: alias) + return self + } + /// An enumeration that denotes the type of data this filter represents. @discardableResult open func type(alias: String? = nil) -> FilterQuery { @@ -82,6 +90,13 @@ extension Storefront { } return value + case "presentation": + if value is NSNull { return nil } + guard let value = value as? String else { + throw SchemaViolationError(type: Filter.self, field: fieldName, value: fieldValue) + } + return FilterPresentation(rawValue: value) ?? .unknownValue + case "type": guard let value = value as? String else { throw SchemaViolationError(type: Filter.self, field: fieldName, value: fieldValue) @@ -117,6 +132,16 @@ extension Storefront { return field(field: "label", aliasSuffix: alias) as! String } + /// Describes how to present the filter values. Returns a value only for + /// filters of type `LIST`. Returns null for other types. + open var presentation: Storefront.FilterPresentation? { + return internalGetPresentation() + } + + func internalGetPresentation(alias: String? = nil) -> Storefront.FilterPresentation? { + return field(field: "presentation", aliasSuffix: alias) as! Storefront.FilterPresentation? + } + /// An enumeration that denotes the type of data this filter represents. open var type: Storefront.FilterType { return internalGetType() diff --git a/Buy/Generated/Storefront/FilterPresentation.swift b/Buy/Generated/Storefront/FilterPresentation.swift new file mode 100644 index 00000000..baba65aa --- /dev/null +++ b/Buy/Generated/Storefront/FilterPresentation.swift @@ -0,0 +1,44 @@ +// +// FilterPresentation.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 { + /// Defines how to present the filter values, specifies the presentation of the + /// filter. + public enum FilterPresentation: String { + /// Image presentation, filter values display an image. + case image = "IMAGE" + + /// Swatch presentation, filter values display color or image patterns. + case swatch = "SWATCH" + + /// Text presentation, no additional visual display for filter values. + case text = "TEXT" + + case unknownValue = "" + } +} diff --git a/Buy/Generated/Storefront/FilterValue.swift b/Buy/Generated/Storefront/FilterValue.swift index e09c064c..3c0961e8 100644 --- a/Buy/Generated/Storefront/FilterValue.swift +++ b/Buy/Generated/Storefront/FilterValue.swift @@ -45,6 +45,16 @@ extension Storefront { return self } + /// The visual representation when the filter's presentation is `IMAGE`. + @discardableResult + open func image(alias: String? = nil, _ subfields: (MediaImageQuery) -> Void) -> FilterValueQuery { + let subquery = MediaImageQuery() + subfields(subquery) + + addField(field: "image", aliasSuffix: alias, subfields: subquery) + return self + } + /// An input object that can be used to filter by this value on the parent /// field. The value is provided as a helper for building dynamic filtering UI. /// For example, if you have a list of selected `FilterValue` objects, you can @@ -61,6 +71,16 @@ extension Storefront { addField(field: "label", aliasSuffix: alias) return self } + + /// The visual representation when the filter's presentation is `SWATCH`. + @discardableResult + open func swatch(alias: String? = nil, _ subfields: (SwatchQuery) -> Void) -> FilterValueQuery { + let subquery = SwatchQuery() + subfields(subquery) + + addField(field: "swatch", aliasSuffix: alias, subfields: subquery) + return self + } } /// A selectable value within a filter. @@ -82,6 +102,13 @@ extension Storefront { } return value + case "image": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: FilterValue.self, field: fieldName, value: fieldValue) + } + return try MediaImage(fields: value) + case "input": guard let value = value as? String else { throw SchemaViolationError(type: FilterValue.self, field: fieldName, value: fieldValue) @@ -94,6 +121,13 @@ extension Storefront { } return value + case "swatch": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: FilterValue.self, field: fieldName, value: fieldValue) + } + return try Swatch(fields: value) + default: throw SchemaViolationError(type: FilterValue.self, field: fieldName, value: fieldValue) } @@ -117,6 +151,15 @@ extension Storefront { return field(field: "id", aliasSuffix: alias) as! String } + /// The visual representation when the filter's presentation is `IMAGE`. + open var image: Storefront.MediaImage? { + return internalGetImage() + } + + func internalGetImage(alias: String? = nil) -> Storefront.MediaImage? { + return field(field: "image", aliasSuffix: alias) as! Storefront.MediaImage? + } + /// An input object that can be used to filter by this value on the parent /// field. The value is provided as a helper for building dynamic filtering UI. /// For example, if you have a list of selected `FilterValue` objects, you can @@ -138,8 +181,36 @@ extension Storefront { return field(field: "label", aliasSuffix: alias) as! String } + /// The visual representation when the filter's presentation is `SWATCH`. + open var swatch: Storefront.Swatch? { + return internalGetSwatch() + } + + func internalGetSwatch(alias: String? = nil) -> Storefront.Swatch? { + return field(field: "swatch", aliasSuffix: alias) as! Storefront.Swatch? + } + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { - return [] + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "image": + if let value = internalGetImage() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + + case "swatch": + if let value = internalGetSwatch() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + + default: + break + } + } + return response } } } diff --git a/Buy/Generated/Storefront/HasMetafields.swift b/Buy/Generated/Storefront/HasMetafields.swift index ca30e5d0..3fe4875c 100644 --- a/Buy/Generated/Storefront/HasMetafields.swift +++ b/Buy/Generated/Storefront/HasMetafields.swift @@ -133,6 +133,26 @@ extension Storefront { return self } + /// Represents information about the metafields associated to the specified + /// resource. + @discardableResult + open func onCompany(subfields: (CompanyQuery) -> Void) -> HasMetafieldsQuery { + let subquery = CompanyQuery() + subfields(subquery) + addInlineFragment(on: "Company", subfields: subquery) + return self + } + + /// Represents information about the metafields associated to the specified + /// resource. + @discardableResult + open func onCompanyLocation(subfields: (CompanyLocationQuery) -> Void) -> HasMetafieldsQuery { + let subquery = CompanyLocationQuery() + subfields(subquery) + addInlineFragment(on: "CompanyLocation", subfields: subquery) + return self + } + /// Represents information about the metafields associated to the specified /// resource. @discardableResult @@ -257,6 +277,10 @@ extension Storefront { case "Collection": return try Collection.init(fields: fields) + case "Company": return try Company.init(fields: fields) + + case "CompanyLocation": return try CompanyLocation.init(fields: fields) + case "Customer": return try Customer.init(fields: fields) case "Location": return try Location.init(fields: fields) diff --git a/Buy/Generated/Storefront/InContext.swift b/Buy/Generated/Storefront/InContext.swift index 812ccbb9..37c9649c 100644 --- a/Buy/Generated/Storefront/InContext.swift +++ b/Buy/Generated/Storefront/InContext.swift @@ -38,8 +38,9 @@ extension Storefront { /// - country: The country code for context. For example, `CA`. /// - language: The language code for context. For example, `EN`. /// - preferredLocationId: The identifier of the customer's preferred location. + /// - buyer: The buyer's identity. /// - public init(country: CountryCode? = nil, language: LanguageCode? = nil, preferredLocationId: GraphQL.ID? = nil) { + public init(country: CountryCode? = nil, language: LanguageCode? = nil, preferredLocationId: GraphQL.ID? = nil, buyer: BuyerInput? = nil) { var args: [String] = [] if let country = country { @@ -54,6 +55,10 @@ extension Storefront { args.append("preferredLocationId:\(GraphQL.quoteString(input: "\(preferredLocationId.rawValue)"))") } + if let buyer = buyer { + args.append("buyer:\(buyer.serialize())") + } + let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" super.init(name: "inContext", args: argsString) diff --git a/Buy/Generated/Storefront/MetafieldParentResource.swift b/Buy/Generated/Storefront/MetafieldParentResource.swift index effa2990..43e52e43 100644 --- a/Buy/Generated/Storefront/MetafieldParentResource.swift +++ b/Buy/Generated/Storefront/MetafieldParentResource.swift @@ -76,6 +76,24 @@ extension Storefront { return self } + /// A resource that the metafield belongs to. + @discardableResult + open func onCompany(subfields: (CompanyQuery) -> Void) -> MetafieldParentResourceQuery { + let subquery = CompanyQuery() + subfields(subquery) + addInlineFragment(on: "Company", subfields: subquery) + return self + } + + /// A resource that the metafield belongs to. + @discardableResult + open func onCompanyLocation(subfields: (CompanyLocationQuery) -> Void) -> MetafieldParentResourceQuery { + let subquery = CompanyLocationQuery() + subfields(subquery) + addInlineFragment(on: "CompanyLocation", subfields: subquery) + return self + } + /// A resource that the metafield belongs to. @discardableResult open func onCustomer(subfields: (CustomerQuery) -> Void) -> MetafieldParentResourceQuery { @@ -174,6 +192,10 @@ extension Storefront { case "Collection": return try Collection.init(fields: fields) + case "Company": return try Company.init(fields: fields) + + case "CompanyLocation": return try CompanyLocation.init(fields: fields) + case "Customer": return try Customer.init(fields: fields) case "Location": return try Location.init(fields: fields) diff --git a/Buy/Generated/Storefront/MetafieldReference.swift b/Buy/Generated/Storefront/MetafieldReference.swift index fd935a52..0f79a9fe 100644 --- a/Buy/Generated/Storefront/MetafieldReference.swift +++ b/Buy/Generated/Storefront/MetafieldReference.swift @@ -76,6 +76,15 @@ extension Storefront { return self } + /// Returns the resource which is being referred to by a metafield. + @discardableResult + open func onModel3d(subfields: (Model3dQuery) -> Void) -> MetafieldReferenceQuery { + let subquery = Model3dQuery() + subfields(subquery) + addInlineFragment(on: "Model3d", subfields: subquery) + return self + } + /// Returns the resource which is being referred to by a metafield. @discardableResult open func onPage(subfields: (PageQuery) -> Void) -> MetafieldReferenceQuery { @@ -138,6 +147,8 @@ extension Storefront { case "Metaobject": return try Metaobject.init(fields: fields) + case "Model3d": return try Model3d.init(fields: fields) + case "Page": return try Page.init(fields: fields) case "Product": return try Product.init(fields: fields) diff --git a/Buy/Generated/Storefront/Model3d.swift b/Buy/Generated/Storefront/Model3d.swift index d39bc185..abd7c1da 100644 --- a/Buy/Generated/Storefront/Model3d.swift +++ b/Buy/Generated/Storefront/Model3d.swift @@ -84,7 +84,7 @@ extension Storefront { } /// Represents a Shopify hosted 3D model. - open class Model3d: GraphQL.AbstractResponse, GraphQLObject, Media, Node { + open class Model3d: GraphQL.AbstractResponse, GraphQLObject, Media, MetafieldReference, Node { public typealias Query = Model3dQuery 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 dc9aadf2..a4bf3c11 100644 --- a/Buy/Generated/Storefront/Mutation.swift +++ b/Buy/Generated/Storefront/Mutation.swift @@ -264,16 +264,14 @@ extension Storefront { /// - note: The note on the cart. /// @discardableResult - open func cartNoteUpdate(alias: String? = nil, cartId: GraphQL.ID, note: String? = nil, _ subfields: (CartNoteUpdatePayloadQuery) -> Void) -> MutationQuery { + open func cartNoteUpdate(alias: String? = nil, cartId: GraphQL.ID, note: String, _ subfields: (CartNoteUpdatePayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] args.append("cartId:\(GraphQL.quoteString(input: "\(cartId.rawValue)"))") - if let note = note { - args.append("note:\(GraphQL.quoteString(input: note))") - } + args.append("note:\(GraphQL.quoteString(input: note))") - let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + let argsString = "(\(args.joined(separator: ",")))" let subquery = CartNoteUpdatePayloadQuery() subfields(subquery) @@ -360,6 +358,7 @@ extension Storefront { /// - checkoutId: The ID of the checkout. /// - input: The checkout attributes to update. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutAttributesUpdateV2(alias: String? = nil, checkoutId: GraphQL.ID, input: CheckoutAttributesUpdateV2Input, _ subfields: (CheckoutAttributesUpdateV2PayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -384,6 +383,7 @@ extension Storefront { /// - parameters: /// - checkoutId: The ID of the checkout. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutCompleteFree(alias: String? = nil, checkoutId: GraphQL.ID, _ subfields: (CheckoutCompleteFreePayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -408,6 +408,7 @@ extension Storefront { /// - checkoutId: The ID of the checkout. /// - payment: The credit card info to apply as a payment. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutCompleteWithCreditCardV2(alias: String? = nil, checkoutId: GraphQL.ID, payment: CreditCardPaymentInputV2, _ subfields: (CheckoutCompleteWithCreditCardV2PayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -431,6 +432,7 @@ extension Storefront { /// - checkoutId: The ID of the checkout. /// - payment: The info to apply as a tokenized payment. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutCompleteWithTokenizedPaymentV3(alias: String? = nil, checkoutId: GraphQL.ID, payment: TokenizedPaymentInputV3, _ subfields: (CheckoutCompleteWithTokenizedPaymentV3PayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -454,6 +456,7 @@ extension Storefront { /// - input: The fields used to create a checkout. /// - queueToken: The checkout queue token. Available only to selected stores. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutCreate(alias: String? = nil, input: CheckoutCreateInput, queueToken: String? = nil, _ subfields: (CheckoutCreatePayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -479,6 +482,7 @@ extension Storefront { /// - checkoutId: The ID of the checkout. /// - customerAccessToken: The customer access token of the customer to associate. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutCustomerAssociateV2(alias: String? = nil, checkoutId: GraphQL.ID, customerAccessToken: String, _ subfields: (CheckoutCustomerAssociateV2PayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -501,6 +505,7 @@ extension Storefront { /// - parameters: /// - checkoutId: The ID of the checkout. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutCustomerDisassociateV2(alias: String? = nil, checkoutId: GraphQL.ID, _ subfields: (CheckoutCustomerDisassociateV2PayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -522,6 +527,7 @@ extension Storefront { /// - discountCode: The discount code to apply to the checkout. /// - checkoutId: The ID of the checkout. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutDiscountCodeApplyV2(alias: String? = nil, discountCode: String, checkoutId: GraphQL.ID, _ subfields: (CheckoutDiscountCodeApplyV2PayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -544,6 +550,7 @@ extension Storefront { /// - parameters: /// - checkoutId: The ID of the checkout. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutDiscountCodeRemove(alias: String? = nil, checkoutId: GraphQL.ID, _ subfields: (CheckoutDiscountCodeRemovePayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -565,6 +572,7 @@ extension Storefront { /// - checkoutId: The ID of the checkout. /// - email: The email to update the checkout with. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutEmailUpdateV2(alias: String? = nil, checkoutId: GraphQL.ID, email: String, _ subfields: (CheckoutEmailUpdateV2PayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -588,6 +596,7 @@ extension Storefront { /// - appliedGiftCardId: The ID of the Applied Gift Card to remove from the Checkout. /// - checkoutId: The ID of the checkout. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutGiftCardRemoveV2(alias: String? = nil, appliedGiftCardId: GraphQL.ID, checkoutId: GraphQL.ID, _ subfields: (CheckoutGiftCardRemoveV2PayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -613,6 +622,7 @@ extension Storefront { /// The input must not contain more than `250` values. /// - checkoutId: The ID of the checkout. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutGiftCardsAppend(alias: String? = nil, giftCardCodes: [String], checkoutId: GraphQL.ID, _ subfields: (CheckoutGiftCardsAppendPayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -638,6 +648,7 @@ extension Storefront { /// The input must not contain more than `250` values. /// - checkoutId: The ID of the checkout. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutLineItemsAdd(alias: String? = nil, lineItems: [CheckoutLineItemInput], checkoutId: GraphQL.ID, _ subfields: (CheckoutLineItemsAddPayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -663,6 +674,7 @@ extension Storefront { /// /// The input must not contain more than `250` values. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutLineItemsRemove(alias: String? = nil, checkoutId: GraphQL.ID, lineItemIds: [GraphQL.ID], _ subfields: (CheckoutLineItemsRemovePayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -688,6 +700,7 @@ extension Storefront { /// The input must not contain more than `250` values. /// - checkoutId: The ID of the checkout. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutLineItemsReplace(alias: String? = nil, lineItems: [CheckoutLineItemInput], checkoutId: GraphQL.ID, _ subfields: (CheckoutLineItemsReplacePayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -713,6 +726,7 @@ extension Storefront { /// /// The input must not contain more than `250` values. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutLineItemsUpdate(alias: String? = nil, checkoutId: GraphQL.ID, lineItems: [CheckoutLineItemUpdateInput], _ subfields: (CheckoutLineItemsUpdatePayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -736,6 +750,7 @@ extension Storefront { /// - shippingAddress: The shipping address to where the line items will be shipped. /// - checkoutId: The ID of the checkout. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutShippingAddressUpdateV2(alias: String? = nil, shippingAddress: MailingAddressInput, checkoutId: GraphQL.ID, _ subfields: (CheckoutShippingAddressUpdateV2PayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -759,6 +774,7 @@ extension Storefront { /// - checkoutId: The ID of the checkout. /// - shippingRateHandle: A unique identifier to a Checkout’s shipping provider, price, and title combination, enabling the customer to select the availableShippingRates. /// + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") @discardableResult open func checkoutShippingLineUpdate(alias: String? = nil, checkoutId: GraphQL.ID, shippingRateHandle: String, _ subfields: (CheckoutShippingLineUpdatePayloadQuery) -> Void) -> MutationQuery { var args: [String] = [] @@ -1642,10 +1658,13 @@ extension Storefront { } /// Updates the attributes of a checkout if `allowPartialAddresses` is `true`. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutAttributesUpdateV2: Storefront.CheckoutAttributesUpdateV2Payload? { return internalGetCheckoutAttributesUpdateV2() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutAttributesUpdateV2(alias: String) -> Storefront.CheckoutAttributesUpdateV2Payload? { return internalGetCheckoutAttributesUpdateV2(alias: alias) } @@ -1657,10 +1676,13 @@ extension Storefront { /// Completes a checkout without providing payment information. You can use /// this mutation for free items or items whose purchase price is covered by a /// gift card. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutCompleteFree: Storefront.CheckoutCompleteFreePayload? { return internalGetCheckoutCompleteFree() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutCompleteFree(alias: String) -> Storefront.CheckoutCompleteFreePayload? { return internalGetCheckoutCompleteFree(alias: alias) } @@ -1673,10 +1695,13 @@ extension Storefront { /// Before you can complete checkouts using CheckoutCompleteWithCreditCardV2, /// you need to [_request payment /// processing_](https://shopify.dev/apps/channels/getting-started#request-payment-processing). + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutCompleteWithCreditCardV2: Storefront.CheckoutCompleteWithCreditCardV2Payload? { return internalGetCheckoutCompleteWithCreditCardV2() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutCompleteWithCreditCardV2(alias: String) -> Storefront.CheckoutCompleteWithCreditCardV2Payload? { return internalGetCheckoutCompleteWithCreditCardV2(alias: alias) } @@ -1686,10 +1711,13 @@ extension Storefront { } /// Completes a checkout with a tokenized payment. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutCompleteWithTokenizedPaymentV3: Storefront.CheckoutCompleteWithTokenizedPaymentV3Payload? { return internalGetCheckoutCompleteWithTokenizedPaymentV3() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutCompleteWithTokenizedPaymentV3(alias: String) -> Storefront.CheckoutCompleteWithTokenizedPaymentV3Payload? { return internalGetCheckoutCompleteWithTokenizedPaymentV3(alias: alias) } @@ -1699,10 +1727,13 @@ extension Storefront { } /// Creates a new checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutCreate: Storefront.CheckoutCreatePayload? { return internalGetCheckoutCreate() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutCreate(alias: String) -> Storefront.CheckoutCreatePayload? { return internalGetCheckoutCreate(alias: alias) } @@ -1712,10 +1743,13 @@ extension Storefront { } /// Associates a customer to the checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutCustomerAssociateV2: Storefront.CheckoutCustomerAssociateV2Payload? { return internalGetCheckoutCustomerAssociateV2() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutCustomerAssociateV2(alias: String) -> Storefront.CheckoutCustomerAssociateV2Payload? { return internalGetCheckoutCustomerAssociateV2(alias: alias) } @@ -1725,10 +1759,13 @@ extension Storefront { } /// Disassociates the current checkout customer from the checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutCustomerDisassociateV2: Storefront.CheckoutCustomerDisassociateV2Payload? { return internalGetCheckoutCustomerDisassociateV2() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutCustomerDisassociateV2(alias: String) -> Storefront.CheckoutCustomerDisassociateV2Payload? { return internalGetCheckoutCustomerDisassociateV2(alias: alias) } @@ -1738,10 +1775,13 @@ extension Storefront { } /// Applies a discount to an existing checkout using a discount code. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutDiscountCodeApplyV2: Storefront.CheckoutDiscountCodeApplyV2Payload? { return internalGetCheckoutDiscountCodeApplyV2() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutDiscountCodeApplyV2(alias: String) -> Storefront.CheckoutDiscountCodeApplyV2Payload? { return internalGetCheckoutDiscountCodeApplyV2(alias: alias) } @@ -1751,10 +1791,13 @@ extension Storefront { } /// Removes the applied discounts from an existing checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutDiscountCodeRemove: Storefront.CheckoutDiscountCodeRemovePayload? { return internalGetCheckoutDiscountCodeRemove() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutDiscountCodeRemove(alias: String) -> Storefront.CheckoutDiscountCodeRemovePayload? { return internalGetCheckoutDiscountCodeRemove(alias: alias) } @@ -1764,10 +1807,13 @@ extension Storefront { } /// Updates the email on an existing checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutEmailUpdateV2: Storefront.CheckoutEmailUpdateV2Payload? { return internalGetCheckoutEmailUpdateV2() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutEmailUpdateV2(alias: String) -> Storefront.CheckoutEmailUpdateV2Payload? { return internalGetCheckoutEmailUpdateV2(alias: alias) } @@ -1777,10 +1823,13 @@ extension Storefront { } /// Removes an applied gift card from the checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutGiftCardRemoveV2: Storefront.CheckoutGiftCardRemoveV2Payload? { return internalGetCheckoutGiftCardRemoveV2() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutGiftCardRemoveV2(alias: String) -> Storefront.CheckoutGiftCardRemoveV2Payload? { return internalGetCheckoutGiftCardRemoveV2(alias: alias) } @@ -1790,10 +1839,13 @@ extension Storefront { } /// Appends gift cards to an existing checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutGiftCardsAppend: Storefront.CheckoutGiftCardsAppendPayload? { return internalGetCheckoutGiftCardsAppend() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutGiftCardsAppend(alias: String) -> Storefront.CheckoutGiftCardsAppendPayload? { return internalGetCheckoutGiftCardsAppend(alias: alias) } @@ -1803,10 +1855,13 @@ extension Storefront { } /// Adds a list of line items to a checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutLineItemsAdd: Storefront.CheckoutLineItemsAddPayload? { return internalGetCheckoutLineItemsAdd() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutLineItemsAdd(alias: String) -> Storefront.CheckoutLineItemsAddPayload? { return internalGetCheckoutLineItemsAdd(alias: alias) } @@ -1816,10 +1871,13 @@ extension Storefront { } /// Removes line items from an existing checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutLineItemsRemove: Storefront.CheckoutLineItemsRemovePayload? { return internalGetCheckoutLineItemsRemove() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutLineItemsRemove(alias: String) -> Storefront.CheckoutLineItemsRemovePayload? { return internalGetCheckoutLineItemsRemove(alias: alias) } @@ -1829,10 +1887,13 @@ extension Storefront { } /// Sets a list of line items to a checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutLineItemsReplace: Storefront.CheckoutLineItemsReplacePayload? { return internalGetCheckoutLineItemsReplace() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutLineItemsReplace(alias: String) -> Storefront.CheckoutLineItemsReplacePayload? { return internalGetCheckoutLineItemsReplace(alias: alias) } @@ -1842,10 +1903,13 @@ extension Storefront { } /// Updates line items on a checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutLineItemsUpdate: Storefront.CheckoutLineItemsUpdatePayload? { return internalGetCheckoutLineItemsUpdate() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutLineItemsUpdate(alias: String) -> Storefront.CheckoutLineItemsUpdatePayload? { return internalGetCheckoutLineItemsUpdate(alias: alias) } @@ -1855,10 +1919,13 @@ extension Storefront { } /// Updates the shipping address of an existing checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutShippingAddressUpdateV2: Storefront.CheckoutShippingAddressUpdateV2Payload? { return internalGetCheckoutShippingAddressUpdateV2() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutShippingAddressUpdateV2(alias: String) -> Storefront.CheckoutShippingAddressUpdateV2Payload? { return internalGetCheckoutShippingAddressUpdateV2(alias: alias) } @@ -1868,10 +1935,13 @@ extension Storefront { } /// Updates the shipping lines on an existing checkout. + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") open var checkoutShippingLineUpdate: Storefront.CheckoutShippingLineUpdatePayload? { return internalGetCheckoutShippingLineUpdate() } + @available(*, deprecated, message:"The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information.") + open func aliasedCheckoutShippingLineUpdate(alias: String) -> Storefront.CheckoutShippingLineUpdatePayload? { return internalGetCheckoutShippingLineUpdate(alias: alias) } diff --git a/Buy/Generated/Storefront/Node.swift b/Buy/Generated/Storefront/Node.swift index 0349d655..8b1262b6 100644 --- a/Buy/Generated/Storefront/Node.swift +++ b/Buy/Generated/Storefront/Node.swift @@ -195,6 +195,51 @@ 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 onCompany(subfields: (CompanyQuery) -> Void) -> NodeQuery { + let subquery = CompanyQuery() + subfields(subquery) + addInlineFragment(on: "Company", 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). + /// 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 onCompanyContact(subfields: (CompanyContactQuery) -> Void) -> NodeQuery { + let subquery = CompanyContactQuery() + subfields(subquery) + addInlineFragment(on: "CompanyContact", 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). + /// 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 onCompanyLocation(subfields: (CompanyLocationQuery) -> Void) -> NodeQuery { + let subquery = CompanyLocationQuery() + subfields(subquery) + addInlineFragment(on: "CompanyLocation", 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). @@ -588,6 +633,12 @@ extension Storefront { case "Comment": return try Comment.init(fields: fields) + case "Company": return try Company.init(fields: fields) + + case "CompanyContact": return try CompanyContact.init(fields: fields) + + case "CompanyLocation": return try CompanyLocation.init(fields: fields) + case "ComponentizableCartLine": return try ComponentizableCartLine.init(fields: fields) case "ExternalVideo": return try ExternalVideo.init(fields: fields) diff --git a/Buy/Generated/Storefront/ProductVariant.swift b/Buy/Generated/Storefront/ProductVariant.swift index 1c0f9bae..04431612 100644 --- a/Buy/Generated/Storefront/ProductVariant.swift +++ b/Buy/Generated/Storefront/ProductVariant.swift @@ -181,6 +181,53 @@ extension Storefront { return self } + /// A list of quantity breaks for the product variant. + /// + /// - 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. + /// + @discardableResult + open func quantityPriceBreaks(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, _ subfields: (QuantityPriceBreakConnectionQuery) -> Void) -> ProductVariantQuery { + 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))") + } + + let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + + let subquery = QuantityPriceBreakConnectionQuery() + subfields(subquery) + + addField(field: "quantityPriceBreaks", aliasSuffix: alias, args: argsString, subfields: subquery) + return self + } + + /// The quantity rule for the product variant in a given context. + @discardableResult + open func quantityRule(alias: String? = nil, _ subfields: (QuantityRuleQuery) -> Void) -> ProductVariantQuery { + let subquery = QuantityRuleQuery() + subfields(subquery) + + addField(field: "quantityRule", aliasSuffix: alias, subfields: subquery) + return self + } + /// Whether a customer needs to provide a shipping address when placing an /// order for the product variant. @discardableResult @@ -443,6 +490,18 @@ extension Storefront { } return Int32(value) + case "quantityPriceBreaks": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: ProductVariant.self, field: fieldName, value: fieldValue) + } + return try QuantityPriceBreakConnection(fields: value) + + case "quantityRule": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: ProductVariant.self, field: fieldName, value: fieldValue) + } + return try QuantityRule(fields: value) + case "requiresShipping": guard let value = value as? Bool else { throw SchemaViolationError(type: ProductVariant.self, field: fieldName, value: fieldValue) @@ -650,6 +709,28 @@ extension Storefront { return field(field: "quantityAvailable", aliasSuffix: alias) as! Int32? } + /// A list of quantity breaks for the product variant. + open var quantityPriceBreaks: Storefront.QuantityPriceBreakConnection { + return internalGetQuantityPriceBreaks() + } + + open func aliasedQuantityPriceBreaks(alias: String) -> Storefront.QuantityPriceBreakConnection { + return internalGetQuantityPriceBreaks(alias: alias) + } + + func internalGetQuantityPriceBreaks(alias: String? = nil) -> Storefront.QuantityPriceBreakConnection { + return field(field: "quantityPriceBreaks", aliasSuffix: alias) as! Storefront.QuantityPriceBreakConnection + } + + /// The quantity rule for the product variant in a given context. + open var quantityRule: Storefront.QuantityRule { + return internalGetQuantityRule() + } + + func internalGetQuantityRule(alias: String? = nil) -> Storefront.QuantityRule { + return field(field: "quantityRule", aliasSuffix: alias) as! Storefront.QuantityRule + } + /// Whether a customer needs to provide a shipping address when placing an /// order for the product variant. open var requiresShipping: Bool { @@ -809,6 +890,14 @@ extension Storefront { response.append(internalGetProduct()) response.append(contentsOf: internalGetProduct().childResponseObjectMap()) + case "quantityPriceBreaks": + response.append(internalGetQuantityPriceBreaks()) + response.append(contentsOf: internalGetQuantityPriceBreaks().childResponseObjectMap()) + + case "quantityRule": + response.append(internalGetQuantityRule()) + response.append(contentsOf: internalGetQuantityRule().childResponseObjectMap()) + case "selectedOptions": internalGetSelectedOptions().forEach { response.append($0) diff --git a/Buy/Generated/Storefront/PurchasingCompany.swift b/Buy/Generated/Storefront/PurchasingCompany.swift new file mode 100644 index 00000000..d709d756 --- /dev/null +++ b/Buy/Generated/Storefront/PurchasingCompany.swift @@ -0,0 +1,148 @@ +// +// PurchasingCompany.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 { + /// Represents information about the buyer that is interacting with the cart. + open class PurchasingCompanyQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = PurchasingCompany + + /// The company associated to the order or draft order. + @discardableResult + open func company(alias: String? = nil, _ subfields: (CompanyQuery) -> Void) -> PurchasingCompanyQuery { + let subquery = CompanyQuery() + subfields(subquery) + + addField(field: "company", aliasSuffix: alias, subfields: subquery) + return self + } + + /// The company contact associated to the order or draft order. + @discardableResult + open func contact(alias: String? = nil, _ subfields: (CompanyContactQuery) -> Void) -> PurchasingCompanyQuery { + let subquery = CompanyContactQuery() + subfields(subquery) + + addField(field: "contact", aliasSuffix: alias, subfields: subquery) + return self + } + + /// The company location associated to the order or draft order. + @discardableResult + open func location(alias: String? = nil, _ subfields: (CompanyLocationQuery) -> Void) -> PurchasingCompanyQuery { + let subquery = CompanyLocationQuery() + subfields(subquery) + + addField(field: "location", aliasSuffix: alias, subfields: subquery) + return self + } + } + + /// Represents information about the buyer that is interacting with the cart. + open class PurchasingCompany: GraphQL.AbstractResponse, GraphQLObject { + public typealias Query = PurchasingCompanyQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "company": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: PurchasingCompany.self, field: fieldName, value: fieldValue) + } + return try Company(fields: value) + + case "contact": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: PurchasingCompany.self, field: fieldName, value: fieldValue) + } + return try CompanyContact(fields: value) + + case "location": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: PurchasingCompany.self, field: fieldName, value: fieldValue) + } + return try CompanyLocation(fields: value) + + default: + throw SchemaViolationError(type: PurchasingCompany.self, field: fieldName, value: fieldValue) + } + } + + /// The company associated to the order or draft order. + open var company: Storefront.Company { + return internalGetCompany() + } + + func internalGetCompany(alias: String? = nil) -> Storefront.Company { + return field(field: "company", aliasSuffix: alias) as! Storefront.Company + } + + /// The company contact associated to the order or draft order. + open var contact: Storefront.CompanyContact? { + return internalGetContact() + } + + func internalGetContact(alias: String? = nil) -> Storefront.CompanyContact? { + return field(field: "contact", aliasSuffix: alias) as! Storefront.CompanyContact? + } + + /// The company location associated to the order or draft order. + open var location: Storefront.CompanyLocation { + return internalGetLocation() + } + + func internalGetLocation(alias: String? = nil) -> Storefront.CompanyLocation { + return field(field: "location", aliasSuffix: alias) as! Storefront.CompanyLocation + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "company": + response.append(internalGetCompany()) + response.append(contentsOf: internalGetCompany().childResponseObjectMap()) + + case "contact": + if let value = internalGetContact() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + + case "location": + response.append(internalGetLocation()) + response.append(contentsOf: internalGetLocation().childResponseObjectMap()) + + default: + break + } + } + return response + } + } +} diff --git a/Buy/Generated/Storefront/QuantityPriceBreak.swift b/Buy/Generated/Storefront/QuantityPriceBreak.swift new file mode 100644 index 00000000..a3fc8a05 --- /dev/null +++ b/Buy/Generated/Storefront/QuantityPriceBreak.swift @@ -0,0 +1,111 @@ +// +// QuantityPriceBreak.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 { + /// Quantity price breaks lets you offer different rates that are based on the + /// amount of a specific variant being ordered. + open class QuantityPriceBreakQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = QuantityPriceBreak + + /// Minimum quantity required to reach new quantity break price. + @discardableResult + open func minimumQuantity(alias: String? = nil) -> QuantityPriceBreakQuery { + addField(field: "minimumQuantity", aliasSuffix: alias) + return self + } + + /// The price of variant after reaching the minimum quanity. + @discardableResult + open func price(alias: String? = nil, _ subfields: (MoneyV2Query) -> Void) -> QuantityPriceBreakQuery { + let subquery = MoneyV2Query() + subfields(subquery) + + addField(field: "price", aliasSuffix: alias, subfields: subquery) + return self + } + } + + /// Quantity price breaks lets you offer different rates that are based on the + /// amount of a specific variant being ordered. + open class QuantityPriceBreak: GraphQL.AbstractResponse, GraphQLObject { + public typealias Query = QuantityPriceBreakQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "minimumQuantity": + guard let value = value as? Int else { + throw SchemaViolationError(type: QuantityPriceBreak.self, field: fieldName, value: fieldValue) + } + return Int32(value) + + case "price": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: QuantityPriceBreak.self, field: fieldName, value: fieldValue) + } + return try MoneyV2(fields: value) + + default: + throw SchemaViolationError(type: QuantityPriceBreak.self, field: fieldName, value: fieldValue) + } + } + + /// Minimum quantity required to reach new quantity break price. + open var minimumQuantity: Int32 { + return internalGetMinimumQuantity() + } + + func internalGetMinimumQuantity(alias: String? = nil) -> Int32 { + return field(field: "minimumQuantity", aliasSuffix: alias) as! Int32 + } + + /// The price of variant after reaching the minimum quanity. + open var price: Storefront.MoneyV2 { + return internalGetPrice() + } + + func internalGetPrice(alias: String? = nil) -> Storefront.MoneyV2 { + return field(field: "price", aliasSuffix: alias) as! Storefront.MoneyV2 + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "price": + response.append(internalGetPrice()) + response.append(contentsOf: internalGetPrice().childResponseObjectMap()) + + default: + break + } + } + return response + } + } +} diff --git a/Buy/Generated/Storefront/QuantityPriceBreakConnection.swift b/Buy/Generated/Storefront/QuantityPriceBreakConnection.swift new file mode 100644 index 00000000..0266d583 --- /dev/null +++ b/Buy/Generated/Storefront/QuantityPriceBreakConnection.swift @@ -0,0 +1,149 @@ +// +// QuantityPriceBreakConnection.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 { + /// An auto-generated type for paginating through multiple QuantityPriceBreaks. + open class QuantityPriceBreakConnectionQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = QuantityPriceBreakConnection + + /// A list of edges. + @discardableResult + open func edges(alias: String? = nil, _ subfields: (QuantityPriceBreakEdgeQuery) -> Void) -> QuantityPriceBreakConnectionQuery { + let subquery = QuantityPriceBreakEdgeQuery() + subfields(subquery) + + addField(field: "edges", aliasSuffix: alias, subfields: subquery) + return self + } + + /// A list of the nodes contained in QuantityPriceBreakEdge. + @discardableResult + open func nodes(alias: String? = nil, _ subfields: (QuantityPriceBreakQuery) -> Void) -> QuantityPriceBreakConnectionQuery { + let subquery = QuantityPriceBreakQuery() + subfields(subquery) + + addField(field: "nodes", aliasSuffix: alias, subfields: subquery) + return self + } + + /// Information to aid in pagination. + @discardableResult + open func pageInfo(alias: String? = nil, _ subfields: (PageInfoQuery) -> Void) -> QuantityPriceBreakConnectionQuery { + let subquery = PageInfoQuery() + subfields(subquery) + + addField(field: "pageInfo", aliasSuffix: alias, subfields: subquery) + return self + } + } + + /// An auto-generated type for paginating through multiple QuantityPriceBreaks. + open class QuantityPriceBreakConnection: GraphQL.AbstractResponse, GraphQLObject { + public typealias Query = QuantityPriceBreakConnectionQuery + + 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: QuantityPriceBreakConnection.self, field: fieldName, value: fieldValue) + } + return try value.map { return try QuantityPriceBreakEdge(fields: $0) } + + case "nodes": + guard let value = value as? [[String: Any]] else { + throw SchemaViolationError(type: QuantityPriceBreakConnection.self, field: fieldName, value: fieldValue) + } + return try value.map { return try QuantityPriceBreak(fields: $0) } + + case "pageInfo": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: QuantityPriceBreakConnection.self, field: fieldName, value: fieldValue) + } + return try PageInfo(fields: value) + + default: + throw SchemaViolationError(type: QuantityPriceBreakConnection.self, field: fieldName, value: fieldValue) + } + } + + /// A list of edges. + open var edges: [Storefront.QuantityPriceBreakEdge] { + return internalGetEdges() + } + + func internalGetEdges(alias: String? = nil) -> [Storefront.QuantityPriceBreakEdge] { + return field(field: "edges", aliasSuffix: alias) as! [Storefront.QuantityPriceBreakEdge] + } + + /// A list of the nodes contained in QuantityPriceBreakEdge. + open var nodes: [Storefront.QuantityPriceBreak] { + return internalGetNodes() + } + + func internalGetNodes(alias: String? = nil) -> [Storefront.QuantityPriceBreak] { + return field(field: "nodes", aliasSuffix: alias) as! [Storefront.QuantityPriceBreak] + } + + /// Information to aid in pagination. + open var pageInfo: Storefront.PageInfo { + return internalGetPageInfo() + } + + func internalGetPageInfo(alias: String? = nil) -> Storefront.PageInfo { + return field(field: "pageInfo", aliasSuffix: alias) as! Storefront.PageInfo + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "edges": + internalGetEdges().forEach { + response.append($0) + response.append(contentsOf: $0.childResponseObjectMap()) + } + + case "nodes": + internalGetNodes().forEach { + response.append($0) + response.append(contentsOf: $0.childResponseObjectMap()) + } + + case "pageInfo": + response.append(internalGetPageInfo()) + response.append(contentsOf: internalGetPageInfo().childResponseObjectMap()) + + default: + break + } + } + return response + } + } +} diff --git a/Buy/Generated/Storefront/QuantityPriceBreakEdge.swift b/Buy/Generated/Storefront/QuantityPriceBreakEdge.swift new file mode 100644 index 00000000..b679a031 --- /dev/null +++ b/Buy/Generated/Storefront/QuantityPriceBreakEdge.swift @@ -0,0 +1,111 @@ +// +// QuantityPriceBreakEdge.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 { + /// An auto-generated type which holds one QuantityPriceBreak and a cursor + /// during pagination. + open class QuantityPriceBreakEdgeQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = QuantityPriceBreakEdge + + /// A cursor for use in pagination. + @discardableResult + open func cursor(alias: String? = nil) -> QuantityPriceBreakEdgeQuery { + addField(field: "cursor", aliasSuffix: alias) + return self + } + + /// The item at the end of QuantityPriceBreakEdge. + @discardableResult + open func node(alias: String? = nil, _ subfields: (QuantityPriceBreakQuery) -> Void) -> QuantityPriceBreakEdgeQuery { + let subquery = QuantityPriceBreakQuery() + subfields(subquery) + + addField(field: "node", aliasSuffix: alias, subfields: subquery) + return self + } + } + + /// An auto-generated type which holds one QuantityPriceBreak and a cursor + /// during pagination. + open class QuantityPriceBreakEdge: GraphQL.AbstractResponse, GraphQLObject { + public typealias Query = QuantityPriceBreakEdgeQuery + + 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: QuantityPriceBreakEdge.self, field: fieldName, value: fieldValue) + } + return value + + case "node": + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: QuantityPriceBreakEdge.self, field: fieldName, value: fieldValue) + } + return try QuantityPriceBreak(fields: value) + + default: + throw SchemaViolationError(type: QuantityPriceBreakEdge.self, field: fieldName, value: fieldValue) + } + } + + /// A cursor for use in pagination. + open var cursor: String { + return internalGetCursor() + } + + func internalGetCursor(alias: String? = nil) -> String { + return field(field: "cursor", aliasSuffix: alias) as! String + } + + /// The item at the end of QuantityPriceBreakEdge. + open var node: Storefront.QuantityPriceBreak { + return internalGetNode() + } + + func internalGetNode(alias: String? = nil) -> Storefront.QuantityPriceBreak { + return field(field: "node", aliasSuffix: alias) as! Storefront.QuantityPriceBreak + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "node": + response.append(internalGetNode()) + response.append(contentsOf: internalGetNode().childResponseObjectMap()) + + default: + break + } + } + return response + } + } +} diff --git a/Buy/Generated/Storefront/QuantityRule.swift b/Buy/Generated/Storefront/QuantityRule.swift new file mode 100644 index 00000000..e1b233bd --- /dev/null +++ b/Buy/Generated/Storefront/QuantityRule.swift @@ -0,0 +1,130 @@ +// +// QuantityRule.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 quantity rule for the product variant in a given context. + open class QuantityRuleQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = QuantityRule + + /// The value that specifies the quantity increment between minimum and maximum + /// of the rule. Only quantities divisible by this value will be considered + /// valid. The increment must be lower than or equal to the minimum and the + /// maximum, and both minimum and maximum must be divisible by this value. + @discardableResult + open func increment(alias: String? = nil) -> QuantityRuleQuery { + addField(field: "increment", aliasSuffix: alias) + return self + } + + /// An optional value that defines the highest allowed quantity purchased by + /// the customer. If defined, maximum must be lower than or equal to the + /// minimum and must be a multiple of the increment. + @discardableResult + open func maximum(alias: String? = nil) -> QuantityRuleQuery { + addField(field: "maximum", aliasSuffix: alias) + return self + } + + /// The value that defines the lowest allowed quantity purchased by the + /// customer. The minimum must be a multiple of the quantity rule's increment. + @discardableResult + open func minimum(alias: String? = nil) -> QuantityRuleQuery { + addField(field: "minimum", aliasSuffix: alias) + return self + } + } + + /// The quantity rule for the product variant in a given context. + open class QuantityRule: GraphQL.AbstractResponse, GraphQLObject { + public typealias Query = QuantityRuleQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "increment": + guard let value = value as? Int else { + throw SchemaViolationError(type: QuantityRule.self, field: fieldName, value: fieldValue) + } + return Int32(value) + + case "maximum": + if value is NSNull { return nil } + guard let value = value as? Int else { + throw SchemaViolationError(type: QuantityRule.self, field: fieldName, value: fieldValue) + } + return Int32(value) + + case "minimum": + guard let value = value as? Int else { + throw SchemaViolationError(type: QuantityRule.self, field: fieldName, value: fieldValue) + } + return Int32(value) + + default: + throw SchemaViolationError(type: QuantityRule.self, field: fieldName, value: fieldValue) + } + } + + /// The value that specifies the quantity increment between minimum and maximum + /// of the rule. Only quantities divisible by this value will be considered + /// valid. The increment must be lower than or equal to the minimum and the + /// maximum, and both minimum and maximum must be divisible by this value. + open var increment: Int32 { + return internalGetIncrement() + } + + func internalGetIncrement(alias: String? = nil) -> Int32 { + return field(field: "increment", aliasSuffix: alias) as! Int32 + } + + /// An optional value that defines the highest allowed quantity purchased by + /// the customer. If defined, maximum must be lower than or equal to the + /// minimum and must be a multiple of the increment. + open var maximum: Int32? { + return internalGetMaximum() + } + + func internalGetMaximum(alias: String? = nil) -> Int32? { + return field(field: "maximum", aliasSuffix: alias) as! Int32? + } + + /// The value that defines the lowest allowed quantity purchased by the + /// customer. The minimum must be a multiple of the quantity rule's increment. + open var minimum: Int32 { + return internalGetMinimum() + } + + func internalGetMinimum(alias: String? = nil) -> Int32 { + return field(field: "minimum", aliasSuffix: alias) as! Int32 + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + return [] + } + } +} diff --git a/Buy/Generated/Storefront/QueryRoot.swift b/Buy/Generated/Storefront/QueryRoot.swift index 2005b238..b9d2f4e0 100644 --- a/Buy/Generated/Storefront/QueryRoot.swift +++ b/Buy/Generated/Storefront/QueryRoot.swift @@ -973,7 +973,7 @@ extension Storefront { /// - types: The types of resources to search for. /// /// The input must not contain more than `250` values. - /// - unavailableProducts: Specifies how unavailable products are displayed in the search results. + /// - unavailableProducts: Specifies how unavailable products or variants are displayed in the search results. /// @discardableResult open func search(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, sortKey: SearchSortKeys? = nil, query: String, `prefix`: SearchPrefixQueryType? = nil, productFilters: [ProductFilter]? = nil, types: [SearchType]? = nil, unavailableProducts: SearchUnavailableProductsType? = nil, _ subfields: (SearchResultItemConnectionQuery) -> Void) -> QueryRootQuery { diff --git a/Buy/Generated/Storefront/Swatch.swift b/Buy/Generated/Storefront/Swatch.swift new file mode 100644 index 00000000..d2b8198f --- /dev/null +++ b/Buy/Generated/Storefront/Swatch.swift @@ -0,0 +1,113 @@ +// +// Swatch.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 { + /// Color and image for visual representation. + open class SwatchQuery: GraphQL.AbstractQuery, GraphQLQuery { + public typealias Response = Swatch + + /// The swatch color. + @discardableResult + open func color(alias: String? = nil) -> SwatchQuery { + addField(field: "color", aliasSuffix: alias) + return self + } + + /// The swatch image. + @discardableResult + open func image(alias: String? = nil, _ subfields: (MediaImageQuery) -> Void) -> SwatchQuery { + let subquery = MediaImageQuery() + subfields(subquery) + + addField(field: "image", aliasSuffix: alias, subfields: subquery) + return self + } + } + + /// Color and image for visual representation. + open class Swatch: GraphQL.AbstractResponse, GraphQLObject { + public typealias Query = SwatchQuery + + internal override func deserializeValue(fieldName: String, value: Any) throws -> Any? { + let fieldValue = value + switch fieldName { + case "color": + if value is NSNull { return nil } + guard let value = value as? String else { + throw SchemaViolationError(type: Swatch.self, field: fieldName, value: fieldValue) + } + return value + + case "image": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: Swatch.self, field: fieldName, value: fieldValue) + } + return try MediaImage(fields: value) + + default: + throw SchemaViolationError(type: Swatch.self, field: fieldName, value: fieldValue) + } + } + + /// The swatch color. + open var color: String? { + return internalGetColor() + } + + func internalGetColor(alias: String? = nil) -> String? { + return field(field: "color", aliasSuffix: alias) as! String? + } + + /// The swatch image. + open var image: Storefront.MediaImage? { + return internalGetImage() + } + + func internalGetImage(alias: String? = nil) -> Storefront.MediaImage? { + return field(field: "image", aliasSuffix: alias) as! Storefront.MediaImage? + } + + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { + var response: [GraphQL.AbstractResponse] = [] + objectMap.keys.forEach { + switch($0) { + case "image": + if let value = internalGetImage() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + + default: + break + } + } + return response + } + } +} From 702e5eb51f8d1eb64acf20ff3cff5dd393856480 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 1 Apr 2024 16:55:52 +0000 Subject: [PATCH 2/4] 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 a5305d3b..9aa5cd4b 100644 --- a/Buy/Info.plist +++ b/Buy/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 11.3.0 + 11.4.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Buy/Utilities/SDK.swift b/Buy/Utilities/SDK.swift index 36647005..a4b7c819 100644 --- a/Buy/Utilities/SDK.swift +++ b/Buy/Utilities/SDK.swift @@ -27,5 +27,5 @@ import Foundation internal enum SDK { - static let version = "11.3.0" + static let version = "11.4.0" } diff --git a/BuyTests/Info.plist b/BuyTests/Info.plist index 93388648..7b1a9332 100644 --- a/BuyTests/Info.plist +++ b/BuyTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 11.3.0 + 11.4.0 CFBundleVersion 1 diff --git a/Mobile-Buy-SDK.podspec b/Mobile-Buy-SDK.podspec index 6ca0debf..aa7ccd1a 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 = '11.3.0' + s.version = '11.4.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 a5305d3b..9aa5cd4b 100644 --- a/Pay/Info.plist +++ b/Pay/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 11.3.0 + 11.4.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/PayTests/Info.plist b/PayTests/Info.plist index 93388648..7b1a9332 100644 --- a/PayTests/Info.plist +++ b/PayTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 11.3.0 + 11.4.0 CFBundleVersion 1 From 2996b0e413f5e8dc6757e28954e3678ef5243678 Mon Sep 17 00:00:00 2001 From: Jonathan Baker Date: Mon, 1 Apr 2024 13:53:59 -0400 Subject: [PATCH 3/4] Update project.pbxproj --- Buy.xcodeproj/project.pbxproj | 104 ++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/Buy.xcodeproj/project.pbxproj b/Buy.xcodeproj/project.pbxproj index 607dcc07..a94ef711 100644 --- a/Buy.xcodeproj/project.pbxproj +++ b/Buy.xcodeproj/project.pbxproj @@ -120,6 +120,45 @@ 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 */; }; + 4E69B2462BBB2C0B00913BAA /* Swatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2392BBB2C0A00913BAA /* Swatch.swift */; }; + 4E69B2472BBB2C0B00913BAA /* Swatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2392BBB2C0A00913BAA /* Swatch.swift */; }; + 4E69B2482BBB2C0B00913BAA /* Swatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2392BBB2C0A00913BAA /* Swatch.swift */; }; + 4E69B2492BBB2C0B00913BAA /* FilterPresentation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23A2BBB2C0A00913BAA /* FilterPresentation.swift */; }; + 4E69B24A2BBB2C0B00913BAA /* FilterPresentation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23A2BBB2C0A00913BAA /* FilterPresentation.swift */; }; + 4E69B24B2BBB2C0B00913BAA /* FilterPresentation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23A2BBB2C0A00913BAA /* FilterPresentation.swift */; }; + 4E69B24C2BBB2C0B00913BAA /* QuantityPriceBreak.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23B2BBB2C0A00913BAA /* QuantityPriceBreak.swift */; }; + 4E69B24D2BBB2C0B00913BAA /* QuantityPriceBreak.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23B2BBB2C0A00913BAA /* QuantityPriceBreak.swift */; }; + 4E69B24E2BBB2C0B00913BAA /* QuantityPriceBreak.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23B2BBB2C0A00913BAA /* QuantityPriceBreak.swift */; }; + 4E69B24F2BBB2C0B00913BAA /* CompanyLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23C2BBB2C0A00913BAA /* CompanyLocation.swift */; }; + 4E69B2502BBB2C0B00913BAA /* CompanyLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23C2BBB2C0A00913BAA /* CompanyLocation.swift */; }; + 4E69B2512BBB2C0B00913BAA /* CompanyLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23C2BBB2C0A00913BAA /* CompanyLocation.swift */; }; + 4E69B2522BBB2C0B00913BAA /* PurchasingCompany.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23D2BBB2C0A00913BAA /* PurchasingCompany.swift */; }; + 4E69B2532BBB2C0B00913BAA /* PurchasingCompany.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23D2BBB2C0A00913BAA /* PurchasingCompany.swift */; }; + 4E69B2542BBB2C0B00913BAA /* PurchasingCompany.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23D2BBB2C0A00913BAA /* PurchasingCompany.swift */; }; + 4E69B2552BBB2C0B00913BAA /* BuyerInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23E2BBB2C0B00913BAA /* BuyerInput.swift */; }; + 4E69B2562BBB2C0B00913BAA /* BuyerInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23E2BBB2C0B00913BAA /* BuyerInput.swift */; }; + 4E69B2572BBB2C0B00913BAA /* BuyerInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23E2BBB2C0B00913BAA /* BuyerInput.swift */; }; + 4E69B2582BBB2C0B00913BAA /* DeliveryAddressValidationStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23F2BBB2C0B00913BAA /* DeliveryAddressValidationStrategy.swift */; }; + 4E69B2592BBB2C0B00913BAA /* DeliveryAddressValidationStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23F2BBB2C0B00913BAA /* DeliveryAddressValidationStrategy.swift */; }; + 4E69B25A2BBB2C0B00913BAA /* DeliveryAddressValidationStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B23F2BBB2C0B00913BAA /* DeliveryAddressValidationStrategy.swift */; }; + 4E69B25B2BBB2C0B00913BAA /* Company.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2402BBB2C0B00913BAA /* Company.swift */; }; + 4E69B25C2BBB2C0B00913BAA /* Company.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2402BBB2C0B00913BAA /* Company.swift */; }; + 4E69B25D2BBB2C0B00913BAA /* Company.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2402BBB2C0B00913BAA /* Company.swift */; }; + 4E69B25E2BBB2C0B00913BAA /* CompanyContact.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2412BBB2C0B00913BAA /* CompanyContact.swift */; }; + 4E69B25F2BBB2C0B00913BAA /* CompanyContact.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2412BBB2C0B00913BAA /* CompanyContact.swift */; }; + 4E69B2602BBB2C0B00913BAA /* CompanyContact.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2412BBB2C0B00913BAA /* CompanyContact.swift */; }; + 4E69B2612BBB2C0B00913BAA /* QuantityRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2422BBB2C0B00913BAA /* QuantityRule.swift */; }; + 4E69B2622BBB2C0B00913BAA /* QuantityRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2422BBB2C0B00913BAA /* QuantityRule.swift */; }; + 4E69B2632BBB2C0B00913BAA /* QuantityRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2422BBB2C0B00913BAA /* QuantityRule.swift */; }; + 4E69B2642BBB2C0B00913BAA /* QuantityPriceBreakEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2432BBB2C0B00913BAA /* QuantityPriceBreakEdge.swift */; }; + 4E69B2652BBB2C0B00913BAA /* QuantityPriceBreakEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2432BBB2C0B00913BAA /* QuantityPriceBreakEdge.swift */; }; + 4E69B2662BBB2C0B00913BAA /* QuantityPriceBreakEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2432BBB2C0B00913BAA /* QuantityPriceBreakEdge.swift */; }; + 4E69B2672BBB2C0B00913BAA /* QuantityPriceBreakConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2442BBB2C0B00913BAA /* QuantityPriceBreakConnection.swift */; }; + 4E69B2682BBB2C0B00913BAA /* QuantityPriceBreakConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2442BBB2C0B00913BAA /* QuantityPriceBreakConnection.swift */; }; + 4E69B2692BBB2C0B00913BAA /* QuantityPriceBreakConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2442BBB2C0B00913BAA /* QuantityPriceBreakConnection.swift */; }; + 4E69B26A2BBB2C0B00913BAA /* CartDeliveryGroupType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2452BBB2C0B00913BAA /* CartDeliveryGroupType.swift */; }; + 4E69B26B2BBB2C0B00913BAA /* CartDeliveryGroupType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2452BBB2C0B00913BAA /* CartDeliveryGroupType.swift */; }; + 4E69B26C2BBB2C0B00913BAA /* CartDeliveryGroupType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E69B2452BBB2C0B00913BAA /* CartDeliveryGroupType.swift */; }; 4E772600296DC92F00A6EAE7 /* MetaobjectHandleInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E7725FB296DC92E00A6EAE7 /* MetaobjectHandleInput.swift */; }; 4E772601296DC92F00A6EAE7 /* MetaobjectHandleInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E7725FB296DC92E00A6EAE7 /* MetaobjectHandleInput.swift */; }; 4E772602296DC92F00A6EAE7 /* MetaobjectHandleInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E7725FB296DC92E00A6EAE7 /* MetaobjectHandleInput.swift */; }; @@ -1204,6 +1243,19 @@ 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 = ""; }; + 4E69B2392BBB2C0A00913BAA /* Swatch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Swatch.swift; sourceTree = ""; }; + 4E69B23A2BBB2C0A00913BAA /* FilterPresentation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilterPresentation.swift; sourceTree = ""; }; + 4E69B23B2BBB2C0A00913BAA /* QuantityPriceBreak.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QuantityPriceBreak.swift; sourceTree = ""; }; + 4E69B23C2BBB2C0A00913BAA /* CompanyLocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompanyLocation.swift; sourceTree = ""; }; + 4E69B23D2BBB2C0A00913BAA /* PurchasingCompany.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PurchasingCompany.swift; sourceTree = ""; }; + 4E69B23E2BBB2C0B00913BAA /* BuyerInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BuyerInput.swift; sourceTree = ""; }; + 4E69B23F2BBB2C0B00913BAA /* DeliveryAddressValidationStrategy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeliveryAddressValidationStrategy.swift; sourceTree = ""; }; + 4E69B2402BBB2C0B00913BAA /* Company.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Company.swift; sourceTree = ""; }; + 4E69B2412BBB2C0B00913BAA /* CompanyContact.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompanyContact.swift; sourceTree = ""; }; + 4E69B2422BBB2C0B00913BAA /* QuantityRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QuantityRule.swift; sourceTree = ""; }; + 4E69B2432BBB2C0B00913BAA /* QuantityPriceBreakEdge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QuantityPriceBreakEdge.swift; sourceTree = ""; }; + 4E69B2442BBB2C0B00913BAA /* QuantityPriceBreakConnection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QuantityPriceBreakConnection.swift; sourceTree = ""; }; + 4E69B2452BBB2C0B00913BAA /* CartDeliveryGroupType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CartDeliveryGroupType.swift; sourceTree = ""; }; 4E7725FB296DC92E00A6EAE7 /* MetaobjectHandleInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetaobjectHandleInput.swift; sourceTree = ""; }; 4E7725FC296DC92E00A6EAE7 /* Metaobject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Metaobject.swift; sourceTree = ""; }; 4E7725FD296DC92E00A6EAE7 /* MetaobjectConnection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MetaobjectConnection.swift; sourceTree = ""; }; @@ -1664,6 +1716,7 @@ 4EF3D33F28EB2287007215E6 /* Brand.swift */, 4EF3D34028EB2287007215E6 /* BrandColorGroup.swift */, 4EF3D33E28EB2287007215E6 /* BrandColors.swift */, + 4E69B23E2BBB2C0B00913BAA /* BuyerInput.swift */, 9A52D3A11F3CA58E00C093C8 /* CardBrand.swift */, 4E28FEC2270780B400F9EBED /* Cart.swift */, 4E28FEB5270780B400F9EBED /* CartAttributesUpdatePayload.swift */, @@ -1685,6 +1738,7 @@ 4ECBE3FF27FB45D200CB544E /* CartDeliveryGroup.swift */, 4ECBE40727FB45D200CB544E /* CartDeliveryGroupConnection.swift */, 4ECBE3FE27FB45D200CB544E /* CartDeliveryGroupEdge.swift */, + 4E69B2452BBB2C0B00913BAA /* CartDeliveryGroupType.swift */, 4ECBE40027FB45D200CB544E /* CartDeliveryOption.swift */, 4EB4DAC129DC5FED00C9A6BD /* CartDirectPaymentMethodInput.swift */, 4E28FEB9270780B400F9EBED /* CartDiscountAllocation.swift */, @@ -1754,6 +1808,9 @@ 9AA416D51EE095BB0060029B /* CommentAuthor.swift */, 9AA416D61EE095BB0060029B /* CommentConnection.swift */, 9AA416D71EE095BB0060029B /* CommentEdge.swift */, + 4E69B2402BBB2C0B00913BAA /* Company.swift */, + 4E69B2412BBB2C0B00913BAA /* CompanyContact.swift */, + 4E69B23C2BBB2C0A00913BAA /* CompanyLocation.swift */, 4EB4DAB729DC5FED00C9A6BD /* CompletePaymentChallenge.swift */, 4EB4DAC529DC5FED00C9A6BD /* CompletionError.swift */, 4EB4DAC629DC5FED00C9A6BD /* CompletionErrorCode.swift */, @@ -1791,6 +1848,7 @@ 9ABEB3B82122FF7F00A373F2 /* CustomerUserError.swift */, 4EF3D32628EB2182007215E6 /* DeliveryAddress.swift */, 4EF3D32B28EB2182007215E6 /* DeliveryAddressInput.swift */, + 4E69B23F2BBB2C0B00913BAA /* DeliveryAddressValidationStrategy.swift */, 4ECBE40127FB45D200CB544E /* DeliveryMethodType.swift */, 9A52D3A41F3CA5DB00C093C8 /* DigitalWallet.swift */, 9A67115321666AB100A57A3F /* DiscountAllocation.swift */, @@ -1805,6 +1863,7 @@ 9A0C802E1EAA51C50020F187 /* Domain.swift */, 8128550D23C4AC7E00ADA66E /* ExternalVideo.swift */, 4EC8A6EE278792B400FC193B /* Filter.swift */, + 4E69B23A2BBB2C0A00913BAA /* FilterPresentation.swift */, 4EC8A6F5278792B400FC193B /* FilterType.swift */, 4EC8A6F3278792B400FC193B /* FilterValue.swift */, 9ABEB3A42122FF7500A373F2 /* Fulfillment.swift */, @@ -1911,6 +1970,11 @@ 9A0C804A1EAA51C50020F187 /* ProductVariantConnection.swift */, 9A0C804B1EAA51C50020F187 /* ProductVariantEdge.swift */, 9AE1F8151F605F8F00147E77 /* ProductVariantSortKeys.swift */, + 4E69B23D2BBB2C0A00913BAA /* PurchasingCompany.swift */, + 4E69B23B2BBB2C0A00913BAA /* QuantityPriceBreak.swift */, + 4E69B2442BBB2C0B00913BAA /* QuantityPriceBreakConnection.swift */, + 4E69B2432BBB2C0B00913BAA /* QuantityPriceBreakEdge.swift */, + 4E69B2422BBB2C0B00913BAA /* QuantityRule.swift */, 9A0C804C1EAA51C50020F187 /* QueryRoot.swift */, 9A67114921666AAE00A57A3F /* ScriptDiscountApplication.swift */, 4EC2158D2A55CB8700BD6148 /* SearchableField.swift */, @@ -1962,6 +2026,7 @@ 4EB4DACF29DC5FEE00C9A6BD /* SubmitFailed.swift */, 4EB4DAA929DC5FED00C9A6BD /* SubmitSuccess.swift */, 4EB4DAAA29DC5FED00C9A6BD /* SubmitThrottled.swift */, + 4E69B2392BBB2C0A00913BAA /* Swatch.swift */, 21751EEC243D136A005001D4 /* TokenizedPaymentInputV3.swift */, 4EC215902A55CB8700BD6148 /* Trackable.swift */, 9A0C80521EAA51C50020F187 /* Transaction.swift */, @@ -2586,6 +2651,7 @@ 4EF3D34628EB2287007215E6 /* Brand.swift in Sources */, 4EF3D34928EB2287007215E6 /* BrandColorGroup.swift in Sources */, 4EF3D34328EB2287007215E6 /* BrandColors.swift in Sources */, + 4E69B2572BBB2C0B00913BAA /* BuyerInput.swift in Sources */, 9AC2EF631F6818180037E0D7 /* Card.swift in Sources */, 9AC2EFAB1F6818180037E0D7 /* Card.Client.swift in Sources */, 9AC2EF5C1F6818180037E0D7 /* Card.CreditCard.swift in Sources */, @@ -2610,6 +2676,7 @@ 4ECBE40E27FB45D200CB544E /* CartDeliveryGroup.swift in Sources */, 4ECBE42627FB45D200CB544E /* CartDeliveryGroupConnection.swift in Sources */, 4ECBE40B27FB45D200CB544E /* CartDeliveryGroupEdge.swift in Sources */, + 4E69B26C2BBB2C0B00913BAA /* CartDeliveryGroupType.swift in Sources */, 4ECBE41127FB45D200CB544E /* CartDeliveryOption.swift in Sources */, 4EB4DB1C29DC5FEE00C9A6BD /* CartDirectPaymentMethodInput.swift in Sources */, 4E28FEE2270780B500F9EBED /* CartDiscountAllocation.swift in Sources */, @@ -2679,6 +2746,9 @@ 9AC2EF6D1F6818180037E0D7 /* CommentAuthor.swift in Sources */, 9AC2EF921F6818180037E0D7 /* CommentConnection.swift in Sources */, 9AC2EFBE1F6818180037E0D7 /* CommentEdge.swift in Sources */, + 4E69B25D2BBB2C0B00913BAA /* Company.swift in Sources */, + 4E69B2602BBB2C0B00913BAA /* CompanyContact.swift in Sources */, + 4E69B2512BBB2C0B00913BAA /* CompanyLocation.swift in Sources */, 4EB4DAFE29DC5FEE00C9A6BD /* CompletePaymentChallenge.swift in Sources */, 4EB4DB2829DC5FEE00C9A6BD /* CompletionError.swift in Sources */, 4EB4DB2B29DC5FEE00C9A6BD /* CompletionErrorCode.swift in Sources */, @@ -2716,6 +2786,7 @@ 9ABEB3BB2122FF8000A373F2 /* CustomerUserError.swift in Sources */, 4EF3D32E28EB2182007215E6 /* DeliveryAddress.swift in Sources */, 4EF3D33D28EB2182007215E6 /* DeliveryAddressInput.swift in Sources */, + 4E69B25A2BBB2C0B00913BAA /* DeliveryAddressValidationStrategy.swift in Sources */, 4ECBE41427FB45D200CB544E /* DeliveryMethodType.swift in Sources */, 9AC2EF571F6818180037E0D7 /* DigitalWallet.swift in Sources */, 9A67117421666AB200A57A3F /* DiscountAllocation.swift in Sources */, @@ -2730,6 +2801,7 @@ 9AC2EF5B1F6818180037E0D7 /* Domain.swift in Sources */, 815FAB4923C4B82C00F98749 /* ExternalVideo.swift in Sources */, 4EC8A70C2787946400FC193B /* Filter.swift in Sources */, + 4E69B24B2BBB2C0B00913BAA /* FilterPresentation.swift in Sources */, 4EC8A7142787946400FC193B /* FilterType.swift in Sources */, 4EC8A7112787946400FC193B /* FilterValue.swift in Sources */, 9ABEB3AA2122FF7700A373F2 /* Fulfillment.swift in Sources */, @@ -2851,6 +2923,11 @@ 9AC2EF6E1F6818180037E0D7 /* ProductVariantConnection.swift in Sources */, 9AC2EFBB1F6818180037E0D7 /* ProductVariantEdge.swift in Sources */, 9AC2EF3D1F6818180037E0D7 /* ProductVariantSortKeys.swift in Sources */, + 4E69B2542BBB2C0B00913BAA /* PurchasingCompany.swift in Sources */, + 4E69B24E2BBB2C0B00913BAA /* QuantityPriceBreak.swift in Sources */, + 4E69B2692BBB2C0B00913BAA /* QuantityPriceBreakConnection.swift in Sources */, + 4E69B2662BBB2C0B00913BAA /* QuantityPriceBreakEdge.swift in Sources */, + 4E69B2632BBB2C0B00913BAA /* QuantityRule.swift in Sources */, 9AC2EF3F1F6818180037E0D7 /* QueryRoot.swift in Sources */, 9A67115621666AB200A57A3F /* ScriptDiscountApplication.swift in Sources */, 9A3D4CD6251B9EF200B702E0 /* SDK.swift in Sources */, @@ -2906,6 +2983,7 @@ 4EB4DB4629DC5FEE00C9A6BD /* SubmitFailed.swift in Sources */, 4EB4DAD429DC5FEE00C9A6BD /* SubmitSuccess.swift in Sources */, 4EB4DAD729DC5FEE00C9A6BD /* SubmitThrottled.swift in Sources */, + 4E69B2482BBB2C0B00913BAA /* Swatch.swift in Sources */, 21751F00243D136A005001D4 /* TokenizedPaymentInputV3.swift in Sources */, 4EC215B62A55CB8800BD6148 /* Trackable.swift in Sources */, 9AC2EF5D1F6818180037E0D7 /* Transaction.swift in Sources */, @@ -2953,6 +3031,7 @@ 4EF3D34428EB2287007215E6 /* Brand.swift in Sources */, 4EF3D34728EB2287007215E6 /* BrandColorGroup.swift in Sources */, 4EF3D34128EB2287007215E6 /* BrandColors.swift in Sources */, + 4E69B2552BBB2C0B00913BAA /* BuyerInput.swift in Sources */, 9A0C80F01EB773310020F187 /* Card.swift in Sources */, 9A0C80F41EB785310020F187 /* Card.Client.swift in Sources */, 9A0C80F21EB773520020F187 /* Card.CreditCard.swift in Sources */, @@ -2977,6 +3056,7 @@ 4ECBE40C27FB45D200CB544E /* CartDeliveryGroup.swift in Sources */, 4ECBE42427FB45D200CB544E /* CartDeliveryGroupConnection.swift in Sources */, 4ECBE40927FB45D200CB544E /* CartDeliveryGroupEdge.swift in Sources */, + 4E69B26A2BBB2C0B00913BAA /* CartDeliveryGroupType.swift in Sources */, 4ECBE40F27FB45D200CB544E /* CartDeliveryOption.swift in Sources */, 4EB4DB1A29DC5FEE00C9A6BD /* CartDirectPaymentMethodInput.swift in Sources */, 4E28FEE0270780B500F9EBED /* CartDiscountAllocation.swift in Sources */, @@ -3046,6 +3126,9 @@ 9AA416D91EE095BB0060029B /* CommentAuthor.swift in Sources */, 9AA416DA1EE095BB0060029B /* CommentConnection.swift in Sources */, 9AA416DB1EE095BB0060029B /* CommentEdge.swift in Sources */, + 4E69B25B2BBB2C0B00913BAA /* Company.swift in Sources */, + 4E69B25E2BBB2C0B00913BAA /* CompanyContact.swift in Sources */, + 4E69B24F2BBB2C0B00913BAA /* CompanyLocation.swift in Sources */, 4EB4DAFC29DC5FEE00C9A6BD /* CompletePaymentChallenge.swift in Sources */, 4EB4DB2629DC5FEE00C9A6BD /* CompletionError.swift in Sources */, 4EB4DB2929DC5FEE00C9A6BD /* CompletionErrorCode.swift in Sources */, @@ -3083,6 +3166,7 @@ 9ABEB3BA2122FF8000A373F2 /* CustomerUserError.swift in Sources */, 4EF3D32C28EB2182007215E6 /* DeliveryAddress.swift in Sources */, 4EF3D33B28EB2182007215E6 /* DeliveryAddressInput.swift in Sources */, + 4E69B2582BBB2C0B00913BAA /* DeliveryAddressValidationStrategy.swift in Sources */, 4ECBE41227FB45D200CB544E /* DeliveryMethodType.swift in Sources */, 9A52D3A51F3CA5DB00C093C8 /* DigitalWallet.swift in Sources */, 9A67117321666AB200A57A3F /* DiscountAllocation.swift in Sources */, @@ -3097,6 +3181,7 @@ 9A0C808D1EAA51C50020F187 /* Domain.swift in Sources */, 8128551C23C4AC7E00ADA66E /* ExternalVideo.swift in Sources */, 4EC8A6F8278792B400FC193B /* Filter.swift in Sources */, + 4E69B2492BBB2C0B00913BAA /* FilterPresentation.swift in Sources */, 4EC8A6FF278792B400FC193B /* FilterType.swift in Sources */, 4EC8A6FD278792B400FC193B /* FilterValue.swift in Sources */, 9ABEB3A92122FF7700A373F2 /* Fulfillment.swift in Sources */, @@ -3218,6 +3303,11 @@ 9A0C80A91EAA51C50020F187 /* ProductVariantConnection.swift in Sources */, 9A0C80AA1EAA51C50020F187 /* ProductVariantEdge.swift in Sources */, 9AE1F8161F605F8F00147E77 /* ProductVariantSortKeys.swift in Sources */, + 4E69B2522BBB2C0B00913BAA /* PurchasingCompany.swift in Sources */, + 4E69B24C2BBB2C0B00913BAA /* QuantityPriceBreak.swift in Sources */, + 4E69B2672BBB2C0B00913BAA /* QuantityPriceBreakConnection.swift in Sources */, + 4E69B2642BBB2C0B00913BAA /* QuantityPriceBreakEdge.swift in Sources */, + 4E69B2612BBB2C0B00913BAA /* QuantityRule.swift in Sources */, 9A0C80AB1EAA51C50020F187 /* QueryRoot.swift in Sources */, 9A67115521666AB200A57A3F /* ScriptDiscountApplication.swift in Sources */, 9A3D4CD5251B9EF200B702E0 /* SDK.swift in Sources */, @@ -3273,6 +3363,7 @@ 4EB4DB4429DC5FEE00C9A6BD /* SubmitFailed.swift in Sources */, 4EB4DAD229DC5FEE00C9A6BD /* SubmitSuccess.swift in Sources */, 4EB4DAD529DC5FEE00C9A6BD /* SubmitThrottled.swift in Sources */, + 4E69B2462BBB2C0B00913BAA /* Swatch.swift in Sources */, 21751EFF243D136A005001D4 /* TokenizedPaymentInputV3.swift in Sources */, 4EC215B42A55CB8800BD6148 /* Trackable.swift in Sources */, 9A0C80B11EAA51C50020F187 /* Transaction.swift in Sources */, @@ -3320,6 +3411,7 @@ 4EF3D34528EB2287007215E6 /* Brand.swift in Sources */, 4EF3D34828EB2287007215E6 /* BrandColorGroup.swift in Sources */, 4EF3D34228EB2287007215E6 /* BrandColors.swift in Sources */, + 4E69B2562BBB2C0B00913BAA /* BuyerInput.swift in Sources */, 9AF255DD1F6FEE50005BB0C9 /* Card.swift in Sources */, 9AF256251F6FEE50005BB0C9 /* Card.Client.swift in Sources */, 9AF255D61F6FEE50005BB0C9 /* Card.CreditCard.swift in Sources */, @@ -3344,6 +3436,7 @@ 4ECBE40D27FB45D200CB544E /* CartDeliveryGroup.swift in Sources */, 4ECBE42527FB45D200CB544E /* CartDeliveryGroupConnection.swift in Sources */, 4ECBE40A27FB45D200CB544E /* CartDeliveryGroupEdge.swift in Sources */, + 4E69B26B2BBB2C0B00913BAA /* CartDeliveryGroupType.swift in Sources */, 4ECBE41027FB45D200CB544E /* CartDeliveryOption.swift in Sources */, 4EB4DB1B29DC5FEE00C9A6BD /* CartDirectPaymentMethodInput.swift in Sources */, 4E28FEE1270780B500F9EBED /* CartDiscountAllocation.swift in Sources */, @@ -3413,6 +3506,9 @@ 9AF255E71F6FEE50005BB0C9 /* CommentAuthor.swift in Sources */, 9AF2560C1F6FEE50005BB0C9 /* CommentConnection.swift in Sources */, 9AF256381F6FEE50005BB0C9 /* CommentEdge.swift in Sources */, + 4E69B25C2BBB2C0B00913BAA /* Company.swift in Sources */, + 4E69B25F2BBB2C0B00913BAA /* CompanyContact.swift in Sources */, + 4E69B2502BBB2C0B00913BAA /* CompanyLocation.swift in Sources */, 4EB4DAFD29DC5FEE00C9A6BD /* CompletePaymentChallenge.swift in Sources */, 4EB4DB2729DC5FEE00C9A6BD /* CompletionError.swift in Sources */, 4EB4DB2A29DC5FEE00C9A6BD /* CompletionErrorCode.swift in Sources */, @@ -3450,6 +3546,7 @@ 9ABEB3BC2122FF8000A373F2 /* CustomerUserError.swift in Sources */, 4EF3D32D28EB2182007215E6 /* DeliveryAddress.swift in Sources */, 4EF3D33C28EB2182007215E6 /* DeliveryAddressInput.swift in Sources */, + 4E69B2592BBB2C0B00913BAA /* DeliveryAddressValidationStrategy.swift in Sources */, 4ECBE41327FB45D200CB544E /* DeliveryMethodType.swift in Sources */, 9AF255D11F6FEE50005BB0C9 /* DigitalWallet.swift in Sources */, 9A67117521666AB200A57A3F /* DiscountAllocation.swift in Sources */, @@ -3464,6 +3561,7 @@ 9AF255D51F6FEE50005BB0C9 /* Domain.swift in Sources */, 815FAB3A23C4B81500F98749 /* ExternalVideo.swift in Sources */, 4EC8A7022787946300FC193B /* Filter.swift in Sources */, + 4E69B24A2BBB2C0B00913BAA /* FilterPresentation.swift in Sources */, 4EC8A70A2787946300FC193B /* FilterType.swift in Sources */, 4EC8A7072787946300FC193B /* FilterValue.swift in Sources */, 9ABEB3AB2122FF7700A373F2 /* Fulfillment.swift in Sources */, @@ -3585,6 +3683,11 @@ 9AF255E81F6FEE50005BB0C9 /* ProductVariantConnection.swift in Sources */, 9AF256351F6FEE50005BB0C9 /* ProductVariantEdge.swift in Sources */, 9AF255B71F6FEE50005BB0C9 /* ProductVariantSortKeys.swift in Sources */, + 4E69B2532BBB2C0B00913BAA /* PurchasingCompany.swift in Sources */, + 4E69B24D2BBB2C0B00913BAA /* QuantityPriceBreak.swift in Sources */, + 4E69B2682BBB2C0B00913BAA /* QuantityPriceBreakConnection.swift in Sources */, + 4E69B2652BBB2C0B00913BAA /* QuantityPriceBreakEdge.swift in Sources */, + 4E69B2622BBB2C0B00913BAA /* QuantityRule.swift in Sources */, 9AF255B91F6FEE50005BB0C9 /* QueryRoot.swift in Sources */, 9A67115721666AB200A57A3F /* ScriptDiscountApplication.swift in Sources */, 9A3D4CD7251B9EF200B702E0 /* SDK.swift in Sources */, @@ -3640,6 +3743,7 @@ 4EB4DB4529DC5FEE00C9A6BD /* SubmitFailed.swift in Sources */, 4EB4DAD329DC5FEE00C9A6BD /* SubmitSuccess.swift in Sources */, 4EB4DAD629DC5FEE00C9A6BD /* SubmitThrottled.swift in Sources */, + 4E69B2472BBB2C0B00913BAA /* Swatch.swift in Sources */, 21751F01243D136A005001D4 /* TokenizedPaymentInputV3.swift in Sources */, 4EC215B52A55CB8800BD6148 /* Trackable.swift in Sources */, 9AF255D71F6FEE50005BB0C9 /* Transaction.swift in Sources */, From b90ba4a57b45fdccecdb47c73d2b65dc419d3727 Mon Sep 17 00:00:00 2001 From: Jonathan Baker Date: Mon, 1 Apr 2024 13:59:02 -0400 Subject: [PATCH 4/4] Version Bump: 12.0.0 --- 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 9aa5cd4b..93b5c7b2 100644 --- a/Buy/Info.plist +++ b/Buy/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 11.4.0 + 12.0.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Buy/Utilities/SDK.swift b/Buy/Utilities/SDK.swift index a4b7c819..c30cf58e 100644 --- a/Buy/Utilities/SDK.swift +++ b/Buy/Utilities/SDK.swift @@ -27,5 +27,5 @@ import Foundation internal enum SDK { - static let version = "11.4.0" + static let version = "12.0.0" } diff --git a/BuyTests/Info.plist b/BuyTests/Info.plist index 7b1a9332..83e5f15b 100644 --- a/BuyTests/Info.plist +++ b/BuyTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 11.4.0 + 12.0.0 CFBundleVersion 1 diff --git a/Mobile-Buy-SDK.podspec b/Mobile-Buy-SDK.podspec index aa7ccd1a..2fab1d54 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 = '11.4.0' + s.version = '12.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 9aa5cd4b..93b5c7b2 100644 --- a/Pay/Info.plist +++ b/Pay/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 11.4.0 + 12.0.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/PayTests/Info.plist b/PayTests/Info.plist index 7b1a9332..83e5f15b 100644 --- a/PayTests/Info.plist +++ b/PayTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 11.4.0 + 12.0.0 CFBundleVersion 1