Class: RippleRest::Balance

Inherits:
RestObject show all
Defined in:
lib/ripple-rest/generated-schemas.rb,
lib/ripple-rest/schemas.rb,
lib/ripple-rest/generated-schemas.rb

Overview

A simplified representation of an account Balance

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RestObject

#initialize, #to_hash

Constructor Details

This class inherits a constructor from RippleRest::RestObject

Instance Attribute Details

#counterpartyString

The Ripple account address of the currency's issuer or gateway, or an empty string if the currency is XRP

Returns:

  • (String)

    “^$|^r{25,33}$”


362
# File 'lib/ripple-rest/generated-schemas.rb', line 362

property :counterparty, [:String, "^$|^r[1-9A-HJ-NP-Za-km-z]{25,33}$"]

#currencyString<Currency>

The currency expressed as a three-character code

Returns:

  • (String<Currency>)

356
# File 'lib/ripple-rest/generated-schemas.rb', line 356

property :currency, :Currency

#valueString

The quantity of the currency, denoted as a string to retain floating point precision

Returns:

  • (String)

350
# File 'lib/ripple-rest/generated-schemas.rb', line 350

property :value, :String

Instance Method Details

#inspectString

Returns:

  • (String)

46
47
48
# File 'lib/ripple-rest/schemas.rb', line 46

def inspect
  "#{value.to_s} #{currency}#{counterparty.to_s.size > 0 ? " (#{counterparty})" : ""}"
end