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
# @Api(Description="Inserts an object subscription for an integrated object.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SaveObjectSubscription(ISubscription):
"""
Inserts an object subscription for an integrated object.
"""
# @ApiMember(DataType="Guid", Description="Guid representing the external systems datasource information.", IsRequired=true, Name="SuiteDataSourceInstanceId", ParameterType="body")
suite_data_source_instance_id: Optional[str] = None
"""
Guid representing the external systems datasource information.
"""
# @ApiMember(DataType="string", Description="The unique key that represents the object on the external system.", IsRequired=true, Name="AlternateKey", ParameterType="body")
alternate_key: Optional[str] = None
"""
The unique key that represents the object on the external system.
"""
# @ApiMember(DataType="Guid", Description="Guid of the object within PSTPF.", Name="ObjectId", ParameterType="body")
object_id: Optional[str] = None
"""
Guid of the object within PSTPF.
"""
# @ApiMember(DataType="Guid", Description="Guid of the RmsTableCtx within PSTPF. This is used if the alternate key is provided to identify the object to update.", IsRequired=true, Name="RmsTableCtxId", ParameterType="body")
rms_table_ctx_id: Optional[str] = None
"""
Guid of the RmsTableCtx within PSTPF. This is used if the alternate key is provided to identify the object to update.
"""
Python SaveObjectSubscription DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /csv/reply/SaveObjectSubscription HTTP/1.1
Host: production-eros-platform-apisubscription.azurewebsites.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"AlternateKey":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}