Class: NodexPay::PaymentResult

Inherits:
Data
  • Object
show all
Defined in:
lib/nodex_pay/models.rb,
sig/nodex_pay.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(order_code:, transaction_code:, amount:, symbol:, result:, chain_id:, transaction_hash:) ⇒ PaymentResult

Returns a new instance of PaymentResult.



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/nodex_pay/models.rb', line 24

def initialize(order_code:, transaction_code:, amount:, symbol:, result:, chain_id:, transaction_hash:)
  super(
    order_code: order_code.dup.freeze,
    transaction_code: transaction_code.dup.freeze,
    amount: amount.dup.freeze,
    symbol: symbol.dup.freeze,
    result:,
    chain_id: chain_id.dup.freeze,
    transaction_hash: transaction_hash.dup.freeze
  )
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount

Returns:

  • (Object)

    the current value of amount



15
16
17
# File 'lib/nodex_pay/models.rb', line 15

def amount
  @amount
end

#chain_idObject (readonly)

Returns the value of attribute chain_id

Returns:

  • (Object)

    the current value of chain_id



15
16
17
# File 'lib/nodex_pay/models.rb', line 15

def chain_id
  @chain_id
end

#order_codeObject (readonly)

Returns the value of attribute order_code

Returns:

  • (Object)

    the current value of order_code



15
16
17
# File 'lib/nodex_pay/models.rb', line 15

def order_code
  @order_code
end

#resultObject (readonly)

Returns the value of attribute result

Returns:

  • (Object)

    the current value of result



15
16
17
# File 'lib/nodex_pay/models.rb', line 15

def result
  @result
end

#symbolObject (readonly)

Returns the value of attribute symbol

Returns:

  • (Object)

    the current value of symbol



15
16
17
# File 'lib/nodex_pay/models.rb', line 15

def symbol
  @symbol
end

#transaction_codeObject (readonly)

Returns the value of attribute transaction_code

Returns:

  • (Object)

    the current value of transaction_code



15
16
17
# File 'lib/nodex_pay/models.rb', line 15

def transaction_code
  @transaction_code
end

#transaction_hashObject (readonly)

Returns the value of attribute transaction_hash

Returns:

  • (Object)

    the current value of transaction_hash



15
16
17
# File 'lib/nodex_pay/models.rb', line 15

def transaction_hash
  @transaction_hash
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/nodex_pay/models.rb', line 36

def success?
  result
end