usps-ruby-client 0.1.0 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,78 +6,43 @@ module Usps
6
6
  module Api
7
7
  module Endpoints
8
8
  module IntlRateV2
9
- #
10
- # International Rates API
11
- #
12
9
  # The
13
10
  # IntlRateV2 API lets customers calculate the rate for international packages and
14
11
  # envelopes given the weight and dimensions of the item. The IntlRateV2 API
15
12
  # limits the data requested to twenty-five (25) packages per transaction. For
16
13
  # specifications such as package dimensions, delivery information, etc, please refer to the International Mail Manual (IMM) at
17
14
  # http://pe.usps.com/.
18
- #
19
- # @option option [(Alias)] :IntlRateV2Request (Required)
20
- # - API=IntlRateV2 This API returns the current international USPS postage corresponding to the parameters given.
21
- # @option option [String] :Revision (Optional)
22
- # - Set this value to “2” to return all currently documented response fields. For example: <Revision>2</Revsion>
23
- # @option option [(Group)] :Package (Optional)
24
- # - Opening Package tag.
25
- # @option option [NMTOKEN] :ID (Required)
26
- # - No restriction on number or type of characters provided valid XML syntax and unique to request. For example: <Package ID="0">...</Package>
27
- # @option option [Integer] :Pounds (Required)
28
- # - Value must be numeric. Package weight generally cannot exceed 70 pounds. Maximum Decimal places are 8. Refer to the International Mail Manual (IMM) for weight requirements per country and mail service. The IMM can be found at the Postal Explorer web site. For example: <Pounds>2</Pounds> <Pounds>2.12345678</Pounds>
29
- # @option option [Decimal] :Ounces (Required)
30
- # - Value must be numeric. Package weight generally cannot exceed 70 pounds. Maximum Decimal places are 8. Refer to the International Mail Manual (IMM) for weight requirements per country and mail service. The IMM can be found at the Postal Explorer web site. For example: <Ounces>4</Ounces> <Ounces>4.12345678</Ounces>
31
- # @option option [Boolean] :Machinable (Optional)
32
- # - Indicates whether or not the item is machinable. A surcharge is applied to a First-Class Mail International item if it has one or more non-machinable characteristics. See International Mail Manual (IMM) Section 241.217 for more information. For example: <Machinable>True</Machinable>
33
- # @option option [String] :MailType (Required)
34
- # - Package type being shipped. For example: <MailType>Package</MailType>
35
- # @option option [(Group)] :GXG (Optional)
36
- # - If GXG rate is desired, then this group must be specified. Note that if this data precludes delivery, due to size or availability of service at the destination, then GXG rates simply will not be returned (not an error condition.)
37
- # @option option [String] :POBoxFlag (Required)
38
- # - Specify as "Y" if the destination is a post office box. For example: <POBoxFlag>Y</POBoxFlag>
39
- # @option option [String] :GiftFlag (Required)
40
- # - Specify as "Y" if the package contains a gift. For example: <GiftFlag>Y</GiftFlag>
41
- # @option option [String] :ValueOfContents (Required)
42
- # - If specified, used to compute Insurance fee (if insurance is available for service and destination). For example: <ValueOfContents>103.00</ValueOfContents>
43
- # @option option [String] :Country (Required)
44
- # - Entries must be from the USPS list of valid countries from the International Country Listings. To access the International Country Listings, go to the Index of Countries and Localities. For example: <Country>Albania</Country>
45
- # @option option [String] :Container (Optional)
46
- # - Note: This tag has been deprecated. <Container> tag and any values within the <Container> tag will not result in an error response and will not impact rates that are returned.
47
- # @option option [String] :Size (Optional)
48
- # - Note: This tag has been deprecated <Size> tag and any values within the <Size> tag will not result in an error response and will not impact rates that are returned.
49
- # @option option [Integer] :Width (Optional)
50
- # - Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
51
- # @option option [Integer] :Length (Optional)
52
- # - Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
53
- # @option option [Integer] :Height (Optional)
54
- # - Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
55
- # @option option [Integer] :Girth (Optional)
56
- # - Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
57
- # @option option [String] :OriginZip (Optional)
58
- # - Available when IntlRateV2Request [Revision='2']. Origin ZIP Code is required to determine Priority Mail International price to Canadian destinations and is used to determine mail-ability of Global Express Guaranteed. When provided, the response will return a list of Post Office locations where GXG is accepted. The Origin ZIP Code must be valid. For example: <OriginZip>20770</OriginZip>
59
- # @option option [String] :CommercialFlag (Optional)
60
- # - Returns commercial base postage. For example: <CommercialFlag>Y<CommercialFlag>
61
- # @option option [String] :CommercialPlusFlag (Optional)
62
- # - Returns commercial plus postage. For example: <CommercialPlusFlag>Y<CommercialPlusFlag>
63
- # @option option [(Group)] :ExtraServices (Optional)
64
- # - Available when IntlRateV2Request[Revision='2']. Groups the ExtraService elements.
65
- # @option option [Extra Service Name] :ExtraService (Optional)
66
- # - [{"Extra Service Name"=>"Registered Mail", "ServiceID"=>"103"}, {"Extra Service Name"=>"Insurance – Global Express Guaranteed", "ServiceID"=>"106"}, {"Extra Service Name"=>"Insurance – Priority Mail International", "ServiceID"=>"108"}, {"Extra Service Name"=>"Return Receipt", "ServiceID"=>"105"}, {"Extra Service Name"=>"Certificate of Mailing", "ServiceID"=>"100"}, {"Extra Service Name"=>"Electronic USPS Delivery Confirmation International", "ServiceID"=>"109"}]
67
- # @option option [DateTime] :AcceptanceDateTime (Optional)
68
- # - Available when IntlRateV2Request[Revision='2']. Date and Time the package is accepted by USPS. The AcceptanceDateTime tag along with the DestinationPostalCode and OriginZip is used to calculate the GuaranteeAvailability and also GuaranteeAvailability response tag for PMEI services in Kahala countries. ISO 8601 formatted date. YYYY-MM-DDThh:mm:ss+/-hh:mm For example, 2014-01-22T14:30:51-06:00
69
- # @option option [String] :DestinationPostalCode (Optional)
70
- # - Available when IntlRateV2Request[Revision='2']. Destination Postal Code The AcceptanceDateTime tag along with the DestinationPostalCode and OriginZip is used to calculate the GuaranteeAvailability and also GuaranteeAvailability response tag for PMEI services in Kahala countries.
71
- # @option option [(Group)] :Content (Optional)
72
- # - Used to describe the contents of the package.
73
- # @option option [String] :ContentType (Optional)
74
- # - Contains the enumerated description of the items in the package. “NonnegotiableDocument” and “Documents” both signify mailable non-negotiable documents and are insured automatically for up to $100, though Insurance will not be returned as an extra service. Additional Insurance cannot be purchased. Any non-document ContentType values are insured automatically for up to $200 and Insurance will be returned as an explicit extra service in the response. Additional Insurance can be purchased for values $200 and greater.
75
- # @option option [String] :ContentDescription (Optional)
76
- # - For future use
77
-
78
- #
79
- # @see
80
- def intl_rate_v2(options = {})
15
+ # @param [Hash] options
16
+ # @option options [required, Hash] intl_rate_v2_request API=IntlRateV2 This API returns the current international USPS postage corresponding to the parameters given.
17
+ # * *:revision* (String) Set this value to “2” to return all currently documented response fields. For example: <Revision>2</Revsion>
18
+ # * *:package* (Hash) Opening Package tag.
19
+ # * *:id* (required, NMTOKEN) No restriction on number or type of characters provided valid XML syntax and unique to request. For example: <Package ID="0">...</Package>
20
+ # * *:pounds* (required, Integer) — Value must be numeric. Package weight generally cannot exceed 70 pounds. Maximum Decimal places are 8. Refer to the International Mail Manual (IMM) for weight requirements per country and mail service. The IMM can be found at the Postal Explorer web site. For example: <Pounds>2</Pounds> <Pounds>2.12345678</Pounds>
21
+ # * *:ounces* (required, Decimal) — Value must be numeric. Package weight generally cannot exceed 70 pounds. Maximum Decimal places are 8. Refer to the International Mail Manual (IMM) for weight requirements per country and mail service. The IMM can be found at the Postal Explorer web site. For example: <Ounces>4</Ounces> <Ounces>4.12345678</Ounces>
22
+ # * *:machinable* (Boolean) Indicates whether or not the item is machinable. A surcharge is applied to a First-Class Mail International item if it has one or more non-machinable characteristics. See International Mail Manual (IMM) Section 241.217 for more information. For example: <Machinable>True</Machinable>
23
+ # * *:mail_type* (required, String) Package type being shipped. For example: <MailType>Package</MailType>
24
+ # * *:gxg* (Hash) If GXG rate is desired, then this group must be specified. Note that if this data precludes delivery, due to size or availability of service at the destination, then GXG rates simply will not be returned (not an error condition.)
25
+ # * *:po_box_flag* (required, String) Specify as "Y" if the destination is a post office box. For example: <POBoxFlag>Y</POBoxFlag>
26
+ # * *:gift_flag* (required, String) — Specify as "Y" if the package contains a gift. For example: <GiftFlag>Y</GiftFlag>
27
+ # * *:value_of_contents* (required, String) If specified, used to compute Insurance fee (if insurance is available for service and destination). For example: <ValueOfContents>103.00</ValueOfContents>
28
+ # * *:country* (required, String) — Entries must be from the USPS list of valid countries from the International Country Listings. To access the International Country Listings, go to the Index of Countries and Localities. For example: <Country>Albania</Country>
29
+ # * *:container* (String) Note: This tag has been deprecated. <Container> tag and any values within the <Container> tag will not result in an error response and will not impact rates that are returned.
30
+ # * *:size* (String) — Note: This tag has been deprecated <Size> tag and any values within the <Size> tag will not result in an error response and will not impact rates that are returned.
31
+ # * *:width* (Integer) — Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
32
+ # * *:length* (Integer) Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
33
+ # * *:height* (Integer) — Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
34
+ # * *:girth* (Integer) Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
35
+ # * *:origin_zip* (String) — Available when IntlRateV2Request [Revision='2']. Origin ZIP Code is required to determine Priority Mail International price to Canadian destinations and is used to determine mail-ability of Global Express Guaranteed. When provided, the response will return a list of Post Office locations where GXG is accepted. The Origin ZIP Code must be valid. For example: <OriginZip>20770</OriginZip>
36
+ # * *:commercial_flag* (String) — Returns commercial base postage. For example: <CommercialFlag>Y<CommercialFlag>
37
+ # * *:commercial_plus_flag* (String) Returns commercial plus postage. For example: <CommercialPlusFlag>Y<CommercialPlusFlag>
38
+ # * *:extra_services* (Hash) — Available when IntlRateV2Request[Revision='2']. Groups the ExtraService elements.
39
+ # * *:extra_service* (Extra Service Name) — [{"Extra Service Name"=>"Registered Mail", "ServiceID"=>"103"}, {"Extra Service Name"=>"Insurance Global Express Guaranteed", "ServiceID"=>"106"}, {"Extra Service Name"=>"Insurance Priority Mail International", "ServiceID"=>"108"}, {"Extra Service Name"=>"Return Receipt", "ServiceID"=>"105"}, {"Extra Service Name"=>"Certificate of Mailing", "ServiceID"=>"100"}, {"Extra Service Name"=>"Electronic USPS Delivery Confirmation International", "ServiceID"=>"109"}]
40
+ # * *:acceptance_date_time* (DateTime) — Available when IntlRateV2Request[Revision='2']. Date and Time the package is accepted by USPS. The AcceptanceDateTime tag along with the DestinationPostalCode and OriginZip is used to calculate the GuaranteeAvailability and also GuaranteeAvailability response tag for PMEI services in Kahala countries. ISO 8601 formatted date. YYYY-MM-DDThh:mm:ss+/-hh:mm For example, 2014-01-22T14:30:51-06:00
41
+ # * *:destination_postal_code* (String) Available when IntlRateV2Request[Revision='2']. Destination Postal Code The AcceptanceDateTime tag along with the DestinationPostalCode and OriginZip is used to calculate the GuaranteeAvailability and also GuaranteeAvailability response tag for PMEI services in Kahala countries.
42
+ # * *:content* (Hash) Used to describe the contents of the package.
43
+ # * *:content_type* (String) Contains the enumerated description of the items in the package. “NonnegotiableDocument” and “Documents” both signify mailable non-negotiable documents and are insured automatically for up to $100, though Insurance will not be returned as an extra service. Additional Insurance cannot be purchased. Any non-document ContentType values are insured automatically for up to $200 and Insurance will be returned as an explicit extra service in the response. Additional Insurance can be purchased for values $200 and greater.
44
+ # * *:content_description* (String) For future use
45
+ def intl_rate_v2(options = {})
81
46
  throw ArgumentError.new('Required arguments :intl_rate_v2_request missing') if options[:intl_rate_v2_request].nil?
