Constants

PATTERN_TYPE_HASH256

PATTERN_TYPE_HASH256

The hex representation of a 256-bit hash

PATTERN_TYPE_HASH128

PATTERN_TYPE_HASH128

The hex representation of a 128-bit hash

PATTERN_TYPE_TIMESTAMP

PATTERN_TYPE_TIMESTAMP

An ISO 8601 combined date and time timestamp

PATTERN_TYPE_RIPPLEADDRESS

PATTERN_TYPE_RIPPLEADDRESS

A Ripple account address

PATTERN_TYPE_RESOURCEID

PATTERN_TYPE_RESOURCEID

A client-supplied unique identifier (ideally a UUID) for this transaction used to prevent duplicate payments and help confirm the transaction's final status. All ASCII printable characters are allowed. Note that 256-bit hex strings are disallowed because of the potential confusion with transaction hashes.

PATTERN_TYPE_FLOATSTRING

PATTERN_TYPE_FLOATSTRING

A string representation of a floating point number

PATTERN_TYPE_URL

PATTERN_TYPE_URL

A standard URL

PATTERN_TYPE_CURRENCY

PATTERN_TYPE_CURRENCY

The three-character code or hex string used to denote currencies

PATTERN_TYPE_UINT32

PATTERN_TYPE_UINT32

A string representation of an unsigned 32-bit integer (0-4294967295)

PATTERN_DIRECTION

PATTERN_DIRECTION

Pattern Rule for field `RippleRestPayment::$direction`

PATTERN_STATE

PATTERN_STATE

Pattern Rule for field `RippleRestPayment::$state`

PATTERN_RESULT

PATTERN_RESULT

Pattern Rule for field `RippleRestPayment::$result`

PATTERN_LEDGER

PATTERN_LEDGER

Pattern Rule for field `RippleRestPayment::$ledger`

Properties

$clientResourceId

$clientResourceId

Client resource Id

$sourceAccount

$sourceAccount : string

(RippleAddress) The Ripple account address of the Payment sender

Type

string

$sourceTag

$sourceTag : string

(UINT32) A string representing an unsigned 32-bit integer most commonly used to refer to a sender's hosted account at a Ripple gateway

Type

string

$sourceAmount

$sourceAmount : \RippleRestAmount

An optional amount that can be specified to constrain cross-currency payments

Type

\RippleRestAmount

$sourceSlippage

$sourceSlippage : string

(FloatString) An optional cushion for the source_amount to increase the likelihood that the payment will succeed. The source_account will never be charged more than source_amount.value + source_slippage

Type

string

$destinationAccount

$destinationAccount : string

(RippleAddress)

Type

string

$destinationTag

$destinationTag : string

(UINT32) A string representing an unsigned 32-bit integer most commonly used to refer to a receiver's hosted account at a Ripple gateway

Type

string

$destinationAmount

$destinationAmount : \RippleRestAmount

The amount the destination_account will receive

Type

\RippleRestAmount

$invoiceId

$invoiceId : string

(Hash256) A 256-bit hash that can be used to identify a particular payment

Type

string

$paths

$paths : string

A "stringified" version of the Ripple PathSet structure that users should treat as opaque

Type

string

$partialPayment

$partialPayment : boolean

A boolean that, if set to true, indicates that this payment should go through even if the whole amount cannot be delivered because of a lack of liquidity or funds in the source_account account

Type

boolean

$noDirectRipple

$noDirectRipple : boolean

A boolean that can be set to true if paths are specified and the sender would like the Ripple Network to disregard any direct paths from the source_account to the destination_account. This may be used to take advantage of an arbitrage opportunity or by gateways wishing to issue balances from a hot wallet to a user who has mistakenly set a trustline directly to the hot wallet

Type

boolean

$direction

$direction : string

(/^incoming|outgoing|passthrough$/) The direction of the payment, from the perspective of the account being queried. Possible values are "incoming", "outgoing", and "passthrough"

Type

string

$state

$state : string

(/^validated|failed|new$/) The state of the payment from the perspective of the Ripple Ledger. Possible values are "validated" and "failed" and "new" if the payment has not been submitted yet

Type

string

$result

$result : string

(/te[cfjlms][A-Za-z_]+/) The rippled code indicating the success or failure type of the payment. The code "tesSUCCESS" indicates that the payment was successfully validated and written into the Ripple Ledger. All other codes will begin with the following prefixes: "tec", "tef", "tel", or "tej"

Type

string

$ledger

$ledger : string

(/^[0-9]+$/) The string representation of the index number of the ledger containing the validated or failed payment. Failed payments will only be written into the Ripple Ledger if they fail after submission to a rippled and a Ripple Network fee is claimed

Type

string

$hash

$hash : string

(Hash256) The 256-bit hash of the payment. This is used throughout the Ripple protocol as the unique identifier for the transaction

Type

string

$timestamp

$timestamp : string

(Timestamp) The timestamp representing when the payment was validated and written into the Ripple ledger

Type

string

$fee

$fee : string

