Skip to content

Commit

Permalink
Merge pull request #855 from Shopify/develop
Browse files Browse the repository at this point in the history
SDK 3.1.6
  • Loading branch information
dbart01 authored May 18, 2018
2 parents 645e10b + d061488 commit ae59031
Show file tree
Hide file tree
Showing 17 changed files with 591 additions and 26 deletions.
56 changes: 40 additions & 16 deletions Buy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,15 @@
9A6F3BA91EBB6A7500B149F4 /* Graph.CacheTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6F3BA81EBB6A7500B149F4 /* Graph.CacheTests.swift */; };
9A9C513C1F02A5D6003363E7 /* MD5.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A664D701EF05F97001BFB01 /* MD5.h */; settings = {ATTRIBUTES = (Public, ); }; };
9A9C513D1F02A5DB003363E7 /* MD5.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A664D711EF05F97001BFB01 /* MD5.m */; };
9A9EA43C20AF0EBB002CB926 /* DisplayableError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9EA43920AF0EBA002CB926 /* DisplayableError.swift */; };
9A9EA43D20AF0EBB002CB926 /* DisplayableError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9EA43920AF0EBA002CB926 /* DisplayableError.swift */; };
9A9EA43E20AF0EBB002CB926 /* DisplayableError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9EA43920AF0EBA002CB926 /* DisplayableError.swift */; };
9A9EA43F20AF0EBB002CB926 /* MoneyV2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9EA43A20AF0EBA002CB926 /* MoneyV2.swift */; };
9A9EA44020AF0EBB002CB926 /* MoneyV2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9EA43A20AF0EBA002CB926 /* MoneyV2.swift */; };
9A9EA44120AF0EBB002CB926 /* MoneyV2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9EA43A20AF0EBA002CB926 /* MoneyV2.swift */; };
9A9EA44220AF0EBB002CB926 /* ProductPriceRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9EA43B20AF0EBB002CB926 /* ProductPriceRange.swift */; };
9A9EA44320AF0EBB002CB926 /* ProductPriceRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9EA43B20AF0EBB002CB926 /* ProductPriceRange.swift */; };
9A9EA44420AF0EBB002CB926 /* ProductPriceRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9EA43B20AF0EBB002CB926 /* ProductPriceRange.swift */; };
9AA01A5F1F3DEBF6007F5380 /* PassKit+PayCardBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA01A5E1F3DEBF6007F5380 /* PassKit+PayCardBrand.swift */; };
9AA01A621F3E2035007F5380 /* PayCardBrandTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA01A611F3E2035007F5380 /* PayCardBrandTests.swift */; };
9AA416C71EE095AA0060029B /* Article.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416C21EE095AA0060029B /* Article.swift */; };
Expand Down Expand Up @@ -650,6 +659,9 @@
9A664D711EF05F97001BFB01 /* MD5.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MD5.m; sourceTree = "<group>"; };
9A664D7F1EF159F8001BFB01 /* MD5Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MD5Tests.swift; sourceTree = "<group>"; };
9A6F3BA81EBB6A7500B149F4 /* Graph.CacheTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Graph.CacheTests.swift; sourceTree = "<group>"; };
9A9EA43920AF0EBA002CB926 /* DisplayableError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DisplayableError.swift; sourceTree = "<group>"; };
9A9EA43A20AF0EBA002CB926 /* MoneyV2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoneyV2.swift; sourceTree = "<group>"; };
9A9EA43B20AF0EBB002CB926 /* ProductPriceRange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProductPriceRange.swift; sourceTree = "<group>"; };
9AA01A5E1F3DEBF6007F5380 /* PassKit+PayCardBrand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PassKit+PayCardBrand.swift"; sourceTree = "<group>"; };
9AA01A611F3E2035007F5380 /* PayCardBrandTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PayCardBrandTests.swift; sourceTree = "<group>"; };
9AA416C21EE095AA0060029B /* Article.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Article.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -826,6 +838,7 @@
9A0C802C1EAA51C50020F187 /* CustomerUpdateInput.swift */,
9A0C802D1EAA51C50020F187 /* CustomerUpdatePayload.swift */,
9A52D3A41F3CA5DB00C093C8 /* DigitalWallet.swift */,
9A9EA43920AF0EBA002CB926 /* DisplayableError.swift */,
9A0C802E1EAA51C50020F187 /* Domain.swift */,
9A0C802F1EAA51C50020F187 /* Image.swift */,
9A0C80301EAA51C50020F187 /* ImageConnection.swift */,
Expand All @@ -835,6 +848,7 @@
9A0C80331EAA51C50020F187 /* MailingAddressConnection.swift */,
9A0C80341EAA51C50020F187 /* MailingAddressEdge.swift */,
9A0C80351EAA51C50020F187 /* MailingAddressInput.swift */,
9A9EA43A20AF0EBA002CB926 /* MoneyV2.swift */,
9A0C80361EAA51C50020F187 /* Mutation.swift */,
9A0C80371EAA51C50020F187 /* Node.swift */,
9A0C80381EAA51C50020F187 /* Order.swift */,
Expand All @@ -856,6 +870,7 @@
9A0C80461EAA51C50020F187 /* ProductEdge.swift */,
9A52D3A01F3CA58E00C093C8 /* ProductImageSortKeys.swift */,
9A0C80471EAA51C50020F187 /* ProductOption.swift */,
9A9EA43B20AF0EBB002CB926 /* ProductPriceRange.swift */,
9A0C80481EAA51C50020F187 /* ProductSortKeys.swift */,
9A0C80491EAA51C50020F187 /* ProductVariant.swift */,
9A0C804A1EAA51C50020F187 /* ProductVariantConnection.swift */,
Expand Down Expand Up @@ -1493,6 +1508,7 @@
9AC2EF6C1F6818180037E0D7 /* Header.swift in Sources */,
9AC2EF6D1F6818180037E0D7 /* CommentAuthor.swift in Sources */,
9AC2EF6E1F6818180037E0D7 /* ProductVariantConnection.swift in Sources */,
9A9EA44320AF0EBB002CB926 /* ProductPriceRange.swift in Sources */,
9AC2EF6F1F6818180037E0D7 /* Comment.swift in Sources */,
9AC2EF701F6818180037E0D7 /* CustomerResetInput.swift in Sources */,
9AC2EF711F6818180037E0D7 /* CustomerAccessTokenDeletePayload.swift in Sources */,
Expand Down Expand Up @@ -1523,6 +1539,7 @@
9AC2EF8A1F6818180037E0D7 /* CropRegion.swift in Sources */,
9A41E2A61F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift in Sources */,
9AC2EF8B1F6818180037E0D7 /* CheckoutLineItemsRemovePayload.swift in Sources */,
9A9EA44020AF0EBB002CB926 /* MoneyV2.swift in Sources */,
9AC2EF8C1F6818180037E0D7 /* StringConnection.swift in Sources */,
9AC2EF8D1F6818180037E0D7 /* Graph.CacheItem.swift in Sources */,
9AC2EF8E1F6818180037E0D7 /* BlogSortKeys.swift in Sources */,
Expand Down Expand Up @@ -1559,6 +1576,7 @@
9AC2EFAC1F6818180037E0D7 /* Collection.swift in Sources */,
9AC2EFAD1F6818180037E0D7 /* CustomerResetPayload.swift in Sources */,
9AC2EFAE1F6818180037E0D7 /* ArticleSortKeys.swift in Sources */,
9A9EA43D20AF0EBB002CB926 /* DisplayableError.swift in Sources */,
9AC2EFAF1F6818180037E0D7 /* CardBrand.swift in Sources */,
9AC2EFB01F6818180037E0D7 /* CheckoutCreateInput.swift in Sources */,
9AC2EFB11F6818180037E0D7 /* OrderSortKeys.swift in Sources */,
Expand Down Expand Up @@ -1639,6 +1657,7 @@
9A49DC831EC4AD580053710B /* Header.swift in Sources */,
9AA416D91EE095BB0060029B /* CommentAuthor.swift in Sources */,
9A0C80A91EAA51C50020F187 /* ProductVariantConnection.swift in Sources */,
9A9EA44220AF0EBB002CB926 /* ProductPriceRange.swift in Sources */,
9AA416D81EE095BB0060029B /* Comment.swift in Sources */,
9A0C80891EAA51C50020F187 /* CustomerResetInput.swift in Sources */,
9A0C807F1EAA51C50020F187 /* CustomerAccessTokenDeletePayload.swift in Sources */,
Expand Down Expand Up @@ -1669,6 +1688,7 @@
9A0C80791EAA51C50020F187 /* CropRegion.swift in Sources */,
9A41E2A71F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift in Sources */,
9A0C806E1EAA51C50020F187 /* CheckoutLineItemsRemovePayload.swift in Sources */,
9A9EA43F20AF0EBB002CB926 /* MoneyV2.swift in Sources */,
9A125CFF1F16A0E0008DCF38 /* StringConnection.swift in Sources */,
9AA7AC761EBB77660014D95D /* Graph.CacheItem.swift in Sources */,
9AA416D31EE095B20060029B /* BlogSortKeys.swift in Sources */,
Expand Down Expand Up @@ -1705,6 +1725,7 @@
9A0C80731EAA51C50020F187 /* Collection.swift in Sources */,
9A0C808A1EAA51C50020F187 /* CustomerResetPayload.swift in Sources */,
9AA416CB1EE095AA0060029B /* ArticleSortKeys.swift in Sources */,
9A9EA43C20AF0EBB002CB926 /* DisplayableError.swift in Sources */,
9A52D3A31F3CA58E00C093C8 /* CardBrand.swift in Sources */,
9A0C80621EAA51C50020F187 /* CheckoutCreateInput.swift in Sources */,
9A0C80A01EAA51C50020F187 /* OrderSortKeys.swift in Sources */,
Expand Down Expand Up @@ -1785,6 +1806,7 @@
9AF255E61F6FEE50005BB0C9 /* Header.swift in Sources */,
9AF255E71F6FEE50005BB0C9 /* CommentAuthor.swift in Sources */,
9AF255E81F6FEE50005BB0C9 /* ProductVariantConnection.swift in Sources */,
9A9EA44420AF0EBB002CB926 /* ProductPriceRange.swift in Sources */,
9AF255E91F6FEE50005BB0C9 /* Comment.swift in Sources */,
9AF255EA1F6FEE50005BB0C9 /* CustomerResetInput.swift in Sources */,
9AF255EB1F6FEE50005BB0C9 /* CustomerAccessTokenDeletePayload.swift in Sources */,
Expand Down Expand Up @@ -1815,6 +1837,7 @@
9AF256041F6FEE50005BB0C9 /* CropRegion.swift in Sources */,
9A41E2A81F85096B0059485A /* CheckoutDiscountCodeApplyPayload.swift in Sources */,
9AF256051F6FEE50005BB0C9 /* CheckoutLineItemsRemovePayload.swift in Sources */,
9A9EA44120AF0EBB002CB926 /* MoneyV2.swift in Sources */,
9AF256061F6FEE50005BB0C9 /* StringConnection.swift in Sources */,
9AF256071F6FEE50005BB0C9 /* Graph.CacheItem.swift in Sources */,
9AF256081F6FEE50005BB0C9 /* BlogSortKeys.swift in Sources */,
Expand Down Expand Up @@ -1851,6 +1874,7 @@
9AF256261F6FEE50005BB0C9 /* Collection.swift in Sources */,
9AF256271F6FEE50005BB0C9 /* CustomerResetPayload.swift in Sources */,
9AF256281F6FEE50005BB0C9 /* ArticleSortKeys.swift in Sources */,
9A9EA43E20AF0EBB002CB926 /* DisplayableError.swift in Sources */,
9AF256291F6FEE50005BB0C9 /* CardBrand.swift in Sources */,
9AF2562A1F6FEE50005BB0C9 /* CheckoutCreateInput.swift in Sources */,
9AF2562B1F6FEE50005BB0C9 /* OrderSortKeys.swift in Sources */,
Expand Down Expand Up @@ -1930,11 +1954,11 @@
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 3.1.5;
CURRENT_PROJECT_VERSION = 3.1.6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.1.5;
DYLIB_CURRENT_VERSION = 3.1.6;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Pay/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -1955,11 +1979,11 @@
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 3.1.5;
CURRENT_PROJECT_VERSION = 3.1.6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.1.5;
DYLIB_CURRENT_VERSION = 3.1.6;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Pay/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down Expand Up @@ -2008,11 +2032,11 @@
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3.1.5;
CURRENT_PROJECT_VERSION = 3.1.6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.1.5;
DYLIB_CURRENT_VERSION = 3.1.6;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Buy/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -2035,11 +2059,11 @@
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3.1.5;
CURRENT_PROJECT_VERSION = 3.1.6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.1.5;
DYLIB_CURRENT_VERSION = 3.1.6;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Buy/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down Expand Up @@ -2174,11 +2198,11 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 3.1.5;
CURRENT_PROJECT_VERSION = 3.1.6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.1.5;
DYLIB_CURRENT_VERSION = 3.1.6;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Buy/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -2196,11 +2220,11 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 3.1.5;
CURRENT_PROJECT_VERSION = 3.1.6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.1.5;
DYLIB_CURRENT_VERSION = 3.1.6;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Buy/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -2219,11 +2243,11 @@
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3.1.5;
CURRENT_PROJECT_VERSION = 3.1.6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.1.5;
DYLIB_CURRENT_VERSION = 3.1.6;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Buy/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -2248,11 +2272,11 @@
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3.1.5;
CURRENT_PROJECT_VERSION = 3.1.6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 3.1.5;
DYLIB_CURRENT_VERSION = 3.1.6;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Buy/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down
24 changes: 24 additions & 0 deletions Buy/Generated/Storefront/Article.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ extension Storefront {
return self
}

