/* Options: Date: 2024-11-24 13:30:38 Version: 6.50 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://clubready.com/api/current //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: MakePayment.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum RestrictedResourceType { Store, Chain, User, Undefined, } abstract class IRestrictedApiRequest extends IApiKeyEndpoint { int? RestrictedId; RestrictedResourceType? RestrictedResourceType; } abstract class IApiKeyEndpoint { String? ApiKey; } class ApiDtoBase implements IConvertible { String? ApiKey; int? StoreId; int? ChainId; ApiDtoBase({this.ApiKey,this.StoreId,this.ChainId}); ApiDtoBase.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ApiKey = json['ApiKey']; StoreId = json['StoreId']; ChainId = json['ChainId']; return this; } Map toJson() => { 'ApiKey': ApiKey, 'StoreId': StoreId, 'ChainId': ChainId }; getTypeName() => "ApiDtoBase"; TypeContext? context = _ctx; } class MakePaymentRequest extends ApiDtoBase implements IConvertible { int? UserId; double? Amount; List? Invoice; MakePaymentRequest({this.UserId,this.Amount,this.Invoice}); MakePaymentRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); UserId = json['UserId']; Amount = JsonConverters.toDouble(json['Amount']); Invoice = JsonConverters.fromJson(json['Invoice'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'UserId': UserId, 'Amount': Amount, 'Invoice': JsonConverters.toJson(Invoice,'List',context!) }); getTypeName() => "MakePaymentRequest"; TypeContext? context = _ctx; } // @Route("/sales/member/{MemberId}/payment/makepayment", "POST") class MakePayment extends MakePaymentRequest implements IRestrictedApiRequest, IConvertible { /** * Api Key - grants access to resources */ // @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query") String? ApiKey; /** * ID # of store member belongs to */ // @ApiMember(DataType="integer", Description="ID # of store member belongs to", IsRequired=true, Name="StoreId", ParameterType="query") int? StoreId; /** * ID # of chain member belongs to */ // @ApiMember(DataType="integer", Description="ID # of chain member belongs to", Name="ChainId", ParameterType="query") int? ChainId; /** * Member ID of user to make payment for */ // @ApiMember(DataType="integer", Description="Member ID of user to make payment for", IsRequired=true, Name="MemberId", ParameterType="path") int? MemberId; /** * Amount of the payment, including sales tax */ // @ApiMember(DataType="decimal", Description="Amount of the payment, including sales tax", IsRequired=true, Name="Amount", ParameterType="query") double? Amount; /** * Invoice ID to be paid */ // @ApiMember(DataType="integer", Description="Invoice ID to be paid", IsRequired=true, Name="Invoice", ParameterType="query") List? Invoice; int? RestrictedId; RestrictedResourceType? RestrictedResourceType; MakePayment({this.ApiKey,this.StoreId,this.ChainId,this.MemberId,this.Amount,this.Invoice,this.RestrictedId,this.RestrictedResourceType}); MakePayment.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ApiKey = json['ApiKey']; StoreId = json['StoreId']; ChainId = json['ChainId']; MemberId = json['MemberId']; Amount = JsonConverters.toDouble(json['Amount']); Invoice = JsonConverters.fromJson(json['Invoice'],'List',context!); RestrictedId = json['RestrictedId']; RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!); return this; } Map toJson() => super.toJson()..addAll({ 'ApiKey': ApiKey, 'StoreId': StoreId, 'ChainId': ChainId, 'MemberId': MemberId, 'Amount': Amount, 'Invoice': JsonConverters.toJson(Invoice,'List',context!), 'RestrictedId': RestrictedId, 'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!) }); getTypeName() => "MakePayment"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'clubready.com', types: { 'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values), 'IRestrictedApiRequest': TypeInfo(TypeOf.Interface), 'IApiKeyEndpoint': TypeInfo(TypeOf.Interface), 'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()), 'MakePaymentRequest': TypeInfo(TypeOf.Class, create:() => MakePaymentRequest()), 'MakePayment': TypeInfo(TypeOf.Class, create:() => MakePayment()), });