pub struct PaymentSession {
pub payment_id: PaymentId,
pub provider: PaymentProvider,
pub provider_reference: ProviderReference,
pub merchant_reference: MerchantReference,
pub status: PaymentStatus,
pub next_action: Option<NextAction>,
}Expand description
Normalized payment creation response.
Fields§
§payment_id: PaymentIdPayRail payment ID.
provider: PaymentProviderProvider handling the payment.
provider_reference: ProviderReferenceProvider reference.
merchant_reference: MerchantReferenceMerchant reference.
status: PaymentStatusNormalized status.
next_action: Option<NextAction>Next required action.
Implementations§
Source§impl PaymentSession
impl PaymentSession
Sourcepub fn new(
provider: PaymentProvider,
provider_reference: ProviderReference,
merchant_reference: MerchantReference,
status: PaymentStatus,
next_action: Option<NextAction>,
) -> Result<Self, PaymentError>
pub fn new( provider: PaymentProvider, provider_reference: ProviderReference, merchant_reference: MerchantReference, status: PaymentStatus, next_action: Option<NextAction>, ) -> Result<Self, PaymentError>
Creates a normalized session with a generated PayRail payment ID.
§Errors
Returns an error if generated ID validation fails.
Trait Implementations§
Source§impl Clone for PaymentSession
impl Clone for PaymentSession
Source§fn clone(&self) -> PaymentSession
fn clone(&self) -> PaymentSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PaymentSession
impl Debug for PaymentSession
Source§impl PartialEq for PaymentSession
impl PartialEq for PaymentSession
impl Eq for PaymentSession
impl StructuralPartialEq for PaymentSession
Auto Trait Implementations§
impl Freeze for PaymentSession
impl RefUnwindSafe for PaymentSession
impl Send for PaymentSession
impl Sync for PaymentSession
impl Unpin for PaymentSession
impl UnsafeUnpin for PaymentSession
impl UnwindSafe for PaymentSession
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more