Struct yapay_sdk_rust::YapayTransaction
source · [−]pub struct YapayTransaction {
pub available_payment_methods: String,
pub order_number: Option<String>,
pub customer_ip: String,
pub shipping_type: Option<String>,
pub shipping_price: Option<String>,
pub price_discount: String,
pub url_notification: String,
pub free: String,
}
Expand description
A payment transaction used on requests.
Use the available builder methods:
YapayTransaction::online_goods
if there are no shipping address;
YapayTransaction::physical_goods
if there IS a shipping address;
Fields
available_payment_methods: String
order_number: Option<String>
When [Option::none
], this param will be the same as the [transaction_id
] on
TransactionResponse
. You must ensure that his field is not repeated ever.
customer_ip: String
shipping_type: Option<String>
shipping_price: Option<String>
price_discount: String
url_notification: String
URL in your server to receive IPN (Instant Payment Notification).
free: String
Implementations
sourceimpl YapayTransaction
impl YapayTransaction
sourcepub fn online_goods(
order_number: String,
customer_ip: String,
available_payment_methods: Option<String>,
notification_url: Option<&str>
) -> Result<Self, SDKError>
pub fn online_goods(
order_number: String,
customer_ip: String,
available_payment_methods: Option<String>,
notification_url: Option<&str>
) -> Result<Self, SDKError>
An online transaction does not include a shipping address.
notification_url
should be an URL in your server to receive IPN (Instant Payment
Notification).
sourcepub fn physical_goods()
pub fn physical_goods()
A physical product include a shipping address.
Trait Implementations
sourceimpl Clone for YapayTransaction
impl Clone for YapayTransaction
sourcefn clone(&self) -> YapayTransaction
fn clone(&self) -> YapayTransaction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for YapayTransaction
impl Debug for YapayTransaction
sourceimpl<'de> Deserialize<'de> for YapayTransaction
impl<'de> Deserialize<'de> for YapayTransaction
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<YapayTransaction> for YapayTransaction
impl PartialEq<YapayTransaction> for YapayTransaction
sourcefn eq(&self, other: &YapayTransaction) -> bool
fn eq(&self, other: &YapayTransaction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &YapayTransaction) -> bool
fn ne(&self, other: &YapayTransaction) -> bool
This method tests for !=
.
sourceimpl Serialize for YapayTransaction
impl Serialize for YapayTransaction
sourceimpl Validate for YapayTransaction
impl Validate for YapayTransaction
fn validate(&self) -> Result<(), ValidationErrors>
sourceimpl<'v_a> ValidateArgs<'v_a> for YapayTransaction
impl<'v_a> ValidateArgs<'v_a> for YapayTransaction
type Args = ()
fn validate_args(&self, args: Self::Args) -> Result<(), ValidationErrors>
impl StructuralPartialEq for YapayTransaction
Auto Trait Implementations
impl RefUnwindSafe for YapayTransaction
impl Send for YapayTransaction
impl Sync for YapayTransaction
impl Unpin for YapayTransaction
impl UnwindSafe for YapayTransaction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more