Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(setup_intent): add mandate_data for confirm #547

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(customer-ext,PM query): type field is optional
Signed-off-by: Sean Pianka <[email protected]>
seanpianka committed Apr 26, 2024
commit 362659e3e7ace2706fae172e7936efdc5c17929d
17 changes: 9 additions & 8 deletions src/resources/customer_ext.rs
Original file line number Diff line number Diff line change
@@ -9,39 +9,40 @@ use crate::resources::{

#[derive(Clone, Debug, Serialize, Eq, PartialEq)]
pub struct CustomerPaymentMethodRetrieval<'a> {
///A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list.
/// A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list.
///For instance, if you make a list request and receive 100 objects, starting with `obj_bar`,
///your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
#[serde(skip_serializing_if = "Option::is_none")]
pub ending_before: Option<String>,

///Specifies which fields in the response should be expanded.
/// Specifies which fields in the response should be expanded.
#[serde(skip_serializing_if = "Expand::is_empty")]
pub expand: &'a [&'a str],

///A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
/// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i32>,

///A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list.
/// A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list.
///For instance, if you make a list request and receive 100 objects, ending with `obj_foo`,
///your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
#[serde(skip_serializing_if = "Option::is_none")]
pub starting_after: Option<String>,

///A required filter on the list, based on the object `type` field.
/// An optional filter on the list, based on the object type field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
#[serde(rename = "type")]
pub type_: CustomerPaymentMethodRetrievalType,
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<CustomerPaymentMethodRetrievalType>,
}

impl<'a> CustomerPaymentMethodRetrieval<'a> {
pub fn new(the_type: CustomerPaymentMethodRetrievalType) -> Self {
pub fn new() -> Self {
CustomerPaymentMethodRetrieval {
ending_before: None,
expand: &[],
limit: None,
starting_after: None,
type_: the_type,
type_: None,
}
}
}
Loading