Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@commercelayer/cli-plugin-resources
Advanced tools
Commerce Layer CLI Resources plugin
$ cl-resources COMMAND
$ cl-resources (-v | version | --version) to check the version of the CLI you have installed.
$ cl-resources [COMMAND] (--help | -h) for detailed information about CLI commands.
To install as a Commerce Layer CLI plugin run the following command:
$ commercelayer plugins:install resources
cl-resources resources
cl-resources resources:create RESOURCE
cl-resources resources:delete RESOURCE [ID]
cl-resources resources:doc RESOURCE
cl-resources resources:filters
cl-resources resources:get RESOURCE [ID]
cl-resources resources:list RESOURCE
cl-resources resources:retrieve RESOURCE [ID]
cl-resources resources:update RESOURCE [ID]
cl-resources resources
List all the available Commerce Layer API resources.
USAGE
$ cl-resources resources
OPTIONS
-h, --help show CLI help
EXAMPLES
$ cl-resources resources
$ cl-res resources
$ commercelayer resources
$ cl resources
See code: src/commands/resources/index.ts
cl-resources resources:create RESOURCE
Create a new resource.
USAGE
$ cl-resources resources:create RESOURCE
ARGUMENTS
RESOURCE the resource type
OPTIONS
-D, --data=data the data file to use as request body
-D, --doc shows the CLI command in a specific language
-O, --object=object define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=attribute define a resource attribute
-f, --fields=fields comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=include comma separated resources to include
-j, --json convert output in standard JSON format
-l, --lang=curl|node show the CLI command in the specified language syntax
-m, --metadata=metadata define a metadata attribute or a set of metadata attributes
-o, --organization=organization (required) the slug of your organization
-r, --relationship=relationship define a relationship with another resource
-u, --unformatted print unformatted JSON output
--curl show the equivalent cURL command of the CLI command
--node show the equivalent Node SDK source code of the CLI command
ALIASES
$ cl-resources create
$ cl-resources rc
$ cl-resources res:create
$ cl-resources post
EXAMPLES
$ commercelayer resources:create customers -a email=user@test.com
$ clayer res:create customers -a email="user@test-com" -r customer_group=customer_groups/<customerGroupId>
$ cl create customers -a email=user@test.com -m meta_key="meta value"
$ cl rc customers -D /path/to/data/file/data.json
See code: src/commands/resources/create.ts
cl-resources resources:delete RESOURCE [ID]
Delete an existing resource.
USAGE
$ cl-resources resources:delete RESOURCE [ID]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
OPTIONS
-D, --doc shows the CLI command in a specific language
-R, --raw print out the raw API response
-f, --fields=fields comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=include comma separated resources to include
-j, --json convert output in standard JSON format
-l, --lang=curl|node show the CLI command in the specified language syntax
-o, --organization=organization (required) the slug of your organization
-u, --unformatted print unformatted JSON output
--curl show the equivalent cURL command of the CLI command
--node show the equivalent Node SDK source code of the CLI command
ALIASES
$ cl-resources delete
$ cl-resources rd
$ cl-resources res:delete
EXAMPLES
$ commercelayer resources:delete customers/<customerId>
$ cl delete customers <customerId>
See code: src/commands/resources/delete.ts
cl-resources resources:doc RESOURCE
Open the default browser and show the online documentation for the resource.
USAGE
$ cl-resources resources:doc RESOURCE
ARGUMENTS
RESOURCE the resource for which you want to access the online documentation
ALIASES
$ cl-resources res:doc
EXAMPLES
$ commercelayer rdoc customers
$ cl res:doc cusatomers
See code: src/commands/resources/doc.ts
cl-resources resources:filters
Show a list of all available filter predicates.
USAGE
$ cl-resources resources:filters
ALIASES
$ cl-resources res:filters
EXAMPLES
$ commercelayer resources:filters
$ cl res:filters
See code: src/commands/resources/filters.ts
cl-resources resources:get RESOURCE [ID]
Retrieve a resource or list a set of resources.
USAGE
$ cl-resources resources:get RESOURCE [ID]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
OPTIONS
-D, --doc shows the CLI command in a specific language
-R, --raw print out the raw API response
-X, --save-path=save-path save command output to file and create missing path directories
-e, --extract=extract extract subfields from object attributes
-f, --fields=fields comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=include comma separated resources to include
-j, --json convert output in standard JSON format
-l, --lang=curl|node show the CLI command in the specified language syntax
-n, --pageSize=pageSize number of elements per page
-o, --organization=organization (required) the slug of your organization
-p, --page=page page number
-s, --sort=sort defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=where comma separated list of query filters
-x, --save=save save command output to file
--curl show the equivalent cURL command of the CLI command
--node show the equivalent Node SDK source code of the CLI command
ALIASES
$ cl-resources get
$ cl-resources res:get
EXAMPLES
$ commercelayer resources:get customers
$ commercelayer res:get customers
$ clayer res:get customers/<customerId>
$ cl get customers <customerId>
See code: src/commands/resources/get.ts
cl-resources resources:list RESOURCE
Fetch a collection of resources.
USAGE
$ cl-resources resources:list RESOURCE
ARGUMENTS
RESOURCE the resource type
OPTIONS
-D, --doc shows the CLI command in a specific language
-R, --raw print out the raw API response
-X, --save-path=save-path save command output to file and create missing path directories
-e, --extract=extract extract subfields from object attributes
-f, --fields=fields comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=include comma separated resources to include
-j, --json convert output in standard JSON format
-l, --lang=curl|node show the CLI command in the specified language syntax
-n, --pageSize=pageSize number of elements per page
-o, --organization=organization (required) the slug of your organization
-p, --page=page page number
-s, --sort=sort defines results ordering
-u, --unformatted print unformatted JSON output
-w, --where=where comma separated list of query filters
-x, --save=save save command output to file
--curl show the equivalent cURL command of the CLI command
--node show the equivalent Node SDK source code of the CLI command
ALIASES
$ cl-resources list
$ cl-resources rl
$ cl-resources res:list
EXAMPLES
$ commercelayer resources:list customers -f id,email -i customer_group -s updated_at
$ cl res:list -i customer_group -f customer_groups/name -w customer_group_name_eq="GROUP NAME"
$ cl list -p 5 -n 10 -s -created_at --raw
See code: src/commands/resources/list.ts
cl-resources resources:retrieve RESOURCE [ID]
Fetch a single resource.
USAGE
$ cl-resources resources:retrieve RESOURCE [ID]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
OPTIONS
-D, --doc shows the CLI command in a specific language
-R, --raw print out the raw API response
-X, --save-path=save-path save command output to file and create missing path directories
-e, --extract=extract extract subfields from object attributes
-f, --fields=fields comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=include comma separated resources to include
-j, --json convert output in standard JSON format
-l, --lang=curl|node show the CLI command in the specified language syntax
-o, --organization=organization (required) the slug of your organization
-u, --unformatted print unformatted JSON output
-x, --save=save save command output to file
--curl show the equivalent cURL command of the CLI command
--node show the equivalent Node SDK source code of the CLI command
ALIASES
$ cl-resources retrieve
$ cl-resources rr
$ cl-resources res:retrieve
EXAMPLES
$ commercelayer resources:retrieve customers/<customerId>
$ commercelayer retrieve customers <customerId>
$ cl res:retrieve customers <customerId>
$ clayer rr customers/<customerId>
See code: src/commands/resources/retrieve.ts
cl-resources resources:update RESOURCE [ID]
Update an existing resource.
USAGE
$ cl-resources resources:update RESOURCE [ID]
ARGUMENTS
RESOURCE the resource type
ID id of the resource to retrieve
OPTIONS
-D, --data=data the data file to use as request body
-D, --doc shows the CLI command in a specific language
-M, --metadata-replace=metadata-replace define a metadata attribute and replace every item already presente in the
remote resource
-O, --object=object define a resource object attribute
-R, --raw print out the raw API response
-a, --attribute=attribute define a resource attribute
-f, --fields=fields comma separeted list of fields in the format [resource]=field1,field2...
-i, --include=include comma separated resources to include
-j, --json convert output in standard JSON format
-l, --lang=curl|node show the CLI command in the specified language syntax
-m, --metadata=metadata define a metadata attribute and merge it with the metadata already present in
the remote resource
-o, --organization=organization (required) the slug of your organization
-r, --relationship=relationship define a relationship with another resource
-u, --unformatted print unformatted JSON output
--curl show the equivalent cURL command of the CLI command
--node show the equivalent Node SDK source code of the CLI command
ALIASES
$ cl-resources update
$ cl-resources ru
$ cl-resources res:update
$ cl-resources patch
EXAMPLES
$ commercelayer resources:update customers/<customerId> -a reference=referenceId
$ commercelayer res:update customers <customerId> -a reference_origin="Ref Origin"
$ cl update customers/<customerId> -m meta_key="meta value"
$ cl ru customers <customerId> -M mete_keu="metadata overwrite
$ clayer update customers <customerId> -D /path/to/data/file/data.json
See code: src/commands/resources/update.ts
FAQs
Commerce Layer CLI Resources plugin
The npm package @commercelayer/cli-plugin-resources receives a total of 48 weekly downloads. As such, @commercelayer/cli-plugin-resources popularity was classified as not popular.
We found that @commercelayer/cli-plugin-resources demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.