pub struct PaymentMethod {
pub actions: Vec<PaymentRailAction>,
pub currency: String,
pub id: PaymentMethodId,
pub limits: Option<PaymentMethodLimits>,
pub type_: PaymentMethodType,
}
Expand description
The fiat payment method object.
JSON schema
{
"description": "The fiat payment method object.",
"examples": [
{
"actions": [
"source",
"target"
],
"currency": "USD",
"id": "8e03978e-40d5-43e8-bc93-6894a57f9324",
"limits": {
"sourceLimit": {
"currency": "USD",
"value": "100.00"
}
},
"type": "card"
}
],
"type": "object",
"required": [
"actions",
"currency",
"id",
"type"
],
"properties": {
"actions": {
"description": "The actions for the payment method.",
"examples": [
[
"source",
"target"
]
],
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentRailAction"
}
},
"currency": {
"description": "The currency of the payment method.",
"examples": [
"USD"
],
"type": "string"
},
"id": {
"description": "The ID of the payment method which previously was added.",
"examples": [
"8e03978e-40d5-43e8-bc93-6894a57f9324"
],
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"limits": {
"description": "The limits of the payment method.",
"examples": [
{
"sourceLimit": {
"currency": "USD",
"value": "100.00"
},
"targetLimit": {
"currency": "USD",
"value": "100.00"
}
}
],
"type": "object",
"properties": {
"sourceLimit": {
"description": "The limit for this payment method being used as a source for transfers.",
"type": "object",
"properties": {
"amount": {
"description": "The amount of the limit.",
"examples": [
"100"
],
"type": "string"
},
"currency": {
"description": "The currency of the limit.",
"examples": [
"USD"
],
"type": "string"
}
}
},
"targetLimit": {
"description": "The limit for this payment method being used as a target for transfers.",
"type": "object",
"properties": {
"amount": {
"description": "The amount of the limit.",
"examples": [
"100"
],
"type": "string"
},
"currency": {
"description": "The currency of the limit.",
"examples": [
"USD"
],
"type": "string"
}
}
}
}
},
"type": {
"description": "The type of payment method.",
"examples": [
"card"
],
"type": "string",
"enum": [
"card",
"fiat_account"
]
}
}
}
Fields§
§actions: Vec<PaymentRailAction>
The actions for the payment method.
currency: String
The currency of the payment method.
id: PaymentMethodId
The ID of the payment method which previously was added.
limits: Option<PaymentMethodLimits>
§type_: PaymentMethodType
The type of payment method.
Implementations§
Source§impl PaymentMethod
impl PaymentMethod
pub fn builder() -> PaymentMethod
Trait Implementations§
Source§impl Clone for PaymentMethod
impl Clone for PaymentMethod
Source§fn clone(&self) -> PaymentMethod
fn clone(&self) -> PaymentMethod
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 PaymentMethod
impl Debug for PaymentMethod
Source§impl<'de> Deserialize<'de> for PaymentMethod
impl<'de> Deserialize<'de> for PaymentMethod
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&PaymentMethod> for PaymentMethod
impl From<&PaymentMethod> for PaymentMethod
Source§fn from(value: &PaymentMethod) -> Self
fn from(value: &PaymentMethod) -> Self
Converts to this type from the input type.
Source§impl From<PaymentMethod> for PaymentMethod
impl From<PaymentMethod> for PaymentMethod
Source§fn from(value: PaymentMethod) -> Self
fn from(value: PaymentMethod) -> Self
Converts to this type from the input type.
Source§impl Serialize for PaymentMethod
impl Serialize for PaymentMethod
Source§impl TryFrom<PaymentMethod> for PaymentMethod
impl TryFrom<PaymentMethod> for PaymentMethod
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: PaymentMethod) -> Result<Self, ConversionError>
fn try_from(value: PaymentMethod) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for PaymentMethod
impl RefUnwindSafe for PaymentMethod
impl Send for PaymentMethod
impl Sync for PaymentMethod
impl Unpin for PaymentMethod
impl UnwindSafe for PaymentMethod
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