regis

<back to all web services

FinanceAdjustmentRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Finance/{uuid}/Adjustment/{reporting_term}
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 InvoiceItemBalanceResponse:
    response_status: Optional[ResponseStatus] = None
    rate_id: int = 0
    rate_code: Optional[str] = None
    rate_description: Optional[str] = None
    balance_amount: Decimal = decimal.Decimal(0)
    charge_amount: Decimal = decimal.Decimal(0)
    credit_amount: Decimal = decimal.Decimal(0)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class InvoiceItemAdminResponse:
    response_status: Optional[ResponseStatus] = None
    invoice_item_u_u_i_d: Optional[str] = None
    rate_id: int = 0
    rate_code: Optional[str] = None
    rate_description: Optional[str] = None
    is_required: bool = False
    is_optional: bool = False
    charge: Optional[Decimal] = None
    credit: Optional[Decimal] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FinanceAdjustmentResponse:
    response_status: Optional[ResponseStatus] = None
    regent_id: int = 0
    uuid: Optional[str] = None
    reporting_term: Optional[str] = None
    open_fiscal_date: Optional[datetime.datetime] = None
    invoice_item_balances: Optional[List[InvoiceItemBalanceResponse]] = None
    available_invoice_items: Optional[List[InvoiceItemAdminResponse]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FinanceAdjustmentRequest:
    uuid: Optional[str] = None
    reporting_term: Optional[str] = None
    is_financial_aid: bool = False
    authorizing_uuid: Optional[str] = None

Python FinanceAdjustmentRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Finance/{uuid}/Adjustment/{reporting_term} HTTP/1.1 
Host: data.regent-college.edu 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	uuid: String,
	reporting_term: String,
	is_financial_aid: False,
	authorizing_uuid: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	},
	regent_id: 0,
	uuid: String,
	reporting_term: String,
	openFiscalDate: 0001-01-01,
	invoiceItemBalances: 
	[
		{
			responseStatus: 
			{
				errorCode: String,
				message: String,
				stackTrace: String,
				errors: 
				[
					{
						errorCode: String,
						fieldName: String,
						message: String,
						meta: 
						{
							String: String
						}
					}
				],
				meta: 
				{
					String: String
				}
			},
			rate_id: 0,
			rate_code: String,
			rate_description: String,
			balance_amount: 0,
			charge_amount: 0,
			credit_amount: 0
		}
	],
	availableInvoiceItems: 
	[
		{
			responseStatus: 
			{
				errorCode: String,
				message: String,
				stackTrace: String,
				errors: 
				[
					{
						errorCode: String,
						fieldName: String,
						message: String,
						meta: 
						{
							String: String
						}
					}
				],
				meta: 
				{
					String: String
				}
			},
			invoiceItemUUID: String,
			rate_id: 0,
			rate_code: String,
			rate_description: String,
			is_required: False,
			is_optional: False,
			charge: 0,
			credit: 0
		}
	]
}