(FloatString) The Ripple Network transaction fee, represented in whole XRP (NOT "drops", or millionths of an XRP, which is used elsewhere in the Ripple protocol)

Type

string

$sourceBalanceChanges

$sourceBalanceChanges : \Amount[]

Parsed from the validated transaction metadata, this array represents all of the changes to balances held by the source_account. Most often this will have one amount representing the Ripple Network fee and, if the source_amount was not XRP, one amount representing the actual source_amount that was sent

Type

\Amount[]

$destinationBalanceChanges

$destinationBalanceChanges : \Amount[]

Parsed from the validated transaction metadata, this array represents the changes to balances held by the destination_account. For those receiving payments this is important to check because if the partial_payment flag is set this value may be less than the destination_amount

Type

\Amount[]

Methods

__construct()

__construct(array $data) : \RippleRestPayment

Create a new instance of RippleRestPayment.

Parameters

array $data

(defaults to null) PHP Array (result of json_decode($json, true))

Returns

\RippleRestPayment

getSourceAccount()

getSourceAccount() : string

The Ripple account address of the Payment sender

Returns

string —

(RippleAddress)

setSourceAccount()

setSourceAccount(string $value) : null

The Ripple account address of the Payment sender

Parameters

string $value

(RippleAddress)

Returns

null

getSourceTag()

getSourceTag() : string

A string representing an unsigned 32-bit integer most commonly used to refer to a sender's hosted account at a Ripple gateway

Returns

string —

(UINT32)

setSourceTag()

setSourceTag(string $value) : null

A string representing an unsigned 32-bit integer most commonly used to refer to a sender's hosted account at a Ripple gateway

Parameters

string $value

(UINT32)

Returns

null

getSourceAmount()

getSourceAmount() : \RippleRestAmount

An optional amount that can be specified to constrain cross-currency payments

Returns

\RippleRestAmount

setSourceAmount()

setSourceAmount(\RippleRestAmount $value) : null

An optional amount that can be specified to constrain cross-currency payments

Parameters

\RippleRestAmount $value

Returns

null

getSourceSlippage()

getSourceSlippage() : string

An optional cushion for the source_amount to increase the likelihood that the payment will succeed. The source_account will never be charged more than source_amount.value + source_slippage

Returns

string —

(FloatString)

setSourceSlippage()

setSourceSlippage(string $value) : null

An optional cushion for the source_amount to increase the likelihood that the payment will succeed. The source_account will never be charged more than source_amount.value + source_slippage

Parameters

string $value

(FloatString)

Returns

null

getDestinationAccount()

getDestinationAccount() : string

Returns

string —

(RippleAddress)

setDestinationAccount()

setDestinationAccount(string $value) : null

Parameters

string $value

(RippleAddress)

Returns

null

getDestinationTag()

getDestinationTag() : string

A string representing an unsigned 32-bit integer most commonly used to refer to a receiver's hosted account at a Ripple gateway

Returns

string —

(UINT32)

setDestinationTag()

setDestinationTag(string $value) : null

A string representing an unsigned 32-bit integer most commonly used to refer to a receiver's hosted account at a Ripple gateway

Parameters

string $value

(UINT32)

Returns

null

getDestinationAmount()

getDestinationAmount() : \RippleRestAmount

The amount the destination_account will receive

Returns

\RippleRestAmount

setDestinationAmount()

setDestinationAmount(\RippleRestAmount $value) : null

The amount the destination_account will receive

Parameters

\RippleRestAmount $value

Returns

null

getInvoiceId()

getInvoiceId() : string

A 256-bit hash that can be used to identify a particular payment

Returns

string —

(Hash256)

setInvoiceId()

setInvoiceId(string $value) : null

A 256-bit hash that can be used to identify a particular payment

Parameters

string $value

(Hash256)

Returns

null

getPaths()

getPaths() : string

A "stringified" version of the Ripple PathSet structure that users should treat as opaque

Returns

string

setPaths()

setPaths(string $value) : null

A "stringified" version of the Ripple PathSet structure that users should treat as opaque

Parameters

string $value

Returns

null

getPartialPayment()

getPartialPayment() : boolean

A boolean that, if set to true, indicates that this payment should go through even if the whole amount cannot be delivered because of a lack of liquidity or funds in the source_account account

Returns

boolean

setPartialPayment()

setPartialPayment(boolean $value) : null

A boolean that, if set to true, indicates that this payment should go through even if the whole amount cannot be delivered because of a lack of liquidity or funds in the source_account account

Parameters

boolean $value

Returns

null

getNoDirectRipple()

getNoDirectRipple() : boolean

A boolean that can be set to true if paths are specified and the sender would like the Ripple Network to disregard any direct paths from the source_account to the destination_account. This may be used to take advantage of an arbitrage opportunity or by gateways wishing to issue balances from a hot wallet to a user who has mistakenly set a trustline directly to the hot wallet

Returns

boolean

setNoDirectRipple()

setNoDirectRipple(boolean $value) : null

