Module: Usps::Api::Endpoints::TrackV2
- Included in:
- Usps::Api::Endpoints
- Defined in:
- lib/usps/api/endpoints/track_v2.rb
Instance Method Summary collapse
-
#track_v2(options = {}) ⇒ Object
The Package Tracking “Fields” API is similar to the Package Track API except for the request fields, API name, and the return information.
Instance Method Details
#track_v2(options = {}) ⇒ Object
The Package Tracking “Fields” API is similar to the Package Track API except for the request fields, API name, and the return information. Data returned still contains the detail and summary information, but this information is broken down into fields instead of having only one line of text. Up to 10 tracking IDs may be contained in each API request to the Web Tools server.
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/usps/api/endpoints/track_v2.rb', line 24 def track_v2( = {}) throw ArgumentError.new('Required arguments :track_field_request missing') if [:track_field_request].nil? throw ArgumentError.new('Required arguments :track_field_request, :revision missing') if [:track_field_request][:revision].nil? throw ArgumentError.new('Required arguments :track_field_request, :source_id missing') if [:track_field_request][:source_id].nil? throw ArgumentError.new('Required arguments :track_field_request, :track_id missing') if [:track_field_request][:track_id].nil? request = build_request(:track_v2, ) get('https://secure.shippingapis.com/ShippingAPI.dll', { API: 'TrackV2', XML: request, }) end |