Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koss-lebedev/brainshell
Console client for accessing Braintree payment gateway
https://github.com/koss-lebedev/brainshell
Last synced: 3 months ago
JSON representation
Console client for accessing Braintree payment gateway
- Host: GitHub
- URL: https://github.com/koss-lebedev/brainshell
- Owner: koss-lebedev
- Created: 2016-07-07T13:13:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-29T15:11:15.000Z (over 8 years ago)
- Last Synced: 2024-04-29T14:41:26.780Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Brainshell
Brainshell is a console interface to your Braintree account. To get started, simply install the gem and set
the following environment variables:export BRAINTREE_ENVIRONMENT=can be production or staging
export BRAINTREE_MERCHANT_ID=your Braintree merchant id
export BRAINTREE_PUBLIC_KEY=your Braintree public key
export BRAINTREE_PRIVATE_KEY=your Braintree private key## Installation
You can install it by running:
$ gem install brainshell
## Usage
For detailed description, run `brainshell help` and `brainshell command help`
Brainshell commands usually contain sub-command name, one or more filter options, and optional array of columns to
be rendered. By default, brainshell will print only IDs of matching objects.For example, to find active and pending
subscriptions with price in range between 100.0 and 200.0 you can use the following command:brainshell subscription query --price=10..300 --status=Active Pending --columns=id price status created_at
This command will print the result like this:
d6nbxr 300.0 Active 2016-06-26 10:24:55 UTC
2dh32m 30.0 Active 2016-05-02 14:39:01 UTC##Options values
There are three types of values that you can specify for options:
1. Text value
2. Range value
2. Multiple valueTo see which columns support which types of values, please refer to Braintree documentation.
Text values can be passed as simple string arguments. If value contains space, it should be enclosed in double quotes:--status=Active
--status="Past Due"Range values can have values of _equal_, _greater than_, _less than_, and _in range_ (inclusive):
--price=100.0
--price=gt100.0
--price=lt200.0
--price=100..200Multiple values are passed separated by whitespace:
--status=Active Pending