Struct ClientSessionUpdateApiRequest

Source
pub struct ClientSessionUpdateApiRequest {
    pub order: Option<OrderDetailsApiSchema>,
    pub order_id: Option<String>,
    pub customer: Option<CheckoutCustomerDetailsApiSchema>,
    pub payment_method: Option<CheckoutPaymentMethodOptionsApiSchema>,
    pub currency_code: Option<String>,
    pub amount: Option<Value>,
    pub metadata: Option<Value>,
    pub customer_id: Option<String>,
    pub client_token: Option<String>,
}

Fields§

§order: Option<OrderDetailsApiSchema>

More information associated with the order.

Each of the fields in this object must be updated in its entirety, i.e. provide the entire object to update it. Anything provided previously will be overwritten.

§order_id: Option<String>

Your reference for the order.

§customer: Option<CheckoutCustomerDetailsApiSchema>

More information associated with the customer.

Each of the fields in this object must be updated in its entirety, i.e. provide the entire object to update it. Anything provided previously will be overwritten.

§payment_method: Option<CheckoutPaymentMethodOptionsApiSchema>

Enable certain options associated with the payment method. Provide the entire object to update it. Anything provided previously will be overwritten.

§currency_code: Option<String>

The 3-letter currency code in ISO 4217 format. e.g. use USD for US dollars.

§amount: Option<Value>

The amount you would like to charge the customer, in minor units. e.g. for $7, use 700.

Some currencies, such as Japanese Yen, do not have minor units. In this case you should use the value as it is, without any formatting. For example for ¥100, use 100.

If the amount is provided on this level, it would override any amount calculated from the provided line items, shipping and other amounts.

§metadata: Option<Value>

Additional data to be used throughout the payment lifecycle.

Provide the entire object to update it. Anything provided previously will be overwritten.

§customer_id: Option<String>

A unique identifier for your customer.

§client_token: Option<String>

Client token for use in the Primer-JS SDK obtained via POST /client-session API call.

Trait Implementations§

Source§

impl Debug for ClientSessionUpdateApiRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ClientSessionUpdateApiRequest

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ClientSessionUpdateApiRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Serialize for ClientSessionUpdateApiRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,