/* Options: Date: 2025-07-19 11:33:06 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://www.clubready.com/api/current //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: AgreementAddEndpoint.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum RestrictedResourceType { Store, Chain, User, Undefined, } abstract class IApiDtoBase { String? ApiKey; int? StoreId; int? ChainId; } abstract class IRestrictedApiRequest extends IApiKeyEndpoint { int? RestrictedId; RestrictedResourceType? RestrictedResourceType; } abstract class IApiKeyEndpoint { String? ApiKey; } abstract class IAddEndpoint extends IApiDtoBase { int? MemberId; int? PackageId; int? InstallmentId; DateTime? StartDate; String? PromoCode; int? StaffId; } class ApiResponse2Base implements IConvertible { bool? success; String? message; ApiResponse2Base({this.success,this.message}); ApiResponse2Base.fromJson(Map json) { fromMap(json); } fromMap(Map json) { success = json['success']; message = json['message']; return this; } Map toJson() => { 'success': success, 'message': message }; getTypeName() => "ApiResponse2Base"; TypeContext? context = _ctx; } class AddResponse extends ApiResponse2Base implements IConvertible { String? incompleteAgreementToken; int? contractId; AddResponse({this.incompleteAgreementToken,this.contractId}); AddResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); incompleteAgreementToken = json['incompleteAgreementToken']; contractId = json['contractId']; return this; } Map toJson() => super.toJson()..addAll({ 'incompleteAgreementToken': incompleteAgreementToken, 'contractId': contractId }); getTypeName() => "AddResponse"; TypeContext? context = _ctx; } // @Route("/sales/agreement/add", "POST") // @ApiResponse(Description="", ResponseType=typeof(AddResponse), StatusCode=200) class AgreementAddEndpoint implements IReturn, IAddEndpoint, IRestrictedApiRequest, IConvertible { /** * IP address of the end user */ // @ApiMember(Description="IP address of the end user", IsRequired=true, Name="X-Forwarded-For", ParameterType="header") String? XForwardedFor; /** * Api Authentication Key */ // @ApiMember(Description="Api Authentication Key", IsRequired=true, ParameterType="query") String? ApiKey; /** * Member Id of the user buying the Package */ // @ApiMember(Description="Member Id of the user buying the Package", IsRequired=true, ParameterType="query") int? MemberId; int? ChainId; /** * Id of the store for the user */ // @ApiMember(Description="Id of the store for the user", IsRequired=true) int? StoreId; /** * Package Id number of the package being purchased */ // @ApiMember(Description="Package Id number of the package being purchased", IsRequired=true) int? PackageId; /** * Installment Plan Id being purchased. If empty, the default package will be selected. */ // @ApiMember(Description="Installment Plan Id being purchased. If empty, the default package will be selected.") int? InstallmentId; /** * Date contract takes affect */ // @ApiMember(Description="Date contract takes affect") DateTime? StartDate; /** * Promo code to apply a discount. */ // @ApiMember(Description="Promo code to apply a discount.") String? PromoCode; /** * Staff Id of salesperson who sold the agreement. */ // @ApiMember(Description="Staff Id of salesperson who sold the agreement.") int? StaffId; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; AgreementAddEndpoint({this.XForwardedFor,this.ApiKey,this.MemberId,this.ChainId,this.StoreId,this.PackageId,this.InstallmentId,this.StartDate,this.PromoCode,this.StaffId,this.RestrictedId,this.RestrictedResourceType}); AgreementAddEndpoint.fromJson(Map json) { fromMap(json); } fromMap(Map json) { XForwardedFor = json['XForwardedFor']; ApiKey = json['ApiKey']; MemberId = json['MemberId']; ChainId = json['ChainId']; StoreId = json['StoreId']; PackageId = json['PackageId']; InstallmentId = json['InstallmentId']; StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!); PromoCode = json['PromoCode']; StaffId = json['StaffId']; RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => { 'XForwardedFor': XForwardedFor, 'ApiKey': ApiKey, 'MemberId': MemberId, 'ChainId': ChainId, 'StoreId': StoreId, 'PackageId': PackageId, 'InstallmentId': InstallmentId, 'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!), 'PromoCode': PromoCode, 'StaffId': StaffId, 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }; createResponse() => AddResponse(); getResponseTypeName() => "AddResponse"; getTypeName() => "AgreementAddEndpoint"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'www.clubready.com', types: { 'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values), 'IApiDtoBase': TypeInfo(TypeOf.Interface), 'IRestrictedApiRequest': TypeInfo(TypeOf.Interface), 'IApiKeyEndpoint': TypeInfo(TypeOf.Interface), 'IAddEndpoint': TypeInfo(TypeOf.Interface), 'ApiResponse2Base': TypeInfo(TypeOf.Class, create:() => ApiResponse2Base()), 'AddResponse': TypeInfo(TypeOf.Class, create:() => AddResponse()), 'AgreementAddEndpoint': TypeInfo(TypeOf.Class, create:() => AgreementAddEndpoint()), });