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
1bee7bab
Commit
1bee7bab
authored
May 24, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename ambiguous `customerToken` -> `token`
parent
639aa798
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
14 deletions
+10
-14
BUYClientTest.m
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTest.m
+2
-2
BUYClient+Customers.h
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Customers.h
+4
-4
BUYClient+Customers.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Customers.m
+4
-8
No files found.
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTest.m
View file @
1bee7bab
...
@@ -426,8 +426,8 @@ NSString * const BUYFakeCustomerToken = @"dsfasdgafdg";
...
@@ -426,8 +426,8 @@ NSString * const BUYFakeCustomerToken = @"dsfasdgafdg";
];
];
BUYAccountCredentials
*
credentials
=
[
BUYAccountCredentials
credentialsWithItems
:
items
];
BUYAccountCredentials
*
credentials
=
[
BUYAccountCredentials
credentialsWithItems
:
items
];
NSString
*
customerID
=
@"12345"
;
NSString
*
customerID
=
@"12345"
;
NSString
*
customerToken
=
@"12345"
;
NSString
*
token
=
@"12345"
;
BUYRequestOperation
*
task
=
[
self
.
client
activateCustomerWithCredentials
:
credentials
customerID
:
customerID
customerToken
:
customerT
oken
callback
:^
(
BUYCustomer
*
customer
,
NSString
*
token
,
NSError
*
error
)
{
BUYRequestOperation
*
task
=
[
self
.
client
activateCustomerWithCredentials
:
credentials
customerID
:
customerID
token
:
t
oken
callback
:^
(
BUYCustomer
*
customer
,
NSString
*
token
,
NSError
*
error
)
{
}];
}];
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Customers.h
View file @
1bee7bab
...
@@ -144,12 +144,12 @@ typedef void (^BUYDataOrdersBlock)(NSArray <BUYOrder*> * _Nullable orders, NSErr
...
@@ -144,12 +144,12 @@ typedef void (^BUYDataOrdersBlock)(NSArray <BUYOrder*> * _Nullable orders, NSErr
*
*
* @param credentials Credentials containing a password and password confirmation
* @param credentials Credentials containing a password and password confirmation
* @param customerID ID of customer being activated
* @param customerID ID of customer being activated
* @param
customerToken
Token contained in activation URL
* @param
token
Token contained in activation URL
* @param block (BUYCustomer *customer, NSString *token, NSError *error)
* @param block (BUYCustomer *customer, NSString *token, NSError *error)
*
*
* @return The associated BUYRequestOperation
* @return The associated BUYRequestOperation
*/
*/
-
(
BUYRequestOperation
*
)
activateCustomerWithCredentials
:(
BUYAccountCredentials
*
)
credentials
customerID
:(
NSString
*
)
customerID
customerToken
:(
NSString
*
)
customerT
oken
callback
:(
BUYDataCustomerTokenBlock
)
block
;
-
(
BUYRequestOperation
*
)
activateCustomerWithCredentials
:(
BUYAccountCredentials
*
)
credentials
customerID
:(
NSString
*
)
customerID
token
:(
NSString
*
)
t
oken
callback
:(
BUYDataCustomerTokenBlock
)
block
;
/**
/**
* PUT /api/customers/:customer_id/reset
* PUT /api/customers/:customer_id/reset
...
@@ -157,12 +157,12 @@ typedef void (^BUYDataOrdersBlock)(NSArray <BUYOrder*> * _Nullable orders, NSErr
...
@@ -157,12 +157,12 @@ typedef void (^BUYDataOrdersBlock)(NSArray <BUYOrder*> * _Nullable orders, NSErr
*
*
* @param credentials Credentials containing a password and password confirmation
* @param credentials Credentials containing a password and password confirmation
* @param customerID ID of customer resetting password
* @param customerID ID of customer resetting password
* @param
customerToken
Token contained in reset URL
* @param
token
Token contained in reset URL
* @param block (BUYCustomer *customer, NSString *token, NSError *error)
* @param block (BUYCustomer *customer, NSString *token, NSError *error)
*
*
* @return The associated BUYRequestOperation
* @return The associated BUYRequestOperation
*/
*/
-
(
BUYRequestOperation
*
)
resetPasswordWithCredentials
:(
BUYAccountCredentials
*
)
credentials
customerID
:(
NSString
*
)
customerID
customerToken
:(
NSString
*
)
customerT
oken
callback
:(
BUYDataCustomerTokenBlock
)
block
;
-
(
BUYRequestOperation
*
)
resetPasswordWithCredentials
:(
BUYAccountCredentials
*
)
credentials
customerID
:(
NSString
*
)
customerID
token
:(
NSString
*
)
t
oken
callback
:(
BUYDataCustomerTokenBlock
)
block
;
/**
/**
* GET /api/customers/:customer_id/orders
* GET /api/customers/:customer_id/orders
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Customers.m
View file @
1bee7bab
...
@@ -129,11 +129,9 @@
...
@@ -129,11 +129,9 @@
}
}
}
}
-
(
BUYRequestOperation
*
)
activateCustomerWithCredentials
:(
BUYAccountCredentials
*
)
credentials
customerID
:(
NSString
*
)
customerID
customerToken
:(
NSString
*
)
customerT
oken
callback
:(
BUYDataCustomerTokenBlock
)
block
-
(
BUYRequestOperation
*
)
activateCustomerWithCredentials
:(
BUYAccountCredentials
*
)
credentials
customerID
:(
NSString
*
)
customerID
token
:(
NSString
*
)
t
oken
callback
:(
BUYDataCustomerTokenBlock
)
block
{
{
NSURL
*
route
=
[
self
urlForCustomersActivationWithID
:
customerID
parameters
:@{
NSURL
*
route
=
[
self
urlForCustomersActivationWithID
:
customerID
parameters
:@{
@"token"
:
token
}];
@"token"
:
customerToken
,
}];
return
[
self
putRequestForURL
:
route
object
:
credentials
.
JSONRepresentation
completionHandler
:^
(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
)
{
return
[
self
putRequestForURL
:
route
object
:
credentials
.
JSONRepresentation
completionHandler
:^
(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
)
{
NSString
*
email
=
json
[
@"customer"
][
@"email"
];
NSString
*
email
=
json
[
@"customer"
][
@"email"
];
...
@@ -147,11 +145,9 @@
...
@@ -147,11 +145,9 @@
}];
}];
}
}
-
(
BUYRequestOperation
*
)
resetPasswordWithCredentials
:(
BUYAccountCredentials
*
)
credentials
customerID
:(
NSString
*
)
customerID
customerToken
:(
NSString
*
)
customerT
oken
callback
:(
BUYDataCustomerTokenBlock
)
block
-
(
BUYRequestOperation
*
)
resetPasswordWithCredentials
:(
BUYAccountCredentials
*
)
credentials
customerID
:(
NSString
*
)
customerID
token
:(
NSString
*
)
t
oken
callback
:(
BUYDataCustomerTokenBlock
)
block
{
{
NSURL
*
route
=
[
self
urlForCustomersPasswordResetWithID
:
customerID
parameters
:@{
NSURL
*
route
=
[
self
urlForCustomersPasswordResetWithID
:
customerID
parameters
:@{
@"token"
:
token
}];
@"token"
:
customerToken
,
}];
return
[
self
putRequestForURL
:
route
object
:
credentials
.
JSONRepresentation
completionHandler
:^
(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
)
{
return
[
self
putRequestForURL
:
route
object
:
credentials
.
JSONRepresentation
completionHandler
:^
(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
)
{
NSString
*
email
=
json
[
@"customer"
][
@"email"
];
NSString
*
email
=
json
[
@"customer"
][
@"email"
];
...
...
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