/// A human-friendly unique string for the Article automatically generated from
/// its title.
@discardableResult
open func handle(alias: String? = nil) -> ArticleQuery {
addField(field: "handle", aliasSuffix: alias)
return self
}

/// Globally unique identifier.
@discardableResult
open func id(alias: String? = nil) -> ArticleQuery {
Expand Down Expand Up @@ -267,6 +275,12 @@ extension Storefront {
}
return value

case "handle":
guard let value = value as? String else {
throw SchemaViolationError(type: Article.self, field: fieldName, value: fieldValue)
}
return value

case "id":
guard let value = value as? String else {
throw SchemaViolationError(type: Article.self, field: fieldName, value: fieldValue)
Expand Down Expand Up @@ -384,6 +398,16 @@ extension Storefront {
return field(field: "excerptHtml", aliasSuffix: alias) as! String?
}

/// A human-friendly unique string for the Article automatically generated from
/// its title.
open var handle: String {
return internalGetHandle()
}

func internalGetHandle(alias: String? = nil) -> String {
return field(field: "handle", aliasSuffix: alias) as! String
}

/// Globally unique identifier.
open var id: GraphQL.ID {
return internalGetId()
Expand Down
24 changes: 24 additions & 0 deletions Buy/Generated/Storefront/Blog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ extension Storefront {
return self
}

/// A human-friendly unique string for the Blog automatically generated from
/// its title.
@discardableResult
open func handle(alias: String? = nil) -> BlogQuery {
addField(field: "handle", aliasSuffix: alias)
return self
}

/// Globally unique identifier.
@discardableResult
open func id(alias: String? = nil) -> BlogQuery {
Expand Down Expand Up @@ -106,6 +114,12 @@ extension Storefront {
}
return try ArticleConnection(fields: value)

case "handle":
guard let value = value as? String else {
throw SchemaViolationError(type: Blog.self, field: fieldName, value: fieldValue)
}
return value

case "id":
guard let value = value as? String else {
throw SchemaViolationError(type: Blog.self, field: fieldName, value: fieldValue)
Expand Down Expand Up @@ -142,6 +156,16 @@ extension Storefront {
return field(field: "articles", aliasSuffix: alias) as! Storefront.ArticleConnection
}

/// A human-friendly unique string for the Blog automatically generated from
/// its title.
open var handle: String {
return internalGetHandle()
}

func internalGetHandle(alias: String? = nil) -> String {
return field(field: "handle", aliasSuffix: alias) as! String
}

/// Globally unique identifier.
open var id: GraphQL.ID {
return internalGetId()
Expand Down
3 changes: 3 additions & 0 deletions Buy/Generated/Storefront/CountryCode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ extension Storefront {
/// Bolivia
case bo = "BO"

/// Bonaire, Sint Eustatius and Saba
case bq = "BQ"

/// Brazil
case br = "BR"

Expand Down
3 changes: 3 additions & 0 deletions Buy/Generated/Storefront/CurrencyCode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ extension Storefront {
/// Bahraini Dinar (BHD)
case bhd = "BHD"

/// Burundian Franc (BIF)
case bif = "BIF"

/// Brunei Dollar (BND)
case bnd = "BND"

Expand Down
3 changes: 3 additions & 0 deletions Buy/Generated/Storefront/DigitalWallet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ extension Storefront {
/// Apple Pay
case applePay = "APPLE_PAY"

/// Google Pay
case googlePay = "GOOGLE_PAY"

/// Shopify Pay
case shopifyPay = "SHOPIFY_PAY"

Expand Down
Loading

0 comments on commit ae59031

Please sign in to comment.