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: float = 0.0
has_call_recording: bool = False
@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.
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /billing HTTP/1.1 Host: team.evovoice.io Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"customers":[{"customerId":"String","internationalCosts":0,"hasCallRecording":false}]}