82
47
 
83
48
  request = build_request(:intl_rate_v2, options)
@@ -6,9 +6,6 @@ module Usps
6
6
  module Api
7
7
  module Endpoints
8
8
  module PTSEmail
9
- #
10
- # Track and Confirm by Email API
11
- #
12
9
  # The Track and Confirm by
13
10
  # Email API allows the customer to submit their email address to be notified of
14
11
  # current or future tracking activity. When you request access for this API,
@@ -16,23 +13,20 @@ module Usps
16
13
  # utilizing this API. A mailer identification number (MID) is a 6 or 9-digit
17
14
  # number assigned to a customer through the USPS Business Customer Gateway (BCG).
18
15
  # Please refer to the following links for help:
19
- #
20
- # @option option [(Alias)] :PTSEmailRequest (Required)
21
- # @option option [String] :TrackId (Required)
22
- # @option option [String] :ClientIp (Optional)
23
- # @option option [String] :SourceId (Optional)
24
- # @option option [Integer] :MpSuffix (Required)
25
- # @option option [String] :MpDate (Required)
26
- # @option option [Request Type] :RequestType (Optional)
27
- # @option option [String] :FirstName (Optional)
28
- # @option option [String] :LastName (Optional)
29
- # @option option [String] :Email1 (Required)
30
- # @option option [String] :Email2 (Optional)
31
- # @option option [String] :Email3 (Optional)
32
-
33
- #
34
- # @see
35
- def pts_email(options = {})
16
+ # @param [Hash] options
17
+ # @option options [required, Hash] pts_email_request
18
+ # * *:track_id* (required, String)
19
+ # * *:client_ip* (String)
20
+ # * *:source_id* (String)
21
+ # * *:mp_suffix* (required, Integer)
22
+ # * *:mp_date* (required, String)
23
+ # * *:request_type* (Request Type)
24
+ # * *:first_name* (String)
25
+ # * *:last_name* (String)
26
+ # * *:email1* (required, String)
27
+ # * *:email2* (String)
28
+ # * *:email3* (String)
29
+ def pts_email(options = {})
36
30
  throw ArgumentError.new('Required arguments :pts_email_request missing') if options[:pts_email_request].nil?
