Giter Club home page Giter Club logo

somleng's Introduction

Somleng

GitHub Action View performance data on Skylight codecov

Somleng (part of The Somleng Project) is an Open Source Cloud Communications Platform as a Service (CPaaS).

You can use Somleng to roll out your own programmable voice and SMS to:

Documentation

Getting Started

Please follow the Getting Started Guide to get up and running. ๐Ÿƒ๐Ÿพ

Deployment

The infrastructure directory contains Terraform configuration files in order to deploy Somleng to AWS.

License

The software is available as open source under the terms of the MIT License.

somleng's People

Contributors

alexsopheak avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar depfu[bot] avatar dwilkie avatar github-actions[bot] avatar samnang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

somleng's Issues

Handle StatusCallbackUrl

Todo

Done

  • Setup queue and worker in ENV
  • Set ENV Variable for phone call events URL in adhearsion-twilio to turn on Event publishing
  • Setup user with permissions for publishing events
  • Move status callback URL logic out of Somleng into here.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "aws-sdk":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2)

Could not find gem 'aws-sdk (~> 2)', which is required by gem 'active_elastic_job', in any of the sources.

Bundler could not find compatible versions for gem "aws-sdk-core":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2) was resolved to 2.0.22, which depends on
        aws-sdk-resources (= 2.0.22) was resolved to 2.0.22, which depends on
          aws-sdk-core (= 2.0.22)

    refile-s3 was resolved to 0.2.0, which depends on
      aws-sdk-s3 (~> 1.13) was resolved to 1.16.0, which depends on
        aws-sdk-core (>= 3.21.2, ~> 3)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

ActiveRecord Connection Pool Full

ActiveRecord::ConnectionTimeoutError (could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use):

Discussion

Caused by Net::ReadTimeout when requesting Status Callback URL

Todo

Done

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "aws-sdk":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2)

Could not find gem 'aws-sdk (~> 2)', which is required by gem 'active_elastic_job', in any of the sources.

Bundler could not find compatible versions for gem "aws-sdk-core":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2) was resolved to 2.0.22, which depends on
        aws-sdk-resources (= 2.0.22) was resolved to 2.0.22, which depends on
          aws-sdk-core (= 2.0.22)

    refile-s3 was resolved to 0.2.0, which depends on
      aws-sdk-s3 (~> 1.13) was resolved to 1.17.0, which depends on
        aws-sdk-core (>= 3.21.2, ~> 3)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "aws-sdk":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2)

Could not find gem 'aws-sdk (~> 2)', which is required by gem 'active_elastic_job', in any of the sources.

Bundler could not find compatible versions for gem "aws-sdk-core":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2) was resolved to 2.0.22, which depends on
        aws-sdk-resources (= 2.0.22) was resolved to 2.0.22, which depends on
          aws-sdk-core (= 2.0.22)

    refile-s3 was resolved to 0.2.0, which depends on
      aws-sdk-s3 (~> 1.13) was resolved to 1.17.0, which depends on
        aws-sdk-core (>= 3.21.2, ~> 3)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

Add API endpoints for returning real time data

Todo

  • Document usage

Done

Example Request

curl -G https://api.twilio.com/2010-04-01/Accounts/redacted/Usage/Records.json \
    -u 'redacted:your_auth_token'

Example Response

