usps-ruby-client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,220 +6,115 @@ module Usps
6
6
  module Api
7
7
  module Endpoints
8
8
  module EVSGXGGetLabel
9
- #
10
- # eVS GXG Get Label API
11
- #
12
9
  # Global
13
10
  # Express Guaranteed is our fastest international shipping service, with
14
11
  # transportation and delivery by FedEx Express. It features date-certain delivery
15
12
  # in 1-3 business days* to more than 190 countries with a money-back guarantee**
16
13
  # to all destinations. This document contains a Reference Guide to the eVS GXG
17
14
  # Get Label Request.
18
- #
19
- # @option option [(Alias)] :eVSGXGGetLabelRequest (Required)
20
- # @option option [Empty] :Option (Required)
21
- # - For future use.
22
- # @option option [String] :Revision (Optional)
23
- # - This is for versioning of the APIs and for triggering response tags for future versions. In this API use a value of 2 to trigger new functionality. For example: <Revision>1</Revision>
24
- # @option option [Empty] :ImageParameters (Required)
25
- # - For future use.
26
- # @option option [String] :FromFirstName (Required)
27
- # - First and Last Name must be sent. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: <FromFirstName>John</FromFirstName>
28
- # @option option [String] :FromMiddleInitial (Optional)
29
- # - First and Last Name must be sent. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: <FromMiddleInitial>L</FromMiddleInitial>
30
- # @option option [String] :FromLastName (Required)
31
- # - First and Last Name must be sent. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: <FromLastName>Doe</FromLastName>
32
- # @option option [String] :FromFirm (Required)
33
- # - Firm Name. For example: <FromFirm>USPS</FromFirm>
34
- # @option option [String] :FromAddress1 (Optional)
35
- # - Secondary address unit designator and number (such as an apartment or suite number (APT 202, STE 100). For example: <FromAddress1>APT 202</FromAddress1>
36
- # @option option [String] :FromAddress2 (Required)
37
- # - Street number and name (including predirectional, suffix, and postdirectional as shown in USPS ZIP+4 Product for the delivery address or rural route and box number (RR 5 BOX 10), highway contract route and box number (HC 4 BOX 45), or post office box number (PO BOX 458). For example: <FromAddress2>10 Elm Street </FromAddress2>
38
- # @option option [String] :FromUrbanization (Optional)
39
- # - Urbanization name (Puerto Rico only, ZIP Code prefixes 006 to 009, if area is so designated). For example: <FromUrbanization>URB Caparra Ter</FromUrbanization>
40
- # @option option [String] :FromCity (Required)
41
- # - City name. For example: <FromCity>Anytown</FromCity>
42
- # @option option [String] :FromState (Required)
43
- # - Use 2-letter USPS state abbreviation. For example: <FromState>PA</FromState>
44
- # @option option [String] :FromZIP5 (Required)
45
- # - Five-digit ZIP code. For example: <FromZip5>01234</FromZip5>
46
- # @option option [String] :FromZIP4 (Optional)
47
- # - Four-digit extension of ZIP+4 code. For example: <FromZip4>5678</FromZip4>
48
- # @option option [String] :FromPhone (Required)
49
- # - 10 digits Required (including area code), with no punctuation. Use format: 2125551234 For example: <FromPhone>5555555555</FromPhone>
50
- # @option option [String] :ShipFromZIP (Optional)
51
- # - Origin ZIP Code shall be accepted as component in request via "ShipFromZip" tag. For example: <ShipFromZIP>18701</ShipFromZIP>
52
- # @option option [String] :SenderEMail (Optional)
53
- # - E-mail address of sender. Valid e-mail addresses must be used. Note: No e-mail is returned when generating a Sample label request. For example: <SenderEMail>cpapple@email.com</SenderEMail>
54
- # @option option [String] :ToFirstName (Required)
55
- # - First and Last Name must be sent. Maximum Length: 36 characters total for First, and Last Names with space after first name. For example: <ToFirstName>John</ToFirstName>
56
- # @option option [String] :ToLastName (Required)
57
- # - First and Last Name must be sent. Maximum Length: 36 characters total for First, and Last Names with space after first name. For example: <ToLastName>John</ToLastName>
58
- # @option option [String] :ToFirm (Required)
59
- # - Firm Name. For example: <ToFirm>USPS</ToFirm>
60
- # @option option [String] :ToAddress1 (Optional)
61
- # - Three address lines are provided, but only 1 is Required. Use as many as needed for complete address.
62
- # @option option [String] :ToAddress2 (Required)
63
- # - Three address lines are provided, but only 1 is Required. Use as many as needed for complete address.
64
- # @option option [String] :ToAddress3 (Optional)
65
- # - Three address lines are provided, but only 1 is Required. Use as many as needed for complete address.
66
- # @option option [String] :ToPostalCode (Optional)
67
- # - Destination Postal Code. For example: <ToPostalCode> T2G 2W1</ToPostalCode>
68
- # @option option [String] :ToPhone (Optional)
69
- # - Up to 25 digits allowed with no punctuation. For example: <ToPhone>1234567890</ToPhone>
70
- # @option option [String] :RecipientEMail (Optional)
71
- # - E-mail address of recipient. Valid e-mail addresses must be used. Note: No e-mail is returned when generating a Sample label request. For example: <RecipientEMail>cpapple@email.com</RecipientEMail>
72
- # @option option [String] :ToDPID (Required)
73
- # - The Delivery Point ID as determined via the GXGGetDeliveryPoint API response. Please contact webtools@usps.gov for more information. For example: <ToDPID>142</ToDPID>
74
- # @option option [String] :ToProvince (Optional)
75
- # - Enter the province for the recipient. For example: <ToProvince>JALISCO</ToProvince>
76
- # @option option [String] :ToTaxID (Optional)
77
- # - Tax ID For example: <ToTaxID/>
78
- # @option option [String] :Container (Required)
79
- # - Container type. USPS refers to USPS-supplied large flat envelopes which incur weight-based postage. For example: <Container>LETTER</Container>
80
- # @option option [String] :ContentType (Required)
81
- # - Content type. For example: <ContentType>DOCUMENTS</ContentType>
82
- # @option option [(Group)] :ShippingContents (Required)
83
- # - Contents of package.
84
- # @option option [(Group)] :ItemDetail (Optional)
85
- # - One item detail per item type enclosed.
86
- # @option option [String] :Description (Required)
87
- # - Description of the item. For example: <Description>Policy guidelines document</Description>
88
- # @option option [String] :Commodity (Required)
89
- # - Commodity shall be a text String matching Commodity Name from GXGGetCommodityInfo. For example: <Commodity>Documents</Commodity>
90
- # @option option [(Group)] :Restriction (Optional)
91
- # - Allows integrators to pass restrictions information (responses to footnote questions) for each "Commodity/CommodityName."
92
- # @option option [String] :FootnoteNumber (Required)
93
- # - Number associated with the commodity restriction question returned from the Get Commodity Restrictions service. Using a number which does not pertain to the passed commodity and derived country will result in an error return. For example: <FootnoteNumber>196</FootnoteNumber>
94
- # @option option [String] :Response (Required)
95
- # - May affect the need to use a Commercial invoice, and/or the ability to continue the transaction at all. For example: <Response>Y</Response>
96
- # @option option [String] :Quantity (Required)
97
- # - Quantity of the item. For example: <Quantity>4</Quantity>
98
- # @option option [Decimal] :UnitValue (Required)
99
- # - The data entered with this tag provides the value of the one of items in this Item Detail. For example: <UnitValue>125.00</UnitValue>
100
- # @option option [Integer] :NetPounds (Optional)
101
- # - Rules: 1. If any <ItemDetail> contains either a <NetPounds> or <NetOunces> sub-tag, then all <ItemDetail> nodes must specify at least a <NetPounds> or <NetOunces> tag. 2. If the <NetPounds> and/or <NetOunces> are specified successfully, then those values will be used in the manifesting of the Customs Declarations. 3. If <NetPounds> and <NetOunces> are note specified, then the value for <NetPounds> and <NetOunces> for each customs declaration will be the <GrossPounds> and <GrossOunces> divided by the number of <ItemDetails> present.
102
- # @option option [Decimal] :NetOunces (Optional)
103
- # - Rules: 1. If any <ItemDetail> contains either a <NetPounds> or <NetOunces> sub-tag, then all <ItemDetail> nodes must specify at least a <NetPounds> or <NetOunces> tag. 2. If the <NetPounds> and/or <NetOunces> are specified successfully, then those values will be used in the manifesting of the Customs Declarations. 3. If <NetPounds> and <NetOunces> are note specified, then the value for <NetPounds> and <NetOunces> for each customs declaration will be the <GrossPounds> and <GrossOunces> divided by the number of <ItemDetails> present.
104
- # @option option [String] :UnitOfMeasure (Optional)
105
- # - Unit of Measure for item quantity. For example: <UnitOfMeasure>Dozen</UnitOfMeasure>
106
- # @option option [String] :HSTariffNumber (Optional)
107
- # - For commercial items only. If known, the HS tariff number must be based on the Harmonized Commodity Description and Coding System developed by the World Customs Organization. For example: <HSTariffNumber>123456</HSTariffNumber>
108
- # @option option [String] :CountryofManufacture (Optional)
109
- # - The country name entered must match an entry from the USPS-approved International Index of Countries and Localities or be "United States". Click on the link for "International Country Listings." Using a country name not on the list will result in a request failure. Required when CIRequired=”true”. For example: <CountryOfManufacture>United States</CountryOfManufacture>
110
- # @option option [String] :PurposeOfShipment (Required)
111
- # - Statement of shipment purpose. For example: <PurposeOfShipment>Gift</PurposeOfShipment>
112
- # @option option [String] :PartiesToTransaction (Optional)
113
- # - Defines relationship of parties to transaction. For example: <PartiesToTransaction>Related</PartiesToTransaction>
114
- # @option option [String] :Agreement (Required)
115
- # - Agreement to GXG service terms and conditions. For example: <Agreement>Y</Agreement>
116
- # @option option [Decimal] :Postage (Optional)
117
- # - Use this tag for entering the postage amount, if known, excluding extra services. If the value is blank, the postage will be automatically calculated using retail rates. For example: <Postage>137.95</Postage>
118
- # @option option [Decimal] :InsuredValue (Optional)
119
- # - If specified, InsuredValue is used to calculate the Insurance Fee. For example: <InsuredValue>180.00</InsuredValue>
120
- # @option option [Decimal] :GrossPounds (Optional)
121
- # - GrossPounds + (GrossOunces/16) must be less than 70. For example: <GrossPounds>40</GrossPounds>
122
- # @option option [Decimal] :GrossOunces (Optional)
123
- # - GrossPounds + (GrossOunces/16) must be less than 70. For example: <GrossOunces>5</GrossOunces>
124
- # @option option [Decimal] :Length (Optional)
125
- # - 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 for non-rectangular package. Please reference https://about.usps.com/postal-bulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing.
126
- # @option option [Decimal] :Width (Optional)
127
- # - 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 for non-rectangular packages. Please reference https://about.usps.com/postal-bulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing.
128
- # @option option [Decimal] :Height (Optional)
129
- # - 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 for non-rectangular package. Please reference https://about.usps.com/postal-bulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing.
130
- # @option option [Decimal] :Girth (Optional)
131
- # - 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 for non-rectangular package. Please reference https://about.usps.com/postal-bulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing.
132
- # @option option [String] :Shape (Optional)
133
- # - Required except when Container=” USPS”. Shape, plus the package's physical dimensions, help determine whether the scale weight or the dimensional weight is used to calculate the shipping cost. For example: <Shape>RECTANGULAR</Shape>
134
- # @option option [boolean] :CIRequired (Optional)
135
- # - Indicates if Commercial Invoice is Required. When CIRequired=” true”, commercial invoice image will be generated. For example: <CIRequired>true</CIRequired>
136
- # @option option [] :InvoiceDate (Optional)
137
- # - Invoice date. Required when CommercialShipment=” true”. For example: <InvoiceDate>01/01/2012</InvoiceDate>
138
- # @option option [String] :InvoiceNumber (Optional)
139
- # - Invoice number. Required when CommercialShipment=” true”. For example: <InvoiceNumber>20120101</InvoiceNumber>
140
- # @option option [String] :CustomerOrderNumber (Optional)
141
- # - Customer order number. User assigned number for internal use. For example: <CustomerOrderNumber>20120101</CustomerOrderNumber>
142
- # @option option [String] :CustOrderNumber (Optional)
143
- # - Customer order number. User assigned number for internal use. Either use CustomerOrderNumber or CustOrderNumber. For example: <CustOrderNumber>20120101</CustOrderNumber>
144
- # @option option [String] :TermsDelivery (Optional)
145
- # - Indicates terms of delivery. Required when CommercialShipment=” true”. For example: <TermsDelivery>CPT</TermsDelivery>
146
- # @option option [String] :TermsDeliveryOther (Optional)
147
- # - Terms description. Required when TermsDelivery=” OTHER”. For example: <TermsDeliveryOther>DES</TermsDeliveryOther>
148
- # @option option [Decimal] :PackingCost (Optional)
149
- # - Packing cost. For example: <PackingCost>15.00</PackingCost>
150
- # @option option [String] :CountryUltDest (Required)
151
- # - Ultimate destination country. For example: <CountryUltDest>Austria</CountryUltDest>
152
- # @option option [boolean] :CIAgreement (Optional)
153
- # - Agreement to Commercial Invoice terms and conditions. Required when CIRequired=” true”. For example: <CIAgreement>true</CIAgreement>
154
- # @option option [String] :ImageType (Required)
155
- # - Controls the file format of the commercial invoice image returned. For example: <ImageType>NONE</ImageType>
156
- # @option option [Empty] :ImageLayout (Optional)
157
- # - For future use.
158
- # @option option [String] :CustomerRefNo (Optional)
159
- # - Written to Postal Manifest Detail record. For example: <CustomerRefNo>Ref 369246</CustomerRefNo>
160
- # @option option [String] :CustomerRefNo2 (Optional)
161
- # - Written to Postal Manifest Detail record. For example: <CustomerRefNo2>ACT 369246</ CustomerRefNo2>
162
- # @option option [String] :ShipDate (Required)
163
- # - Format: mm/dd/yyyy. No more than 4 days in the future. Should "ShipDate" value not be provided, the service shall use the current date as a basis for delivery date calculations. For example: <ShipDate>01/01/2012</ShipDate>
164
- # @option option [String] :HoldForManifest (Optional)
165
- # - Restricted use. For authorized users, holds manifest record for possible inclusion in SCAN request when Y. All other users should omit or specify N. For example: <HoldForManifest>Y</HoldForManifest>
166
- # @option option [String] :PriceOptions (Optional)
167
- # - Returns commercial pricing.
168
- # @option option [boolean] :CommercialShipment (Optional)
169
- # - If True, then Invoice/Buyer info Required. If False, then Optional. For example: <CommercialShipment>true</CommercialShipment>
170
- # @option option [String] :BuyerFirstName (Optional)
171
- # - Buyer first name. Required when CommercialShipment=” true”. For example: <BuyerFirstName>John</BuyerFirstName>
172
- # @option option [String] :BuyerLastName (Optional)
173
- # - Buyer last name. Required when CommercialShipment=” true”. For example: <BuyerLastName>Smith</BuyerLastName>
174
- # @option option [String] :BuyerAddress1 (Optional)
175
- # - Three address lines are provided, but only 1 is Required. Use as many as needed for complete address. Required when CommercialShipment=”true”. For example: <BuyerAddress1>Lazarette Str. 7</BuyerAddress1>
176
- # @option option [String] :BuyerAddress2 (Optional)
177
- # - Three address lines are provided, but only 1 is Required. Use as many as needed for complete address. For example: <BuyerAddress2/>
178
- # @option option [String] :BuyerAddress3 (Optional)
179
- # - Three address lines are provided, but only 1 is Required. Use as many as needed for complete address. For example: <BuyerAddress3/>
180
- # @option option [String] :BuyerCity (Optional)
181
- # - Buyer city. Required when CommercialShipment=” true”. For example: <BuyerCity>Berlin</BuyerCity>
182
- # @option option [String] :BuyerState (Optional)
183
- # - Buyer state. Required when CommercialShipment=” true”. For example: <BuyerState/>
184
- # @option option [String] :BuyerPostalCode (Optional)
185
- # - Buyer postal code. Required when CommercialShipment=” true”. For example: <BuyerPostalCode>10117</BuyerPostalCode>
186
- # @option option [String] :BuyerCountry (Optional)
187
- # - Buyer country. Required when CommercialShipment=” true”. For example: <BuyerCountry>Germany</BuyerCountry>
188
- # @option option [String] :BuyerTaxID (Optional)
189
- # - Buyer TaxID. For example: <BuyerTaxID>11123456789</BuyerTaxID>
190
- # @option option [Boolean] :BuyerRecipient (Optional)
191
- # - Indicates that Buyer and Recipient are the same. When CommercialShipment=”true” and BuyerRecipient =”true”, buyer information is not Required. For example: <BuyerRecipient>true</BuyerRecipient>
192
- # @option option [String] :TermsPayment (Optional)
193
- # - TermsPayment is Required when CommercialShipment =” true”. For example: <TermsPayment>Net 50</TermsPayment>
194
- # @option option [String] :ActionCode (Optional)
195
- # - Passed to SPE file via the shipment manifest.
196
- # @option option [boolean] :OptOutOfSPE (Optional)
197
- # - Allows a customer to opt out of SPE file creation. “false” WILL create a SPE file. Note: This request tag is case sensitive.
198
- # @option option [String] :PermitNumber (Optional)
199
- # - Number associated with a mailing permit. The permit is permission to use a certain postage payment method for bulk and commercial mailings
200
- # @option option [String] :AccountZipCode (Optional)
201
- # - ZIP of Account Post Office where mailed if different from <FromZip5/>. Written to Postal Manifest Detail record. Must be valid ZIP Code. For example: <AccountZipCode>00962</AccountZipCode>
202
- # @option option [Boolean] :Machinable (Optional)
203
- # - 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 for more information. For example: <Machinable>false</Machinable>
204
- # @option option [String] :DestinationRateIndicator (Required)
205
- # - Required for destination entry packagesenter either “I” or “N”. · I = International Service Center (ISC) · N = None
206
- # @option option [String] :MID (Optional)
207
- # - Mailer ID (MID), Represents Mail Owner MID. Located in position #13 in the Detail 1 record of the Shipping Services File v2.0. For example: <MID>847654321</ MID>
208
- # @option option [String] :LogisticsManagerMID (Optional)
209
- # - The MID of the company that manages the mailing. Located in position #12 in the Detail 1 record of the Shipping Services File v2.0. Note: If LogisticsManagerMID is populated, either CRID or MID must also be populated. For example: <LogisticsManagerMID>489001< / LogisticsManagerMID>
210
- # @option option [String] :CRID (Optional)
211
- # - Customer Registration ID, Represents Mail Owner CRID. Located in position #20 in the Detail 1 record of the Shipping Services File v2.0. For example: <CRID>544762</ CRID>
212
- # @option option [String] :VendorCode (Optional)
213
- # - Code from vendor software to identify the developer of the shipping system. Located in position #15 in the Detail 1 record of the Shipping Services File v2.0. For example: <VendorCode>1234<VendorCode>
214
- # @option option [String] :VendorProductVersionNumber (Optional)
215
- # - Shipping software’s product version number. Located in position #16 in the Detail 1 record of the Shipping Services File v2.0. For example: <VendorProductVersionNumber>5.02.1B</ VendorProductVersionNumber>
216
- # @option option [String] :OverrideMID (Optional)
217
- # @option option [String] :ChargebackCode (Optional)
218
- # - Used in Shipping Services File v2.0 for G-10 labels. Contact your Technical Integration Specialist for details.
219
-
220
- #
221
- # @see
222
- def e_vsgxg_get_label(options = {})
15
+ # @param [Hash] options
16
+ # @option options [required, Hash] e_vsgxg_get_label_request
17
+ # * *:option* (required, Empty) For future use.
18
+ # * *:revision* (String) — This is for versioning of the APIs and for triggering response tags for future versions. In this API use a value of 2 to trigger new functionality. For example: <Revision>1</Revision>
19
+ # * *:image_parameters* (required, Empty) — For future use.
20
+ # * *:from_first_name* (required, String) First and Last Name must be sent. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: <FromFirstName>John</FromFirstName>
21
+ # * *:from_middle_initial* (String) — First and Last Name must be sent. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: <FromMiddleInitial>L</FromMiddleInitial>
22
+ # * *:from_last_name* (required, String) — First and Last Name must be sent. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: <FromLastName>Doe</FromLastName>
23
+ # * *:from_firm* (required, String) — Firm Name. For example: <FromFirm>USPS</FromFirm>
24
+ # * *:from_address1* (String) Secondary address unit designator and number (such as an apartment or suite number (APT 202, STE 100). For example: <FromAddress1>APT 202</FromAddress1>
25
+ # * *:from_address2* (required, String) Street number and name (including predirectional, suffix, and postdirectional as shown in USPS ZIP+4 Product for the delivery address or rural route and box number (RR 5 BOX 10), highway contract route and box number (HC 4 BOX 45), or post office box number (PO BOX 458). For example: <FromAddress2>10 Elm Street </FromAddress2>
26
+ # * *:from_urbanization* (String) Urbanization name (Puerto Rico only, ZIP Code prefixes 006 to 009, if area is so designated). For example: <FromUrbanization>URB Caparra Ter</FromUrbanization>
27
+ # * *:from_city* (required, String) — City name. For example: <FromCity>Anytown</FromCity>
28
+ # * *:from_state* (required, String) Use 2-letter USPS state abbreviation. For example: <FromState>PA</FromState>
29
+ # * *:from_zip5* (required, String) — Five-digit ZIP code. For example: <FromZip5>01234</FromZip5>
30
+ # * *:from_zip4* (String) — Four-digit extension of ZIP+4 code. For example: <FromZip4>5678</FromZip4>
31
+ # * *:from_phone* (required, String) 10 digits Required (including area code), with no punctuation. Use format: 2125551234 For example: <FromPhone>5555555555</FromPhone>
32
+ # * *:ship_from_zip* (String) Origin ZIP Code shall be accepted as component in request via "ShipFromZip" tag. For example: <ShipFromZIP>18701</ShipFromZIP>
33
+ # * *:sender_e_mail* (String) — E-mail address of sender. Valid e-mail addresses must be used. Note: No e-mail is returned when generating a Sample label request. For example: <SenderEMail>cpapple@email.com</SenderEMail>
34
+ # * *:to_first_name* (required, String) First and Last Name must be sent. Maximum Length: 36 characters total for First, and Last Names with space after first name. For example: <ToFirstName>John</ToFirstName>
35
+ # * *:to_last_name* (required, String) — First and Last Name must be sent. Maximum Length: 36 characters total for First, and Last Names with space after first name. For example: <ToLastName>John</ToLastName>
36
+ # * *:to_firm* (required, String) Firm Name. For example: <ToFirm>USPS</ToFirm>
37
+ # * *:to_address1* (String) Three address lines are provided, but only 1 is Required. Use as many as needed for complete address.
38
+ # * *:to_address2* (required, String) — Three address lines are provided, but only 1 is Required. Use as many as needed for complete address.
39
+ # * *:to_address3* (String) Three address lines are provided, but only 1 is Required. Use as many as needed for complete address.
40
+ # * *:to_postal_code* (String) Destination Postal Code. For example: <ToPostalCode> T2G 2W1</ToPostalCode>
41
+ # * *:to_phone* (String) — Up to 25 digits allowed with no punctuation. For example: <ToPhone>1234567890</ToPhone>
42
+ # * *:recipient_e_mail* (String) — E-mail address of recipient. Valid e-mail addresses must be used. Note: No e-mail is returned when generating a Sample label request. For example: <RecipientEMail>cpapple@email.com</RecipientEMail>
43
+ # * *:to_dpid* (required, String) — The Delivery Point ID as determined via the GXGGetDeliveryPoint API response. Please contact webtools@usps.gov for more information. For example: <ToDPID>142</ToDPID>
44
+ # * *:to_province* (String) Enter the province for the recipient. For example: <ToProvince>JALISCO</ToProvince>
45
+ # * *:to_tax_id* (String) — Tax ID For example: <ToTaxID/>
46
+ # * *:container* (required, String) Container type. USPS refers to USPS-supplied large flat envelopes which incur weight-based postage. For example: <Container>LETTER</Container>
47
+ # * *:content_type* (required, String) — Content type. For example: <ContentType>DOCUMENTS</ContentType>
48
+ # * *:shipping_contents* (required, Hash) Contents of package.
49
+ # * *:item_detail* (Hash) One item detail per item type enclosed.
50
+ # * *:description* (required, String) Description of the item. For example: <Description>Policy guidelines document</Description>
51
+ # * *:commodity* (required, String) — Commodity shall be a text String matching Commodity Name from GXGGetCommodityInfo. For example: <Commodity>Documents</Commodity>
52
+ # * *:restriction* (Hash) Allows integrators to pass restrictions information (responses to footnote questions) for each "Commodity/CommodityName."
53
+ # * *:footnote_number* (required, String) — Number associated with the commodity restriction question returned from the Get Commodity Restrictions service. Using a number which does not pertain to the passed commodity and derived country will result in an error return. For example: <FootnoteNumber>196</FootnoteNumber>
54
+ # * *:response* (required, String) May affect the need to use a Commercial invoice, and/or the ability to continue the transaction at all. For example: <Response>Y</Response>
55
+ # * *:quantity* (required, String) — Quantity of the item. For example: <Quantity>4</Quantity>
56
+ # * *:unit_value* (required, Decimal) — The data entered with this tag provides the value of the one of items in this Item Detail. For example: <UnitValue>125.00</UnitValue>
57
+ # * *:net_pounds* (Integer) — Rules: 1. If any <ItemDetail> contains either a <NetPounds> or <NetOunces> sub-tag, then all <ItemDetail> nodes must specify at least a <NetPounds> or <NetOunces> tag. 2. If the <NetPounds> and/or <NetOunces> are specified successfully, then those values will be used in the manifesting of the Customs Declarations. 3. If <NetPounds> and <NetOunces> are note specified, then the value for <NetPounds> and <NetOunces> for each customs declaration will be the <GrossPounds> and <GrossOunces> divided by the number of <ItemDetails> present.
58
+ # * *:net_ounces* (Decimal) — Rules: 1. If any <ItemDetail> contains either a <NetPounds> or <NetOunces> sub-tag, then all <ItemDetail> nodes must specify at least a <NetPounds> or <NetOunces> tag. 2. If the <NetPounds> and/or <NetOunces> are specified successfully, then those values will be used in the manifesting of the Customs Declarations. 3. If <NetPounds> and <NetOunces> are note specified, then the value for <NetPounds> and <NetOunces> for each customs declaration will be the <GrossPounds> and <GrossOunces> divided by the number of <ItemDetails> present.
59
+ # * *:unit_of_measure* (String) — Unit of Measure for item quantity. For example: <UnitOfMeasure>Dozen</UnitOfMeasure>
60
+ # * *:hs_tariff_number* (String) For commercial items only. If known, the HS tariff number must be based on the Harmonized Commodity Description and Coding System developed by the World Customs Organization. For example: <HSTariffNumber>123456</HSTariffNumber>
61
+ # * *:countryof_manufacture* (String) — The country name entered must match an entry from the USPS-approved International Index of Countries and Localities or be "United States". Click on the link for "International Country Listings." Using a country name not on the list will result in a request failure. Required when CIRequired=”true”. For example: <CountryOfManufacture>United States</CountryOfManufacture>
62
+ # * *:purpose_of_shipment* (required, String) Statement of shipment purpose. For example: <PurposeOfShipment>Gift</PurposeOfShipment>
63
+ # * *:parties_to_transaction* (String) — Defines relationship of parties to transaction. For example: <PartiesToTransaction>Related</PartiesToTransaction>
64
+ # * *:agreement* (required, String) — Agreement to GXG service terms and conditions. For example: <Agreement>Y</Agreement>
65
+ # * *:postage* (Decimal) — Use this tag for entering the postage amount, if known, excluding extra services. If the value is blank, the postage will be automatically calculated using retail rates. For example: <Postage>137.95</Postage>
66
+ # * *:insured_value* (Decimal) If specified, InsuredValue is used to calculate the Insurance Fee. For example: <InsuredValue>180.00</InsuredValue>
67
+ # * *:gross_pounds* (Decimal) GrossPounds + (GrossOunces/16) must be less than 70. For example: <GrossPounds>40</GrossPounds>
68
+ # * *:gross_ounces* (Decimal) GrossPounds + (GrossOunces/16) must be less than 70. For example: <GrossOunces>5</GrossOunces>
69
+ # * *: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 for non-rectangular package. Please reference https://about.usps.com/postal-bulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing.
70
+ # * *: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 for non-rectangular packages. Please reference https://about.usps.com/postal-bulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing.
71
+ # * *: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 for non-rectangular package. Please reference https://about.usps.com/postal-bulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing.
72
+ # * *: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 for non-rectangular package. Please reference https://about.usps.com/postal-bulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing.
73
+ # * *:shape* (String) — Required except when Container=” USPS”. Shape, plus the package's physical dimensions, help determine whether the scale weight or the dimensional weight is used to calculate the shipping cost. For example: <Shape>RECTANGULAR</Shape>
74
+ # * *:ci_required* (boolean) — Indicates if Commercial Invoice is Required. When CIRequired=” true”, commercial invoice image will be generated. For example: <CIRequired>true</CIRequired>
75
+ # * *:invoice_date* () — Invoice date. Required when CommercialShipment=” true”. For example: <InvoiceDate>01/01/2012</InvoiceDate>
76
+ # * *:invoice_number* (String) Invoice number. Required when CommercialShipment=” true”. For example: <InvoiceNumber>20120101</InvoiceNumber>
77
+ # * *:customer_order_number* (String) — Customer order number. User assigned number for internal use. For example: <CustomerOrderNumber>20120101</CustomerOrderNumber>
78
+ # * *:cust_order_number* (String) — Customer order number. User assigned number for internal use. Either use CustomerOrderNumber or CustOrderNumber. For example: <CustOrderNumber>20120101</CustOrderNumber>
79
+ # * *:terms_delivery* (String) — Indicates terms of delivery. Required when CommercialShipment=” true”. For example: <TermsDelivery>CPT</TermsDelivery>
80
+ # * *:terms_delivery_other* (String) — Terms description. Required when TermsDelivery=” OTHER”. For example: <TermsDeliveryOther>DES</TermsDeliveryOther>
81
+ # * *:packing_cost* (Decimal) — Packing cost. For example: <PackingCost>15.00</PackingCost>
82
+ # * *:country_ult_dest* (required, String) Ultimate destination country. For example: <CountryUltDest>Austria</CountryUltDest>
83
+ # * *:ci_agreement* (boolean) — Agreement to Commercial Invoice terms and conditions. Required when CIRequired=” true”. For example: <CIAgreement>true</CIAgreement>
84
+ # * *:image_type* (required, String) — Controls the file format of the commercial invoice image returned. For example: <ImageType>NONE</ImageType>
85
+ # * *:image_layout* (Empty) For future use.
86
+ # * *:customer_ref_no* (String) Written to Postal Manifest Detail record. For example: <CustomerRefNo>Ref 369246</CustomerRefNo>
87
+ # * *:customer_ref_no2* (String) — Written to Postal Manifest Detail record. For example: <CustomerRefNo2>ACT 369246</ CustomerRefNo2>
88
+ # * *:ship_date* (required, String) Format: mm/dd/yyyy. No more than 4 days in the future. Should "ShipDate" value not be provided, the service shall use the current date as a basis for delivery date calculations. For example: <ShipDate>01/01/2012</ShipDate>
89
+ # * *:hold_for_manifest* (String) — Restricted use. For authorized users, holds manifest record for possible inclusion in SCAN request when Y. All other users should omit or specify N. For example: <HoldForManifest>Y</HoldForManifest>
90
+ # * *:price_options* (String) Returns commercial pricing.
91
+ # * *:commercial_shipment* (boolean) — If True, then Invoice/Buyer info Required. If False, then Optional. For example: <CommercialShipment>true</CommercialShipment>
92
+ # * *:buyer_first_name* (String) Buyer first name. Required when CommercialShipment=” true”. For example: <BuyerFirstName>John</BuyerFirstName>
93
+ # * *:buyer_last_name* (String) — Buyer last name. Required when CommercialShipment=” true”. For example: <BuyerLastName>Smith</BuyerLastName>
94
+ # * *:buyer_address1* (String) Three address lines are provided, but only 1 is Required. Use as many as needed for complete address. Required when CommercialShipment=”true”. For example: <BuyerAddress1>Lazarette Str. 7</BuyerAddress1>
95
+ # * *:buyer_address2* (String) — Three address lines are provided, but only 1 is Required. Use as many as needed for complete address. For example: <BuyerAddress2/>
96
+ # * *:buyer_address3* (String) Three address lines are provided, but only 1 is Required. Use as many as needed for complete address. For example: <BuyerAddress3/>
97
+ # * *:buyer_city* (String) — Buyer city. Required when CommercialShipment=” true”. For example: <BuyerCity>Berlin</BuyerCity>
98
+ # * *:buyer_state* (String) Buyer state. Required when CommercialShipment=” true”. For example: <BuyerState/>
99
+ # * *:buyer_postal_code* (String) — Buyer postal code. Required when CommercialShipment=” true”. For example: <BuyerPostalCode>10117</BuyerPostalCode>
100
+ # * *:buyer_country* (String) Buyer country. Required when CommercialShipment=” true”. For example: <BuyerCountry>Germany</BuyerCountry>
101
+ # * *:buyer_tax_id* (String) — Buyer TaxID. For example: <BuyerTaxID>11123456789</BuyerTaxID>
102
+ # * *:buyer_recipient* (Boolean) Indicates that Buyer and Recipient are the same. When CommercialShipment=”true” and BuyerRecipient =”true”, buyer information is not Required. For example: <BuyerRecipient>true</BuyerRecipient>
103
+ # * *:terms_payment* (String) — TermsPayment is Required when CommercialShipment =” true”. For example: <TermsPayment>Net 50</TermsPayment>
104
+ # * *:action_code* (String) Passed to SPE file via the shipment manifest.
105
+ # * *:opt_out_of_spe* (boolean) — Allows a customer to opt out of SPE file creation. “false” WILL create a SPE file. Note: This request tag is case sensitive.
106
+ # * *:permit_number* (String) Number associated with a mailing permit. The permit is permission to use a certain postage payment method for bulk and commercial mailings
107
+ # * *:account_zip_code* (String) — ZIP of Account Post Office where mailed if different from <FromZip5/>. Written to Postal Manifest Detail record. Must be valid ZIP Code. For example: <AccountZipCode>00962</AccountZipCode>
108
+ # * *: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 for more information. For example: <Machinable>false</Machinable>
109
+ # * *:destination_rate_indicator* (required, String) Required for destination entry packagesenter either “I” or “N”. · I = International Service Center (ISC) · N = None
110
+ # * *:mid* (String) — Mailer ID (MID), Represents Mail Owner MID. Located in position #13 in the Detail 1 record of the Shipping Services File v2.0. For example: <MID>847654321</ MID>
111
+ # * *:logistics_manager_mid* (String) — The MID of the company that manages the mailing. Located in position #12 in the Detail 1 record of the Shipping Services File v2.0. Note: If LogisticsManagerMID is populated, either CRID or MID must also be populated. For example: <LogisticsManagerMID>489001< / LogisticsManagerMID>
112
+ # * *:crid* (String) Customer Registration ID, Represents Mail Owner CRID. Located in position #20 in the Detail 1 record of the Shipping Services File v2.0. For example: <CRID>544762</ CRID>
113
+ # * *:vendor_code* (String) — Code from vendor software to identify the developer of the shipping system. Located in position #15 in the Detail 1 record of the Shipping Services File v2.0. For example: <VendorCode>1234<VendorCode>
114
+ # * *:vendor_product_version_number* (String) Shipping software’s product version number. Located in position #16 in the Detail 1 record of the Shipping Services File v2.0. For example: <VendorProductVersionNumber>5.02.1B</ VendorProductVersionNumber>
115
+ # * *:override_mid* (String)
116
+ # * *:chargeback_code* (String) Used in Shipping Services File v2.0 for G-10 labels. Contact your Technical Integration Specialist for details.
117
+ def e_vsgxg_get_label(options = {})
223
118
  throw ArgumentError.new('Required arguments :e_vsgxg_get_label_request missing') if options[:e_vsgxg_get_label_request].nil?
