shipstation 0.20 → 0.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58f733c344f7ae035c706b07ccb5c88c906b6054cf2ab8fffab1dafd06831c40
4
- data.tar.gz: 174afa229e3b821a37519af245f8a27217c0f32c8f4f7cedb3e57701b13f6494
3
+ metadata.gz: 7b24a9b9d3b391332cb6aef90cd167a8a44953bad76cce01a74cda7af64c2674
4
+ data.tar.gz: 36f0a87b41ac20872eefbed545126ed7360f8132a40813edcfe77abb7a6d46b3
5
5
  SHA512:
6
- metadata.gz: 4eff1093b4836b8bfd540b3162043caebc25c1c0a821e7d80874e2e8329873e9c335623568ebfa14f818a4bc7d9a1105f1d733de7e0cd8a0327db39e80e0234e
7
- data.tar.gz: 33dcd18eb2fd5588b9abbc2058bf0f865a9e71220fea76307c8d53c01de6476dd20fd9d9219afe6d70f098f0dc97751e4907411efdf59329d62551d517c5eb9d
6
+ metadata.gz: 41ad2642ef2ee4a4c1514ce7f2eb5c1043b24e88a8984ffb9e99e8bd8d7a7e3ac68fe31528cf3b2c1ff9f2bcabc9c49fbd815074ab60d7504974d69b1f156343
7
+ data.tar.gz: c08b6326f2073f328964f3d5423a7f72995be83ef490dab293ba1f9e5e2512586d6d5f08bab54d8e27b8241636f91ed77ade10c071e3c47ecb759c050075a3cb
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
 
@@ -2,7 +2,7 @@ module Shipstation
2
2
  module APIOperations
3
3
  module Create
4
4
 
5
- def create params = {}
5
+ def create(params = {})
6
6
  response = Shipstation.request(:post, "#{class_name.downcase.pluralize}/create#{class_name.downcase}", params)
7
7
  return response
8
8
  end
@@ -2,7 +2,7 @@ module Shipstation
2
2
  module APIOperations
3
3
  module Delete
4
4
 
5
- def delete object_id, params = {}
5
+ def delete(object_id, params = {})
6
6
  Shipstation.request(:delete, "#{class_name.downcase.pluralize}/#{object_id}", params)
7
7
  end
8
8
 
@@ -2,7 +2,7 @@ module Shipstation
2
2
  module APIOperations
3
3
  module List
4
4
 
5
- def list params = {}
5
+ def list(params = {})
6
6
  response = Shipstation.request(:get, class_name.downcase.pluralize, params)
7
7
 
8
8
  return response
@@ -2,7 +2,7 @@ module Shipstation
2
2
  module APIOperations
3
3
  module Retrieve
4
4
 
5
- def retrieve object_id, params = {}
5
+ def retrieve(object_id, params = {})
6
6
  response = Shipstation.request(:get, "#{class_name.downcase.pluralize}/#{object_id}", params)
7
7
  return response
8
8
  end
@@ -0,0 +1,10 @@
1
+ module Shipstation
2
+ module APIOperations
3
+ module Shipment
4
+
5
+ def mark_as_shipped(params = {})
6
+ Shipstation.request(:post, 'orders/markasshipped', params)
7
+ end
8
+ end
9
+ end
10
+ end
@@ -2,10 +2,9 @@ module Shipstation
2
2
  module APIOperations
3
3
  module Update
4
4
 
5
- def update object_id, params = {}
5
+ def update(object_id, params = {})
6
6
  Shipstation.request(:put, "#{class_name.downcase.pluralize}/#{object_id}", params)
7
7
  end
8
-
9
8
  end
10
9
  end
11
10
  end
@@ -5,8 +5,8 @@ module Shipstation
5
5
  extend Shipstation::APIOperations::Update
6
6
 
7
7
  class << self
8
- def list
9
- response = Shipstation.request(:get, 'stores')
8
+ def list(params = {})
9
+ response = Shipstation.request(:get, 'stores', params)
10
10
 
11
11
  return response
12
12
  end
@@ -2,8 +2,8 @@ module Shipstation
2
2
  class Tag < ApiResource
3
3
 
4
4
  class << self
5
- def list
6
- response = Shipstation.request(:get, 'accounts/listtags')
5
+ def list(params = {})
6
+ response = Shipstation.request(:get, 'accounts/listtags', params)
7
7
 
8
8
  return response
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module Shipstation
2
- VERSION = "0.20"
2
+ VERSION = "0.25"
3
3
  end
@@ -5,8 +5,8 @@ module Shipstation
5
5
  extend Shipstation::APIOperations::Update
6
6
 
7
7
  class << self
8
- def list
9
- response = Shipstation.request(:get, 'warehouses')
8
+ def list(params = {})
9
+ response = Shipstation.request(:get, 'warehouses', params)
10
10
 
11
11
  return response
12
12
  end
@@ -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.20'
4
+ version: '0.25'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Dallimore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-31 00:00:00.000000000 Z
11
+ date: 2021-04-30 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.1.2
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