usps-imis-api 0.11.2 → 0.11.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8eb337744ecc5e0a04d0bcb6d7b0dc6f0a71652dcb419d2ad401fac4d2ebd62
|
|
4
|
+
data.tar.gz: 94cd6355d822afb03d72d17c038b4be0a4afd163ffe0c686654be3617fec355a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d9c4765758a516a7119dd43dc7d2681b09eef01d00ade3967cb0495c88b1b7b09579df78e8cb35e7bf035bcb487ed03c3aeff8cf3915f890451a560cb75d003
|
|
7
|
+
data.tar.gz: fb012df3006fddd40566eca42371452c98908e88dd869c2733fe90ee858b1cffe44f087639787433534a9e1dc9a37cb8bd5c773e78441d5a6ea6d4ff9019c41b
|
|
@@ -18,6 +18,7 @@ module Usps
|
|
|
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 }],
|
|
@@ -37,24 +38,46 @@ module Usps
|
|
|
37
38
|
|
|
38
39
|
def self.banner_contents
|
|
39
40
|
<<~BANNER
|
|
40
|
-
Usage
|
|
41
|
-
|
|
41
|
+
#{'Usage'.underline}
|
|
42
|
+
|
|
43
|
+
#{'imis.rb'.bold} #{'[options]'.gray}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
#{'HTTP Verbs'.underline}
|
|
42
47
|
|
|
43
48
|
The default HTTP verb is #{'GET'.cyan}.
|
|
49
|
+
|
|
44
50
|
If #{'--data'.green}/#{'-d'.green} is provided, the default HTTP verb is #{'PUT'.cyan}.
|
|
45
51
|
|
|
46
52
|
#{'--data'.green}/#{'-d'.green} is used to provide field(s) data for #{'PUT'.cyan}
|
|
47
53
|
requests and mapper updates, object data for #{'POST'.cyan},
|
|
48
54
|
and to provide any query params.
|
|
49
55
|
|
|
50
|
-
Configuration can be specified with #{'--config'.green}/#{'-C'.green}, or by setting
|
|
51
|
-
the following environment variables:
|
|
52
|
-
#{'IMIS_ENVIRONMENT'.yellow}
|
|
53
|
-
#{'IMIS_USERNAME'.yellow}
|
|
54
|
-
#{'IMIS_PASSWORD'.yellow}
|
|
55
|
-
#{'IMIS_ID_QUERY_NAME'.yellow}
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
#{'Configuration'.underline}
|
|
58
|
+
|
|
59
|
+
API configuration can be specified in two ways:
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
With #{'--config'.green}/#{'-C'.green} given the path to a JSON file, e.g.:
|
|
63
|
+
|
|
64
|
+
{
|
|
65
|
+
"imis_id_query_name": "#{'$/IQA_QUERY_NAME'.yellow}",
|
|
66
|
+
"environment": "#{'development'.yellow}",
|
|
67
|
+
"username": "#{'USERNAME'.yellow}",
|
|
68
|
+
"password": "#{'PASSWORD'.yellow}"
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
By setting the following environment variables:
|
|
73
|
+
|
|
74
|
+
#{'IMIS_ID_QUERY_NAME'.yellow}
|
|
75
|
+
#{'IMIS_ENVIRONMENT'.yellow}
|
|
76
|
+
#{'IMIS_USERNAME'.yellow}
|
|
77
|
+
#{'IMIS_PASSWORD'.yellow}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
#{'Options'.underline}
|
|
58
81
|
BANNER
|
|
59
82
|
end
|
|
60
83
|
|
data/lib/usps/imis/version.rb
CHANGED