https://github.com/nebulab/solidus_client
Solidus eCommerce API Ruby client
https://github.com/nebulab/solidus_client
ecommerce ruby solidus
Last synced: 10 months ago
JSON representation
Solidus eCommerce API Ruby client
- Host: GitHub
- URL: https://github.com/nebulab/solidus_client
- Owner: nebulab
- License: mit
- Created: 2019-12-24T11:01:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-15T10:18:55.000Z (over 6 years ago)
- Last Synced: 2025-05-14T17:05:45.093Z (12 months ago)
- Topics: ecommerce, ruby, solidus
- Language: Ruby
- Size: 10.7 KB
- Stars: 5
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Ruby Solidus API client
## Requirements
* [MRI 2.3+](https://www.ruby-lang.org/en/downloads)
* [Solidus 2.9+](https://solidus.io) with [Solidus Auth (Devise)](https://github.com/solidusio/solidus_auth_devise)
## Installation
```
gem install solidus_client
```
## Usage
### Client class
Use `SolidusClient:Client` class
```ruby
require 'solidus_client/client'
client = SolidusClient::Client.new(url: 'app url', api_key: 'user api key')
item_data_hash = { ... }
response_hash = client.add_item(order_number, item_data_hash)
```
### Command line
Run `solidus` command
```
$ solidus -h
Usage: solidus [options] command [target] [JSON data]
Commands:
- add_item
- ..
Options:
-u, --url Solidus URL
-k, --key Solidus API key
-t, --token Solidus guest token
```
## Development
Install dependencies
```
bundle install
```
Export required environment Variables
```
export SOLIDUS_API_KEY=your API key
export SOLIDUS_URL=Solidus endpoint
```
Run specs
**WARNING:** `checkout_spec.rb` requires a running Solidus instance and writes Product and Order data to it
```
bundle exec rake spec
```
## License
Copyright © 2019 [Nebulab](https://nebulab.it/).
It is free software, and may be redistributed under the terms specified in the [license](LICENSE.txt).
## About

Solidus API Client is funded and maintained by the [Nebulab](http://nebulab.it/) team.
We firmly believe in the power of open-source. [Contact us](https://nebulab.it/contact-us/) if you like our work and you need help with your project design or development.