224
119
  throw ArgumentError.new('Required arguments :e_vsgxg_get_label_request, :option missing') if options[:e_vsgxg_get_label_request][:option].nil?
225
120
  throw ArgumentError.new('Required arguments :e_vsgxg_get_label_request, :image_parameters missing') if options[:e_vsgxg_get_label_request][:image_parameters].nil?
@@ -6,9 +6,6 @@ module Usps
6
6
  module Api
7
7
  module Endpoints
8
8
  module EVSICancel
9
- #
10
- # eVS International Cancel API
11
- #
12
9
  # The eVS
13
10
  # International Cancel request allows an eVS label to be removed from processing
14
11
  # if the request is made prior to 11:59 PM Central Time on the day of label creation.This functionality is available only if the eVS International
@@ -17,15 +14,11 @@ module Usps
17
14
  # File v2.0 has not yet been created. Depending on customer profile setup, this
18
15
  # transmission could occur for created labels every 15 minutes, at the end of the
19
16
  # shipping day, or when a SCAN Form is manually triggered by the customer.
20
- #
21
- # @option option [(Alias)] :eVSICancelRequest (Required)
22
- # @option option [] :BarcodeNumber (Required)
23
- # - BarcodeNumber of original label. Length of 22, 30 or 34 numbers.
24
- # @option option [] :eVSICancelRequest (Required)
25
-
26
- #
27
- # @see
28
- def e_vsi_cancel(options = {})
17
+ # @param [Hash] options
18
+ # @option options [required, Hash] e_vsi_cancel_request
19
+ # * *:barcode_number* (required, ) — BarcodeNumber of original label. Length of 22, 30 or 34 numbers.
20
+ # * *:e_vsi_cancel_request* (required, )
21
+ def e_vsi_cancel(options = {})
29
22
  throw ArgumentError.new('Required arguments :e_vsi_cancel_request missing') if options[:e_vsi_cancel_request].nil?
