pub struct AddRecurringSubscriptionRequest {
pub deal_id: i32,
pub currency: String,
pub description: Option<String>,
pub cadence_type: CadenceType,
pub cycles_count: Option<i32>,
pub cycle_amount: i32,
pub start_date: String,
pub infinite: Option<bool>,
pub payments: Option<Vec<Value>>,
pub update_deal_value: Option<bool>,
}Fields§
§deal_id: i32The ID of the deal this recurring subscription is associated with
currency: StringThe currency of the recurring subscription. Accepts a 3-character currency code.
description: Option<String>The description of the recurring subscription
cadence_type: CadenceTypeThe interval between payments
cycles_count: Option<i32>Shows how many payments the subscription has. Note that one field must be set: cycles_count or infinite. If cycles_count is set, then cycle_amount and start_date are also required.
cycle_amount: i32The amount of each payment
start_date: StringThe start date of the recurring subscription. Format: YYYY-MM-DD
infinite: Option<bool>This indicates that the recurring subscription will last until it’s manually canceled or deleted. Note that only one field must be set: cycles_count or infinite.
payments: Option<Vec<Value>>Array of additional payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with an explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD).
update_deal_value: Option<bool>Indicates that the deal value must be set to recurring subscription’s MRR value
Implementations§
Source§impl AddRecurringSubscriptionRequest
impl AddRecurringSubscriptionRequest
pub fn new( deal_id: i32, currency: String, cadence_type: CadenceType, cycle_amount: i32, start_date: String, ) -> AddRecurringSubscriptionRequest
Trait Implementations§
Source§impl Clone for AddRecurringSubscriptionRequest
impl Clone for AddRecurringSubscriptionRequest
Source§fn clone(&self) -> AddRecurringSubscriptionRequest
fn clone(&self) -> AddRecurringSubscriptionRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for AddRecurringSubscriptionRequest
impl<'de> Deserialize<'de> for AddRecurringSubscriptionRequest
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>,
Source§impl PartialEq for AddRecurringSubscriptionRequest
impl PartialEq for AddRecurringSubscriptionRequest
Source§fn eq(&self, other: &AddRecurringSubscriptionRequest) -> bool
fn eq(&self, other: &AddRecurringSubscriptionRequest) -> bool
self and other values to be equal, and is used by ==.