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
a438f0a8
Commit
a438f0a8
authored
May 30, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Organize BUYClient+Checkout.h
parent
837e5b9e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
31 deletions
+35
-31
BUYClient+Checkout.h
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.h
+35
-31
BUYClient+Checkout.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.m
+0
-0
No files found.
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.h
View file @
a438f0a8
...
@@ -70,6 +70,8 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
...
@@ -70,6 +70,8 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
@interface
BUYClient
(
Checkout
)
@interface
BUYClient
(
Checkout
)
#pragma mark - Checkout -
/**
/**
* Builds a checkout on Shopify. The checkout object is used to prepare an order
* Builds a checkout on Shopify. The checkout object is used to prepare an order
*
*
...
@@ -92,26 +94,19 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
...
@@ -92,26 +94,19 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
-
(
BUYRequestOperation
*
)
createCheckoutWithCartToken
:(
NSString
*
)
cartToken
completion
:(
BUYDataCheckoutBlock
)
block
;
-
(
BUYRequestOperation
*
)
createCheckoutWithCartToken
:(
NSString
*
)
cartToken
completion
:(
BUYDataCheckoutBlock
)
block
;
/**
/**
*
Applies a gift card code to the checkout
.
*
Updates a given BUYCheckout on Shopify
.
*
*
* @param giftCardCode The gift card code to apply on an existing checkout on Shopify. Note: This is not the same as the gift card identifier.
* Note: There's no guarantee that the BUYCheckout returned will be the same as the one that is passed in.
* @param checkout An existing BUYCheckout on Shopify
* We recommended using the BUYCheckout returned in the block.
* @param block (^BUYDataCheckoutBlock)(BUYCheckout *checkout, NSError *error);
*
*
* @return The associated BUYRequestOperation
* Note: A BUYCheckout object with an `orderId` is a completed checkout.
*/
-
(
BUYRequestOperation
*
)
applyGiftCardWithCode
:(
NSString
*
)
giftCardCode
toCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
;
/**
* Removes a gift card from the checkout.
*
*
* @param giftCardCode The BUYGiftCard identifier to remove on an existing checkout on Shopify.
* @param checkout The BUYCheckout to updated on Shopify
* @param checkout An existing BUYCheckout on Shopify
* @param block (^BUYDataCheckoutBlock)(BUYCheckout *checkout, NSError *error);
* @param block (^BUYDataCheckoutBlock)(BUYCheckout *checkout, NSError *error);
*
*
* @return The associated BUYRequestOperation
* @return The associated BUYRequestOperation
*/
*/
-
(
BUYRequestOperation
*
)
removeGiftCard
:(
BUYGiftCard
*
)
giftCard
from
Checkout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
;
-
(
BUYRequestOperation
*
)
update
Checkout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
;
/**
/**
* Retrieves an updated version of a BUYCheckout from Shopify.
* Retrieves an updated version of a BUYCheckout from Shopify.
...
@@ -127,21 +122,6 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
...
@@ -127,21 +122,6 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
-
(
BUYRequestOperation
*
)
getCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
;
-
(
BUYRequestOperation
*
)
getCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
;
/**
/**
* Updates a given BUYCheckout on Shopify.
*
* Note: There's no guarantee that the BUYCheckout returned will be the same as the one that is passed in.
* We recommended using the BUYCheckout returned in the block.
*
* Note: A BUYCheckout object with an `orderId` is a completed checkout.
*
* @param checkout The BUYCheckout to updated on Shopify
* @param block (^BUYDataCheckoutBlock)(BUYCheckout *checkout, NSError *error);
*
* @return The associated BUYRequestOperation
*/
-
(
BUYRequestOperation
*
)
updateCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
;
/**
* Finalizes the BUYCheckout and charges the payment provider (ex: Credit Card, Apple Pay, etc).
* Finalizes the BUYCheckout and charges the payment provider (ex: Credit Card, Apple Pay, etc).
* This enqueues a completion job on Shopify and returns immediately.
* This enqueues a completion job on Shopify and returns immediately.
* You must get the job's status by calling checkCompletionStatusOfCheckout:block
* You must get the job's status by calling checkCompletionStatusOfCheckout:block
...
@@ -178,7 +158,7 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
...
@@ -178,7 +158,7 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
*/
*/
-
(
BUYRequestOperation
*
)
getCompletionStatusOfCheckoutURL
:(
NSURL
*
)
url
completion
:(
BUYDataStatusBlock
)
block
;
-
(
BUYRequestOperation
*
)
getCompletionStatusOfCheckoutURL
:(
NSURL
*
)
url
completion
:(
BUYDataStatusBlock
)
block
;
#pragma mark - Shipping Rates
#pragma mark - Shipping Rates
-
/**
/**
* Retrieves a list of applicable shipping rates for a given BUYCheckout.
* Retrieves a list of applicable shipping rates for a given BUYCheckout.
...
@@ -191,7 +171,7 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
...
@@ -191,7 +171,7 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
*/
*/
-
(
BUYRequestOperation
*
)
getShippingRatesForCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataShippingRatesBlock
)
block
;
-
(
BUYRequestOperation
*
)
getShippingRatesForCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataShippingRatesBlock
)
block
;
#pragma mark -
Payment Management
#pragma mark -
Cards -
/**
/**
* Prepares a credit card for usage during the checkout process. This sends it to Shopify's secure servers.
* Prepares a credit card for usage during the checkout process. This sends it to Shopify's secure servers.
...
@@ -212,6 +192,30 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
...
@@ -212,6 +192,30 @@ typedef void (^BUYDataGiftCardBlock)(BUYGiftCard * _Nullable giftCard, NSError *
-
(
BUYRequestOperation
*
)
storeCreditCard
:(
BUYCreditCard
*
)
creditCard
checkout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCreditCardBlock
)
block
;
-
(
BUYRequestOperation
*
)
storeCreditCard
:(
BUYCreditCard
*
)
creditCard
checkout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCreditCardBlock
)
block
;
/**
/**
* Applies a gift card code to the checkout.
*
* @param giftCardCode The gift card code to apply on an existing checkout on Shopify. Note: This is not the same as the gift card identifier.
* @param checkout An existing BUYCheckout on Shopify
* @param block (^BUYDataCheckoutBlock)(BUYCheckout *checkout, NSError *error);
*
* @return The associated BUYRequestOperation
*/
-
(
BUYRequestOperation
*
)
applyGiftCardWithCode
:(
NSString
*
)
giftCardCode
toCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
;
/**
* Removes a gift card from the checkout.
*
* @param giftCardCode The BUYGiftCard identifier to remove on an existing checkout on Shopify.
* @param checkout An existing BUYCheckout on Shopify
* @param block (^BUYDataCheckoutBlock)(BUYCheckout *checkout, NSError *error);
*
* @return The associated BUYRequestOperation
*/
-
(
BUYRequestOperation
*
)
removeGiftCard
:(
BUYGiftCard
*
)
giftCard
fromCheckout
:(
BUYCheckout
*
)
checkout
completion
:(
BUYDataCheckoutBlock
)
block
;
#pragma mark - Reservations -
/**
* Convenience method to release all product inventory reservations by setting its
* Convenience method to release all product inventory reservations by setting its
* `reservationTime` to `@0` and calls `updateCheckout:completion`. We recommend creating
* `reservationTime` to `@0` and calls `updateCheckout:completion`. We recommend creating
* a new BUYCheckout object from a BUYCart for further API calls.
* a new BUYCheckout object from a BUYCart for further API calls.
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Checkout.m
View file @
a438f0a8
This diff is collapsed.
Click to expand it.
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