paystack/models/authorization_models.rs
1use serde::{Deserialize, Serialize};
2
3/// This struct represents the authorization data of the transaction status response
4#[derive(Debug, Deserialize, Serialize, Clone, Default)]
5pub struct Authorization {
6 /// Authorization code generated for the Transaction.
7 pub authorization_code: Option<String>,
8 /// Bin number for Transaction authorization.
9 pub bin: Option<String>,
10 /// Last 4 digits of authorized card.
11 pub last4: Option<String>,
12 /// Authorized card expiry month.
13 pub exp_month: Option<String>,
14 /// Authorized card expiry year.
15 pub exp_year: Option<String>,
16 /// Authorization channel. It could be `card` or `bank`.
17 pub channel: Option<String>,
18 /// Type of card used in the Authorization
19 pub card_type: Option<String>,
20 /// Name of bank associated with the Authorization.
21 pub bank: Option<String>,
22 /// Country code of the Authorization.
23 pub country_code: Option<String>,
24 /// Brand of of the Authorization if it is a card.
25 pub brand: Option<String>,
26 /// Specifies if the Authorization is reusable.
27 pub reusable: Option<bool>,
28 /// Signature of the Authorization.
29 pub signature: Option<String>,
30 /// Name of the account associated with the authorization.
31 pub account_name: Option<String>,
32}