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

Adds TokenPiiOptions for TokenCreateOptions #2125

Merged
merged 1 commit into from
Jul 21, 2020
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
6 changes: 6 additions & 0 deletions src/Stripe.net/Services/Tokens/TokenCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,11 @@ public class TokenCreateOptions : BaseOptions
/// </summary>
[JsonProperty("person")]
public TokenPersonOptions Person { get; set; }

/// <summary>
/// The PII this token will represent.
/// </summary>
[JsonProperty("pii")]
public TokenPiiOptions Pii { get; set; }
}
}
13 changes: 13 additions & 0 deletions src/Stripe.net/Services/Tokens/TokenPiiOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Stripe
{
using Newtonsoft.Json;

public class TokenPiiOptions : INestedOptions
{
/// <summary>
/// The <c>IdNumber</c> for the PII, in string form.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the <c> tags here? Shouldn't this just be The personal id number for the PII or similar? Feels like this is trying to reference another property elsewhere. Not blocking though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was id_number so I pascal cased it, but again I'm not sure if we'll be able to do this with autogen anyways

/// </summary>
[JsonProperty("id_number")]
public string IdNumber { get; set; }
}
}