Class: Alfabank::Request
- Inherits:
-
Object
- Object
- Alfabank::Request
- 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
-
#initialize(method, params) ⇒ Request
constructor
A new instance of Request.
- #perform ⇒ Object
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
#perform ⇒ Object
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 |