usps-ruby-client 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +113 -0
- data/README.md +11 -6
- data/lib/data/api/{address-information-api.htm → address-information-api.html} +0 -0
- data/lib/data/api/{domestic-mail-service-standards-api.htm → domestic-mail-service-standards-api.html} +2482 -2195
- data/lib/data/api/{evs-international-label-api.htm → evs-international-label-api.html} +4546 -2118
- data/lib/data/api/{evs-label-api.htm → evs-label-api.html} +9223 -4626
- data/lib/data/api/expressmail-api-retirement-transition-guide.html +3167 -0
- data/lib/data/api/general-api-developer-guide.html +4668 -0
- data/lib/data/api/{hold-for-pickup-facilities-lookup-api.htm → hold-for-pickup-facilities-lookup-api.html} +0 -0
- data/lib/data/api/{package-pickup-api.htm → package-pickup-api.html} +0 -0
- data/lib/data/api/{rate-calculator-api.htm → rate-calculator-api.html} +5765 -2680
- data/lib/data/api/{scan-api.htm → scan-api.html} +0 -0
- data/lib/data/api/service-delivery-calculator-get-locations-api.html +10522 -0
- data/lib/data/api/sunday-holiday-api.html +5905 -0
- data/lib/data/api/{track-and-confirm-api.htm → track-and-confirm-api.html} +840 -342
- data/lib/data/api/{uspsreturnslabel-api.htm → uspsreturnslabel-api.html} +3686 -4084
- data/lib/tasks/api.rake +4 -3
- data/lib/usps/api/endpoints/carrier_pickup_schedule.rb +1 -1
- data/lib/usps/api/endpoints/city_state_lookup.rb +1 -1
- data/lib/usps/api/endpoints/e_vs_express_mail_intl.rb +12 -5
- data/lib/usps/api/endpoints/e_vs_first_class_mail_intl.rb +12 -10
- data/lib/usps/api/endpoints/e_vs_priority_mail_intl.rb +9 -7
- data/lib/usps/api/endpoints/e_vsgxg_get_label.rb +6 -6
- data/lib/usps/api/endpoints/e_vsi_cancel.rb +8 -7
- data/lib/usps/api/endpoints/hfp_facility_info.rb +1 -1
- data/lib/usps/api/endpoints/intl_rate_v2.rb +13 -11
- data/lib/usps/api/endpoints/pts_email.rb +1 -1
- data/lib/usps/api/endpoints/pts_pod.rb +1 -1
- data/lib/usps/api/endpoints/pts_rre.rb +1 -1
- data/lib/usps/api/endpoints/ptst_pod.rb +1 -1
- data/lib/usps/api/endpoints/rate_v4.rb +13 -9
- data/lib/usps/api/endpoints/scan.rb +1 -1
- data/lib/usps/api/endpoints/sunday_holiday_availability.rb +46 -0
- data/lib/usps/api/endpoints/track_v2.rb +1 -1
- data/lib/usps/api/endpoints/usps_returns_label.rb +55 -15
- data/lib/usps/api/endpoints/verify.rb +1 -1
- data/lib/usps/api/endpoints/zip_code_lookup.rb +1 -1
- data/lib/usps/api/endpoints.rb +3 -0
- data/lib/usps/api/templates/method.erb +1 -1
- data/lib/usps/version.rb +2 -1
- data/usps-ruby-client.gemspec +3 -3
- metadata +24 -20
- data/lib/data/api/service-delivery-calculator-get-locations-api.htm +0 -12548
- data/usps-ruby-client-0.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fe5db40c31c43aedef4f595916b77904f417172cebcc75e2f38c85dc0e60d73
|
4
|
+
data.tar.gz: 4185548d359f963b19041bb5426608ea8f6cd6b6ee9d11b360da0f048e88cf1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 317a10e5b38a6f3e1bdc1c3548187e34e72469074984b7fd7670fff4910d83f9f2b3b5c78a5375ffef6795c58f73fe21915045b37ce8638d05ec800f5837e8b8
|
7
|
+
data.tar.gz: f18e20484ad2db787f4fb199bdbe4bda75556c6ddff2dcc5ffbfd681a88ffe79e25a93e0cbdd6a64d9d87536c0adfeac1151ba01aa4cd5573ccbb7cd67056dc5
|
data/.gitignore
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
usps-ruby-client (0.2.0)
|
5
|
+
activesupport (~> 7.0)
|
6
|
+
builder (~> 3.2)
|
7
|
+
faraday (~> 0.17)
|
8
|
+
faraday_middleware (~> 0.14)
|
9
|
+
multi_xml (~> 0.6)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
activesupport (7.0.2.3)
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
+
i18n (>= 1.6, < 2)
|
17
|
+
minitest (>= 5.1)
|
18
|
+
tzinfo (~> 2.0)
|
19
|
+
amazing_print (1.4.0)
|
20
|
+
ast (2.4.2)
|
21
|
+
builder (3.2.4)
|
22
|
+
coderay (1.1.3)
|
23
|
+
concurrent-ruby (1.1.10)
|
24
|
+
diff-lcs (1.5.0)
|
25
|
+
docile (1.4.0)
|
26
|
+
erubis (2.7.0)
|
27
|
+
faraday (0.17.5)
|
28
|
+
multipart-post (>= 1.2, < 3)
|
29
|
+
faraday_middleware (0.14.0)
|
30
|
+
faraday (>= 0.7.4, < 1.0)
|
31
|
+
i18n (1.10.0)
|
32
|
+
concurrent-ruby (~> 1.0)
|
33
|
+
method_source (1.0.0)
|
34
|
+
mini_portile2 (2.8.0)
|
35
|
+
minitest (5.15.0)
|
36
|
+
multi_xml (0.6.0)
|
37
|
+
multipart-post (2.1.1)
|
38
|
+
nokogiri (1.13.3)
|
39
|
+
mini_portile2 (~> 2.8.0)
|
40
|
+
racc (~> 1.4)
|
41
|
+
parallel (1.22.1)
|
42
|
+
parser (3.1.1.0)
|
43
|
+
ast (~> 2.4.1)
|
44
|
+
pry (0.14.1)
|
45
|
+
coderay (~> 1.1)
|
46
|
+
method_source (~> 1.0)
|
47
|
+
racc (1.6.0)
|
48
|
+
rainbow (3.1.1)
|
49
|
+
rake (12.3.3)
|
50
|
+
regexp_parser (2.2.1)
|
51
|
+
rexml (3.2.5)
|
52
|
+
rspec (3.11.0)
|
53
|
+
rspec-core (~> 3.11.0)
|
54
|
+
rspec-expectations (~> 3.11.0)
|
55
|
+
rspec-mocks (~> 3.11.0)
|
56
|
+
rspec-core (3.11.0)
|
57
|
+
rspec-support (~> 3.11.0)
|
58
|
+
rspec-expectations (3.11.0)
|
59
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
60
|
+
rspec-support (~> 3.11.0)
|
61
|
+
rspec-mocks (3.11.0)
|
62
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
63
|
+
rspec-support (~> 3.11.0)
|
64
|
+
rspec-support (3.11.0)
|
65
|
+
rubocop (1.26.1)
|
66
|
+
parallel (~> 1.10)
|
67
|
+
parser (>= 3.1.0.0)
|
68
|
+
rainbow (>= 2.2.2, < 4.0)
|
69
|
+
regexp_parser (>= 1.8, < 3.0)
|
70
|
+
rexml
|
71
|
+
rubocop-ast (>= 1.16.0, < 2.0)
|
72
|
+
ruby-progressbar (~> 1.7)
|
73
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
74
|
+
rubocop-ast (1.16.0)
|
75
|
+
parser (>= 3.1.1.0)
|
76
|
+
rubocop-performance (1.13.3)
|
77
|
+
rubocop (>= 1.7.0, < 2.0)
|
78
|
+
rubocop-ast (>= 0.4.0)
|
79
|
+
rubocop-rspec (2.9.0)
|
80
|
+
rubocop (~> 1.19)
|
81
|
+
ruby-progressbar (1.11.0)
|
82
|
+
simplecov (0.21.2)
|
83
|
+
docile (~> 1.1)
|
84
|
+
simplecov-html (~> 0.11)
|
85
|
+
simplecov_json_formatter (~> 0.1)
|
86
|
+
simplecov-html (0.12.3)
|
87
|
+
simplecov_json_formatter (0.1.4)
|
88
|
+
tzinfo (2.0.4)
|
89
|
+
concurrent-ruby (~> 1.0)
|
90
|
+
unicode-display_width (2.1.0)
|
91
|
+
webrick (1.7.0)
|
92
|
+
yard (0.9.27)
|
93
|
+
webrick (~> 1.7.0)
|
94
|
+
|
95
|
+
PLATFORMS
|
96
|
+
ruby
|
97
|
+
|
98
|
+
DEPENDENCIES
|
99
|
+
amazing_print (~> 1.2)
|
100
|
+
erubis (~> 2.7)
|
101
|
+
nokogiri (~> 1.10)
|
102
|
+
pry (~> 0.13)
|
103
|
+
rake (~> 12.0)
|
104
|
+
rspec (~> 3.0)
|
105
|
+
rubocop (~> 1.7)
|
106
|
+
rubocop-performance (~> 1.9)
|
107
|
+
rubocop-rspec (~> 2.1)
|
108
|
+
simplecov (~> 0.21)
|
109
|
+
usps-ruby-client!
|
110
|
+
yard (~> 0.9)
|
111
|
+
|
112
|
+
BUNDLED WITH
|
113
|
+
2.3.5
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ USPS Ruby Client
|
|
6
6
|
|
7
7
|
An unofficial Ruby client for The United Sates Postal Service Web Tools API.
|
8
8
|
|
9
|
-
**Disclaimer** This gem is mostly auto-generated from the [USPS API User Guides](https://www.usps.com/business/web-tools-apis/documentation-updates.htm). Because of inconsistencies and
|
9
|
+
**Disclaimer** This gem is mostly auto-generated from the [USPS API User Guides](https://www.usps.com/business/web-tools-apis/documentation-updates.htm). Because of inconsistencies and inaccuracies in the user guides, some endpoints may not work as expected or may not be consistent with other methods in this gem.
|
10
10
|
|
11
11
|
## Installation
|
12
12
|
|
@@ -52,26 +52,31 @@ client.city_state_lookup({
|
|
52
52
|
}
|
53
53
|
```
|
54
54
|
|
55
|
+
## RubyDoc Automatic Documentation
|
56
|
+
The generator also creates [documentation](https://rubydoc.info/gems/usps-ruby-client) to help you navigate the available methods. It has the same issues presented in the disclaimer above.
|
57
|
+
|
55
58
|
## Development
|
56
59
|
|
57
60
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
58
61
|
|
59
62
|
### Updating the auto-generated methods
|
60
63
|
|
61
|
-
Because the USPS website does not allow scripts to make requests against their website you must [download the API User Guide HTML files manually](https://www.usps.com/business/web-tools-apis/documentation-updates.htm). I recommend right-clicking the **HTM** and selecting *Save Link As...* to prevent any browser extensions from injecting their code and breaking the parsing.
|
64
|
+
Because the USPS website does not allow scripts to make requests against their website, you must [download the API User Guide HTML files manually](https://www.usps.com/business/web-tools-apis/documentation-updates.htm). I recommend right-clicking the **HTM** and selecting *Save Link As...* to prevent any browser extensions from injecting their code and breaking the parsing.
|
65
|
+
|
66
|
+
Place just the `.htm` files in `lib/data/api` (and remove any that may no longer be active) and run `rake usps:api:update`. This task will recreate all the appropriate methods and some basic spec tests.
|
62
67
|
|
63
|
-
|
68
|
+
We might be able to automate this with a headless browser tool like Watir, but only if we can do that in a way that doesn't bloat the gem as a whole.
|
64
69
|
|
65
70
|
## Contributing
|
66
71
|
|
67
72
|
Bug reports and pull requests are welcome on GitHub at https://github.com/joeyparis/usps-ruby-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/joeyparis/usps-ruby-client/blob/master/CODE_OF_CONDUCT.md).
|
68
73
|
|
69
|
-
This is still an early work-in-progress so any additional help is
|
74
|
+
This project is still an early work-in-progress, so any additional help is greatly appreciated!
|
70
75
|
|
71
76
|
## License
|
72
77
|
|
73
|
-
The gem is available as open
|
78
|
+
The gem is available as open-source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
74
79
|
|
75
80
|
## Code of Conduct
|
76
81
|
|
77
|
-
Everyone interacting in the Usps project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/joeyparis/usps-ruby-client/blob/master/CODE_OF_CONDUCT.md).
|
82
|
+
Everyone interacting in the Usps project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [code of conduct](https://github.com/joeyparis/usps-ruby-client/blob/master/CODE_OF_CONDUCT.md).
|
File without changes
|