{
  "first_page_uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?PageSize=50&Page=0",
  "end": 49,
  "previous_page_uri": null,
  "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?PageSize=50&Page=0",
  "page_size": 50,
  "start": 0,
  "usage_records": [
    {
      "category": "totalprice",
      "description": "Total Price",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": null,
      "count_unit": "",
      "usage": "498.84515",
      "usage_unit": "usd",
      "price": "498.84515",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=totalprice&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=totalprice",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=totalprice",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=totalprice",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=totalprice",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=totalprice",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=totalprice",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=totalprice",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=totalprice"
      }
    },
    {
      "category": "calls",
      "description": "Voice Minutes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "2250",
      "count_unit": "calls",
      "usage": "2914",
      "usage_unit": "minutes",
      "price": "112.3235",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=calls&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=calls",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=calls",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=calls",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=calls",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=calls",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=calls",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=calls",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=calls"
      }
    },
    {
      "category": "calls-inbound",
      "description": "Inbound Voice Minutes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "1674",
      "count_unit": "calls",
      "usage": "2049",
      "usage_unit": "minutes",
      "price": "18.1625",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=calls-inbound&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=calls-inbound",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=calls-inbound",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=calls-inbound",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=calls-inbound",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=calls-inbound",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=calls-inbound",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=calls-inbound",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=calls-inbound"
      }
    },
    {
      "category": "calls-outbound",
      "description": "Outbound Voice Minutes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "576",
      "count_unit": "calls",
      "usage": "865",
      "usage_unit": "minutes",
      "price": "94.161",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=calls-outbound&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=calls-outbound",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=calls-outbound",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=calls-outbound",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=calls-outbound",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=calls-outbound",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=calls-outbound",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=calls-outbound",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=calls-outbound"
      }
    },
    {
      "category": "sms",
      "description": "SMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "19457",
      "count_unit": "messages",
      "usage": "19508",
      "usage_unit": "segments",
      "price": "248.44765",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=sms&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=sms",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=sms",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=sms",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=sms",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=sms",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=sms",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=sms",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=sms"
      }
    },
    {
      "category": "sms-inbound-longcode",
      "description": "Standard Inbound SMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "736",
      "count_unit": "messages",
      "usage": "737",
      "usage_unit": "segments",
      "price": "6.1375",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=sms-inbound-longcode&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=sms-inbound-longcode",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=sms-inbound-longcode",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=sms-inbound-longcode",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=sms-inbound-longcode",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=sms-inbound-longcode",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=sms-inbound-longcode",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=sms-inbound-longcode",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=sms-inbound-longcode"
      }
    },
    {
      "category": "sms-outbound-longcode",
      "description": "Standard Outbound SMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "18721",
      "count_unit": "messages",
      "usage": "18771",
      "usage_unit": "segments",
      "price": "242.31015",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=sms-outbound-longcode&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=sms-outbound-longcode",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=sms-outbound-longcode",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=sms-outbound-longcode",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=sms-outbound-longcode",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=sms-outbound-longcode",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=sms-outbound-longcode",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=sms-outbound-longcode",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=sms-outbound-longcode"
      }
    },
    {
      "category": "sms-inbound-shortcode",
      "description": "Short Code Inbound SMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "messages",
      "usage": "0",
      "usage_unit": "segments",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=sms-inbound-shortcode&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=sms-inbound-shortcode",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=sms-inbound-shortcode",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=sms-inbound-shortcode",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=sms-inbound-shortcode",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=sms-inbound-shortcode",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=sms-inbound-shortcode",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=sms-inbound-shortcode",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=sms-inbound-shortcode"
      }
    },
    {
      "category": "sms-outbound-shortcode",
      "description": "Short Code Outbound SMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "messages",
      "usage": "0",
      "usage_unit": "segments",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=sms-outbound-shortcode&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=sms-outbound-shortcode",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=sms-outbound-shortcode",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=sms-outbound-shortcode",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=sms-outbound-shortcode",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=sms-outbound-shortcode",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=sms-outbound-shortcode",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=sms-outbound-shortcode",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=sms-outbound-shortcode"
      }
    },
    {
      "category": "recordings",
      "description": "Recordings",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "recordings",
      "usage": "0",
      "usage_unit": "recorded-minutes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=recordings&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=recordings",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=recordings",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=recordings",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=recordings",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=recordings",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=recordings",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=recordings",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=recordings"
      }
    },
    {
      "category": "transcriptions",
      "description": "Transcriptions",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "transcriptions",
      "usage": "0",
      "usage_unit": "transcriptions",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=transcriptions&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=transcriptions",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=transcriptions",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=transcriptions",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=transcriptions",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=transcriptions",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=transcriptions",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=transcriptions",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=transcriptions"
      }
    },
    {
      "category": "recordingstorage",
      "description": "Recording Storage",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "54",
      "count_unit": "recordings",
      "usage": "46",
      "usage_unit": "recorded-minutes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=recordingstorage&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=recordingstorage",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=recordingstorage",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=recordingstorage",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=recordingstorage",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=recordingstorage",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=recordingstorage",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=recordingstorage",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=recordingstorage"
      }
    },
    {
      "category": "phonenumbers",
      "description": "Phone Numbers",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "88",
      "count_unit": "numbers",
      "usage": "88",
      "usage_unit": "numbers",
      "price": "88",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=phonenumbers&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=phonenumbers",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=phonenumbers",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=phonenumbers",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=phonenumbers",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=phonenumbers",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=phonenumbers",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=phonenumbers",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=phonenumbers"
      }
    },
    {
      "category": "shortcodes",
      "description": "Short Codes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "shortcodes",
      "usage": "0",
      "usage_unit": "shortcodes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=shortcodes&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=shortcodes",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=shortcodes",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=shortcodes",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=shortcodes",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=shortcodes",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=shortcodes",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=shortcodes",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=shortcodes"
      }
    },
    {
      "category": "calls-client",
      "description": "Twilio Client Minutes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "calls",
      "usage": "0",
      "usage_unit": "minutes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=calls-client&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=calls-client",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=calls-client",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=calls-client",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=calls-client",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=calls-client",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=calls-client",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=calls-client",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=calls-client"
      }
    },
    {
      "category": "calls-inbound-local",
      "description": "Inbound Local Calls",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "1671",
      "count_unit": "calls",
      "usage": "2045",
      "usage_unit": "minutes",
      "price": "18.1225",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=calls-inbound-local&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=calls-inbound-local",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=calls-inbound-local",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=calls-inbound-local",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=calls-inbound-local",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=calls-inbound-local",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=calls-inbound-local",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=calls-inbound-local",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=calls-inbound-local"
      }
    },
    {
      "category": "calls-inbound-tollfree",
      "description": "Inbound Toll Free Calls",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "calls",
      "usage": "0",
      "usage_unit": "minutes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=calls-inbound-tollfree&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=calls-inbound-tollfree",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=calls-inbound-tollfree",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=calls-inbound-tollfree",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=calls-inbound-tollfree",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=calls-inbound-tollfree",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=calls-inbound-tollfree",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=calls-inbound-tollfree",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=calls-inbound-tollfree"
      }
    },
    {
      "category": "sms-inbound",
      "description": "Inbound SMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "736",
      "count_unit": "messages",
      "usage": "737",
      "usage_unit": "segments",
      "price": "6.1375",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=sms-inbound&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=sms-inbound",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=sms-inbound",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=sms-inbound",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=sms-inbound",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=sms-inbound",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=sms-inbound",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=sms-inbound",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=sms-inbound"
      }
    },
    {
      "category": "sms-outbound",
      "description": "Outbound SMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "18721",
      "count_unit": "messages",
      "usage": "18771",
      "usage_unit": "segments",
      "price": "242.31015",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=sms-outbound&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=sms-outbound",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=sms-outbound",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=sms-outbound",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=sms-outbound",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=sms-outbound",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=sms-outbound",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=sms-outbound",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=sms-outbound"
      }
    },
    {
      "category": "phonenumbers-local",
      "description": "Local PhoneNumbers",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "88",
      "count_unit": "numbers",
      "usage": "88",
      "usage_unit": "numbers",
      "price": "88",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=phonenumbers-local&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=phonenumbers-local",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=phonenumbers-local",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=phonenumbers-local",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=phonenumbers-local",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=phonenumbers-local",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=phonenumbers-local",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=phonenumbers-local",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=phonenumbers-local"
      }
    },
    {
      "category": "phonenumbers-tollfree",
      "description": "Toll Free PhoneNumbers",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "numbers",
      "usage": "0",
      "usage_unit": "numbers",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=phonenumbers-tollfree&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=phonenumbers-tollfree",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=phonenumbers-tollfree",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=phonenumbers-tollfree",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=phonenumbers-tollfree",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=phonenumbers-tollfree",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=phonenumbers-tollfree",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=phonenumbers-tollfree",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=phonenumbers-tollfree"
      }
    },
    {
      "category": "shortcodes-vanity",
      "description": "Vanity ShortCodes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "shortcodes",
      "usage": "0",
      "usage_unit": "shortcodes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=shortcodes-vanity&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=shortcodes-vanity",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=shortcodes-vanity",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=shortcodes-vanity",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=shortcodes-vanity",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=shortcodes-vanity",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=shortcodes-vanity",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=shortcodes-vanity",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=shortcodes-vanity"
      }
    },
    {
      "category": "shortcodes-random",
      "description": "Random ShortCodes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "shortcodes",
      "usage": "0",
      "usage_unit": "shortcodes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=shortcodes-random&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=shortcodes-random",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=shortcodes-random",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=shortcodes-random",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=shortcodes-random",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=shortcodes-random",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=shortcodes-random",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=shortcodes-random",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=shortcodes-random"
      }
    },
    {
      "category": "shortcodes-customerowned",
      "description": "Customer Owned ShortCodes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "shortcodes",
      "usage": "0",
      "usage_unit": "shortcodes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=shortcodes-customerowned&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=shortcodes-customerowned",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=shortcodes-customerowned",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=shortcodes-customerowned",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=shortcodes-customerowned",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=shortcodes-customerowned",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=shortcodes-customerowned",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=shortcodes-customerowned",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=shortcodes-customerowned"
      }
    },
    {
      "category": "calls-sip",
      "description": "SIP Minutes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "calls",
      "usage": "0",
      "usage_unit": "minutes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=calls-sip&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=calls-sip",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=calls-sip",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=calls-sip",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=calls-sip",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=calls-sip",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=calls-sip",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=calls-sip",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=calls-sip"
      }
    },
    {
      "category": "mms",
      "description": "MMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "messages",
      "usage": "0",
      "usage_unit": "segments",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=mms&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=mms",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=mms",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=mms",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=mms",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=mms",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=mms",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=mms",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=mms"
      }
    },
    {
      "category": "mms-inbound",
      "description": "Inbound MMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "messages",
      "usage": "0",
      "usage_unit": "segments",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=mms-inbound&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=mms-inbound",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=mms-inbound",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=mms-inbound",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=mms-inbound",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=mms-inbound",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=mms-inbound",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=mms-inbound",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=mms-inbound"
      }
    },
    {
      "category": "mms-inbound-longcode",
      "description": "Standard Inbound MMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "messages",
      "usage": "0",
      "usage_unit": "segments",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=mms-inbound-longcode&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=mms-inbound-longcode",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=mms-inbound-longcode",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=mms-inbound-longcode",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=mms-inbound-longcode",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=mms-inbound-longcode",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=mms-inbound-longcode",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=mms-inbound-longcode",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=mms-inbound-longcode"
      }
    },
    {
      "category": "mms-inbound-shortcode",
      "description": "Short Code Inbound MMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "messages",
      "usage": "0",
      "usage_unit": "segments",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=mms-inbound-shortcode&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=mms-inbound-shortcode",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=mms-inbound-shortcode",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=mms-inbound-shortcode",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=mms-inbound-shortcode",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=mms-inbound-shortcode",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=mms-inbound-shortcode",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=mms-inbound-shortcode",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=mms-inbound-shortcode"
      }
    },
    {
      "category": "mms-outbound",
      "description": "Outbound MMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "messages",
      "usage": "0",
      "usage_unit": "segments",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=mms-outbound&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=mms-outbound",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=mms-outbound",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=mms-outbound",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=mms-outbound",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=mms-outbound",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=mms-outbound",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=mms-outbound",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=mms-outbound"
      }
    },
    {
      "category": "mms-outbound-longcode",
      "description": "Standard Outbound MMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "messages",
      "usage": "0",
      "usage_unit": "segments",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=mms-outbound-longcode&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=mms-outbound-longcode",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=mms-outbound-longcode",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=mms-outbound-longcode",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=mms-outbound-longcode",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=mms-outbound-longcode",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=mms-outbound-longcode",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=mms-outbound-longcode",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=mms-outbound-longcode"
      }
    },
    {
      "category": "mms-outbound-shortcode",
      "description": "Short Code Outbound MMS",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "messages",
      "usage": "0",
      "usage_unit": "segments",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=mms-outbound-shortcode&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=mms-outbound-shortcode",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=mms-outbound-shortcode",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=mms-outbound-shortcode",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=mms-outbound-shortcode",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=mms-outbound-shortcode",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=mms-outbound-shortcode",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=mms-outbound-shortcode",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=mms-outbound-shortcode"
      }
    },
    {
      "category": "calls-inbound-mobile",
      "description": "Inbound Mobile Calls",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "calls",
      "usage": "0",
      "usage_unit": "minutes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=calls-inbound-mobile&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=calls-inbound-mobile",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=calls-inbound-mobile",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=calls-inbound-mobile",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=calls-inbound-mobile",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=calls-inbound-mobile",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=calls-inbound-mobile",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=calls-inbound-mobile",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=calls-inbound-mobile"
      }
    },
    {
      "category": "phonenumbers-mobile",
      "description": "Mobile PhoneNumbers",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "numbers",
      "usage": "0",
      "usage_unit": "numbers",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=phonenumbers-mobile&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=phonenumbers-mobile",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=phonenumbers-mobile",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=phonenumbers-mobile",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=phonenumbers-mobile",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=phonenumbers-mobile",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=phonenumbers-mobile",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=phonenumbers-mobile",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=phonenumbers-mobile"
      }
    },
    {
      "category": "mediastorage",
      "description": "Media Storage",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "23",
      "count_unit": "files",
      "usage": "22",
      "usage_unit": "megabytes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=mediastorage&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=mediastorage",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=mediastorage",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=mediastorage",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=mediastorage",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=mediastorage",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=mediastorage",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=mediastorage",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=mediastorage"
      }
    },
    {
      "category": "authy-sms-outbound",
      "description": "Authy Outbound SMS Messages",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "messages",
      "usage": "0",
      "usage_unit": "segments",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=authy-sms-outbound&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=authy-sms-outbound",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=authy-sms-outbound",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=authy-sms-outbound",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=authy-sms-outbound",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=authy-sms-outbound",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=authy-sms-outbound",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=authy-sms-outbound",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=authy-sms-outbound"
      }
    },
    {
      "category": "authy-calls-outbound",
      "description": "Authy Outbound Calls",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "calls",
      "usage": "0",
      "usage_unit": "minutes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=authy-calls-outbound&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=authy-calls-outbound",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=authy-calls-outbound",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=authy-calls-outbound",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=authy-calls-outbound",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=authy-calls-outbound",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=authy-calls-outbound",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=authy-calls-outbound",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=authy-calls-outbound"
      }
    },
    {
      "category": "authy-authentications",
      "description": "Authy Authentications",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "authentications",
      "usage": "0",
      "usage_unit": "authentications",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=authy-authentications&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=authy-authentications",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=authy-authentications",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=authy-authentications",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=authy-authentications",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=authy-authentications",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=authy-authentications",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=authy-authentications",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=authy-authentications"
      }
    },
    {
      "category": "authy-phone-verifications",
      "description": "Authy Phone Verifications",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "verifications",
      "usage": "0",
      "usage_unit": "verifications",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=authy-phone-verifications&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=authy-phone-verifications",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=authy-phone-verifications",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=authy-phone-verifications",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=authy-phone-verifications",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=authy-phone-verifications",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=authy-phone-verifications",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=authy-phone-verifications",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=authy-phone-verifications"
      }
    },
    {
      "category": "authy-phone-intelligence",
      "description": "Authy Phone Intelligence Requests",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "requests",
      "usage": "0",
      "usage_unit": "requests",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=authy-phone-intelligence&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=authy-phone-intelligence",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=authy-phone-intelligence",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=authy-phone-intelligence",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=authy-phone-intelligence",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=authy-phone-intelligence",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=authy-phone-intelligence",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=authy-phone-intelligence",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=authy-phone-intelligence"
      }
    },
    {
      "category": "authy-monthly-fees",
      "description": "Authy Monthly Fees",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "months",
      "usage": "0",
      "usage_unit": "months",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=authy-monthly-fees&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=authy-monthly-fees",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=authy-monthly-fees",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=authy-monthly-fees",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=authy-monthly-fees",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=authy-monthly-fees",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=authy-monthly-fees",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=authy-monthly-fees",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=authy-monthly-fees"
      }
    },
    {
      "category": "monitor-storage",
      "description": "Monitor Events Storage",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "hundred-events-stored-days",
      "usage": "0",
      "usage_unit": "hundred-events-stored-days",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=monitor-storage&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=monitor-storage",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=monitor-storage",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=monitor-storage",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=monitor-storage",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=monitor-storage",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=monitor-storage",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=monitor-storage",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=monitor-storage"
      }
    },
    {
      "category": "monitor-reads",
      "description": "Monitor Events API Reads",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "reads",
      "usage": "0",
      "usage_unit": "reads",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=monitor-reads&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=monitor-reads",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=monitor-reads",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=monitor-reads",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=monitor-reads",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=monitor-reads",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=monitor-reads",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=monitor-reads",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=monitor-reads"
      }
    },
    {
      "category": "monitor-writes",
      "description": "Monitor Events Writes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "17",
      "count_unit": "writes",
      "usage": "17",
      "usage_unit": "writes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=monitor-writes&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=monitor-writes",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=monitor-writes",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=monitor-writes",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=monitor-writes",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=monitor-writes",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=monitor-writes",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=monitor-writes",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=monitor-writes"
      }
    },
    {
      "category": "taskrouter-tasks",
      "description": "TaskRouter Tasks Created",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "tasks",
      "usage": "0",
      "usage_unit": "tasks",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=taskrouter-tasks&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=taskrouter-tasks",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=taskrouter-tasks",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=taskrouter-tasks",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=taskrouter-tasks",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=taskrouter-tasks",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=taskrouter-tasks",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=taskrouter-tasks",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=taskrouter-tasks"
      }
    },
    {
      "category": "turnmegabytes",
      "description": "TURN Megabytes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "megabytes",
      "usage": "0",
      "usage_unit": "megabytes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=turnmegabytes&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=turnmegabytes",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=turnmegabytes",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=turnmegabytes",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=turnmegabytes",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=turnmegabytes",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=turnmegabytes",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=turnmegabytes",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=turnmegabytes"
      }
    },
    {
      "category": "calls-recordings",
      "description": "Call Recordings",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "recordings",
      "usage": "0",
      "usage_unit": "recorded-minutes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=calls-recordings&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=calls-recordings",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=calls-recordings",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=calls-recordings",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=calls-recordings",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=calls-recordings",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=calls-recordings",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=calls-recordings",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=calls-recordings"
      }
    },
    {
      "category": "trunking-recordings",
      "description": "Trunking Recordings",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "recordings",
      "usage": "0",
      "usage_unit": "recorded-minutes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=trunking-recordings&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=trunking-recordings",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=trunking-recordings",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=trunking-recordings",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=trunking-recordings",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=trunking-recordings",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=trunking-recordings",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=trunking-recordings",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=trunking-recordings"
      }
    },
    {
      "category": "trunking-termination",
      "description": "Trunking Termination Minutes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "calls",
      "usage": "0",
      "usage_unit": "minutes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=trunking-termination&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=trunking-termination",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=trunking-termination",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=trunking-termination",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=trunking-termination",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=trunking-termination",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=trunking-termination",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=trunking-termination",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=trunking-termination"
      }
    },
    {
      "category": "trunking-origination",
      "description": "Trunking Origination Minutes",
      "account_sid": "redacted",
      "start_date": "2010-03-27",
      "end_date": "2016-11-18",
      "count": "0",
      "count_unit": "calls",
      "usage": "0",
      "usage_unit": "minutes",
      "price": "0",
      "price_unit": "usd",
      "api_version": "2010-04-01",
      "uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?Category=trunking-origination&StartDate=2010-03-27&EndDate=2016-11-18",
      "subresource_uris": {
        "all_time": "/2010-04-01/Accounts/redacted/Usage/Records/AllTime.json?Category=trunking-origination",
        "today": "/2010-04-01/Accounts/redacted/Usage/Records/Today.json?Category=trunking-origination",
        "yesterday": "/2010-04-01/Accounts/redacted/Usage/Records/Yesterday.json?Category=trunking-origination",
        "this_month": "/2010-04-01/Accounts/redacted/Usage/Records/ThisMonth.json?Category=trunking-origination",
        "last_month": "/2010-04-01/Accounts/redacted/Usage/Records/LastMonth.json?Category=trunking-origination",
        "daily": "/2010-04-01/Accounts/redacted/Usage/Records/Daily.json?Category=trunking-origination",
        "monthly": "/2010-04-01/Accounts/redacted/Usage/Records/Monthly.json?Category=trunking-origination",
        "yearly": "/2010-04-01/Accounts/redacted/Usage/Records/Yearly.json?Category=trunking-origination"
      }
    }
  ],
  "next_page_uri": "/2010-04-01/Accounts/redacted/Usage/Records.json?PageSize=50&Page=1&PageToken=APMQ%3D%3D",
  "page": 0
}

