-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs for streams, fix sync stream and add tests
- Loading branch information
Showing
6 changed files
with
323 additions
and
22 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
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
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Streams management | ||
|
||
The streams management area offers commands that allow users to clone and get listing of streams, | ||
export or synchronize to/from Excel file. | ||
|
||
To access the group of commands related to the management of streams you must invoke the CLI with the `commerce stream` command: | ||
|
||
```sh | ||
$ ccli commerce stream | ||
|
||
Usage: ccli commerce [OPTIONS] COMMAND [ARGS]... | ||
|
||
Options: | ||
-h, --help Show this message and exit. | ||
|
||
Commands: | ||
clone Create a clone of a stream. | ||
export Export commerce billing or pricing streams. | ||
list List commerce billing and pricing streams. | ||
sync Synchronize a stream from an excel file. | ||
``` | ||
|
||
### Clone streams | ||
|
||
To clone existing stream you can run: | ||
|
||
```sh | ||
$ccli commerce stream clone [OPTIONS] stream_id | ||
``` | ||
|
||
``` | ||
Options: | ||
-d, --destination_account TEXT Destination account ID | ||
-n, --new-stream-name TEXT Cloned stream name | ||
-v, --validate Executes the validate action after the clone. | ||
``` | ||
|
||
### List streams | ||
|
||
To list available streams you can run: | ||
|
||
```sh | ||
$ ccli commerce stream list [OPTIONS] | ||
``` | ||
|
||
``` | ||
Options: | ||
-q, --query TEXT RQL query expression. | ||
``` | ||
|
||
### Export streams | ||
|
||
To export stream you can run: | ||
|
||
```sh | ||
$ ccli commerce stream export [OPTIONS] stream_id | ||
``` | ||
|
||
``` | ||
Options: | ||
-o, --out FILE Output Excel file name. | ||
-p, --output_path DIRECTORY Directory where to store the export. | ||
``` | ||
|
||
### Synchronize streams | ||
|
||
To synchronize a stream from an Excel file you can run: | ||
|
||
```sh | ||
$ ccli commerce stream sync input_file | ||
``` | ||
|
||
Structure of sync file can be taken from `tests/fixtures/commerce/stream_sync.xlsx` file. |
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
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
Oops, something went wrong.