usps-imis-api 0.11.3 → 0.11.5
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b8e2923d6da2cf2d2fbfd60e2b29e6930efb66148bebd9746521454d64786106
|
|
4
|
+
data.tar.gz: d4a8927801796b0a09a7ec2f1f1dd6c702e7785d6fb39d699d4f9f622e2be9d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a69f233aca63d00f441fe6d044ba4206bce8aa309f3eb96ae05f07477585737a044a092dc7234f9d83c505fc14e1c8834dacadc4bfce5560efe4f42ee92ea5e
|
|
7
|
+
data.tar.gz: d44e7298e69c825349194ff24338bcf74494b1e641dd6c3c4e2d05e68b530b959cbb435d84ecf39fb8da4b54b2097858c8c8479e5b3aad6491facdb51eca8b4c
|
|
@@ -65,6 +65,7 @@ module Usps
|
|
|
65
65
|
# rubocop:disable Metrics
|
|
66
66
|
def perform!
|
|
67
67
|
case options
|
|
68
|
+
in mapper: true, data: then api.mapper.update(data)
|
|
68
69
|
in map:, data: then api.mapper[map.to_sym] = data
|
|
69
70
|
in map: then api.mapper[map.to_sym]
|
|
70
71
|
|
|
@@ -135,13 +136,9 @@ module Usps
|
|
|
135
136
|
end
|
|
136
137
|
|
|
137
138
|
def validate_options!
|
|
138
|
-
|
|
139
|
-
raise Errors::CommandLineError, 'No options provided'
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
return if options[:query].nil? || options[:query].start_with?('$/')
|
|
139
|
+
return unless options[:log_level] == 'info' && options.except(:log_level, :quiet).values.none?
|
|
143
140
|
|
|
144
|
-
raise Errors::CommandLineError, '
|
|
141
|
+
raise Errors::CommandLineError, 'No options provided'
|
|
145
142
|
end
|
|
146
143
|
end
|
|
147
144
|
end
|
|
@@ -12,12 +12,13 @@ module Usps
|
|
|
12
12
|
on: ['Business Object name', { type: :string }],
|
|
13
13
|
panel: ['Panel name', { type: :string }],
|
|
14
14
|
ordinal: ['Ordinal ID within a Panel', { type: :integer }],
|
|
15
|
-
query: ['IQA Query name', { type: :string, short: :Q }],
|
|
15
|
+
query: ['IQA Query or Business Object name to query', { type: :string, short: :Q }],
|
|
16
16
|
post: ["Send a #{'POST'.cyan} request", { short: :P }],
|
|
17
17
|
delete: ["Send a #{'DELETE'.cyan} request", { short: :D }],
|
|
18
18
|
field: ['Specific field to return or update', { type: :string }],
|
|
19
19
|
fields: ['Specific field(s) to return', { type: :strings, short: :F }],
|
|
20
20
|
map: ['Mapped field name to return or update', { type: :string }],
|
|
21
|
+
mapper: ['Multiple mapped fields to update together', { short: :M }],
|
|
21
22
|
data: ['JSON string input', { type: :string }],
|
|
22
23
|
config: ['Path to the JSON config file to use', { type: :string, short: :C }],
|
|
23
24
|
raw: ['Return raw JSON output, rather than simplified data', { short: :R }],
|
data/lib/usps/imis/version.rb
CHANGED