Skip to content

Commit

Permalink
feat(RSS-ECOMM-4_97): add address actions (#315)
Browse files Browse the repository at this point in the history
feat: add address actions
  • Loading branch information
YulikK authored May 26, 2024
1 parent 43da852 commit cfd3da8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/shared/API/customer/model/CustomerModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ export class CustomerModel {
return { action: 'addAddress', address: CustomerModel.adaptAddressToServer(address) };
}

public static actionAddBillingAddress(addressId: string): MyCustomerUpdateAction {
return { action: 'addBillingAddressId', addressId };
}

public static actionAddShippingAddress(addressId: string): MyCustomerUpdateAction {
return { action: 'addShippingAddressId', addressId };
}

public static actionEditAddress(address: Address): MyCustomerUpdateAction {
return { action: 'changeAddress', address: CustomerModel.adaptAddressToServer(address), addressId: address.id };
}
Expand Down

0 comments on commit cfd3da8

Please sign in to comment.