Trendsic Platform Service

<back to all web services

BillingRunStatusRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/billing/run/{BillingRunID}
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 BillingRun:
    billing_run_i_d: int = 0
    tenant_id: Optional[str] = None
    branch_id: Optional[str] = None
    branch_name: Optional[str] = None
    run_type: Optional[str] = None
    period_key: Optional[str] = None
    status: Optional[str] = None
    invoices_created: int = 0
    credits_applied: int = 0
    error: Optional[str] = None
    created_by: Optional[str] = None
    started_at: Optional[datetime.datetime] = None
    completed_at: Optional[datetime.datetime] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BillingRunStatusResponse:
    response_status: Optional[ResponseStatus] = None
    billing_run: Optional[BillingRun] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BillingRunStatusRequest:
    billing_run_i_d: int = 0

Python BillingRunStatusRequest 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 /v1/billing/run/{BillingRunID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"BillingRun":{"BillingRunID":0,"TenantId":"00000000000000000000000000000000","BranchId":"00000000000000000000000000000000","BranchName":"String","RunType":"String","PeriodKey":"String","Status":"String","InvoicesCreated":0,"CreditsApplied":0,"Error":"String","CreatedBy":"String","StartedAt":"0001-01-01T00:00:00.0000000","CompletedAt":"0001-01-01T00:00:00.0000000"}}