GET | /financial-transactions-statement |
---|
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 FinancialTransactionsStatementGetListViewModel:
transaction_date: Optional[datetime.datetime] = None
description: Optional[str] = None
amount: Optional[Decimal] = None
balance: Optional[Decimal] = None
is_credit: Optional[bool] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FinancialTransactionsStatementGetListResponse(GetListResponse[FinancialTransactionsStatementGetListViewModel]):
pass
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FinancialTransactionsStatementGetList(IGet):
bee_number: Optional[Decimal] = None
transaction_type: Optional[str] = None
start_time: Optional[datetime.datetime] = None
end_time: Optional[datetime.datetime] = None
TEntity = TypeVar('TEntity')
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetListResponse(Generic[TEntity]):
items: Optional[List[TEntity]] = None
response_status: Optional[ResponseStatus] = None
Python FinancialTransactionsStatementGetList 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 /financial-transactions-statement HTTP/1.1 Host: extensions.avon.ca Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { items: [ { transactionDate: 0001-01-01T00:00:00, description: String, amount: 0, balance: 0, isCredit: False } ], responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } } }