Struct offchain::types::PaymentObject
source · pub struct PaymentObject {
pub sender: PaymentActorObject,
pub receiver: PaymentActorObject,
pub reference_id: Uuid,
pub originial_payment_reference_id: Option<Uuid>,
pub recipient_signature: Option<String>,
pub action: PaymentActionObject,
pub description: Option<String>,
}
Expand description
Some fields are immutable after they are defined once. Others can be updated multiple times (see below). Updating immutable fields with a different value results in a Command error.
Fields§
§sender: PaymentActorObject
Information about the sender in this payment
receiver: PaymentActorObject
Information about the receiver in this payment
reference_id: Uuid
Unique reference ID of this payment on the payment initiator VASP (the VASP which originally created this payment Object). This value should be globally unique. This field is mandatory on payment creation and immutable after that. We recommend using a 128 bits long UUID according to RFC4122 with “-”’s included.
originial_payment_reference_id: Option<Uuid>
Used to refer an old payment known to the other VASP. For example, used for refunds. The reference ID of the original payment will be placed into this field. This field is mandatory on refund and immutable
recipient_signature: Option<String>
Signature of the recipient of this transaction encoded in hex. The is signed with the compliance key of the recipient VASP and is used for on-chain attestation from the recipient party. This may be omitted on blockchains which do not require on-chain attestation.
action: PaymentActionObject
Number of cryptocurrency + currency type (XUS, etc.)1 + type of action to take. This field is mandatory and immutable
description: Option<String>
Description of the payment. To be displayed to the user. Unicode utf-8 encoded max length of 255 characters. This field is optional but can only be written once.
Implementations§
source§impl PaymentObject
impl PaymentObject
pub fn sender(&self) -> &PaymentActorObject
pub fn receiver(&self) -> &PaymentActorObject
pub fn reference_id(&self) -> Uuid
pub fn actor_object_by_actor(&self, actor: Actor) -> &PaymentActorObject
pub fn recipient_signature(&self) -> Option<&str>
pub fn validate_write_once_fields( &self, prior: &Self ) -> Result<(), WriteOnceError>
Trait Implementations§
source§impl Clone for PaymentObject
impl Clone for PaymentObject
source§fn clone(&self) -> PaymentObject
fn clone(&self) -> PaymentObject
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PaymentObject
impl Debug for PaymentObject
source§impl<'de> Deserialize<'de> for PaymentObject
impl<'de> Deserialize<'de> for PaymentObject
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl PartialEq<PaymentObject> for PaymentObject
impl PartialEq<PaymentObject> for PaymentObject
source§fn eq(&self, other: &PaymentObject) -> bool
fn eq(&self, other: &PaymentObject) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PaymentObject
impl Serialize for PaymentObject
impl Eq for PaymentObject
impl StructuralEq for PaymentObject
impl StructuralPartialEq for PaymentObject
Auto Trait Implementations§
impl RefUnwindSafe for PaymentObject
impl Send for PaymentObject
impl Sync for PaymentObject
impl Unpin for PaymentObject
impl UnwindSafe for PaymentObject
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.