class MaxipagoApi::ResponseApi
Public Class Methods
create(customer)
click to toggle source
# File lib/maxipago_api/responses/response_api.rb, line 8 def create(customer) xml = { 'verification' => {merchantId: MaxipagoApi.store_id, merchantKey: MaxipagoApi.store_key}, command: 'add-consumer', request: customer.to_object }.to_xml(root: 'api-request') response = post(MaxipagoApi.api_register_endpoint, body: xml, headers: {'Content-Type' => 'text/plain'}) Hash.from_xml(response.parsed_response) end