shipstation 0.15.5 → 0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/MIT-LICENSE +0 -0
- data/Rakefile +0 -0
- data/lib/shipstation.rb +12 -0
- data/lib/shipstation/api_operations/create.rb +0 -0
- data/lib/shipstation/api_operations/delete.rb +0 -0
- data/lib/shipstation/api_operations/list.rb +0 -0
- data/lib/shipstation/api_operations/retrieve.rb +0 -0
- data/lib/shipstation/api_operations/update.rb +0 -0
- data/lib/shipstation/api_resource.rb +0 -0
- data/lib/shipstation/carrier.rb +3 -2
- data/lib/shipstation/customer.rb +0 -0
- data/lib/shipstation/order.rb +6 -0
- data/lib/shipstation/product.rb +0 -0
- data/lib/shipstation/shipment.rb +9 -3
- data/lib/shipstation/store.rb +1 -0
- data/lib/shipstation/tag.rb +0 -0
- data/lib/shipstation/version.rb +1 -1
- data/lib/shipstation/warehouse.rb +0 -0
- data/lib/tasks/shipstation_tasks.rake +0 -0
- data/test/dummy/Gemfile +0 -0
- data/test/dummy/Gemfile.lock +3 -3
- data/test/dummy/README.rdoc +0 -0
- data/test/dummy/Rakefile +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +0 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -0
- data/test/dummy/app/helpers/application_helper.rb +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +0 -0
- data/test/dummy/config.ru +0 -0
- data/test/dummy/config/application.rb +0 -0
- data/test/dummy/config/boot.rb +0 -0
- data/test/dummy/config/database.yml +0 -0
- data/test/dummy/config/environment.rb +0 -0
- data/test/dummy/config/environments/development.rb +0 -0
- data/test/dummy/config/environments/production.rb +0 -0
- data/test/dummy/config/environments/test.rb +0 -0
- data/test/dummy/config/initializers/assets.rb +0 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -0
- data/test/dummy/config/initializers/inflections.rb +0 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -0
- data/test/dummy/config/initializers/session_store.rb +0 -0
- data/test/dummy/config/initializers/shipstation.rb +0 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/test/dummy/config/locales/en.yml +0 -0
- data/test/dummy/config/routes.rb +0 -0
- data/test/dummy/config/secrets.yml +0 -0
- data/test/dummy/db/seeds.rb +0 -0
- data/test/dummy/public/404.html +0 -0
- data/test/dummy/public/422.html +0 -0
- data/test/dummy/public/500.html +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/robots.txt +0 -0
- data/test/dummy/test/test_helper.rb +0 -0
- data/test/shipstation_test.rb +0 -0
- data/test/test_helper.rb +0 -0
- metadata +27 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 58f733c344f7ae035c706b07ccb5c88c906b6054cf2ab8fffab1dafd06831c40
|
4
|
+
data.tar.gz: 174afa229e3b821a37519af245f8a27217c0f32c8f4f7cedb3e57701b13f6494
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eff1093b4836b8bfd540b3162043caebc25c1c0a821e7d80874e2e8329873e9c335623568ebfa14f818a4bc7d9a1105f1d733de7e0cd8a0327db39e80e0234e
|
7
|
+
data.tar.gz: 33dcd18eb2fd5588b9abbc2058bf0f865a9e71220fea76307c8d53c01de6476dd20fd9d9219afe6d70f098f0dc97751e4907411efdf59329d62551d517c5eb9d
|
data/MIT-LICENSE
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/lib/shipstation.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rest-client'
|
2
4
|
|
3
5
|
require 'shipstation/api_operations/list'
|
@@ -17,6 +19,7 @@ require 'shipstation/product'
|
|
17
19
|
require 'shipstation/tag'
|
18
20
|
|
19
21
|
module Shipstation
|
22
|
+
|
20
23
|
API_BASE = "https://ssapi.shipstation.com/"
|
21
24
|
|
22
25
|
class ShipstationError < StandardError
|
@@ -26,6 +29,15 @@ module Shipstation
|
|
26
29
|
end
|
27
30
|
class ConfigurationError < ShipstationError;
|
28
31
|
end
|
32
|
+
class ApiRequestError < ShipstationError
|
33
|
+
attr_reader :response_code, :response_headers, :response_body
|
34
|
+
|
35
|
+
def initialize(response_code:, response_headers:, response_body:)
|
36
|
+
@response_code = response_code
|
37
|
+
@response_headers = response_headers
|
38
|
+
@response_body = response_body
|
39
|
+
end
|
40
|
+
end
|
29
41
|
|
30
42
|
class << self
|
31
43
|
def username
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/shipstation/carrier.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
module Shipstation
|
2
2
|
class Carrier < ApiResource
|
3
|
+
extend Shipstation::APIOperations::List
|
3
4
|
|
4
5
|
class << self
|
5
|
-
def
|
6
|
-
response = Shipstation.request(:get, 'carriers')
|
6
|
+
def list_services(params = {})
|
7
|
+
response = Shipstation.request(:get, 'carriers/listservices', params)
|
7
8
|
return response
|
8
9
|
end
|
9
10
|
end
|
data/lib/shipstation/customer.rb
CHANGED
File without changes
|
data/lib/shipstation/order.rb
CHANGED
@@ -26,6 +26,12 @@ module Shipstation
|
|
26
26
|
response
|
27
27
|
end
|
28
28
|
|
29
|
+
def create_bulk(params = {})
|
30
|
+
response = Shipstation.request(:post, 'orders/createorders', params)
|
31
|
+
|
32
|
+
response
|
33
|
+
end
|
34
|
+
|
29
35
|
# params: { [:username], [:password], input: [ {:order_number, ... }, { :order_number, ... } ] }
|
30
36
|
# todo: complete in future phase
|
31
37
|
# def create_update_orders params
|
data/lib/shipstation/product.rb
CHANGED
File without changes
|
data/lib/shipstation/shipment.rb
CHANGED
@@ -3,10 +3,16 @@ module Shipstation
|
|
3
3
|
extend Shipstation::APIOperations::List
|
4
4
|
|
5
5
|
class << self
|
6
|
-
def get_rates
|
7
|
-
|
6
|
+
def get_rates(params = {})
|
7
|
+
Shipstation.request(:post, "shipments/getrates", params)
|
8
|
+
end
|
9
|
+
|
10
|
+
def create_label(params = {})
|
11
|
+
Shipstation.request(:post, 'shipments/createlabel', params)
|
12
|
+
end
|
8
13
|
|
9
|
-
|
14
|
+
def void_label(params = {})
|
15
|
+
Shipstation.request(:post, 'shipments/voidlabel', params)
|
10
16
|
end
|
11
17
|
end
|
12
18
|
end
|
data/lib/shipstation/store.rb
CHANGED
data/lib/shipstation/tag.rb
CHANGED
File without changes
|
data/lib/shipstation/version.rb
CHANGED
File without changes
|
File without changes
|
data/test/dummy/Gemfile
CHANGED
File without changes
|
data/test/dummy/Gemfile.lock
CHANGED
@@ -79,12 +79,12 @@ GEM
|
|
79
79
|
mime-types-data (~> 3.2015)
|
80
80
|
mime-types-data (3.2018.0812)
|
81
81
|
mini_mime (1.0.1)
|
82
|
-
mini_portile2 (2.
|
82
|
+
mini_portile2 (2.4.0)
|
83
83
|
minitest (5.11.3)
|
84
84
|
multi_json (1.13.1)
|
85
85
|
netrc (0.11.0)
|
86
|
-
nokogiri (1.
|
87
|
-
mini_portile2 (~> 2.
|
86
|
+
nokogiri (1.10.4)
|
87
|
+
mini_portile2 (~> 2.4.0)
|
88
88
|
rack (1.6.10)
|
89
89
|
rack-test (0.6.3)
|
90
90
|
rack (>= 1.0)
|
data/test/dummy/README.rdoc
CHANGED
File without changes
|
data/test/dummy/Rakefile
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/dummy/config.ru
CHANGED
File without changes
|
File without changes
|
data/test/dummy/config/boot.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/dummy/config/routes.rb
CHANGED
File without changes
|
File without changes
|
data/test/dummy/db/seeds.rb
CHANGED
File without changes
|
data/test/dummy/public/404.html
CHANGED
File without changes
|
data/test/dummy/public/422.html
CHANGED
File without changes
|
data/test/dummy/public/500.html
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/shipstation_test.rb
CHANGED
File without changes
|
data/test/test_helper.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipstation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.20'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Dallimore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -112,52 +112,51 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
|
-
|
116
|
-
rubygems_version: 2.5.1
|
115
|
+
rubygems_version: 3.1.2
|
117
116
|
signing_key:
|
118
117
|
specification_version: 4
|
119
118
|
summary: A Ruby wrapper for the Shipstation API
|
120
119
|
test_files:
|
121
|
-
- test/dummy/app/controllers/application_controller.rb
|
122
|
-
- test/dummy/app/views/layouts/application.html.erb
|
123
120
|
- test/dummy/app/assets/javascripts/application.js
|
124
121
|
- test/dummy/app/assets/stylesheets/application.css
|
122
|
+
- test/dummy/app/controllers/application_controller.rb
|
125
123
|
- test/dummy/app/helpers/application_helper.rb
|
126
|
-
- test/dummy/
|
124
|
+
- test/dummy/app/views/layouts/application.html.erb
|
125
|
+
- test/dummy/bin/bundle
|
126
|
+
- test/dummy/bin/rails
|
127
127
|
- test/dummy/bin/rake
|
128
128
|
- test/dummy/bin/setup
|
129
|
-
- test/dummy/bin/bundle
|
130
129
|
- test/dummy/bin/spring
|
131
|
-
- test/dummy/bin/rails
|
132
|
-
- test/dummy/config/secrets.yml
|
133
|
-
- test/dummy/config/routes.rb
|
134
|
-
- test/dummy/config/locales/en.yml
|
135
|
-
- test/dummy/config/environments/production.rb
|
136
|
-
- test/dummy/config/environments/development.rb
|
137
|
-
- test/dummy/config/environments/test.rb
|
138
|
-
- test/dummy/config/environment.rb
|
139
130
|
- test/dummy/config/application.rb
|
140
|
-
- test/dummy/config/database.yml
|
141
131
|
- test/dummy/config/boot.rb
|
132
|
+
- test/dummy/config/database.yml
|
133
|
+
- test/dummy/config/environment.rb
|
134
|
+
- test/dummy/config/environments/development.rb
|
135
|
+
- test/dummy/config/environments/production.rb
|
136
|
+
- test/dummy/config/environments/test.rb
|
137
|
+
- test/dummy/config/initializers/assets.rb
|
142
138
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
143
|
-
- test/dummy/config/initializers/
|
139
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
144
140
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
141
|
+
- test/dummy/config/initializers/inflections.rb
|
142
|
+
- test/dummy/config/initializers/mime_types.rb
|
145
143
|
- test/dummy/config/initializers/session_store.rb
|
146
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
147
|
-
- test/dummy/config/initializers/assets.rb
|
148
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
149
144
|
- test/dummy/config/initializers/shipstation.rb
|
150
|
-
- test/dummy/config/initializers/
|
145
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
146
|
+
- test/dummy/config/locales/en.yml
|
147
|
+
- test/dummy/config/routes.rb
|
148
|
+
- test/dummy/config/secrets.yml
|
151
149
|
- test/dummy/config.ru
|
152
|
-
- test/dummy/Rakefile
|
153
|
-
- test/dummy/public/favicon.ico
|
154
|
-
- test/dummy/public/422.html
|
155
|
-
- test/dummy/public/500.html
|
156
|
-
- test/dummy/public/404.html
|
157
|
-
- test/dummy/public/robots.txt
|
158
150
|
- test/dummy/db/seeds.rb
|
159
151
|
- test/dummy/Gemfile
|
160
152
|
- test/dummy/Gemfile.lock
|
153
|
+
- test/dummy/public/404.html
|
154
|
+
- test/dummy/public/422.html
|
155
|
+
- test/dummy/public/500.html
|
156
|
+
- test/dummy/public/favicon.ico
|
157
|
+
- test/dummy/public/robots.txt
|
158
|
+
- test/dummy/Rakefile
|
161
159
|
- test/dummy/README.rdoc
|
160
|
+
- test/dummy/test/test_helper.rb
|
162
161
|
- test/shipstation_test.rb
|
163
162
|
- test/test_helper.rb
|