-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use OpenAPI definitions in webhook event definition
- Loading branch information
1 parent
6adf3f9
commit 88d7dbc
Showing
22 changed files
with
1,613 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
generated/stripe_payment/src/source_mandate_notification.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/// Source mandate notifications should be created when a notification related to | ||
/// a source mandate must be sent to the payer. They will trigger a webhook or | ||
/// deliver an email to the customer. | ||
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] | ||
pub struct SourceMandateNotification { | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub acss_debit: Option<stripe_payment::SourceMandateNotificationAcssDebitData>, | ||
/// A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. | ||
/// The amount is expressed in the currency of the underlying source. | ||
/// Required if the notification type is `debit_initiated`. | ||
pub amount: Option<i64>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub bacs_debit: Option<stripe_payment::SourceMandateNotificationBacsDebitData>, | ||
/// Time at which the object was created. Measured in seconds since the Unix epoch. | ||
pub created: stripe_types::Timestamp, | ||
/// Unique identifier for the object. | ||
pub id: stripe_payment::SourceMandateNotificationId, | ||
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. | ||
pub livemode: bool, | ||
/// The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. | ||
pub reason: String, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub sepa_debit: Option<stripe_payment::SourceMandateNotificationSepaDebitData>, | ||
pub source: stripe_shared::Source, | ||
/// The status of the mandate notification. Valid statuses are `pending` or `submitted`. | ||
pub status: String, | ||
/// The type of source this mandate notification is attached to. | ||
/// Should be the source type identifier code for the payment method, such as `three_d_secure`. | ||
#[serde(rename = "type")] | ||
pub type_: String, | ||
} | ||
impl stripe_types::Object for SourceMandateNotification { | ||
type Id = stripe_payment::SourceMandateNotificationId; | ||
fn id(&self) -> &Self::Id { | ||
&self.id | ||
} | ||
} | ||
stripe_types::def_id!(SourceMandateNotificationId); |
6 changes: 6 additions & 0 deletions
6
generated/stripe_payment/src/source_mandate_notification_acss_debit_data.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#[derive(Clone, Debug, Default, serde::Serialize, serde::Deserialize)] | ||
pub struct SourceMandateNotificationAcssDebitData { | ||
/// The statement descriptor associate with the debit. | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub statement_descriptor: Option<String>, | ||
} |
6 changes: 6 additions & 0 deletions
6
generated/stripe_payment/src/source_mandate_notification_bacs_debit_data.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#[derive(Clone, Debug, Default, serde::Serialize, serde::Deserialize)] | ||
pub struct SourceMandateNotificationBacsDebitData { | ||
/// Last 4 digits of the account number associated with the debit. | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub last4: Option<String>, | ||
} |
12 changes: 12 additions & 0 deletions
12
generated/stripe_payment/src/source_mandate_notification_sepa_debit_data.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#[derive(Clone, Debug, Default, serde::Serialize, serde::Deserialize)] | ||
pub struct SourceMandateNotificationSepaDebitData { | ||
/// SEPA creditor ID. | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub creditor_identifier: Option<String>, | ||
/// Last 4 digits of the account number associated with the debit. | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub last4: Option<String>, | ||
/// Mandate reference associated with the debit. | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub mandate_reference: Option<String>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.