| Requires the role: | Admin |
| POST | /payouts/{Id}/approve |
|---|
import 'package:servicestack/servicestack.dart';
class EventPayout implements IConvertible
{
int? id;
// @References(typeof(Event))
int? eventId;
// @References(typeof(EventOwner))
int? eventOwnerId;
String? state;
DateTime? defaultEligibleAt;
int? grossAmount;
int? transactionFee;
int? platformCut;
int? freeTicketDeduction;
int? minimumFeeDeduction;
int? extraCostDeduction;
int? fastSettlementFee;
int? outstandingApplied;
int? netAmount;
bool? fastSettlementRequested;
DateTime? fastSettlementRequestedAt;
String? approvedBy;
DateTime? approvedAt;
// @References(typeof(IsbPayoutBatchRow))
int? isbPayoutBatchRowId;
DateTime? createdAt;
DateTime? updatedAt;
String? memo;
EventPayout({this.id,this.eventId,this.eventOwnerId,this.state,this.defaultEligibleAt,this.grossAmount,this.transactionFee,this.platformCut,this.freeTicketDeduction,this.minimumFeeDeduction,this.extraCostDeduction,this.fastSettlementFee,this.outstandingApplied,this.netAmount,this.fastSettlementRequested,this.fastSettlementRequestedAt,this.approvedBy,this.approvedAt,this.isbPayoutBatchRowId,this.createdAt,this.updatedAt,this.memo});
EventPayout.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
eventId = json['eventId'];
eventOwnerId = json['eventOwnerId'];
state = json['state'];
defaultEligibleAt = JsonConverters.fromJson(json['defaultEligibleAt'],'DateTime',context!);
grossAmount = json['grossAmount'];
transactionFee = json['transactionFee'];
platformCut = json['platformCut'];
freeTicketDeduction = json['freeTicketDeduction'];
minimumFeeDeduction = json['minimumFeeDeduction'];
extraCostDeduction = json['extraCostDeduction'];
fastSettlementFee = json['fastSettlementFee'];
outstandingApplied = json['outstandingApplied'];
netAmount = json['netAmount'];
fastSettlementRequested = json['fastSettlementRequested'];
fastSettlementRequestedAt = JsonConverters.fromJson(json['fastSettlementRequestedAt'],'DateTime',context!);
approvedBy = json['approvedBy'];
approvedAt = JsonConverters.fromJson(json['approvedAt'],'DateTime',context!);
isbPayoutBatchRowId = json['isbPayoutBatchRowId'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
updatedAt = JsonConverters.fromJson(json['updatedAt'],'DateTime',context!);
memo = json['memo'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'eventId': eventId,
'eventOwnerId': eventOwnerId,
'state': state,
'defaultEligibleAt': JsonConverters.toJson(defaultEligibleAt,'DateTime',context!),
'grossAmount': grossAmount,
'transactionFee': transactionFee,
'platformCut': platformCut,
'freeTicketDeduction': freeTicketDeduction,
'minimumFeeDeduction': minimumFeeDeduction,
'extraCostDeduction': extraCostDeduction,
'fastSettlementFee': fastSettlementFee,
'outstandingApplied': outstandingApplied,
'netAmount': netAmount,
'fastSettlementRequested': fastSettlementRequested,
'fastSettlementRequestedAt': JsonConverters.toJson(fastSettlementRequestedAt,'DateTime',context!),
'approvedBy': approvedBy,
'approvedAt': JsonConverters.toJson(approvedAt,'DateTime',context!),
'isbPayoutBatchRowId': isbPayoutBatchRowId,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'updatedAt': JsonConverters.toJson(updatedAt,'DateTime',context!),
'memo': memo
};
getTypeName() => "EventPayout";
TypeContext? context = _ctx;
}
class EventPayoutGetResult implements IConvertible
{
EventPayout? payout;
int? statusCode;
String? message;
EventPayoutGetResult({this.payout,this.statusCode,this.message});
EventPayoutGetResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
payout = JsonConverters.fromJson(json['payout'],'EventPayout',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'payout': JsonConverters.toJson(payout,'EventPayout',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "EventPayoutGetResult";
TypeContext? context = _ctx;
}
class EventPayoutApproveRequest implements IConvertible
{
int? id;
String? memo;
EventPayoutApproveRequest({this.id,this.memo});
EventPayoutApproveRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
memo = json['memo'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'memo': memo
};
getTypeName() => "EventPayoutApproveRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'EventPayout': TypeInfo(TypeOf.Class, create:() => EventPayout()),
'EventPayoutGetResult': TypeInfo(TypeOf.Class, create:() => EventPayoutGetResult()),
'EventPayoutApproveRequest': TypeInfo(TypeOf.Class, create:() => EventPayoutApproveRequest()),
});
Dart EventPayoutApproveRequest 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 /payouts/{Id}/approve HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: 0,
memo: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
payout:
{
id: 0,
eventId: 0,
eventOwnerId: 0,
state: String,
defaultEligibleAt: 0001-01-01,
grossAmount: 0,
transactionFee: 0,
platformCut: 0,
freeTicketDeduction: 0,
minimumFeeDeduction: 0,
extraCostDeduction: 0,
fastSettlementFee: 0,
outstandingApplied: 0,
netAmount: 0,
fastSettlementRequested: False,
fastSettlementRequestedAt: 0001-01-01,
approvedBy: String,
approvedAt: 0001-01-01,
isbPayoutBatchRowId: 0,
createdAt: 0001-01-01,
updatedAt: 0001-01-01,
memo: String
},
statusCode: 0,
message: String
}