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
a8fd24b9
Commit
a8fd24b9
authored
Jun 01, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `applyGiftCardWithCode` -> `applyGiftCardCode`.
parent
4efa5fad
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
BUYIntegrationTest.m
Mobile Buy SDK/Mobile Buy SDK Tests/BUYIntegrationTest.m
+5
-5
BUYClient+Checkout.h
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.h
+1
-1
BUYClient+Checkout.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.m
+1
-1
No files found.
Mobile Buy SDK/Mobile Buy SDK Tests/BUYIntegrationTest.m
View file @
a8fd24b9
...
...
@@ -296,7 +296,7 @@
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
self
.
client
applyGiftCard
With
Code
:
self
.
giftCardCode
toCheckout
:
_checkout
completion
:^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
[
self
.
client
applyGiftCardCode
:
self
.
giftCardCode
toCheckout
:
_checkout
completion
:^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
XCTAssertNil
(
error
);
_checkout
=
checkout
;
...
...
@@ -331,7 +331,7 @@
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testApplyingInvalidGiftCardToCheckout_2"
useMocks
:[
self
shouldUseMocks
]];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
self
.
client
applyGiftCard
With
Code
:
@"000"
toCheckout
:
_checkout
completion
:^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
[
self
.
client
applyGiftCardCode
:
@"000"
toCheckout
:
_checkout
completion
:^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
XCTAssertNotNil
(
error
);
XCTAssertEqual
(
422
,
error
.
code
);
...
...
@@ -355,7 +355,7 @@
[
OHHTTPStubs
stubUsingResponseWithKey
:
@"testApplyingInvalidGiftCardToCheckout_2"
useMocks
:[
self
shouldUseMocks
]];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
self
.
client
applyGiftCard
With
Code
:
self
.
giftCardCodeExpired
toCheckout
:
_checkout
completion
:^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
[
self
.
client
applyGiftCardCode
:
self
.
giftCardCodeExpired
toCheckout
:
_checkout
completion
:^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
XCTAssertNotNil
(
error
);
XCTAssertEqual
(
422
,
error
.
code
);
...
...
@@ -471,7 +471,7 @@
NSDecimalNumber
*
originalPaymentDue
=
[
_checkout
.
paymentDue
copy
];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
self
.
client
applyGiftCard
With
Code
:
self
.
giftCardCode2
toCheckout
:
_checkout
completion
:^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
[
self
.
client
applyGiftCardCode
:
self
.
giftCardCode2
toCheckout
:
_checkout
completion
:^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
XCTAssertNil
(
error
);
_checkout
=
checkout
;
...
...
@@ -517,7 +517,7 @@
NSDecimalNumber
*
originalPaymentDue
=
[
_checkout
.
paymentDue
copy
];
XCTestExpectation
*
expectation
=
[
self
expectationWithDescription
:
NSStringFromSelector
(
_cmd
)];
[
self
.
client
applyGiftCard
With
Code
:
self
.
giftCardCode3
toCheckout
:
_checkout
completion
:^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
[
self
.
client
applyGiftCardCode
:
self
.
giftCardCode3
toCheckout
:
_checkout
completion
:^
(
BUYCheckout
*
checkout
,
NSError
*
error
)
{
//NOTE: Is this test failing? Make sure that you have configured giftCardCode above
XCTAssertNil
(
error
);
_checkout
=
checkout
;
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.h
View file @
a8fd24b9
...
...
@@ -197,7 +197,7 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
*
* @return The associated BUYRequestOperation
*/
-
(
BUYRequestOperation
*
)
applyGiftCard
With
Code
:(
NSString
*
)
giftCardCode
toCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
;
-
(
BUYRequestOperation
*
)
applyGiftCardCode
:(
NSString
*
)
giftCardCode
toCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
;
/**
* Removes a gift card from the checkout.
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.m
View file @
a8fd24b9
...
...
@@ -235,7 +235,7 @@
}];
}
-
(
BUYRequestOperation
*
)
applyGiftCard
With
Code
:(
NSString
*
)
giftCardCode
toCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
-
(
BUYRequestOperation
*
)
applyGiftCardCode
:(
NSString
*
)
giftCardCode
toCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
{
BUYAssertCheckout
(
checkout
);
BUYAssert
(
giftCardCode
.
length
>
0
,
@"Failed to apply gift card code. Invalid gift card code."
);
...
...
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