| POST | /CoreBanking/TransferFunds |
|---|
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 ServiceRequestBase(IReturn[ServiceResponseBase], IHasVersion):
@staticmethod
def response_type(): return ServiceResponseBase
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ServiceResponseBase:
# @ApiMember(Description="Identifies whether the request executed successfully, however does not indicated requested data was found")
is_successful: Optional[bool] = None
"""
Identifies whether the request executed successfully, however does not indicated requested data was found
"""
# @ApiMember(Description="The status code returned by the service")
status_code: Optional[int] = None
"""
The status code returned by the service
"""
# @ApiMember(Description="The status message returned by the service")
status_message: Optional[str] = None
"""
The status message returned by the service
"""
# @ApiMember(ExcludeInSchema=true)
service_debug_fields: Optional[Dict[str, str]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TransferFunds(ServiceRequestBase):
# @ApiMember(DataType="long", Description="The account number for the account which will have funds removed from it", IsRequired=true)
source_account: int = 0
"""
The account number for the account which will have funds removed from it
"""
# @ApiMember(DataType="int", Description="OBSOLETE")
source_account_type: Optional[int] = None
"""
OBSOLETE
"""
# @ApiMember(DataType="long", Description="The account number for the account which will have funds added to it", IsRequired=true)
destination_account: int = 0
"""
The account number for the account which will have funds added to it
"""
# @ApiMember(DataType="int", Description="The account type ID of the destination account. 1='Checking/DDA', 2='Savings', 3='COD'")
destination_account_type: Optional[int] = None
"""
The account type ID of the destination account. 1='Checking/DDA', 2='Savings', 3='COD'
"""
# @ApiMember(DataType="double", Description="The USD amount which to transfer between the two accounts", IsRequired=true)
transfer_amount: Decimal = decimal.Decimal(0)
"""
The USD amount which to transfer between the two accounts
"""
# @ApiMember(DataType="string", Description="A comment related to the tranferring away of funds from the source account")
source_account_transfer_note: Optional[str] = None
"""
A comment related to the tranferring away of funds from the source account
"""
# @ApiMember(DataType="string", Description="A comment related to the tranferring in of funds to the destination account")
destination_account_transfer_note: Optional[str] = None
"""
A comment related to the tranferring in of funds to the destination account
"""
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.
POST /CoreBanking/TransferFunds HTTP/1.1
Host: services.allianceassociationbank.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
SourceAccount: 0,
SourceAccountType: 0,
DestinationAccount: 0,
DestinationAccountType: 0,
TransferAmount: 0,
SourceAccountTransferNote: String,
DestinationAccountTransferNote: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
IsSuccessful: False,
StatusCode: 0,
StatusMessage: String,
ServiceDebugFields:
{
ApiServiceHost: WAB-WEBPW02,
ApiServiceHostVersion: 1.0.0.0
}
}