| GET | /invoices/recurringInvoices/obligation |
|---|
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 ObligationLineItem:
chart_of_account_id: Optional[int] = None
chart_of_account_ref_id: Optional[str] = None
amount: Optional[Decimal] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Obligation:
created_date: Optional[datetime.datetime] = None
last_update_date: Optional[datetime.datetime] = None
is_active: Optional[bool] = None
line_items: Optional[List[ObligationLineItem]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ObligationYear:
fiscal_year: Optional[int] = None
obligations: Optional[List[Obligation]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ObligationUser:
user_id: Optional[str] = None
group_id: Optional[str] = None
fiscal_years: Optional[List[ObligationYear]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UserObligationsRequest:
group_id: Optional[str] = None
user_id: Optional[str] = None
fiscal_year: Optional[int] = None
show_history: Optional[bool] = None
Python UserObligationsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /invoices/recurringInvoices/obligation HTTP/1.1 Host: devapi.billhighway.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
UserId: String,
GroupId: String,
FiscalYears:
[
{
FiscalYear: 0,
Obligations:
[
{
CreatedDate: 0001-01-01,
LastUpdateDate: 0001-01-01,
IsActive: False,
LineItems:
[
{
ChartOfAccountRefId: String,
Amount: 0
}
]
}
]
}
]
}