Example Invalid Request (EndDate before Start Date)

curl -G "https://api.twilio.com/2010-04-01/Accounts/redacted/Usage/Records.json" -u 'redacted:your_auth_token' -d "Category=calls" -d "StartDate=2016-11-01" -d "EndDate=2016-10-01"

Example Response

{"code": 20404, "message": "The requested resource /2010-04-01/Accounts/redacted/Usage/Records.json was not found", "more_info": "https://www.twilio.com/docs/errors/20404", "status": 404}

Example Invalid Request (Invalid StartDate and EndDate)

curl -G "https://api.twilio.com/2010-04-01/Accounts/redacted/Usage/Records.json" -u 'redacted:your_auth_token' -d "Category=calls" -d "StartDate=barfoobaz" -d "EndDate=foobarbaz"

Example Response

{"message": "Invalid StartDate", "status": 400}

Example Invalid Request (Invalid Category)

curl -G "https://api.twilio.com/2010-04-01/Accounts/redacted/Usage/Records.json" -u 'redacted:your_auth_token' -d "Category=barry"

Example Response

{"message": "barry is not a valid choice", "status": 400}

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "aws-sdk":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2)

Could not find gem 'aws-sdk (~> 2)', which is required by gem 'active_elastic_job', in any of the sources.

Bundler could not find compatible versions for gem "aws-sdk-core":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2) was resolved to 2.0.22, which depends on
        aws-sdk-resources (= 2.0.22) was resolved to 2.0.22, which depends on
          aws-sdk-core (= 2.0.22)

    refile-s3 was resolved to 0.2.0, which depends on
      aws-sdk-s3 (~> 1.13) was resolved to 1.16.1, which depends on
        aws-sdk-core (>= 3.21.2, ~> 3)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

