shipstation 0.18 → 0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shipstation.rb +1 -7
- data/lib/shipstation/api_operations/create.rb +1 -1
- data/lib/shipstation/api_operations/delete.rb +1 -1
- data/lib/shipstation/api_operations/list.rb +1 -1
- data/lib/shipstation/api_operations/retrieve.rb +1 -1
- data/lib/shipstation/api_operations/shipment.rb +10 -0
- data/lib/shipstation/api_operations/update.rb +1 -1
- data/lib/shipstation/order.rb +1 -0
- data/lib/shipstation/store.rb +3 -2
- data/lib/shipstation/tag.rb +2 -2
- data/lib/shipstation/version.rb +1 -1
- data/lib/shipstation/warehouse.rb +2 -2
- data/lib/shipstation/webhook.rb +19 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0aba62664ac94a7b877dc17b23ec945a9362842c63aa86c3fb53462a39a470a
|
4
|
+
data.tar.gz: 36a4ad1f1111b69400291380763ca72f475aabaea626bff121a78e83ed63745b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d58fd3bcdc6ee377a97a9778c3d8fb17cbefad561c706d3433ed6c1857bde33ca4829adcb838d90041efb032a90910fe9301406b725edb2d35fc51cc909417d
|
7
|
+
data.tar.gz: 4d838bd1521f561cdf77d8e6c4d3423b39761228780052b3d3238ded4aca1a6f3a636d3eba81a1c41d576b3e002750d62153f1a35b1b09a715b030a18700fbf5
|
data/lib/shipstation.rb
CHANGED
@@ -17,6 +17,7 @@ require 'shipstation/store'
|
|
17
17
|
require 'shipstation/warehouse'
|
18
18
|
require 'shipstation/product'
|
19
19
|
require 'shipstation/tag'
|
20
|
+
require 'shipstation/webhook'
|
20
21
|
|
21
22
|
module Shipstation
|
22
23
|
|
@@ -83,13 +84,6 @@ module Shipstation
|
|
83
84
|
payload: payload ? payload.to_json : nil,
|
84
85
|
headers: headers
|
85
86
|
}).execute do |response, request, result|
|
86
|
-
if response.code != 200
|
87
|
-
raise ApiRequestError.new(
|
88
|
-
response_code: response.code,
|
89
|
-
response_headers: response.headers,
|
90
|
-
response_body: response.to_str
|
91
|
-
)
|
92
|
-
end
|
93
87
|
str_response = response.to_str
|
94
88
|
str_response.blank? ? '' : JSON.parse(str_response)
|
95
89
|
end
|
data/lib/shipstation/order.rb
CHANGED
data/lib/shipstation/store.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
module Shipstation
|
2
2
|
class Store < ApiResource
|
3
|
+
extend Shipstation::APIOperations::List
|
3
4
|
extend Shipstation::APIOperations::Retrieve
|
4
5
|
extend Shipstation::APIOperations::Update
|
5
6
|
|
6
7
|
class << self
|
7
|
-
def list
|
8
|
-
response = Shipstation.request(:get, 'stores')
|
8
|
+
def list(params = {})
|
9
|
+
response = Shipstation.request(:get, 'stores', params)
|
9
10
|
|
10
11
|
return response
|
11
12
|
end
|
data/lib/shipstation/tag.rb
CHANGED
data/lib/shipstation/version.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
module Shipstation
|
2
|
+
class Webhook < ApiResource
|
3
|
+
extend Shipstation::APIOperations::List
|
4
|
+
|
5
|
+
class << self
|
6
|
+
def subscribe(params={})
|
7
|
+
response = Shipstation.request(:post, 'webhooks/subscribe', params)
|
8
|
+
|
9
|
+
return response
|
10
|
+
end
|
11
|
+
|
12
|
+
def unsubscribe(object_id, params={})
|
13
|
+
response = Shipstation.request(:delete, "webhooks/#{object_id}", params)
|
14
|
+
|
15
|
+
return response
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
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.24'
|
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-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -38,6 +38,7 @@ files:
|
|
38
38
|
- lib/shipstation/api_operations/delete.rb
|
39
39
|
- lib/shipstation/api_operations/list.rb
|
40
40
|
- lib/shipstation/api_operations/retrieve.rb
|
41
|
+
- lib/shipstation/api_operations/shipment.rb
|
41
42
|
- lib/shipstation/api_operations/update.rb
|
42
43
|
- lib/shipstation/api_resource.rb
|
43
44
|
- lib/shipstation/carrier.rb
|
@@ -49,6 +50,7 @@ files:
|
|
49
50
|
- lib/shipstation/tag.rb
|
50
51
|
- lib/shipstation/version.rb
|
51
52
|
- lib/shipstation/warehouse.rb
|
53
|
+
- lib/shipstation/webhook.rb
|
52
54
|
- lib/tasks/shipstation_tasks.rake
|
53
55
|
- test/dummy/Gemfile
|
54
56
|
- test/dummy/Gemfile.lock
|
@@ -112,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
114
|
- !ruby/object:Gem::Version
|
113
115
|
version: '0'
|
114
116
|
requirements: []
|
115
|
-
rubygems_version: 3.
|
117
|
+
rubygems_version: 3.2.15
|
116
118
|
signing_key:
|
117
119
|
specification_version: 4
|
118
120
|
summary: A Ruby wrapper for the Shipstation API
|