Class: RippleRest::AccountSettings
- Inherits:
-
RestObject
- Object
- RestObject
- RippleRest::AccountSettings
- Defined in:
- lib/ripple-rest/generated-schemas.rb,
lib/ripple-rest/schemas.rb,
lib/ripple-rest/generated-schemas.rb
Overview
An object
Instance Attribute Summary collapse
-
#account ⇒ String<RippleAddress>
The Ripple address of the account in question.
-
#disallow_xrp ⇒ Boolean
If set to true incoming XRP payments will be allowed.
-
#email_hash ⇒ String<Hash128>
The MD5 128-bit hash of the account owner’s email address.
-
#hash ⇒ String<Hash256>
If this object was returned by a historical query this value will be the hash of the transaction that modified these settings.
-
#ledger ⇒ String
The string representation of the index number of the ledger containing these account settings or, in the case of historical queries, of the transaction that modified these settings.
-
#message_key ⇒ String
An optional public key, represented as hex, that can be set to allow others to send encrypted messages to the account owner.
-
#regular_key ⇒ String<RippleAddress>
The hash of an optional additional public key that can be used for signing and verifying transactions.
-
#require_authorization ⇒ Boolean
If set to true incoming trustlines will only be validated if this account first creates a trustline to the counterparty with the authorized flag set to true.
-
#require_destination_tag ⇒ Boolean
If set to true incoming payments will only be validated if they include a destination_tag.
-
#transaction_sequence ⇒ String<UINT32>
A string representation of the last sequence number of a validated transaction created by this account.
-
#transfer_rate ⇒ Float
A number representation of the rate charged each time a holder of currency issued by this account transfers it.
-
#trustline_count ⇒ String<UINT32>
The number of trustlines owned by this account.
-
#url ⇒ URI
The domain associated with this account.
Instance Method Summary collapse
-
#save ⇒ void
Save the account settings.
Methods inherited from RestObject
Constructor Details
This class inherits a constructor from RippleRest::RestObject
Instance Attribute Details
#account ⇒ String<RippleAddress>
The Ripple address of the account in question
4 5 6 |
# File 'lib/ripple-rest/schemas.rb', line 4 def account @account end |
#disallow_xrp ⇒ Boolean
If set to true incoming XRP payments will be allowed
216 |
# File 'lib/ripple-rest/generated-schemas.rb', line 216 property :disallow_xrp, :Boolean |
#email_hash ⇒ String<Hash128>
The MD5 128-bit hash of the account owner’s email address
191 |
# File 'lib/ripple-rest/generated-schemas.rb', line 191 property :email_hash, :Hash128 |
#hash ⇒ String<Hash256>
If this object was returned by a historical query this value will be the hash of the transaction that modified these settings. The transaction hash is used throughout the Ripple Protocol to uniquely identify a particular transaction
236 |
# File 'lib/ripple-rest/generated-schemas.rb', line 236 property :hash, :Hash256 |
#ledger ⇒ String
The string representation of the index number of the ledger containing these account settings or, in the case of historical queries, of the transaction that modified these settings
231 |
# File 'lib/ripple-rest/generated-schemas.rb', line 231 property :ledger, [:String, "^[0-9]+$"] |
#message_key ⇒ String
An optional public key, represented as hex, that can be set to allow others to send encrypted messages to the account owner
196 |
# File 'lib/ripple-rest/generated-schemas.rb', line 196 property :message_key, [:String, "^([0-9a-fA-F]{2}){0,33}$"] |
#regular_key ⇒ String<RippleAddress>
The hash of an optional additional public key that can be used for signing and verifying transactions
181 |
# File 'lib/ripple-rest/generated-schemas.rb', line 181 property :regular_key, :RippleAddress |
#require_authorization ⇒ Boolean
If set to true incoming trustlines will only be validated if this account first creates a trustline to the counterparty with the authorized flag set to true. This may be used by gateways to prevent accounts unknown to them from holding currencies they issue
211 |
# File 'lib/ripple-rest/generated-schemas.rb', line 211 property :require_authorization, :Boolean |
#require_destination_tag ⇒ Boolean
If set to true incoming payments will only be validated if they include a destination_tag. This may be used primarily by gateways that operate exclusively with hosted wallets
206 |
# File 'lib/ripple-rest/generated-schemas.rb', line 206 property :require_destination_tag, :Boolean |
#transaction_sequence ⇒ String<UINT32>
A string representation of the last sequence number of a validated transaction created by this account
221 |
# File 'lib/ripple-rest/generated-schemas.rb', line 221 property :transaction_sequence, :UINT32 |
#transfer_rate ⇒ Float
A number representation of the rate charged each time a holder of currency issued by this account transfers it. By default the rate is 100. A rate of 101 is a 1% charge on top of the amount being transferred. Up to nine decimal places are supported
201 |
# File 'lib/ripple-rest/generated-schemas.rb', line 201 property :transfer_rate, :Float |
#trustline_count ⇒ String<UINT32>
The number of trustlines owned by this account. This value does not include incoming trustlines where this account has not explicitly reciprocated trust
226 |
# File 'lib/ripple-rest/generated-schemas.rb', line 226 property :trustline_count, :UINT32 |
#url ⇒ URI
The domain associated with this account. The ripple.txt file can be looked up to verify this information
186 |
# File 'lib/ripple-rest/generated-schemas.rb', line 186 property :url, :URL |
Instance Method Details
#save ⇒ void
This method returns an undefined value.
Save the account settings
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ripple-rest/schemas.rb', line 11 def save raise ArgumentError.new("Account is missing.") unless account account.require_secret hash = {} hash["settings"] = to_hash hash["secret"] = account.secret RippleRest.post "v1/accounts/#{account.address}/settings", hash end |