Normalize inbound phone call numbers

Discussion

This will enable us to do better analysis of inbound calls

Todo

  • Fix existing data
update phone_calls set "from" = regexp_replace("from", '\+0(\d+)', '+855\1');

Add where clause above!

Done

  • Use IP address to determine country code
  • Update from (and remove twilio_request_from) from AciveCallRouter#normalized_from

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "aws-sdk":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2)

Could not find gem 'aws-sdk (~> 2)', which is required by gem 'active_elastic_job', in any of the sources.

Bundler could not find compatible versions for gem "aws-sdk-core":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2) was resolved to 2.0.22, which depends on
        aws-sdk-resources (= 2.0.22) was resolved to 2.0.22, which depends on
          aws-sdk-core (= 2.0.22)

    refile-s3 was resolved to 0.2.0, which depends on
      aws-sdk-s3 (~> 1.13) was resolved to 1.17.0, which depends on
        aws-sdk-core (>= 3.21.2, ~> 3)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

Extract sip_invite_failure_phrase

Todo

  • Add columns for sip_invite_failure_status and sip_invite_failure_phrase
  • Check whats displayed for a 200
{ "sip_invite_failure_status"=>"480", "sip_invite_failure_phrase"=>"All%20servers%20busy"}

Whitelist Voice URLs

