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
8a119535
Commit
8a119535
authored
May 30, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update `deleteAddress` to take an ID instead of BUYAddress
parent
d4a6e276
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
BUYClientTest_Customer.m
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTest_Customer.m
+1
-1
BUYClient+Address.h
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Address.h
+2
-2
BUYClient+Address.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Address.m
+3
-3
No files found.
Mobile Buy SDK/Mobile Buy SDK Tests/BUYClientTest_Customer.m
View file @
8a119535
...
...
@@ -325,7 +325,7 @@
}];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
self
.
client
deleteAddress
:
self
.
createdAddress
forCustomerID
:
self
.
customer
.
identifier
.
stringValue
callback
:^
(
BUYStatus
status
,
NSError
*
_Nullable
error
)
{
[
self
.
client
deleteAddress
WithID
:
self
.
createdAddress
.
identifier
forCustomerID
:
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 @
8a119535
...
...
@@ -98,13 +98,13 @@ typedef void (^BUYDataAddressBlock)(BUYAddress * _Nullable address, NSError * _N
* DELETE /api/customers/:customer_id/addresses/:id
* Delete the customer address
*
* @param address
Address
to delete
* @param address
ID Address ID
to delete
* @param customerID Customer ID for which to delete the address
* @param block (BUYStatus status, NSError *error)
*
* @return The associated BUYRequestOperation
*/
-
(
BUYRequestOperation
*
)
deleteAddress
:(
BUYAddress
*
)
address
forCustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataStatusBlock
)
block
;
-
(
BUYRequestOperation
*
)
deleteAddress
WithID
:(
NSNumber
*
)
addressID
forCustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataStatusBlock
)
block
;
@end
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Address.m
View file @
8a119535
...
...
@@ -83,11 +83,11 @@
}];
}
-
(
BUYRequestOperation
*
)
deleteAddress
:(
BUYAddress
*
)
address
forCustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataStatusBlock
)
block
-
(
BUYRequestOperation
*
)
deleteAddress
WithID
:(
NSNumber
*
)
addressID
forCustomerID
:(
NSString
*
)
customerID
callback
:(
BUYDataStatusBlock
)
block
{
BUYAssert
(
address
.
identifier
,
@"Failed to update address. Address must have a valid identifier."
);
BUYAssert
(
address
ID
,
@"Failed to update address. Address must have a valid identifier."
);
NSURL
*
route
=
[
self
urlForCustomersAddressWithID
:
customerID
addressID
:
address
.
identifier
];
NSURL
*
route
=
[
self
urlForCustomersAddressWithID
:
customerID
addressID
:
address
ID
];
return
[
self
deleteRequestForURL
:
route
completionHandler
:
^
(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
)
{
block
(
response
.
statusCode
,
error
);
}];
...
...
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