# frozen_string_literal: true # This file was auto-generated by lib/tasks/api.rake module Usps module Api module Endpoints module EVSFirstClassMailIntl # # eVS First Class Mail International Label API # # The # First Class Mail International Label API lets # customers generate First Class International labels given the weight and # dimensions of the item.  # # @option option [(Alias)] :eVSFirstClassMailIntlRequest (Required) # @option option [String] :PASSWORD (Optional) # - For backward compatibility; not validated. # @option option [Empty] :Option (Optional) # - For future use. # @option option [String] :Revision (Required) # - Use of value 2 Required as of January 2011. For example: 2 # @option option [(Group)] :ImageParameters (Optional) # - Groups alternate image options. # @option option [String] :ImageParameter (Optional) # - Returns alternate label image. Only alternate 4’’x6’’ size label image may be requested at this time. · 4X6LABEL - (4X6 on a full page 8.5/11” background) · 4X6LABELL - (Landscape – true size 4X6; image rotated, not on an 8.5 x 11 background page) · 4X6LABELP- (Portrait – true size 4X6, not on an 8.5 x 11 background page) · 4X6ZPL203DPI - (ZPL - Zebra Programming Language) format. When using this enumeration, is required - this tag cannot be left blank. Integrators should use either “TIF” or “PDF” for ZPL – neither value will impact the label image itself, but it must be included in the request to return a successful response. · 4X6ZPL300DPI - Prints a label formatted for ZPL printers in 300 dpi. When using this enumeration, is required - this tag cannot be left blank. Integrators should use either “TIF” or “PDF” for ZPL – neither value will impact the label image itself, but it must be included in the request to return a successful response. For example: 4X6LABEL # @option option [String] :FromFirstName (Required) # - Both FromFirstName and FromLastName are Required if FromFirmName is left blank. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: John # @option option [String] :FromMiddleInitial (Optional) # - Middle Initial. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: L # @option option [String] :FromLastName (Required) # - Both FromFirstName and FromLastName are Required if FromFirmName is left blank. Maximum Length: 32 characters total for First, Middle, and Last Names with space after first and middle name. For example: Doe # @option option [String] :FromFirm (Required) # - FromFirm is Required if FromFirstName and FromLastName are left blank. For example: XYZ # @option option [String] :FromAddress1 (Optional) # - Use this tag for a suite or apartment number only. For example: Suite 100 # @option option [String] :FromAddress2 (Required) # - Use this tag for the primary address line. For example: 10 Elm Street # @option option [String] :FromUrbanization (Optional) # - Use this tag for Puerto Rico only. ZIP Code prefixes 006 to 009, if area is so designated. For example:URB Caparra Ter # @option option [String] :FromCity (Required) # - Use this tag to specify originating city. For example: Anytown # @option option [String] :FromState (Required) # - Use 2-letter USPS abbreviation. For example: AK # @option option [String] :FromZip5 (Required) # - Five-digit valid ZIP code Required. For example: 01234 # @option option [String] :FromZip4 (Optional) # - If value is entered, four digits are Required. Must be a valid ZIP+4 extension. For example: 5678 # @option option [String] :FromPhone (Required) # - 10 digits Required (including area code), with no punctuation. Use format: 2125551234 For example: 5555555555 # @option option [String] :ToName (Optional) # - Deprecated. See “ToFirstName” and “ToLastName” tags. # @option option [String] :ToFirstName (Required) # - Both ToFirstName and ToLastName are Required if ToFirm is left blank. For example: John # @option option [String] :ToLastName (Required) # - Both ToFirstName and ToLastName are Required if ToFirm is left blank. For example: Doe # @option option [String] :ToFirm (Required) # - ToFirm is Required if ToFirstName and ToLastName are left blank. For example: # @option option [String] :ToAddress1 (Optional) # - Three address lines are provided, but only one is Required. Use as many as needed for complete address. For example: Apartado 3068 # @option option [String] :ToAddress2 (Required) # - Three address lines are provided, but only one is Required. Use as many as needed for complete address. # @option option [String] :ToAddress3 (Optional) # - Three address lines are provided, but only one is Required. Use as many as needed for complete address. # @option option [String] :ToCity (Required) # - Recipient's city. For example: PUERTO VALLARTA # @option option [String] :ToProvince (Optional) # - Enter the province for the recipient. For example: JALISCO # @option option [String] :ToCountry (Required) # - The country name entered must match an entry from the USPS-approved International Index of Countries and Localities or be "United States". (http://pe.usps.gov/text/Imm/Immctry.htm - click on the link for "International Country Listings.") Using a country name not on the list will result in a request failure. For example: MEXICO # @option option [String] :ToPostalCode (Required) # - Enter the postal code for the recipient. For example: 46807 # @option option [String] :ToPOBoxFlag (Required) # - Indicates whether or not the To Address is a Post Office Box. For example: N # @option option [String] :ToPhone (Optional) # - No format checking is done on international phone numbers. Required when FirstClassMailIntlRequest[ToPOBoxFlag='Y']. For example: 011 52 (322) 222-0069 # @option option [String] :ToFax (Optional) # - No format checking is done on international fax numbers. For example: 011 52 (322) 222-0074 # @option option [String] :ToEmail (Optional) # - One single, complete, and valid e-mail address is Required if tag is used. For example: cpapple@email.com # @option option [String] :FirstClassMailType (Optional) # - Used to determine the postage rate. See also FirstClassMailIntlRequest/Machinable. For example: PACKAGE SERVICE # @option option [(Group)] :ShippingContents (Required) # @option option [(Group)] :ItemDetail (Optional) # @option option [String] :Description (Required) # - Description of the item. Non-descriptive wording such as 'Gift' will result in an error. For example: Policy guidelines document # @option option [Integer] :Quantity (Required) # - Quantity of the item. Integer value Required. For example: 1 # @option option [Decimal] :Value (Required) # - The data entered with this tag provides the value of the set of items. If the item is 2 boxes of 50 pens and the value of each box is $10.00, "20.00" (2 boxes x $10.00) should be entered. If the value of each pen is .25 then "25.00" (100 pens x .25) should be entered. For example: 55.00 # @option option [Integer] :NetPounds (Required) # - Provide the pounds component of the weight of the individual item listed within this ItemDetail. For example: 1 # @option option [Decimal] :NetOunces (Required) # - Provide the ounces component of the weight of the individual item listed within this ItemDetail. For example: 5 # @option option [String] :HSTariffNumber (Required) # - 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: 490110 # @option option [String] :CountryOfOrigin (Required) # - For commercial items only. Country of Origin means the country where the goods originated, e.g. were produced, manufactured, or assembled. It is recommended you supply this information and attach an invoice to the outside to accelerate customs clearance in processing the items. The country name entered must match an entry from the USPS-approved International Index of Countries and Localities or be "United States". (http://pe.usps.gov/text/Imm/Immctry.htm - click on the link for "International Country Listings.") Using a country name not on the list will result in a request failure. For example: United States # @option option [String Decimal] :Postage (Optional) # - Use this tag for entering a postage amount, if known. If the tag is present, but the value is blank, the postage will be automatically calculated. For example: # @option option [Integer] :GrossPounds (Required) # - Gross pounds and ounces together represent the total package weight, including packing material. For example, a package weighing 3 lbs 8 ounces would have "3" entered here and "8" entered with the "GrossOunces" tag. The Web Tool will check for maximum shipping weight of 70 pounds. Allowable weight may change based on the service used to send package and the destination country. For example: 4 # @option option [Integer] :GrossOunces (Required) # - Enter the ounces component of the total package weight with this tag. For example: 0 # @option option [Boolean] :Machinable (Optional) # - 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: false # @option option [String] :ContentType (Required) # - Specifies the content of the package or envelope. For example: DOCUMENTS # @option option [String] :ContentTypeOther (Optional) # - Required when FirstClassMailIntlRequest[ContentType='OTHER']. # @option option [String] :Agreement (Required) # - Indicates the requestor's agreement to terms and conditions of mailing. Requires a value of Y to print and in Signature Box along with Current Date (Central Time USA). Any other value returns an error. # @option option [String] :Comments (Optional) # - For future use. # @option option [String] :LicenseNumber (Optional) # - For future use. # @option option [String] :CertificateNumber (Optional) # - For future use. # @option option [String] :InvoiceNumber (Optional) # - For future use. # @option option [String] :ImageType (Required) # - Label Image Type. Note: All values are ignored when = “4X6ZPL203DPI” or “4X6ZPL300DPI”. For example: PDF # @option option [String] :ImageLayout (Optional) # - Specified whether the pages are to be returned one per file or all in one file. The current FCMI label is one page so this tag has no effect. For example: ONEPERFILE # @option option [String] :CustomerRefNo (Optional) # - Written to Postal Manifest Detail record. For example: Ref 369246 # @option option [String] :CustomerRefNo2 (Optional) # - Written to Postal Manifest Detail record For example: ACT 369246 # @option option [String] :POZipCode (Optional) # - ZIP Code of Post Office or collection box where item is mailed. May be different than FromZip5. This tag will take precedence over FromZip5 when provided. For example: 00962 # @option option [String] :LabelDate (Optional) # - Date the mail will enter the mail stream. No more than three days in the future. Default is day of request. For example: 09/28/2010 # @option option [String] :HoldForManifest (Optional) # - Restricted use. Holds manifest record for possible inclusion in SCAN request. # @option option [String] :EELPFC (Optional) # - Exemption and Exclusion Legend or PFC Code. Currently Optional, in the future it may be Required for use. Please refer to the International Mail Manual for further information - http://pe.usps.gov/text/imm/immc5_007.htm. To activate check boxes use ”30.37a” or “30.37h”. For example: 30.37a # @option option [String] :Container (Optional) # - This tag has been deprecated # @option option [Decimal] :Length (Optional) # - 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. Please reference https://about.usps.com/postalbulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing # @option option [Decimal] :Width (Optional) # - 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. Please reference https://about.usps.com/postalbulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing # @option option [Decimal] :Height (Optional) # - 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. Please reference https://about.usps.com/postalbulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing # @option option [Decimal] :Girth (Optional) # - 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. Please reference https://about.usps.com/postalbulletin/2018/pb22509/html/updt_002.htm for more details on dimensional weight pricing # @option option [(Group)] :ExtraServices (Optional) # - Groups extra services elements # @option option [Extra Service Name] :ExtraService (Optional) # - [{"Extra Service Name"=>"e-USPS Delivery Confirmation International", "Service ID"=>"109"}] # @option option [String] :PriceOptions (Optional) # - Indicates if retail, commercial base or commercial plus pricing should be returned. For example: COMMERCIAL BASE # @option option [String] :ActionCode (Optional) # - Passed to SPE file via the shipment manifest. # @option option [boolean] :OptOutOfSPE (Optional) # - Allows a customer to opt out of SPE file creation. “false” WILL create a SPE file. Note: This request tag is case sensitive. # @option option [String] :PermitNumber (Optional) # - Number associated with a mailing permit. The permit is permission to use a certain postage payment method for bulk and commercial mailings # @option option [String] :AccountZipCode (Optional) # - ZIP of Account Post Office where mailed if different from . Written to Postal Manifest Detail record. Must be valid ZIP Code. For example: 00962 # @option option [boolean] :Machinable (Optional) # - 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: false # @option option [String] :DestinationRateIndicator (Required) # - Required for destination entry packages · I = International Service Center (ISC) · N = None # @option option [String] :MID (Optional) # - 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: 847654321 # @option option [String] :LogisticsManagerMID (Optional) # - 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: 489001 # @option option [String] :CRID (Optional) # - 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: 544762 # @option option [String] :VendorCode (Optional) # - 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: 1234 # @option option [String] :VendorProductVersionNumber (Optional) # - Shipping software’s product version number. Located in position #16 in the Detail 1 record of the Shipping Services File v2.0. For example: 5.02.1B # @option option [String] :ePostageMailerReporting (Optional) # - Verifies Sender Information, sender fields must match From information when =1 · 1 - (ePostage sender information in SSF) · 2 - (ePostage sender information through DES) · 3 - (ePostage sender information using child MID) # @option option [String] :SenderFirstName (Optional) # - First Name of Sender. For example: Adam Required when =1 # @option option [String] :SenderLastName (Optional) # - Last Name of Sender. For example: Smith Required when =1 # @option option [String] :SenderBusinessName (Optional) # - Values for Sender Business Name must be sent. For example: USPS # @option option [String] :SenderAddress1 (Optional) # - Sender address line. Use this tag for full address (Address1 and Address2) Must match Address1 and Address2 or will produce an error. For example: STE 150 10 Elm Street Required when =1 # @option option [String] :SenderCity (Optional) # - Sender city For example: BETHESDA Required when =1 # @option option [String] :SenderState (Optional) # - Sender state. For example: MD Required when =1 # @option option [String] :SenderZip5 (Optional) # - Sender ZIP code. For example: 20212 Required when =1 # @option option [String] :SenderPhone (Optional) # - Sender Phone #. 10 digits Required (including area code), with no punctuation. For example: 2125551234 Required when =1 # @option option [String] :SenderEmail (Optional) # - E-mail Address of Sender. Valid e-mail addresses must be used. For example: cpapple@email.com Required when =1 # @option option [String] :RemainingBarcodes (Required) # - This contains the number of remaining barcodes that can be generated for this particular request. # @option option [String] :ChargebackCode (Optional) # - Used in Shipping Services File v2.0 for G-10 labels. Contact your Technical Integration Specialist for details. # # @see def e_vs_first_class_mail_intl(options = {}) throw ArgumentError.new('Required arguments :e_vs_first_class_mail_intl_request missing') if options[:e_vs_first_class_mail_intl_request].nil? throw ArgumentError.new('Required arguments :e_vs_first_class_mail_intl_request, :revision missing') if options[:e_vs_first_class_mail_intl_request][:revision].nil? request = build_request(:e_vs_first_class_mail_intl, options) get('https://secure.shippingapis.com/ShippingAPI.dll', { API: 'eVSFirstClassMailIntl', XML: request, }) end private def tag_unless_blank(xml, tag_name, data) xml.tag!(tag_name, data) unless data.blank? || data.nil? end def build_e_vs_first_class_mail_intl_request(xml, options = {}) tag_unless_blank(xml, 'PASSWORD', options[:e_vs_first_class_mail_intl_request][:password]) tag_unless_blank(xml, 'Option', options[:e_vs_first_class_mail_intl_request][:option]) xml.tag!('Revision', options[:e_vs_first_class_mail_intl_request][:revision]) xml.tag!('ImageParameters') do tag_unless_blank(xml, 'ImageParameter', options[:e_vs_first_class_mail_intl_request][:image_parameters][:image_parameter]) xml.tag!('FromFirstName', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_first_name]) tag_unless_blank(xml, 'FromMiddleInitial', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_middle_initial]) xml.tag!('FromLastName', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_last_name]) xml.tag!('FromFirm', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_firm]) tag_unless_blank(xml, 'FromAddress1', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_address1]) xml.tag!('FromAddress2', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_address2]) tag_unless_blank(xml, 'FromUrbanization', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_urbanization]) xml.tag!('FromCity', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_city]) xml.tag!('FromState', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_state]) xml.tag!('FromZip5', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_zip5]) tag_unless_blank(xml, 'FromZip4', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_zip4]) xml.tag!('FromPhone', options[:e_vs_first_class_mail_intl_request][:image_parameters][:from_phone]) tag_unless_blank(xml, 'ToName', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_name]) xml.tag!('ToFirstName', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_first_name]) xml.tag!('ToLastName', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_last_name]) xml.tag!('ToFirm', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_firm]) tag_unless_blank(xml, 'ToAddress1', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_address1]) xml.tag!('ToAddress2', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_address2]) tag_unless_blank(xml, 'ToAddress3', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_address3]) xml.tag!('ToCity', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_city]) tag_unless_blank(xml, 'ToProvince', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_province]) xml.tag!('ToCountry', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_country]) xml.tag!('ToPostalCode', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_postal_code]) xml.tag!('ToPOBoxFlag', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_po_box_flag]) tag_unless_blank(xml, 'ToPhone', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_phone]) tag_unless_blank(xml, 'ToFax', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_fax]) tag_unless_blank(xml, 'ToEmail', options[:e_vs_first_class_mail_intl_request][:image_parameters][:to_email]) tag_unless_blank(xml, 'FirstClassMailType', options[:e_vs_first_class_mail_intl_request][:image_parameters][:first_class_mail_type]) xml.tag!('ShippingContents') do xml.tag!('ItemDetail') do xml.tag!('Description', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:description]) xml.tag!('Quantity', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:quantity]) xml.tag!('Value', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:value]) xml.tag!('NetPounds', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:net_pounds]) xml.tag!('NetOunces', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:net_ounces]) xml.tag!('HSTariffNumber', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:hs_tariff_number]) xml.tag!('CountryOfOrigin', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:country_of_origin]) tag_unless_blank(xml, 'Postage', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:postage]) xml.tag!('GrossPounds', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:gross_pounds]) xml.tag!('GrossOunces', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:gross_ounces]) tag_unless_blank(xml, 'Machinable', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:machinable]) xml.tag!('ContentType', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:content_type]) tag_unless_blank(xml, 'ContentTypeOther', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:content_type_other]) xml.tag!('Agreement', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:agreement]) tag_unless_blank(xml, 'Comments', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:comments]) tag_unless_blank(xml, 'LicenseNumber', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:license_number]) tag_unless_blank(xml, 'CertificateNumber', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:certificate_number]) tag_unless_blank(xml, 'InvoiceNumber', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:invoice_number]) xml.tag!('ImageType', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:image_type]) tag_unless_blank(xml, 'ImageLayout', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:image_layout]) tag_unless_blank(xml, 'CustomerRefNo', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:customer_ref_no]) tag_unless_blank(xml, 'CustomerRefNo2', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:customer_ref_no2]) tag_unless_blank(xml, 'POZipCode', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:po_zip_code]) tag_unless_blank(xml, 'LabelDate', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:label_date]) tag_unless_blank(xml, 'HoldForManifest', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:hold_for_manifest]) tag_unless_blank(xml, 'EELPFC', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:eelpfc]) tag_unless_blank(xml, 'Container', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:container]) tag_unless_blank(xml, 'Length', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:length]) tag_unless_blank(xml, 'Width', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:width]) tag_unless_blank(xml, 'Height', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:height]) tag_unless_blank(xml, 'Girth', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:girth]) xml.tag!('ExtraServices') do tag_unless_blank(xml, 'ExtraService', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:extra_service]) tag_unless_blank(xml, 'PriceOptions', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:price_options]) tag_unless_blank(xml, 'ActionCode', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:action_code]) tag_unless_blank(xml, 'OptOutOfSPE', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:opt_out_of_spe]) tag_unless_blank(xml, 'PermitNumber', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:permit_number]) tag_unless_blank(xml, 'AccountZipCode', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:account_zip_code]) tag_unless_blank(xml, 'Machinable', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:machinable]) xml.tag!('DestinationRateIndicator', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:destination_rate_indicator]) tag_unless_blank(xml, 'MID', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:mid]) tag_unless_blank(xml, 'LogisticsManagerMID', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:logistics_manager_mid]) tag_unless_blank(xml, 'CRID', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:crid]) tag_unless_blank(xml, 'VendorCode', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:vendor_code]) tag_unless_blank(xml, 'VendorProductVersionNumber', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:vendor_product_version_number]) tag_unless_blank(xml, 'ePostageMailerReporting', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:e_postage_mailer_reporting]) tag_unless_blank(xml, 'SenderFirstName', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:sender_first_name]) tag_unless_blank(xml, 'SenderLastName', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:sender_last_name]) tag_unless_blank(xml, 'SenderBusinessName', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:sender_business_name]) tag_unless_blank(xml, 'SenderAddress1', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:sender_address1]) tag_unless_blank(xml, 'SenderCity', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:sender_city]) tag_unless_blank(xml, 'SenderState', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:sender_state]) tag_unless_blank(xml, 'SenderZip5', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:sender_zip5]) tag_unless_blank(xml, 'SenderPhone', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:sender_phone]) tag_unless_blank(xml, 'SenderEmail', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:sender_email]) xml.tag!('RemainingBarcodes', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:remaining_barcodes]) tag_unless_blank(xml, 'ChargebackCode', options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services][:chargeback_code]) end if options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail][:extra_services].present? end if options[:e_vs_first_class_mail_intl_request][:image_parameters][:shipping_contents][:item_detail].present? end end if options[:e_vs_first_class_mail_intl_request][:image_parameters].present? xml.target! end end end end end