Evo Voice

<back to all web services

GetBilling

Get the billing totals for the specified date range. Please note that we do not support getting billing at the hourly time granularity.

Requires Authentication
The following routes are available for this service:
GET/billing
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BillingCustomerInfo:
    customer_id: Optional[str] = None
    international_costs: Optional[float] = None
    has_call_recording: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BillingInfo:
    customers: Optional[List[BillingCustomerInfo]] = None


# @Api(Description="Get the billing totals for the specified date range. Please note that we do not support getting billing at the hourly time granularity.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetBilling:
    """
    Get the billing totals for the specified date range. Please note that we do not support getting billing at the hourly time granularity.
    """

    # @ApiMember(Description="Your Evo Voice Account ID", IsRequired=true)
    account_id: Optional[str] = None
    """
    Your Evo Voice Account ID
    """


    # @ApiMember(Description="The start of the date range that you want to query for (we will only use the date portion, so it will include the entire day even if you specify a time as well)", IsRequired=true)
    start_date: Optional[str] = None
    """
    The start of the date range that you want to query for (we will only use the date portion, so it will include the entire day even if you specify a time as well)
    """


    # @ApiMember(Description="The end of the date range you want to query for (we will include this entire day in the billing)", IsRequired=true)
    end_date: Optional[str] = None
    """
    The end of the date range you want to query for (we will include this entire day in the billing)
    """


    # @ApiMember(Description="Specify this to filter to a specific customer.")
    customer_id: Optional[str] = None
    """
    Specify this to filter to a specific customer.
    """

Python GetBilling DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /billing HTTP/1.1 
Host: evovoice.io 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"customers":[{"customerId":"String","internationalCosts":0,"hasCallRecording":false}]}