A boolean that can be set to true if paths are specified and the sender would like the Ripple Network to disregard any direct paths from the source_account to the destination_account. This may be used to take advantage of an arbitrage opportunity or by gateways wishing to issue balances from a hot wallet to a user who has mistakenly set a trustline directly to the hot wallet

Parameters

boolean $value

Returns

null

getDirection()

getDirection() : string

The direction of the payment, from the perspective of the account being queried. Possible values are "incoming", "outgoing", and "passthrough"

Returns

string —

(/^incoming|outgoing|passthrough$/)

setDirection()

setDirection(string $value) : null

The direction of the payment, from the perspective of the account being queried. Possible values are "incoming", "outgoing", and "passthrough"

Parameters

string $value

(/^incoming|outgoing|passthrough$/)

Returns

null

getState()

getState() : string

The state of the payment from the perspective of the Ripple Ledger. Possible values are "validated" and "failed" and "new" if the payment has not been submitted yet

Returns

string —

(/^validated|failed|new$/)

setState()

setState(string $value) : null

The state of the payment from the perspective of the Ripple Ledger. Possible values are "validated" and "failed" and "new" if the payment has not been submitted yet

Parameters

string $value

(/^validated|failed|new$/)

Returns

null

getResult()

getResult() : string

The rippled code indicating the success or failure type of the payment. The code "tesSUCCESS" indicates that the payment was successfully validated and written into the Ripple Ledger. All other codes will begin with the following prefixes: "tec", "tef", "tel", or "tej"

Returns

string —

(/te[cfjlms][A-Za-z_]+/)

setResult()

setResult(string $value) : null

The rippled code indicating the success or failure type of the payment. The code "tesSUCCESS" indicates that the payment was successfully validated and written into the Ripple Ledger. All other codes will begin with the following prefixes: "tec", "tef", "tel", or "tej"

Parameters

string $value

(/te[cfjlms][A-Za-z_]+/)

Returns

null

getLedger()

getLedger() : string

The string representation of the index number of the ledger containing the validated or failed payment. Failed payments will only be written into the Ripple Ledger if they fail after submission to a rippled and a Ripple Network fee is claimed

Returns

string —

(/^[0-9]+$/)

setLedger()

setLedger(string $value) : null

The string representation of the index number of the ledger containing the validated or failed payment. Failed payments will only be written into the Ripple Ledger if they fail after submission to a rippled and a Ripple Network fee is claimed

Parameters

string $value

(/^[0-9]+$/)

Returns

null

getHash()

getHash() : string

The 256-bit hash of the payment. This is used throughout the Ripple protocol as the unique identifier for the transaction

Returns

string —

(Hash256)

setHash()

setHash(string $value) : null

The 256-bit hash of the payment. This is used throughout the Ripple protocol as the unique identifier for the transaction

Parameters

string $value

(Hash256)

Returns

null

getTimestamp()

getTimestamp() : string

The timestamp representing when the payment was validated and written into the Ripple ledger

Returns

string —

(Timestamp)

setTimestamp()

setTimestamp(string $value) : null

The timestamp representing when the payment was validated and written into the Ripple ledger

Parameters

string $value

(Timestamp)

Returns

null

getFee()

getFee() : string

The Ripple Network transaction fee, represented in whole XRP (NOT "drops", or millionths of an XRP, which is used elsewhere in the Ripple protocol)

Returns

string —

(FloatString)

setFee()

setFee(string $value) : null

The Ripple Network transaction fee, represented in whole XRP (NOT "drops", or millionths of an XRP, which is used elsewhere in the Ripple protocol)

Parameters

string $value

(FloatString)

Returns

null

getSourceBalanceChanges()

getSourceBalanceChanges() : \Amount[]

Parsed from the validated transaction metadata, this array represents all of the changes to balances held by the source_account. Most often this will have one amount representing the Ripple Network fee and, if the source_amount was not XRP, one amount representing the actual source_amount that was sent

Returns

\Amount[]

setSourceBalanceChanges()

setSourceBalanceChanges(\Amount[] $value) : null

Parsed from the validated transaction metadata, this array represents all of the changes to balances held by the source_account. Most often this will have one amount representing the Ripple Network fee and, if the source_amount was not XRP, one amount representing the actual source_amount that was sent

Parameters

\Amount[] $value

Returns

null

getDestinationBalanceChanges()

getDestinationBalanceChanges() : \Amount[]

Parsed from the validated transaction metadata, this array represents the changes to balances held by the destination_account. For those receiving payments this is important to check because if the partial_payment flag is set this value may be less than the destination_amount

Returns

\Amount[]

setDestinationBalanceChanges()

setDestinationBalanceChanges(\Amount[] $value) : null

Parsed from the validated transaction metadata, this array represents the changes to balances held by the destination_account. For those receiving payments this is important to check because if the partial_payment flag is set this value may be less than the destination_amount

Parameters

\Amount[] $value

Returns

null

toArray()

toArray() : array

Convert this object to PHP native Array for serializing to JSON.

Returns

array