Class: YandexMoney::ExternalPayment
- Inherits:
-
Object
- Object
- YandexMoney::ExternalPayment
- Includes:
- Client
- Defined in:
- lib/yandex_money/external_payment.rb
Overview
Payments from bank cards without authorization
Class Method Summary collapse
-
.get_instance_id(client_id) ⇒ RecursiveOpenStruct
Registers instance of application.
Instance Method Summary collapse
-
#initialize(instance_id) ⇒ ExternalPayment
constructor
A new instance of ExternalPayment.
-
#process_external_payment(payment_options) ⇒ RecursiveOpenStruct
Confirms a payment that was created using the request-extenral-payment method.
-
#request_external_payment(payment_options) ⇒ RecursiveOpenStruct
Requests a external payment.
Methods included from Client
Constructor Details
#initialize(instance_id) ⇒ ExternalPayment
Returns a new instance of ExternalPayment.
11 12 13 |
# File 'lib/yandex_money/external_payment.rb', line 11 def initialize(instance_id) @instance_id = instance_id end |
Class Method Details
.get_instance_id(client_id) ⇒ RecursiveOpenStruct
Registers instance of application
26 27 28 29 |
# File 'lib/yandex_money/external_payment.rb', line 26 def self.get_instance_id(client_id) response = send_external_payment_request("/api/instance-id", client_id: client_id) RecursiveOpenStruct.new response.body end |
Instance Method Details
#process_external_payment(payment_options) ⇒ RecursiveOpenStruct
Confirms a payment that was created using the request-extenral-payment method
59 60 61 62 63 |
# File 'lib/yandex_money/external_payment.rb', line 59 def process_external_payment() [:instance_id] = @instance_id response = self.class.send_external_payment_request("/api/process-external-payment", ) RecursiveOpenStruct.new response.body end |
#request_external_payment(payment_options) ⇒ RecursiveOpenStruct
Requests a external payment
42 43 44 45 46 |
# File 'lib/yandex_money/external_payment.rb', line 42 def request_external_payment() [:instance_id] = @instance_id response = self.class.send_external_payment_request("/api/request-external-payment", ) RecursiveOpenStruct.new response.body end |