customerAddressUpdate method

Future<void> customerAddressUpdate({
  1. String? address1,
  2. String? address2,
  3. String? company,
  4. String? city,
  5. String? country,
  6. String? firstName,
  7. String? lastName,
  8. String? phone,
  9. String? province,
  10. String? zip,
  11. required String customerAccessToken,
  12. required String id,
})

Updated the Address of a Customer, please input only the fields that you wish to update.

Implementation

Future<void> customerAddressUpdate({
  String? address1,
  String? address2,
  String? company,
  String? city,
  String? country,
  String? firstName,
  String? lastName,
  String? phone,
  String? province,
  String? zip,
  required String customerAccessToken,
  required String id,
}) async {
  final MutationOptions _options = MutationOptions(
      document: gql(customerAddressUpdateMutation),
      variables: {
        'address1': address1,
        'address2': address2,
        'company': company,
        'city': city,
        'country': country,
        'firstName': firstName,
        'lastName': lastName,
        'phone': phone,
        'province': province,
        'zip': zip,
        'customerAccessToken': customerAccessToken,
        'id': id
      });
  final QueryResult result = await _graphQLClient!.mutate(_options);
  checkForError(
    result,
    key: 'customerAddressUpdate',
    errorKey: 'customerUserErrors',
  );
}