shipstation 0.20 → 0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58f733c344f7ae035c706b07ccb5c88c906b6054cf2ab8fffab1dafd06831c40
4
- data.tar.gz: 174afa229e3b821a37519af245f8a27217c0f32c8f4f7cedb3e57701b13f6494
3
+ metadata.gz: f332f2b5e19faf23d1e031965ca6433f6f29ff1d65b137f45be10e0c99b4e0e6
4
+ data.tar.gz: d11ba1d6c473bc18cc0151c0c095165f88b424ba2deb75c02d9afe506d0ae27d
5
5
  SHA512:
6
- metadata.gz: 4eff1093b4836b8bfd540b3162043caebc25c1c0a821e7d80874e2e8329873e9c335623568ebfa14f818a4bc7d9a1105f1d733de7e0cd8a0327db39e80e0234e
7
- data.tar.gz: 33dcd18eb2fd5588b9abbc2058bf0f865a9e71220fea76307c8d53c01de6476dd20fd9d9219afe6d70f098f0dc97751e4907411efdf59329d62551d517c5eb9d
6
+ metadata.gz: 85003a9637e7534d28929848f7581689dcff44db175cc2f47c54d123d27a19f2b8dd650e899e4bc141bdd1db7f5aecc1ec0d17b001d47d35a56c9fe18151447b
7
+ data.tar.gz: 9e8ad73887251a097758a5b80183cf6e33b02e6cca4dd31ebf8d1c872cbf200d0f199d3778d96ae601205c3b5c8ddf5ff729ce4d8bd3116cb908f6ee323bd412
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
 
@@ -1,3 +1,3 @@
1
1
  module Shipstation
2
- VERSION = "0.20"
2
+ VERSION = "0.21"
3
3
  end
@@ -0,0 +1,18 @@
1
+ module Shipstation
2
+ class Webhook < ApiResource
3
+
4
+ class << self
5
+ def subscribe(params={})
6
+ response = Shipstation.request(:post, 'webhooks/subscribe', params)
7
+
8
+ return response
9
+ end
10
+
11
+ def unsubscribe(object_id)
12
+ response = Shipstation.request(:delete, "webhooks/#{object_id}")
13
+
14
+ return response
15
+ end
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shipstation
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.20'
4
+ version: '0.21'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Dallimore
@@ -49,6 +49,7 @@ files:
49
49
  - lib/shipstation/tag.rb
50
50
  - lib/shipstation/version.rb
51
51
  - lib/shipstation/warehouse.rb
52
+ - lib/shipstation/webhook.rb
52
53
  - lib/tasks/shipstation_tasks.rake
53
54
  - test/dummy/Gemfile
54
55
  - test/dummy/Gemfile.lock
@@ -112,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
113
  - !ruby/object:Gem::Version
113
114
  version: '0'
114
115
  requirements: []
115
- rubygems_version: 3.1.2
116
+ rubygems_version: 3.2.15
116
117
  signing_key:
117
118
  specification_version: 4
118
119
  summary: A Ruby wrapper for the Shipstation API