extensiv_ruby 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +10 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +79 -0
- data/Rakefile +8 -0
- data/extensiv.gemspec +35 -0
- data/lib/extensiv/cart/cart_inventory.rb +14 -0
- data/lib/extensiv/cart/cart_order.rb +34 -0
- data/lib/extensiv/cart/cart_product.rb +9 -0
- data/lib/extensiv/cart/cart_ship_method.rb +10 -0
- data/lib/extensiv/cart_client.rb +21 -0
- data/lib/extensiv/client.rb +30 -0
- data/lib/extensiv/collection.rb +34 -0
- data/lib/extensiv/error.rb +5 -0
- data/lib/extensiv/object.rb +21 -0
- data/lib/extensiv/objects/inventory.rb +6 -0
- data/lib/extensiv/objects/order.rb +6 -0
- data/lib/extensiv/objects/order_status.rb +9 -0
- data/lib/extensiv/objects/product.rb +6 -0
- data/lib/extensiv/objects/response.rb +6 -0
- data/lib/extensiv/objects/ship_method.rb +6 -0
- data/lib/extensiv/resource.rb +36 -0
- data/lib/extensiv/version.rb +5 -0
- data/lib/extensiv.rb +24 -0
- data/sig/extensiv.rbs +4 -0
- metadata +85 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a847e79d4e00e8acb3cbf6671f46b1521a054bfe71d30974d315a0e2a9b8b5c7
|
4
|
+
data.tar.gz: ead4500e2cac7dcc76a3ea77205c2c40f4ab8e82d2ff8c84ee2df256f2a69503
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: de816b042f61612fbd8ff702c57be2a59fbe547e2a1e792e070deb0f459f6ae7ec7b666a293b945e61ef2c06bbae57327dc5e7a381f3bfe5a918c02a8a12edc1
|
7
|
+
data.tar.gz: 6ed312d3e82dd11dad4eaa67fd18a1c841d4e3bd0de65d49bb7bc7ccef9d3649e7b26324d84f2faf6dce06787b2bd472606ddb23929499025324ea9e253cac5f
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at nathan@nathan.la. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 Nathan Williams
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# Extensiv API Rubygem
|
2
|
+
|
3
|
+
[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)
|
4
|
+
|
5
|
+
A friendly ruby interface to the Extensiv/CartRover API.
|
6
|
+
|
7
|
+
CartRover's API has four different levels. Cart, Merchant, Warehouse, and Master. This gem currently offers access to the Cart API only.
|
8
|
+
|
9
|
+
API documentation is available at https://developers.cartrover.com/
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
gem "extensiv_ruby"
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install extensiv_ruby
|
24
|
+
|
25
|
+
## Cart API
|
26
|
+
|
27
|
+
To access the API, you'll need to create a `Extensiv::CartClient` and pass in your api_user and api_key.
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
client = Extensiv::CartClient.new(api_user: ENV["CARTROVER_API_USER"], api_key: ENV["CARTROVER_API_KEY"])
|
31
|
+
```
|
32
|
+
#### Orders
|
33
|
+
```ruby
|
34
|
+
client.order.retrieve(cust_ref: "ref")
|
35
|
+
#=> Extensiv::Order
|
36
|
+
|
37
|
+
client.order.status(cust_ref: "ref")
|
38
|
+
#=> Extensiv::OrderStatus
|
39
|
+
|
40
|
+
# Possible order statuses: new, at_wms, shipped, confirmed, error, canceled, new_or_at_wms, shipped_or_confirmed, any
|
41
|
+
client.order.list(status: "ref", {limit: 20})
|
42
|
+
#=> Extensiv::Collection
|
43
|
+
|
44
|
+
client.order.create({})
|
45
|
+
#=> Extensiv::Response
|
46
|
+
|
47
|
+
client.order.batch_create([{}])
|
48
|
+
#=> Extensiv::Response
|
49
|
+
|
50
|
+
client.order.cancel(cust_ref: "ref")
|
51
|
+
#=> Extensiv::Response
|
52
|
+
|
53
|
+
client.order.update_status_confirmed(cust_ref: "ref", {})
|
54
|
+
#=> Extensiv::Response
|
55
|
+
```
|
56
|
+
#### Inventory
|
57
|
+
```ruby
|
58
|
+
client.inventory.list({})
|
59
|
+
#=> Extensiv::Collection
|
60
|
+
|
61
|
+
client.inventory.retrieve(sku: "sku_id")
|
62
|
+
#=> Extensiv::Inventory
|
63
|
+
```
|
64
|
+
|
65
|
+
#### Product
|
66
|
+
```ruby
|
67
|
+
client.product.info(sku: "sku_id")
|
68
|
+
#=> Extensiv::Product
|
69
|
+
```
|
70
|
+
#### Shipping Methods
|
71
|
+
```ruby
|
72
|
+
client.ship_methods.list({})
|
73
|
+
#=> Extensiv::Collection
|
74
|
+
```
|
75
|
+
|
76
|
+
## Copyright
|
77
|
+
|
78
|
+
Copyright (c) 2024 Nathan Williams. See [LICENSE.txt](LICENSE.txt) for
|
79
|
+
further details.
|
data/Rakefile
ADDED
data/extensiv.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/extensiv/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "extensiv_ruby"
|
7
|
+
spec.version = Extensiv::VERSION
|
8
|
+
spec.authors = ["Nathan Williams"]
|
9
|
+
spec.email = ["nathan@nathan.la"]
|
10
|
+
spec.summary = "Provides a Ruby wrapper for the CartRover API"
|
11
|
+
spec.description = "A Ruby interface to the CartRover / Extensiv Integration Manager API."
|
12
|
+
spec.homepage = "https://github.com/narch/extensiv_ruby"
|
13
|
+
spec.required_ruby_version = ">= 2.6.0"
|
14
|
+
spec.licenses = ['MIT']
|
15
|
+
|
16
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
# spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
|
20
|
+
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(__dir__) do
|
25
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
(File.expand_path(f) == __FILE__) ||
|
27
|
+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
|
28
|
+
end
|
29
|
+
end
|
30
|
+
spec.bindir = "exe"
|
31
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ["lib"]
|
33
|
+
|
34
|
+
spec.add_dependency "faraday", "~> 2.7"
|
35
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Extensiv
|
4
|
+
class CartInventory < Resource
|
5
|
+
def list(**params)
|
6
|
+
response = get_request("merchant/inventory", params: params)
|
7
|
+
Collection.from_response(response, type: Inventory, params: params)
|
8
|
+
end
|
9
|
+
|
10
|
+
def retrieve(sku:)
|
11
|
+
Inventory.new get_request("merchant/inventory/#{sku}").body["response"]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Extensiv
|
4
|
+
class CartOrder < Resource
|
5
|
+
def retrieve(cust_ref:)
|
6
|
+
Order.new get_request("cart/orders/#{cust_ref}").body["response"]
|
7
|
+
end
|
8
|
+
|
9
|
+
def status(cust_ref:)
|
10
|
+
OrderStatus.new get_request("cart/orders/status/#{cust_ref}").body["response"]
|
11
|
+
end
|
12
|
+
|
13
|
+
def list(status:, **params)
|
14
|
+
response = get_request("cart/orders/list/#{status}", params: params)
|
15
|
+
Collection.from_response(response, type: Order, params: params)
|
16
|
+
end
|
17
|
+
|
18
|
+
def create(**attributes)
|
19
|
+
Response.new post_request("cart/orders/cartrover", body: attributes).body
|
20
|
+
end
|
21
|
+
|
22
|
+
def batch_create(*attributes)
|
23
|
+
Response.new post_request("cart/orders/batch", body: attributes).body["response"]
|
24
|
+
end
|
25
|
+
|
26
|
+
def cancel(cust_ref:)
|
27
|
+
Response.new get_request("cart/orders/wms_cancel/#{cust_ref}").body["response"]
|
28
|
+
end
|
29
|
+
|
30
|
+
def update_status_confirmed(cust_ref:, **attributes)
|
31
|
+
Response.new post_request("cart/orders/update/#{cust_ref}", body: attributes).body
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Extensiv
|
4
|
+
class CartClient < Client
|
5
|
+
def inventory
|
6
|
+
CartInventory.new(self)
|
7
|
+
end
|
8
|
+
|
9
|
+
def order
|
10
|
+
CartOrder.new(self)
|
11
|
+
end
|
12
|
+
|
13
|
+
def product
|
14
|
+
CartProduct.new(self)
|
15
|
+
end
|
16
|
+
|
17
|
+
def ship_method
|
18
|
+
CartShipMethod.new(self)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "faraday"
|
4
|
+
require "base64"
|
5
|
+
|
6
|
+
module Extensiv
|
7
|
+
class Client
|
8
|
+
BASE_URL = "https://api.cartrover.com/v1/"
|
9
|
+
|
10
|
+
attr_reader :api_user, :api_key, :adapter, :stubs, :auth_key
|
11
|
+
|
12
|
+
def initialize(api_user:, api_key:, adapter: Faraday.default_adapter, stubs: nil)
|
13
|
+
@api_user = api_user
|
14
|
+
@api_key = api_key
|
15
|
+
@adapter = adapter
|
16
|
+
@stubs = stubs
|
17
|
+
@auth_key = Base64.strict_encode64("#{@api_user}:#{@api_key}")
|
18
|
+
end
|
19
|
+
|
20
|
+
def connection
|
21
|
+
@connection ||= Faraday.new do |conn|
|
22
|
+
conn.url_prefix = BASE_URL
|
23
|
+
conn.headers = { Authorization: "Basic #{@auth_key}" }
|
24
|
+
conn.request :json
|
25
|
+
conn.response :json, content_type: "application/json"
|
26
|
+
conn.adapter adapter, @stubs
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Extensiv
|
4
|
+
class Collection
|
5
|
+
attr_reader :data, :next_page, :prev_page
|
6
|
+
|
7
|
+
def self.from_response(response, type:, params: nil)
|
8
|
+
body = response.body
|
9
|
+
new(
|
10
|
+
data: body["response"].map { |attrs| type.new(attrs) },
|
11
|
+
next_page: params.empty? ? 2 : next_page(params),
|
12
|
+
prev_page: params.empty? ? nil : prev_page(params)
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
def initialize(data:, next_page:, prev_page:)
|
17
|
+
@data = data
|
18
|
+
@next_page = next_page
|
19
|
+
@prev_page = prev_page
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.next_page(params)
|
23
|
+
return @next_page = params[:page].to_i + 1 if params[:page].present? && params[:page].to_i >= 1
|
24
|
+
|
25
|
+
@next_page = 2
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.prev_page(params)
|
29
|
+
return @prev_page = params[:page].to_i - 1 if params[:page].present? && params[:page].to_i > 1
|
30
|
+
|
31
|
+
@prev_page = nil
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
|
5
|
+
module Extensiv
|
6
|
+
class Object < OpenStruct
|
7
|
+
def initialize(attributes)
|
8
|
+
super to_ostruct(attributes)
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_ostruct(obj)
|
12
|
+
if obj.is_a?(Hash)
|
13
|
+
OpenStruct.new(obj.transform_values { |val| to_ostruct(val) })
|
14
|
+
elsif obj.is_a?(Array)
|
15
|
+
obj.map { |o| to_ostruct(o) }
|
16
|
+
else # Assumed to be a primitive value
|
17
|
+
obj
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Extensiv
|
4
|
+
class Resource
|
5
|
+
attr_reader :client
|
6
|
+
|
7
|
+
def initialize(client)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
# CartRover's API only supports GET and POST requests
|
14
|
+
|
15
|
+
def get_request(url, params: {}, headers: {})
|
16
|
+
handle_response client.connection.get(url, params, headers)
|
17
|
+
end
|
18
|
+
|
19
|
+
def post_request(url, body:, headers: {})
|
20
|
+
handle_response client.connection.post(url, body, headers)
|
21
|
+
end
|
22
|
+
|
23
|
+
# CartRover's API uses a 200 status for all request
|
24
|
+
# unless there is a server-side error
|
25
|
+
|
26
|
+
def handle_response(response)
|
27
|
+
if response.status != 200
|
28
|
+
raise Error, "We were unable to perform the request due to server-side problems."
|
29
|
+
elsif response.body["success_code"] == false
|
30
|
+
raise Error, response.body["message"]
|
31
|
+
end
|
32
|
+
|
33
|
+
response
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/extensiv.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "extensiv/version"
|
4
|
+
|
5
|
+
module Extensiv
|
6
|
+
autoload :Client, "extensiv/client"
|
7
|
+
autoload :Resource, "extensiv/resource"
|
8
|
+
autoload :Collection, "extensiv/collection"
|
9
|
+
autoload :CartClient, "extensiv/cart_client"
|
10
|
+
autoload :CartInventory, "extensiv/cart/cart_inventory"
|
11
|
+
autoload :CartOrder, "extensiv/cart/cart_order"
|
12
|
+
autoload :CartProduct, "extensiv/cart/cart_product"
|
13
|
+
autoload :CartShipMethod, "extensiv/cart/cart_ship_method"
|
14
|
+
autoload :Error, "extensiv/error"
|
15
|
+
|
16
|
+
# Object Classes
|
17
|
+
autoload :Object, "extensiv/object"
|
18
|
+
autoload :Order, "extensiv/objects/order"
|
19
|
+
autoload :OrderStatus, "extensiv/objects/order_status"
|
20
|
+
autoload :Inventory, "extensiv/objects/inventory"
|
21
|
+
autoload :Product, "extensiv/objects/product"
|
22
|
+
autoload :ShipMethod, "extensiv/objects/ship_method"
|
23
|
+
autoload :Response, "extensiv/objects/response" # for generic responses
|
24
|
+
end
|
data/sig/extensiv.rbs
ADDED
metadata
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: extensiv_ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nathan Williams
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-02-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.7'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.7'
|
27
|
+
description: A Ruby interface to the CartRover / Extensiv Integration Manager API.
|
28
|
+
email:
|
29
|
+
- nathan@nathan.la
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".rspec"
|
35
|
+
- ".rubocop.yml"
|
36
|
+
- CHANGELOG.md
|
37
|
+
- CODE_OF_CONDUCT.md
|
38
|
+
- LICENSE.txt
|
39
|
+
- README.md
|
40
|
+
- Rakefile
|
41
|
+
- extensiv.gemspec
|
42
|
+
- lib/extensiv.rb
|
43
|
+
- lib/extensiv/cart/cart_inventory.rb
|
44
|
+
- lib/extensiv/cart/cart_order.rb
|
45
|
+
- lib/extensiv/cart/cart_product.rb
|
46
|
+
- lib/extensiv/cart/cart_ship_method.rb
|
47
|
+
- lib/extensiv/cart_client.rb
|
48
|
+
- lib/extensiv/client.rb
|
49
|
+
- lib/extensiv/collection.rb
|
50
|
+
- lib/extensiv/error.rb
|
51
|
+
- lib/extensiv/object.rb
|
52
|
+
- lib/extensiv/objects/inventory.rb
|
53
|
+
- lib/extensiv/objects/order.rb
|
54
|
+
- lib/extensiv/objects/order_status.rb
|
55
|
+
- lib/extensiv/objects/product.rb
|
56
|
+
- lib/extensiv/objects/response.rb
|
57
|
+
- lib/extensiv/objects/ship_method.rb
|
58
|
+
- lib/extensiv/resource.rb
|
59
|
+
- lib/extensiv/version.rb
|
60
|
+
- sig/extensiv.rbs
|
61
|
+
homepage: https://github.com/narch/extensiv_ruby
|
62
|
+
licenses:
|
63
|
+
- MIT
|
64
|
+
metadata:
|
65
|
+
homepage_uri: https://github.com/narch/extensiv_ruby
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 2.6.0
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
requirements: []
|
81
|
+
rubygems_version: 3.4.10
|
82
|
+
signing_key:
|
83
|
+
specification_version: 4
|
84
|
+
summary: Provides a Ruby wrapper for the CartRover API
|
85
|
+
test_files: []
|