Todo

Use SHA256 and store whitelist hash in ENV

# use proof of work with noonce here
Digest::SHA256.hexdigest 'URL_WHITELIST'

Add CDN

Todo

  • Use CDN to handle fetching recordings and assets

Connection Pool Error

ActiveRecord::ConnectionTimeoutError: could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use

Handle Phone Call Events

Todo

  • Update existing data (phone call status)
PhoneCall.initiated.joins(:call_data_record).where(:call_data_records => {:sip_term_status => "486"}).update_all(:status => "busy")
PhoneCall.initiated.joins(:call_data_record).where(:call_data_records => {:sip_term_status => ["480", "487", "603"]}).update_all(:status => "not_answered")
PhoneCall.initiated.joins(:call_data_record).where.not(:call_data_records => {:answer_time => nil}).update_all(:status => "completed")
PhoneCall.initiated.joins(:call_data_record).where(:call_data_records => {:answer_time => nil}).update_all(:status => "failed")
PhoneCall.initiated.where("created_at < ?", 1.hour.ago).update_all(:status => "failed")
PhoneCall.queued.where("created_at < ?", 1.hour.ago).update_all(:status => "canceled")

Done

  • Use external-id instead of call-sid
  • Handled failed using sip_term_status
  • Map internal status to Twilio Status
  • Add attribute to track if call was answered (handled by adding table for phone call events)
  • Write tests for changes to CDR
  • Use wisper to handle state machine triggers
  • Trigger complete! after CDR is created

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "aws-sdk":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2)

