regis

<back to all web services

DropRegistrationsRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Registration/{uuid}/Drop/{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 DropRegistrationResponse:
    student_section_uuid: Optional[str] = None
    course_name: Optional[str] = None
    section_code: Optional[str] = None
    title: Optional[str] = None
    term: Optional[str] = None
    amount: Decimal = decimal.Decimal(0)
    is_audit: bool = False
    is_grade_final: bool = False
    is_provisional: bool = False
    is_selected_to_drop: bool = False
    suggested_refund_percentage: Decimal = decimal.Decimal(0)
    suggested_refund_amount: Decimal = decimal.Decimal(0)
    balance_amount: Decimal = decimal.Decimal(0)
    charge_amount: Decimal = decimal.Decimal(0)
    credit_amount: Decimal = decimal.Decimal(0)
    description: Optional[str] = None
    additional_rate_description: Optional[str] = None
    additional_rate_id: Optional[int] = None
    additional_rate_amount: Optional[Decimal] = None
    additional_rate_suggested_refund_percentage: Optional[Decimal] = None
    additional_rate_suggested_refund_amount: Optional[Decimal] = None
    benefit_description: Optional[str] = None
    second_benefit_description: Optional[str] = None
    benefit_rate_id: Optional[int] = None
    benefit_amount: Optional[Decimal] = None
    second_benefit_amount: Optional[Decimal] = None
    second_benefit_rate_id: Optional[int] = None


@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 DropRegistrationsResponse:
    response_status: Optional[ResponseStatus] = None
    transaction_uuid: Optional[str] = None
    regent_id: int = 0
    uuid: Optional[str] = None
    reporting_term: Optional[str] = None
    suggested_drop_fee: Decimal = decimal.Decimal(0)
    suggested_full_student_fee_refund: bool = False
    messages: Optional[List[str]] = None
    registrations: Optional[List[DropRegistrationResponse]] = None
    invoice_item_balances: Optional[List[InvoiceItemBalanceResponse]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DropRegistrationsRequest:
    uuid: Optional[str] = None
    reporting_term: Optional[str] = None
    registrations: Optional[List[DropRegistrationResponse]] = None
    override_drop_date: Optional[datetime.datetime] = None
    authorizing_uuid: Optional[str] = None

Python DropRegistrationsRequest 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 /Registration/{uuid}/Drop/{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,
	registrations: 
	[
		{
			student_section_uuid: String,
			course_name: String,
			section_code: String,
			title: String,
			term: String,
			amount: 0,
			is_audit: False,
			is_grade_final: False,
			is_provisional: False,
			is_selected_to_drop: False,
			suggested_refund_percentage: 0,
			suggested_refund_amount: 0,
			balance_amount: 0,
			charge_amount: 0,
			credit_amount: 0,
			description: String,
			additional_rate_description: String,
			additional_rate_id: 0,
			additional_rate_amount: 0,
			additional_rate_suggested_refund_percentage: 0,
			additional_rate_suggested_refund_amount: 0,
			benefit_description: String,
			second_benefit_description: String,
			benefit_rate_id: 0,
			benefit_amount: 0,
			second_benefit_amount: 0,
			second_benefit_rate_id: 0
		}
	],
	override_drop_date: 0001-01-01,
	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
		}
	},
	transaction_uuid: String,
	regent_id: 0,
	uuid: String,
	reporting_term: String,
	suggested_drop_fee: 0,
	suggested_full_student_fee_refund: False,
	messages: 
	[
		String
	],
	registrations: 
	[
		{
			student_section_uuid: String,
			course_name: String,
			section_code: String,
			title: String,
			term: String,
			amount: 0,
			is_audit: False,
			is_grade_final: False,
			is_provisional: False,
			is_selected_to_drop: False,
			suggested_refund_percentage: 0,
			suggested_refund_amount: 0,
			balance_amount: 0,
			charge_amount: 0,
			credit_amount: 0,
			description: String,
			additional_rate_description: String,
			additional_rate_id: 0,
			additional_rate_amount: 0,
			additional_rate_suggested_refund_percentage: 0,
			additional_rate_suggested_refund_amount: 0,
			benefit_description: String,
			second_benefit_description: String,
			benefit_rate_id: 0,
			benefit_amount: 0,
			second_benefit_amount: 0,
			second_benefit_rate_id: 0
		}
	],
	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
		}
	]
}