1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* public
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.87.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateSubscriptionChargeRequest {
/// Whether adaptive currency fees should be included in the product_price (true) or added on top (false). This field is ignored if adaptive pricing is not enabled for the business.
#[serde(rename = "adaptive_currency_fees_inclusive", skip_serializing_if = "Option::is_none")]
pub adaptive_currency_fees_inclusive: Option<bool>,
/// Specify how customer balance is used for the payment
#[serde(rename = "customer_balance_config", skip_serializing_if = "Option::is_none")]
pub customer_balance_config: Option<Box<models::CustomerBalanceConfig>>,
/// Metadata for the payment. If not passed, the metadata of the subscription will be taken
#[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
pub metadata: Option<std::collections::HashMap<String, String>>,
/// Optional currency of the product price. If not specified, defaults to the currency of the product.
#[serde(rename = "product_currency", skip_serializing_if = "Option::is_none")]
pub product_currency: Option<models::Currency>,
/// Optional product description override for billing and line items. If not specified, the stored description of the product will be used.
#[serde(rename = "product_description", skip_serializing_if = "Option::is_none")]
pub product_description: Option<String>,
/// The product price. Represented in the lowest denomination of the currency (e.g., cents for USD). For example, to charge $1.00, pass `100`.
#[serde(rename = "product_price")]
pub product_price: i32,
}
impl CreateSubscriptionChargeRequest {
pub fn new(product_price: i32) -> CreateSubscriptionChargeRequest {
CreateSubscriptionChargeRequest {
adaptive_currency_fees_inclusive: None,
customer_balance_config: None,
metadata: None,
product_currency: None,
product_description: None,
product_price,
}
}
}