Could not find gem 'aws-sdk (~> 2)', which is required by gem 'active_elastic_job', in any of the sources.

Bundler could not find compatible versions for gem "aws-sdk-core":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2) was resolved to 2.0.22, which depends on
        aws-sdk-resources (= 2.0.22) was resolved to 2.0.22, which depends on
          aws-sdk-core (= 2.0.22)

    refile-s3 was resolved to 0.2.0, which depends on
      aws-sdk-s3 (~> 1.13) was resolved to 1.17.0, which depends on
        aws-sdk-core (>= 3.21.2, ~> 3)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "aws-sdk":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2)

Could not find gem 'aws-sdk (~> 2)', which is required by gem 'active_elastic_job', in any of the sources.

Bundler could not find compatible versions for gem "aws-sdk-core":
  In Gemfile:
    active_elastic_job was resolved to 2.0.1, which depends on
      aws-sdk (~> 2) was resolved to 2.0.22, which depends on
        aws-sdk-resources (= 2.0.22) was resolved to 2.0.22, which depends on
          aws-sdk-core (= 2.0.22)

    refile-s3 was resolved to 0.2.0, which depends on
      aws-sdk-s3 (~> 1.13) was resolved to 1.17.0, which depends on
        aws-sdk-core (>= 3.21.2, ~> 3)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

