Class: Maxipago::RequestBuilder::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/maxipago/request_builder/request.rb

Direct Known Subclasses

ApiRequest, RapiRequest, TransactionRequest

Instance Method Summary collapse

Constructor Details

#initialize(maxipagoId, apiKey) ⇒ Request

Returns a new instance of Request.



8
9
10
11
12
13
# File 'lib/maxipago/request_builder/request.rb', line 8

def initialize(maxipagoId, apiKey)
  @maxipagoId = maxipagoId
  @apiKey = apiKey
  @apiVersion = Maxipago::Client::APIVERSION
  @header = { "Content-Type" => 'text/xml' }
end

Instance Method Details

#send_command(opts) ⇒ Object



15
16
17
18
# File 'lib/maxipago/request_builder/request.rb', line 15

def send_command(opts)
  xml = build_xml(opts)
  send_request(xml)
end