customerAddressUpdate method
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',
);
}