TicketUserServices

<back to all web services

EventOwnerPayoutPolicyUpsertRequest

Requires Authentication
Requires the role:Admin
The following routes are available for this service:
PUT/eventowner/{EventOwnerId}/payoutPolicy
import 'package:servicestack/servicestack.dart';

class EventOwnerPayoutPolicy implements IConvertible
{
    int? id;
    // @References(typeof(EventOwner))
    int? eventOwnerId;

    int? defaultEligibilityDays;
    double? fastSettlementFeePercent;
    bool? autoApprove;
    DateTime? createdAt;
    DateTime? updatedAt;

    EventOwnerPayoutPolicy({this.id,this.eventOwnerId,this.defaultEligibilityDays,this.fastSettlementFeePercent,this.autoApprove,this.createdAt,this.updatedAt});
    EventOwnerPayoutPolicy.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        eventOwnerId = json['eventOwnerId'];
        defaultEligibilityDays = json['defaultEligibilityDays'];
        fastSettlementFeePercent = JsonConverters.toDouble(json['fastSettlementFeePercent']);
        autoApprove = json['autoApprove'];
        createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
        updatedAt = JsonConverters.fromJson(json['updatedAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'eventOwnerId': eventOwnerId,
        'defaultEligibilityDays': defaultEligibilityDays,
        'fastSettlementFeePercent': fastSettlementFeePercent,
        'autoApprove': autoApprove,
        'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
        'updatedAt': JsonConverters.toJson(updatedAt,'DateTime',context!)
    };

    getTypeName() => "EventOwnerPayoutPolicy";
    TypeContext? context = _ctx;
}

class EventOwnerPayoutPolicyResult implements IConvertible
{
    EventOwnerPayoutPolicy? item;
    int? statusCode;
    String? message;

    EventOwnerPayoutPolicyResult({this.item,this.statusCode,this.message});
    EventOwnerPayoutPolicyResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        item = JsonConverters.fromJson(json['item'],'EventOwnerPayoutPolicy',context!);
        statusCode = json['statusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'item': JsonConverters.toJson(item,'EventOwnerPayoutPolicy',context!),
        'statusCode': statusCode,
        'message': message
    };

    getTypeName() => "EventOwnerPayoutPolicyResult";
    TypeContext? context = _ctx;
}

class EventOwnerPayoutPolicyUpsertRequest implements IConvertible
{
    int? eventOwnerId;
    int? defaultEligibilityDays;
    double? fastSettlementFeePercent;
    bool? autoApprove;

    EventOwnerPayoutPolicyUpsertRequest({this.eventOwnerId,this.defaultEligibilityDays,this.fastSettlementFeePercent,this.autoApprove});
    EventOwnerPayoutPolicyUpsertRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        eventOwnerId = json['eventOwnerId'];
        defaultEligibilityDays = json['defaultEligibilityDays'];
        fastSettlementFeePercent = JsonConverters.toDouble(json['fastSettlementFeePercent']);
        autoApprove = json['autoApprove'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'eventOwnerId': eventOwnerId,
        'defaultEligibilityDays': defaultEligibilityDays,
        'fastSettlementFeePercent': fastSettlementFeePercent,
        'autoApprove': autoApprove
    };

    getTypeName() => "EventOwnerPayoutPolicyUpsertRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
    'EventOwnerPayoutPolicy': TypeInfo(TypeOf.Class, create:() => EventOwnerPayoutPolicy()),
    'EventOwnerPayoutPolicyResult': TypeInfo(TypeOf.Class, create:() => EventOwnerPayoutPolicyResult()),
    'EventOwnerPayoutPolicyUpsertRequest': TypeInfo(TypeOf.Class, create:() => EventOwnerPayoutPolicyUpsertRequest()),
});

Dart EventOwnerPayoutPolicyUpsertRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /eventowner/{EventOwnerId}/payoutPolicy HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"eventOwnerId":0,"defaultEligibilityDays":0,"fastSettlementFeePercent":0,"autoApprove":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"item":{"id":0,"eventOwnerId":0,"defaultEligibilityDays":0,"fastSettlementFeePercent":0,"autoApprove":false,"createdAt":"0001-01-01T00:00:00.0000000","updatedAt":"0001-01-01T00:00:00.0000000"},"statusCode":0,"message":"String"}