37
31
  throw ArgumentError.new('Required arguments :pts_email_request, :track_id missing') if options[:pts_email_request][:track_id].nil?
38
32
  throw ArgumentError.new('Required arguments :pts_email_request, :mp_suffix missing') if options[:pts_email_request][:mp_suffix].nil?
@@ -6,9 +6,6 @@ module Usps
6
6
  module Api
7
7
  module Endpoints
8
8
  module PTSPod
9
- #
10
- # Proof of Delivery API
11
- #
12
9
  # Proof of
13
10
  # Delivery is a letter that includes the recipient's name and a copy of their
14
11
  # signature. The Proof of Delivery API
@@ -17,32 +14,29 @@ module Usps
17
14
  # mailer ID and how you will be utilizing this API. A mailer identification
18
15
  # number (MID) is a 6 or 9-digit number assigned to a customer through the USPS
19
16
  # Business Customer Gateway (BCG). Please refer to the following links for help:
20
- #
21
- # @option option [(Alias)] :PTSPodRequest (Optional)
22
- # @option option [String] :TrackId (Required)
23
- # @option option [String] :ClientIp (Optional)
24
- # @option option [String] :SourceId (Optional)
25
- # @option option [integer] :MpSuffix (Required)
26
- # @option option [String] :MpDate (Required)
27
- # @option option [String] :RequestType (Required)
28
- # @option option [String] :FirstName (Required)
29
- # @option option [String] :LastName (Required)
30
- # @option option [String] :Email1 (Optional)
31
- # @option option [String] :Email2 (Optional)
32
- # @option option [String] :Email3 (Optional)
33
- # @option option [String] :FaxNumber (Optional)
34
- # @option option [String] :AddressLine1 (Optional)
35
- # @option option [String] :AddressLine2 (Optional)
36
- # @option option [String] :City (Optional)
37
- # @option option [String] :State (Optional)
38
- # @option option [String] :Zip (Optional)
39
- # @option option [Boolean] :VerifyAddress (Optional)
40
- # @option option [String] :TableCode (Required)
41
- # @option option [String] :CustRegID (Optional)
42
-
43
- #
44
- # @see
45
- def pts_pod(options = {})
17
+ # @param [Hash] options
18
+ # @option options [required, Hash] pts_pod_request
19
+ # * *:track_id* (required, String)
20
+ # * *:client_ip* (String)
21
+ # * *:source_id* (String)
22
+ # * *:mp_suffix* (required, integer)
23
+ # * *:mp_date* (required, String)
24
+ # * *:request_type* (required, String)
25
+ # * *:first_name* (required, String)
26
+ # * *:last_name* (required, String)
27
+ # * *:email1* (String)
28
+ # * *:email2* (String)
29
+ # * *:email3* (String)
30
+ # * *:fax_number* (String)
31
+ # * *:address_line1* (String)
32
+ # * *:address_line2* (String)
33
+ # * *:city* (String)
34
+ # * *:state* (String)
35
+ # * *:zip* (String)
36
+ # * *:verify_address* (Boolean)
37
+ # * *:table_code* (required, String)
38
+ # * *:cust_reg_id* (String)
39
+ def pts_pod(options = {})
46
40
  request = build_request(:pts_pod, options)
