Skip to content

Commit

Permalink
Merge pull request #37 from aarashy/main
Browse files Browse the repository at this point in the history
Add new 'require_successful_payment' optional field for CreditLedgerInvoiceSettingsRequestParams
  • Loading branch information
benesch authored Mar 13, 2024
2 parents f43b797 + cbdd84f commit eb761c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/client/customers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ pub struct CreditLedgerInvoiceSettingsRequestParams<'a> {
/// An optional memo to display on the invoice
#[serde(skip_serializing_if = "Option::is_none")]
pub memo: Option<&'a str>,
/// Whether the credits should be withheld from the customer account until the invoice is paid.
/// This applies primarily to stripe invoicing.
#[serde(skip_serializing_if = "Option::is_none")]
pub require_successful_payment: Option<bool>,
}

/// The parameters used to create a customer credit ledger entry.
Expand Down
4 changes: 2 additions & 2 deletions src/client/subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ pub struct SubscriptionFixedFee {
#[serde(with = "time::serde::rfc3339")]
pub start_date: OffsetDateTime,
/// The date at which the fixed fee ends.
#[serde(with = "time::serde::rfc3339")]
pub end_date: OffsetDateTime,
#[serde(with = "time::serde::rfc3339::option")]
pub end_date: Option<OffsetDateTime>,
/// The price ID for the fixed fee.
pub price_id: String,
/// The quantity of the fixed fee.
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ mod util;

pub use client::customers::{
AddIncrementCreditLedgerEntryRequestParams, AddVoidCreditLedgerEntryRequestParams, Address,
AddressRequest, CostViewMode, CreateCustomerRequest, Customer, CustomerCostBucket,
CustomerCostItem, CustomerCostParams, CustomerCostPriceBlock,
AddressRequest, CostViewMode, CreateCustomerRequest, CreditLedgerInvoiceSettingsRequestParams,
Customer, CustomerCostBucket, CustomerCostItem, CustomerCostParams, CustomerCostPriceBlock,
CustomerCostPriceBlockMatrixPrice, CustomerCostPriceBlockMatrixPriceConfig,
CustomerCostPriceBlockMatrixPriceValue, CustomerCostPriceBlockPrice,
CustomerCostPriceBlockPriceGroup, CustomerCostPriceBlockUnitPrice,
Expand Down

0 comments on commit eb761c9

Please sign in to comment.