Skip to content

Improve Resource Output For Pcm Products #630

@steve-r-west

Description

@steve-r-west
epcc resource-info pcm-products 
Operations:
  epcc get pcm-products [sort SORT] [filter FILTER] [include INCLUDE] [page[limit] PAGE_LIMIT] [page[offset] PAGE_OFFSET] [page[total_method] PAGE_TOTAL_METHOD] - get a page of pcm-products

  epcc create pcm-product [components.*.max COMPONENTS_MAX] [components.*.min COMPONENTS_MIN] [components.*.name COMPONENTS_NAME] [components.*.options.id[n] COMPONENTS_OPTIONS_ID_N] [components.*.options.quantity COMPONENTS_OPTIONS_QUANTITY] [components.*.options.type product] [custom_inputs.*.name CUSTOM_INPUTS_NAME] [custom_inputs.*.validation_rules[n] CUSTOM_INPUTS_VALIDATION_RULES_N] [custom_inputs.*.validation_rules[n].max_length CUSTOM_INPUTS_VALIDATION_RULES_N_MAX_LENGTH] [custom_inputs.*.validation_rules[n].required {true|false}] [custom_inputs.*.validation_rules[n].type string] [commodity_type {physical,digital}] [description DESCRIPTION] [external_ref EXTERNAL_REF] [locales.en-US.description LOCALES_EN_US_DESCRIPTION] [locales.en-US.name LOCALES_EN_US_NAME] [mpn MPN] [name NAME] [sku SKU] [slug SLUG] [status {draft,live}] [upc_ean UPC_EAN] - create a pcm-product

  epcc get pcm-product PCM_PRODUCT_ID [include INCLUDE] - get a pcm-product

  epcc update pcm-product PCM_PRODUCT_ID [components.*.max COMPONENTS_MAX] [components.*.min COMPONENTS_MIN] [components.*.name COMPONENTS_NAME] [components.*.options.id[n] COMPONENTS_OPTIONS_ID_N] [components.*.options.quantity COMPONENTS_OPTIONS_QUANTITY] [components.*.options.type product] [custom_inputs.*.name CUSTOM_INPUTS_NAME] [custom_inputs.*.validation_rules[n] CUSTOM_INPUTS_VALIDATION_RULES_N] [custom_inputs.*.validation_rules[n].max_length CUSTOM_INPUTS_VALIDATION_RULES_N_MAX_LENGTH] [custom_inputs.*.validation_rules[n].required {true|false}] [custom_inputs.*.validation_rules[n].type string] [commodity_type {physical,digital}] [description DESCRIPTION] [external_ref EXTERNAL_REF] [locales.en-US.description LOCALES_EN_US_DESCRIPTION] [locales.en-US.name LOCALES_EN_US_NAME] [mpn MPN] [name NAME] [sku SKU] [slug SLUG] [status {draft,live}] [upc_ean UPC_EAN] - update a pcm-product

  epcc delete pcm-product PCM_PRODUCT_ID - delete a pcm-product


Parameters:
  COMMODITY_TYPE                                                       - One of the following values: physical, digital
  DESCRIPTION                                                          - A string value
  EXTERNAL_REF                                                         - A string value
  LOCALES.EN-US.DESCRIPTION                                            - A string value
  LOCALES.EN-US.NAME                                                   - A string value
  MPN                                                                  - A string value
  NAME                                                                 - A string value
  PCM_PRODUCT_ID                                                       - An ID or alias for a Pcm-Product
  SKU                                                                  - A string value
  SLUG                                                                 - A string value
  STATUS                                                               - One of the following values: draft, live
  UPC_EAN                                                              - A string value
  ^COMPONENTS\.([A-ZA-Z0-9-_]+)\.MAX$                                  - An integer value
  ^COMPONENTS\.([A-ZA-Z0-9-_]+)\.MIN$                                  - An integer value
  ^COMPONENTS\.([A-ZA-Z0-9-_]+)\.NAME$                                 - A string value
  ^COMPONENTS\.([A-ZA-Z0-9-_]+)\.OPTIONS\.ID\[N\]$                     - The id of a pcm-product resource
  ^COMPONENTS\.([A-ZA-Z0-9-_]+)\.OPTIONS\.QUANTITY$                    - An integer value
  ^COMPONENTS\.([A-ZA-Z0-9-_]+)\.OPTIONS\.TYPE$                        - Only: product (note: the epcc will auto-populate this if an adjacent attribute is set)
  ^CUSTOM_INPUTS\.([A-ZA-Z0-9-_]+)\.NAME$                              - A string value
  ^CUSTOM_INPUTS\.([A-ZA-Z0-9-_]+)\.VALIDATION_RULES\[N\]$             - A string value
  ^CUSTOM_INPUTS\.([A-ZA-Z0-9-_]+)\.VALIDATION_RULES\[N\]\.MAX_LENGTH$ - An integer value
  ^CUSTOM_INPUTS\.([A-ZA-Z0-9-_]+)\.VALIDATION_RULES\[N\]\.REQUIRED$   - A boolean value
  ^CUSTOM_INPUTS\.([A-ZA-Z0-9-_]+)\.VALIDATION_RULES\[N\]\.TYPE$       - Only: string (note: the epcc will auto-populate this if an adjacent attribute is set)

In the above the regex isn't great, and the [N].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions