TicketUserServices

<back to all web services

RecurringPaymentCreateRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin
The following routes are available for this service:
POST/recurringPayments
import 'package:servicestack/servicestack.dart';

class RecurringPayment implements IConvertible
{
    int? id;
    String? status;
    String? phoneVerificationNumber;
    String? deviceId;
    String? panLastFour;
    String? expYear;
    String? expMonth;
    String? token;
    int? monthlyPrice;
    int? subscriptionLength;
    int? monthsPaid;
    bool? chargeFirstMonth;
    // @References(typeof(EventOwner))
    int? ownerId;

    int? ownerCardTypeId;
    // @StringLength(2147483647)
    String? jsonResponse;

    DateTime? startDate;
    DateTime? lastPayment;
    DateTime? nextPayment;
    String? paymentTokenId;
    int? declinedCounter;
    double? transactionFee;
    String? termsVersion;
    DateTime? termsAcceptedAt;
    String? currency;
    String? mode;
    String? lastDeclineReason;
    DateTime? lastDeclineDate;
    int? lastDunningStage;
    DateTime? lastDunningNotifiedAt;

    RecurringPayment({this.id,this.status,this.phoneVerificationNumber,this.deviceId,this.panLastFour,this.expYear,this.expMonth,this.token,this.monthlyPrice,this.subscriptionLength,this.monthsPaid,this.chargeFirstMonth,this.ownerId,this.ownerCardTypeId,this.jsonResponse,this.startDate,this.lastPayment,this.nextPayment,this.paymentTokenId,this.declinedCounter,this.transactionFee,this.termsVersion,this.termsAcceptedAt,this.currency,this.mode,this.lastDeclineReason,this.lastDeclineDate,this.lastDunningStage,this.lastDunningNotifiedAt});
    RecurringPayment.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        status = json['status'];
        phoneVerificationNumber = json['phoneVerificationNumber'];
        deviceId = json['deviceId'];
        panLastFour = json['panLastFour'];
        expYear = json['expYear'];
        expMonth = json['expMonth'];
        token = json['token'];
        monthlyPrice = json['monthlyPrice'];
        subscriptionLength = json['subscriptionLength'];
        monthsPaid = json['monthsPaid'];
        chargeFirstMonth = json['chargeFirstMonth'];
        ownerId = json['ownerId'];
        ownerCardTypeId = json['ownerCardTypeId'];
        jsonResponse = json['jsonResponse'];
        startDate = JsonConverters.fromJson(json['startDate'],'DateTime',context!);
        lastPayment = JsonConverters.fromJson(json['lastPayment'],'DateTime',context!);
        nextPayment = JsonConverters.fromJson(json['nextPayment'],'DateTime',context!);
        paymentTokenId = json['paymentTokenId'];
        declinedCounter = json['declinedCounter'];
        transactionFee = JsonConverters.toDouble(json['transactionFee']);
        termsVersion = json['termsVersion'];
        termsAcceptedAt = JsonConverters.fromJson(json['termsAcceptedAt'],'DateTime',context!);
        currency = json['currency'];
        mode = json['mode'];
        lastDeclineReason = json['lastDeclineReason'];
        lastDeclineDate = JsonConverters.fromJson(json['lastDeclineDate'],'DateTime',context!);
        lastDunningStage = json['lastDunningStage'];
        lastDunningNotifiedAt = JsonConverters.fromJson(json['lastDunningNotifiedAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'status': status,
        'phoneVerificationNumber': phoneVerificationNumber,
        'deviceId': deviceId,
        'panLastFour': panLastFour,
        'expYear': expYear,
        'expMonth': expMonth,
        'token': token,
        'monthlyPrice': monthlyPrice,
        'subscriptionLength': subscriptionLength,
        'monthsPaid': monthsPaid,
        'chargeFirstMonth': chargeFirstMonth,
        'ownerId': ownerId,
        'ownerCardTypeId': ownerCardTypeId,
        'jsonResponse': jsonResponse,
        'startDate': JsonConverters.toJson(startDate,'DateTime',context!),
        'lastPayment': JsonConverters.toJson(lastPayment,'DateTime',context!),
        'nextPayment': JsonConverters.toJson(nextPayment,'DateTime',context!),
        'paymentTokenId': paymentTokenId,
        'declinedCounter': declinedCounter,
        'transactionFee': transactionFee,
        'termsVersion': termsVersion,
        'termsAcceptedAt': JsonConverters.toJson(termsAcceptedAt,'DateTime',context!),
        'currency': currency,
        'mode': mode,
        'lastDeclineReason': lastDeclineReason,
        'lastDeclineDate': JsonConverters.toJson(lastDeclineDate,'DateTime',context!),
        'lastDunningStage': lastDunningStage,
        'lastDunningNotifiedAt': JsonConverters.toJson(lastDunningNotifiedAt,'DateTime',context!)
    };

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

class RecurringPaymentGetResult implements IConvertible
{
    RecurringPayment? item;
    bool? alreadyExisted;
    int? statusCode;
    String? message;

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

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

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

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

class RecurringPaymentCreateRequest implements IConvertible
{
    String? phoneVerificationNumber;
    String? token;
    String? panLastFour;
    String? expYear;
    String? expMonth;
    String? deviceId;
    int? monthlyPrice;
    int? subscriptionLength;
    bool? chargeFirstMonth;
    int? ownerId;
    int? ownerCardTypeId;
    String? paymentTokenId;
    double? transactionFee;
    String? currency;
    String? mode;
    DateTime? startDate;
    DateTime? lastPayment;
    DateTime? nextPayment;
    String? jsonResponse;
    String? termsVersion;
    DateTime? termsAcceptedAt;

    RecurringPaymentCreateRequest({this.phoneVerificationNumber,this.token,this.panLastFour,this.expYear,this.expMonth,this.deviceId,this.monthlyPrice,this.subscriptionLength,this.chargeFirstMonth,this.ownerId,this.ownerCardTypeId,this.paymentTokenId,this.transactionFee,this.currency,this.mode,this.startDate,this.lastPayment,this.nextPayment,this.jsonResponse,this.termsVersion,this.termsAcceptedAt});
    RecurringPaymentCreateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        phoneVerificationNumber = json['phoneVerificationNumber'];
        token = json['token'];
        panLastFour = json['panLastFour'];
        expYear = json['expYear'];
        expMonth = json['expMonth'];
        deviceId = json['deviceId'];
        monthlyPrice = json['monthlyPrice'];
        subscriptionLength = json['subscriptionLength'];
        chargeFirstMonth = json['chargeFirstMonth'];
        ownerId = json['ownerId'];
        ownerCardTypeId = json['ownerCardTypeId'];
        paymentTokenId = json['paymentTokenId'];
        transactionFee = JsonConverters.toDouble(json['transactionFee']);
        currency = json['currency'];
        mode = json['mode'];
        startDate = JsonConverters.fromJson(json['startDate'],'DateTime',context!);
        lastPayment = JsonConverters.fromJson(json['lastPayment'],'DateTime',context!);
        nextPayment = JsonConverters.fromJson(json['nextPayment'],'DateTime',context!);
        jsonResponse = json['jsonResponse'];
        termsVersion = json['termsVersion'];
        termsAcceptedAt = JsonConverters.fromJson(json['termsAcceptedAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'phoneVerificationNumber': phoneVerificationNumber,
        'token': token,
        'panLastFour': panLastFour,
        'expYear': expYear,
        'expMonth': expMonth,
        'deviceId': deviceId,
        'monthlyPrice': monthlyPrice,
        'subscriptionLength': subscriptionLength,
        'chargeFirstMonth': chargeFirstMonth,
        'ownerId': ownerId,
        'ownerCardTypeId': ownerCardTypeId,
        'paymentTokenId': paymentTokenId,
        'transactionFee': transactionFee,
        'currency': currency,
        'mode': mode,
        'startDate': JsonConverters.toJson(startDate,'DateTime',context!),
        'lastPayment': JsonConverters.toJson(lastPayment,'DateTime',context!),
        'nextPayment': JsonConverters.toJson(nextPayment,'DateTime',context!),
        'jsonResponse': jsonResponse,
        'termsVersion': termsVersion,
        'termsAcceptedAt': JsonConverters.toJson(termsAcceptedAt,'DateTime',context!)
    };

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

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

Dart RecurringPaymentCreateRequest DTOs

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

HTTP + JSV

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

POST /recurringPayments HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	phoneVerificationNumber: String,
	token: String,
	panLastFour: String,
	expYear: String,
	expMonth: String,
	deviceId: String,
	monthlyPrice: 0,
	subscriptionLength: 0,
	chargeFirstMonth: False,
	ownerId: 0,
	ownerCardTypeId: 0,
	paymentTokenId: String,
	transactionFee: 0,
	currency: String,
	mode: String,
	startDate: 0001-01-01,
	lastPayment: 0001-01-01,
	nextPayment: 0001-01-01,
	jsonResponse: String,
	termsVersion: String,
	termsAcceptedAt: 0001-01-01
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	item: 
	{
		id: 0,
		status: String,
		phoneVerificationNumber: String,
		deviceId: String,
		panLastFour: String,
		expYear: String,
		expMonth: String,
		token: String,
		monthlyPrice: 0,
		subscriptionLength: 0,
		monthsPaid: 0,
		chargeFirstMonth: False,
		ownerId: 0,
		ownerCardTypeId: 0,
		jsonResponse: String,
		startDate: 0001-01-01,
		lastPayment: 0001-01-01,
		nextPayment: 0001-01-01,
		paymentTokenId: String,
		declinedCounter: 0,
		transactionFee: 0,
		termsVersion: String,
		termsAcceptedAt: 0001-01-01,
		currency: String,
		mode: String,
		lastDeclineReason: String,
		lastDeclineDate: 0001-01-01,
		lastDunningStage: 0,
		lastDunningNotifiedAt: 0001-01-01
	},
	alreadyExisted: False,
	statusCode: 0,
	message: String
}