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

Alpha: UsageRecordResource.Read with start and end parameters set fails #372

Closed
jonastelzio opened this issue Jun 15, 2017 · 3 comments
Closed
Labels
code-generation issue deals with generated code

Comments

@jonastelzio
Copy link

Version: 5.5.1-alpha1
API Subdomain (api/taskrouter/ip_messaging): wireless

Code Snippet

TwilioClient.Init(".....", ".....");
var from = DateTime.UtcNow.AddDays(-3);
var to = from.AddMonths(1);
var usage = UsageRecordResource.Read("<redacted>", start: from, end: to);

Exception / Log

Invalid Start: 2017-06-12T09:48:02. Start must be a valid ISO8601 formatteddatetime string: yyyy-MM-dd'T'HH:mm:ss'Z'

Steps to Reproduce

  1. Use Alpha Version
  2. Initialize a Twilio Client
  3. Attempt to read a UsageRecordResource with start and end parameters defined

This is probably just an invalid date.ToString(....) format string. I think using .ToString("o") will do the trick.

@jmctwilio
Copy link
Contributor

@jonastelzio Looks like the standard for ISO8601 for C# is:

DateTime.ToString("s", System.Globalization.CultureInfo.InvariantCulture);

@jmctwilio jmctwilio added the code-generation issue deals with generated code label Jun 19, 2017
@jmctwilio
Copy link
Contributor

#374

@codejudas
Copy link
Contributor

@jonastelzio This should be fixed in 5.5.2 and 5.5.3-alpha1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-generation issue deals with generated code
Projects
None yet
Development

No branches or pull requests

3 participants