Method: ActiveShipping::UPS#build_billing_info_node

Defined in:
lib/active_shipping/carriers/ups.rb

#build_billing_info_node(xml, options = {}) ⇒ Object (protected)



783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
# File 'lib/active_shipping/carriers/ups.rb', line 783

def build_billing_info_node(xml, options={})
  if options[:bill_third_party]
    xml.BillThirdParty do
      node_type = options[:bill_to_consignee] ? :BillThirdPartyConsignee : :BillThirdPartyShipper
      xml.public_send(node_type) do
        xml.AccountNumber(options[:billing_account])
        xml.ThirdParty do
          xml.Address do
            xml.PostalCode(options[:billing_zip])
            xml.CountryCode(mapped_country_code(options[:billing_country]))
          end
        end
      end
    end
  else
    xml.BillShipper do
      xml.AccountNumber(options[:origin_account])
    end
  end
end