usps-imis-api 0.9.1 → 0.9.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/usps/imis/business_object.rb +10 -2
- data/lib/usps/imis/mapper.rb +4 -0
- data/lib/usps/imis/panels/base_panel.rb +4 -0
- data/lib/usps/imis/query.rb +4 -0
- data/lib/usps/imis/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e19af888058a7e7b952269cf44ca87dcd50c733e5ad4c97760c80fee73e713b6
|
|
4
|
+
data.tar.gz: 85c743311d63b29d85ebab874e174446d452a4e0679bdc7c8191d5cdb1557a22
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eebcd44785ae1a0d021ff01a7205b2fe9db7546c73dd3f47e3e4c34db90c1344bc2dee97283f67a484764b87b1b8ade9e04811a848caece4bd7287df3297e55c
|
|
7
|
+
data.tar.gz: 52dc9356735c0d972096fefe3de91c5acb2f3cf4698f5fe2a4ac711e655b15f384c7a815a9c4eff7ac12db09f9e425f03de2f318df2d45b99bc14b84e49ce7e7
|
data/Gemfile.lock
CHANGED
|
@@ -102,6 +102,10 @@ module Usps
|
|
|
102
102
|
def delete = submit(uri, authorize(Net::HTTP::Delete.new(uri))).body == '' # rubocop:disable Naming/PredicateMethod
|
|
103
103
|
alias destroy delete
|
|
104
104
|
|
|
105
|
+
# Ruby 3.5 instance variable filter
|
|
106
|
+
#
|
|
107
|
+
def instance_variables_to_inspect = instance_variables - %i[@api]
|
|
108
|
+
|
|
105
109
|
private
|
|
106
110
|
|
|
107
111
|
def token = api.token
|
|
@@ -159,7 +163,9 @@ module Usps
|
|
|
159
163
|
def raw_object
|
|
160
164
|
request = Net::HTTP::Get.new(uri)
|
|
161
165
|
result = submit(uri, authorize(request))
|
|
162
|
-
Data.from_json(result.body)
|
|
166
|
+
result = Data.from_json(result.body)
|
|
167
|
+
JSON.pretty_generate(result).split("\n").each { Imis.logger.debug " -> #{it}" }
|
|
168
|
+
result
|
|
163
169
|
end
|
|
164
170
|
|
|
165
171
|
# Upload an object to the API
|
|
@@ -167,7 +173,9 @@ module Usps
|
|
|
167
173
|
def put_object(request, body)
|
|
168
174
|
request.body = JSON.dump(body)
|
|
169
175
|
result = submit(uri, authorize(request))
|
|
170
|
-
Data.from_json(result.body)
|
|
176
|
+
result = Data.from_json(result.body)
|
|
177
|
+
JSON.pretty_generate(result).split("\n").each { Imis.logger.debug " -> #{it}" }
|
|
178
|
+
result
|
|
171
179
|
end
|
|
172
180
|
end
|
|
173
181
|
end
|
data/lib/usps/imis/mapper.rb
CHANGED
|
@@ -87,6 +87,10 @@ module Usps
|
|
|
87
87
|
def delete(ordinal) = api.on(business_object, ordinal:).delete
|
|
88
88
|
alias destroy delete
|
|
89
89
|
|
|
90
|
+
# Ruby 3.5 instance variable filter
|
|
91
|
+
#
|
|
92
|
+
def instance_variables_to_inspect = instance_variables - %i[@api]
|
|
93
|
+
|
|
90
94
|
private
|
|
91
95
|
|
|
92
96
|
def business_object
|
data/lib/usps/imis/query.rb
CHANGED
data/lib/usps/imis/version.rb
CHANGED