lib/friendly_shipping/services/ups/serialize_shipment_confirm_request.rb
# Item options (only necessary for international shipping)
#
# @option description [String] A description of the item for the intl. invoice
# @option commodity_code [String] Commodity code for the item. See https://www.tariffnumber.com/
# @option value [Money] Price of the item
# @option unit_of_item_count [String] What kind of thing is one of this item? Example: Barrel, m3.
#   See UPS docs for codes.
#
Item options (only necessary for international shipping)
Item options ( only necessary for international shipping )
def build_billing_info_node(xml, options, bill_to_consignee: false)
            billing_options = options.billing_options
            if billing_options.bill_third_party
              xml.BillThirdParty do
                node_type = bill_to_consignee ? :BillThirdPartyConsignee : :BillThirdPartyShipper
                xml.public_send(node_type) do
                  xml.AccountNumber(billing_options.billing_account)
                  xml.ThirdParty do
                    xml.Address do
                      xml.PostalCode(billing_options.billing_zip)
                      xml.CountryCode(billing_options.billing_country)
                    end
                  end
                end
              end
            else
              xml.BillShipper do
                xml.AccountNumber(options.shipper_number)
              end
            end
          end
def build_billing_info_node ( xml , options , bill_to_consignee : false ) billing_options = options . billing_options if billing_options . bill_third_party xml . BillThirdParty do node_type = bill_to_consignee ? :BillThirdPartyConsignee : :BillThirdPartyShipper xml . public_send ( node_type ) do xml . AccountNumber ( billing_options . billing_account ) xml . ThirdParty do xml . Address do xml . PostalCode ( billing_options . billing_zip ) xml . CountryCode ( billing_options . billing_country ) end end end end else xml . BillShipper do xml . AccountNumber ( options . shipper_number ) end end end
Item options (only necessary for international shipping)
Item options ( only necessary for international shipping )
xml
<not_specific>
options
<not_specific>
bill_to_consignee
<not_specific>
description
<not_specific>
A description of the item for the intl. invoice
A description of the item for the intl . invoice
commodity_code
<not_specific>
Commodity code for the item.
Commodity code for the item .
value
<not_specific>
Price of the item
Price of the item
unit_of_item_count
<not_specific>
None