| Requires any of the roles: | Agent, Administrator, Agent, Administrator |
| GET,POST,OPTIONS | /v1/AgentEventRegistration |
|---|
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 AgentEventRegistration:
agent_event_registration_id: Optional[str] = None
event_registration_id: Optional[str] = None
user_id: Optional[str] = None
number_attending: int = 0
total_cost: Decimal = decimal.Decimal(0)
stripe_charge_id: Optional[str] = None
date_created: datetime.datetime = datetime.datetime(1, 1, 1)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AgentEventRegistrationResponse:
response_status: Optional[ResponseStatus] = None
agent_event_registration: List[AgentEventRegistration] = field(default_factory=list)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AgentEventRegistrationRequest:
agent_event_registration: List[AgentEventRegistration] = field(default_factory=list)
stripe_token: Optional[str] = None
registration_description: Optional[str] = None
event_registration_id: Optional[str] = None
Python AgentEventRegistrationRequest 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.
POST /v1/AgentEventRegistration HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
AgentEventRegistration:
[
{
AgentEventRegistrationId: 00000000000000000000000000000000,
EventRegistrationId: 00000000000000000000000000000000,
UserId: 00000000000000000000000000000000,
NumberAttending: 0,
TotalCost: 0,
StripeChargeId: String,
DateCreated: 0001-01-01
}
],
StripeToken: String,
RegistrationDescription: String,
EventRegistrationId: 00000000000000000000000000000000
}
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
}
},
AgentEventRegistration:
[
{
AgentEventRegistrationId: 00000000000000000000000000000000,
EventRegistrationId: 00000000000000000000000000000000,
UserId: 00000000000000000000000000000000,
NumberAttending: 0,
TotalCost: 0,
StripeChargeId: String,
DateCreated: 0001-01-01
}
]
}