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 support for disabling card validation on card/customer #1468

Merged
merged 1 commit into from
Jan 10, 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
13 changes: 8 additions & 5 deletions src/Stripe.net/Services/Cards/CardCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ namespace Stripe

public class CardCreateOptions : BaseOptions
{
[JsonProperty("default_for_currency")]
public bool? DefaultForCurrency { get; set; }

[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }

[JsonProperty("source")]
public string SourceToken { get; set; }

[JsonProperty("source")]
public CardCreateNestedOptions SourceCard { get; set; }

[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }

[JsonProperty("default_for_currency")]
public bool? DefaultForCurrency { get; set; }
[JsonProperty("validate")]
public bool? Validate { get; set; }
}
}
27 changes: 15 additions & 12 deletions src/Stripe.net/Services/Cards/CardUpdateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,37 @@ namespace Stripe

public class CardUpdateOptions : BaseOptions
{
[JsonProperty("exp_month")]
public long? ExpMonth { get; set; }

[JsonProperty("exp_year")]
public long? ExpYear { get; set; }
[JsonProperty("address_city")]
public string AddressCity { get; set; }

[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("address_country")]
public string AddressCountry { get; set; }

[JsonProperty("address_line1")]
public string AddressLine1 { get; set; }

[JsonProperty("address_line2")]
public string AddressLine2 { get; set; }

[JsonProperty("address_city")]
public string AddressCity { get; set; }

[JsonProperty("address_state")]
public string AddressState { get; set; }

[JsonProperty("address_zip")]
public string AddressZip { get; set; }

[JsonProperty("address_country")]
public string AddressCountry { get; set; }
[JsonProperty("exp_month")]
public long? ExpMonth { get; set; }

[JsonProperty("exp_year")]
public long? ExpYear { get; set; }

[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }

[JsonProperty("name")]
public string Name { get; set; }

[JsonProperty("validate")]
public bool? Validate { get; set; }
}
}
6 changes: 3 additions & 3 deletions src/Stripe.net/Services/Customers/CustomerCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ public class CustomerCreateOptions : BaseOptions
[JsonProperty("tax_percent")]
public decimal? TaxPercent { get; set; }

[JsonProperty("validate")]
public bool? Validate { get; set; }

#region Trial End

public DateTime? TrialEnd { get; set; }
Expand Down Expand Up @@ -76,5 +73,8 @@ internal string TrialEndInternal
}

#endregion

[JsonProperty("validate")]
public bool? Validate { get; set; }
}
}
15 changes: 9 additions & 6 deletions src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ public class CustomerUpdateOptions : BaseOptions
[JsonProperty("account_balance")]
public long? AccountBalance { get; set; }

[JsonProperty("source")]
public string SourceToken { get; set; }

[JsonProperty("source")]
public CardCreateNestedOptions SourceCard { get; set; }

[JsonProperty("coupon")]
public string Coupon { get; set; }

Expand All @@ -36,7 +30,16 @@ public class CustomerUpdateOptions : BaseOptions
[JsonProperty("shipping")]
public ShippingOptions Shipping { get; set; }

[JsonProperty("source")]
public string SourceToken { get; set; }

[JsonProperty("source")]
public CardCreateNestedOptions SourceCard { get; set; }

[JsonProperty("tax_info")]
public CustomerTaxInfoOptions TaxInfo { get; set; }

[JsonProperty("validate")]
public bool? Validate { get; set; }
}
}