Commit d2d1cf3b by Brent Gulanowski

Add Buy Model file, new build phase, and machine-generated files.

parent b52082c0
......@@ -132,6 +132,8 @@
84D915501CC03F1600D334FB /* BUYModelManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D915491CC03F1600D334FB /* BUYModelManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
84D915511CC03F1600D334FB /* BUYModelManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D9154A1CC03F1600D334FB /* BUYModelManager.m */; };
84D915521CC03F1600D334FB /* BUYModelManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 84D9154A1CC03F1600D334FB /* BUYModelManager.m */; };
84D915581CC040C300D334FB /* Mobile Buy SDK.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 84D915561CC040C300D334FB /* Mobile Buy SDK.xcdatamodeld */; };
84D915591CC040C300D334FB /* Mobile Buy SDK.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 84D915561CC040C300D334FB /* Mobile Buy SDK.xcdatamodeld */; };
9003969B1B601DF400226B73 /* BUYCartLineItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 900396991B601DF400226B73 /* BUYCartLineItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
9003969C1B601DF400226B73 /* BUYCartLineItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 9003969A1B601DF400226B73 /* BUYCartLineItem.m */; };
900396AC1B627CB900226B73 /* BUYProductView.h in Headers */ = {isa = PBXBuildFile; fileRef = 900396AA1B627CB900226B73 /* BUYProductView.h */; };
......@@ -463,6 +465,7 @@
849110411CCE9E0A00E53B93 /* BUYEntityDescriptionAdditionsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BUYEntityDescriptionAdditionsTests.m; sourceTree = "<group>"; };
849110431CCE9F3F00E53B93 /* BUYTransformerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BUYTransformerTests.m; sourceTree = "<group>"; };
849110461CCEA85C00E53B93 /* BUYObserverTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BUYObserverTests.m; sourceTree = "<group>"; };
8465CF441CC13CFE0010B2E6 /* Templates */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Templates; sourceTree = "<group>"; };
84980F281CB75AC200CFAB58 /* BUYObjectProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BUYObjectProtocol.h; sourceTree = "<group>"; };
84980F2B1CB75B5E00CFAB58 /* BUYModelManagerProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BUYModelManagerProtocol.h; sourceTree = "<group>"; };
84980F2E1CB75C2900CFAB58 /* NSEntityDescription+BUYAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSEntityDescription+BUYAdditions.h"; sourceTree = "<group>"; };
......@@ -487,6 +490,48 @@
84D915481CC03F1600D334FB /* BUYManagedObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BUYManagedObject.m; sourceTree = "<group>"; };
84D915491CC03F1600D334FB /* BUYModelManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BUYModelManager.h; sourceTree = "<group>"; };
84D9154A1CC03F1600D334FB /* BUYModelManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BUYModelManager.m; sourceTree = "<group>"; };
84D915551CC0400500D334FB /* Scripts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Scripts; path = ../Scripts; sourceTree = "<group>"; };
84D915571CC040C300D334FB /* Mobile Buy SDK.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Mobile Buy SDK.xcdatamodel"; sourceTree = "<group>"; };
84D9155A1CC0416800D334FB /* _BUYCart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYCart.h; sourceTree = "<group>"; };
84D9155B1CC0416800D334FB /* _BUYCart.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYCart.m; sourceTree = "<group>"; };
84D9155C1CC0416800D334FB /* _BUYCartLineItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYCartLineItem.h; sourceTree = "<group>"; };
84D9155D1CC0416800D334FB /* _BUYCartLineItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYCartLineItem.m; sourceTree = "<group>"; };
84D9155E1CC0416800D334FB /* _BUYCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYCollection.h; sourceTree = "<group>"; };
84D9155F1CC0416800D334FB /* _BUYCollection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYCollection.m; sourceTree = "<group>"; };
84D915601CC0416800D334FB /* _BUYCustomer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYCustomer.h; sourceTree = "<group>"; };
84D915611CC0416800D334FB /* _BUYCustomer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYCustomer.m; sourceTree = "<group>"; };
84D915621CC0416800D334FB /* _BUYImageLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYImageLink.h; sourceTree = "<group>"; };
84D915631CC0416800D334FB /* _BUYImageLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYImageLink.m; sourceTree = "<group>"; };
84D915641CC0416800D334FB /* _BUYLineItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYLineItem.h; sourceTree = "<group>"; };
84D915651CC0416800D334FB /* _BUYLineItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYLineItem.m; sourceTree = "<group>"; };
84D915661CC0416800D334FB /* _BUYOption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYOption.h; sourceTree = "<group>"; };
84D915671CC0416800D334FB /* _BUYOption.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYOption.m; sourceTree = "<group>"; };
84D915681CC0416800D334FB /* _BUYOptionValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYOptionValue.h; sourceTree = "<group>"; };
84D915691CC0416800D334FB /* _BUYOptionValue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYOptionValue.m; sourceTree = "<group>"; };
84D9156A1CC0416800D334FB /* _BUYOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYOrder.h; sourceTree = "<group>"; };
84D9156B1CC0416800D334FB /* _BUYOrder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYOrder.m; sourceTree = "<group>"; };
84D9156C1CC0416800D334FB /* _BUYProduct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYProduct.h; sourceTree = "<group>"; };
84D9156D1CC0416800D334FB /* _BUYProduct.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYProduct.m; sourceTree = "<group>"; };
84D9156E1CC0416800D334FB /* _BUYProductVariant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYProductVariant.h; sourceTree = "<group>"; };
84D9156F1CC0416800D334FB /* _BUYProductVariant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYProductVariant.m; sourceTree = "<group>"; };
84D915701CC0416800D334FB /* _BUYShop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYShop.h; sourceTree = "<group>"; };
84D915711CC0416800D334FB /* _BUYShop.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYShop.m; sourceTree = "<group>"; };
84D915721CC0416800D334FB /* BUYCustomer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BUYCustomer.h; sourceTree = "<group>"; };
84D915731CC0416800D334FB /* BUYCustomer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BUYCustomer.m; sourceTree = "<group>"; };
84D915A81CC0417700D334FB /* _BUYAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYAddress.h; sourceTree = "<group>"; };
84D915A91CC0417700D334FB /* _BUYAddress.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYAddress.m; sourceTree = "<group>"; };
84D915AA1CC0417700D334FB /* _BUYCheckout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYCheckout.h; sourceTree = "<group>"; };
84D915AB1CC0417700D334FB /* _BUYCheckout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYCheckout.m; sourceTree = "<group>"; };
84D915AC1CC0417700D334FB /* _BUYDiscount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYDiscount.h; sourceTree = "<group>"; };
84D915AD1CC0417700D334FB /* _BUYDiscount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYDiscount.m; sourceTree = "<group>"; };
84D915AE1CC0417700D334FB /* _BUYGiftCard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYGiftCard.h; sourceTree = "<group>"; };
84D915AF1CC0417700D334FB /* _BUYGiftCard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYGiftCard.m; sourceTree = "<group>"; };
84D915B01CC0417700D334FB /* _BUYMaskedCreditCard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYMaskedCreditCard.h; sourceTree = "<group>"; };
84D915B11CC0417700D334FB /* _BUYMaskedCreditCard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYMaskedCreditCard.m; sourceTree = "<group>"; };
84D915B21CC0417700D334FB /* _BUYShippingRate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYShippingRate.h; sourceTree = "<group>"; };
84D915B31CC0417700D334FB /* _BUYShippingRate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYShippingRate.m; sourceTree = "<group>"; };
84D915B41CC0417700D334FB /* _BUYTaxLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _BUYTaxLine.h; sourceTree = "<group>"; };
84D915B51CC0417700D334FB /* _BUYTaxLine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _BUYTaxLine.m; sourceTree = "<group>"; };
900396991B601DF400226B73 /* BUYCartLineItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BUYCartLineItem.h; sourceTree = "<group>"; };
9003969A1B601DF400226B73 /* BUYCartLineItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BUYCartLineItem.m; sourceTree = "<group>"; };
900396AA1B627CB900226B73 /* BUYProductView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = BUYProductView.h; path = "Product View/BUYProductView.h"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
......@@ -713,6 +758,20 @@
841ADE2A1CB6F31C000004B0 /* Transient */ = {
isa = PBXGroup;
children = (
84D915A81CC0417700D334FB /* _BUYAddress.h */,
84D915A91CC0417700D334FB /* _BUYAddress.m */,
84D915AA1CC0417700D334FB /* _BUYCheckout.h */,
84D915AB1CC0417700D334FB /* _BUYCheckout.m */,
84D915AC1CC0417700D334FB /* _BUYDiscount.h */,
84D915AD1CC0417700D334FB /* _BUYDiscount.m */,
84D915AE1CC0417700D334FB /* _BUYGiftCard.h */,
84D915AF1CC0417700D334FB /* _BUYGiftCard.m */,
84D915B01CC0417700D334FB /* _BUYMaskedCreditCard.h */,
84D915B11CC0417700D334FB /* _BUYMaskedCreditCard.m */,
84D915B21CC0417700D334FB /* _BUYShippingRate.h */,
84D915B31CC0417700D334FB /* _BUYShippingRate.m */,
84D915B41CC0417700D334FB /* _BUYTaxLine.h */,
84D915B51CC0417700D334FB /* _BUYTaxLine.m */,
90AFAA601B01390F00F21C23 /* BUYAddress.h */,
90AFAA611B01390F00F21C23 /* BUYAddress.m */,
BEB74A1B1B5490140005A300 /* BUYCheckout_Private.h */,
......@@ -737,6 +796,32 @@
841ADE2B1CB6F320000004B0 /* Persistent */ = {
isa = PBXGroup;
children = (
84D9155A1CC0416800D334FB /* _BUYCart.h */,
84D9155B1CC0416800D334FB /* _BUYCart.m */,
84D9155C1CC0416800D334FB /* _BUYCartLineItem.h */,
84D9155D1CC0416800D334FB /* _BUYCartLineItem.m */,
84D9155E1CC0416800D334FB /* _BUYCollection.h */,
84D9155F1CC0416800D334FB /* _BUYCollection.m */,
84D915601CC0416800D334FB /* _BUYCustomer.h */,
84D915611CC0416800D334FB /* _BUYCustomer.m */,
84D915621CC0416800D334FB /* _BUYImageLink.h */,
84D915631CC0416800D334FB /* _BUYImageLink.m */,
84D915641CC0416800D334FB /* _BUYLineItem.h */,
84D915651CC0416800D334FB /* _BUYLineItem.m */,
84D915661CC0416800D334FB /* _BUYOption.h */,
84D915671CC0416800D334FB /* _BUYOption.m */,
84D915681CC0416800D334FB /* _BUYOptionValue.h */,
84D915691CC0416800D334FB /* _BUYOptionValue.m */,
84D9156A1CC0416800D334FB /* _BUYOrder.h */,
84D9156B1CC0416800D334FB /* _BUYOrder.m */,
84D9156C1CC0416800D334FB /* _BUYProduct.h */,
84D9156D1CC0416800D334FB /* _BUYProduct.m */,
84D9156E1CC0416800D334FB /* _BUYProductVariant.h */,
84D9156F1CC0416800D334FB /* _BUYProductVariant.m */,
84D915701CC0416800D334FB /* _BUYShop.h */,
84D915711CC0416800D334FB /* _BUYShop.m */,
84D915721CC0416800D334FB /* BUYCustomer.h */,
84D915731CC0416800D334FB /* BUYCustomer.m */,
F773744719C77A210039681C /* BUYCart.h */,
F773744819C77A210039681C /* BUYCart.m */,
900396991B601DF400226B73 /* BUYCartLineItem.h */,
......@@ -954,6 +1039,7 @@
isa = PBXGroup;
children = (
90E80E451AFBBB59003A9909 /* docs */,
84D915551CC0400500D334FB /* Scripts */,
F773743A19C777200039681C /* Mobile Buy SDK */,
90F592ED1B0D5EFE0026B382 /* Mobile Buy SDK Tests */,
F773741E19C770CB0039681C /* Products */,
......@@ -984,9 +1070,6 @@
F773744419C779C20039681C /* Models */ = {
isa = PBXGroup;
children = (
84980F271CB75A7A00CFAB58 /* Protocols */,
841ADE2B1CB6F320000004B0 /* Persistent */,
841ADE2A1CB6F31C000004B0 /* Transient */,
F77374AA19C796BD0039681C /* BUYCreditCard.h */,
F77374AB19C796BD0039681C /* BUYCreditCard.m */,
BE47340D1B66C4EF00AA721A /* BUYError.h */,
......@@ -1000,6 +1083,11 @@
84D915411CC0359700D334FB /* BUYObserver.h */,
84D915421CC0359700D334FB /* BUYObserver.m */,
F76CFF1E19CB7C500079C703 /* BUYSerializable.h */,
84D915561CC040C300D334FB /* Mobile Buy SDK.xcdatamodeld */,
841ADE2B1CB6F320000004B0 /* Persistent */,
84980F271CB75A7A00CFAB58 /* Protocols */,
841ADE2A1CB6F31C000004B0 /* Transient */,
8465CF441CC13CFE0010B2E6 /* Templates */,
);
path = Models;
sourceTree = "<group>";
......@@ -1260,6 +1348,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 9019316D1BC5B9BC00D1134E /* Build configuration list for PBXNativeTarget "Buy" */;
buildPhases = (
84D915531CC03FB800D334FB /* Generate Models */,
901930E21BC5B9BC00D1134E /* Sources */,
901931251BC5B9BC00D1134E /* Frameworks */,
901931261BC5B9BC00D1134E /* Headers */,
......@@ -1296,6 +1385,7 @@
isa = PBXNativeTarget;
buildConfigurationList = BE9A64411B503C2F0033E558 /* Build configuration list for PBXNativeTarget "Buy Static" */;
buildPhases = (
84D915541CC03FD100D334FB /* Generate Models */,
BE9A64231B503C2F0033E558 /* Sources */,
BE9A64241B503C2F0033E558 /* Frameworks */,
BE9A64251B503C2F0033E558 /* Headers */,
......@@ -1384,6 +1474,34 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
84D915531CC03FB800D334FB /* Generate Models */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Generate Models";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "bash \"${PROJECT_DIR}/../Scripts/generate_models.sh\"";
};
84D915541CC03FD100D334FB /* Generate Models */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Generate Models";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "bash \"${PROJECT_DIR}/../Scripts/generate_models.sh\"";
};
904FB61F1AE03DCF00EA1758 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 12;
......@@ -1497,6 +1615,7 @@
84980F4F1CB7613700CFAB58 /* BUYIdentityTransformer.m in Sources */,
901931221BC5B9BC00D1134E /* BUYShop.m in Sources */,
901931231BC5B9BC00D1134E /* BUYObject.m in Sources */,
84D915591CC040C300D334FB /* Mobile Buy SDK.xcdatamodeld in Sources */,
901931241BC5B9BC00D1134E /* BUYProductDescriptionCell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -1616,6 +1735,7 @@
84980F4E1CB7613700CFAB58 /* BUYIdentityTransformer.m in Sources */,
BE9A64671B503D060033E558 /* BUYShop.m in Sources */,
BE9A645E1B503CE60033E558 /* BUYObject.m in Sources */,
84D915581CC040C300D334FB /* Mobile Buy SDK.xcdatamodeld in Sources */,
BEB74A6C1B55641D0005A300 /* BUYProductDescriptionCell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -1988,6 +2108,19 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCVersionGroup section */
84D915561CC040C300D334FB /* Mobile Buy SDK.xcdatamodeld */ = {
isa = XCVersionGroup;
children = (
84D915571CC040C300D334FB /* Mobile Buy SDK.xcdatamodel */,
);
currentVersion = 84D915571CC040C300D334FB /* Mobile Buy SDK.xcdatamodel */;
path = "Mobile Buy SDK.xcdatamodeld";
sourceTree = "<group>";
versionGroupType = wrapper.xcdatamodel;
};
/* End XCVersionGroup section */
};
rootObject = F773741519C770CB0039681C /* Project object */;
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10158" systemVersion="15D21" minimumToolsVersion="Xcode 7.0">
<entity name="Address" representedClassName="BUYAddress" syncable="YES">
<attribute name="address1" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The street address of the address."/>
</userInfo>
</attribute>
<attribute name="address2" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="An optional additional field for the street address of the address."/>
</userInfo>
</attribute>
<attribute name="city" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The city of the address."/>
</userInfo>
</attribute>
<attribute name="company" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The company of the person associated with the address (optional)."/>
</userInfo>
</attribute>
<attribute name="country" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The name of the country of the address."/>
</userInfo>
</attribute>
<attribute name="countryCode" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country of the address."/>
</userInfo>
</attribute>
<attribute name="firstName" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The first name of the person associated with the payment method."/>
</userInfo>
</attribute>
<attribute name="lastName" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The last name of the person associated with the payment method."/>
</userInfo>
</attribute>
<attribute name="phone" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The phone number at the address."/>
</userInfo>
</attribute>
<attribute name="province" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The name of the state or province of the address"/>
</userInfo>
</attribute>
<attribute name="provinceCode" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The two-letter abbreviation of the state or province of the address."/>
</userInfo>
</attribute>
<attribute name="zip" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The zip or postal code of the address."/>
</userInfo>
</attribute>
<userInfo>
<entry key="documentation" value="A BUYAddress represents a shipping or billing address on an order. This will be associated with the customer upon completion."/>
</userInfo>
</entity>
<entity name="Cart" representedClassName="BUYCart" syncable="YES">
<relationship name="lineItems" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="CartLineItem" inverseName="cart" inverseEntity="CartLineItem" syncable="YES">
<userInfo>
<entry key="discussion" value="These are different from BUYLineItem objects. The line item objects do include the BUYProductVariant."/>
<entry key="documentation" value="Array of BUYCartLineItem objects in the cart"/>
</userInfo>
</relationship>
<userInfo>
<entry key="discussion" value="The BUYCart is the starting point for the Checkout API. You are responsible for building a cart, then transforming it into a BUYCheckout using the BUYDataClient. Private to app."/>
<entry key="documentation" value="A collection of products the user intends to purchase."/>
<entry key="private" value="YES"/>
</userInfo>
</entity>
<entity name="CartLineItem" representedClassName="BUYCartLineItem" syncable="YES">
<attribute name="quantity" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The quantity of the line item."/>
</userInfo>
</attribute>
<relationship name="cart" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Cart" inverseName="lineItems" inverseEntity="Cart" syncable="YES">
<userInfo>
<entry key="documentation" value="The inverse relationship of Cart.lineItems."/>
</userInfo>
</relationship>
<relationship name="variant" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="ProductVariant" inverseName="cartLineItems" inverseEntity="ProductVariant" syncable="YES">
<userInfo>
<entry key="documentation" value="The BUYProductVariant object associated with the line item when created using the preferred `initWithVariant:` initializer."/>
</userInfo>
</relationship>
<userInfo>
<entry key="documentation" value="A line item that references a product variant. Private to app."/>
<entry key="private" value="YES"/>
</userInfo>
</entity>
<entity name="Checkout" representedClassName="BUYCheckout" syncable="YES">
<attribute name="cartToken" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="Unique token for a cart which can be used to convert to a checkout"/>
</userInfo>
</attribute>
<attribute name="channelId" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="Channel ID where the checkout was created."/>
</userInfo>
</attribute>
<attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES"/>
<attribute name="currency" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The three letter code (ISO 4217) for the currency used for the payment."/>
</userInfo>
</attribute>
<attribute name="customerId" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES">
<userInfo>
<entry key="documentation" value="Customer ID associated with the checkout."/>
</userInfo>
</attribute>
<attribute name="email" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The customer's email address."/>
</userInfo>
</attribute>
<attribute name="includesTaxes" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo>
<entry key="discussion" value="Maps to &quot;taxes_included&quot; in JSON."/>
<entry key="documentation" value="States whether or not the taxes are included in the price."/>
<entry key="JSONPropertyKey" value="taxes_included"/>
</userInfo>
</attribute>
<attribute name="marketingAttribution" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSDictionary"/>
<entry key="discussion" value="Contains the application name and platform (defaults to applicationName set on the BUYClient, and &quot;iOS&quot; respectively."/>
<entry key="documentation" value="Attributions for the checkout."/>
</userInfo>
</attribute>
<attribute name="note" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="An optional note attached to the order."/>
</userInfo>
</attribute>
<attribute name="partialAddresses" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo>
<entry key="discussion" value="Suitable to retrieve shipping rates."/>
<entry key="documentation" value="Informs server that the shipping address is partially filled with address info provided by PKPaymentAuthorizationViewController. Should only ever be YES. Setting to NO will throw an exception."/>
</userInfo>
</attribute>
<attribute name="paymentDue" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="Amount of payment due on the checkout."/>
</userInfo>
</attribute>
<attribute name="paymentSessionId" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The Payment Session ID associated with a credit card transaction."/>
</userInfo>
</attribute>
<attribute name="paymentURL" optional="YES" attributeType="Transformable" valueTransformerName="" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
<entry key="documentation" value="URL to the payment gateway."/>
<entry key="JSONValueTransformer" value="BUYURL"/>
</userInfo>
</attribute>
<attribute name="privacyPolicyURL" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
<entry key="documentation" value="The website URL for the privacy policy for the checkout."/>
</userInfo>
</attribute>
<attribute name="refundPolicyURL" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
<entry key="documentation" value="The website URL for the refund policy for the checkout."/>
</userInfo>
</attribute>
<attribute name="requiresShipping" optional="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES">
<userInfo>
<entry key="documentation" value="States whether or not the fulfillment requires shipping"/>
</userInfo>
</attribute>
<attribute name="reservationTime" optional="YES" attributeType="Integer 32" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="discussion" value="Setting to zero and updating the checkout will release inventory reserved by the checkout (when product inventory is not infinite). 300 seconds is default and maximum. `reservationTime` is reset to @300 on every `updateCheckout:completion:` call. This can also be done with `removeProductReservationsFromCheckout:completion` found in the BUYClient."/>
<entry key="documentation" value="Reservation time on the checkout in seconds."/>
</userInfo>
</attribute>
<attribute name="reservationTimeLeft" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES">
<userInfo>
<entry key="documentation" value="Reservation time remaining on the checkout in seconds."/>
</userInfo>
</attribute>
<attribute name="shippingRateId" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="sourceIdentifier" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The unique identifier for the source: the channelId."/>
</userInfo>
</attribute>
<attribute name="sourceName" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The name of the source of the checkout: &quot;mobile_app&quot;."/>
</userInfo>
</attribute>
<attribute name="subtotalPrice" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="Price of the order before shipping and taxes."/>
</userInfo>
</attribute>
<attribute name="termsOfServiceURL" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
<entry key="documentation" value="The website URL for the terms of service for the checkout."/>
</userInfo>
</attribute>
<attribute name="token" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="Unique token for the checkout on Shopify."/>
</userInfo>
</attribute>
<attribute name="totalPrice" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The sum of all the prices of all the items in the order, taxes and discounts included."/>
</userInfo>
</attribute>
<attribute name="totalTax" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The sum of all the taxes applied to the line items in the order."/>
</userInfo>
</attribute>
<attribute name="updatedAt" optional="YES" attributeType="Date" syncable="YES"/>
<attribute name="webCheckoutURL" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
<entry key="discussion" value="It is recommended to open the URL in Safari to take advantage of its autocompletion and credit card capture capabilities."/>
<entry key="documentation" value="URL which is used for completing checkout."/>
<entry key="JSONPropertyKey" value="web_url"/>
</userInfo>
</attribute>
<attribute name="webReturnToLabel" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="discussion" value="Defaults to &quot;Return to 'application'&quot;, where 'application' is the `applicationName` set on the BUYClient."/>
<entry key="documentation" value="The button title that will appear after checkout to return to the host app."/>
</userInfo>
</attribute>
<attribute name="webReturnToURL" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
<entry key="discussion" value="Used to return to the app from the web checkout."/>
<entry key="documentation" value="The URL Scheme of the host app."/>
</userInfo>
</attribute>
<relationship name="billingAddress" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Address" syncable="YES"/>
<relationship name="creditCard" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="MaskedCreditCard" inverseName="checkout" inverseEntity="MaskedCreditCard" syncable="YES">
<userInfo>
<entry key="documentation" value="Credit card stored on the checkout."/>
</userInfo>
</relationship>
<relationship name="discount" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="Discount" inverseName="checkout" inverseEntity="Discount" syncable="YES">
<userInfo>
<entry key="discussion" value="Only one discount can be added to a checkout. Call `updateCheckout:completion:` after adding a discount to apply the discount code to the checkout."/>
<entry key="documentation" value="A discount added to the checkout."/>
</userInfo>
</relationship>
<relationship name="giftCards" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="GiftCard" inverseName="redemptions" inverseEntity="GiftCard" syncable="YES">
<userInfo>
<entry key="documentation" value="An array of BUYGiftCard objects applied to the checkout."/>
</userInfo>
</relationship>
<relationship name="lineItems" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="LineItem" inverseName="checkout" inverseEntity="LineItem" syncable="YES">
<userInfo>
<entry key="discussion" value="These are different from BUYCartLineItems in that the line item objects do not include the BUYProductVariant."/>
<entry key="documentation" value="Array of BUYLineItem objects in the checkout."/>
</userInfo>
</relationship>
<relationship name="order" optional="YES" maxCount="1" deletionRule="Deny" destinationEntity="Order" inverseName="checkout" inverseEntity="Order" syncable="YES">
<userInfo>
<entry key="documentation" value="The BUYOrder for a completed checkout."/>
</userInfo>
</relationship>
<relationship name="shippingAddress" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Address" syncable="YES"/>
<relationship name="shippingRate" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="ShippingRate" inverseName="checkout" inverseEntity="ShippingRate" syncable="YES">
<userInfo>
<entry key="documentation" value="The shipping rate chosen for the checkout."/>
</userInfo>
</relationship>
<relationship name="taxLines" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="TaxLine" inverseName="checkout" inverseEntity="TaxLine" syncable="YES">
<userInfo>
<entry key="documentation" value="Array of tax line objects on the checkout."/>
</userInfo>
</relationship>
<userInfo>
<entry key="discussion" value="Do not create a BUYCheckout object directly. Use initWithCart: to transform a BUYCart into a BUYCheckout."/>
<entry key="documentation" value="The checkout object. This is the main object that you will interact with when creating orders on Shopify."/>
</userInfo>
</entity>
<entity name="Collection" representedClassName="BUYCollection" syncable="YES">
<attribute name="collectionId" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES">
<userInfo>
<entry key="documentation" value="The unique collection ID in the channel."/>
</userInfo>
</attribute>
<attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES"/>
<attribute name="handle" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The handle of the collection."/>
</userInfo>
</attribute>
<attribute name="htmlDescription" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="discussion" value="Maps to &quot;body_html&quot; in JSON."/>
<entry key="documentation" value="The html description."/>
<entry key="JSONPropertyKey" value="body_html"/>
</userInfo>
</attribute>
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES"/>
<attribute name="published" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo>
<entry key="documentation" value="The state of whether the collection is currently published or not."/>
</userInfo>
</attribute>
<attribute name="publishedAt" optional="YES" attributeType="Date" syncable="YES">
<userInfo>
<entry key="documentation" value="The publish date for the collection."/>
<entry key="JSONValueTransformer" value="BUYPublicationsDate"/>
</userInfo>
</attribute>
<attribute name="title" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The title of the collection."/>
</userInfo>
</attribute>
<attribute name="updatedAt" optional="YES" attributeType="Date" syncable="YES"/>
<relationship name="image" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="ImageLink" inverseName="collection" inverseEntity="ImageLink" syncable="YES"/>
<relationship name="products" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="Product" inverseName="collections" inverseEntity="Product" syncable="YES">
<userInfo>
<entry key="documentation" value="Inverse of Product.collections."/>
</userInfo>
</relationship>
<userInfo>
<entry key="documentation" value="Represents a collection of products on the shop."/>
</userInfo>
</entity>
<entity name="Customer" representedClassName="BUYCustomer" syncable="YES">
<attribute name="acceptsMarketing" optional="YES" attributeType="Boolean" syncable="YES"/>
<attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES"/>
<attribute name="customerState" optional="YES" attributeType="Boolean" syncable="YES"/>
<attribute name="email" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="firstName" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES"/>
<attribute name="lastName" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="lastOrderID" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES"/>
<attribute name="lastOrderName" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="multipassIdentifier" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="note" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="ordersCount" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES"/>
<attribute name="tags" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="taxExempt" optional="YES" attributeType="Boolean" syncable="YES"/>
<attribute name="totalSpent" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES"/>
<attribute name="updatedAt" optional="YES" attributeType="Date" syncable="YES"/>
<attribute name="verifiedEmail" optional="YES" attributeType="Boolean" syncable="YES"/>
</entity>
<entity name="Discount" representedClassName="BUYDiscount" syncable="YES">
<attribute name="amount" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The amount that is deducted from `paymentDue` on BUYCheckout."/>
</userInfo>
</attribute>
<attribute name="applicable" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo>
<entry key="documentation" value="Whether this discount code can be applied to the checkout."/>
</userInfo>
</attribute>
<attribute name="code" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The unique identifier for the discount code."/>
</userInfo>
</attribute>
<relationship name="checkout" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Checkout" inverseName="discount" inverseEntity="Checkout" syncable="YES">
<userInfo>
<entry key="description" value="Inverse of Checkout.discount."/>
</userInfo>
</relationship>
<userInfo>
<entry key="documentation" value="BUYDiscount represents a discount that is applied to the BUYCheckout."/>
</userInfo>
</entity>
<entity name="GiftCard" representedClassName="BUYGiftCard" syncable="YES">
<attribute name="amountUsed" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The amount of the gift card used by this checkout."/>
</userInfo>
</attribute>
<attribute name="balance" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The amount left on the gift card after being applied to this checkout."/>
</userInfo>
</attribute>
<attribute name="code" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="discussion" value="This is only used when applying a gift card and is not visible on a BUYCheckout object synced with Shopify."/>
<entry key="documentation" value="The gift card code."/>
</userInfo>
</attribute>
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES"/>
<attribute name="lastCharacters" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The last characters of the applied gift card code."/>
</userInfo>
</attribute>
<relationship name="redemptions" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Checkout" inverseName="giftCards" inverseEntity="Checkout" syncable="YES">
<userInfo>
<entry key="documentation" value="Inverse of Checkout.giftCard."/>
</userInfo>
</relationship>
<userInfo>
<entry key="documentation" value="A gift card redeemed as payment on the checkout."/>
</userInfo>
</entity>
<entity name="ImageLink" representedClassName="BUYImageLink" syncable="YES">
<attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES"/>
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES"/>
<attribute name="position" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES">
<userInfo>
<entry key="documentation" value="The position of the image for the product."/>
</userInfo>
</attribute>
<attribute name="sourceURL" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
<entry key="discussion" value="Maps to &quot;src&quot; in JSON."/>
<entry key="documentation" value="Specifies the location of the product image."/>
<entry key="JSONPropertyKey" value="src"/>
</userInfo>
</attribute>
<attribute name="updatedAt" optional="YES" attributeType="Date" syncable="YES"/>
<attribute name="variantIds" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSArray"/>
</userInfo>
</attribute>
<relationship name="collection" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Collection" inverseName="image" inverseEntity="Collection" syncable="YES"/>
<relationship name="product" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Product" inverseName="images" inverseEntity="Product" syncable="YES">
<userInfo>
<entry key="discussion" value="Maps to &quot;product_id&quot; in JSON."/>
<entry key="documentation" value="Inverse of Product.images."/>
<entry key="JSONPropertyKey" value="product_id"/>
</userInfo>
</relationship>
<userInfo>
<entry key="documentation" value="A link to an image representing a product or collection."/>
</userInfo>
</entity>
<entity name="LineItem" representedClassName="BUYLineItem" syncable="YES">
<attribute name="compareAtPrice" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The competitor's prices for the same item."/>
</userInfo>
</attribute>
<attribute name="fulfilled" optional="YES" attributeType="Boolean" syncable="YES"/>
<attribute name="fulfillmentService" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="Service provider who is doing the fulfillment."/>
</userInfo>
</attribute>
<attribute name="grams" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The weight of the BUYProductVariant in grams."/>
</userInfo>
</attribute>
<attribute name="identifier" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="linePrice" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The line price of the item (price * quantity)."/>
</userInfo>
</attribute>
<attribute name="price" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="discussion" value="This price does not need to match the product variant."/>
<entry key="documentation" value="The price of the BUYLineItem."/>
</userInfo>
</attribute>
<attribute name="productId" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES"/>
<attribute name="properties" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSDictionary"/>
<entry key="documentation" value="Custom properties set on the line item."/>
</userInfo>
</attribute>
<attribute name="quantity" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The quantity of the BUYLineItem."/>
</userInfo>
</attribute>
<attribute name="requiresShipping" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo>
<entry key="discussion" value="This needs to match the product variant."/>
<entry key="documentation" value="Whether this BUYLineItem requires shipping."/>
</userInfo>
</attribute>
<attribute name="sku" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The unique SKU for the line item."/>
</userInfo>
</attribute>
<attribute name="taxable" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo>
<entry key="documentation" value="Whether the line item is taxable."/>
</userInfo>
</attribute>
<attribute name="title" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="discussion" value="The title does not need to match the product variant."/>
<entry key="documentation" value="The title of the BUYLineItem."/>
</userInfo>
</attribute>
<attribute name="variantId" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES">
<userInfo>
<entry key="discussion" value="Keep a reference to a cart or products if you wish to display information for product variants in a BUYCheckout."/>
<entry key="documentation" value="BUYProductVariant identifer."/>
</userInfo>
</attribute>
<attribute name="variantTitle" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The title for the variant in the line item."/>
</userInfo>
</attribute>
<relationship name="checkout" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Checkout" inverseName="lineItems" inverseEntity="Checkout" syncable="YES">
<userInfo>
<entry key="documentation" value="Inverse of Checkout.lineItem."/>
</userInfo>
</relationship>
<relationship name="order" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Order" inverseName="lineItems" inverseEntity="Order" syncable="YES"/>
<userInfo>
<entry key="documentation" value="This represents a BUYLineItem on a BUYCart or on a BUYCheckout."/>
</userInfo>
</entity>
<entity name="MaskedCreditCard" representedClassName="BUYMaskedCreditCard" syncable="YES">
<attribute name="expiryMonth" optional="YES" attributeType="Integer 16" defaultValueString="0" syncable="YES">
<userInfo>
<entry key="documentation" value="The two digits representing the month the card expires."/>
</userInfo>
</attribute>
<attribute name="expiryYear" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES">
<userInfo>
<entry key="documentation" value="The year the card expires."/>
</userInfo>
</attribute>
<attribute name="firstDigits" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The first digits of credit card number."/>
</userInfo>
</attribute>
<attribute name="firstName" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The first name on the credit card."/>
</userInfo>
</attribute>
<attribute name="lastDigits" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The last digits of credit card number."/>
</userInfo>
</attribute>
<attribute name="lastName" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The last name on the credit card."/>
</userInfo>
</attribute>
<relationship name="checkout" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Checkout" inverseName="creditCard" inverseEntity="Checkout" syncable="YES">
<userInfo>
<entry key="documentation" value="Inverse of Checkout.creditCard."/>
</userInfo>
</relationship>
<userInfo>
<entry key="documentation" value="This represents a masked credit card that has been applied to a checkout."/>
<entry key="Transient" value="YES"/>
</userInfo>
</entity>
<entity name="Option" representedClassName="BUYOption" syncable="YES">
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES"/>
<attribute name="name" optional="YES" attributeType="String" maxValueString="255" syncable="YES">
<userInfo>
<entry key="discussion" value="255 characters limit each."/>
<entry key="documentation" value="Custom product property names like &quot;Size&quot;, &quot;Color&quot;, and &quot;Material&quot;."/>
</userInfo>
</attribute>
<attribute name="position" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES">
<userInfo>
<entry key="documentation" value="The order in which the option should optionally appear."/>
</userInfo>
</attribute>
<relationship name="product" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Product" inverseName="options" inverseEntity="Product" syncable="YES">
<userInfo>
<entry key="documentation" value="Inverse of Product.options."/>
<entry key="JSONPropertyKey" value="product_id"/>
</userInfo>
</relationship>
<userInfo>
<entry key="documentation" value="The associated product for this option."/>
</userInfo>
</entity>
<entity name="OptionValue" representedClassName="BUYOptionValue" syncable="YES">
<attribute name="name" optional="YES" attributeType="String" maxValueString="255" syncable="YES">
<userInfo>
<entry key="discussion" value="The same as the name of the owning option. 255 characters max."/>
<entry key="documentation" value="Custom product property names like &quot;Size&quot;, &quot;Color&quot;, and &quot;Material&quot;."/>
</userInfo>
</attribute>
<attribute name="optionId" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES"/>
<attribute name="value" optional="YES" attributeType="String" indexed="YES" syncable="YES">
<userInfo>
<entry key="discussion" value="For example, &quot;Small&quot;, &quot;Medium&quot; or &quot;Large&quot;."/>
<entry key="documentation" value="The value of the option."/>
</userInfo>
</attribute>
<relationship name="variants" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="ProductVariant" inverseName="options" inverseEntity="ProductVariant" syncable="YES">
<userInfo>
<entry key="documentation" value="Inverse of ProductVariant.optionValue."/>
</userInfo>
</relationship>
</entity>
<entity name="Order" representedClassName="BUYOrder" syncable="YES">
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES"/>
<attribute name="name" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The customer's order name as represented by a number."/>
</userInfo>
</attribute>
<attribute name="orderStatusURL" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
<entry key="documentation" value="URL for the website showing the order status."/>
</userInfo>
</attribute>
<attribute name="processedAt" optional="YES" attributeType="Date" syncable="YES"/>
<attribute name="statusURL" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
</userInfo>
</attribute>
<attribute name="subtotalPrice" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES"/>
<attribute name="totalPrice" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES"/>
<relationship name="checkout" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Checkout" inverseName="order" inverseEntity="Checkout" syncable="YES">
<userInfo>
<entry key="documentation" value="Inverse of Checkout.order."/>
</userInfo>
</relationship>
<relationship name="lineItems" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="LineItem" inverseName="order" inverseEntity="LineItem" syncable="YES"/>
<userInfo>
<entry key="attributeValueClassName" value="URL"/>
<entry key="documentation" value="URL for the website showing the order status, doesn't require a customer token."/>
</userInfo>
</entity>
<entity name="Product" representedClassName="BUYProduct" syncable="YES">
<attribute name="available" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo>
<entry key="documentation" value="If the product is in stock. See each variant for their specific availability."/>
</userInfo>
</attribute>
<attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES">
<userInfo>
<entry key="documentation" value="The creation date for a product."/>
</userInfo>
</attribute>
<attribute name="handle" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The handle of the product. Can be used to construct links to the web page for the product."/>
</userInfo>
</attribute>
<attribute name="htmlDescription" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="discussion" value="Maps to &quot;body_html&quot; in JSON."/>
<entry key="documentation" value="The description of the product, complete with HTML formatting."/>
<entry key="JSONPropertyKey" value="body_html"/>
</userInfo>
</attribute>
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES"/>
<attribute name="productId" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES">
<userInfo>
<entry key="documentation" value="The channel product ID."/>
</userInfo>
</attribute>
<attribute name="productType" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="A categorization that a product can be tagged with, commonly used for filtering and searching."/>
</userInfo>
</attribute>
<attribute name="publicURL" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
<entry key="documentation" value="A publically accessible link to the product web page"/>
</userInfo>
</attribute>
<attribute name="published" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo>
<entry key="documentation" value="The product is published on the current sales channel."/>
</userInfo>
</attribute>
<attribute name="publishedAt" optional="YES" attributeType="Date" syncable="YES">
<userInfo>
<entry key="documentation" value="The publish date for a product."/>
<entry key="JSONValueTransformer" value="BUYPublicationsDate"/>
</userInfo>
</attribute>
<attribute name="tags" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSSet"/>
<entry key="discussion" value="Commonly used for filtering and searching. Each tag has a imit of 255 characters."/>
<entry key="documentation" value="A categorization that a product can be tagged with."/>
<entry key="JSONValueTransformer" value="BUYProductTags"/>
</userInfo>
</attribute>
<attribute name="title" optional="YES" attributeType="String" indexed="YES" syncable="YES">
<userInfo>
<entry key="discussion" value="In a shop's catalog, clicking on a product's title takes you to that product's page. On a product's page, the product's title typically appears in a large font."/>
<entry key="documentation" value="The name of the product."/>
</userInfo>
</attribute>
<attribute name="updatedAt" optional="YES" attributeType="Date" syncable="YES">
<userInfo>
<entry key="documentation" value="The updated date for a product."/>
</userInfo>
</attribute>
<attribute name="vendor" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The name of the vendor of the product."/>
</userInfo>
</attribute>
<relationship name="collections" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Collection" inverseName="products" inverseEntity="Collection" syncable="YES">
<userInfo>
<entry key="discussion" value="Maps to &quot;collection_ids&quot; in JSON."/>
<entry key="documentation" value="The collections in which this product appears."/>
<entry key="JSONPropertyKey" value="collection_ids"/>
</userInfo>
</relationship>
<relationship name="images" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="ImageLink" inverseName="product" inverseEntity="ImageLink" syncable="YES">
<userInfo>
<entry key="documentation" value="A list of BUYImageLink objects, each one representing an image associated with the product."/>
</userInfo>
</relationship>
<relationship name="options" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="Option" inverseName="product" inverseEntity="Option" syncable="YES">
<userInfo>
<entry key="discussion" value="Products are based on permutations of these options. A product may have a maximum of 3 options. 255 characters limit each."/>
<entry key="documentation" value="Custom product property names like &quot;Size&quot;, &quot;Color&quot;, and &quot;Material&quot;."/>
</userInfo>
</relationship>
<relationship name="variants" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="ProductVariant" inverseName="product" inverseEntity="ProductVariant" syncable="YES">
<userInfo>
<entry key="documentation" value="A list of BUYProductVariant objects, each one representing a slightly different version of the product."/>
</userInfo>
</relationship>
<userInfo>
<entry key="documentation" value="A BUYProduct is an individual item for sale in a Shopify shop."/>
</userInfo>
</entity>
<entity name="ProductVariant" representedClassName="BUYProductVariant" syncable="YES">
<attribute name="available" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo>
<entry key="documentation" value="If the variant is in stock."/>
</userInfo>
</attribute>
<attribute name="compareAtPrice" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The competitor's prices for the same item."/>
</userInfo>
</attribute>
<attribute name="grams" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The weight of the BUYProductVariant in grams."/>
</userInfo>
</attribute>
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES"/>
<attribute name="position" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES">
<userInfo>
<entry key="documentation" value="The order of the BUYProductVariant in the list of product variants. 1 is the first position."/>
</userInfo>
</attribute>
<attribute name="price" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The price of the BUYProductVariant."/>
</userInfo>
</attribute>
<attribute name="requiresShipping" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo>
<entry key="documentation" value="Whether or not a customer needs to provide a shipping address when placing an order for this BUYProductVariant."/>
</userInfo>
</attribute>
<attribute name="sku" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="A unique identifier for the product in the shop."/>
</userInfo>
</attribute>
<attribute name="taxable" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo>
<entry key="documentation" value="Specifies whether or not a tax is charged when the BUYProductVariant is sold."/>
</userInfo>
</attribute>
<attribute name="title" optional="YES" attributeType="String" indexed="YES" syncable="YES">
<userInfo>
<entry key="documentation" value="The title of the BUYProductVariant."/>
</userInfo>
</attribute>
<relationship name="cartLineItems" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="CartLineItem" inverseName="variant" inverseEntity="CartLineItem" syncable="YES">
<userInfo>
<entry key="documentation" value="Inverse of CartLineItem.variant."/>
</userInfo>
</relationship>
<relationship name="options" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="OptionValue" inverseName="variants" inverseEntity="OptionValue" syncable="YES">
<userInfo>
<entry key="documentation" value="Custom properties that a shop owner can use to define BUYProductVariants."/>
<entry key="JSONPropertyKey" value="option_values"/>
</userInfo>
</relationship>
<relationship name="product" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Product" inverseName="variants" inverseEntity="Product" syncable="YES"/>
<userInfo>
<entry key="documentation" value="A BUYProductVariant is a different version of a product, such as differing sizes or differing colours."/>
</userInfo>
</entity>
<entity name="ShippingRate" representedClassName="BUYShippingRate" syncable="YES">
<attribute name="deliveryRange" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSArray"/>
<entry key="documentation" value="One or two NSDate objects of the potential delivery dates."/>
<entry key="JSONValueTransformer" value="BUYDeliveryRange"/>
</userInfo>
</attribute>
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES"/>
<attribute name="price" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The price of this shipping method."/>
</userInfo>
</attribute>
<attribute name="shippingRateIdentifier" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="A reference to the shipping method."/>
<entry key="JSONPropertyKey" value="id"/>
</userInfo>
</attribute>
<attribute name="title" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The shipping method name."/>
</userInfo>
</attribute>
<relationship name="checkout" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Checkout" inverseName="shippingRate" inverseEntity="Checkout" syncable="YES"/>
<userInfo>
<entry key="documentation" value="BUYShippingRate represents the amount that the merchant is charging a customer for shipping to the specified address."/>
<entry key="Transient" value="YES"/>
</userInfo>
</entity>
<entity name="Shop" representedClassName="BUYShop" syncable="YES">
<attribute name="city" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The city in which the shop is located."/>
</userInfo>
</attribute>
<attribute name="country" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The country in which the shop is located."/>
</userInfo>
</attribute>
<attribute name="currency" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The three-letter code for the currency that the shop accepts."/>
</userInfo>
</attribute>
<attribute name="domain" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The shop's domain."/>
</userInfo>
</attribute>
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES"/>
<attribute name="moneyFormat" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="A string representing the way currency is formatted when the currency isn't specified."/>
</userInfo>
</attribute>
<attribute name="myShopifyURL" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
<entry key="discussion" value="Maps to &quot;myshopify_domain&quot; in JSON."/>
<entry key="documentation" value="The shop's 'myshopify.com' domain."/>
<entry key="JSONPropertyKey" value="myshopify_domain"/>
</userInfo>
</attribute>
<attribute name="name" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The name of the shop."/>
</userInfo>
</attribute>
<attribute name="province" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The shop's normalized province or state name."/>
</userInfo>
</attribute>
<attribute name="publishedCollectionsCount" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES"/>
<attribute name="publishedProductsCount" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES"/>
<attribute name="shipsToCountries" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSArray"/>
<entry key="documentation" value="A list of two-letter country codes identifying the countries that the shop ships to."/>
</userInfo>
</attribute>
<attribute name="shopDescription" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="discussion" value="Maps to &quot;description&quot; in JSON."/>
<entry key="documentation" value="The shop's description."/>
<entry key="JSONPropertyKey" value="description"/>
</userInfo>
</attribute>
<attribute name="shopURL" optional="YES" attributeType="Transformable" syncable="YES">
<userInfo>
<entry key="attributeValueClassName" value="NSURL"/>
<entry key="JSONPropertyKey" value="url"/>
</userInfo>
</attribute>
<userInfo>
<entry key="documentation" value="The BUYShop object is a collection of the general settings and information about the shop."/>
</userInfo>
</entity>
<entity name="TaxLine" representedClassName="BUYTaxLine" syncable="YES">
<attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES"/>
<attribute name="price" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The amount of tax to be charged."/>
</userInfo>
</attribute>
<attribute name="rate" optional="YES" attributeType="Decimal" defaultValueString="0.0" syncable="YES">
<userInfo>
<entry key="documentation" value="The rate of tax to be applied."/>
</userInfo>
</attribute>
<attribute name="title" optional="YES" attributeType="String" syncable="YES">
<userInfo>
<entry key="documentation" value="The name of the tax."/>
</userInfo>
</attribute>
<attribute name="updatedAt" optional="YES" attributeType="Date" syncable="YES"/>
<relationship name="checkout" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Checkout" inverseName="taxLines" inverseEntity="Checkout" syncable="YES">
<userInfo>
<entry key="documentation" value="Inverse of Checkout.taxLines."/>
</userInfo>
</relationship>
<userInfo>
<entry key="documentation" value="BUYTaxLine represents a single tax line on a checkout. Use this to display an itemized list of taxes that a customer is being charged for."/>
<entry key="Transient" value="YES"/>
</userInfo>
</entity>
<configuration name="persistent">
<memberEntity name="Cart"/>
<memberEntity name="CartLineItem"/>
<memberEntity name="Collection"/>
<memberEntity name="Customer"/>
<memberEntity name="ImageLink"/>
<memberEntity name="Option"/>
<memberEntity name="OptionValue"/>
<memberEntity name="Product"/>
<memberEntity name="ProductVariant"/>
<memberEntity name="Shop"/>
<memberEntity name="LineItem"/>
<memberEntity name="Order"/>
</configuration>
<configuration name="transient">
<memberEntity name="Checkout"/>
<memberEntity name="MaskedCreditCard"/>
<memberEntity name="GiftCard"/>
<memberEntity name="Discount"/>
<memberEntity name="TaxLine"/>
<memberEntity name="ShippingRate"/>
<memberEntity name="Address"/>
</configuration>
<elements>
<element name="Address" positionX="126" positionY="521" width="128" height="225"/>
<element name="Cart" positionX="-576" positionY="558" width="128" height="60"/>
<element name="CartLineItem" positionX="-380" positionY="558" width="128" height="90"/>
<element name="Checkout" positionX="333" positionY="442" width="128" height="630"/>
<element name="Collection" positionX="-963" positionY="772" width="128" height="210"/>
<element name="Customer" positionX="106" positionY="1263" width="128" height="60"/>
<element name="Discount" positionX="126" positionY="877" width="128" height="105"/>
<element name="GiftCard" positionX="531" positionY="862" width="128" height="135"/>
<element name="ImageLink" positionX="-1161" positionY="832" width="128" height="165"/>
<element name="LineItem" positionX="-18" positionY="727" width="128" height="315"/>
<element name="MaskedCreditCard" positionX="531" positionY="693" width="128" height="150"/>
<element name="Option" positionX="-576" positionY="907" width="128" height="105"/>
<element name="OptionValue" positionX="-387" positionY="907" width="128" height="105"/>
<element name="Order" positionX="682" positionY="922" width="128" height="180"/>
<element name="Product" positionX="-765" positionY="712" width="128" height="315"/>
<element name="ProductVariant" positionX="-182" positionY="787" width="128" height="240"/>
<element name="ShippingRate" positionX="531" positionY="1035" width="128" height="135"/>
<element name="Shop" positionX="-279" positionY="450" width="128" height="255"/>
<element name="TaxLine" positionX="126" positionY="1026" width="128" height="133"/>
</elements>
</model>
\ No newline at end of file
//
// _BUYCustomer.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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 <Buy/_BUYCustomer.h>
@interface BUYCustomer : _BUYCustomer {}
@property (nonatomic, readonly) NSSet *addresses;
@property (readonly) NSString *fullName;
@end
@interface BUYModelManager (BUYCustomer)
- (BUYCustomer *)customerWithJSONDictionary:(NSDictionary *)json;
@end
//
// _BUYCustomer.m
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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 "BUYCustomer.h"
@implementation BUYCustomer
@synthesize addresses=_addresses;
- (NSString *)fullName
{
if (self.firstName.length > 0 || self.lastName.length > 0) {
return [NSString stringWithFormat:@"%@ %@", self.firstName, self.lastName];
}
return @"";
}
@end
@implementation BUYModelManager (BUYCustomer)
- (BUYCustomer *)customerWithJSONDictionary:(NSDictionary *)json
{
NSDictionary *customerDictionary = [json objectForKey:@"customer"];
return (id)[self buy_objectWithEntityName:[BUYCustomer entityName] JSONDictionary:customerDictionary];
}
@end
\ No newline at end of file
//
// _BUYCart.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYCart.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYCartRelationships {
__unsafe_unretained NSString *lineItems;
} BUYCartRelationships;
extern const struct BUYCartUserInfo {
__unsafe_unretained NSString *discussion;
__unsafe_unretained NSString *documentation;
__unsafe_unretained NSString *private;
} BUYCartUserInfo;
@class BUYCartLineItem;
@class BUYCart;
@interface BUYModelManager (BUYCartInserting)
- (NSArray<BUYCart *> *)allCartObjects;
- (BUYCart *)fetchCartWithIdentifierValue:(int64_t)identifier;
- (BUYCart *)insertCartWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYCart *> *)insertCartsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* A collection of products the user intends to purchase.
*
* The BUYCart is the starting point for the Checkout API. You are responsible for building a cart, then transforming it into a BUYCheckout using the BUYDataClient. Private to app.
*/
@interface _BUYCart : BUYCachedObject
+ (NSString *)entityName;
/**
* Array of BUYCartLineItem objects in the cart
*
* These are different from BUYLineItem objects. The line item objects do include the BUYProductVariant.
*/
@property (nonatomic, strong) NSOrderedSet *lineItems;
- (NSMutableOrderedSet *)lineItemsSet;
@end
@interface _BUYCart (LineItemsCoreDataGeneratedAccessors)
- (void)insertObject:(BUYCartLineItem *)value inLineItemsAtIndex:(NSUInteger)idx;
- (void)removeObjectFromLineItemsAtIndex:(NSUInteger)idx;
- (void)insertLineItems:(NSArray *)value atIndexes:(NSIndexSet *)indexes;
- (void)removeLineItemsAtIndexes:(NSIndexSet *)indexes;
- (void)replaceObjectInLineItemsAtIndex:(NSUInteger)idx withObject:(BUYCartLineItem *)value;
- (void)replaceLineItemsAtIndexes:(NSIndexSet *)indexes withLineItems:(NSArray *)values;
@end
@interface _BUYCart (CoreDataGeneratedPrimitiveAccessors)
- (NSMutableOrderedSet *)primitiveLineItems;
- (void)setPrimitiveLineItems:(NSMutableOrderedSet *)value;
@end
//
// _BUYCart.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYCart.m instead.
#import "_BUYCart.h"
const struct BUYCartRelationships BUYCartRelationships = {
.lineItems = @"lineItems",
};
const struct BUYCartUserInfo BUYCartUserInfo = {
.discussion = @"The BUYCart is the starting point for the Checkout API. You are responsible for building a cart, then transforming it into a BUYCheckout using the BUYDataClient. Private to app.",
.documentation = @"A collection of products the user intends to purchase.",
.private = @"YES",
};
@implementation _BUYCart
+ (NSString *)entityName {
return @"Cart";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
#endif
#if defined CORE_DATA_PERSISTENCE
@dynamic lineItems;
#endif
- (NSMutableOrderedSet *)lineItemsSet {
[self willAccessValueForKey:@"lineItems"];
NSMutableOrderedSet *result = (NSMutableOrderedSet *)[self mutableOrderedSetValueForKey:@"lineItems"];
[self didAccessValueForKey:@"lineItems"];
return result;
}
@end
#pragma mark -
@implementation BUYModelManager (BUYCartInserting)
- (BUYCart *)insertCartWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYCart *)[self buy_objectWithEntityName:@"Cart" JSONDictionary:dictionary];
}
- (NSArray<BUYCart *> *)insertCartsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYCart *> *)[self buy_objectsWithEntityName:@"Cart" JSONArray:array];
}
- (NSArray<BUYCart *> *)allCartObjects
{
return (NSArray<BUYCart *> *)[self buy_objectsWithEntityName:@"Cart" identifiers:nil];
}
- (BUYCart *)fetchCartWithIdentifierValue:(int64_t)identifier
{
return (BUYCart *)[self buy_objectWithEntityName:@"Cart" identifier:@(identifier)];
}
@end
//
// _BUYCartLineItem.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYCartLineItem.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYCartLineItemAttributes {
__unsafe_unretained NSString *quantity;
} BUYCartLineItemAttributes;
extern const struct BUYCartLineItemRelationships {
__unsafe_unretained NSString *cart;
__unsafe_unretained NSString *variant;
} BUYCartLineItemRelationships;
extern const struct BUYCartLineItemUserInfo {
__unsafe_unretained NSString *documentation;
__unsafe_unretained NSString *private;
} BUYCartLineItemUserInfo;
@class BUYCart;
@class BUYProductVariant;
@class BUYCartLineItem;
@interface BUYModelManager (BUYCartLineItemInserting)
- (NSArray<BUYCartLineItem *> *)allCartLineItemObjects;
- (BUYCartLineItem *)fetchCartLineItemWithIdentifierValue:(int64_t)identifier;
- (BUYCartLineItem *)insertCartLineItemWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYCartLineItem *> *)insertCartLineItemsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* A line item that references a product variant. Private to app.
*/
@interface _BUYCartLineItem : BUYCachedObject
+ (NSString *)entityName;
/**
* The quantity of the line item.
*/
@property (nonatomic, strong) NSDecimalNumber* quantity;
/**
* The inverse relationship of Cart.lineItems.
*/
@property (nonatomic, strong) BUYCart *cart;
/**
* The BUYProductVariant object associated with the line item when created using the preferred `initWithVariant:` initializer.
*/
@property (nonatomic, strong) BUYProductVariant *variant;
@end
@interface _BUYCartLineItem (CoreDataGeneratedPrimitiveAccessors)
- (NSDecimalNumber*)primitiveQuantity;
- (void)setPrimitiveQuantity:(NSDecimalNumber*)value;
- (BUYCart *)primitiveCart;
- (void)setPrimitiveCart:(BUYCart *)value;
- (BUYProductVariant *)primitiveVariant;
- (void)setPrimitiveVariant:(BUYProductVariant *)value;
@end
//
// _BUYCartLineItem.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYCartLineItem.m instead.
#import "_BUYCartLineItem.h"
const struct BUYCartLineItemAttributes BUYCartLineItemAttributes = {
.quantity = @"quantity",
};
const struct BUYCartLineItemRelationships BUYCartLineItemRelationships = {
.cart = @"cart",
.variant = @"variant",
};
const struct BUYCartLineItemUserInfo BUYCartLineItemUserInfo = {
.documentation = @"A line item that references a product variant. Private to app.",
.private = @"YES",
};
@implementation _BUYCartLineItem
+ (NSString *)entityName {
return @"CartLineItem";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
- (NSDecimalNumber*)quantity {
[self willAccessValueForKey:@"quantity"];
id value = [self primitiveValueForKey:@"quantity"];
[self didAccessValueForKey:@"quantity"];
return value;
}
- (void)setQuantity:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"quantity"];
[self setPrimitiveValue:value_ forKey:@"quantity"];
[self didChangeValueForKey:@"quantity"];
}
#endif
#if defined CORE_DATA_PERSISTENCE
@dynamic cart;
#endif
#if defined CORE_DATA_PERSISTENCE
@dynamic variant;
#endif
@end
#pragma mark -
@implementation BUYModelManager (BUYCartLineItemInserting)
- (BUYCartLineItem *)insertCartLineItemWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYCartLineItem *)[self buy_objectWithEntityName:@"CartLineItem" JSONDictionary:dictionary];
}
- (NSArray<BUYCartLineItem *> *)insertCartLineItemsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYCartLineItem *> *)[self buy_objectsWithEntityName:@"CartLineItem" JSONArray:array];
}
- (NSArray<BUYCartLineItem *> *)allCartLineItemObjects
{
return (NSArray<BUYCartLineItem *> *)[self buy_objectsWithEntityName:@"CartLineItem" identifiers:nil];
}
- (BUYCartLineItem *)fetchCartLineItemWithIdentifierValue:(int64_t)identifier
{
return (BUYCartLineItem *)[self buy_objectWithEntityName:@"CartLineItem" identifier:@(identifier)];
}
@end
//
// _BUYCollection.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYCollection.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYCollectionAttributes {
__unsafe_unretained NSString *collectionId;
__unsafe_unretained NSString *createdAt;
__unsafe_unretained NSString *handle;
__unsafe_unretained NSString *htmlDescription;
__unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *published;
__unsafe_unretained NSString *publishedAt;
__unsafe_unretained NSString *title;
__unsafe_unretained NSString *updatedAt;
} BUYCollectionAttributes;
extern const struct BUYCollectionRelationships {
__unsafe_unretained NSString *image;
__unsafe_unretained NSString *products;
} BUYCollectionRelationships;
extern const struct BUYCollectionUserInfo {
__unsafe_unretained NSString *documentation;
} BUYCollectionUserInfo;
@class BUYImageLink;
@class BUYProduct;
@class BUYCollection;
@interface BUYModelManager (BUYCollectionInserting)
- (NSArray<BUYCollection *> *)allCollectionObjects;
- (BUYCollection *)fetchCollectionWithIdentifierValue:(int64_t)identifier;
- (BUYCollection *)insertCollectionWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYCollection *> *)insertCollectionsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* Represents a collection of products on the shop.
*/
@interface _BUYCollection : BUYCachedObject
+ (NSString *)entityName;
/**
* The unique collection ID in the channel.
*/
@property (nonatomic, strong) NSNumber* collectionId;
@property (atomic) int64_t collectionIdValue;
- (int64_t)collectionIdValue;
- (void)setCollectionIdValue:(int64_t)value_;
@property (nonatomic, strong) NSDate* createdAt;
/**
* The handle of the collection.
*/
@property (nonatomic, strong) NSString* handle;
/**
* The html description.
*
* Maps to "body_html" in JSON.
*/
@property (nonatomic, strong) NSString* htmlDescription;
@property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue;
- (int64_t)identifierValue;
- (void)setIdentifierValue:(int64_t)value_;
/**
* The state of whether the collection is currently published or not.
*/
@property (nonatomic, strong) NSNumber* published;
@property (atomic) BOOL publishedValue;
- (BOOL)publishedValue;
- (void)setPublishedValue:(BOOL)value_;
/**
* The publish date for the collection.
*/
@property (nonatomic, strong) NSDate* publishedAt;
/**
* The title of the collection.
*/
@property (nonatomic, strong) NSString* title;
@property (nonatomic, strong) NSDate* updatedAt;
@property (nonatomic, strong) BUYImageLink *image;
/**
* Inverse of Product.collections.
*/
@property (nonatomic, strong) NSOrderedSet *products;
- (NSMutableOrderedSet *)productsSet;
@end
@interface _BUYCollection (ProductsCoreDataGeneratedAccessors)
- (void)insertObject:(BUYProduct *)value inProductsAtIndex:(NSUInteger)idx;
- (void)removeObjectFromProductsAtIndex:(NSUInteger)idx;
- (void)insertProducts:(NSArray *)value atIndexes:(NSIndexSet *)indexes;
- (void)removeProductsAtIndexes:(NSIndexSet *)indexes;
- (void)replaceObjectInProductsAtIndex:(NSUInteger)idx withObject:(BUYProduct *)value;
- (void)replaceProductsAtIndexes:(NSIndexSet *)indexes withProducts:(NSArray *)values;
@end
@interface _BUYCollection (CoreDataGeneratedPrimitiveAccessors)
- (NSNumber*)primitiveCollectionId;
- (void)setPrimitiveCollectionId:(NSNumber*)value;
- (NSDate*)primitiveCreatedAt;
- (void)setPrimitiveCreatedAt:(NSDate*)value;
- (NSString*)primitiveHandle;
- (void)setPrimitiveHandle:(NSString*)value;
- (NSString*)primitiveHtmlDescription;
- (void)setPrimitiveHtmlDescription:(NSString*)value;
- (NSNumber*)primitiveIdentifier;
- (void)setPrimitiveIdentifier:(NSNumber*)value;
- (NSNumber*)primitivePublished;
- (void)setPrimitivePublished:(NSNumber*)value;
- (NSDate*)primitivePublishedAt;
- (void)setPrimitivePublishedAt:(NSDate*)value;
- (NSString*)primitiveTitle;
- (void)setPrimitiveTitle:(NSString*)value;
- (NSDate*)primitiveUpdatedAt;
- (void)setPrimitiveUpdatedAt:(NSDate*)value;
- (BUYImageLink *)primitiveImage;
- (void)setPrimitiveImage:(BUYImageLink *)value;
- (NSMutableOrderedSet *)primitiveProducts;
- (void)setPrimitiveProducts:(NSMutableOrderedSet *)value;
@end
//
// _BUYCollection.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYCollection.m instead.
#import "_BUYCollection.h"
const struct BUYCollectionAttributes BUYCollectionAttributes = {
.collectionId = @"collectionId",
.createdAt = @"createdAt",
.handle = @"handle",
.htmlDescription = @"htmlDescription",
.identifier = @"identifier",
.published = @"published",
.publishedAt = @"publishedAt",
.title = @"title",
.updatedAt = @"updatedAt",
};
const struct BUYCollectionRelationships BUYCollectionRelationships = {
.image = @"image",
.products = @"products",
};
const struct BUYCollectionUserInfo BUYCollectionUserInfo = {
.documentation = @"Represents a collection of products on the shop.",
};
@implementation _BUYCollection
+ (NSString *)entityName {
return @"Collection";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"collectionIdValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"collectionId"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"identifierValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"identifier"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"publishedValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"published"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
- (NSNumber*)collectionId {
[self willAccessValueForKey:@"collectionId"];
id value = [self primitiveValueForKey:@"collectionId"];
[self didAccessValueForKey:@"collectionId"];
return value;
}
- (void)setCollectionId:(NSNumber*)value_ {
[self willChangeValueForKey:@"collectionId"];
[self setPrimitiveValue:value_ forKey:@"collectionId"];
[self didChangeValueForKey:@"collectionId"];
}
- (NSDate*)createdAt {
[self willAccessValueForKey:@"createdAt"];
id value = [self primitiveValueForKey:@"createdAt"];
[self didAccessValueForKey:@"createdAt"];
return value;
}
- (void)setCreatedAt:(NSDate*)value_ {
[self willChangeValueForKey:@"createdAt"];
[self setPrimitiveValue:value_ forKey:@"createdAt"];
[self didChangeValueForKey:@"createdAt"];
}
- (NSString*)handle {
[self willAccessValueForKey:@"handle"];
id value = [self primitiveValueForKey:@"handle"];
[self didAccessValueForKey:@"handle"];
return value;
}
- (void)setHandle:(NSString*)value_ {
[self willChangeValueForKey:@"handle"];
[self setPrimitiveValue:value_ forKey:@"handle"];
[self didChangeValueForKey:@"handle"];
}
- (NSString*)htmlDescription {
[self willAccessValueForKey:@"htmlDescription"];
id value = [self primitiveValueForKey:@"htmlDescription"];
[self didAccessValueForKey:@"htmlDescription"];
return value;
}
- (void)setHtmlDescription:(NSString*)value_ {
[self willChangeValueForKey:@"htmlDescription"];
[self setPrimitiveValue:value_ forKey:@"htmlDescription"];
[self didChangeValueForKey:@"htmlDescription"];
}
- (NSNumber*)identifier {
[self willAccessValueForKey:@"identifier"];
id value = [self primitiveValueForKey:@"identifier"];
[self didAccessValueForKey:@"identifier"];
return value;
}
- (void)setIdentifier:(NSNumber*)value_ {
[self willChangeValueForKey:@"identifier"];
[self setPrimitiveValue:value_ forKey:@"identifier"];
[self didChangeValueForKey:@"identifier"];
}
- (NSNumber*)published {
[self willAccessValueForKey:@"published"];
id value = [self primitiveValueForKey:@"published"];
[self didAccessValueForKey:@"published"];
return value;
}
- (void)setPublished:(NSNumber*)value_ {
[self willChangeValueForKey:@"published"];
[self setPrimitiveValue:value_ forKey:@"published"];
[self didChangeValueForKey:@"published"];
}
- (NSDate*)publishedAt {
[self willAccessValueForKey:@"publishedAt"];
id value = [self primitiveValueForKey:@"publishedAt"];
[self didAccessValueForKey:@"publishedAt"];
return value;
}
- (void)setPublishedAt:(NSDate*)value_ {
[self willChangeValueForKey:@"publishedAt"];
[self setPrimitiveValue:value_ forKey:@"publishedAt"];
[self didChangeValueForKey:@"publishedAt"];
}
- (NSString*)title {
[self willAccessValueForKey:@"title"];
id value = [self primitiveValueForKey:@"title"];
[self didAccessValueForKey:@"title"];
return value;
}
- (void)setTitle:(NSString*)value_ {
[self willChangeValueForKey:@"title"];
[self setPrimitiveValue:value_ forKey:@"title"];
[self didChangeValueForKey:@"title"];
}
- (NSDate*)updatedAt {
[self willAccessValueForKey:@"updatedAt"];
id value = [self primitiveValueForKey:@"updatedAt"];
[self didAccessValueForKey:@"updatedAt"];
return value;
}
- (void)setUpdatedAt:(NSDate*)value_ {
[self willChangeValueForKey:@"updatedAt"];
[self setPrimitiveValue:value_ forKey:@"updatedAt"];
[self didChangeValueForKey:@"updatedAt"];
}
#endif
- (int64_t)collectionIdValue {
NSNumber *result = [self collectionId];
return [result longLongValue];
}
- (void)setCollectionIdValue:(int64_t)value_ {
[self setCollectionId:@(value_)];
}
- (int64_t)identifierValue {
NSNumber *result = [self identifier];
return [result longLongValue];
}
- (void)setIdentifierValue:(int64_t)value_ {
[self setIdentifier:@(value_)];
}
- (BOOL)publishedValue {
NSNumber *result = [self published];
return [result boolValue];
}
- (void)setPublishedValue:(BOOL)value_ {
[self setPublished:@(value_)];
}
#if defined CORE_DATA_PERSISTENCE
@dynamic image;
#endif
#if defined CORE_DATA_PERSISTENCE
@dynamic products;
#endif
- (NSMutableOrderedSet *)productsSet {
[self willAccessValueForKey:@"products"];
NSMutableOrderedSet *result = (NSMutableOrderedSet *)[self mutableOrderedSetValueForKey:@"products"];
[self didAccessValueForKey:@"products"];
return result;
}
@end
#pragma mark -
@implementation BUYModelManager (BUYCollectionInserting)
- (BUYCollection *)insertCollectionWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYCollection *)[self buy_objectWithEntityName:@"Collection" JSONDictionary:dictionary];
}
- (NSArray<BUYCollection *> *)insertCollectionsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYCollection *> *)[self buy_objectsWithEntityName:@"Collection" JSONArray:array];
}
- (NSArray<BUYCollection *> *)allCollectionObjects
{
return (NSArray<BUYCollection *> *)[self buy_objectsWithEntityName:@"Collection" identifiers:nil];
}
- (BUYCollection *)fetchCollectionWithIdentifierValue:(int64_t)identifier
{
return (BUYCollection *)[self buy_objectWithEntityName:@"Collection" identifier:@(identifier)];
}
@end
//
// _BUYCustomer.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYCustomer.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYCustomerAttributes {
__unsafe_unretained NSString *acceptsMarketing;
__unsafe_unretained NSString *createdAt;
__unsafe_unretained NSString *customerState;
__unsafe_unretained NSString *email;
__unsafe_unretained NSString *firstName;
__unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *lastName;
__unsafe_unretained NSString *lastOrderID;
__unsafe_unretained NSString *lastOrderName;
__unsafe_unretained NSString *multipassIdentifier;
__unsafe_unretained NSString *note;
__unsafe_unretained NSString *ordersCount;
__unsafe_unretained NSString *tags;
__unsafe_unretained NSString *taxExempt;
__unsafe_unretained NSString *totalSpent;
__unsafe_unretained NSString *updatedAt;
__unsafe_unretained NSString *verifiedEmail;
} BUYCustomerAttributes;
@class BUYCustomer;
@interface BUYModelManager (BUYCustomerInserting)
- (NSArray<BUYCustomer *> *)allCustomerObjects;
- (BUYCustomer *)fetchCustomerWithIdentifierValue:(int64_t)identifier;
- (BUYCustomer *)insertCustomerWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYCustomer *> *)insertCustomersWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
@interface _BUYCustomer : BUYCachedObject
+ (NSString *)entityName;
@property (nonatomic, strong) NSNumber* acceptsMarketing;
@property (atomic) BOOL acceptsMarketingValue;
- (BOOL)acceptsMarketingValue;
- (void)setAcceptsMarketingValue:(BOOL)value_;
@property (nonatomic, strong) NSDate* createdAt;
@property (nonatomic, strong) NSNumber* customerState;
@property (atomic) BOOL customerStateValue;
- (BOOL)customerStateValue;
- (void)setCustomerStateValue:(BOOL)value_;
@property (nonatomic, strong) NSString* email;
@property (nonatomic, strong) NSString* firstName;
@property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue;
- (int64_t)identifierValue;
- (void)setIdentifierValue:(int64_t)value_;
@property (nonatomic, strong) NSString* lastName;
@property (nonatomic, strong) NSNumber* lastOrderID;
@property (atomic) int64_t lastOrderIDValue;
- (int64_t)lastOrderIDValue;
- (void)setLastOrderIDValue:(int64_t)value_;
@property (nonatomic, strong) NSString* lastOrderName;
@property (nonatomic, strong) NSString* multipassIdentifier;
@property (nonatomic, strong) NSString* note;
@property (nonatomic, strong) NSNumber* ordersCount;
@property (atomic) int16_t ordersCountValue;
- (int16_t)ordersCountValue;
- (void)setOrdersCountValue:(int16_t)value_;
@property (nonatomic, strong) NSString* tags;
@property (nonatomic, strong) NSNumber* taxExempt;
@property (atomic) BOOL taxExemptValue;
- (BOOL)taxExemptValue;
- (void)setTaxExemptValue:(BOOL)value_;
@property (nonatomic, strong) NSDecimalNumber* totalSpent;
@property (nonatomic, strong) NSDate* updatedAt;
@property (nonatomic, strong) NSNumber* verifiedEmail;
@property (atomic) BOOL verifiedEmailValue;
- (BOOL)verifiedEmailValue;
- (void)setVerifiedEmailValue:(BOOL)value_;
@end
@interface _BUYCustomer (CoreDataGeneratedPrimitiveAccessors)
- (NSNumber*)primitiveAcceptsMarketing;
- (void)setPrimitiveAcceptsMarketing:(NSNumber*)value;
- (NSDate*)primitiveCreatedAt;
- (void)setPrimitiveCreatedAt:(NSDate*)value;
- (NSNumber*)primitiveCustomerState;
- (void)setPrimitiveCustomerState:(NSNumber*)value;
- (NSString*)primitiveEmail;
- (void)setPrimitiveEmail:(NSString*)value;
- (NSString*)primitiveFirstName;
- (void)setPrimitiveFirstName:(NSString*)value;
- (NSNumber*)primitiveIdentifier;
- (void)setPrimitiveIdentifier:(NSNumber*)value;
- (NSString*)primitiveLastName;
- (void)setPrimitiveLastName:(NSString*)value;
- (NSNumber*)primitiveLastOrderID;
- (void)setPrimitiveLastOrderID:(NSNumber*)value;
- (NSString*)primitiveLastOrderName;
- (void)setPrimitiveLastOrderName:(NSString*)value;
- (NSString*)primitiveMultipassIdentifier;
- (void)setPrimitiveMultipassIdentifier:(NSString*)value;
- (NSString*)primitiveNote;
- (void)setPrimitiveNote:(NSString*)value;
- (NSNumber*)primitiveOrdersCount;
- (void)setPrimitiveOrdersCount:(NSNumber*)value;
- (NSString*)primitiveTags;
- (void)setPrimitiveTags:(NSString*)value;
- (NSNumber*)primitiveTaxExempt;
- (void)setPrimitiveTaxExempt:(NSNumber*)value;
- (NSDecimalNumber*)primitiveTotalSpent;
- (void)setPrimitiveTotalSpent:(NSDecimalNumber*)value;
- (NSDate*)primitiveUpdatedAt;
- (void)setPrimitiveUpdatedAt:(NSDate*)value;
- (NSNumber*)primitiveVerifiedEmail;
- (void)setPrimitiveVerifiedEmail:(NSNumber*)value;
@end
//
// _BUYCustomer.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYCustomer.m instead.
#import "_BUYCustomer.h"
const struct BUYCustomerAttributes BUYCustomerAttributes = {
.acceptsMarketing = @"acceptsMarketing",
.createdAt = @"createdAt",
.customerState = @"customerState",
.email = @"email",
.firstName = @"firstName",
.identifier = @"identifier",
.lastName = @"lastName",
.lastOrderID = @"lastOrderID",
.lastOrderName = @"lastOrderName",
.multipassIdentifier = @"multipassIdentifier",
.note = @"note",
.ordersCount = @"ordersCount",
.tags = @"tags",
.taxExempt = @"taxExempt",
.totalSpent = @"totalSpent",
.updatedAt = @"updatedAt",
.verifiedEmail = @"verifiedEmail",
};
@implementation _BUYCustomer
+ (NSString *)entityName {
return @"Customer";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"acceptsMarketingValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"acceptsMarketing"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"customerStateValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"customerState"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"identifierValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"identifier"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"lastOrderIDValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"lastOrderID"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"ordersCountValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"ordersCount"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"taxExemptValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"taxExempt"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"verifiedEmailValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"verifiedEmail"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
- (NSNumber*)acceptsMarketing {
[self willAccessValueForKey:@"acceptsMarketing"];
id value = [self primitiveValueForKey:@"acceptsMarketing"];
[self didAccessValueForKey:@"acceptsMarketing"];
return value;
}
- (void)setAcceptsMarketing:(NSNumber*)value_ {
[self willChangeValueForKey:@"acceptsMarketing"];
[self setPrimitiveValue:value_ forKey:@"acceptsMarketing"];
[self didChangeValueForKey:@"acceptsMarketing"];
}
- (NSDate*)createdAt {
[self willAccessValueForKey:@"createdAt"];
id value = [self primitiveValueForKey:@"createdAt"];
[self didAccessValueForKey:@"createdAt"];
return value;
}
- (void)setCreatedAt:(NSDate*)value_ {
[self willChangeValueForKey:@"createdAt"];
[self setPrimitiveValue:value_ forKey:@"createdAt"];
[self didChangeValueForKey:@"createdAt"];
}
- (NSNumber*)customerState {
[self willAccessValueForKey:@"customerState"];
id value = [self primitiveValueForKey:@"customerState"];
[self didAccessValueForKey:@"customerState"];
return value;
}
- (void)setCustomerState:(NSNumber*)value_ {
[self willChangeValueForKey:@"customerState"];
[self setPrimitiveValue:value_ forKey:@"customerState"];
[self didChangeValueForKey:@"customerState"];
}
- (NSString*)email {
[self willAccessValueForKey:@"email"];
id value = [self primitiveValueForKey:@"email"];
[self didAccessValueForKey:@"email"];
return value;
}
- (void)setEmail:(NSString*)value_ {
[self willChangeValueForKey:@"email"];
[self setPrimitiveValue:value_ forKey:@"email"];
[self didChangeValueForKey:@"email"];
}
- (NSString*)firstName {
[self willAccessValueForKey:@"firstName"];
id value = [self primitiveValueForKey:@"firstName"];
[self didAccessValueForKey:@"firstName"];
return value;
}
- (void)setFirstName:(NSString*)value_ {
[self willChangeValueForKey:@"firstName"];
[self setPrimitiveValue:value_ forKey:@"firstName"];
[self didChangeValueForKey:@"firstName"];
}
- (NSNumber*)identifier {
[self willAccessValueForKey:@"identifier"];
id value = [self primitiveValueForKey:@"identifier"];
[self didAccessValueForKey:@"identifier"];
return value;
}
- (void)setIdentifier:(NSNumber*)value_ {
[self willChangeValueForKey:@"identifier"];
[self setPrimitiveValue:value_ forKey:@"identifier"];
[self didChangeValueForKey:@"identifier"];
}
- (NSString*)lastName {
[self willAccessValueForKey:@"lastName"];
id value = [self primitiveValueForKey:@"lastName"];
[self didAccessValueForKey:@"lastName"];
return value;
}
- (void)setLastName:(NSString*)value_ {
[self willChangeValueForKey:@"lastName"];
[self setPrimitiveValue:value_ forKey:@"lastName"];
[self didChangeValueForKey:@"lastName"];
}
- (NSNumber*)lastOrderID {
[self willAccessValueForKey:@"lastOrderID"];
id value = [self primitiveValueForKey:@"lastOrderID"];
[self didAccessValueForKey:@"lastOrderID"];
return value;
}
- (void)setLastOrderID:(NSNumber*)value_ {
[self willChangeValueForKey:@"lastOrderID"];
[self setPrimitiveValue:value_ forKey:@"lastOrderID"];
[self didChangeValueForKey:@"lastOrderID"];
}
- (NSString*)lastOrderName {
[self willAccessValueForKey:@"lastOrderName"];
id value = [self primitiveValueForKey:@"lastOrderName"];
[self didAccessValueForKey:@"lastOrderName"];
return value;
}
- (void)setLastOrderName:(NSString*)value_ {
[self willChangeValueForKey:@"lastOrderName"];
[self setPrimitiveValue:value_ forKey:@"lastOrderName"];
[self didChangeValueForKey:@"lastOrderName"];
}
- (NSString*)multipassIdentifier {
[self willAccessValueForKey:@"multipassIdentifier"];
id value = [self primitiveValueForKey:@"multipassIdentifier"];
[self didAccessValueForKey:@"multipassIdentifier"];
return value;
}
- (void)setMultipassIdentifier:(NSString*)value_ {
[self willChangeValueForKey:@"multipassIdentifier"];
[self setPrimitiveValue:value_ forKey:@"multipassIdentifier"];
[self didChangeValueForKey:@"multipassIdentifier"];
}
- (NSString*)note {
[self willAccessValueForKey:@"note"];
id value = [self primitiveValueForKey:@"note"];
[self didAccessValueForKey:@"note"];
return value;
}
- (void)setNote:(NSString*)value_ {
[self willChangeValueForKey:@"note"];
[self setPrimitiveValue:value_ forKey:@"note"];
[self didChangeValueForKey:@"note"];
}
- (NSNumber*)ordersCount {
[self willAccessValueForKey:@"ordersCount"];
id value = [self primitiveValueForKey:@"ordersCount"];
[self didAccessValueForKey:@"ordersCount"];
return value;
}
- (void)setOrdersCount:(NSNumber*)value_ {
[self willChangeValueForKey:@"ordersCount"];
[self setPrimitiveValue:value_ forKey:@"ordersCount"];
[self didChangeValueForKey:@"ordersCount"];
}
- (NSString*)tags {
[self willAccessValueForKey:@"tags"];
id value = [self primitiveValueForKey:@"tags"];
[self didAccessValueForKey:@"tags"];
return value;
}
- (void)setTags:(NSString*)value_ {
[self willChangeValueForKey:@"tags"];
[self setPrimitiveValue:value_ forKey:@"tags"];
[self didChangeValueForKey:@"tags"];
}
- (NSNumber*)taxExempt {
[self willAccessValueForKey:@"taxExempt"];
id value = [self primitiveValueForKey:@"taxExempt"];
[self didAccessValueForKey:@"taxExempt"];
return value;
}
- (void)setTaxExempt:(NSNumber*)value_ {
[self willChangeValueForKey:@"taxExempt"];
[self setPrimitiveValue:value_ forKey:@"taxExempt"];
[self didChangeValueForKey:@"taxExempt"];
}
- (NSDecimalNumber*)totalSpent {
[self willAccessValueForKey:@"totalSpent"];
id value = [self primitiveValueForKey:@"totalSpent"];
[self didAccessValueForKey:@"totalSpent"];
return value;
}
- (void)setTotalSpent:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"totalSpent"];
[self setPrimitiveValue:value_ forKey:@"totalSpent"];
[self didChangeValueForKey:@"totalSpent"];
}
- (NSDate*)updatedAt {
[self willAccessValueForKey:@"updatedAt"];
id value = [self primitiveValueForKey:@"updatedAt"];
[self didAccessValueForKey:@"updatedAt"];
return value;
}
- (void)setUpdatedAt:(NSDate*)value_ {
[self willChangeValueForKey:@"updatedAt"];
[self setPrimitiveValue:value_ forKey:@"updatedAt"];
[self didChangeValueForKey:@"updatedAt"];
}
- (NSNumber*)verifiedEmail {
[self willAccessValueForKey:@"verifiedEmail"];
id value = [self primitiveValueForKey:@"verifiedEmail"];
[self didAccessValueForKey:@"verifiedEmail"];
return value;
}
- (void)setVerifiedEmail:(NSNumber*)value_ {
[self willChangeValueForKey:@"verifiedEmail"];
[self setPrimitiveValue:value_ forKey:@"verifiedEmail"];
[self didChangeValueForKey:@"verifiedEmail"];
}
#endif
- (BOOL)acceptsMarketingValue {
NSNumber *result = [self acceptsMarketing];
return [result boolValue];
}
- (void)setAcceptsMarketingValue:(BOOL)value_ {
[self setAcceptsMarketing:@(value_)];
}
- (BOOL)customerStateValue {
NSNumber *result = [self customerState];
return [result boolValue];
}
- (void)setCustomerStateValue:(BOOL)value_ {
[self setCustomerState:@(value_)];
}
- (int64_t)identifierValue {
NSNumber *result = [self identifier];
return [result longLongValue];
}
- (void)setIdentifierValue:(int64_t)value_ {
[self setIdentifier:@(value_)];
}
- (int64_t)lastOrderIDValue {
NSNumber *result = [self lastOrderID];
return [result longLongValue];
}
- (void)setLastOrderIDValue:(int64_t)value_ {
[self setLastOrderID:@(value_)];
}
- (int16_t)ordersCountValue {
NSNumber *result = [self ordersCount];
return [result shortValue];
}
- (void)setOrdersCountValue:(int16_t)value_ {
[self setOrdersCount:@(value_)];
}
- (BOOL)taxExemptValue {
NSNumber *result = [self taxExempt];
return [result boolValue];
}
- (void)setTaxExemptValue:(BOOL)value_ {
[self setTaxExempt:@(value_)];
}
- (BOOL)verifiedEmailValue {
NSNumber *result = [self verifiedEmail];
return [result boolValue];
}
- (void)setVerifiedEmailValue:(BOOL)value_ {
[self setVerifiedEmail:@(value_)];
}
@end
#pragma mark -
@implementation BUYModelManager (BUYCustomerInserting)
- (BUYCustomer *)insertCustomerWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYCustomer *)[self buy_objectWithEntityName:@"Customer" JSONDictionary:dictionary];
}
- (NSArray<BUYCustomer *> *)insertCustomersWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYCustomer *> *)[self buy_objectsWithEntityName:@"Customer" JSONArray:array];
}
- (NSArray<BUYCustomer *> *)allCustomerObjects
{
return (NSArray<BUYCustomer *> *)[self buy_objectsWithEntityName:@"Customer" identifiers:nil];
}
- (BUYCustomer *)fetchCustomerWithIdentifierValue:(int64_t)identifier
{
return (BUYCustomer *)[self buy_objectWithEntityName:@"Customer" identifier:@(identifier)];
}
@end
//
// _BUYImageLink.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYImageLink.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYImageLinkAttributes {
__unsafe_unretained NSString *createdAt;
__unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *position;
__unsafe_unretained NSString *sourceURL;
__unsafe_unretained NSString *updatedAt;
__unsafe_unretained NSString *variantIds;
} BUYImageLinkAttributes;
extern const struct BUYImageLinkRelationships {
__unsafe_unretained NSString *collection;
__unsafe_unretained NSString *product;
} BUYImageLinkRelationships;
extern const struct BUYImageLinkUserInfo {
__unsafe_unretained NSString *documentation;
} BUYImageLinkUserInfo;
@class BUYCollection;
@class BUYProduct;
@class NSURL;
@class NSArray;
@class BUYImageLink;
@interface BUYModelManager (BUYImageLinkInserting)
- (NSArray<BUYImageLink *> *)allImageLinkObjects;
- (BUYImageLink *)fetchImageLinkWithIdentifierValue:(int64_t)identifier;
- (BUYImageLink *)insertImageLinkWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYImageLink *> *)insertImageLinksWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* A link to an image representing a product or collection.
*/
@interface _BUYImageLink : BUYCachedObject
+ (NSString *)entityName;
@property (nonatomic, strong) NSDate* createdAt;
@property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue;
- (int64_t)identifierValue;
- (void)setIdentifierValue:(int64_t)value_;
/**
* The position of the image for the product.
*/
@property (nonatomic, strong) NSNumber* position;
@property (atomic) int32_t positionValue;
- (int32_t)positionValue;
- (void)setPositionValue:(int32_t)value_;
/**
* Specifies the location of the product image.
*
* Maps to "src" in JSON.
*/
@property (nonatomic, strong) NSURL* sourceURL;
@property (nonatomic, strong) NSDate* updatedAt;
@property (nonatomic, strong) NSArray* variantIds;
@property (nonatomic, strong) BUYCollection *collection;
/**
* Inverse of Product.images.
*
* Maps to "product_id" in JSON.
*/
@property (nonatomic, strong) BUYProduct *product;
@end
@interface _BUYImageLink (CoreDataGeneratedPrimitiveAccessors)
- (NSDate*)primitiveCreatedAt;
- (void)setPrimitiveCreatedAt:(NSDate*)value;
- (NSNumber*)primitiveIdentifier;
- (void)setPrimitiveIdentifier:(NSNumber*)value;
- (NSNumber*)primitivePosition;
- (void)setPrimitivePosition:(NSNumber*)value;
- (NSURL*)primitiveSourceURL;
- (void)setPrimitiveSourceURL:(NSURL*)value;
- (NSDate*)primitiveUpdatedAt;
- (void)setPrimitiveUpdatedAt:(NSDate*)value;
- (NSArray*)primitiveVariantIds;
- (void)setPrimitiveVariantIds:(NSArray*)value;
- (BUYCollection *)primitiveCollection;
- (void)setPrimitiveCollection:(BUYCollection *)value;
- (BUYProduct *)primitiveProduct;
- (void)setPrimitiveProduct:(BUYProduct *)value;
@end
//
// _BUYImageLink.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYImageLink.m instead.
#import "_BUYImageLink.h"
const struct BUYImageLinkAttributes BUYImageLinkAttributes = {
.createdAt = @"createdAt",
.identifier = @"identifier",
.position = @"position",
.sourceURL = @"sourceURL",
.updatedAt = @"updatedAt",
.variantIds = @"variantIds",
};
const struct BUYImageLinkRelationships BUYImageLinkRelationships = {
.collection = @"collection",
.product = @"product",
};
const struct BUYImageLinkUserInfo BUYImageLinkUserInfo = {
.documentation = @"A link to an image representing a product or collection.",
};
@implementation _BUYImageLink
+ (NSString *)entityName {
return @"ImageLink";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"identifierValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"identifier"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"positionValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"position"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
- (NSDate*)createdAt {
[self willAccessValueForKey:@"createdAt"];
id value = [self primitiveValueForKey:@"createdAt"];
[self didAccessValueForKey:@"createdAt"];
return value;
}
- (void)setCreatedAt:(NSDate*)value_ {
[self willChangeValueForKey:@"createdAt"];
[self setPrimitiveValue:value_ forKey:@"createdAt"];
[self didChangeValueForKey:@"createdAt"];
}
- (NSNumber*)identifier {
[self willAccessValueForKey:@"identifier"];
id value = [self primitiveValueForKey:@"identifier"];
[self didAccessValueForKey:@"identifier"];
return value;
}
- (void)setIdentifier:(NSNumber*)value_ {
[self willChangeValueForKey:@"identifier"];
[self setPrimitiveValue:value_ forKey:@"identifier"];
[self didChangeValueForKey:@"identifier"];
}
- (NSNumber*)position {
[self willAccessValueForKey:@"position"];
id value = [self primitiveValueForKey:@"position"];
[self didAccessValueForKey:@"position"];
return value;
}
- (void)setPosition:(NSNumber*)value_ {
[self willChangeValueForKey:@"position"];
[self setPrimitiveValue:value_ forKey:@"position"];
[self didChangeValueForKey:@"position"];
}
- (NSURL*)sourceURL {
[self willAccessValueForKey:@"sourceURL"];
id value = [self primitiveValueForKey:@"sourceURL"];
[self didAccessValueForKey:@"sourceURL"];
return value;
}
- (void)setSourceURL:(NSURL*)value_ {
[self willChangeValueForKey:@"sourceURL"];
[self setPrimitiveValue:value_ forKey:@"sourceURL"];
[self didChangeValueForKey:@"sourceURL"];
}
- (NSDate*)updatedAt {
[self willAccessValueForKey:@"updatedAt"];
id value = [self primitiveValueForKey:@"updatedAt"];
[self didAccessValueForKey:@"updatedAt"];
return value;
}
- (void)setUpdatedAt:(NSDate*)value_ {
[self willChangeValueForKey:@"updatedAt"];
[self setPrimitiveValue:value_ forKey:@"updatedAt"];
[self didChangeValueForKey:@"updatedAt"];
}
- (NSArray*)variantIds {
[self willAccessValueForKey:@"variantIds"];
id value = [self primitiveValueForKey:@"variantIds"];
[self didAccessValueForKey:@"variantIds"];
return value;
}
- (void)setVariantIds:(NSArray*)value_ {
[self willChangeValueForKey:@"variantIds"];
[self setPrimitiveValue:value_ forKey:@"variantIds"];
[self didChangeValueForKey:@"variantIds"];
}
#endif
- (int64_t)identifierValue {
NSNumber *result = [self identifier];
return [result longLongValue];
}
- (void)setIdentifierValue:(int64_t)value_ {
[self setIdentifier:@(value_)];
}
- (int32_t)positionValue {
NSNumber *result = [self position];
return [result intValue];
}
- (void)setPositionValue:(int32_t)value_ {
[self setPosition:@(value_)];
}
#if defined CORE_DATA_PERSISTENCE
@dynamic collection;
#endif
#if defined CORE_DATA_PERSISTENCE
@dynamic product;
#endif
@end
#pragma mark -
@implementation BUYModelManager (BUYImageLinkInserting)
- (BUYImageLink *)insertImageLinkWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYImageLink *)[self buy_objectWithEntityName:@"ImageLink" JSONDictionary:dictionary];
}
- (NSArray<BUYImageLink *> *)insertImageLinksWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYImageLink *> *)[self buy_objectsWithEntityName:@"ImageLink" JSONArray:array];
}
- (NSArray<BUYImageLink *> *)allImageLinkObjects
{
return (NSArray<BUYImageLink *> *)[self buy_objectsWithEntityName:@"ImageLink" identifiers:nil];
}
- (BUYImageLink *)fetchImageLinkWithIdentifierValue:(int64_t)identifier
{
return (BUYImageLink *)[self buy_objectWithEntityName:@"ImageLink" identifier:@(identifier)];
}
@end
//
// _BUYLineItem.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYLineItem.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYLineItemAttributes {
__unsafe_unretained NSString *compareAtPrice;
__unsafe_unretained NSString *fulfilled;
__unsafe_unretained NSString *fulfillmentService;
__unsafe_unretained NSString *grams;
__unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *linePrice;
__unsafe_unretained NSString *price;
__unsafe_unretained NSString *productId;
__unsafe_unretained NSString *properties;
__unsafe_unretained NSString *quantity;
__unsafe_unretained NSString *requiresShipping;
__unsafe_unretained NSString *sku;
__unsafe_unretained NSString *taxable;
__unsafe_unretained NSString *title;
__unsafe_unretained NSString *variantId;
__unsafe_unretained NSString *variantTitle;
} BUYLineItemAttributes;
extern const struct BUYLineItemRelationships {
__unsafe_unretained NSString *checkout;
__unsafe_unretained NSString *order;
} BUYLineItemRelationships;
extern const struct BUYLineItemUserInfo {
__unsafe_unretained NSString *documentation;
} BUYLineItemUserInfo;
@class BUYCheckout;
@class BUYOrder;
@class NSDictionary;
@class BUYLineItem;
@interface BUYModelManager (BUYLineItemInserting)
- (NSArray<BUYLineItem *> *)allLineItemObjects;
- (BUYLineItem *)fetchLineItemWithIdentifierValue:(int64_t)identifier;
- (BUYLineItem *)insertLineItemWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYLineItem *> *)insertLineItemsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* This represents a BUYLineItem on a BUYCart or on a BUYCheckout.
*/
@interface _BUYLineItem : BUYCachedObject
+ (NSString *)entityName;
/**
* The competitor's prices for the same item.
*/
@property (nonatomic, strong) NSDecimalNumber* compareAtPrice;
@property (nonatomic, strong) NSNumber* fulfilled;
@property (atomic) BOOL fulfilledValue;
- (BOOL)fulfilledValue;
- (void)setFulfilledValue:(BOOL)value_;
/**
* Service provider who is doing the fulfillment.
*/
@property (nonatomic, strong) NSString* fulfillmentService;
/**
* The weight of the BUYProductVariant in grams.
*/
@property (nonatomic, strong) NSDecimalNumber* grams;
@property (nonatomic, strong) NSString* identifier;
/**
* The line price of the item (price * quantity).
*/
@property (nonatomic, strong) NSDecimalNumber* linePrice;
/**
* The price of the BUYLineItem.
*
* This price does not need to match the product variant.
*/
@property (nonatomic, strong) NSDecimalNumber* price;
@property (nonatomic, strong) NSNumber* productId;
@property (atomic) int64_t productIdValue;
- (int64_t)productIdValue;
- (void)setProductIdValue:(int64_t)value_;
/**
* Custom properties set on the line item.
*/
@property (nonatomic, strong) NSDictionary* properties;
/**
* The quantity of the BUYLineItem.
*/
@property (nonatomic, strong) NSDecimalNumber* quantity;
/**
* Whether this BUYLineItem requires shipping.
*
* This needs to match the product variant.
*/
@property (nonatomic, strong) NSNumber* requiresShipping;
@property (atomic) BOOL requiresShippingValue;
- (BOOL)requiresShippingValue;
- (void)setRequiresShippingValue:(BOOL)value_;
/**
* The unique SKU for the line item.
*/
@property (nonatomic, strong) NSString* sku;
/**
* Whether the line item is taxable.
*/
@property (nonatomic, strong) NSNumber* taxable;
@property (atomic) BOOL taxableValue;
- (BOOL)taxableValue;
- (void)setTaxableValue:(BOOL)value_;
/**
* The title of the BUYLineItem.
*
* The title does not need to match the product variant.
*/
@property (nonatomic, strong) NSString* title;
/**
* BUYProductVariant identifer.
*
* Keep a reference to a cart or products if you wish to display information for product variants in a BUYCheckout.
*/
@property (nonatomic, strong) NSNumber* variantId;
@property (atomic) int64_t variantIdValue;
- (int64_t)variantIdValue;
- (void)setVariantIdValue:(int64_t)value_;
/**
* The title for the variant in the line item.
*/
@property (nonatomic, strong) NSString* variantTitle;
/**
* Inverse of Checkout.lineItem.
*/
@property (nonatomic, strong) BUYCheckout *checkout;
@property (nonatomic, strong) BUYOrder *order;
@end
@interface _BUYLineItem (CoreDataGeneratedPrimitiveAccessors)
- (NSDecimalNumber*)primitiveCompareAtPrice;
- (void)setPrimitiveCompareAtPrice:(NSDecimalNumber*)value;
- (NSNumber*)primitiveFulfilled;
- (void)setPrimitiveFulfilled:(NSNumber*)value;
- (NSString*)primitiveFulfillmentService;
- (void)setPrimitiveFulfillmentService:(NSString*)value;
- (NSDecimalNumber*)primitiveGrams;
- (void)setPrimitiveGrams:(NSDecimalNumber*)value;
- (NSString*)primitiveIdentifier;
- (void)setPrimitiveIdentifier:(NSString*)value;
- (NSDecimalNumber*)primitiveLinePrice;
- (void)setPrimitiveLinePrice:(NSDecimalNumber*)value;
- (NSDecimalNumber*)primitivePrice;
- (void)setPrimitivePrice:(NSDecimalNumber*)value;
- (NSNumber*)primitiveProductId;
- (void)setPrimitiveProductId:(NSNumber*)value;
- (NSDictionary*)primitiveProperties;
- (void)setPrimitiveProperties:(NSDictionary*)value;
- (NSDecimalNumber*)primitiveQuantity;
- (void)setPrimitiveQuantity:(NSDecimalNumber*)value;
- (NSNumber*)primitiveRequiresShipping;
- (void)setPrimitiveRequiresShipping:(NSNumber*)value;
- (NSString*)primitiveSku;
- (void)setPrimitiveSku:(NSString*)value;
- (NSNumber*)primitiveTaxable;
- (void)setPrimitiveTaxable:(NSNumber*)value;
- (NSString*)primitiveTitle;
- (void)setPrimitiveTitle:(NSString*)value;
- (NSNumber*)primitiveVariantId;
- (void)setPrimitiveVariantId:(NSNumber*)value;
- (NSString*)primitiveVariantTitle;
- (void)setPrimitiveVariantTitle:(NSString*)value;
- (BUYCheckout *)primitiveCheckout;
- (void)setPrimitiveCheckout:(BUYCheckout *)value;
- (BUYOrder *)primitiveOrder;
- (void)setPrimitiveOrder:(BUYOrder *)value;
@end
//
// _BUYLineItem.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYLineItem.m instead.
#import "_BUYLineItem.h"
const struct BUYLineItemAttributes BUYLineItemAttributes = {
.compareAtPrice = @"compareAtPrice",
.fulfilled = @"fulfilled",
.fulfillmentService = @"fulfillmentService",
.grams = @"grams",
.identifier = @"identifier",
.linePrice = @"linePrice",
.price = @"price",
.productId = @"productId",
.properties = @"properties",
.quantity = @"quantity",
.requiresShipping = @"requiresShipping",
.sku = @"sku",
.taxable = @"taxable",
.title = @"title",
.variantId = @"variantId",
.variantTitle = @"variantTitle",
};
const struct BUYLineItemRelationships BUYLineItemRelationships = {
.checkout = @"checkout",
.order = @"order",
};
const struct BUYLineItemUserInfo BUYLineItemUserInfo = {
.documentation = @"This represents a BUYLineItem on a BUYCart or on a BUYCheckout.",
};
@implementation _BUYLineItem
+ (NSString *)entityName {
return @"LineItem";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"fulfilledValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"fulfilled"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"productIdValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"productId"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"requiresShippingValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"requiresShipping"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"taxableValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"taxable"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"variantIdValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"variantId"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
- (NSDecimalNumber*)compareAtPrice {
[self willAccessValueForKey:@"compareAtPrice"];
id value = [self primitiveValueForKey:@"compareAtPrice"];
[self didAccessValueForKey:@"compareAtPrice"];
return value;
}
- (void)setCompareAtPrice:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"compareAtPrice"];
[self setPrimitiveValue:value_ forKey:@"compareAtPrice"];
[self didChangeValueForKey:@"compareAtPrice"];
}
- (NSNumber*)fulfilled {
[self willAccessValueForKey:@"fulfilled"];
id value = [self primitiveValueForKey:@"fulfilled"];
[self didAccessValueForKey:@"fulfilled"];
return value;
}
- (void)setFulfilled:(NSNumber*)value_ {
[self willChangeValueForKey:@"fulfilled"];
[self setPrimitiveValue:value_ forKey:@"fulfilled"];
[self didChangeValueForKey:@"fulfilled"];
}
- (NSString*)fulfillmentService {
[self willAccessValueForKey:@"fulfillmentService"];
id value = [self primitiveValueForKey:@"fulfillmentService"];
[self didAccessValueForKey:@"fulfillmentService"];
return value;
}
- (void)setFulfillmentService:(NSString*)value_ {
[self willChangeValueForKey:@"fulfillmentService"];
[self setPrimitiveValue:value_ forKey:@"fulfillmentService"];
[self didChangeValueForKey:@"fulfillmentService"];
}
- (NSDecimalNumber*)grams {
[self willAccessValueForKey:@"grams"];
id value = [self primitiveValueForKey:@"grams"];
[self didAccessValueForKey:@"grams"];
return value;
}
- (void)setGrams:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"grams"];
[self setPrimitiveValue:value_ forKey:@"grams"];
[self didChangeValueForKey:@"grams"];
}
- (NSString*)identifier {
[self willAccessValueForKey:@"identifier"];
id value = [self primitiveValueForKey:@"identifier"];
[self didAccessValueForKey:@"identifier"];
return value;
}
- (void)setIdentifier:(NSString*)value_ {
[self willChangeValueForKey:@"identifier"];
[self setPrimitiveValue:value_ forKey:@"identifier"];
[self didChangeValueForKey:@"identifier"];
}
- (NSDecimalNumber*)linePrice {
[self willAccessValueForKey:@"linePrice"];
id value = [self primitiveValueForKey:@"linePrice"];
[self didAccessValueForKey:@"linePrice"];
return value;
}
- (void)setLinePrice:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"linePrice"];
[self setPrimitiveValue:value_ forKey:@"linePrice"];
[self didChangeValueForKey:@"linePrice"];
}
- (NSDecimalNumber*)price {
[self willAccessValueForKey:@"price"];
id value = [self primitiveValueForKey:@"price"];
[self didAccessValueForKey:@"price"];
return value;
}
- (void)setPrice:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"price"];
[self setPrimitiveValue:value_ forKey:@"price"];
[self didChangeValueForKey:@"price"];
}
- (NSNumber*)productId {
[self willAccessValueForKey:@"productId"];
id value = [self primitiveValueForKey:@"productId"];
[self didAccessValueForKey:@"productId"];
return value;
}
- (void)setProductId:(NSNumber*)value_ {
[self willChangeValueForKey:@"productId"];
[self setPrimitiveValue:value_ forKey:@"productId"];
[self didChangeValueForKey:@"productId"];
}
- (NSDictionary*)properties {
[self willAccessValueForKey:@"properties"];
id value = [self primitiveValueForKey:@"properties"];
[self didAccessValueForKey:@"properties"];
return value;
}
- (void)setProperties:(NSDictionary*)value_ {
[self willChangeValueForKey:@"properties"];
[self setPrimitiveValue:value_ forKey:@"properties"];
[self didChangeValueForKey:@"properties"];
}
- (NSDecimalNumber*)quantity {
[self willAccessValueForKey:@"quantity"];
id value = [self primitiveValueForKey:@"quantity"];
[self didAccessValueForKey:@"quantity"];
return value;
}
- (void)setQuantity:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"quantity"];
[self setPrimitiveValue:value_ forKey:@"quantity"];
[self didChangeValueForKey:@"quantity"];
}
- (NSNumber*)requiresShipping {
[self willAccessValueForKey:@"requiresShipping"];
id value = [self primitiveValueForKey:@"requiresShipping"];
[self didAccessValueForKey:@"requiresShipping"];
return value;
}
- (void)setRequiresShipping:(NSNumber*)value_ {
[self willChangeValueForKey:@"requiresShipping"];
[self setPrimitiveValue:value_ forKey:@"requiresShipping"];
[self didChangeValueForKey:@"requiresShipping"];
}
- (NSString*)sku {
[self willAccessValueForKey:@"sku"];
id value = [self primitiveValueForKey:@"sku"];
[self didAccessValueForKey:@"sku"];
return value;
}
- (void)setSku:(NSString*)value_ {
[self willChangeValueForKey:@"sku"];
[self setPrimitiveValue:value_ forKey:@"sku"];
[self didChangeValueForKey:@"sku"];
}
- (NSNumber*)taxable {
[self willAccessValueForKey:@"taxable"];
id value = [self primitiveValueForKey:@"taxable"];
[self didAccessValueForKey:@"taxable"];
return value;
}
- (void)setTaxable:(NSNumber*)value_ {
[self willChangeValueForKey:@"taxable"];
[self setPrimitiveValue:value_ forKey:@"taxable"];
[self didChangeValueForKey:@"taxable"];
}
- (NSString*)title {
[self willAccessValueForKey:@"title"];
id value = [self primitiveValueForKey:@"title"];
[self didAccessValueForKey:@"title"];
return value;
}
- (void)setTitle:(NSString*)value_ {
[self willChangeValueForKey:@"title"];
[self setPrimitiveValue:value_ forKey:@"title"];
[self didChangeValueForKey:@"title"];
}
- (NSNumber*)variantId {
[self willAccessValueForKey:@"variantId"];
id value = [self primitiveValueForKey:@"variantId"];
[self didAccessValueForKey:@"variantId"];
return value;
}
- (void)setVariantId:(NSNumber*)value_ {
[self willChangeValueForKey:@"variantId"];
[self setPrimitiveValue:value_ forKey:@"variantId"];
[self didChangeValueForKey:@"variantId"];
}
- (NSString*)variantTitle {
[self willAccessValueForKey:@"variantTitle"];
id value = [self primitiveValueForKey:@"variantTitle"];
[self didAccessValueForKey:@"variantTitle"];
return value;
}
- (void)setVariantTitle:(NSString*)value_ {
[self willChangeValueForKey:@"variantTitle"];
[self setPrimitiveValue:value_ forKey:@"variantTitle"];
[self didChangeValueForKey:@"variantTitle"];
}
#endif
- (BOOL)fulfilledValue {
NSNumber *result = [self fulfilled];
return [result boolValue];
}
- (void)setFulfilledValue:(BOOL)value_ {
[self setFulfilled:@(value_)];
}
- (int64_t)productIdValue {
NSNumber *result = [self productId];
return [result longLongValue];
}
- (void)setProductIdValue:(int64_t)value_ {
[self setProductId:@(value_)];
}
- (BOOL)requiresShippingValue {
NSNumber *result = [self requiresShipping];
return [result boolValue];
}
- (void)setRequiresShippingValue:(BOOL)value_ {
[self setRequiresShipping:@(value_)];
}
- (BOOL)taxableValue {
NSNumber *result = [self taxable];
return [result boolValue];
}
- (void)setTaxableValue:(BOOL)value_ {
[self setTaxable:@(value_)];
}
- (int64_t)variantIdValue {
NSNumber *result = [self variantId];
return [result longLongValue];
}
- (void)setVariantIdValue:(int64_t)value_ {
[self setVariantId:@(value_)];
}
#if defined CORE_DATA_PERSISTENCE
@dynamic checkout;
#endif
#if defined CORE_DATA_PERSISTENCE
@dynamic order;
#endif
@end
#pragma mark -
@implementation BUYModelManager (BUYLineItemInserting)
- (BUYLineItem *)insertLineItemWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYLineItem *)[self buy_objectWithEntityName:@"LineItem" JSONDictionary:dictionary];
}
- (NSArray<BUYLineItem *> *)insertLineItemsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYLineItem *> *)[self buy_objectsWithEntityName:@"LineItem" JSONArray:array];
}
- (NSArray<BUYLineItem *> *)allLineItemObjects
{
return (NSArray<BUYLineItem *> *)[self buy_objectsWithEntityName:@"LineItem" identifiers:nil];
}
- (BUYLineItem *)fetchLineItemWithIdentifierValue:(int64_t)identifier
{
return (BUYLineItem *)[self buy_objectWithEntityName:@"LineItem" identifier:@(identifier)];
}
@end
//
// _BUYOption.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYOption.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYOptionAttributes {
__unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *name;
__unsafe_unretained NSString *position;
} BUYOptionAttributes;
extern const struct BUYOptionRelationships {
__unsafe_unretained NSString *product;
} BUYOptionRelationships;
extern const struct BUYOptionUserInfo {
__unsafe_unretained NSString *documentation;
} BUYOptionUserInfo;
@class BUYProduct;
@class BUYOption;
@interface BUYModelManager (BUYOptionInserting)
- (NSArray<BUYOption *> *)allOptionObjects;
- (BUYOption *)fetchOptionWithIdentifierValue:(int64_t)identifier;
- (BUYOption *)insertOptionWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYOption *> *)insertOptionsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* The associated product for this option.
*/
@interface _BUYOption : BUYCachedObject
+ (NSString *)entityName;
@property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue;
- (int64_t)identifierValue;
- (void)setIdentifierValue:(int64_t)value_;
/**
* Custom product property names like "Size", "Color", and "Material".
*
* 255 characters limit each.
*/
@property (nonatomic, strong) NSString* name;
/**
* The order in which the option should optionally appear.
*/
@property (nonatomic, strong) NSNumber* position;
@property (atomic) int32_t positionValue;
- (int32_t)positionValue;
- (void)setPositionValue:(int32_t)value_;
/**
* Inverse of Product.options.
*/
@property (nonatomic, strong) BUYProduct *product;
@end
@interface _BUYOption (CoreDataGeneratedPrimitiveAccessors)
- (NSNumber*)primitiveIdentifier;
- (void)setPrimitiveIdentifier:(NSNumber*)value;
- (NSString*)primitiveName;
- (void)setPrimitiveName:(NSString*)value;
- (NSNumber*)primitivePosition;
- (void)setPrimitivePosition:(NSNumber*)value;
- (BUYProduct *)primitiveProduct;
- (void)setPrimitiveProduct:(BUYProduct *)value;
@end
//
// _BUYOption.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYOption.m instead.
#import "_BUYOption.h"
const struct BUYOptionAttributes BUYOptionAttributes = {
.identifier = @"identifier",
.name = @"name",
.position = @"position",
};
const struct BUYOptionRelationships BUYOptionRelationships = {
.product = @"product",
};
const struct BUYOptionUserInfo BUYOptionUserInfo = {
.documentation = @"The associated product for this option.",
};
@implementation _BUYOption
+ (NSString *)entityName {
return @"Option";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"identifierValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"identifier"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"positionValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"position"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
- (NSNumber*)identifier {
[self willAccessValueForKey:@"identifier"];
id value = [self primitiveValueForKey:@"identifier"];
[self didAccessValueForKey:@"identifier"];
return value;
}
- (void)setIdentifier:(NSNumber*)value_ {
[self willChangeValueForKey:@"identifier"];
[self setPrimitiveValue:value_ forKey:@"identifier"];
[self didChangeValueForKey:@"identifier"];
}
- (NSString*)name {
[self willAccessValueForKey:@"name"];
id value = [self primitiveValueForKey:@"name"];
[self didAccessValueForKey:@"name"];
return value;
}
- (void)setName:(NSString*)value_ {
[self willChangeValueForKey:@"name"];
[self setPrimitiveValue:value_ forKey:@"name"];
[self didChangeValueForKey:@"name"];
}
- (NSNumber*)position {
[self willAccessValueForKey:@"position"];
id value = [self primitiveValueForKey:@"position"];
[self didAccessValueForKey:@"position"];
return value;
}
- (void)setPosition:(NSNumber*)value_ {
[self willChangeValueForKey:@"position"];
[self setPrimitiveValue:value_ forKey:@"position"];
[self didChangeValueForKey:@"position"];
}
#endif
- (int64_t)identifierValue {
NSNumber *result = [self identifier];
return [result longLongValue];
}
- (void)setIdentifierValue:(int64_t)value_ {
[self setIdentifier:@(value_)];
}
- (int32_t)positionValue {
NSNumber *result = [self position];
return [result intValue];
}
- (void)setPositionValue:(int32_t)value_ {
[self setPosition:@(value_)];
}
#if defined CORE_DATA_PERSISTENCE
@dynamic product;
#endif
@end
#pragma mark -
@implementation BUYModelManager (BUYOptionInserting)
- (BUYOption *)insertOptionWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYOption *)[self buy_objectWithEntityName:@"Option" JSONDictionary:dictionary];
}
- (NSArray<BUYOption *> *)insertOptionsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYOption *> *)[self buy_objectsWithEntityName:@"Option" JSONArray:array];
}
- (NSArray<BUYOption *> *)allOptionObjects
{
return (NSArray<BUYOption *> *)[self buy_objectsWithEntityName:@"Option" identifiers:nil];
}
- (BUYOption *)fetchOptionWithIdentifierValue:(int64_t)identifier
{
return (BUYOption *)[self buy_objectWithEntityName:@"Option" identifier:@(identifier)];
}
@end
//
// _BUYOptionValue.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYOptionValue.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYOptionValueAttributes {
__unsafe_unretained NSString *name;
__unsafe_unretained NSString *optionId;
__unsafe_unretained NSString *value;
} BUYOptionValueAttributes;
extern const struct BUYOptionValueRelationships {
__unsafe_unretained NSString *variants;
} BUYOptionValueRelationships;
@class BUYProductVariant;
@class BUYOptionValue;
@interface BUYModelManager (BUYOptionValueInserting)
- (NSArray<BUYOptionValue *> *)allOptionValueObjects;
- (BUYOptionValue *)fetchOptionValueWithIdentifierValue:(int64_t)identifier;
- (BUYOptionValue *)insertOptionValueWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYOptionValue *> *)insertOptionValuesWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
@interface _BUYOptionValue : BUYCachedObject
+ (NSString *)entityName;
/**
* Custom product property names like "Size", "Color", and "Material".
*
* The same as the name of the owning option. 255 characters max.
*/
@property (nonatomic, strong) NSString* name;
@property (nonatomic, strong) NSNumber* optionId;
@property (atomic) int64_t optionIdValue;
- (int64_t)optionIdValue;
- (void)setOptionIdValue:(int64_t)value_;
/**
* The value of the option.
*
* For example, "Small", "Medium" or "Large".
*/
@property (nonatomic, strong) NSString* value;
/**
* Inverse of ProductVariant.optionValue.
*/
@property (nonatomic, strong) NSSet *variants;
- (NSMutableSet *)variantsSet;
@end
@interface _BUYOptionValue (VariantsCoreDataGeneratedAccessors)
@end
@interface _BUYOptionValue (CoreDataGeneratedPrimitiveAccessors)
- (NSString*)primitiveName;
- (void)setPrimitiveName:(NSString*)value;
- (NSNumber*)primitiveOptionId;
- (void)setPrimitiveOptionId:(NSNumber*)value;
- (NSString*)primitiveValue;
- (void)setPrimitiveValue:(NSString*)value;
- (NSMutableSet *)primitiveVariants;
- (void)setPrimitiveVariants:(NSMutableSet *)value;
@end
//
// _BUYOptionValue.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYOptionValue.m instead.
#import "_BUYOptionValue.h"
const struct BUYOptionValueAttributes BUYOptionValueAttributes = {
.name = @"name",
.optionId = @"optionId",
.value = @"value",
};
const struct BUYOptionValueRelationships BUYOptionValueRelationships = {
.variants = @"variants",
};
@implementation _BUYOptionValue
+ (NSString *)entityName {
return @"OptionValue";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"optionIdValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"optionId"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
- (NSString*)name {
[self willAccessValueForKey:@"name"];
id value = [self primitiveValueForKey:@"name"];
[self didAccessValueForKey:@"name"];
return value;
}
- (void)setName:(NSString*)value_ {
[self willChangeValueForKey:@"name"];
[self setPrimitiveValue:value_ forKey:@"name"];
[self didChangeValueForKey:@"name"];
}
- (NSNumber*)optionId {
[self willAccessValueForKey:@"optionId"];
id value = [self primitiveValueForKey:@"optionId"];
[self didAccessValueForKey:@"optionId"];
return value;
}
- (void)setOptionId:(NSNumber*)value_ {
[self willChangeValueForKey:@"optionId"];
[self setPrimitiveValue:value_ forKey:@"optionId"];
[self didChangeValueForKey:@"optionId"];
}
- (NSString*)value {
[self willAccessValueForKey:@"value"];
id value = [self primitiveValueForKey:@"value"];
[self didAccessValueForKey:@"value"];
return value;
}
- (void)setValue:(NSString*)value_ {
[self willChangeValueForKey:@"value"];
[self setPrimitiveValue:value_ forKey:@"value"];
[self didChangeValueForKey:@"value"];
}
#endif
- (int64_t)optionIdValue {
NSNumber *result = [self optionId];
return [result longLongValue];
}
- (void)setOptionIdValue:(int64_t)value_ {
[self setOptionId:@(value_)];
}
#if defined CORE_DATA_PERSISTENCE
@dynamic variants;
#endif
- (NSMutableSet *)variantsSet {
[self willAccessValueForKey:@"variants"];
NSMutableSet *result = (NSMutableSet *)[self mutableSetValueForKey:@"variants"];
[self didAccessValueForKey:@"variants"];
return result;
}
@end
#pragma mark -
@implementation BUYModelManager (BUYOptionValueInserting)
- (BUYOptionValue *)insertOptionValueWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYOptionValue *)[self buy_objectWithEntityName:@"OptionValue" JSONDictionary:dictionary];
}
- (NSArray<BUYOptionValue *> *)insertOptionValuesWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYOptionValue *> *)[self buy_objectsWithEntityName:@"OptionValue" JSONArray:array];
}
- (NSArray<BUYOptionValue *> *)allOptionValueObjects
{
return (NSArray<BUYOptionValue *> *)[self buy_objectsWithEntityName:@"OptionValue" identifiers:nil];
}
- (BUYOptionValue *)fetchOptionValueWithIdentifierValue:(int64_t)identifier
{
return (BUYOptionValue *)[self buy_objectWithEntityName:@"OptionValue" identifier:@(identifier)];
}
@end
//
// _BUYOrder.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYOrder.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYOrderAttributes {
__unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *name;
__unsafe_unretained NSString *orderStatusURL;
__unsafe_unretained NSString *processedAt;
__unsafe_unretained NSString *statusURL;
__unsafe_unretained NSString *subtotalPrice;
__unsafe_unretained NSString *totalPrice;
} BUYOrderAttributes;
extern const struct BUYOrderRelationships {
__unsafe_unretained NSString *checkout;
__unsafe_unretained NSString *lineItems;
} BUYOrderRelationships;
extern const struct BUYOrderUserInfo {
__unsafe_unretained NSString *attributeValueClassName;
__unsafe_unretained NSString *documentation;
} BUYOrderUserInfo;
@class BUYCheckout;
@class BUYLineItem;
@class NSURL;
@class NSURL;
@class BUYOrder;
@interface BUYModelManager (BUYOrderInserting)
- (NSArray<BUYOrder *> *)allOrderObjects;
- (BUYOrder *)fetchOrderWithIdentifierValue:(int64_t)identifier;
- (BUYOrder *)insertOrderWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYOrder *> *)insertOrdersWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* URL for the website showing the order status, doesn't require a customer token.
*/
@interface _BUYOrder : BUYCachedObject
+ (NSString *)entityName;
@property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue;
- (int64_t)identifierValue;
- (void)setIdentifierValue:(int64_t)value_;
/**
* The customer's order name as represented by a number.
*/
@property (nonatomic, strong) NSString* name;
/**
* URL for the website showing the order status.
*/
@property (nonatomic, strong) NSURL* orderStatusURL;
@property (nonatomic, strong) NSDate* processedAt;
@property (nonatomic, strong) NSURL* statusURL;
@property (nonatomic, strong) NSDecimalNumber* subtotalPrice;
@property (nonatomic, strong) NSDecimalNumber* totalPrice;
/**
* Inverse of Checkout.order.
*/
@property (nonatomic, strong) BUYCheckout *checkout;
@property (nonatomic, strong) NSOrderedSet *lineItems;
- (NSMutableOrderedSet *)lineItemsSet;
@end
@interface _BUYOrder (LineItemsCoreDataGeneratedAccessors)
- (void)insertObject:(BUYLineItem *)value inLineItemsAtIndex:(NSUInteger)idx;
- (void)removeObjectFromLineItemsAtIndex:(NSUInteger)idx;
- (void)insertLineItems:(NSArray *)value atIndexes:(NSIndexSet *)indexes;
- (void)removeLineItemsAtIndexes:(NSIndexSet *)indexes;
- (void)replaceObjectInLineItemsAtIndex:(NSUInteger)idx withObject:(BUYLineItem *)value;
- (void)replaceLineItemsAtIndexes:(NSIndexSet *)indexes withLineItems:(NSArray *)values;
@end
@interface _BUYOrder (CoreDataGeneratedPrimitiveAccessors)
- (NSNumber*)primitiveIdentifier;
- (void)setPrimitiveIdentifier:(NSNumber*)value;
- (NSString*)primitiveName;
- (void)setPrimitiveName:(NSString*)value;
- (NSURL*)primitiveOrderStatusURL;
- (void)setPrimitiveOrderStatusURL:(NSURL*)value;
- (NSDate*)primitiveProcessedAt;
- (void)setPrimitiveProcessedAt:(NSDate*)value;
- (NSURL*)primitiveStatusURL;
- (void)setPrimitiveStatusURL:(NSURL*)value;
- (NSDecimalNumber*)primitiveSubtotalPrice;
- (void)setPrimitiveSubtotalPrice:(NSDecimalNumber*)value;
- (NSDecimalNumber*)primitiveTotalPrice;
- (void)setPrimitiveTotalPrice:(NSDecimalNumber*)value;
- (BUYCheckout *)primitiveCheckout;
- (void)setPrimitiveCheckout:(BUYCheckout *)value;
- (NSMutableOrderedSet *)primitiveLineItems;
- (void)setPrimitiveLineItems:(NSMutableOrderedSet *)value;
@end
//
// _BUYOrder.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYOrder.m instead.
#import "_BUYOrder.h"
const struct BUYOrderAttributes BUYOrderAttributes = {
.identifier = @"identifier",
.name = @"name",
.orderStatusURL = @"orderStatusURL",
.processedAt = @"processedAt",
.statusURL = @"statusURL",
.subtotalPrice = @"subtotalPrice",
.totalPrice = @"totalPrice",
};
const struct BUYOrderRelationships BUYOrderRelationships = {
.checkout = @"checkout",
.lineItems = @"lineItems",
};
const struct BUYOrderUserInfo BUYOrderUserInfo = {
.attributeValueClassName = @"URL",
.documentation = @"URL for the website showing the order status, doesn't require a customer token.",
};
@implementation _BUYOrder
+ (NSString *)entityName {
return @"Order";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"identifierValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"identifier"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
- (NSNumber*)identifier {
[self willAccessValueForKey:@"identifier"];
id value = [self primitiveValueForKey:@"identifier"];
[self didAccessValueForKey:@"identifier"];
return value;
}
- (void)setIdentifier:(NSNumber*)value_ {
[self willChangeValueForKey:@"identifier"];
[self setPrimitiveValue:value_ forKey:@"identifier"];
[self didChangeValueForKey:@"identifier"];
}
- (NSString*)name {
[self willAccessValueForKey:@"name"];
id value = [self primitiveValueForKey:@"name"];
[self didAccessValueForKey:@"name"];
return value;
}
- (void)setName:(NSString*)value_ {
[self willChangeValueForKey:@"name"];
[self setPrimitiveValue:value_ forKey:@"name"];
[self didChangeValueForKey:@"name"];
}
- (NSURL*)orderStatusURL {
[self willAccessValueForKey:@"orderStatusURL"];
id value = [self primitiveValueForKey:@"orderStatusURL"];
[self didAccessValueForKey:@"orderStatusURL"];
return value;
}
- (void)setOrderStatusURL:(NSURL*)value_ {
[self willChangeValueForKey:@"orderStatusURL"];
[self setPrimitiveValue:value_ forKey:@"orderStatusURL"];
[self didChangeValueForKey:@"orderStatusURL"];
}
- (NSDate*)processedAt {
[self willAccessValueForKey:@"processedAt"];
id value = [self primitiveValueForKey:@"processedAt"];
[self didAccessValueForKey:@"processedAt"];
return value;
}
- (void)setProcessedAt:(NSDate*)value_ {
[self willChangeValueForKey:@"processedAt"];
[self setPrimitiveValue:value_ forKey:@"processedAt"];
[self didChangeValueForKey:@"processedAt"];
}
- (NSURL*)statusURL {
[self willAccessValueForKey:@"statusURL"];
id value = [self primitiveValueForKey:@"statusURL"];
[self didAccessValueForKey:@"statusURL"];
return value;
}
- (void)setStatusURL:(NSURL*)value_ {
[self willChangeValueForKey:@"statusURL"];
[self setPrimitiveValue:value_ forKey:@"statusURL"];
[self didChangeValueForKey:@"statusURL"];
}
- (NSDecimalNumber*)subtotalPrice {
[self willAccessValueForKey:@"subtotalPrice"];
id value = [self primitiveValueForKey:@"subtotalPrice"];
[self didAccessValueForKey:@"subtotalPrice"];
return value;
}
- (void)setSubtotalPrice:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"subtotalPrice"];
[self setPrimitiveValue:value_ forKey:@"subtotalPrice"];
[self didChangeValueForKey:@"subtotalPrice"];
}
- (NSDecimalNumber*)totalPrice {
[self willAccessValueForKey:@"totalPrice"];
id value = [self primitiveValueForKey:@"totalPrice"];
[self didAccessValueForKey:@"totalPrice"];
return value;
}
- (void)setTotalPrice:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"totalPrice"];
[self setPrimitiveValue:value_ forKey:@"totalPrice"];
[self didChangeValueForKey:@"totalPrice"];
}
#endif
- (int64_t)identifierValue {
NSNumber *result = [self identifier];
return [result longLongValue];
}
- (void)setIdentifierValue:(int64_t)value_ {
[self setIdentifier:@(value_)];
}
#if defined CORE_DATA_PERSISTENCE
@dynamic checkout;
#endif
#if defined CORE_DATA_PERSISTENCE
@dynamic lineItems;
#endif
- (NSMutableOrderedSet *)lineItemsSet {
[self willAccessValueForKey:@"lineItems"];
NSMutableOrderedSet *result = (NSMutableOrderedSet *)[self mutableOrderedSetValueForKey:@"lineItems"];
[self didAccessValueForKey:@"lineItems"];
return result;
}
@end
#pragma mark -
@implementation BUYModelManager (BUYOrderInserting)
- (BUYOrder *)insertOrderWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYOrder *)[self buy_objectWithEntityName:@"Order" JSONDictionary:dictionary];
}
- (NSArray<BUYOrder *> *)insertOrdersWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYOrder *> *)[self buy_objectsWithEntityName:@"Order" JSONArray:array];
}
- (NSArray<BUYOrder *> *)allOrderObjects
{
return (NSArray<BUYOrder *> *)[self buy_objectsWithEntityName:@"Order" identifiers:nil];
}
- (BUYOrder *)fetchOrderWithIdentifierValue:(int64_t)identifier
{
return (BUYOrder *)[self buy_objectWithEntityName:@"Order" identifier:@(identifier)];
}
@end
//
// _BUYProduct.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYProduct.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYProductAttributes {
__unsafe_unretained NSString *available;
__unsafe_unretained NSString *createdAt;
__unsafe_unretained NSString *handle;
__unsafe_unretained NSString *htmlDescription;
__unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *productId;
__unsafe_unretained NSString *productType;
__unsafe_unretained NSString *publicURL;
__unsafe_unretained NSString *published;
__unsafe_unretained NSString *publishedAt;
__unsafe_unretained NSString *tags;
__unsafe_unretained NSString *title;
__unsafe_unretained NSString *updatedAt;
__unsafe_unretained NSString *vendor;
} BUYProductAttributes;
extern const struct BUYProductRelationships {
__unsafe_unretained NSString *collections;
__unsafe_unretained NSString *images;
__unsafe_unretained NSString *options;
__unsafe_unretained NSString *variants;
} BUYProductRelationships;
extern const struct BUYProductUserInfo {
__unsafe_unretained NSString *documentation;
} BUYProductUserInfo;
@class BUYCollection;
@class BUYImageLink;
@class BUYOption;
@class BUYProductVariant;
@class NSURL;
@class NSSet;
@class BUYProduct;
@interface BUYModelManager (BUYProductInserting)
- (NSArray<BUYProduct *> *)allProductObjects;
- (BUYProduct *)fetchProductWithIdentifierValue:(int64_t)identifier;
- (BUYProduct *)insertProductWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYProduct *> *)insertProductsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* A BUYProduct is an individual item for sale in a Shopify shop.
*/
@interface _BUYProduct : BUYCachedObject
+ (NSString *)entityName;
/**
* If the product is in stock. See each variant for their specific availability.
*/
@property (nonatomic, strong) NSNumber* available;
@property (atomic) BOOL availableValue;
- (BOOL)availableValue;
- (void)setAvailableValue:(BOOL)value_;
/**
* The creation date for a product.
*/
@property (nonatomic, strong) NSDate* createdAt;
/**
* The handle of the product. Can be used to construct links to the web page for the product.
*/
@property (nonatomic, strong) NSString* handle;
/**
* The description of the product, complete with HTML formatting.
*
* Maps to "body_html" in JSON.
*/
@property (nonatomic, strong) NSString* htmlDescription;
@property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue;
- (int64_t)identifierValue;
- (void)setIdentifierValue:(int64_t)value_;
/**
* The channel product ID.
*/
@property (nonatomic, strong) NSNumber* productId;
@property (atomic) int64_t productIdValue;
- (int64_t)productIdValue;
- (void)setProductIdValue:(int64_t)value_;
/**
* A categorization that a product can be tagged with, commonly used for filtering and searching.
*/
@property (nonatomic, strong) NSString* productType;
/**
* A publically accessible link to the product web page
*/
@property (nonatomic, strong) NSURL* publicURL;
/**
* The product is published on the current sales channel.
*/
@property (nonatomic, strong) NSNumber* published;
@property (atomic) BOOL publishedValue;
- (BOOL)publishedValue;
- (void)setPublishedValue:(BOOL)value_;
/**
* The publish date for a product.
*/
@property (nonatomic, strong) NSDate* publishedAt;
/**
* A categorization that a product can be tagged with.
*
* Commonly used for filtering and searching. Each tag has a imit of 255 characters.
*/
@property (nonatomic, strong) NSSet* tags;
/**
* The name of the product.
*
* In a shop's catalog, clicking on a product's title takes you to that product's page. On a product's page, the product's title typically appears in a large font.
*/
@property (nonatomic, strong) NSString* title;
/**
* The updated date for a product.
*/
@property (nonatomic, strong) NSDate* updatedAt;
/**
* The name of the vendor of the product.
*/
@property (nonatomic, strong) NSString* vendor;
/**
* The collections in which this product appears.
*
* Maps to "collection_ids" in JSON.
*/
@property (nonatomic, strong) NSSet *collections;
- (NSMutableSet *)collectionsSet;
/**
* A list of BUYImageLink objects, each one representing an image associated with the product.
*/
@property (nonatomic, strong) NSOrderedSet *images;
- (NSMutableOrderedSet *)imagesSet;
/**
* Custom product property names like "Size", "Color", and "Material".
*
* Products are based on permutations of these options. A product may have a maximum of 3 options. 255 characters limit each.
*/
@property (nonatomic, strong) NSOrderedSet *options;
- (NSMutableOrderedSet *)optionsSet;
/**
* A list of BUYProductVariant objects, each one representing a slightly different version of the product.
*/
@property (nonatomic, strong) NSOrderedSet *variants;
- (NSMutableOrderedSet *)variantsSet;
@end
@interface _BUYProduct (CollectionsCoreDataGeneratedAccessors)
@end
@interface _BUYProduct (ImagesCoreDataGeneratedAccessors)
- (void)insertObject:(BUYImageLink *)value inImagesAtIndex:(NSUInteger)idx;
- (void)removeObjectFromImagesAtIndex:(NSUInteger)idx;
- (void)insertImages:(NSArray *)value atIndexes:(NSIndexSet *)indexes;
- (void)removeImagesAtIndexes:(NSIndexSet *)indexes;
- (void)replaceObjectInImagesAtIndex:(NSUInteger)idx withObject:(BUYImageLink *)value;
- (void)replaceImagesAtIndexes:(NSIndexSet *)indexes withImages:(NSArray *)values;
@end
@interface _BUYProduct (OptionsCoreDataGeneratedAccessors)
- (void)insertObject:(BUYOption *)value inOptionsAtIndex:(NSUInteger)idx;
- (void)removeObjectFromOptionsAtIndex:(NSUInteger)idx;
- (void)insertOptions:(NSArray *)value atIndexes:(NSIndexSet *)indexes;
- (void)removeOptionsAtIndexes:(NSIndexSet *)indexes;
- (void)replaceObjectInOptionsAtIndex:(NSUInteger)idx withObject:(BUYOption *)value;
- (void)replaceOptionsAtIndexes:(NSIndexSet *)indexes withOptions:(NSArray *)values;
@end
@interface _BUYProduct (VariantsCoreDataGeneratedAccessors)
- (void)insertObject:(BUYProductVariant *)value inVariantsAtIndex:(NSUInteger)idx;
- (void)removeObjectFromVariantsAtIndex:(NSUInteger)idx;
- (void)insertVariants:(NSArray *)value atIndexes:(NSIndexSet *)indexes;
- (void)removeVariantsAtIndexes:(NSIndexSet *)indexes;
- (void)replaceObjectInVariantsAtIndex:(NSUInteger)idx withObject:(BUYProductVariant *)value;
- (void)replaceVariantsAtIndexes:(NSIndexSet *)indexes withVariants:(NSArray *)values;
@end
@interface _BUYProduct (CoreDataGeneratedPrimitiveAccessors)
- (NSNumber*)primitiveAvailable;
- (void)setPrimitiveAvailable:(NSNumber*)value;
- (NSDate*)primitiveCreatedAt;
- (void)setPrimitiveCreatedAt:(NSDate*)value;
- (NSString*)primitiveHandle;
- (void)setPrimitiveHandle:(NSString*)value;
- (NSString*)primitiveHtmlDescription;
- (void)setPrimitiveHtmlDescription:(NSString*)value;
- (NSNumber*)primitiveIdentifier;
- (void)setPrimitiveIdentifier:(NSNumber*)value;
- (NSNumber*)primitiveProductId;
- (void)setPrimitiveProductId:(NSNumber*)value;
- (NSString*)primitiveProductType;
- (void)setPrimitiveProductType:(NSString*)value;
- (NSURL*)primitivePublicURL;
- (void)setPrimitivePublicURL:(NSURL*)value;
- (NSNumber*)primitivePublished;
- (void)setPrimitivePublished:(NSNumber*)value;
- (NSDate*)primitivePublishedAt;
- (void)setPrimitivePublishedAt:(NSDate*)value;
- (NSSet*)primitiveTags;
- (void)setPrimitiveTags:(NSSet*)value;
- (NSString*)primitiveTitle;
- (void)setPrimitiveTitle:(NSString*)value;
- (NSDate*)primitiveUpdatedAt;
- (void)setPrimitiveUpdatedAt:(NSDate*)value;
- (NSString*)primitiveVendor;
- (void)setPrimitiveVendor:(NSString*)value;
- (NSMutableSet *)primitiveCollections;
- (void)setPrimitiveCollections:(NSMutableSet *)value;
- (NSMutableOrderedSet *)primitiveImages;
- (void)setPrimitiveImages:(NSMutableOrderedSet *)value;
- (NSMutableOrderedSet *)primitiveOptions;
- (void)setPrimitiveOptions:(NSMutableOrderedSet *)value;
- (NSMutableOrderedSet *)primitiveVariants;
- (void)setPrimitiveVariants:(NSMutableOrderedSet *)value;
@end
//
// _BUYProduct.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYProduct.m instead.
#import "_BUYProduct.h"
const struct BUYProductAttributes BUYProductAttributes = {
.available = @"available",
.createdAt = @"createdAt",
.handle = @"handle",
.htmlDescription = @"htmlDescription",
.identifier = @"identifier",
.productId = @"productId",
.productType = @"productType",
.publicURL = @"publicURL",
.published = @"published",
.publishedAt = @"publishedAt",
.tags = @"tags",
.title = @"title",
.updatedAt = @"updatedAt",
.vendor = @"vendor",
};
const struct BUYProductRelationships BUYProductRelationships = {
.collections = @"collections",
.images = @"images",
.options = @"options",
.variants = @"variants",
};
const struct BUYProductUserInfo BUYProductUserInfo = {
.documentation = @"A BUYProduct is an individual item for sale in a Shopify shop.",
};
@implementation _BUYProduct
+ (NSString *)entityName {
return @"Product";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"availableValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"available"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"identifierValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"identifier"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"productIdValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"productId"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"publishedValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"published"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
- (NSNumber*)available {
[self willAccessValueForKey:@"available"];
id value = [self primitiveValueForKey:@"available"];
[self didAccessValueForKey:@"available"];
return value;
}
- (void)setAvailable:(NSNumber*)value_ {
[self willChangeValueForKey:@"available"];
[self setPrimitiveValue:value_ forKey:@"available"];
[self didChangeValueForKey:@"available"];
}
- (NSDate*)createdAt {
[self willAccessValueForKey:@"createdAt"];
id value = [self primitiveValueForKey:@"createdAt"];
[self didAccessValueForKey:@"createdAt"];
return value;
}
- (void)setCreatedAt:(NSDate*)value_ {
[self willChangeValueForKey:@"createdAt"];
[self setPrimitiveValue:value_ forKey:@"createdAt"];
[self didChangeValueForKey:@"createdAt"];
}
- (NSString*)handle {
[self willAccessValueForKey:@"handle"];
id value = [self primitiveValueForKey:@"handle"];
[self didAccessValueForKey:@"handle"];
return value;
}
- (void)setHandle:(NSString*)value_ {
[self willChangeValueForKey:@"handle"];
[self setPrimitiveValue:value_ forKey:@"handle"];
[self didChangeValueForKey:@"handle"];
}
- (NSString*)htmlDescription {
[self willAccessValueForKey:@"htmlDescription"];
id value = [self primitiveValueForKey:@"htmlDescription"];
[self didAccessValueForKey:@"htmlDescription"];
return value;
}
- (void)setHtmlDescription:(NSString*)value_ {
[self willChangeValueForKey:@"htmlDescription"];
[self setPrimitiveValue:value_ forKey:@"htmlDescription"];
[self didChangeValueForKey:@"htmlDescription"];
}
- (NSNumber*)identifier {
[self willAccessValueForKey:@"identifier"];
id value = [self primitiveValueForKey:@"identifier"];
[self didAccessValueForKey:@"identifier"];
return value;
}
- (void)setIdentifier:(NSNumber*)value_ {
[self willChangeValueForKey:@"identifier"];
[self setPrimitiveValue:value_ forKey:@"identifier"];
[self didChangeValueForKey:@"identifier"];
}
- (NSNumber*)productId {
[self willAccessValueForKey:@"productId"];
id value = [self primitiveValueForKey:@"productId"];
[self didAccessValueForKey:@"productId"];
return value;
}
- (void)setProductId:(NSNumber*)value_ {
[self willChangeValueForKey:@"productId"];
[self setPrimitiveValue:value_ forKey:@"productId"];
[self didChangeValueForKey:@"productId"];
}
- (NSString*)productType {
[self willAccessValueForKey:@"productType"];
id value = [self primitiveValueForKey:@"productType"];
[self didAccessValueForKey:@"productType"];
return value;
}
- (void)setProductType:(NSString*)value_ {
[self willChangeValueForKey:@"productType"];
[self setPrimitiveValue:value_ forKey:@"productType"];
[self didChangeValueForKey:@"productType"];
}
- (NSURL*)publicURL {
[self willAccessValueForKey:@"publicURL"];
id value = [self primitiveValueForKey:@"publicURL"];
[self didAccessValueForKey:@"publicURL"];
return value;
}
- (void)setPublicURL:(NSURL*)value_ {
[self willChangeValueForKey:@"publicURL"];
[self setPrimitiveValue:value_ forKey:@"publicURL"];
[self didChangeValueForKey:@"publicURL"];
}
- (NSNumber*)published {
[self willAccessValueForKey:@"published"];
id value = [self primitiveValueForKey:@"published"];
[self didAccessValueForKey:@"published"];
return value;
}
- (void)setPublished:(NSNumber*)value_ {
[self willChangeValueForKey:@"published"];
[self setPrimitiveValue:value_ forKey:@"published"];
[self didChangeValueForKey:@"published"];
}
- (NSDate*)publishedAt {
[self willAccessValueForKey:@"publishedAt"];
id value = [self primitiveValueForKey:@"publishedAt"];
[self didAccessValueForKey:@"publishedAt"];
return value;
}
- (void)setPublishedAt:(NSDate*)value_ {
[self willChangeValueForKey:@"publishedAt"];
[self setPrimitiveValue:value_ forKey:@"publishedAt"];
[self didChangeValueForKey:@"publishedAt"];
}
- (NSSet*)tags {
[self willAccessValueForKey:@"tags"];
id value = [self primitiveValueForKey:@"tags"];
[self didAccessValueForKey:@"tags"];
return value;
}
- (void)setTags:(NSSet*)value_ {
[self willChangeValueForKey:@"tags"];
[self setPrimitiveValue:value_ forKey:@"tags"];
[self didChangeValueForKey:@"tags"];
}
- (NSString*)title {
[self willAccessValueForKey:@"title"];
id value = [self primitiveValueForKey:@"title"];
[self didAccessValueForKey:@"title"];
return value;
}
- (void)setTitle:(NSString*)value_ {
[self willChangeValueForKey:@"title"];
[self setPrimitiveValue:value_ forKey:@"title"];
[self didChangeValueForKey:@"title"];
}
- (NSDate*)updatedAt {
[self willAccessValueForKey:@"updatedAt"];
id value = [self primitiveValueForKey:@"updatedAt"];
[self didAccessValueForKey:@"updatedAt"];
return value;
}
- (void)setUpdatedAt:(NSDate*)value_ {
[self willChangeValueForKey:@"updatedAt"];
[self setPrimitiveValue:value_ forKey:@"updatedAt"];
[self didChangeValueForKey:@"updatedAt"];
}
- (NSString*)vendor {
[self willAccessValueForKey:@"vendor"];
id value = [self primitiveValueForKey:@"vendor"];
[self didAccessValueForKey:@"vendor"];
return value;
}
- (void)setVendor:(NSString*)value_ {
[self willChangeValueForKey:@"vendor"];
[self setPrimitiveValue:value_ forKey:@"vendor"];
[self didChangeValueForKey:@"vendor"];
}
#endif
- (BOOL)availableValue {
NSNumber *result = [self available];
return [result boolValue];
}
- (void)setAvailableValue:(BOOL)value_ {
[self setAvailable:@(value_)];
}
- (int64_t)identifierValue {
NSNumber *result = [self identifier];
return [result longLongValue];
}
- (void)setIdentifierValue:(int64_t)value_ {
[self setIdentifier:@(value_)];
}
- (int64_t)productIdValue {
NSNumber *result = [self productId];
return [result longLongValue];
}
- (void)setProductIdValue:(int64_t)value_ {
[self setProductId:@(value_)];
}
- (BOOL)publishedValue {
NSNumber *result = [self published];
return [result boolValue];
}
- (void)setPublishedValue:(BOOL)value_ {
[self setPublished:@(value_)];
}
#if defined CORE_DATA_PERSISTENCE
@dynamic collections;
#endif
- (NSMutableSet *)collectionsSet {
[self willAccessValueForKey:@"collections"];
NSMutableSet *result = (NSMutableSet *)[self mutableSetValueForKey:@"collections"];
[self didAccessValueForKey:@"collections"];
return result;
}
#if defined CORE_DATA_PERSISTENCE
@dynamic images;
#endif
- (NSMutableOrderedSet *)imagesSet {
[self willAccessValueForKey:@"images"];
NSMutableOrderedSet *result = (NSMutableOrderedSet *)[self mutableOrderedSetValueForKey:@"images"];
[self didAccessValueForKey:@"images"];
return result;
}
#if defined CORE_DATA_PERSISTENCE
@dynamic options;
#endif
- (NSMutableOrderedSet *)optionsSet {
[self willAccessValueForKey:@"options"];
NSMutableOrderedSet *result = (NSMutableOrderedSet *)[self mutableOrderedSetValueForKey:@"options"];
[self didAccessValueForKey:@"options"];
return result;
}
#if defined CORE_DATA_PERSISTENCE
@dynamic variants;
#endif
- (NSMutableOrderedSet *)variantsSet {
[self willAccessValueForKey:@"variants"];
NSMutableOrderedSet *result = (NSMutableOrderedSet *)[self mutableOrderedSetValueForKey:@"variants"];
[self didAccessValueForKey:@"variants"];
return result;
}
@end
#pragma mark -
@implementation BUYModelManager (BUYProductInserting)
- (BUYProduct *)insertProductWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYProduct *)[self buy_objectWithEntityName:@"Product" JSONDictionary:dictionary];
}
- (NSArray<BUYProduct *> *)insertProductsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYProduct *> *)[self buy_objectsWithEntityName:@"Product" JSONArray:array];
}
- (NSArray<BUYProduct *> *)allProductObjects
{
return (NSArray<BUYProduct *> *)[self buy_objectsWithEntityName:@"Product" identifiers:nil];
}
- (BUYProduct *)fetchProductWithIdentifierValue:(int64_t)identifier
{
return (BUYProduct *)[self buy_objectWithEntityName:@"Product" identifier:@(identifier)];
}
@end
//
// _BUYProductVariant.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYProductVariant.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYProductVariantAttributes {
__unsafe_unretained NSString *available;
__unsafe_unretained NSString *compareAtPrice;
__unsafe_unretained NSString *grams;
__unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *position;
__unsafe_unretained NSString *price;
__unsafe_unretained NSString *requiresShipping;
__unsafe_unretained NSString *sku;
__unsafe_unretained NSString *taxable;
__unsafe_unretained NSString *title;
} BUYProductVariantAttributes;
extern const struct BUYProductVariantRelationships {
__unsafe_unretained NSString *cartLineItems;
__unsafe_unretained NSString *options;
__unsafe_unretained NSString *product;
} BUYProductVariantRelationships;
extern const struct BUYProductVariantUserInfo {
__unsafe_unretained NSString *documentation;
} BUYProductVariantUserInfo;
@class BUYCartLineItem;
@class BUYOptionValue;
@class BUYProduct;
@class BUYProductVariant;
@interface BUYModelManager (BUYProductVariantInserting)
- (NSArray<BUYProductVariant *> *)allProductVariantObjects;
- (BUYProductVariant *)fetchProductVariantWithIdentifierValue:(int64_t)identifier;
- (BUYProductVariant *)insertProductVariantWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYProductVariant *> *)insertProductVariantsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* A BUYProductVariant is a different version of a product, such as differing sizes or differing colours.
*/
@interface _BUYProductVariant : BUYCachedObject
+ (NSString *)entityName;
/**
* If the variant is in stock.
*/
@property (nonatomic, strong) NSNumber* available;
@property (atomic) BOOL availableValue;
- (BOOL)availableValue;
- (void)setAvailableValue:(BOOL)value_;
/**
* The competitor's prices for the same item.
*/
@property (nonatomic, strong) NSDecimalNumber* compareAtPrice;
/**
* The weight of the BUYProductVariant in grams.
*/
@property (nonatomic, strong) NSDecimalNumber* grams;
@property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue;
- (int64_t)identifierValue;
- (void)setIdentifierValue:(int64_t)value_;
/**
* The order of the BUYProductVariant in the list of product variants. 1 is the first position.
*/
@property (nonatomic, strong) NSNumber* position;
@property (atomic) int32_t positionValue;
- (int32_t)positionValue;
- (void)setPositionValue:(int32_t)value_;
/**
* The price of the BUYProductVariant.
*/
@property (nonatomic, strong) NSDecimalNumber* price;
/**
* Whether or not a customer needs to provide a shipping address when placing an order for this BUYProductVariant.
*/
@property (nonatomic, strong) NSNumber* requiresShipping;
@property (atomic) BOOL requiresShippingValue;
- (BOOL)requiresShippingValue;
- (void)setRequiresShippingValue:(BOOL)value_;
/**
* A unique identifier for the product in the shop.
*/
@property (nonatomic, strong) NSString* sku;
/**
* Specifies whether or not a tax is charged when the BUYProductVariant is sold.
*/
@property (nonatomic, strong) NSNumber* taxable;
@property (atomic) BOOL taxableValue;
- (BOOL)taxableValue;
- (void)setTaxableValue:(BOOL)value_;
/**
* The title of the BUYProductVariant.
*/
@property (nonatomic, strong) NSString* title;
/**
* Inverse of CartLineItem.variant.
*/
@property (nonatomic, strong) NSSet *cartLineItems;
- (NSMutableSet *)cartLineItemsSet;
/**
* Custom properties that a shop owner can use to define BUYProductVariants.
*/
@property (nonatomic, strong) NSSet *options;
- (NSMutableSet *)optionsSet;
@property (nonatomic, strong) BUYProduct *product;
@end
@interface _BUYProductVariant (CartLineItemsCoreDataGeneratedAccessors)
@end
@interface _BUYProductVariant (OptionsCoreDataGeneratedAccessors)
@end
@interface _BUYProductVariant (CoreDataGeneratedPrimitiveAccessors)
- (NSNumber*)primitiveAvailable;
- (void)setPrimitiveAvailable:(NSNumber*)value;
- (NSDecimalNumber*)primitiveCompareAtPrice;
- (void)setPrimitiveCompareAtPrice:(NSDecimalNumber*)value;
- (NSDecimalNumber*)primitiveGrams;
- (void)setPrimitiveGrams:(NSDecimalNumber*)value;
- (NSNumber*)primitiveIdentifier;
- (void)setPrimitiveIdentifier:(NSNumber*)value;
- (NSNumber*)primitivePosition;
- (void)setPrimitivePosition:(NSNumber*)value;
- (NSDecimalNumber*)primitivePrice;
- (void)setPrimitivePrice:(NSDecimalNumber*)value;
- (NSNumber*)primitiveRequiresShipping;
- (void)setPrimitiveRequiresShipping:(NSNumber*)value;
- (NSString*)primitiveSku;
- (void)setPrimitiveSku:(NSString*)value;
- (NSNumber*)primitiveTaxable;
- (void)setPrimitiveTaxable:(NSNumber*)value;
- (NSString*)primitiveTitle;
- (void)setPrimitiveTitle:(NSString*)value;
- (NSMutableSet *)primitiveCartLineItems;
- (void)setPrimitiveCartLineItems:(NSMutableSet *)value;
- (NSMutableSet *)primitiveOptions;
- (void)setPrimitiveOptions:(NSMutableSet *)value;
- (BUYProduct *)primitiveProduct;
- (void)setPrimitiveProduct:(BUYProduct *)value;
@end
//
// _BUYProductVariant.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYProductVariant.m instead.
#import "_BUYProductVariant.h"
const struct BUYProductVariantAttributes BUYProductVariantAttributes = {
.available = @"available",
.compareAtPrice = @"compareAtPrice",
.grams = @"grams",
.identifier = @"identifier",
.position = @"position",
.price = @"price",
.requiresShipping = @"requiresShipping",
.sku = @"sku",
.taxable = @"taxable",
.title = @"title",
};
const struct BUYProductVariantRelationships BUYProductVariantRelationships = {
.cartLineItems = @"cartLineItems",
.options = @"options",
.product = @"product",
};
const struct BUYProductVariantUserInfo BUYProductVariantUserInfo = {
.documentation = @"A BUYProductVariant is a different version of a product, such as differing sizes or differing colours.",
};
@implementation _BUYProductVariant
+ (NSString *)entityName {
return @"ProductVariant";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"availableValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"available"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"identifierValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"identifier"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"positionValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"position"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"requiresShippingValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"requiresShipping"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"taxableValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"taxable"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
- (NSNumber*)available {
[self willAccessValueForKey:@"available"];
id value = [self primitiveValueForKey:@"available"];
[self didAccessValueForKey:@"available"];
return value;
}
- (void)setAvailable:(NSNumber*)value_ {
[self willChangeValueForKey:@"available"];
[self setPrimitiveValue:value_ forKey:@"available"];
[self didChangeValueForKey:@"available"];
}
- (NSDecimalNumber*)compareAtPrice {
[self willAccessValueForKey:@"compareAtPrice"];
id value = [self primitiveValueForKey:@"compareAtPrice"];
[self didAccessValueForKey:@"compareAtPrice"];
return value;
}
- (void)setCompareAtPrice:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"compareAtPrice"];
[self setPrimitiveValue:value_ forKey:@"compareAtPrice"];
[self didChangeValueForKey:@"compareAtPrice"];
}
- (NSDecimalNumber*)grams {
[self willAccessValueForKey:@"grams"];
id value = [self primitiveValueForKey:@"grams"];
[self didAccessValueForKey:@"grams"];
return value;
}
- (void)setGrams:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"grams"];
[self setPrimitiveValue:value_ forKey:@"grams"];
[self didChangeValueForKey:@"grams"];
}
- (NSNumber*)identifier {
[self willAccessValueForKey:@"identifier"];
id value = [self primitiveValueForKey:@"identifier"];
[self didAccessValueForKey:@"identifier"];
return value;
}
- (void)setIdentifier:(NSNumber*)value_ {
[self willChangeValueForKey:@"identifier"];
[self setPrimitiveValue:value_ forKey:@"identifier"];
[self didChangeValueForKey:@"identifier"];
}
- (NSNumber*)position {
[self willAccessValueForKey:@"position"];
id value = [self primitiveValueForKey:@"position"];
[self didAccessValueForKey:@"position"];
return value;
}
- (void)setPosition:(NSNumber*)value_ {
[self willChangeValueForKey:@"position"];
[self setPrimitiveValue:value_ forKey:@"position"];
[self didChangeValueForKey:@"position"];
}
- (NSDecimalNumber*)price {
[self willAccessValueForKey:@"price"];
id value = [self primitiveValueForKey:@"price"];
[self didAccessValueForKey:@"price"];
return value;
}
- (void)setPrice:(NSDecimalNumber*)value_ {
[self willChangeValueForKey:@"price"];
[self setPrimitiveValue:value_ forKey:@"price"];
[self didChangeValueForKey:@"price"];
}
- (NSNumber*)requiresShipping {
[self willAccessValueForKey:@"requiresShipping"];
id value = [self primitiveValueForKey:@"requiresShipping"];
[self didAccessValueForKey:@"requiresShipping"];
return value;
}
- (void)setRequiresShipping:(NSNumber*)value_ {
[self willChangeValueForKey:@"requiresShipping"];
[self setPrimitiveValue:value_ forKey:@"requiresShipping"];
[self didChangeValueForKey:@"requiresShipping"];
}
- (NSString*)sku {
[self willAccessValueForKey:@"sku"];
id value = [self primitiveValueForKey:@"sku"];
[self didAccessValueForKey:@"sku"];
return value;
}
- (void)setSku:(NSString*)value_ {
[self willChangeValueForKey:@"sku"];
[self setPrimitiveValue:value_ forKey:@"sku"];
[self didChangeValueForKey:@"sku"];
}
- (NSNumber*)taxable {
[self willAccessValueForKey:@"taxable"];
id value = [self primitiveValueForKey:@"taxable"];
[self didAccessValueForKey:@"taxable"];
return value;
}
- (void)setTaxable:(NSNumber*)value_ {
[self willChangeValueForKey:@"taxable"];
[self setPrimitiveValue:value_ forKey:@"taxable"];
[self didChangeValueForKey:@"taxable"];
}
- (NSString*)title {
[self willAccessValueForKey:@"title"];
id value = [self primitiveValueForKey:@"title"];
[self didAccessValueForKey:@"title"];
return value;
}
- (void)setTitle:(NSString*)value_ {
[self willChangeValueForKey:@"title"];
[self setPrimitiveValue:value_ forKey:@"title"];
[self didChangeValueForKey:@"title"];
}
#endif
- (BOOL)availableValue {
NSNumber *result = [self available];
return [result boolValue];
}
- (void)setAvailableValue:(BOOL)value_ {
[self setAvailable:@(value_)];
}
- (int64_t)identifierValue {
NSNumber *result = [self identifier];
return [result longLongValue];
}
- (void)setIdentifierValue:(int64_t)value_ {
[self setIdentifier:@(value_)];
}
- (int32_t)positionValue {
NSNumber *result = [self position];
return [result intValue];
}
- (void)setPositionValue:(int32_t)value_ {
[self setPosition:@(value_)];
}
- (BOOL)requiresShippingValue {
NSNumber *result = [self requiresShipping];
return [result boolValue];
}
- (void)setRequiresShippingValue:(BOOL)value_ {
[self setRequiresShipping:@(value_)];
}
- (BOOL)taxableValue {
NSNumber *result = [self taxable];
return [result boolValue];
}
- (void)setTaxableValue:(BOOL)value_ {
[self setTaxable:@(value_)];
}
#if defined CORE_DATA_PERSISTENCE
@dynamic cartLineItems;
#endif
- (NSMutableSet *)cartLineItemsSet {
[self willAccessValueForKey:@"cartLineItems"];
NSMutableSet *result = (NSMutableSet *)[self mutableSetValueForKey:@"cartLineItems"];
[self didAccessValueForKey:@"cartLineItems"];
return result;
}
#if defined CORE_DATA_PERSISTENCE
@dynamic options;
#endif
- (NSMutableSet *)optionsSet {
[self willAccessValueForKey:@"options"];
NSMutableSet *result = (NSMutableSet *)[self mutableSetValueForKey:@"options"];
[self didAccessValueForKey:@"options"];
return result;
}
#if defined CORE_DATA_PERSISTENCE
@dynamic product;
#endif
@end
#pragma mark -
@implementation BUYModelManager (BUYProductVariantInserting)
- (BUYProductVariant *)insertProductVariantWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYProductVariant *)[self buy_objectWithEntityName:@"ProductVariant" JSONDictionary:dictionary];
}
- (NSArray<BUYProductVariant *> *)insertProductVariantsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYProductVariant *> *)[self buy_objectsWithEntityName:@"ProductVariant" JSONArray:array];
}
- (NSArray<BUYProductVariant *> *)allProductVariantObjects
{
return (NSArray<BUYProductVariant *> *)[self buy_objectsWithEntityName:@"ProductVariant" identifiers:nil];
}
- (BUYProductVariant *)fetchProductVariantWithIdentifierValue:(int64_t)identifier
{
return (BUYProductVariant *)[self buy_objectWithEntityName:@"ProductVariant" identifier:@(identifier)];
}
@end
//
// _BUYShop.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYShop.h instead.
#import <Buy/BUYManagedObject.h>
#import "BUYModelManager.h"
extern const struct BUYShopAttributes {
__unsafe_unretained NSString *city;
__unsafe_unretained NSString *country;
__unsafe_unretained NSString *currency;
__unsafe_unretained NSString *domain;
__unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *moneyFormat;
__unsafe_unretained NSString *myShopifyURL;
__unsafe_unretained NSString *name;
__unsafe_unretained NSString *province;
__unsafe_unretained NSString *publishedCollectionsCount;
__unsafe_unretained NSString *publishedProductsCount;
__unsafe_unretained NSString *shipsToCountries;
__unsafe_unretained NSString *shopDescription;
__unsafe_unretained NSString *shopURL;
} BUYShopAttributes;
extern const struct BUYShopUserInfo {
__unsafe_unretained NSString *documentation;
} BUYShopUserInfo;
@class NSURL;
@class NSArray;
@class NSURL;
@class BUYShop;
@interface BUYModelManager (BUYShopInserting)
- (NSArray<BUYShop *> *)allShopObjects;
- (BUYShop *)fetchShopWithIdentifierValue:(int64_t)identifier;
- (BUYShop *)insertShopWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYShop *> *)insertShopsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* The BUYShop object is a collection of the general settings and information about the shop.
*/
@interface _BUYShop : BUYCachedObject
+ (NSString *)entityName;
/**
* The city in which the shop is located.
*/
@property (nonatomic, strong) NSString* city;
/**
* The country in which the shop is located.
*/
@property (nonatomic, strong) NSString* country;
/**
* The three-letter code for the currency that the shop accepts.
*/
@property (nonatomic, strong) NSString* currency;
/**
* The shop's domain.
*/
@property (nonatomic, strong) NSString* domain;
@property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue;
- (int64_t)identifierValue;
- (void)setIdentifierValue:(int64_t)value_;
/**
* A string representing the way currency is formatted when the currency isn't specified.
*/
@property (nonatomic, strong) NSString* moneyFormat;
/**
* The shop's 'myshopify.com' domain.
*
* Maps to "myshopify_domain" in JSON.
*/
@property (nonatomic, strong) NSURL* myShopifyURL;
/**
* The name of the shop.
*/
@property (nonatomic, strong) NSString* name;
/**
* The shop's normalized province or state name.
*/
@property (nonatomic, strong) NSString* province;
@property (nonatomic, strong) NSNumber* publishedCollectionsCount;
@property (atomic) int64_t publishedCollectionsCountValue;
- (int64_t)publishedCollectionsCountValue;
- (void)setPublishedCollectionsCountValue:(int64_t)value_;
@property (nonatomic, strong) NSNumber* publishedProductsCount;
@property (atomic) int64_t publishedProductsCountValue;
- (int64_t)publishedProductsCountValue;
- (void)setPublishedProductsCountValue:(int64_t)value_;
/**
* A list of two-letter country codes identifying the countries that the shop ships to.
*/
@property (nonatomic, strong) NSArray* shipsToCountries;
/**
* The shop's description.
*
* Maps to "description" in JSON.
*/
@property (nonatomic, strong) NSString* shopDescription;
@property (nonatomic, strong) NSURL* shopURL;
@end
@interface _BUYShop (CoreDataGeneratedPrimitiveAccessors)
- (NSString*)primitiveCity;
- (void)setPrimitiveCity:(NSString*)value;
- (NSString*)primitiveCountry;
- (void)setPrimitiveCountry:(NSString*)value;
- (NSString*)primitiveCurrency;
- (void)setPrimitiveCurrency:(NSString*)value;
- (NSString*)primitiveDomain;
- (void)setPrimitiveDomain:(NSString*)value;
- (NSNumber*)primitiveIdentifier;
- (void)setPrimitiveIdentifier:(NSNumber*)value;
- (NSString*)primitiveMoneyFormat;
- (void)setPrimitiveMoneyFormat:(NSString*)value;
- (NSURL*)primitiveMyShopifyURL;
- (void)setPrimitiveMyShopifyURL:(NSURL*)value;
- (NSString*)primitiveName;
- (void)setPrimitiveName:(NSString*)value;
- (NSString*)primitiveProvince;
- (void)setPrimitiveProvince:(NSString*)value;
- (NSNumber*)primitivePublishedCollectionsCount;
- (void)setPrimitivePublishedCollectionsCount:(NSNumber*)value;
- (NSNumber*)primitivePublishedProductsCount;
- (void)setPrimitivePublishedProductsCount:(NSNumber*)value;
- (NSArray*)primitiveShipsToCountries;
- (void)setPrimitiveShipsToCountries:(NSArray*)value;
- (NSString*)primitiveShopDescription;
- (void)setPrimitiveShopDescription:(NSString*)value;
- (NSURL*)primitiveShopURL;
- (void)setPrimitiveShopURL:(NSURL*)value;
@end
//
// _BUYShop.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYShop.m instead.
#import "_BUYShop.h"
const struct BUYShopAttributes BUYShopAttributes = {
.city = @"city",
.country = @"country",
.currency = @"currency",
.domain = @"domain",
.identifier = @"identifier",
.moneyFormat = @"moneyFormat",
.myShopifyURL = @"myShopifyURL",
.name = @"name",
.province = @"province",
.publishedCollectionsCount = @"publishedCollectionsCount",
.publishedProductsCount = @"publishedProductsCount",
.shipsToCountries = @"shipsToCountries",
.shopDescription = @"shopDescription",
.shopURL = @"shopURL",
};
const struct BUYShopUserInfo BUYShopUserInfo = {
.documentation = @"The BUYShop object is a collection of the general settings and information about the shop.",
};
@implementation _BUYShop
+ (NSString *)entityName {
return @"Shop";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"identifierValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"identifier"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"publishedCollectionsCountValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"publishedCollectionsCount"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"publishedProductsCountValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"publishedProductsCount"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
#if defined CORE_DATA_PERSISTENCE
- (NSString*)city {
[self willAccessValueForKey:@"city"];
id value = [self primitiveValueForKey:@"city"];
[self didAccessValueForKey:@"city"];
return value;
}
- (void)setCity:(NSString*)value_ {
[self willChangeValueForKey:@"city"];
[self setPrimitiveValue:value_ forKey:@"city"];
[self didChangeValueForKey:@"city"];
}
- (NSString*)country {
[self willAccessValueForKey:@"country"];
id value = [self primitiveValueForKey:@"country"];
[self didAccessValueForKey:@"country"];
return value;
}
- (void)setCountry:(NSString*)value_ {
[self willChangeValueForKey:@"country"];
[self setPrimitiveValue:value_ forKey:@"country"];
[self didChangeValueForKey:@"country"];
}
- (NSString*)currency {
[self willAccessValueForKey:@"currency"];
id value = [self primitiveValueForKey:@"currency"];
[self didAccessValueForKey:@"currency"];
return value;
}
- (void)setCurrency:(NSString*)value_ {
[self willChangeValueForKey:@"currency"];
[self setPrimitiveValue:value_ forKey:@"currency"];
[self didChangeValueForKey:@"currency"];
}
- (NSString*)domain {
[self willAccessValueForKey:@"domain"];
id value = [self primitiveValueForKey:@"domain"];
[self didAccessValueForKey:@"domain"];
return value;
}
- (void)setDomain:(NSString*)value_ {
[self willChangeValueForKey:@"domain"];
[self setPrimitiveValue:value_ forKey:@"domain"];
[self didChangeValueForKey:@"domain"];
}
- (NSNumber*)identifier {
[self willAccessValueForKey:@"identifier"];
id value = [self primitiveValueForKey:@"identifier"];
[self didAccessValueForKey:@"identifier"];
return value;
}
- (void)setIdentifier:(NSNumber*)value_ {
[self willChangeValueForKey:@"identifier"];
[self setPrimitiveValue:value_ forKey:@"identifier"];
[self didChangeValueForKey:@"identifier"];
}
- (NSString*)moneyFormat {
[self willAccessValueForKey:@"moneyFormat"];
id value = [self primitiveValueForKey:@"moneyFormat"];
[self didAccessValueForKey:@"moneyFormat"];
return value;
}
- (void)setMoneyFormat:(NSString*)value_ {
[self willChangeValueForKey:@"moneyFormat"];
[self setPrimitiveValue:value_ forKey:@"moneyFormat"];
[self didChangeValueForKey:@"moneyFormat"];
}
- (NSURL*)myShopifyURL {
[self willAccessValueForKey:@"myShopifyURL"];
id value = [self primitiveValueForKey:@"myShopifyURL"];
[self didAccessValueForKey:@"myShopifyURL"];
return value;
}
- (void)setMyShopifyURL:(NSURL*)value_ {
[self willChangeValueForKey:@"myShopifyURL"];
[self setPrimitiveValue:value_ forKey:@"myShopifyURL"];
[self didChangeValueForKey:@"myShopifyURL"];
}
- (NSString*)name {
[self willAccessValueForKey:@"name"];
id value = [self primitiveValueForKey:@"name"];
[self didAccessValueForKey:@"name"];
return value;
}
- (void)setName:(NSString*)value_ {
[self willChangeValueForKey:@"name"];
[self setPrimitiveValue:value_ forKey:@"name"];
[self didChangeValueForKey:@"name"];
}
- (NSString*)province {
[self willAccessValueForKey:@"province"];
id value = [self primitiveValueForKey:@"province"];
[self didAccessValueForKey:@"province"];
return value;
}
- (void)setProvince:(NSString*)value_ {
[self willChangeValueForKey:@"province"];
[self setPrimitiveValue:value_ forKey:@"province"];
[self didChangeValueForKey:@"province"];
}
- (NSNumber*)publishedCollectionsCount {
[self willAccessValueForKey:@"publishedCollectionsCount"];
id value = [self primitiveValueForKey:@"publishedCollectionsCount"];
[self didAccessValueForKey:@"publishedCollectionsCount"];
return value;
}
- (void)setPublishedCollectionsCount:(NSNumber*)value_ {
[self willChangeValueForKey:@"publishedCollectionsCount"];
[self setPrimitiveValue:value_ forKey:@"publishedCollectionsCount"];
[self didChangeValueForKey:@"publishedCollectionsCount"];
}
- (NSNumber*)publishedProductsCount {
[self willAccessValueForKey:@"publishedProductsCount"];
id value = [self primitiveValueForKey:@"publishedProductsCount"];
[self didAccessValueForKey:@"publishedProductsCount"];
return value;
}
- (void)setPublishedProductsCount:(NSNumber*)value_ {
[self willChangeValueForKey:@"publishedProductsCount"];
[self setPrimitiveValue:value_ forKey:@"publishedProductsCount"];
[self didChangeValueForKey:@"publishedProductsCount"];
}
- (NSArray*)shipsToCountries {
[self willAccessValueForKey:@"shipsToCountries"];
id value = [self primitiveValueForKey:@"shipsToCountries"];
[self didAccessValueForKey:@"shipsToCountries"];
return value;
}
- (void)setShipsToCountries:(NSArray*)value_ {
[self willChangeValueForKey:@"shipsToCountries"];
[self setPrimitiveValue:value_ forKey:@"shipsToCountries"];
[self didChangeValueForKey:@"shipsToCountries"];
}
- (NSString*)shopDescription {
[self willAccessValueForKey:@"shopDescription"];
id value = [self primitiveValueForKey:@"shopDescription"];
[self didAccessValueForKey:@"shopDescription"];
return value;
}
- (void)setShopDescription:(NSString*)value_ {
[self willChangeValueForKey:@"shopDescription"];
[self setPrimitiveValue:value_ forKey:@"shopDescription"];
[self didChangeValueForKey:@"shopDescription"];
}
- (NSURL*)shopURL {
[self willAccessValueForKey:@"shopURL"];
id value = [self primitiveValueForKey:@"shopURL"];
[self didAccessValueForKey:@"shopURL"];
return value;
}
- (void)setShopURL:(NSURL*)value_ {
[self willChangeValueForKey:@"shopURL"];
[self setPrimitiveValue:value_ forKey:@"shopURL"];
[self didChangeValueForKey:@"shopURL"];
}
#endif
- (int64_t)identifierValue {
NSNumber *result = [self identifier];
return [result longLongValue];
}
- (void)setIdentifierValue:(int64_t)value_ {
[self setIdentifier:@(value_)];
}
- (int64_t)publishedCollectionsCountValue {
NSNumber *result = [self publishedCollectionsCount];
return [result longLongValue];
}
- (void)setPublishedCollectionsCountValue:(int64_t)value_ {
[self setPublishedCollectionsCount:@(value_)];
}
- (int64_t)publishedProductsCountValue {
NSNumber *result = [self publishedProductsCount];
return [result longLongValue];
}
- (void)setPublishedProductsCountValue:(int64_t)value_ {
[self setPublishedProductsCount:@(value_)];
}
@end
#pragma mark -
@implementation BUYModelManager (BUYShopInserting)
- (BUYShop *)insertShopWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYShop *)[self buy_objectWithEntityName:@"Shop" JSONDictionary:dictionary];
}
- (NSArray<BUYShop *> *)insertShopsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYShop *> *)[self buy_objectsWithEntityName:@"Shop" JSONArray:array];
}
- (NSArray<BUYShop *> *)allShopObjects
{
return (NSArray<BUYShop *> *)[self buy_objectsWithEntityName:@"Shop" identifiers:nil];
}
- (BUYShop *)fetchShopWithIdentifierValue:(int64_t)identifier
{
return (BUYShop *)[self buy_objectWithEntityName:@"Shop" identifier:@(identifier)];
}
@end
//
// _BUYAddress.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYAddress.h instead.
#import "BUYObject.h"
#import <Buy/BUYModelManager.h>
extern const struct BUYAddressAttributes {
__unsafe_unretained NSString *address1;
__unsafe_unretained NSString *address2;
__unsafe_unretained NSString *city;
__unsafe_unretained NSString *company;
__unsafe_unretained NSString *country;
__unsafe_unretained NSString *countryCode;
__unsafe_unretained NSString *firstName;
__unsafe_unretained NSString *lastName;
__unsafe_unretained NSString *phone;
__unsafe_unretained NSString *province;
__unsafe_unretained NSString *provinceCode;
__unsafe_unretained NSString *zip;
} BUYAddressAttributes;
extern const struct BUYAddressUserInfo {
__unsafe_unretained NSString *documentation;
} BUYAddressUserInfo;
@class BUYAddress;
@interface BUYModelManager (BUYAddressInserting)
- (NSArray<BUYAddress *> *)allAddressObjects;
- (BUYAddress *)fetchAddressWithIdentifierValue:(int64_t)identifier;
- (BUYAddress *)insertAddressWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYAddress *> *)insertAddresssWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* A BUYAddress represents a shipping or billing address on an order. This will be associated with the customer upon completion.
*/
@interface _BUYAddress : BUYObject
+ (NSString *)entityName;
/**
* The street address of the address.
*/
@property (nonatomic, strong) NSString* address1;
/**
* An optional additional field for the street address of the address.
*/
@property (nonatomic, strong) NSString* address2;
/**
* The city of the address.
*/
@property (nonatomic, strong) NSString* city;
/**
* The company of the person associated with the address (optional).
*/
@property (nonatomic, strong) NSString* company;
/**
* The name of the country of the address.
*/
@property (nonatomic, strong) NSString* country;
/**
* The two-letter code (ISO 3166-1 alpha-2 two-letter country code) for the country of the address.
*/
@property (nonatomic, strong) NSString* countryCode;
/**
* The first name of the person associated with the payment method.
*/
@property (nonatomic, strong) NSString* firstName;
/**
* The last name of the person associated with the payment method.
*/
@property (nonatomic, strong) NSString* lastName;
/**
* The phone number at the address.
*/
@property (nonatomic, strong) NSString* phone;
/**
* The name of the state or province of the address
*/
@property (nonatomic, strong) NSString* province;
/**
* The two-letter abbreviation of the state or province of the address.
*/
@property (nonatomic, strong) NSString* provinceCode;
/**
* The zip or postal code of the address.
*/
@property (nonatomic, strong) NSString* zip;
@end
//
// _BUYAddress.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYAddress.m instead.
#import "_BUYAddress.h"
const struct BUYAddressAttributes BUYAddressAttributes = {
.address1 = @"address1",
.address2 = @"address2",
.city = @"city",
.company = @"company",
.country = @"country",
.countryCode = @"countryCode",
.firstName = @"firstName",
.lastName = @"lastName",
.phone = @"phone",
.province = @"province",
.provinceCode = @"provinceCode",
.zip = @"zip",
};
const struct BUYAddressUserInfo BUYAddressUserInfo = {
.documentation = @"A BUYAddress represents a shipping or billing address on an order. This will be associated with the customer upon completion.",
};
@implementation _BUYAddress
+ (NSString *)entityName {
return @"Address";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
return keyPaths;
}
@end
#pragma mark -
@implementation BUYModelManager (BUYAddressInserting)
- (BUYAddress *)insertAddressWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYAddress *)[self buy_objectWithEntityName:@"Address" JSONDictionary:dictionary];
}
- (NSArray<BUYAddress *> *)insertAddresssWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYAddress *> *)[self buy_objectsWithEntityName:@"Address" JSONArray:array];
}
- (NSArray<BUYAddress *> *)allAddressObjects
{
return (NSArray<BUYAddress *> *)[self buy_objectsWithEntityName:@"Address" identifiers:nil];
}
- (BUYAddress *)fetchAddressWithIdentifierValue:(int64_t)identifier
{
return (BUYAddress *)[self buy_objectWithEntityName:@"Address" identifier:@(identifier)];
}
@end
//
// _BUYCheckout.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYCheckout.h instead.
#import "BUYObject.h"
#import <Buy/BUYModelManager.h>
extern const struct BUYCheckoutAttributes {
__unsafe_unretained NSString *cartToken;
__unsafe_unretained NSString *channelId;
__unsafe_unretained NSString *createdAt;
__unsafe_unretained NSString *currency;
__unsafe_unretained NSString *customerId;
__unsafe_unretained NSString *email;
__unsafe_unretained NSString *includesTaxes;
__unsafe_unretained NSString *marketingAttribution;
__unsafe_unretained NSString *note;
__unsafe_unretained NSString *partialAddresses;
__unsafe_unretained NSString *paymentDue;
__unsafe_unretained NSString *paymentSessionId;
__unsafe_unretained NSString *paymentURL;
__unsafe_unretained NSString *privacyPolicyURL;
__unsafe_unretained NSString *refundPolicyURL;
__unsafe_unretained NSString *requiresShipping;
__unsafe_unretained NSString *reservationTime;
__unsafe_unretained NSString *reservationTimeLeft;
__unsafe_unretained NSString *shippingRateId;
__unsafe_unretained NSString *sourceIdentifier;
__unsafe_unretained NSString *sourceName;
__unsafe_unretained NSString *subtotalPrice;
__unsafe_unretained NSString *termsOfServiceURL;
__unsafe_unretained NSString *token;
__unsafe_unretained NSString *totalPrice;
__unsafe_unretained NSString *totalTax;
__unsafe_unretained NSString *updatedAt;
__unsafe_unretained NSString *webCheckoutURL;
__unsafe_unretained NSString *webReturnToLabel;
__unsafe_unretained NSString *webReturnToURL;
} BUYCheckoutAttributes;
extern const struct BUYCheckoutRelationships {
__unsafe_unretained NSString *billingAddress;
__unsafe_unretained NSString *creditCard;
__unsafe_unretained NSString *discount;
__unsafe_unretained NSString *giftCards;
__unsafe_unretained NSString *lineItems;
__unsafe_unretained NSString *order;
__unsafe_unretained NSString *shippingAddress;
__unsafe_unretained NSString *shippingRate;
__unsafe_unretained NSString *taxLines;
} BUYCheckoutRelationships;
extern const struct BUYCheckoutUserInfo {
__unsafe_unretained NSString *discussion;
__unsafe_unretained NSString *documentation;
} BUYCheckoutUserInfo;
@class BUYAddress;
@class BUYMaskedCreditCard;
@class BUYDiscount;
@class BUYGiftCard;
@class BUYLineItem;
@class BUYOrder;
@class BUYAddress;
@class BUYShippingRate;
@class BUYTaxLine;
@class NSDictionary;
@class NSURL;
@class NSURL;
@class NSURL;
@class NSURL;
@class NSURL;
@class NSURL;
@class BUYCheckout;
@interface BUYModelManager (BUYCheckoutInserting)
- (NSArray<BUYCheckout *> *)allCheckoutObjects;
- (BUYCheckout *)fetchCheckoutWithIdentifierValue:(int64_t)identifier;
- (BUYCheckout *)insertCheckoutWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYCheckout *> *)insertCheckoutsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* The checkout object. This is the main object that you will interact with when creating orders on Shopify.
*
* Do not create a BUYCheckout object directly. Use initWithCart: to transform a BUYCart into a BUYCheckout.
*/
@interface _BUYCheckout : BUYObject
+ (NSString *)entityName;
/**
* Unique token for a cart which can be used to convert to a checkout
*/
@property (nonatomic, strong) NSString* cartToken;
/**
* Channel ID where the checkout was created.
*/
@property (nonatomic, strong) NSString* channelId;
@property (nonatomic, strong) NSDate* createdAt;
/**
* The three letter code (ISO 4217) for the currency used for the payment.
*/
@property (nonatomic, strong) NSString* currency;
/**
* Customer ID associated with the checkout.
*/
@property (nonatomic, strong) NSNumber* customerId;
@property (atomic) int64_t customerIdValue;
- (int64_t)customerIdValue;
- (void)setCustomerIdValue:(int64_t)value_;
/**
* The customer's email address.
*/
@property (nonatomic, strong) NSString* email;
/**
* States whether or not the taxes are included in the price.
*
* Maps to "taxes_included" in JSON.
*/
@property (nonatomic, strong) NSNumber* includesTaxes;
@property (atomic) BOOL includesTaxesValue;
- (BOOL)includesTaxesValue;
- (void)setIncludesTaxesValue:(BOOL)value_;
/**
* Attributions for the checkout.
*
* Contains the application name and platform (defaults to applicationName set on the BUYClient, and "iOS" respectively.
*/
@property (nonatomic, strong) NSDictionary* marketingAttribution;
/**
* An optional note attached to the order.
*/
@property (nonatomic, strong) NSString* note;
/**
* Informs server that the shipping address is partially filled with address info provided by PKPaymentAuthorizationViewController. Should only ever be YES. Setting to NO will throw an exception.
*
* Suitable to retrieve shipping rates.
*/
@property (nonatomic, strong) NSNumber* partialAddresses;
@property (atomic) BOOL partialAddressesValue;
- (BOOL)partialAddressesValue;
- (void)setPartialAddressesValue:(BOOL)value_;
/**
* Amount of payment due on the checkout.
*/
@property (nonatomic, strong) NSDecimalNumber* paymentDue;
/**
* The Payment Session ID associated with a credit card transaction.
*/
@property (nonatomic, strong) NSString* paymentSessionId;
/**
* URL to the payment gateway.
*/
@property (nonatomic, strong) NSURL* paymentURL;
/**
* The website URL for the privacy policy for the checkout.
*/
@property (nonatomic, strong) NSURL* privacyPolicyURL;
/**
* The website URL for the refund policy for the checkout.
*/
@property (nonatomic, strong) NSURL* refundPolicyURL;
/**
* States whether or not the fulfillment requires shipping
*/
@property (nonatomic, strong) NSNumber* requiresShipping;
@property (atomic) BOOL requiresShippingValue;
- (BOOL)requiresShippingValue;
- (void)setRequiresShippingValue:(BOOL)value_;
/**
* Reservation time on the checkout in seconds.
*
* Setting to zero and updating the checkout will release inventory reserved by the checkout (when product inventory is not infinite). 300 seconds is default and maximum. `reservationTime` is reset to @300 on every `updateCheckout:completion:` call. This can also be done with `removeProductReservationsFromCheckout:completion` found in the BUYClient.
*/
@property (nonatomic, strong) NSNumber* reservationTime;
@property (atomic) int32_t reservationTimeValue;
- (int32_t)reservationTimeValue;
- (void)setReservationTimeValue:(int32_t)value_;
/**
* Reservation time remaining on the checkout in seconds.
*/
@property (nonatomic, strong) NSNumber* reservationTimeLeft;
@property (atomic) int64_t reservationTimeLeftValue;
- (int64_t)reservationTimeLeftValue;
- (void)setReservationTimeLeftValue:(int64_t)value_;
@property (nonatomic, strong) NSString* shippingRateId;
/**
* The unique identifier for the source: the channelId.
*/
@property (nonatomic, strong) NSString* sourceIdentifier;
/**
* The name of the source of the checkout: "mobile_app".
*/
@property (nonatomic, strong) NSString* sourceName;
/**
* Price of the order before shipping and taxes.
*/
@property (nonatomic, strong) NSDecimalNumber* subtotalPrice;
/**
* The website URL for the terms of service for the checkout.
*/
@property (nonatomic, strong) NSURL* termsOfServiceURL;
/**
* Unique token for the checkout on Shopify.
*/
@property (nonatomic, strong) NSString* token;
/**
* The sum of all the prices of all the items in the order, taxes and discounts included.
*/
@property (nonatomic, strong) NSDecimalNumber* totalPrice;
/**
* The sum of all the taxes applied to the line items in the order.
*/
@property (nonatomic, strong) NSDecimalNumber* totalTax;
@property (nonatomic, strong) NSDate* updatedAt;
/**
* URL which is used for completing checkout.
*
* It is recommended to open the URL in Safari to take advantage of its autocompletion and credit card capture capabilities.
*/
@property (nonatomic, strong) NSURL* webCheckoutURL;
/**
* The button title that will appear after checkout to return to the host app.
*
* Defaults to "Return to 'application'", where 'application' is the `applicationName` set on the BUYClient.
*/
@property (nonatomic, strong) NSString* webReturnToLabel;
/**
* The URL Scheme of the host app.
*
* Used to return to the app from the web checkout.
*/
@property (nonatomic, strong) NSURL* webReturnToURL;
@property (nonatomic, strong) BUYAddress *billingAddress;
/**
* Credit card stored on the checkout.
*/
@property (nonatomic, strong) BUYMaskedCreditCard *creditCard;
/**
* A discount added to the checkout.
*
* Only one discount can be added to a checkout. Call `updateCheckout:completion:` after adding a discount to apply the discount code to the checkout.
*/
@property (nonatomic, strong) BUYDiscount *discount;
/**
* An array of BUYGiftCard objects applied to the checkout.
*/
@property (nonatomic, strong) NSOrderedSet *giftCards;
- (NSMutableOrderedSet*)giftCardsSet;
/**
* Array of BUYLineItem objects in the checkout.
*
* These are different from BUYCartLineItems in that the line item objects do not include the BUYProductVariant.
*/
@property (nonatomic, strong) NSOrderedSet *lineItems;
- (NSMutableOrderedSet*)lineItemsSet;
/**
* The BUYOrder for a completed checkout.
*/
@property (nonatomic, strong) BUYOrder *order;
@property (nonatomic, strong) BUYAddress *shippingAddress;
/**
* The shipping rate chosen for the checkout.
*/
@property (nonatomic, strong) BUYShippingRate *shippingRate;
/**
* Array of tax line objects on the checkout.
*/
@property (nonatomic, strong) NSSet *taxLines;
- (NSMutableSet*)taxLinesSet;
@end
@interface _BUYCheckout (GiftCardsCoreDataGeneratedAccessors)
- (void)insertObject:(BUYGiftCard*)value inGiftCardsAtIndex:(NSUInteger)idx;
- (void)removeObjectFromGiftCardsAtIndex:(NSUInteger)idx;
- (void)insertGiftCards:(NSArray *)value atIndexes:(NSIndexSet *)indexes;
- (void)removeGiftCardsAtIndexes:(NSIndexSet *)indexes;
- (void)replaceObjectInGiftCardsAtIndex:(NSUInteger)idx withObject:(BUYGiftCard*)value;
- (void)replaceGiftCardsAtIndexes:(NSIndexSet *)indexes withGiftCards:(NSArray *)values;
@end
@interface _BUYCheckout (LineItemsCoreDataGeneratedAccessors)
- (void)insertObject:(BUYLineItem*)value inLineItemsAtIndex:(NSUInteger)idx;
- (void)removeObjectFromLineItemsAtIndex:(NSUInteger)idx;
- (void)insertLineItems:(NSArray *)value atIndexes:(NSIndexSet *)indexes;
- (void)removeLineItemsAtIndexes:(NSIndexSet *)indexes;
- (void)replaceObjectInLineItemsAtIndex:(NSUInteger)idx withObject:(BUYLineItem*)value;
- (void)replaceLineItemsAtIndexes:(NSIndexSet *)indexes withLineItems:(NSArray *)values;
@end
@interface _BUYCheckout (TaxLinesCoreDataGeneratedAccessors)
@end
//
// _BUYCheckout.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYCheckout.m instead.
#import "_BUYCheckout.h"
const struct BUYCheckoutAttributes BUYCheckoutAttributes = {
.cartToken = @"cartToken",
.channelId = @"channelId",
.createdAt = @"createdAt",
.currency = @"currency",
.customerId = @"customerId",
.email = @"email",
.includesTaxes = @"includesTaxes",
.marketingAttribution = @"marketingAttribution",
.note = @"note",
.partialAddresses = @"partialAddresses",
.paymentDue = @"paymentDue",
.paymentSessionId = @"paymentSessionId",
.paymentURL = @"paymentURL",
.privacyPolicyURL = @"privacyPolicyURL",
.refundPolicyURL = @"refundPolicyURL",
.requiresShipping = @"requiresShipping",
.reservationTime = @"reservationTime",
.reservationTimeLeft = @"reservationTimeLeft",
.shippingRateId = @"shippingRateId",
.sourceIdentifier = @"sourceIdentifier",
.sourceName = @"sourceName",
.subtotalPrice = @"subtotalPrice",
.termsOfServiceURL = @"termsOfServiceURL",
.token = @"token",
.totalPrice = @"totalPrice",
.totalTax = @"totalTax",
.updatedAt = @"updatedAt",
.webCheckoutURL = @"webCheckoutURL",
.webReturnToLabel = @"webReturnToLabel",
.webReturnToURL = @"webReturnToURL",
};
const struct BUYCheckoutRelationships BUYCheckoutRelationships = {
.billingAddress = @"billingAddress",
.creditCard = @"creditCard",
.discount = @"discount",
.giftCards = @"giftCards",
.lineItems = @"lineItems",
.order = @"order",
.shippingAddress = @"shippingAddress",
.shippingRate = @"shippingRate",
.taxLines = @"taxLines",
};
const struct BUYCheckoutUserInfo BUYCheckoutUserInfo = {
.discussion = @"Do not create a BUYCheckout object directly. Use initWithCart: to transform a BUYCart into a BUYCheckout.",
.documentation = @"The checkout object. This is the main object that you will interact with when creating orders on Shopify.",
};
@implementation _BUYCheckout
+ (NSString *)entityName {
return @"Checkout";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"customerIdValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"customerId"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"includesTaxesValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"includesTaxes"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"partialAddressesValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"partialAddresses"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"requiresShippingValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"requiresShipping"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"reservationTimeValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"reservationTime"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"reservationTimeLeftValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"reservationTimeLeft"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
- (int64_t)customerIdValue {
NSNumber *result = [self customerId];
return [result longLongValue];
}
- (void)setCustomerIdValue:(int64_t)value_ {
[self setCustomerId:@(value_)];
}
- (BOOL)includesTaxesValue {
NSNumber *result = [self includesTaxes];
return [result boolValue];
}
- (void)setIncludesTaxesValue:(BOOL)value_ {
[self setIncludesTaxes:@(value_)];
}
- (BOOL)partialAddressesValue {
NSNumber *result = [self partialAddresses];
return [result boolValue];
}
- (void)setPartialAddressesValue:(BOOL)value_ {
[self setPartialAddresses:@(value_)];
}
- (BOOL)requiresShippingValue {
NSNumber *result = [self requiresShipping];
return [result boolValue];
}
- (void)setRequiresShippingValue:(BOOL)value_ {
[self setRequiresShipping:@(value_)];
}
- (int32_t)reservationTimeValue {
NSNumber *result = [self reservationTime];
return [result intValue];
}
- (void)setReservationTimeValue:(int32_t)value_ {
[self setReservationTime:@(value_)];
}
- (int64_t)reservationTimeLeftValue {
NSNumber *result = [self reservationTimeLeft];
return [result longLongValue];
}
- (void)setReservationTimeLeftValue:(int64_t)value_ {
[self setReservationTimeLeft:@(value_)];
}
- (NSMutableOrderedSet*)giftCardsSet {
return (NSMutableOrderedSet*)[self mutableOrderedSetValueForKey:@"giftCards"];
}
- (NSMutableOrderedSet*)lineItemsSet {
return (NSMutableOrderedSet*)[self mutableOrderedSetValueForKey:@"lineItems"];
}
- (NSMutableSet*)taxLinesSet {
return (NSMutableSet*)[self mutableSetValueForKey:@"taxLines"];
}
@end
@implementation _BUYCheckout (GiftCardsCoreDataGeneratedAccessors)
- (void)insertObject:(BUYGiftCard*)value inGiftCardsAtIndex:(NSUInteger)idx {
NSIndexSet* indexes = [NSIndexSet indexSetWithIndex:idx];
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:indexes forKey:@"giftCards"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self giftCards]];
[tmpOrderedSet insertObject:value atIndex:idx];
[self setValue:tmpOrderedSet forKey:@"giftCards"];
[self didChange:NSKeyValueChangeInsertion valuesAtIndexes:indexes forKey:@"giftCards"];
}
- (void)removeObjectFromGiftCardsAtIndex:(NSUInteger)idx {
NSIndexSet* indexes = [NSIndexSet indexSetWithIndex:idx];
[self willChange:NSKeyValueChangeRemoval valuesAtIndexes:indexes forKey:@"giftCards"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self giftCards]];
[tmpOrderedSet removeObjectAtIndex:idx];
[self setValue:tmpOrderedSet forKey:@"giftCards"];
[self didChange:NSKeyValueChangeRemoval valuesAtIndexes:indexes forKey:@"giftCards"];
}
- (void)insertGiftCards:(NSArray *)value atIndexes:(NSIndexSet *)indexes {
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:indexes forKey:@"giftCards"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self giftCards]];
[tmpOrderedSet insertObjects:value atIndexes:indexes];
[self setValue:tmpOrderedSet forKey:@"giftCards"];
[self didChange:NSKeyValueChangeInsertion valuesAtIndexes:indexes forKey:@"giftCards"];
}
- (void)removeGiftCardsAtIndexes:(NSIndexSet *)indexes {
[self willChange:NSKeyValueChangeRemoval valuesAtIndexes:indexes forKey:@"giftCards"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self giftCards]];
[tmpOrderedSet removeObjectsAtIndexes:indexes];
[self setValue:tmpOrderedSet forKey:@"giftCards"];
[self didChange:NSKeyValueChangeRemoval valuesAtIndexes:indexes forKey:@"giftCards"];
}
- (void)replaceObjectInGiftCardsAtIndex:(NSUInteger)idx withObject:(BUYGiftCard*)value {
NSIndexSet* indexes = [NSIndexSet indexSetWithIndex:idx];
[self willChange:NSKeyValueChangeReplacement valuesAtIndexes:indexes forKey:@"giftCards"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self giftCards]];
[tmpOrderedSet replaceObjectAtIndex:idx withObject:value];
[self setValue:tmpOrderedSet forKey:@"giftCards"];
[self didChange:NSKeyValueChangeReplacement valuesAtIndexes:indexes forKey:@"giftCards"];
}
- (void)replaceGiftCardsAtIndexes:(NSIndexSet *)indexes withGiftCards:(NSArray *)value {
[self willChange:NSKeyValueChangeReplacement valuesAtIndexes:indexes forKey:@"giftCards"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self giftCards]];
[tmpOrderedSet replaceObjectsAtIndexes:indexes withObjects:value];
[self setValue:tmpOrderedSet forKey:@"giftCards"];
[self didChange:NSKeyValueChangeReplacement valuesAtIndexes:indexes forKey:@"giftCards"];
}
@end
@implementation _BUYCheckout (LineItemsCoreDataGeneratedAccessors)
- (void)insertObject:(BUYLineItem*)value inLineItemsAtIndex:(NSUInteger)idx {
NSIndexSet* indexes = [NSIndexSet indexSetWithIndex:idx];
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:indexes forKey:@"lineItems"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self lineItems]];
[tmpOrderedSet insertObject:value atIndex:idx];
[self setValue:tmpOrderedSet forKey:@"lineItems"];
[self didChange:NSKeyValueChangeInsertion valuesAtIndexes:indexes forKey:@"lineItems"];
}
- (void)removeObjectFromLineItemsAtIndex:(NSUInteger)idx {
NSIndexSet* indexes = [NSIndexSet indexSetWithIndex:idx];
[self willChange:NSKeyValueChangeRemoval valuesAtIndexes:indexes forKey:@"lineItems"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self lineItems]];
[tmpOrderedSet removeObjectAtIndex:idx];
[self setValue:tmpOrderedSet forKey:@"lineItems"];
[self didChange:NSKeyValueChangeRemoval valuesAtIndexes:indexes forKey:@"lineItems"];
}
- (void)insertLineItems:(NSArray *)value atIndexes:(NSIndexSet *)indexes {
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:indexes forKey:@"lineItems"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self lineItems]];
[tmpOrderedSet insertObjects:value atIndexes:indexes];
[self setValue:tmpOrderedSet forKey:@"lineItems"];
[self didChange:NSKeyValueChangeInsertion valuesAtIndexes:indexes forKey:@"lineItems"];
}
- (void)removeLineItemsAtIndexes:(NSIndexSet *)indexes {
[self willChange:NSKeyValueChangeRemoval valuesAtIndexes:indexes forKey:@"lineItems"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self lineItems]];
[tmpOrderedSet removeObjectsAtIndexes:indexes];
[self setValue:tmpOrderedSet forKey:@"lineItems"];
[self didChange:NSKeyValueChangeRemoval valuesAtIndexes:indexes forKey:@"lineItems"];
}
- (void)replaceObjectInLineItemsAtIndex:(NSUInteger)idx withObject:(BUYLineItem*)value {
NSIndexSet* indexes = [NSIndexSet indexSetWithIndex:idx];
[self willChange:NSKeyValueChangeReplacement valuesAtIndexes:indexes forKey:@"lineItems"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self lineItems]];
[tmpOrderedSet replaceObjectAtIndex:idx withObject:value];
[self setValue:tmpOrderedSet forKey:@"lineItems"];
[self didChange:NSKeyValueChangeReplacement valuesAtIndexes:indexes forKey:@"lineItems"];
}
- (void)replaceLineItemsAtIndexes:(NSIndexSet *)indexes withLineItems:(NSArray *)value {
[self willChange:NSKeyValueChangeReplacement valuesAtIndexes:indexes forKey:@"lineItems"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self lineItems]];
[tmpOrderedSet replaceObjectsAtIndexes:indexes withObjects:value];
[self setValue:tmpOrderedSet forKey:@"lineItems"];
[self didChange:NSKeyValueChangeReplacement valuesAtIndexes:indexes forKey:@"lineItems"];
}
@end
#pragma mark -
@implementation BUYModelManager (BUYCheckoutInserting)
- (BUYCheckout *)insertCheckoutWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYCheckout *)[self buy_objectWithEntityName:@"Checkout" JSONDictionary:dictionary];
}
- (NSArray<BUYCheckout *> *)insertCheckoutsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYCheckout *> *)[self buy_objectsWithEntityName:@"Checkout" JSONArray:array];
}
- (NSArray<BUYCheckout *> *)allCheckoutObjects
{
return (NSArray<BUYCheckout *> *)[self buy_objectsWithEntityName:@"Checkout" identifiers:nil];
}
- (BUYCheckout *)fetchCheckoutWithIdentifierValue:(int64_t)identifier
{
return (BUYCheckout *)[self buy_objectWithEntityName:@"Checkout" identifier:@(identifier)];
}
@end
//
// _BUYDiscount.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYDiscount.h instead.
#import "BUYObject.h"
#import <Buy/BUYModelManager.h>
extern const struct BUYDiscountAttributes {
__unsafe_unretained NSString *amount;
__unsafe_unretained NSString *applicable;
__unsafe_unretained NSString *code;
} BUYDiscountAttributes;
extern const struct BUYDiscountRelationships {
__unsafe_unretained NSString *checkout;
} BUYDiscountRelationships;
extern const struct BUYDiscountUserInfo {
__unsafe_unretained NSString *documentation;
} BUYDiscountUserInfo;
@class BUYCheckout;
@class BUYDiscount;
@interface BUYModelManager (BUYDiscountInserting)
- (NSArray<BUYDiscount *> *)allDiscountObjects;
- (BUYDiscount *)fetchDiscountWithIdentifierValue:(int64_t)identifier;
- (BUYDiscount *)insertDiscountWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYDiscount *> *)insertDiscountsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* BUYDiscount represents a discount that is applied to the BUYCheckout.
*/
@interface _BUYDiscount : BUYObject
+ (NSString *)entityName;
/**
* The amount that is deducted from `paymentDue` on BUYCheckout.
*/
@property (nonatomic, strong) NSDecimalNumber* amount;
/**
* Whether this discount code can be applied to the checkout.
*/
@property (nonatomic, strong) NSNumber* applicable;
@property (atomic) BOOL applicableValue;
- (BOOL)applicableValue;
- (void)setApplicableValue:(BOOL)value_;
/**
* The unique identifier for the discount code.
*/
@property (nonatomic, strong) NSString* code;
@property (nonatomic, strong) BUYCheckout *checkout;
@end
//
// _BUYDiscount.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYDiscount.m instead.
#import "_BUYDiscount.h"
const struct BUYDiscountAttributes BUYDiscountAttributes = {
.amount = @"amount",
.applicable = @"applicable",
.code = @"code",
};
const struct BUYDiscountRelationships BUYDiscountRelationships = {
.checkout = @"checkout",
};
const struct BUYDiscountUserInfo BUYDiscountUserInfo = {
.documentation = @"BUYDiscount represents a discount that is applied to the BUYCheckout.",
};
@implementation _BUYDiscount
+ (NSString *)entityName {
return @"Discount";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"applicableValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"applicable"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
- (BOOL)applicableValue {
NSNumber *result = [self applicable];
return [result boolValue];
}
- (void)setApplicableValue:(BOOL)value_ {
[self setApplicable:@(value_)];
}
@end
#pragma mark -
@implementation BUYModelManager (BUYDiscountInserting)
- (BUYDiscount *)insertDiscountWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYDiscount *)[self buy_objectWithEntityName:@"Discount" JSONDictionary:dictionary];
}
- (NSArray<BUYDiscount *> *)insertDiscountsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYDiscount *> *)[self buy_objectsWithEntityName:@"Discount" JSONArray:array];
}
- (NSArray<BUYDiscount *> *)allDiscountObjects
{
return (NSArray<BUYDiscount *> *)[self buy_objectsWithEntityName:@"Discount" identifiers:nil];
}
- (BUYDiscount *)fetchDiscountWithIdentifierValue:(int64_t)identifier
{
return (BUYDiscount *)[self buy_objectWithEntityName:@"Discount" identifier:@(identifier)];
}
@end
//
// _BUYGiftCard.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYGiftCard.h instead.
#import "BUYObject.h"
#import <Buy/BUYModelManager.h>
extern const struct BUYGiftCardAttributes {
__unsafe_unretained NSString *amountUsed;
__unsafe_unretained NSString *balance;
__unsafe_unretained NSString *code;
__unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *lastCharacters;
} BUYGiftCardAttributes;
extern const struct BUYGiftCardRelationships {
__unsafe_unretained NSString *redemptions;
} BUYGiftCardRelationships;
extern const struct BUYGiftCardUserInfo {
__unsafe_unretained NSString *documentation;
} BUYGiftCardUserInfo;
@class BUYCheckout;
@class BUYGiftCard;
@interface BUYModelManager (BUYGiftCardInserting)
- (NSArray<BUYGiftCard *> *)allGiftCardObjects;
- (BUYGiftCard *)fetchGiftCardWithIdentifierValue:(int64_t)identifier;
- (BUYGiftCard *)insertGiftCardWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYGiftCard *> *)insertGiftCardsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* A gift card redeemed as payment on the checkout.
*/
@interface _BUYGiftCard : BUYObject
+ (NSString *)entityName;
/**
* The amount of the gift card used by this checkout.
*/
@property (nonatomic, strong) NSDecimalNumber* amountUsed;
/**
* The amount left on the gift card after being applied to this checkout.
*/
@property (nonatomic, strong) NSDecimalNumber* balance;
/**
* The gift card code.
*
* This is only used when applying a gift card and is not visible on a BUYCheckout object synced with Shopify.
*/
@property (nonatomic, strong) NSString* code;
@property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue;
- (int64_t)identifierValue;
- (void)setIdentifierValue:(int64_t)value_;
/**
* The last characters of the applied gift card code.
*/
@property (nonatomic, strong) NSString* lastCharacters;
/**
* Inverse of Checkout.giftCard.
*/
@property (nonatomic, strong) NSSet *redemptions;
- (NSMutableSet*)redemptionsSet;
@end
@interface _BUYGiftCard (RedemptionsCoreDataGeneratedAccessors)
@end
//
// _BUYGiftCard.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYGiftCard.m instead.
#import "_BUYGiftCard.h"
const struct BUYGiftCardAttributes BUYGiftCardAttributes = {
.amountUsed = @"amountUsed",
.balance = @"balance",
.code = @"code",
.identifier = @"identifier",
.lastCharacters = @"lastCharacters",
};
const struct BUYGiftCardRelationships BUYGiftCardRelationships = {
.redemptions = @"redemptions",
};
const struct BUYGiftCardUserInfo BUYGiftCardUserInfo = {
.documentation = @"A gift card redeemed as payment on the checkout.",
};
@implementation _BUYGiftCard
+ (NSString *)entityName {
return @"GiftCard";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"identifierValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"identifier"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
- (int64_t)identifierValue {
NSNumber *result = [self identifier];
return [result longLongValue];
}
- (void)setIdentifierValue:(int64_t)value_ {
[self setIdentifier:@(value_)];
}
- (NSMutableSet*)redemptionsSet {
return (NSMutableSet*)[self mutableSetValueForKey:@"redemptions"];
}
@end
#pragma mark -
@implementation BUYModelManager (BUYGiftCardInserting)
- (BUYGiftCard *)insertGiftCardWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYGiftCard *)[self buy_objectWithEntityName:@"GiftCard" JSONDictionary:dictionary];
}
- (NSArray<BUYGiftCard *> *)insertGiftCardsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYGiftCard *> *)[self buy_objectsWithEntityName:@"GiftCard" JSONArray:array];
}
- (NSArray<BUYGiftCard *> *)allGiftCardObjects
{
return (NSArray<BUYGiftCard *> *)[self buy_objectsWithEntityName:@"GiftCard" identifiers:nil];
}
- (BUYGiftCard *)fetchGiftCardWithIdentifierValue:(int64_t)identifier
{
return (BUYGiftCard *)[self buy_objectWithEntityName:@"GiftCard" identifier:@(identifier)];
}
@end
//
// _BUYMaskedCreditCard.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYMaskedCreditCard.h instead.
#import "BUYObject.h"
#import <Buy/BUYModelManager.h>
extern const struct BUYMaskedCreditCardAttributes {
__unsafe_unretained NSString *expiryMonth;
__unsafe_unretained NSString *expiryYear;
__unsafe_unretained NSString *firstDigits;
__unsafe_unretained NSString *firstName;
__unsafe_unretained NSString *lastDigits;
__unsafe_unretained NSString *lastName;
} BUYMaskedCreditCardAttributes;
extern const struct BUYMaskedCreditCardRelationships {
__unsafe_unretained NSString *checkout;
} BUYMaskedCreditCardRelationships;
extern const struct BUYMaskedCreditCardUserInfo {
__unsafe_unretained NSString *Transient;
__unsafe_unretained NSString *documentation;
} BUYMaskedCreditCardUserInfo;
@class BUYCheckout;
@class BUYMaskedCreditCard;
@interface BUYModelManager (BUYMaskedCreditCardInserting)
- (NSArray<BUYMaskedCreditCard *> *)allMaskedCreditCardObjects;
- (BUYMaskedCreditCard *)fetchMaskedCreditCardWithIdentifierValue:(int64_t)identifier;
- (BUYMaskedCreditCard *)insertMaskedCreditCardWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYMaskedCreditCard *> *)insertMaskedCreditCardsWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* This represents a masked credit card that has been applied to a checkout.
*/
@interface _BUYMaskedCreditCard : BUYObject
+ (NSString *)entityName;
/**
* The two digits representing the month the card expires.
*/
@property (nonatomic, strong) NSNumber* expiryMonth;
@property (atomic) int16_t expiryMonthValue;
- (int16_t)expiryMonthValue;
- (void)setExpiryMonthValue:(int16_t)value_;
/**
* The year the card expires.
*/
@property (nonatomic, strong) NSNumber* expiryYear;
@property (atomic) int32_t expiryYearValue;
- (int32_t)expiryYearValue;
- (void)setExpiryYearValue:(int32_t)value_;
/**
* The first digits of credit card number.
*/
@property (nonatomic, strong) NSString* firstDigits;
/**
* The first name on the credit card.
*/
@property (nonatomic, strong) NSString* firstName;
/**
* The last digits of credit card number.
*/
@property (nonatomic, strong) NSString* lastDigits;
/**
* The last name on the credit card.
*/
@property (nonatomic, strong) NSString* lastName;
/**
* Inverse of Checkout.creditCard.
*/
@property (nonatomic, strong) BUYCheckout *checkout;
@end
//
// _BUYMaskedCreditCard.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYMaskedCreditCard.m instead.
#import "_BUYMaskedCreditCard.h"
const struct BUYMaskedCreditCardAttributes BUYMaskedCreditCardAttributes = {
.expiryMonth = @"expiryMonth",
.expiryYear = @"expiryYear",
.firstDigits = @"firstDigits",
.firstName = @"firstName",
.lastDigits = @"lastDigits",
.lastName = @"lastName",
};
const struct BUYMaskedCreditCardRelationships BUYMaskedCreditCardRelationships = {
.checkout = @"checkout",
};
const struct BUYMaskedCreditCardUserInfo BUYMaskedCreditCardUserInfo = {
.Transient = @"YES",
.documentation = @"This represents a masked credit card that has been applied to a checkout.",
};
@implementation _BUYMaskedCreditCard
+ (NSString *)entityName {
return @"MaskedCreditCard";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"expiryMonthValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"expiryMonth"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"expiryYearValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"expiryYear"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
- (int16_t)expiryMonthValue {
NSNumber *result = [self expiryMonth];
return [result shortValue];
}
- (void)setExpiryMonthValue:(int16_t)value_ {
[self setExpiryMonth:@(value_)];
}
- (int32_t)expiryYearValue {
NSNumber *result = [self expiryYear];
return [result intValue];
}
- (void)setExpiryYearValue:(int32_t)value_ {
[self setExpiryYear:@(value_)];
}
@end
#pragma mark -
@implementation BUYModelManager (BUYMaskedCreditCardInserting)
- (BUYMaskedCreditCard *)insertMaskedCreditCardWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYMaskedCreditCard *)[self buy_objectWithEntityName:@"MaskedCreditCard" JSONDictionary:dictionary];
}
- (NSArray<BUYMaskedCreditCard *> *)insertMaskedCreditCardsWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYMaskedCreditCard *> *)[self buy_objectsWithEntityName:@"MaskedCreditCard" JSONArray:array];
}
- (NSArray<BUYMaskedCreditCard *> *)allMaskedCreditCardObjects
{
return (NSArray<BUYMaskedCreditCard *> *)[self buy_objectsWithEntityName:@"MaskedCreditCard" identifiers:nil];
}
- (BUYMaskedCreditCard *)fetchMaskedCreditCardWithIdentifierValue:(int64_t)identifier
{
return (BUYMaskedCreditCard *)[self buy_objectWithEntityName:@"MaskedCreditCard" identifier:@(identifier)];
}
@end
//
// _BUYShippingRate.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYShippingRate.h instead.
#import "BUYObject.h"
#import <Buy/BUYModelManager.h>
extern const struct BUYShippingRateAttributes {
__unsafe_unretained NSString *deliveryRange;
__unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *price;
__unsafe_unretained NSString *shippingRateIdentifier;
__unsafe_unretained NSString *title;
} BUYShippingRateAttributes;
extern const struct BUYShippingRateRelationships {
__unsafe_unretained NSString *checkout;
} BUYShippingRateRelationships;
extern const struct BUYShippingRateUserInfo {
__unsafe_unretained NSString *Transient;
__unsafe_unretained NSString *documentation;
} BUYShippingRateUserInfo;
@class BUYCheckout;
@class NSArray;
@class BUYShippingRate;
@interface BUYModelManager (BUYShippingRateInserting)
- (NSArray<BUYShippingRate *> *)allShippingRateObjects;
- (BUYShippingRate *)fetchShippingRateWithIdentifierValue:(int64_t)identifier;
- (BUYShippingRate *)insertShippingRateWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYShippingRate *> *)insertShippingRatesWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* BUYShippingRate represents the amount that the merchant is charging a customer for shipping to the specified address.
*/
@interface _BUYShippingRate : BUYObject
+ (NSString *)entityName;
/**
* One or two NSDate objects of the potential delivery dates.
*/
@property (nonatomic, strong) NSArray* deliveryRange;
@property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue;
- (int64_t)identifierValue;
- (void)setIdentifierValue:(int64_t)value_;
/**
* The price of this shipping method.
*/
@property (nonatomic, strong) NSDecimalNumber* price;
/**
* A reference to the shipping method.
*/
@property (nonatomic, strong) NSString* shippingRateIdentifier;
/**
* The shipping method name.
*/
@property (nonatomic, strong) NSString* title;
@property (nonatomic, strong) BUYCheckout *checkout;
@end
//
// _BUYShippingRate.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYShippingRate.m instead.
#import "_BUYShippingRate.h"
const struct BUYShippingRateAttributes BUYShippingRateAttributes = {
.deliveryRange = @"deliveryRange",
.identifier = @"identifier",
.price = @"price",
.shippingRateIdentifier = @"shippingRateIdentifier",
.title = @"title",
};
const struct BUYShippingRateRelationships BUYShippingRateRelationships = {
.checkout = @"checkout",
};
const struct BUYShippingRateUserInfo BUYShippingRateUserInfo = {
.Transient = @"YES",
.documentation = @"BUYShippingRate represents the amount that the merchant is charging a customer for shipping to the specified address.",
};
@implementation _BUYShippingRate
+ (NSString *)entityName {
return @"ShippingRate";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"identifierValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"identifier"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
return keyPaths;
}
- (int64_t)identifierValue {
NSNumber *result = [self identifier];
return [result longLongValue];
}
- (void)setIdentifierValue:(int64_t)value_ {
[self setIdentifier:@(value_)];
}
@end
#pragma mark -
@implementation BUYModelManager (BUYShippingRateInserting)
- (BUYShippingRate *)insertShippingRateWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYShippingRate *)[self buy_objectWithEntityName:@"ShippingRate" JSONDictionary:dictionary];
}
- (NSArray<BUYShippingRate *> *)insertShippingRatesWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYShippingRate *> *)[self buy_objectsWithEntityName:@"ShippingRate" JSONArray:array];
}
- (NSArray<BUYShippingRate *> *)allShippingRateObjects
{
return (NSArray<BUYShippingRate *> *)[self buy_objectsWithEntityName:@"ShippingRate" identifiers:nil];
}
- (BUYShippingRate *)fetchShippingRateWithIdentifierValue:(int64_t)identifier
{
return (BUYShippingRate *)[self buy_objectWithEntityName:@"ShippingRate" identifier:@(identifier)];
}
@end
//
// _BUYTaxLine.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYTaxLine.h instead.
#import "BUYObject.h"
#import <Buy/BUYModelManager.h>
extern const struct BUYTaxLineAttributes {
__unsafe_unretained NSString *createdAt;
__unsafe_unretained NSString *price;
__unsafe_unretained NSString *rate;
__unsafe_unretained NSString *title;
__unsafe_unretained NSString *updatedAt;
} BUYTaxLineAttributes;
extern const struct BUYTaxLineRelationships {
__unsafe_unretained NSString *checkout;
} BUYTaxLineRelationships;
extern const struct BUYTaxLineUserInfo {
__unsafe_unretained NSString *Transient;
__unsafe_unretained NSString *documentation;
} BUYTaxLineUserInfo;
@class BUYCheckout;
@class BUYTaxLine;
@interface BUYModelManager (BUYTaxLineInserting)
- (NSArray<BUYTaxLine *> *)allTaxLineObjects;
- (BUYTaxLine *)fetchTaxLineWithIdentifierValue:(int64_t)identifier;
- (BUYTaxLine *)insertTaxLineWithJSONDictionary:(NSDictionary *)dictionary;
- (NSArray<BUYTaxLine *> *)insertTaxLinesWithJSONArray:(NSArray <NSDictionary *> *)array;
@end
/**
* BUYTaxLine represents a single tax line on a checkout. Use this to display an itemized list of taxes that a customer is being charged for.
*/
@interface _BUYTaxLine : BUYObject
+ (NSString *)entityName;
@property (nonatomic, strong) NSDate* createdAt;
/**
* The amount of tax to be charged.
*/
@property (nonatomic, strong) NSDecimalNumber* price;
/**
* The rate of tax to be applied.
*/
@property (nonatomic, strong) NSDecimalNumber* rate;
/**
* The name of the tax.
*/
@property (nonatomic, strong) NSString* title;
@property (nonatomic, strong) NSDate* updatedAt;
/**
* Inverse of Checkout.taxLines.
*/
@property (nonatomic, strong) BUYCheckout *checkout;
@end
//
// _BUYTaxLine.h
// Mobile Buy SDK
//
// Created by Shopify.
// Copyright (c) 2015 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.
//
// DO NOT EDIT. This file is machine-generated and constantly overwritten.
// Make changes to BUYTaxLine.m instead.
#import "_BUYTaxLine.h"
const struct BUYTaxLineAttributes BUYTaxLineAttributes = {
.createdAt = @"createdAt",
.price = @"price",
.rate = @"rate",
.title = @"title",
.updatedAt = @"updatedAt",
};
const struct BUYTaxLineRelationships BUYTaxLineRelationships = {
.checkout = @"checkout",
};
const struct BUYTaxLineUserInfo BUYTaxLineUserInfo = {
.Transient = @"YES",
.documentation = @"BUYTaxLine represents a single tax line on a checkout. Use this to display an itemized list of taxes that a customer is being charged for.",
};
@implementation _BUYTaxLine
+ (NSString *)entityName {
return @"TaxLine";
}
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
return keyPaths;
}
@end
#pragma mark -
@implementation BUYModelManager (BUYTaxLineInserting)
- (BUYTaxLine *)insertTaxLineWithJSONDictionary:(NSDictionary *)dictionary
{
return (BUYTaxLine *)[self buy_objectWithEntityName:@"TaxLine" JSONDictionary:dictionary];
}
- (NSArray<BUYTaxLine *> *)insertTaxLinesWithJSONArray:(NSArray <NSDictionary *> *)array
{
return (NSArray<BUYTaxLine *> *)[self buy_objectsWithEntityName:@"TaxLine" JSONArray:array];
}
- (NSArray<BUYTaxLine *> *)allTaxLineObjects
{
return (NSArray<BUYTaxLine *> *)[self buy_objectsWithEntityName:@"TaxLine" identifiers:nil];
}
- (BUYTaxLine *)fetchTaxLineWithIdentifierValue:(int64_t)identifier
{
return (BUYTaxLine *)[self buy_objectWithEntityName:@"TaxLine" identifier:@(identifier)];
}
@end
......@@ -58,6 +58,7 @@
#import "BUYModelManagerProtocol.h"
#import "BUYObjectProtocol.h"
#import "BUYObserver.h"
#import "BUYShopifyErrorCodes.h"
#import "BUYPaymentButton.h"
#import "BUYProductViewController.h"
......
#!/bin/bash
mogenerator="${PROJECT_DIR}/../Scripts/mogenerator"
MODEL_PATH="${PROJECT_DIR}/Mobile Buy SDK/Models/Mobile Buy SDK.xcdatamodeld"
CLASS_PATH="${PROJECT_DIR}/Mobile Buy SDK/Models"
PERSISTENT_PATH="${CLASS_PATH}/Persistent"
TRANSIENT_PATH="${CLASS_PATH}/Transient"
mkdir "${PERSISTENT_PATH}" 2>/dev/null
mkdir "${TRANSIENT_PATH}" 2>/dev/null
# Generate persistent classes
"${mogenerator}" --v2 --model "${MODEL_PATH}" --output-dir "${PERSISTENT_PATH}" --base-class BUYCachedObject --configuration persistent --template-path "Templates/Persistent"
# Generate transient classes
"${mogenerator}" --v2 --model "${MODEL_PATH}" --output-dir "${TRANSIENT_PATH}" --base-class BUYObject --configuration transient --template-path "Templates/Transient"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment