Class: LinxMicrovix::Request

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

Overview

lib/linx_microvix/request.rb

Instance Method Summary collapse

Constructor Details

#initialize(command_name, parameters, response_format = 'csv') ⇒ Request

Returns a new instance of Request.



6
7
8
9
10
# File 'lib/linx_microvix/request.rb', line 6

def initialize(command_name, parameters, response_format = 'csv')
  @command_name = command_name
  @parameters = parameters
  @response_format = response_format
end

Instance Method Details

#runObject



12
13
14
15
# File 'lib/linx_microvix/request.rb', line 12

def run
  url = 'http://webapi.microvix.com.br/1.0/api/integracao'
  Typhoeus::Request.new(url, method: :post, body: body_request).run
end