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

Add AuBecsDebit support on PaymentMethod #1872

Merged
merged 1 commit into from
Dec 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ namespace Stripe

public class MandatePaymentMethodDetails : StripeEntity<MandatePaymentMethodDetails>
{
/// <summary>
/// If this mandate is associated with a AU BECS Debit payment method, this hash contains
/// mandate information specific to the AU BECS Debit payment method.
/// </summary>
[JsonProperty("au_becs_debit")]
public MandatePaymentMethodDetailsAuBecsDebit AuBecsDebit { get; set; }

/// <summary>
/// If this mandate is associated with a card payment method, this hash contains mandate
/// information specific to the card payment method.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Stripe
{
using Newtonsoft.Json;

public class MandatePaymentMethodDetailsAuBecsDebit : StripeEntity<MandatePaymentMethodDetailsAuBecsDebit>
{
/// <summary>
/// The URL of the mandate. This URL generally contains sensitive information about the
/// customer and should be shared with them exclusively.
/// </summary>
[JsonProperty("url")]
public string Url { get; set; }
}
}
3 changes: 3 additions & 0 deletions src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public class PaymentMethod : StripeEntity<PaymentMethod>, IHasId, IHasMetadata,
[JsonProperty("object")]
public string Object { get; set; }

[JsonProperty("au_becs_debit")]
public PaymentMethodAuBecsDebit AuBecsDebit { get; set; }

[JsonProperty("billing_details")]
public BillingDetails BillingDetails { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentMethodAuBecsDebit : StripeEntity<PaymentMethodAuBecsDebit>
{
[JsonProperty("bsb_number")]
public string BsbNumber { get; set; }

[JsonProperty("fingerprint")]
public string Fingerprint { get; set; }

[JsonProperty("last4")]
public string Last4 { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentMethodAuBecsDebitCreateOptions : INestedOptions
{
[JsonProperty("account_number")]
public string AccountNumber { get; set; }

[JsonProperty("bsb_number")]
public string BsbNumber { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ namespace Stripe

public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata
{
/// <summary>
/// This is a <c>au_becs_debit</c> PaymentMethod available in Australia.
/// Teh create option contains details about the bank account.
/// </summary>
[JsonProperty("au_becs_debit")]
public PaymentMethodAuBecsDebitCreateOptions AuBecsDebit { get; set; }

/// <summary>
/// Billing information associated with the PaymentMethod that may be used or required by
/// particular types of payment methods.
Expand Down