Class: Mpp::Methods::Tempo::Schemas::MethodDetails

Inherits:
Data
  • Object
show all
Defined in:
lib/mpp/methods/tempo/schemas.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(chain_id: 4217, fee_payer: false, fee_payer_url: nil, memo: nil) ⇒ MethodDetails

Returns a new instance of MethodDetails.



11
12
13
# File 'lib/mpp/methods/tempo/schemas.rb', line 11

def initialize(chain_id: 4217, fee_payer: false, fee_payer_url: nil, memo: nil)
  super
end

Instance Attribute Details

#chain_idObject (readonly)

Returns the value of attribute chain_id

Returns:

  • (Object)

    the current value of chain_id



10
11
12
# File 'lib/mpp/methods/tempo/schemas.rb', line 10

def chain_id
  @chain_id
end

#fee_payerObject (readonly)

Returns the value of attribute fee_payer

Returns:

  • (Object)

    the current value of fee_payer



10
11
12
# File 'lib/mpp/methods/tempo/schemas.rb', line 10

def fee_payer
  @fee_payer
end

#fee_payer_urlObject (readonly)

Returns the value of attribute fee_payer_url

Returns:

  • (Object)

    the current value of fee_payer_url



10
11
12
# File 'lib/mpp/methods/tempo/schemas.rb', line 10

def fee_payer_url
  @fee_payer_url
end

#memoObject (readonly)

Returns the value of attribute memo

Returns:

  • (Object)

    the current value of memo



10
11
12
# File 'lib/mpp/methods/tempo/schemas.rb', line 10

def memo
  @memo
end

Class Method Details

.from_hash(hash) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/mpp/methods/tempo/schemas.rb', line 15

def self.from_hash(hash)
  return new unless hash.is_a?(Hash)

  new(
    chain_id: hash["chainId"] || 4217,
    fee_payer: hash["feePayer"] || false,
    fee_payer_url: hash["feePayerUrl"],
    memo: hash["memo"]
  )
end