Class: SimplyWompi::Transactions::Domain::Dtos::CreateTransactionPaymentMethodDto
- Inherits:
-
Object
- Object
- SimplyWompi::Transactions::Domain::Dtos::CreateTransactionPaymentMethodDto
- Defined in:
- lib/simply_wompi/transactions/domain/dtos/create_transaction_payment_method_dto.rb
Overview
Create Transaction Payment Method Data Transfer Object
Instance Attribute Summary collapse
-
#installments ⇒ Object
readonly
Returns the value of attribute installments.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, token:, installments:) ⇒ CreateTransactionPaymentMethodDto
constructor
A new instance of CreateTransactionPaymentMethodDto.
Constructor Details
#initialize(type:, token:, installments:) ⇒ CreateTransactionPaymentMethodDto
Returns a new instance of CreateTransactionPaymentMethodDto.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/simply_wompi/transactions/domain/dtos/create_transaction_payment_method_dto.rb', line 11 def initialize( type:, token:, installments: ) unless type.is_a?(String) raise ArgumentError("ArgumentError type: #{type.class}, is not instance of #{String}") end unless token.is_a?(String) raise ArgumentError("ArgumentError token: #{token.class}, is not instance of #{String}") end unless installments.is_a?(Integer) raise ArgumentError("ArgumentError installments: #{installments.class}, is not instance of #{Integer}") end @type = type @token = token @installments = installments end |
Instance Attribute Details
#installments ⇒ Object (readonly)
Returns the value of attribute installments.
7 8 9 |
# File 'lib/simply_wompi/transactions/domain/dtos/create_transaction_payment_method_dto.rb', line 7 def installments @installments end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
7 8 9 |
# File 'lib/simply_wompi/transactions/domain/dtos/create_transaction_payment_method_dto.rb', line 7 def token @token end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/simply_wompi/transactions/domain/dtos/create_transaction_payment_method_dto.rb', line 7 def type @type end |