Process Recordings

Todo

  • CDN
  • Live Test

Done

  • Save Recording Completed Events
  • Configure queue name in ENV
  • Document setting queue name in ENV
  • Filter by waiting_for_file when searching for recording
  • Fix tests (ensure that observers handle received event correctly)
  • Write unit tests for jobs
  • Test case when AWS SNS notification arrives before recording ended event (retry)
    • Sync happens twice (first time when file exists, second time when modified). No upload for subsequent syncs for third time.
    • Because the recording is still initialized and not waiting_for_file for the first upload there the event does not get matched with the recording - It doesn't event know the original_file_id yet anyway.
    • The second upload occurs after the RecordingCompleted event so it's matched with the recording and marked as completed.
  • Handle processing and upload to S3 via Refile
  • Add resource like Twilio https://www.twilio.com/docs/api/rest/recording
  • Allow Recordings to be accessed without HTTP Basic Auth
  • Add recordings response to PhoneCalls
  • Deploy to unicef.somleng.org
  • Handle RecordingStatusCallback
  • Set and document recording_status_callback_notifier_worker
  • Set and document RECORDING_URL_HOST and APPLICATION_HOST
  • Return Recording#url in json (only for event)
  • Handle RecordingStatusCallback Relative URL (can do this in Somleng - always send absolute URL)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.