Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
shopify_iossdk
Commits
7d678e77
Commit
7d678e77
authored
Jul 15, 2016
by
David Muzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use NSNumber for product id in Client APIs
parent
a79a3661
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
Config.swift
...Sample App Swift/Mobile Buy SDK Swift Sample/Config.swift
+1
-1
BUYClient+StorefrontTests.m
... Buy SDK/Mobile Buy SDK Tests/BUYClient+StorefrontTests.m
+1
-1
BUYClient+Storefront.h
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Storefront.h
+2
-2
BUYClient+Storefront.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Storefront.m
+1
-1
No files found.
Mobile Buy SDK Sample Apps/Sample App Swift/Mobile Buy SDK Swift Sample/Config.swift
View file @
7d678e77
...
@@ -30,5 +30,5 @@ struct Config {
...
@@ -30,5 +30,5 @@ struct Config {
static
let
shopDomain
=
""
static
let
shopDomain
=
""
static
let
apiKey
=
""
static
let
apiKey
=
""
static
let
appId
=
""
static
let
appId
=
""
static
let
productId
=
""
static
let
productId
=
0
}
}
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClient+StorefrontTests.m
View file @
7d678e77
...
@@ -177,7 +177,7 @@
...
@@ -177,7 +177,7 @@
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testGetNonexistentProduct_0"
useMocks
:[
self
shouldUseMocks
]];
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testGetNonexistentProduct_0"
useMocks
:[
self
shouldUseMocks
]];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
self
.
client
getProductById
:
@
"asdfdsasdfdsasdfdsasdfjkllkj"
completion
:
^
(
BUYProduct
*
product
,
NSError
*
error
)
{
[
self
.
client
getProductById
:
@
123456
completion
:
^
(
BUYProduct
*
product
,
NSError
*
error
)
{
XCTAssertNil
(
product
);
XCTAssertNil
(
product
);
XCTAssertEqual
(
BUYShopifyError_InvalidProductID
,
error
.
code
);
XCTAssertEqual
(
BUYShopifyError_InvalidProductID
,
error
.
code
);
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Storefront.h
View file @
7d678e77
...
@@ -158,7 +158,7 @@ typedef void (^BUYDataProductListBlock)(NSArray<BUYProduct *> * _Nullable produc
...
@@ -158,7 +158,7 @@ typedef void (^BUYDataProductListBlock)(NSArray<BUYProduct *> * _Nullable produc
*
*
* @return The associated BUYRequestOperation
* @return The associated BUYRequestOperation
*/
*/
-
(
NSOperation
*
)
getProductById
:(
NS
String
*
)
productId
completion
:(
BUYDataProductBlock
)
block
;
-
(
NSOperation
*
)
getProductById
:(
NS
Number
*
)
productId
completion
:(
BUYDataProductBlock
)
block
;
/**
/**
* Fetches a list of product by the ID of each product.
* Fetches a list of product by the ID of each product.
...
@@ -168,7 +168,7 @@ typedef void (^BUYDataProductListBlock)(NSArray<BUYProduct *> * _Nullable produc
...
@@ -168,7 +168,7 @@ typedef void (^BUYDataProductListBlock)(NSArray<BUYProduct *> * _Nullable produc
*
*
* @return The associated BUYRequestOperation
* @return The associated BUYRequestOperation
*/
*/
-
(
NSOperation
*
)
getProductsByIds
:(
NSArray
<
NS
String
*>
*
)
productIds
completion
:(
BUYDataProductsBlock
)
block
;
-
(
NSOperation
*
)
getProductsByIds
:(
NSArray
<
NS
Number
*>
*
)
productIds
completion
:(
BUYDataProductsBlock
)
block
;
/**
/**
* Fetches collections based off page
* Fetches collections based off page
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Storefront.m
View file @
7d678e77
...
@@ -94,7 +94,7 @@ static NSString * const BUYCollectionsKey = @"collection_listings";
...
@@ -94,7 +94,7 @@ static NSString * const BUYCollectionsKey = @"collection_listings";
}];
}];
}
}
-
(
NSOperation
*
)
getProductById
:(
NS
String
*
)
productId
completion
:(
BUYDataProductBlock
)
block
-
(
NSOperation
*
)
getProductById
:(
NS
Number
*
)
productId
completion
:(
BUYDataProductBlock
)
block
{
{
BUYAssert
(
productId
,
@"Failed to get product by ID. Product ID must not be nil."
);
BUYAssert
(
productId
,
@"Failed to get product by ID. Product ID must not be nil."
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment