checkoutCustomerAssociate method

Future<void> checkoutCustomerAssociate(
  1. String checkoutId,
  2. String customerAccessToken
)

Associates the Customer that customerAccessToken belongs to, to the Checkout that checkoutId belongs to.

Implementation

Future<void> checkoutCustomerAssociate(
  String checkoutId,
  String customerAccessToken,
) async {
  final MutationOptions _options = MutationOptions(
      document: gql(associateCustomer),
      variables: {
        'checkoutId': checkoutId,
        'customerAccessToken': customerAccessToken
      });
  final QueryResult result = await _graphQLClient!.mutate(_options);
  checkForError(
    result,
    key: 'checkoutCustomerAssociateV2',
    errorKey: 'checkoutUserErrors',
  );
}