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: 12f51db70652669afdc29f5d0a753f053a4e7228eb7f88a14e570bbcf1de5488
4
- data.tar.gz: 97035afafa222607b44fd8b015fa88895d575ad73241d2a6d17f7fa4c560a258
3
+ metadata.gz: b8e2923d6da2cf2d2fbfd60e2b29e6930efb66148bebd9746521454d64786106
4
+ data.tar.gz: d4a8927801796b0a09a7ec2f1f1dd6c702e7785d6fb39d699d4f9f622e2be9d2
5
5
  SHA512:
6
- metadata.gz: 69aa7c6c29a177db4b8bc06889207def81698678e707362bab433911f17f32f62414e03a4571cfd23ffe2dc009f2deb6c285da87cce0b497ae6a59ad3ce2ccbe
7
- data.tar.gz: 5beeb62eb417b69dbcf2cc576cd994663464dd61fc6243732322862b60a72c4a57b3fed7de9ca70d009b7f6a2b687164598456415b518600164b41d8d37122f7
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
- if options[:log_level] == 'info' && options.except(:log_level, :quiet).values.none?
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, 'Invalid IQA Query name'
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 }],
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Imis
5
- VERSION = '0.11.3'
5
+ VERSION = '0.11.5'
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.11.3
4
+ version: 0.11.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander