Class: Alfabank::Request

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

Constant Summary collapse

BASE_URL =
'https://engine.paymentgate.ru/payment/rest/'
TEST_BASE_URL =
'https://web.rbsuat.com/ab/rest/'

Instance Method Summary collapse

Constructor Details

#initialize(method, params) ⇒ Request

Returns a new instance of Request.



8
9
10
11
# File 'lib/alfabank/request.rb', line 8

def initialize(method, params)
  @method = method
  @params = default_params.merge(params)
end

Instance Method Details

#performObject



13
14
15
16
# File 'lib/alfabank/request.rb', line 13

def perform
  request = HTTParty.post(url, query: @params, format: :json)
  request.parsed_response
end