Class: FriendlyShipping::Services::Ups::SerializeAccessRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/friendly_shipping/services/ups/serialize_access_request.rb

Class Method Summary collapse

Class Method Details

.call(login:, password:, key:) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/friendly_shipping/services/ups/serialize_access_request.rb', line 7

def self.call(login:, password:, key:)
  xml_builder = Nokogiri::XML::Builder.new do |xml|
    xml.AccessRequest do
      xml.AccessLicenseNumber(key)
      xml.UserId()
      xml.Password(password)
    end
  end
  xml_builder.to_xml
end