Class: Tinker::Model::Dto::QueryPaymentRequestDto
- Inherits:
-
Object
- Object
- Tinker::Model::Dto::QueryPaymentRequestDto
- Defined in:
- lib/tinker/model/dto/query_payment_request_dto.rb
Instance Attribute Summary collapse
-
#gateway ⇒ Object
readonly
Returns the value of attribute gateway.
-
#payment_reference ⇒ Object
readonly
Returns the value of attribute payment_reference.
Instance Method Summary collapse
-
#initialize(payment_reference:, gateway:) ⇒ QueryPaymentRequestDto
constructor
A new instance of QueryPaymentRequestDto.
- #to_hash ⇒ Object
Constructor Details
#initialize(payment_reference:, gateway:) ⇒ QueryPaymentRequestDto
Returns a new instance of QueryPaymentRequestDto.
9 10 11 12 |
# File 'lib/tinker/model/dto/query_payment_request_dto.rb', line 9 def initialize(payment_reference:, gateway:) @payment_reference = payment_reference @gateway = gateway end |
Instance Attribute Details
#gateway ⇒ Object (readonly)
Returns the value of attribute gateway.
7 8 9 |
# File 'lib/tinker/model/dto/query_payment_request_dto.rb', line 7 def gateway @gateway end |
#payment_reference ⇒ Object (readonly)
Returns the value of attribute payment_reference.
7 8 9 |
# File 'lib/tinker/model/dto/query_payment_request_dto.rb', line 7 def payment_reference @payment_reference end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/tinker/model/dto/query_payment_request_dto.rb', line 14 def to_hash gateway_value = @gateway.is_a?(String) ? @gateway : @gateway.to_s { payment_reference: @payment_reference, gateway: gateway_value } end |