Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ epcc
epcc-test
.envrc
build/

*.env
1 change: 1 addition & 0 deletions external/openapi/specs/download_specs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ download_spec "https://developer.elasticpath.com/assets/openapispecs/promotions-
download_spec "https://developer.elasticpath.com/assets/openapispecs/single-sign-on/OpenAPISpec.yaml" "single-sign-on.yaml"
download_spec "https://developer.elasticpath.com/assets/openapispecs/addresses/AccountAddresses.OpenAPISpec.yaml" "account-addresses.yaml"
download_spec "https://developer.elasticpath.com/assets/openapispecs/settings/OpenAPISpec.yaml" "settings.yaml"
download_spec "https://developer.elasticpath.com/assets/openapispecs/subscriptions/public_openapi.yaml" "subscriptions.yaml"


# Integrations doesn't have matching URLs.
Expand Down
480 changes: 480 additions & 0 deletions external/openapi/specs/settings.yaml

Large diffs are not rendered by default.

6,317 changes: 6,317 additions & 0 deletions external/openapi/specs/subscriptions.yaml

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions external/resources/yaml/carts-and-orders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,26 @@ cart-product-items:
location:
type: RESOURCE_ID:mli-inventory-locations
alias_attribute: slug
cart-subscription-items:
singular-name: "cart-subscription-item"
json-api-type: "subscription_item"
json-api-format: "legacy"
docs: "https://elasticpath.dev/docs/api/carts/manage-carts#add-subscription-item-to-cart"
create-entity:
docs: "https://elasticpath.dev/docs/api/carts/manage-carts#add-subscription-item-to-cart"
url: "/v2/carts/{carts}/items"
openapi-operation-id: manageCarts
content-type: application/json
attributes:
id:
type: RESOURCE_ID:subscription-offerings
quantity:
type: INT
autofill: VALUE:1
subscription_configuration.plan:
type: STRING
subscription_configuration.pricing_option:
type: STRING
cart-custom-items:
singular-name: "cart-custom-item"
json-api-type: "custom_item"
Expand Down
6 changes: 6 additions & 0 deletions external/resources/yaml/misc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,15 @@ settings:
get-collection:
docs: "https://elasticpath.dev/docs/api/settings/get-v-2-settings"
url: "/v2/settings"
openapi-operation-id: get-v2-settings
get-entity:
docs: "https://elasticpath.dev/docs/api/settings/get-v-2-settings"
url: "/v2/settings"
openapi-operation-id: get-v2-settings
update-entity:
docs: "https://elasticpath.dev/docs/api/settings/put-v-2-settings"
url: "/v2/settings"
openapi-operation-id: put-v2-settings
attributes:
page_length:
type: STRING
Expand Down Expand Up @@ -158,12 +161,15 @@ cart-settings:
get-collection:
docs: "https://elasticpath.dev/docs/api/settings/get-v-2-settings-cart"
url: "/v2/settings/cart"
openapi-operation-id: get-v2-settings-cart
get-entity:
docs: "https://elasticpath.dev/docs/api/settings/get-v-2-settings-cart"
url: "/v2/settings/cart"
openapi-operation-id: get-v2-settings-cart
update-entity:
docs: "https://elasticpath.dev/docs/api/settings/get-v-2-settings-cart"
url: "/v2/settings/cart"
openapi-operation-id: put-v2-settings-cart
attributes:
cart_expiry_days:
type: INT
Expand Down
6 changes: 3 additions & 3 deletions external/resources/yaml/promotions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ rule-promotions:
rule_set.rules.strategy:
type: ENUM:account_tags,cart_total,cart_custom_attribute,item_price,item_sku,item_product_id,item_quantity,item_category,item_attribute,item_identifier,items_bundle,and,or
rule_set.rules.operator:
type: ENUM:in,nin,eq,lt,lte,gt,gte,range
usage: "The strategies cart_total, item_price, and item_quantity support the operators [gt, lt, gte, lte, eq]. Strategies cart_custom_attribute, item_sku, item_product_id, item_identifier, item_category, and item_attribute support the operators [in, nin]."
type: ENUM:in,nin,eq,lt,lte,gt,gte,range,contains_all,contains_any,not_contains_any,not_contains_all
usage: "The strategies cart_total, item_price, and item_quantity support the operators [gt, lt, gte, lte, eq]. Strategies cart_custom_attribute, item_sku, item_product_id, item_identifier, item_category, and item_attribute support the operators [in, nin]. Strategy account_tags supports the operators [contains_all, contains_any, not_contains_any, not_contains_all]."
rule_set.rules.args[n]:
type: STRING
rule_set.rules.children[n].strategy:
type: ENUM:account_tags,cart_total,cart_custom_attribute,item_price,item_sku,item_product_id,item_quantity,item_category,item_attribute,item_identifier,items_bundle,and,or
rule_set.rules.children[n].operator:
type: ENUM:in,nin,eq,lt,lte,gt,gte
type: ENUM:in,nin,eq,lt,lte,gt,gte,contains_all,contains_any,not_contains_any,not_contains_all
rule_set.rules.children[n].args[n]:
type: STRING
rule_set.catalog_ids[n]:
Expand Down
2 changes: 1 addition & 1 deletion external/resources/yaml/resources_yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestExpectedNumberOfResources(t *testing.T) {
resourceCount := len(resources.GetPluralResources())

// Verification
require.Equal(t, resourceCount, 140)
require.Equal(t, resourceCount, 159)
}

func TestCreatedByTemplatesAllReferenceValidResource(t *testing.T) {
Expand Down
Loading
Loading