Class: YaKassa::V3::BaseRequest
- Inherits:
-
Object
- Object
- YaKassa::V3::BaseRequest
- Extended by:
- Concerns::Attributable
- Includes:
- Concerns::Validatable
- Defined in:
- lib/ya_kassa/v3/base_request.rb
Direct Known Subclasses
PaymentCancelRequest, PaymentCaptureRequest, PaymentRequest, PaymentStatusRequest, ReceiptRequest, RefundRequest
Constant Summary
Constants included from Concerns::Validatable
Concerns::Validatable::VALIDATORS
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #body ⇒ Object
- #create ⇒ Object
-
#initialize(idempotence_key, params = {}) ⇒ BaseRequest
constructor
A new instance of BaseRequest.
Methods included from Concerns::Attributable
Methods included from Concerns::Validatable
Constructor Details
#initialize(idempotence_key, params = {}) ⇒ BaseRequest
Returns a new instance of BaseRequest.
9 10 11 12 13 |
# File 'lib/ya_kassa/v3/base_request.rb', line 9 def initialize(idempotence_key, params = {}) @params = params @idempotence_key = idempotence_key @response = nil end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/ya_kassa/v3/base_request.rb', line 7 def response @response end |
Instance Method Details
#body ⇒ Object
20 21 22 |
# File 'lib/ya_kassa/v3/base_request.rb', line 20 def body { } end |
#create ⇒ Object
15 16 17 18 |
# File 'lib/ya_kassa/v3/base_request.rb', line 15 def create return errors unless valid? send_request end |