Class: TinkoffClient::Payout::Request
- Inherits:
-
Object
- Object
- TinkoffClient::Payout::Request
- Includes:
- EncryptData, SendRequest
- Defined in:
- lib/tinkoff_client/payout/request.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
- #init_params(keys) ⇒ Object
-
#initialize(url) ⇒ Request
constructor
A new instance of Request.
Methods included from EncryptData
Methods included from SendRequest
Constructor Details
#initialize(url) ⇒ Request
Returns a new instance of Request.
14 15 16 |
# File 'lib/tinkoff_client/payout/request.rb', line 14 def initialize(url) @url = "https://securepay.tinkoff.ru/e2c/v2/".freeze end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
12 13 14 |
# File 'lib/tinkoff_client/payout/request.rb', line 12 def url @url end |
Class Method Details
.request(*args, &block) ⇒ Object
18 19 20 21 |
# File 'lib/tinkoff_client/payout/request.rb', line 18 def self.request(*args, &block) params = args[0] new(*args, &block).request(path: params[:path], keys: params[:keys]) end |
Instance Method Details
#init_params(keys) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/tinkoff_client/payout/request.rb', line 23 def init_params(keys) data = encrypt_data(keys) payload = { TerminalKey: TinkoffClient.configuration.payout_terminal_key, SignatureValue: data[:signature_value], DigestValue: data[:digest_value], X509SerialNumber: data[:x509_serial_number], **keys, } end |