30
23
  throw ArgumentError.new('Required arguments :e_vsi_cancel_request, :barcode_number missing') if options[:e_vsi_cancel_request][:barcode_number].nil?
31
24
  throw ArgumentError.new('Required arguments :e_vsi_cancel_request, :e_vsi_cancel_request missing') if options[:e_vsi_cancel_request][:e_vsi_cancel_request].nil?
@@ -6,9 +6,6 @@ module Usps
6
6
  module Api
7
7
  module Endpoints
8
8
  module HFPFacilityInfo
9
- #
10
- # Hold for Pickup Facility Information API
11
- #
12
9
  # Hold For
13
10
  # Pickup service is available at approximately 31,000 USPS locations. This API
14
11
  # will list US Postal Service Facilities where Hold-For-Pickup service is
@@ -20,23 +17,14 @@ module Usps
20
17
  # within five calendar days. Hold For Pickup service
21
18
  # lets customers pick up shipments when it is convenient for them, with the
22
19
  # assurance that their shipments are held safely and securely.
23
- #
24
- # @option option [(Alias)] :HFPFacilityInfoRequest (Required)
25
- # - API=HFPFacilityInfo
26
- # @option option [String] :PickupCity (Required)
27
- # - Either City/State or ZIP code must be specified. When only city and state are provided, all pickup facilities with addresses within that city and state will be returned. For example: <PickupCity>Boston</PickupCity>
28
- # @option option [String] :PickupState (Required)
29
- # - Either City/State or ZIP code must be specified. For example: <PickupState>MA</PickupState>
30
- # @option option [String] :PickupZIP (Required)
31
- # - Either City/State or ZIP code must be specified. When PickupZIP provided without PickupZIP4, all pickup facilities that service that ZIP code are returned. For example: <PickupZIP>02111</PickupZIP>
32
- # @option option [String] :PickupZIP4 (Required)
33
- # - If PickupZIP is specified, then PickupZIP4 may also be specified. This will match to a single pickup facility with the given nine-digit ZIP code. For example: <PickupZIP4>9998</PickupZIP4>
34
- # @option option [String] :Service (Optional)
35
- # - For future use. May be omitted.
36
-
37
- #
38
- # @see
39
- def hfp_facility_info(options = {})
20
+ # @param [Hash] options
21
+ # @option options [required, Hash] hfp_facility_info_request API=HFPFacilityInfo
22
+ # * *:pickup_city* (required, String) — Either City/State or ZIP code must be specified. When only city and state are provided, all pickup facilities with addresses within that city and state will be returned. For example: <PickupCity>Boston</PickupCity>
23
+ # * *:pickup_state* (required, String) — Either City/State or ZIP code must be specified. For example: <PickupState>MA</PickupState>
24
+ # * *:pickup_zip* (required, String) — Either City/State or ZIP code must be specified. When PickupZIP provided without PickupZIP4, all pickup facilities that service that ZIP code are returned. For example: <PickupZIP>02111</PickupZIP>
25
+ # * *:pickup_zip4* (required, String) — If PickupZIP is specified, then PickupZIP4 may also be specified. This will match to a single pickup facility with the given nine-digit ZIP code. For example: <PickupZIP4>9998</PickupZIP4>
26
+ # * *:service* (String) For future use. May be omitted.
27
+ def hfp_facility_info(options = {})
40
28
  throw ArgumentError.new('Required arguments :hfp_facility_info_request missing') if options[:hfp_facility_info_request].nil?
41
29
  throw ArgumentError.new('Required arguments :hfp_facility_info_request, :pickup_city missing') if options[:hfp_facility_info_request][:pickup_city].nil?
42
30
  throw ArgumentError.new('Required arguments :hfp_facility_info_request, :pickup_state missing') if options[:hfp_facility_info_request][:pickup_state].nil?
@@ -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)