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

Error converting value {null} to type 'System.Int64'. #1442

Closed
rsnj opened this issue Dec 20, 2018 · 3 comments
Closed

Error converting value {null} to type 'System.Int64'. #1442

rsnj opened this issue Dec 20, 2018 · 3 comments
Assignees

Comments

@rsnj
Copy link

rsnj commented Dec 20, 2018

Stripe.net SDK v21.7.0

Simply trying to get a list of Issuing Cards for a user.

var cardService = new Issuing.CardService();
var cards = await cardService.ListAsync(new CardListOptions
{
    CardholderId = stripeCardholderId,
});

Getting this Exception:

Newtonsoft.Json.JsonSerializationException: Error converting value {null} to type 'System.Int64'. Path 'authorization_controls.max_amount', line 8, position 22. ---> System.InvalidCastException: Null object cannot be converted to a value type.

Looks like the values in AuthorizationControls.cs should be nullable?

@remi-stripe
Copy link
Contributor

@rsnj Thanks for the report and sorry about the troubles! I've opened a PR for a fix here: #1443

@rsnj
Copy link
Author

rsnj commented Dec 21, 2018

Thanks for the quick turnaround!

@remi-stripe
Copy link
Contributor

Sure! Let us know if that does not solve the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants