nebulab / solidus_client

Solidus eCommerce API Ruby client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ruby Solidus API client

Requirements

Installation

gem install solidus_client

Usage

Client class

Use SolidusClient:Client class

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 <order_number> <data>
 - ..

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. It is free software, and may be redistributed under the terms specified in the license.

About

Nebulab

Solidus API Client is funded and maintained by the Nebulab team.

We firmly believe in the power of open-source. Contact us if you like our work and you need help with your project design or development.

About

Solidus eCommerce API Ruby client

License:MIT License


Languages

Language:Ruby 100.0%