18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/akatus/payment_methods.rb', line 18
def self.available
builder = Nokogiri::XML::Builder.new do |xml|
xml.meios_de_pagamento {
xml.correntista {
xml.api_key Akatus.seller_api_key
xml.email Akatus.seller_email
}
}
end
request = HTTPI::Request.new(Akatus.akatus_api_uri + '/meios-de-pagamento.xml')
request.body = builder.to_xml
request.open_timeout = 10 request.read_timeout = 30
parsed_response = parse_response(HTTPI.post request)
splited_payment_methods = split_by_kind(parsed_response)
end
|