| DELETE | /dependent | Remove a dependent from a user's profile. |
|---|
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 ApiServiceRequest(IServiceRequest, IHasApiKey):
# @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
api_key: Optional[str] = None
"""
The API Key required for authentication
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ApiServiceResponse(IServiceResponse):
description: Optional[str] = None
heading: Optional[str] = None
was_successful: bool = False
model_state: Optional[Object] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DependentData:
# @ApiMember(Description="Dependent's Galaxy Id used for referring to or deleting.", IsRequired=true)
dependent_id: int = 0
"""
Dependent's Galaxy Id used for referring to or deleting.
"""
# @ApiMember(Description="Dependent's first name.", IsRequired=true)
first_name: Optional[str] = None
"""
Dependent's first name.
"""
# @ApiMember(Description="Dependent's surname.", IsRequired=true)
surname: Optional[str] = None
"""
Dependent's surname.
"""
# @ApiMember(Description="Dependent's mobile contact number.", IsRequired=true)
mobile_number: Optional[str] = None
"""
Dependent's mobile contact number.
"""
# @ApiMember(Description="Dependent's email address.", IsRequired=true)
email: Optional[str] = None
"""
Dependent's email address.
"""
# @ApiMember(Description="Depdendent's ID number.", IsRequired=true)
id_number: Optional[str] = None
"""
Depdendent's ID number.
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DeleteDependentResponse(ApiServiceResponse):
# @ApiMember(Description="Updated list of the user's dependents.")
dependents: Optional[List[DependentData]] = None
"""
Updated list of the user's dependents.
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DeleteDependent(ApiServiceRequest):
# @ApiMember(Description="ID Number of the primary user you wish to add a dependent onto.", IsRequired=true)
id_number: Optional[str] = None
"""
ID Number of the primary user you wish to add a dependent onto.
"""
# @ApiMember(Description="The Id of the dependent in the Galaxy system you wish to delete.", IsRequired=true)
dependent_id: int = 0
"""
The Id of the dependent in the Galaxy system you wish to delete.
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
DELETE /dependent HTTP/1.1 Host: galaxymobile.api.client.prod.86degrees.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DeleteDependentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebService.ClientServiceModel.User">
<Description xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base">String</Description>
<Heading xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base">String</Heading>
<ModelState xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base" />
<WasSuccessful xmlns="http://schemas.datacontract.org/2004/07/CommonService.Api.Models.Base">false</WasSuccessful>
<Dependents>
<DependentData>
<DependentId>0</DependentId>
<Email>String</Email>
<FirstName>String</FirstName>
<IdNumber>String</IdNumber>
<MobileNumber>String</MobileNumber>
<Surname>String</Surname>
</DependentData>
</Dependents>
</DeleteDependentResponse>