ShopifyCheckout class

ShopifyCheckout provides various method in order to work with checkouts.

Mixed-in types
Annotations
  • @Deprecated('From Shopify API Version 2024-07, use ShopifyCart instead')

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addLineItemsToCheckout({required String checkoutId, required List<LineItem> lineItems}) Future<Checkout>
Returns the Checkout that checkoutId belongs to after adding the lineItems to it.
checkForError(QueryResult<Object?> queryResult, {String? key, String? errorKey}) → void
throws a OperationException if the operation was wrong throws a ShopifyException if shopify reports an error
inherited
checkoutCompleteFree(String checkoutId) Future<void>
Complete Checkout without providing payment information. You can use this mutation for free items or items whose purchase price is covered by a gift card
checkoutCompleteWithTokenizedPaymentV3(String checkoutId, {required Checkout checkout, required String token, required PaymentTokenType paymentTokenType, required String idempotencyKey, required String amount, required String currencyCode, Address? billingAddress, bool test = false}) Future<TokanizedCheckout>
Complete Checkout with a tokenized payment.
checkoutCustomerAssociate(String checkoutId, String customerAccessToken) Future<void>
Associates the Customer that customerAccessToken belongs to, to the Checkout that checkoutId belongs to.
checkoutCustomerDisassociate(String checkoutId) Future<void>
Disassociates the Customer from the Checkout that checkoutId belongs to.
checkoutDiscountCodeApply(String checkoutId, String discountCode) Future<Checkout>
Applies discountCode to the Checkout that checkoutId belongs to.
checkoutDiscountCodeRemove(String checkoutId) Future<void>
Removes the applied discount from the Checkout that checkoutId belongs to.
checkoutGiftCardAppend(String checkoutId, List<String> giftCardCodes) Future<void>
Appends the giftCardCodes to the Checkout that checkoutId belongs to.
checkoutGiftCardRemove(String appliedGiftCardId, String checkoutId) Future<void>
Removes the Gift card that appliedGiftCardId belongs to, from the Checkout that checkoutId belongs to.
checkoutLineItemsReplace(String checkoutId, List<String> variantIdList) Future<void>
Replaces the LineItems in the Checkout associated to the checkoutId.
checkoutShippingLineUpdate(String checkoutId, String shippingRateHandle) Future<Checkout>
Returns Checkout that checkoutId belongs to, requires shipping.
completeCheckoutWithTokenizedPaymentV2({required String checkoutId, required PriceV2 price, required Address billingAddress, required String impotencyKey, required String tokenizedPayment, required String type, bool test = false}) Future<String?>
Updates the shipping address on given checkoutId
createCheckout({List<LineItem>? lineItems, Address? shippingAddress, String? email}) Future<Checkout>
creates a new Checkout with the given lineItems, shippingAddress and email.
getAllOrders(String customerAccessToken, {SortKeyOrder sortKey = SortKeyOrder.PROCESSED_AT, bool reverse = true}) Future<List<Order>?>
Returns all Order in a List of Orders.
getCheckoutInfoQuery(String checkoutId, {bool getShippingInfo = true, bool withPaymentId = false}) Future<Checkout>
Returns a Checkout object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeLineItemsFromCheckout({required String checkoutId, required List<LineItem> lineItems}) Future<Checkout>
Returns the Checkout that checkoutId belongs to after removing the lineItems from it.
shippingAddressUpdate(String checkoutId, Address address) Future<Checkout>
Updates the shipping address on given checkoutId
toString() String
A string representation of this object.
inherited
transformVariantIdListIntoListOfMaps(List<String> variantIdList) List<Map<String, dynamic>>
Helper method for transforming a list of variant ids into a List Of Map<String, dynamic> which looks like this:
updateAttributes(String checkoutId, {bool? allowPartialAddresses, Map<String, String>? customAttributes, String? note}) Future<void>
Updates the attributes of a Checkout
updateCheckoutEmail(String checkoutId, String email) Future<Checkout>
Update email of the checkout.
updateLineItemsInCheckout({required String checkoutId, required List<LineItem> lineItems}) Future<Checkout>
Returns the Checkout that checkoutId belongs to after updating the lineItems to it.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance ShopifyCheckout
Singleton instance of ShopifyCheckout
final