usps-imis-api 0.2.0 → 0.2.1

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: 596057339ef96ddfa1bc884107307bae2bedfa3ef28610f1293218362daa53ad
4
- data.tar.gz: 304f7b47a0923b08646266b71365049074235d24983abaa78fac615f0b02e5cc
3
+ metadata.gz: 3bb98ea050e0d9e6b21b9c67b3e1cc7f74020781556015cc4c03e6b748a8cf3d
4
+ data.tar.gz: 8e309c38ebb754244a278de5b4968a6bd917c78d43271a042b0ab5e81846ea10
5
5
  SHA512:
6
- metadata.gz: ec4ec8cedb9966992b4e6d86b34e2a219c3f6cc28d4c01622d460e1f1f7c44fdfa8c6aa76f3aad1fb97b2e44f75366eb7060f9685b83c1bca21937c8b778414f
7
- data.tar.gz: 412e3f664b0384330956c11eee3ce11f0c6bb77a3154d24fb4c671e34d919628fb58f7780a92b5a164cb987de8f43893308a7de9f892580a3f6478515d861b3b
6
+ metadata.gz: b8ac2e1b390b4f1c6922eb2bd48202aff6015af2ebd9a577572e61d4c24d4219c89ee85bc0c76438fd0c97a020c10b60c021fe95a7819bc260a282d7c56a83b8
7
+ data.tar.gz: 35aa8c10cc792f75ef6df018264e1171077598a74076193ea083dfd7edb754ed76173531acff8904df00d70adad9506dc844bce4b94d68537e1eca821d7c784d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps-imis-api (0.2.0)
4
+ usps-imis-api (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/Readme.md CHANGED
@@ -13,7 +13,7 @@ gem install usps-imis-api
13
13
  or add this line to your Gemfile:
14
14
 
15
15
  ```ruby
16
- gem 'usps-imis-api', '>= 0.1.1'
16
+ gem 'usps-imis-api', '>= 0.2.0'
17
17
  ```
18
18
 
19
19
  ## Setup
@@ -177,6 +177,8 @@ api.with(31092) do
177
177
  mapper.update(mm: 15)
178
178
 
179
179
  update(mm: 15)
180
+
181
+ panels.vsc.get(1417)
180
182
  end
181
183
  ```
182
184
 
data/lib/imis/api.rb CHANGED
@@ -5,6 +5,7 @@ module Imis
5
5
  AUTHENTICATION_PATH = 'Token'
6
6
  API_PATH = 'api'
7
7
  QUERY_PATH = 'api/Query'
8
+ PANELS = Struct.new(:vsc)
8
9
 
9
10
  attr_reader :token, :token_expiration, :imis_id
10
11
 
@@ -104,6 +105,12 @@ module Imis
104
105
  @mapper ||= Mapper.new(self)
105
106
  end
106
107
 
108
+ def panels
109
+ @panels ||= PANELS.new(
110
+ Panel::Vsc.new(self)
111
+ )
112
+ end
113
+
107
114
  def update(data)
108
115
  mapper.update(data)
109
116
  end
@@ -29,5 +29,9 @@ describe Imis::Api do
29
29
  it 'sends an update from update' do
30
30
  expect(api.with(31092) { update(mm: 15) }.first).to be_a(Hash)
31
31
  end
32
+
33
+ it 'uses a panel correctly' do
34
+ expect(api.with(6374) { panels.vsc.get(1433) }).to be_a(Hash)
35
+ end
32
36
  end
33
37
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'usps-imis-api'
5
- s.version = '0.2.0'
5
+ s.version = '0.2.1'
6
6
  s.summary = 'iMIS API Wrapper'
7
7
  s.description = 'A wrapper for the iMIS API.'
8
8
  s.homepage = 'http://rubygems.org/gems/usps-imis-api'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usps-imis-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander