usps-imis-api 0.3.1.pre.3 → 0.3.1.pre.4

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: 6685f3bfaa7117dc635648b0ff656d3195278cdc7305a7d72812819265676677
4
- data.tar.gz: e74f481adcc94976747e44a9b4a319e5f544b622ddbaff3f635b9334f3491791
3
+ metadata.gz: 02152b01fa56829c8909f1e62f80aab4df622c04927a7c9ba16583333058a065
4
+ data.tar.gz: 232ccd13227849b90a7ff923d5b450c2168de8848e38a233a509c53790ef8d62
5
5
  SHA512:
6
- metadata.gz: 39e302e7b884d3611afed02a45e00875d6500584186b9b586242b4a1700cad36aa2a0d80abac0ce5f4d339e32ac21f8329e1cf979c6100cfbf42471cb7e701cb
7
- data.tar.gz: 19d59a88d85a6b2f1afc9f9ce6810aee3fefef95641d3c6d2ffc9742859ab13f803015143232e6c7940459aca294866d6adb6f580e36a656793e2f6c4282bd92
6
+ metadata.gz: 16322a9dbb1a35fce4cded1e2ceac2cb40e0e5113c3fa47cef744c561e75ec9dd7243ff629193490e65f19f87a3999e22482dc797bddfdd5e8e18c94e408650a
7
+ data.tar.gz: 3ca39d83efaed93b7f08ceac76d98ab73b9bdbb6fb712498c623ec4a737217c4ad2f1cc66e2748aa9a0e7e46a32e35e83559796b1c2c98e252b9a21981ed8a7b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps-imis-api (0.3.1.pre.3)
4
+ usps-imis-api (0.3.1.pre.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -3,33 +3,13 @@
3
3
  module Usps
4
4
  module Imis
5
5
  module Panel
6
- class Vsc
7
- BUSINESS_OBJECT = 'ABC_ASC_Vessel_Safety_Checks'
8
-
9
- attr_reader :api
10
-
11
- def initialize(api = nil)
12
- @api = api || Api.new
13
- end
14
-
15
- def get(ordinal)
16
- api.get(BUSINESS_OBJECT, url_id: "~#{api.imis_id}|#{ordinal}")
17
- end
18
-
19
- def create(data)
20
- api.post(BUSINESS_OBJECT, payload(data), url_id: '')
21
- end
22
-
23
- def update(data)
24
- api.put(BUSINESS_OBJECT, payload(data), url_id: "~#{api.imis_id}|#{data[:ordinal]}")
25
- end
6
+ class Vsc < BasePanel
7
+ private
26
8
 
27
- def destroy(ordinal)
28
- api.delete(BUSINESS_OBJECT, url_id: "~#{api.imis_id}|#{ordinal}")
9
+ def business_object
10
+ 'ABC_ASC_Vessel_Safety_Checks'
29
11
  end
30
12
 
31
- private
32
-
33
13
  # rubocop:disable Metrics/MethodLength
34
14
  def payload(data)
35
15
  identity_type =
@@ -44,7 +24,7 @@ module Usps
44
24
  'EntityTypeName' => 'ABC_ASC_Vessel_Safety_Checks',
45
25
  'IdentityElements' => {
46
26
  '$type' => identity_type,
47
- '$values' => [api.imis_id]
27
+ '$values' => [api.imis_id, data[:ordinal]&.to_s].compact
48
28
  }
49
29
  },
50
30
  'PrimaryParentIdentity' => {
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Imis
5
- VERSION = '0.3.1-3'
5
+ VERSION = '0.3.1-4'
6
6
  end
7
7
  end
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.3.1.pre.3
4
+ version: 0.3.1.pre.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander