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
1d80e96d
Commit
1d80e96d
authored
Jun 02, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the 'for' prefix in customer address methods.
parent
ed403bd4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
BUYClientTest_Customer.m
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTest_Customer.m
+4
-4
BUYClient+Address.h
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Address.h
+4
-4
BUYClient+Address.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Address.m
+4
-4
No files found.
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTest_Customer.m
View file @
1d80e96d
...
...
@@ -236,7 +236,7 @@
BUYAddress
*
address
=
[
self
address
];
[
self
.
client
createAddress
:
address
forC
ustomerID
:
self
.
customer
.
identifier
.
stringValue
callback
:^
(
BUYAddress
*
_Nullable
returnedAddress
,
NSError
*
_Nullable
error
)
{
[
self
.
client
createAddress
:
address
c
ustomerID
:
self
.
customer
.
identifier
.
stringValue
callback
:^
(
BUYAddress
*
_Nullable
returnedAddress
,
NSError
*
_Nullable
error
)
{
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testCustomerLogin"
useMocks
:[
self
shouldUseMocks
]];
...
...
@@ -271,7 +271,7 @@
}];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
self
.
client
getAddressWithID
:
self
.
createdAddress
.
identifier
forC
ustomerID
:
self
.
customer
.
identifier
.
stringValue
callback
:^
(
BUYAddress
*
_Nullable
address
,
NSError
*
_Nullable
error
)
{
[
self
.
client
getAddressWithID
:
self
.
createdAddress
.
identifier
c
ustomerID
:
self
.
customer
.
identifier
.
stringValue
callback
:^
(
BUYAddress
*
_Nullable
address
,
NSError
*
_Nullable
error
)
{
XCTAssertNotNil
(
address
);
XCTAssertNil
(
error
);
...
...
@@ -295,7 +295,7 @@
BUYAddress
*
modifiedAddress
=
[
self
addressByModyfyingAddress
:
self
.
createdAddress
];
[
self
.
client
updateAddress
:
modifiedAddress
forC
ustomerID
:
self
.
customer
.
identifier
.
stringValue
callback
:^
(
BUYAddress
*
_Nullable
returnedAddress
,
NSError
*
_Nullable
error
)
{
[
self
.
client
updateAddress
:
modifiedAddress
c
ustomerID
:
self
.
customer
.
identifier
.
stringValue
callback
:^
(
BUYAddress
*
_Nullable
returnedAddress
,
NSError
*
_Nullable
error
)
{
XCTAssertNotNil
(
returnedAddress
);
XCTAssertNil
(
error
);
...
...
@@ -325,7 +325,7 @@
}];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
self
.
client
deleteAddressWithID
:
self
.
createdAddress
.
identifier
forC
ustomerID
:
self
.
customer
.
identifier
.
stringValue
callback
:^
(
BUYStatus
status
,
NSError
*
_Nullable
error
)
{
[
self
.
client
deleteAddressWithID
:
self
.
createdAddress
.
identifier
c
ustomerID
:
self
.
customer
.
identifier
.
stringValue
callback
:^
(
BUYStatus
status
,
NSError
*
_Nullable
error
)
{
XCTAssertEqual
(
status
,
204
);
XCTAssertNil
(
error
);
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Address.h
View file @
1d80e96d
...
...
@@ -68,7 +68,7 @@ typedef void (^BUYDataAddressBlock)(BUYAddress * _Nullable address, NSError * _N
*
* @return The associated BUYRequestOperation
*/
-
(
BUYRequestOperation
*
)
getAddressWithID
:(
NSNumber
*
)
addressID
forC
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
;
-
(
BUYRequestOperation
*
)
getAddressWithID
:(
NSNumber
*
)
addressID
c
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
;
/**
* POST /api/customers/:customer_id/addresses
...
...
@@ -80,7 +80,7 @@ typedef void (^BUYDataAddressBlock)(BUYAddress * _Nullable address, NSError * _N
*
* @return The associated BUYRequestOperation
*/
-
(
BUYRequestOperation
*
)
createAddress
:(
BUYAddress
*
)
address
forC
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
;
-
(
BUYRequestOperation
*
)
createAddress
:(
BUYAddress
*
)
address
c
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
;
/**
* PUT /api/customers/:customer_id/addresses/:id
...
...
@@ -92,7 +92,7 @@ typedef void (^BUYDataAddressBlock)(BUYAddress * _Nullable address, NSError * _N
*
* @return The associated BUYRequestOperation
*/
-
(
BUYRequestOperation
*
)
updateAddress
:(
BUYAddress
*
)
address
forC
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
;
-
(
BUYRequestOperation
*
)
updateAddress
:(
BUYAddress
*
)
address
c
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
;
/**
* DELETE /api/customers/:customer_id/addresses/:id
...
...
@@ -104,7 +104,7 @@ typedef void (^BUYDataAddressBlock)(BUYAddress * _Nullable address, NSError * _N
*
* @return The associated BUYRequestOperation
*/
-
(
BUYRequestOperation
*
)
deleteAddressWithID
:(
NSNumber
*
)
addressID
forC
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataStatusBlock
)
block
;
-
(
BUYRequestOperation
*
)
deleteAddressWithID
:(
NSNumber
*
)
addressID
c
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataStatusBlock
)
block
;
@end
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Address.m
View file @
1d80e96d
...
...
@@ -45,7 +45,7 @@
}];
}
-
(
BUYRequestOperation
*
)
getAddressWithID
:(
NSNumber
*
)
addressID
forC
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
-
(
BUYRequestOperation
*
)
getAddressWithID
:(
NSNumber
*
)
addressID
c
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
{
NSURL
*
route
=
[
self
urlForCustomersAddressWithID
:
customerID
addressID
:
addressID
];
return
[
self
getRequestForURL
:
route
completionHandler
:
^
(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
)
{
...
...
@@ -57,7 +57,7 @@
}];
}
-
(
BUYRequestOperation
*
)
createAddress
:(
BUYAddress
*
)
address
forC
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
-
(
BUYRequestOperation
*
)
createAddress
:(
BUYAddress
*
)
address
c
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
{
NSURL
*
route
=
[
self
urlForCustomersAddressesWithID
:
customerID
];
return
[
self
postRequestForURL
:
route
object
:@{
@"address"
:
address
.
JSONDictionary
}
completionHandler
:^
(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
)
{
...
...
@@ -69,7 +69,7 @@
}];
}
-
(
BUYRequestOperation
*
)
updateAddress
:(
BUYAddress
*
)
address
forC
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
-
(
BUYRequestOperation
*
)
updateAddress
:(
BUYAddress
*
)
address
c
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataAddressBlock
)
block
{
BUYAssert
(
address
.
identifier
,
@"Failed to update address. Address must have a valid identifier."
);
...
...
@@ -83,7 +83,7 @@
}];
}
-
(
BUYRequestOperation
*
)
deleteAddressWithID
:(
NSNumber
*
)
addressID
forC
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataStatusBlock
)
block
-
(
BUYRequestOperation
*
)
deleteAddressWithID
:(
NSNumber
*
)
addressID
c
ustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataStatusBlock
)
block
{
BUYAssert
(
addressID
,
@"Failed to update address. Address must have a valid identifier."
);
...
...
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