47
41
  get('https://secure.shippingapis.com/ShippingAPI.dll', {
48
42
  API: 'PTSPod',
@@ -6,28 +6,22 @@ module Usps
6
6
  module Api
7
7
  module Endpoints
8
8
  module PTSRre
9
- #
10
- # Return Receipt Electronic API
11
- #
12
9
  # Overview
13
- #
14
- # @option option [(Alias)] :PTSRreRequest (Required)
15
- # @option option [String] :TrackId (Required)
16
- # @option option [String] :ClientIp (Optional)
17
- # @option option [String] :SourceId (Optional)
18
- # @option option [integer] :MpSuffix (Required)
19
- # @option option [String] :MpDate (Required)
20
- # @option option [String] :FirstName (Required)
21
- # @option option [String] :LastName (Required)
22
- # @option option [String] :Email1 (Required)
23
- # @option option [String] :Email2 (Optional)
24
- # @option option [String] :Email3 (Optional)
25
- # @option option [String] :TableCode (Required)
26
- # @option option [String] :CustRegID (Optional)
27
-
28
- #
29
- # @see
30
- def pts_rre(options = {})
10
+ # @param [Hash] options
11
+ # @option options [required, Hash] pts_rre_request
12
+ # * *:track_id* (required, String)
13
+ # * *:client_ip* (String)
14
+ # * *:source_id* (String)
15
+ # * *:mp_suffix* (required, integer)
16
+ # * *:mp_date* (required, String)
17
+ # * *:first_name* (required, String)
18
+ # * *:last_name* (required, String)
19
+ # * *:email1* (required, String)
20
+ # * *:email2* (String)
21
+ # * *:email3* (String)
22
+ # * *:table_code* (required, String)
23
+ # * *:cust_reg_id* (String)
24
+ def pts_rre(options = {})
31
25
  throw ArgumentError.new('Required arguments :pts_rre_request missing') if options[:pts_rre_request].nil?
32
26
  throw ArgumentError.new('Required arguments :pts_rre_request, :track_id missing') if options[:pts_rre_request][:track_id].nil?
33
27
  throw ArgumentError.new('Required arguments :pts_rre_request, :mp_suffix missing') if options[:pts_rre_request][:mp_suffix].nil?
@@ -6,29 +6,23 @@ module Usps
6
6
  module Api
7
7
  module Endpoints
8
8
  module PTSTPod
9
- #
10
- # Track Proof of Delivery API
11
- #
12
9
  # Overview
13
- #
14
- # @option option [(Alias)] :PTSTPodRequest (Required)
15
- # @option option [String] :TrackId (Required)
16
- # @option option [integer] :MpSuffix (Required)
17
- # @option option [String] :MpDate (Required)
18
- # @option option [String] :RequestType (Required)
19
- # @option option [String] :FirstName (Required)
20
- # @option option [String] :LastName (Required)
21
- # @option option [String] :Email1 (Optional)
22
- # @option option [String] :Email2 (Optional)
23
- # @option option [String] :Email3 (Optional)
24
- # @option option [String] :CustRegID (Required)
25
- # @option option [String] :TableCode (Required)
26
- # @option option [String] :ClientIp (Optional)
27
- # @option option [String] :SourceId (Optional)
28
-
29
- #
30
- # @see
31
- def ptst_pod(options = {})
10
+ # @param [Hash] options
11
+ # @option options [required, Hash] ptst_pod_request
12
+ # * *:track_id* (required, String)
13
+ # * *:mp_suffix* (required, integer)
14
+ # * *:mp_date* (required, String)
15
+ # * *:request_type* (required, String)
16
+ # * *:first_name* (required, String)
17
+ # * *:last_name* (required, String)
18
+ # * *:email1* (String)
19
+ # * *:email2* (String)
20
+ # * *:email3* (String)
21
+ # * *:cust_reg_id* (required, String)
22
+ # * *:table_code* (required, String)
23
+ # * *:client_ip* (String)
24
+ # * *:source_id* (String)
25
+ def ptst_pod(options = {})
32
26
  throw ArgumentError.new('Required arguments :ptst_pod_request missing') if options[:ptst_pod_request].nil?
33
27
  throw ArgumentError.new('Required arguments :ptst_pod_request, :track_id missing') if options[:ptst_pod_request][:track_id].nil?
34
28
  throw ArgumentError.new('Required arguments :ptst_pod_request, :mp_suffix missing') if options[:ptst_pod_request][:mp_suffix].nil?
@@ -6,82 +6,44 @@ module Usps
6
6
  module Api
7
7
  module Endpoints
8
8
  module RateV4
9
- #
10
- # Domestic Rates API
11
- #
12
9
  # The RateV4 API lets customers calculate the
13
10
  # rate for domestic packages and envelopes given the weight and dimensions of the
14
11
  # item. The RateV4 API limits the data requested to twenty-five (25) packages per
15
12
  # transaction.
16
- #
17
- # @option option [(Alias)] :RateV4Request (Required)
18
- # - API=RateV4 This API returns the current USPS postage corresponding to the parameters given.
19
- # @option option [String] :Revision (Optional)
20
- # - Set this value to “2to return all currently documented response fields. For example: <Revision>2</Revsion>
21
- # @option option [(Group)] :Package (Optional)
22
- # - See the RateV4 Service Request chart for valid combinations of the following tags.
23
- # @option option [String] :Service (Required)
24
- # - Web Tools validates the entry to one of the service types. For example: <Service>PRIORITY MAIL EXPRESS</Service> Please see Appendix A for detailed business rules regarding combinations of Service, Container, dimensions and other request values. Note: Mailable matter not required to be mailed as First-Class Mail is permitted with Retail Ground to Zones 5-9. Zones 1-4 items are limited to mailable hazardous materials, live animals, and other “surface-only” items. Retail Ground can only be used for Zones 5-9 unless the shipment is oversized or contains classes of materials. (e.g. certain HAZMAT) For more details, see: http://pe.usps.com/businessmail101/classes/packageServices.htm. Note: The use of <Service> = “BPM” is restricted. If access to this service is needed, please reach out to the following email address: webtools@usps.gov.
25
- # @option option [String] :FirstClassMailType (Optional)
26
- # - Required when: RateV4Request[Service='FIRST CLASS'] or RateV4Request[Service='FIRST CLASS COMMERCIAL’], or RateV4Request[Service='FIRST CLASS HFP COMMERCIAL’] Example: <FirstClassMailType>LETTER</FirstClassMailType> Note: The <FirstClassMailType> tag is returned only if the <ServiceType> submitted is “First Class”. If any other <ServiceType> is returned (IncludingFirst Class Commercial”) the <Container> tag is used. Note: Flats are also known as Large Envelopes
27
- # @option option [String] :ZipOrigination (Required)
28
- # - ZIP code must be valid. For example: <ZipOrigination>20770</ZipOrigination>
29
- # @option option [String] :ZipDestination (Required)
30
- # - ZIP code must be valid. For example: <ZipDestination>54324</ZipDestination>
31
- # @option option [String] :Pounds (Required)
32
- # - Value must be numeric. Package weight cannot exceed 70 pounds. For example: <Pounds>2</Pounds> <Pounds>2.12345678</Pounds>
33
- # @option option [String] :Ounces (Required)
34
- # - Value must be numeric. Package weight cannot exceed 70 pounds (1120 ounces). For example: <Ounces>0</Ounces> <Ounces>0.12345678</Ounces>
35
- # @option option [String] :Container (Required)
36
- # - Use to specify container attributes that may affect postage; otherwise, leave blank. Note: The <FirstClassMailType> tag is used instead of the <Container> tag only if the <ServiceType> submitted is “First Class”. Note: “Cubic Soft Pack” and “Cubic Parcels” are only valid containers for service “Priority Mail Cubic”. Dimensions Length and Height are required when requesting Cubic Soft Pack. Dimensions Length, Height, and Width are required when requesting Cubic Parcels. Note: “VARIABLE” is used to denote that a customer is using packaging other than a USPS-produced Flat Rate Box/Envelope or Regional Rate Box”.
37
- # @option option [String] :Size (Optional)
38
- # - Note: This tag has been deprecated. <Size> tag and any values within the <Size> tag will not result in an error response and will not impact rates that are returned.
39
- # @option option [Decimal] :Width (Optional)
40
- # - Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
41
- # @option option [Decimal] :Length (Optional)
42
- # - Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
43
- # @option option [Decimal] :Height (Optional)
44
- # - Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
45
- # @option option [Decimal] :Girth (Optional)
46
- # - Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
47
- # @option option [String] :Value (Optional)
48
- # - Available when RateV4Request [Revision='2']. Package value. Used to determine availability and cost of extra services. For example: <Value>150.00</Value>
49
- # @option option [String] :AmountToCollect (Optional)
50
- # - Available when RateV4Request [Revision='2']. Collect on delivery amount. Used to determine availability and cost of extra services. For example: <AmountToCollect>150.00</AmountToCollect>
51
- # @option option [(Group)] :SpecialServices (Optional)
52
- # - Available when RateV4Request [Revision='2']. Groups the SpecialServices elements. Special Services prices and availability will not be returned when Service = “ALL”, “ONLINE”, or “PLUS”
53
- # @option option [Special Service Name] :SpecialService (Optional)
54
- # - [{"Special Service Name"=>"Insurance", "ServiceID"=>"100"}, {"Special Service Name"=>"Insurance – Priority Mail Express", "ServiceID"=>"101"}, {"Special Service Name"=>"Return Receipt", "ServiceID"=>"102"}, {"Special Service Name"=>"Collect on Delivery", "ServiceID"=>"103"}, {"Special Service Name"=>"Certificate of Mailing (Form 3665)", "ServiceID"=>"104"}, {"Special Service Name"=>"Certified Mail", "ServiceID"=>"105"}, {"Special Service Name"=>"USPS Tracking", "ServiceID"=>"106"}, {"Special Service Name"=>"Signature Confirmation", "ServiceID"=>"108"}, {"Special Service Name"=>"Registered Mail", "ServiceID"=>"109"}, {"Special Service Name"=>"Return Receipt Electronic", "ServiceID"=>"110"}, {"Special Service Name"=>"Registered mail COD collection Charge", "ServiceID"=>"112"}, {"Special Service Name"=>"Return Receipt – Priority Mail Express", "ServiceID"=>"118"}, {"Special Service Name"=>"Adult Signature Required", "ServiceID"=>"119"}, {"Special Service Name"=>"Adult Signature Restricted Delivery", "ServiceID"=>"120"}, {"Special Service Name"=>"Insurance – Priority Mail", "ServiceID"=>"125"}, {"Special Service Name"=>"USPS Tracking Electronic", "ServiceID"=>"155"}, {"Special Service Name"=>"Signature Confirmation Electronic", "ServiceID"=>"156"}, {"Special Service Name"=>"Certificate of Mailing (Form 3817)", "ServiceID"=>"160"}, {"Special Service Name"=>"Priority Mail Express 1030 AM Delivery", "ServiceID"=>"161"}, {"Special Service Name"=>"Certified Mail Restricted Delivery", "ServiceID"=>"170"}, {"Special Service Name"=>"Certified Mail Adult Signature Required", "ServiceID"=>"171"}, {"Special Service Name"=>"Certified Mail Adult Signature Restricted Delivery", "ServiceID"=>"172"}, {"Special Service Name"=>"Signature Confirm. Restrict. Delivery", "ServiceID"=>"173"}, {"Special Service Name"=>"Signature Confirmation Electronic Restricted Delivery", "ServiceID"=>"174"}, {"Special Service Name"=>"Collect on Delivery Restricted Delivery", "ServiceID"=>"175"}, {"Special Service Name"=>"Registered Mail Restricted Delivery", "ServiceID"=>"176"}, {"Special Service Name"=>"Insurance Restricted Delivery", "ServiceID"=>"177"}, {"Special Service Name"=>"Insurance Restrict. Delivery – Priority Mail", "ServiceID"=>"179"}, {"Special Service Name"=>"Insurance Restrict. Delivery – Priority Mail Express", "ServiceID"=>"178"}, {"Special Service Name"=>"Insurance Restrict. Delivery (Bulk Only)", "ServiceID"=>"180"}, {"Special Service Name"=>"Scan Retention", "ServiceID"=>"181"}, {"Special Service Name"=>"Scan + Signature Retention", "ServiceID"=>"182"}, {"Special Service Name"=>"Special Handling - Fragile", "ServiceID"=>"190"}]
55
- # @option option [Group] :Content (Optional)
56
- # - Available when RateV4Request[Revision='2']. Groups the ContentType and ContentDescription elements.
57
- # @option option [String] :ContentType (Optional)
58
- # - Available when RateV4Request [Revision=’2’]. Defines the type of content of the package.
59
- # @option option [String] :ContentDescription (Optional)
60
- # - Available when RateV4Request[Revision=’2’]. Describes the content of the package. Optional but required for ContentType ‘LIVES’.
61
- # @option option [Boolean] :GroundOnly (Optional)
62
- # - Available when RateV4Request [Revision=’2’]. RateV4Request [Service=’ Retail Ground’] Use “true” when shipment contains mailable hazardous materials, live animals and other “surface-only” items.
63
- # @option option [String] :SortBy (Optional)
64
- # - Available when RateV4Request [Revision='2']. Returns all mailing services available based on item shape. When specified, value in <Container> is ignored. Available when: RateV4Request[Service='ALL'] RateV4Request[Service='ONLINE'] For example: <SortBy>PACKAGE</SortBy>
65
- # @option option [Boolean] :Machinable (Optional)
66
- # - RateV4Request/Machinable is required when: RateV4Request[Service='FIRST CLASS' and (FirstClassMailType='LETTER' or FirstClassMailType='FLAT')] RateV4Request[Service='Retail Ground’] RateV4Request[Service='ALL'] RateV4Request[Service='ONLINE'] If false, First Class Mail Letters and Flats will not be returned. For example: <Machinable>true</Machinable>
67
- # @option option [Boolean] :ReturnLocations (Optional)
68
- # - Include Dropoff Locations in Response if available. Requires "ShipDate" tag.
69
- # @option option [Boolean] :ReturnServiceInfo (Optional)
70
- # - If a value of “True” is indicated in the request then the response will include the <ServiceInformation> tag containing mail service specific information
71
- # @option option [String] :DropOffTime (Optional)
72
- # - Time Package Will Be Mailed. Enter drop off time in format: HH:mm, such as 13:45. Inclusion of Drop Off Time will result increased accuracy of <CommitmentName> and <CommitmentDate> in the response for Priority Mail and Priority Mail Express variants. For example: <DropOffTime>13:45</DropOffTime>
73
- # @option option [String] :ShipDate (Optional)
74
- # - Date Package Will Be Mailed. Ship date may be today plus 0 to 3 days in advance. Enter the date in format: yyyy-mm-dd, such as 2013-07-28. Inclusion of Ship Date will result in <CommitmentName> and <CommitmentDate> in the response for Priority Mail and Priority Mail Express variants For example: <ShipDate Option="HFP">2013-07-28</ShipDate>
75
- # @option option [String] :Option (Optional)
76
- # - The value of this attribute specifies how the RateV4Response will structure the Priority Express Mail Commitment data elements.
77
- # @option option [Boolean] :ReturnDimensionalWeight (Optional)
78
- # - This tag must be explicitly set to “true” for dimensional weight to be returned in the xml response.
79
- # @option option [String] :TrackingRetentionPeriod (Optional)
80
- # - Used to determine period of Retention for tracking data
81
-
82
- #
83
- # @see
84
- def rate_v4(options = {})
13
+ # @param [Hash] options
14
+ # @option options [required, Hash] rate_v4_request API=RateV4 This API returns the current USPS postage corresponding to the parameters given.
15
+ # * *:revision* (String) Set this value to “2” to return all currently documented response fields. For example: <Revision>2</Revsion>
16
+ # * *:package* (Hash) See the RateV4 Service Request chart for valid combinations of the following tags.
17
+ # * *:service* (required, String) — Web Tools validates the entry to one of the service types. For example: <Service>PRIORITY MAIL EXPRESS</Service> Please see Appendix A for detailed business rules regarding combinations of Service, Container, dimensions and other request values. Note: Mailable matter not required to be mailed as First-Class Mail is permitted with Retail Ground to Zones 5-9. Zones 1-4 items are limited to mailable hazardous materials, live animals, and other surface-onlyitems. Retail Ground can only be used for Zones 5-9 unless the shipment is oversized or contains classes of materials. (e.g. certain HAZMAT) For more details, see: http://pe.usps.com/businessmail101/classes/packageServices.htm. Note: The use of <Service> = “BPM” is restricted. If access to this service is needed, please reach out to the following email address: webtools@usps.gov.
18
+ # * *:first_class_mail_type* (String) — Required when: RateV4Request[Service='FIRST CLASS'] or RateV4Request[Service='FIRST CLASS COMMERCIAL’], or RateV4Request[Service='FIRST CLASS HFP COMMERCIAL’] Example: <FirstClassMailType>LETTER</FirstClassMailType> Note: The <FirstClassMailType> tag is returned only if the <ServiceType> submitted is “First Class”. If any other <ServiceType> is returned (Including “First Class Commercial”) the <Container> tag is used. Note: Flats are also known as Large Envelopes
19
+ # * *:zip_origination* (required, String) ZIP code must be valid. For example: <ZipOrigination>20770</ZipOrigination>
20
+ # * *:zip_destination* (required, String) — ZIP code must be valid. For example: <ZipDestination>54324</ZipDestination>
21
+ # * *:pounds* (required, String) Value must be numeric. Package weight cannot exceed 70 pounds. For example: <Pounds>2</Pounds> <Pounds>2.12345678</Pounds>
22
+ # * *:ounces* (required, String) Value must be numeric. Package weight cannot exceed 70 pounds (1120 ounces). For example: <Ounces>0</Ounces> <Ounces>0.12345678</Ounces>
23
+ # * *:container* (required, String) Use to specify container attributes that may affect postage; otherwise, leave blank. Note: The <FirstClassMailType> tag is used instead of the <Container> tag only if the <ServiceType> submitted is “First Class”. Note: “Cubic Soft Pack” and “Cubic Parcels” are only valid containers for service Priority Mail Cubic”. Dimensions Length and Height are required when requesting Cubic Soft Pack. Dimensions Length, Height, and Width are required when requesting Cubic Parcels. Note: “VARIABLE” is used to denote that a customer is using packaging other than a USPS-produced Flat Rate Box/Envelope or Regional Rate Box”.
24
+ # * *:size* (String) — Note: This tag has been deprecated. <Size> tag and any values within the <Size> tag will not result in an error response and will not impact rates that are returned.
25
+ # * *:width* (Decimal) — Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
26
+ # * *:length* (Decimal) Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
27
+ # * *:height* (Decimal) — Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
28
+ # * *:girth* (Decimal) Value must be numeric. Units are inches. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non-rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non-rectangular packages. For more details on dimensional weight pricing, please reference the Domestic Mail Manual Section 123.1.4 for Retail Mail and Section 223.1.6 for Commercial Mail. https://pe.usps.com/text/dmm300/index.htm
29
+ # * *:value* (String) Available when RateV4Request [Revision='2']. Package value. Used to determine availability and cost of extra services. For example: <Value>150.00</Value>
30
+ # * *:amount_to_collect* (String) — Available when RateV4Request [Revision='2']. Collect on delivery amount. Used to determine availability and cost of extra services. For example: <AmountToCollect>150.00</AmountToCollect>
31
+ # * *:special_services* (Hash) Available when RateV4Request [Revision='2']. Groups the SpecialServices elements. Special Services prices and availability will not be returned when Service = “ALL”, “ONLINE”, or “PLUS”
32
+ # * *:special_service* (Special Service Name) — [{"Special Service Name"=>"Insurance", "ServiceID"=>"100"}, {"Special Service Name"=>"Insurance – Priority Mail Express", "ServiceID"=>"101"}, {"Special Service Name"=>"Return Receipt", "ServiceID"=>"102"}, {"Special Service Name"=>"Collect on Delivery", "ServiceID"=>"103"}, {"Special Service Name"=>"Certificate of Mailing (Form 3665)", "ServiceID"=>"104"}, {"Special Service Name"=>"Certified Mail", "ServiceID"=>"105"}, {"Special Service Name"=>"USPS Tracking", "ServiceID"=>"106"}, {"Special Service Name"=>"Signature Confirmation", "ServiceID"=>"108"}, {"Special Service Name"=>"Registered Mail", "ServiceID"=>"109"}, {"Special Service Name"=>"Return Receipt Electronic", "ServiceID"=>"110"}, {"Special Service Name"=>"Registered mail COD collection Charge", "ServiceID"=>"112"}, {"Special Service Name"=>"Return Receipt – Priority Mail Express", "ServiceID"=>"118"}, {"Special Service Name"=>"Adult Signature Required", "ServiceID"=>"119"}, {"Special Service Name"=>"Adult Signature Restricted Delivery", "ServiceID"=>"120"}, {"Special Service Name"=>"Insurance – Priority Mail", "ServiceID"=>"125"}, {"Special Service Name"=>"USPS Tracking Electronic", "ServiceID"=>"155"}, {"Special Service Name"=>"Signature Confirmation Electronic", "ServiceID"=>"156"}, {"Special Service Name"=>"Certificate of Mailing (Form 3817)", "ServiceID"=>"160"}, {"Special Service Name"=>"Priority Mail Express 1030 AM Delivery", "ServiceID"=>"161"}, {"Special Service Name"=>"Certified Mail Restricted Delivery", "ServiceID"=>"170"}, {"Special Service Name"=>"Certified Mail Adult Signature Required", "ServiceID"=>"171"}, {"Special Service Name"=>"Certified Mail Adult Signature Restricted Delivery", "ServiceID"=>"172"}, {"Special Service Name"=>"Signature Confirm. Restrict. Delivery", "ServiceID"=>"173"}, {"Special Service Name"=>"Signature Confirmation Electronic Restricted Delivery", "ServiceID"=>"174"}, {"Special Service Name"=>"Collect on Delivery Restricted Delivery", "ServiceID"=>"175"}, {"Special Service Name"=>"Registered Mail Restricted Delivery", "ServiceID"=>"176"}, {"Special Service Name"=>"Insurance Restricted Delivery", "ServiceID"=>"177"}, {"Special Service Name"=>"Insurance Restrict. Delivery – Priority Mail", "ServiceID"=>"179"}, {"Special Service Name"=>"Insurance Restrict. Delivery – Priority Mail Express", "ServiceID"=>"178"}, {"Special Service Name"=>"Insurance Restrict. Delivery (Bulk Only)", "ServiceID"=>"180"}, {"Special Service Name"=>"Scan Retention", "ServiceID"=>"181"}, {"Special Service Name"=>"Scan + Signature Retention", "ServiceID"=>"182"}, {"Special Service Name"=>"Special Handling - Fragile", "ServiceID"=>"190"}]
33
+ # * *:content* (Group) Available when RateV4Request[Revision='2']. Groups the ContentType and ContentDescription elements.
34
+ # * *:content_type* (String) — Available when RateV4Request [Revision=’2’]. Defines the type of content of the package.
35
+ # * *:content_description* (String) Available when RateV4Request[Revision=’2’]. Describes the content of the package. Optional but required for ContentType ‘LIVES’.
36
+ # * *:ground_only* (Boolean) — Available when RateV4Request [Revision=’2’]. RateV4Request [Service=’ Retail Ground’] Use “true” when shipment contains mailable hazardous materials, live animals and other “surface-only” items.
37
+ # * *:sort_by* (String) Available when RateV4Request [Revision='2']. Returns all mailing services available based on item shape. When specified, value in <Container> is ignored. Available when: RateV4Request[Service='ALL'] RateV4Request[Service='ONLINE'] For example: <SortBy>PACKAGE</SortBy>
38
+ # * *:machinable* (Boolean) — RateV4Request/Machinable is required when: RateV4Request[Service='FIRST CLASS' and (FirstClassMailType='LETTER' or FirstClassMailType='FLAT')] RateV4Request[Service='Retail Ground’] RateV4Request[Service='ALL'] RateV4Request[Service='ONLINE'] If false, First Class Mail Letters and Flats will not be returned. For example: <Machinable>true</Machinable>
39
+ # * *:return_locations* (Boolean) Include Dropoff Locations in Response if available. Requires "ShipDate" tag.
40
+ # * *:return_service_info* (Boolean) If a value of “True” is indicated in the request then the response will include the <ServiceInformation> tag containing mail service specific information
41
+ # * *:drop_off_time* (String) Time Package Will Be Mailed. Enter drop off time in format: HH:mm, such as 13:45. Inclusion of Drop Off Time will result increased accuracy of <CommitmentName> and <CommitmentDate> in the response for Priority Mail and Priority Mail Express variants. For example: <DropOffTime>13:45</DropOffTime>
42
+ # * *:ship_date* (String) — Date Package Will Be Mailed. Ship date may be today plus 0 to 3 days in advance. Enter the date in format: yyyy-mm-dd, such as 2013-07-28. Inclusion of Ship Date will result in <CommitmentName> and <CommitmentDate> in the response for Priority Mail and Priority Mail Express variants For example: <ShipDate Option="HFP">2013-07-28</ShipDate>
43
+ # * *:option* (String) The value of this attribute specifies how the RateV4Response will structure the Priority Express Mail Commitment data elements.
44
+ # * *:return_dimensional_weight* (Boolean) This tag must be explicitly set to “true” for dimensional weight to be returned in the xml response.
45
+ # * *:tracking_retention_period* (String) Used to determine period of Retention for tracking data
46
+ def rate_v4(options = {})
85
47
  throw ArgumentError.new('Required arguments :rate_v4_request missing') if options[:rate_v4_request].nil?
86
48
 
87
49
  request = build_request(:rate_v4, options)