-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves #385 - Add support for customer cart associations
- Loading branch information
1 parent
3948b91
commit 281e1f8
Showing
2 changed files
with
85 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ actions: | |
create-customers-and-carts-with-product-items: | ||
description: | ||
short: "Create the customers and carts" | ||
ignore_errors: true | ||
ignore_errors: false | ||
commands: | ||
- | | ||
epcc create customer --auto-fill email "[email protected]" password test | ||
|
@@ -48,40 +48,80 @@ actions: | |
create-customers-and-carts-with-custom-items: | ||
description: | ||
short: "Create the customers and carts" | ||
ignore_errors: true | ||
ignore_errors: false | ||
commands: | ||
- | | ||
epcc create customer --auto-fill email "cust1@example.com" password test | ||
epcc create customer --auto-fill email "cust2@example.com" password test | ||
epcc create customer --auto-fill email "cust3@example.com" password test | ||
epcc create cart name "Customer 1 Cart" id cust1_only description "Customer 1 Cart" | ||
epcc create cart name "Customer 1&2 Shared Cart" id cust1_and_2 description "Customer 1 & 2 Cart" | ||
epcc create cart name "No Customer Cart" id no_cust_cart description "No Customer Cart" | ||
- epcc create customer-cart-association id=cust1_only data[0].type customer data[0].id email=cust1@example.com | ||
- epcc create customer-cart-association id=cust1_and_2 data[0].type customer data[0].id email=cust1@example.com | ||
- epcc create customer-cart-association id=cust1_and_2 data[0].type customer data[0].id email=cust2@example.com | ||
- epcc create cart-custom-item id=cust1_only sku sku=BE-Gas-Range-2b2b quantity 1 | ||
- epcc create cart-custom-item id=cust1_and_2 sku sku=BE-Gas-Range-2b2b quantity 2 | ||
- epcc create cart-custom-item no_cust_cart sku sku=BE-Gas-Range-2b2b quantity 3 | ||
epcc create customer --auto-fill email "cust4@example.com" password test | ||
epcc create customer --auto-fill email "cust5@example.com" password test | ||
epcc create customer --auto-fill email "cust6@example.com" password test | ||
epcc create cart name "Customer 4 Cart" id cust1_only description "Customer 4 Cart" | ||
epcc create cart name "Customer 4&5 Shared Cart" id cust1_and_2 description "Customer 4 & 5 Cart" | ||
epcc create cart name "No Customer Cart" id no_cust_cart_custom_items description "No Customer Cart (Custom Items)" | ||
- epcc create customer-cart-association id=cust4_only data[0].type customer data[0].id email=cust4@example.com | ||
- epcc create customer-cart-association id=cust4_and_5 data[0].type customer data[0].id email=cust4@example.com | ||
- epcc create customer-cart-association id=cust4_and_5 data[0].type customer data[0].id email=cust5@example.com | ||
- epcc create cart-custom-item id=cust4_only sku 123-456 quantity 1 price.amount 100000 price.includes_tax false name "Best Ever Electric Range" | ||
- epcc create cart-custom-item id=cust4_and_5 sku 123-456 quantity 2 price.amount 100000 price.includes_tax false name "Best Ever Electric Range" | ||
- epcc create cart-custom-item no_cust_cart_custom_items sku 123-789 quantity 3 price.amount 100000 price.includes_tax false name "Best Ever Gas Range" | ||
|
||
|
||
delete-customers-and-carts: | ||
delete-customer-and-carts-with-product-items: | ||
description: | ||
short: "Delete all the customers and their carts" | ||
ignore_errors: false | ||
commands: | ||
- epcc get -s customers filter 'like(email,*@example.com)' | ||
- epcc delete customer-cart-association id=cust1_only data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust1_and_2 data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust1_and_2 data[0].type customer data[0].id [email protected] | ||
- | | ||
epcc delete customer [email protected] | ||
epcc delete customer [email protected] | ||
epcc delete customer [email protected] | ||
- epcc delete customer-cart-association id=cust1_only data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust1_and_2 data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust1_and_2 data[0].type customer data[0].id [email protected] | ||
- | | ||
epcc delete cart cust1_only | ||
epcc delete cart cust1_and_2 | ||
epcc delete cart no_cust_cart | ||
try-and-delete-all-carts: | ||
description: | ||
short: "Try and delete all carts" | ||
ignore_errors: true | ||
commands: | ||
- epcc get -s customers filter 'like(email,*@example.com)' | ||
- epcc delete customer-cart-association id=cust1_only data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust1_and_2 data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust1_and_2 data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust4_only data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust4_and_5 data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust4_and_5 data[0].type customer data[0].id [email protected] | ||
- | | ||
epcc delete cart cust1_only | ||
epcc delete cart cust1_and_2 | ||
epcc delete cart no_cust_cart | ||
epcc delete cart cust4_only | ||
epcc delete cart cust4_and_5 | ||
epcc delete cart no_cust_cart_custom_items | ||
|
||
|
||
delete-customer-and-carts-with-custom-items: | ||
description: | ||
short: "Delete all the customers and their carts" | ||
ignore_errors: false | ||
commands: | ||
- epcc get -s customers filter 'like(email,*@example.com)' | ||
- epcc delete customer-cart-association id=cust4_only data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust4_and_5 data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust4_and_5 data[0].type customer data[0].id [email protected] | ||
- | | ||
epcc delete customer [email protected] | ||
epcc delete customer [email protected] | ||
epcc delete customer [email protected] | ||
- | | ||
epcc delete cart cust4_only | ||
epcc delete cart cust4_and_5 | ||
epcc delete cart no_cust_cart_custom_items | ||
reset: | ||
description: | ||
|
@@ -96,13 +136,22 @@ actions: | |
epcc get -s pcm-pricebooks | ||
epcc get -s pcm-catalog-rules | ||
epcc get -s customers filter 'like(email,*@example.com)' | ||
- epcc delete customer-cart-association id=cust1_only data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust1_and_2 data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust1_and_2 data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust4_only data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust4_and_5 data[0].type customer data[0].id [email protected] | ||
- epcc delete customer-cart-association id=cust4_and_5 data[0].type customer data[0].id [email protected] | ||
- | | ||
epcc get -s pcm-catalog-releases name=Ranges_Catalog | ||
epcc get -s pcm-catalog-releases name=Ranges_Catalog_for_Special_Customers | ||
- | | ||
epcc delete customer [email protected] --if-alias-exists [email protected] | ||
epcc delete customer [email protected] --if-alias-exists [email protected] | ||
epcc delete customer [email protected] --if-alias-exists [email protected] | ||
epcc delete customer [email protected] --if-alias-exists [email protected] | ||
epcc delete customer [email protected] --if-alias-exists [email protected] | ||
epcc delete customer [email protected] --if-alias-exists [email protected] | ||
epcc delete currency code=GBP --if-alias-exists code=GBP | ||
epcc delete pcm-catalog-release name=Ranges_Catalog name=Ranges_Catalog | ||
epcc delete pcm-catalog-release name=Ranges_Catalog_for_Special_Customers name=Ranges_Catalog_for_Special_Customers | ||
|
@@ -115,3 +164,10 @@ actions: | |
- | | ||
epcc delete pcm-catalog name=Ranges_Catalog_for_Special_Customers --if-alias-exists name=Ranges_Catalog_for_Special_Customers | ||
epcc delete pcm-catalog name=Ranges_Catalog --if-alias-exists name=Ranges_Catalog | ||
- | | ||
epcc delete cart cust1_only | ||
epcc delete cart cust1_and_2 | ||
epcc delete cart no_cust_cart | ||
epcc delete cart cust4_only | ||
epcc delete cart cust4_and_5 | ||
epcc delete cart no_cust_cart_custom_items |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters