diff --git a/external/resources/yaml/resources.yaml b/external/resources/yaml/resources.yaml index dab916aa..01e8c355 100644 --- a/external/resources/yaml/resources.yaml +++ b/external/resources/yaml/resources.yaml @@ -2463,113 +2463,114 @@ stores: get-entity: docs: "https://elasticpath.dev/guides/key-concepts/organizations/overview" url: "/v2/stores/{settings}" -subscription-products: - docs: "https://elasticpath.dev/docs/api/subscriptions/products" - json-api-type: subscription_product - json-api-format: compliant - singular-name: subscription-product - get-collection: - docs: "https://elasticpath.dev/docs/api/subscriptions/list-products" - url: /v2/subscriptions/products - get-entity: - docs: "https://elasticpath.dev/docs/api/subscriptions/get-product" - url: /v2/subscriptions/products/{subscription_products} - create-entity: - docs: "https://elasticpath.dev/docs/api/subscriptions/create-product" - url: /v2/subscriptions/products - update-entity: - docs: "https://elasticpath.dev/docs/api/subscriptions/update-product" - url: /v2/subscriptions/products/{subscription_products} - delete-entity: - docs: "https://elasticpath.dev/docs/api/subscriptions/delete-product" - url: /v2/subscriptions/products/{subscription_products} - attributes: - ^price\.([a-zA-Z0-9-_]+)\.amount$: - type: INT - ^price\.([a-zA-Z0-9-_]+)\.includes_tax$: - type: BOOL - description: - type: STRING - autofill: VALUE:Auto Generated - external_ref: - type: STRING - main_image: - type: STRING - name: - type: STRING - autofill: FUNC:Name - price_units.amount: - type: INT - price_units.unit: - type: ENUM:day,month - sku: - type: STRING -subscription-plans: - docs: "https://elasticpath.dev/docs/api/subscriptions/plans" - json-api-type: subscription_plan - json-api-format: compliant - singular-name: subscription-plan - get-collection: - docs: "https://elasticpath.dev/docs/api/subscriptions/list-plans" - url: /v2/subscriptions/plans - get-entity: - docs: "https://elasticpath.dev/docs/api/subscriptions/get-plan" - url: /v2/subscriptions/plans/{subscription_plans} - create-entity: - docs: "https://elasticpath.dev/docs/api/subscriptions/create-plan" - url: /v2/subscriptions/plans - update-entity: - docs: "https://elasticpath.dev/docs/api/subscriptions/update-plan" - url: /v2/subscriptions/plans/{subscription_plans} - delete-entity: - docs: "https://elasticpath.dev/docs/api/subscriptions/delete-plan" - url: /v2/subscriptions/plans/{subscription_plans} - attributes: - ^fixed_price\.(USD|[a-zA-Z0-9-_]+)\.amount$: - type: INT - ^fixed_price\.(USD|[a-zA-Z0-9-_]+)\.includes_tax$: - type: BOOL - billing_day: - type: INT - billing_frequency: - type: INT - autofill: VALUE:1 - billing_interval_type: - type: ENUM:day,week,month,year - autofill: VALUE:day - billing_month_day: - type: INT - can_cancel: - type: BOOL - autofill: VALUE:true - can_pause: - type: BOOL - autofill: VALUE:true - can_resume: - type: BOOL - autofill: VALUE:true - description: - type: STRING - autofill: VALUE:Auto Generated - end_behavior: - type: ENUM:close,roll - autofill: VALUE:close - external_ref: - type: STRING - name: - type: STRING - autofill: FUNC:Name - plan_length: - type: INT - autofill: VALUE:1 - status: - type: ENUM:active,draft,archive - trial_period: - type: INT +#subscription-products: +# docs: "https://elasticpath.dev/docs/api/subscriptions/products" +# json-api-type: subscription_product +# json-api-format: compliant +# singular-name: subscription-product +# get-collection: +# docs: "https://elasticpath.dev/docs/api/subscriptions/list-products" +# url: /v2/subscriptions/products +# get-entity: +# docs: "https://elasticpath.dev/docs/api/subscriptions/get-product" +# url: /v2/subscriptions/products/{subscription_products} +# create-entity: +# docs: "https://elasticpath.dev/docs/api/subscriptions/create-product" +# url: /v2/subscriptions/products +# update-entity: +# docs: "https://elasticpath.dev/docs/api/subscriptions/update-product" +# url: /v2/subscriptions/products/{subscription_products} +# delete-entity: +# docs: "https://elasticpath.dev/docs/api/subscriptions/delete-product" +# url: /v2/subscriptions/products/{subscription_products} +# attributes: +# ^price\.([a-zA-Z0-9-_]+)\.amount$: +# type: INT +# ^price\.([a-zA-Z0-9-_]+)\.includes_tax$: +# type: BOOL +# description: +# type: STRING +# autofill: VALUE:Auto Generated +# external_ref: +# type: STRING +# main_image: +# type: STRING +# name: +# type: STRING +# autofill: FUNC:Name +# price_units.amount: +# type: INT +# price_units.unit: +# type: ENUM:day,month +# sku: +# type: STRING +#subscription-plans: +# docs: "https://elasticpath.dev/docs/api/subscriptions/plans" +# json-api-type: subscription_plan +# json-api-format: compliant +# singular-name: subscription-plan +# get-collection: +# docs: "https://elasticpath.dev/docs/api/subscriptions/list-plans" +# url: /v2/subscriptions/plans +# get-entity: +# docs: "https://elasticpath.dev/docs/api/subscriptions/get-plan" +# url: /v2/subscriptions/plans/{subscription_plans} +# create-entity: +# docs: "https://elasticpath.dev/docs/api/subscriptions/create-plan" +# url: /v2/subscriptions/plans +# update-entity: +# docs: "https://elasticpath.dev/docs/api/subscriptions/update-plan" +# url: /v2/subscriptions/plans/{subscription_plans} +# delete-entity: +# docs: "https://elasticpath.dev/docs/api/subscriptions/delete-plan" +# url: /v2/subscriptions/plans/{subscription_plans} +# attributes: +# ^fixed_price\.(USD|[a-zA-Z0-9-_]+)\.amount$: +# type: INT +# ^fixed_price\.(USD|[a-zA-Z0-9-_]+)\.includes_tax$: +# type: BOOL +# billing_day: +# type: INT +# billing_frequency: +# type: INT +# autofill: VALUE:1 +# billing_interval_type: +# type: ENUM:day,week,month,year +# autofill: VALUE:day +# billing_month_day: +# type: INT +# can_cancel: +# type: BOOL +# autofill: VALUE:true +# can_pause: +# type: BOOL +# autofill: VALUE:true +# can_resume: +# type: BOOL +# autofill: VALUE:true +# description: +# type: STRING +# autofill: VALUE:Auto Generated +# end_behavior: +# type: ENUM:close,roll +# autofill: VALUE:close +# external_ref: +# type: STRING +# name: +# type: STRING +# autofill: FUNC:Name +# plan_length: +# type: INT +# autofill: VALUE:1 +# status: +# type: ENUM:active,draft,archive +# trial_period: +# type: INT subscription-offerings: docs: "https://elasticpath.dev/docs/api/subscriptions/offerings" json-api-type: subscription_offering json-api-format: compliant + singular-name: subscription-offering get-collection: docs: "https://elasticpath.dev/docs/api/subscriptions/create-offering" url: /v2/subscriptions/offerings @@ -2596,7 +2597,37 @@ subscription-offerings: name: type: STRING autofill: FUNC:Name - singular-name: subscription-offering + relationships.proration_policy.type: + type: CONST:subscription_proratiotion_policy + relationships.proration_policy.data.id: + type: RESOURCE_ID:subscription-proration-policies +subscription-proration-policies: + docs: "https://elasticpath.dev/docs/api/subscriptions/create-proration-policy" + json-api-type: subscription_proration_policy + json-api-format: compliant + singular-name: subscription-proration-policy + get-collection: + docs: "https://elasticpath.dev/docs/api/subscriptions/list-proration-policies" + url: /v2/subscriptions/proration-policies + get-entity: + docs: "https://elasticpath.dev/docs/api/subscriptions/get-proration-policy" + url: /v2/subscriptions/proration-policies/{subscription_proration_policies} + create-entity: + docs: "https://elasticpath.dev/docs/api/subscriptions/create-proration-policy" + url: /v2/subscriptions/proration-policies + update-entity: + docs: "https://elasticpath.dev/docs/api/subscriptions/update-proration-policy" + url: /v2/subscriptions/proration-policies/{subscription_proration_policies} + delete-entity: + docs: "https://elasticpath.dev/docs/api/subscriptions/delete-proration-policy" + url: /v2/subscriptions/proration-policies/{subscription_proration_policies} + attributes: + external_ref: + type: STRING + name: + type: STRING + rounding: + type: ENUM:up,down,nearest custom-apis: singular-name: custom-api json-api-type: custom_api diff --git a/external/runbooks/run-all-runbooks.sh b/external/runbooks/run-all-runbooks.sh index 920ac571..52ec4246 100755 --- a/external/runbooks/run-all-runbooks.sh +++ b/external/runbooks/run-all-runbooks.sh @@ -37,8 +37,6 @@ epcc runbooks run commerce-extensions delete-product-review-custom-api echo "Starting Subscriptions Tests" epcc reset-store .+ -epcc runbooks run subscriptions create-subscription-plans -epcc runbooks run subscriptions create-subscription-products epcc runbooks run subscriptions create-subscription-offerings echo "Starting Account Cart Association Tests" diff --git a/external/runbooks/subscriptions.epcc.yml b/external/runbooks/subscriptions.epcc.yml index 9b9fe6f9..c5233295 100644 --- a/external/runbooks/subscriptions.epcc.yml +++ b/external/runbooks/subscriptions.epcc.yml @@ -3,32 +3,32 @@ description: long: "Utilities for working with subscriptions" short: "Utilities for working with subscriptions" actions: - create-subscription-products: - variables: - count: - type: INT - default: 10 - description: - short: "Create a lot of subscription products" - description: - short: "Create a number of products" - commands: - - | - {{ range untilStep 0 .count 1 -}}epcc create --skip-alias-processing -s subscription-product --auto-fill - {{ end }} - create-subscription-plans: - variables: - count: - type: INT - default: 10 - description: - short: "Create a lot of subscription plans" - description: - short: "Create a number of orders" - commands: - - | - {{ range untilStep 0 .count 1 -}}epcc create --skip-alias-processing -s subscription-plan status active --auto-fill billing_interval_type day billing_frequency 214 plan_length 1 end_behavior close can_pause true can_resume true can_cancel true fixed_price.USD.amount {{ pseudoRandInt 1 200 }}00 fixed_price.USD.includes_tax true - {{ end }} +# create-subscription-products: +# variables: +# count: +# type: INT +# default: 10 +# description: +# short: "Create a lot of subscription products" +# description: +# short: "Create a number of products" +# commands: +# - | +# {{ range untilStep 0 .count 1 -}}epcc create --skip-alias-processing -s subscription-product --auto-fill +# {{ end }} +# create-subscription-plans: +# variables: +# count: +# type: INT +# default: 10 +# description: +# short: "Create a lot of subscription plans" +# description: +# short: "Create a number of orders" +# commands: +# - | +# {{ range untilStep 0 .count 1 -}}epcc create --skip-alias-processing -s subscription-plan status active --auto-fill billing_interval_type day billing_frequency 214 plan_length 1 end_behavior close can_pause true can_resume true can_cancel true fixed_price.USD.amount {{ pseudoRandInt 1 200 }}00 fixed_price.USD.includes_tax true +# {{ end }} create-subscription-offerings: variables: count: