Class: YaKassa::V3::Client::Base
- Inherits:
-
Object
- Object
- YaKassa::V3::Client::Base
- Defined in:
- lib/ya_kassa/v3/client/base.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#idempotence_key ⇒ Object
readonly
Returns the value of attribute idempotence_key.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, body = nil, idempotence_key = nil) ⇒ Base
constructor
A new instance of Base.
- #request ⇒ Object
Constructor Details
#initialize(url, body = nil, idempotence_key = nil) ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 |
# File 'lib/ya_kassa/v3/client/base.rb', line 7 def initialize(url, body = nil, idempotence_key = nil) @url = url @body = body @idempotence_key = idempotence_key end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/ya_kassa/v3/client/base.rb', line 5 def body @body end |
#idempotence_key ⇒ Object (readonly)
Returns the value of attribute idempotence_key.
5 6 7 |
# File 'lib/ya_kassa/v3/client/base.rb', line 5 def idempotence_key @idempotence_key end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/ya_kassa/v3/client/base.rb', line 5 def url @url end |
Instance Method Details
#request ⇒ Object
13 14 15 16 |
# File 'lib/ya_kassa/v3/client/base.rb', line 13 def request response = send { code: response.code, body: response_body(response), headers: response.headers} end |