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 BECS Source Type #1568

Merged
merged 2 commits into from
Apr 5, 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
3 changes: 3 additions & 0 deletions src/Stripe.net/Entities/Sources/Source.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ public class Source : StripeEntity, IHasId, IHasMetadata, IHasObject, IPaymentSo
[JsonProperty("alipay")]
public SourceAlipay Alipay { get; set; }

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

[JsonProperty("bancontact")]
public SourceBancontact Bancontact { get; set; }

Expand Down
19 changes: 19 additions & 0 deletions src/Stripe.net/Entities/Sources/SourceAuBecsDebit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace Stripe
{
using Newtonsoft.Json;

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

[JsonProperty("bsb_number")]
public string BsbNumber { get; set; }

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

[JsonProperty("last3")]
public string Last3 { get; set; }
}
}
13 changes: 13 additions & 0 deletions src/Stripe.net/Services/Sources/SourceAuBecsDebitCreateOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Stripe
{
using Newtonsoft.Json;

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

[JsonProperty("bsb_number")]
public string BsbNumber { get; set; }
}
}
3 changes: 3 additions & 0 deletions src/Stripe.net/Services/Sources/SourceCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public class SourceCreateOptions : BaseOptions
Below we group all Source type specific paramters
*/

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

[JsonProperty("bancontact")]
public SourceBancontactCreateOptions Bancontact { get; set; }

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

public class SourceMandateAcceptanceOfflineOptions : INestedOptions
{
[JsonProperty("contact_email")]
public string ContactEmail { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace Stripe
{
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class SourceMandateAcceptanceOnlineOptions : INestedOptions
{
[JsonProperty("date")]
public DateTime? Date { get; set; }

[JsonProperty("ip")]
public string Ip { get; set; }

[JsonProperty("user_agent")]
public string UserAgent { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,18 @@ public class SourceMandateAcceptanceOptions : INestedOptions
[JsonProperty("notification_method")]
public string NotificationMethod { get; set; }

[JsonProperty("offline")]
public SourceMandateAcceptanceOfflineOptions Offline { get; set; }

[JsonProperty("online")]
public SourceMandateAcceptanceOnlineOptions Online { get; set; }

[JsonProperty("status")]
public string Status { get; set; }

[JsonProperty("type")]
public string Type { get; set; }

[JsonProperty("user_agent")]
public string UserAgent { get; set; }
}
Expand Down