shipstation 0.2.2 → 0.3.2

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
  SHA1:
3
- metadata.gz: d264829cc175659dac3f588fef18df0daae2cec7
4
- data.tar.gz: 5cd496d52951d5c571ffaa6c33ce7bf41009dcca
3
+ metadata.gz: 5ecee63cd8ae87b5388c0721b0aaa5b4e08f95de
4
+ data.tar.gz: b569c7eb6a55f4439f61338299f062df67d93403
5
5
  SHA512:
6
- metadata.gz: e826eb78266de1cac6f54d44c2355bc8a4dcd20d7e040b1ffc8e9cd8f95890d974cb0affab71bd6d68b8c7d69b1821a5fbcc8337a92bbc9783f678a7f2dfd93a
7
- data.tar.gz: b58681abbec20a7ca1c2dd67b4c5abaa0daedf2ec77f3e51b57c27c3118bd68e9d1d2b8cd3f022eff5ff5b82927769e128532ea31cd5a781f30bf4368868de07
6
+ metadata.gz: 6451d33402607b3c093b75bd578871304130581159e75d78f6393002046ddd06680d73c835734da48e1d2469420e499557f77ae99f3e62ff64c920168aab5fa0
7
+ data.tar.gz: 4c3889741db3c8890e6132fb59bb9961031be7f710e690e643ea54e6da330d44e3267ce3471466159219a2a4d8547e9cbdafe7ab004c6d3a9423f9078e43c262
@@ -0,0 +1,11 @@
1
+ module Shipstation
2
+ module APIOperations
3
+ module Retrieve
4
+
5
+ def retrieve object_id
6
+ response = Shipstation.request(:get, "#{class_name.downcase.pluralize}/#{object_id}")
7
+ return response
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,6 @@
1
1
  module Shipstation
2
2
  class Customer < ApiResource
3
3
  extend Shipstation::APIOperations::List
4
+ extend Shipstation::APIOperations::Retrieve
4
5
  end
5
6
  end
@@ -2,6 +2,7 @@ module Shipstation
2
2
  class Order < ApiResource
3
3
  extend Shipstation::APIOperations::List
4
4
  extend Shipstation::APIOperations::Create
5
+ extend Shipstation::APIOperations::Retrieve
5
6
 
6
7
  class << self
7
8
  def create_label params={}
@@ -1,5 +1,6 @@
1
1
  module Shipstation
2
2
  class Product < ApiResource
3
3
  extend Shipstation::APIOperations::List
4
+ extend Shipstation::APIOperations::Retrieve
4
5
  end
5
6
  end
@@ -1,5 +1,6 @@
1
1
  module Shipstation
2
2
  class Store < ApiResource
3
+ extend Shipstation::APIOperations::Retrieve
3
4
 
4
5
  class << self
5
6
  def list
@@ -1,3 +1,3 @@
1
1
  module Shipstation
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -1,6 +1,7 @@
1
1
  module Shipstation
2
2
  class Warehouse < ApiResource
3
- include Shipstation::APIOperations::Create
3
+ extend Shipstation::APIOperations::Create
4
+ extend Shipstation::APIOperations::Retrieve
4
5
 
5
6
  class << self
6
7
  def list
data/lib/shipstation.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'shipstation/api_operations/list'
2
2
  require 'shipstation/api_operations/create'
3
+ require 'shipstation/api_operations/retrieve'
3
4
 
4
5
  require 'shipstation/api_resource'
5
6
  require 'shipstation/order'
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.2.2
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Dallimore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-19 00:00:00.000000000 Z
11
+ date: 2016-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -36,6 +36,7 @@ files:
36
36
  - lib/shipstation.rb
37
37
  - lib/shipstation/api_operations/create.rb
38
38
  - lib/shipstation/api_operations/list.rb
39
+ - lib/shipstation/api_operations/retrieve.rb
39
40
  - lib/shipstation/api_resource.rb
40
41
  - lib/shipstation/carrier.rb
41
42
  - lib/shipstation/customer.rb