usps-imis-api 0.3.1 → 0.3.3.pre.pre.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: 363b03cdc0a93fdde0cf8409874723a07501191f271a23994a2a657ef82ccb2f
4
- data.tar.gz: 1daa873de5c75094cc755cd9dec593b899388edf337036cb9e53949c4f15c191
3
+ metadata.gz: d71f733048ca34857ca8914e8591e44f5671d678e5644a67f877dac272712a0c
4
+ data.tar.gz: b960d8a2202168321cd1e9605bb5299c3fc21356ca299faf34b5799e44a8a53b
5
5
  SHA512:
6
- metadata.gz: f795e80baefffaa7a7dad8f18945c1b388b311419ab5bff7bc4de138647b9cdbe2c893ae82675248c36b8c76662394a2feb51312d0321e0b26ebd0d145b7d28d
7
- data.tar.gz: 742ec65ee15fb91082173f398b9fac89859f78ec32b041ca7332ab5e0fa5a44dd325d91af4e8cecfc04f64f3dc6617de22d078583e9c53e61dc527ebeb1969b9
6
+ metadata.gz: 128b52d227155ebc4e4807354e0668c0929221c05738efade63afb428dd88b331c7c8611d159fdbbeba6b379ea36724e6defc1c8fa8e1fe510fde4401a5a5545
7
+ data.tar.gz: 546813a0c7a339e2a958f539feafa46c280e825cc2d8dc2d066998e8980627ead2757bf4a3e5d448be9d003c0972c96c0065d986ac665038742652de85396fa8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps-imis-api (0.3.1)
4
+ usps-imis-api (0.3.3.pre.pre.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/usps/imis/api.rb CHANGED
@@ -10,8 +10,9 @@ module Usps
10
10
 
11
11
  attr_reader :token, :token_expiration, :imis_id
12
12
 
13
- def initialize(skip_authentication: false)
13
+ def initialize(skip_authentication: false, imis_id: nil)
14
14
  authenticate unless skip_authentication
15
+ self.imis_id = imis_id if imis_id
15
16
  end
16
17
 
17
18
  # Manually set the current ID, if you already have it for a given member
@@ -6,8 +6,9 @@ module Usps
6
6
  class BasePanel
7
7
  attr_reader :api
8
8
 
9
- def initialize(api = nil)
9
+ def initialize(api = nil, imis_id: nil)
10
10
  @api = api || Api.new
11
+ api.imis_id = imis_id if imis_id
11
12
  end
12
13
 
13
14
  def get(ordinal)
@@ -56,49 +56,49 @@ module Usps
56
56
  end
57
57
  ),
58
58
  {
59
- "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
60
- "Name" => "ABC_EDUC_THRU_DATE",
61
- "Value" => (data[:thru_date] || "0001-01-01T00:00:00")
59
+ '$type' => 'Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts',
60
+ 'Name' => 'ABC_EDUC_THRU_DATE',
61
+ 'Value' => data[:thru_date] || '0001-01-01T00:00:00'
62
62
  },
63
63
  {
64
- "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
65
- "Name" => "ABC_ECertificate",
66
- "Value" => data[:certificate]
64
+ '$type' => 'Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts',
65
+ 'Name' => 'ABC_ECertificate',
66
+ 'Value' => data[:certificate]
67
67
  },
68
68
  {
69
- "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
70
- "Name" => "ABC_Educ_Description",
71
- "Value" => data[:description]
69
+ '$type' => 'Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts',
70
+ 'Name' => 'ABC_Educ_Description',
71
+ 'Value' => data[:description]
72
72
  },
73
73
  {
74
- "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
75
- "Name" => "ABC_Educ_Effective_Date",
76
- "Value" => data[:effective_date]
74
+ '$type' => 'Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts',
75
+ 'Name' => 'ABC_Educ_Effective_Date',
76
+ 'Value' => data[:effective_date]
77
77
  },
78
78
  {
79
- "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
80
- "Name" => "ABC_Educ_Source_System",
81
- "Value" => data[:source]
79
+ '$type' => 'Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts',
80
+ 'Name' => 'ABC_Educ_Source_System',
81
+ 'Value' => data[:source]
82
82
  },
83
83
  {
84
- "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
85
- "Name" => "ABC_Educ_Transaction_Date",
86
- "Value" => Time.now.strftime('%Y-%m-%dT%H:%I:%S')
84
+ '$type' => 'Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts',
85
+ 'Name' => 'ABC_Educ_Transaction_Date',
86
+ 'Value' => Time.now.strftime('%Y-%m-%dT%H:%I:%S')
87
87
  },
88
88
  {
89
- "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
90
- "Name" => "ABC_Other_Code",
91
- "Value" => data[:code]
89
+ '$type' => 'Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts',
90
+ 'Name' => 'ABC_Other_Code',
91
+ 'Value' => data[:code]
92
92
  },
93
93
  {
94
- "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
95
- "Name" => "ABC_Product_Code",
96
- "Value" => data[:type_code]
94
+ '$type' => 'Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts',
95
+ 'Name' => 'ABC_Product_Code',
96
+ 'Value' => data[:type_code]
97
97
  },
98
98
  {
99
- "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
100
- "Name" => "ABC_TYPE",
101
- "Value" => (data[:abc_type_code] || "EDUC")
99
+ '$type' => 'Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts',
100
+ 'Name' => 'ABC_TYPE',
101
+ 'Value' => data[:abc_type_code] || 'EDUC'
102
102
  }
103
103
  ].compact
104
104
  }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Imis
5
- VERSION = '0.3.1'
5
+ VERSION = '0.3.3-pre.1'
6
6
  end
7
7
  end
@@ -32,8 +32,11 @@ describe Usps::Imis::Panel::Education do
32
32
 
33
33
  ordinal = new_record['Properties']['$values'][1]['Value']['$value']
34
34
 
35
- update_result = education.update(details.merge(source: 'Online Exams System - Modified', ordinal: ordinal))
36
- updated = update_result['Properties']['$values'].find { |v| v['Name'] == 'ABC_Educ_Source_System' }
35
+ update_result =
36
+ education.update(details.merge(source: 'Online Exams System - Modified', ordinal: ordinal))
37
+ updated = update_result['Properties']['$values'].find do |v|
38
+ v['Name'] == 'ABC_Educ_Source_System'
39
+ end
37
40
  expect(updated['Value']).to eq('Online Exams System - Modified')
38
41
 
39
42
  expect(education.destroy(ordinal)).to eq('')
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
4
+ version: 0.3.3.pre.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander