sfgboxapi

<back to all web services

RegisterPaidUser

The following routes are available for this service:
POST/registerpaiduser
import 'package:servicestack/servicestack.dart';

class UserAuth implements IConvertible
{
    int? id;
    String? userName;
    String? email;
    String? primaryEmail;
    String? phoneNumber;
    String? firstName;
    String? lastName;
    String? displayName;
    String? company;
    DateTime? birthDate;
    String? birthDateRaw;
    String? address;
    String? address2;
    String? city;
    String? state;
    String? country;
    String? culture;
    String? fullName;
    String? gender;
    String? language;
    String? mailAddress;
    String? nickname;
    String? postalCode;
    String? timeZone;
    String? salt;
    String? passwordHash;
    String? digestHa1Hash;
    List<String>? roles;
    List<String>? permissions;
    DateTime? createdDate;
    DateTime? modifiedDate;
    int? invalidLoginAttempts;
    DateTime? lastLoginAttempt;
    DateTime? lockedDate;
    String? recoveryToken;
    int? refId;
    String? refIdStr;
    Map<String,String?>? meta;

    UserAuth({this.id,this.userName,this.email,this.primaryEmail,this.phoneNumber,this.firstName,this.lastName,this.displayName,this.company,this.birthDate,this.birthDateRaw,this.address,this.address2,this.city,this.state,this.country,this.culture,this.fullName,this.gender,this.language,this.mailAddress,this.nickname,this.postalCode,this.timeZone,this.salt,this.passwordHash,this.digestHa1Hash,this.roles,this.permissions,this.createdDate,this.modifiedDate,this.invalidLoginAttempts,this.lastLoginAttempt,this.lockedDate,this.recoveryToken,this.refId,this.refIdStr,this.meta});
    UserAuth.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        userName = json['userName'];
        email = json['email'];
        primaryEmail = json['primaryEmail'];
        phoneNumber = json['phoneNumber'];
        firstName = json['firstName'];
        lastName = json['lastName'];
        displayName = json['displayName'];
        company = json['company'];
        birthDate = JsonConverters.fromJson(json['birthDate'],'DateTime',context!);
        birthDateRaw = json['birthDateRaw'];
        address = json['address'];
        address2 = json['address2'];
        city = json['city'];
        state = json['state'];
        country = json['country'];
        culture = json['culture'];
        fullName = json['fullName'];
        gender = json['gender'];
        language = json['language'];
        mailAddress = json['mailAddress'];
        nickname = json['nickname'];
        postalCode = json['postalCode'];
        timeZone = json['timeZone'];
        salt = json['salt'];
        passwordHash = json['passwordHash'];
        digestHa1Hash = json['digestHa1Hash'];
        roles = JsonConverters.fromJson(json['roles'],'List<String>',context!);
        permissions = JsonConverters.fromJson(json['permissions'],'List<String>',context!);
        createdDate = JsonConverters.fromJson(json['createdDate'],'DateTime',context!);
        modifiedDate = JsonConverters.fromJson(json['modifiedDate'],'DateTime',context!);
        invalidLoginAttempts = json['invalidLoginAttempts'];
        lastLoginAttempt = JsonConverters.fromJson(json['lastLoginAttempt'],'DateTime',context!);
        lockedDate = JsonConverters.fromJson(json['lockedDate'],'DateTime',context!);
        recoveryToken = json['recoveryToken'];
        refId = json['refId'];
        refIdStr = json['refIdStr'];
        meta = JsonConverters.toStringMap(json['meta']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'userName': userName,
        'email': email,
        'primaryEmail': primaryEmail,
        'phoneNumber': phoneNumber,
        'firstName': firstName,
        'lastName': lastName,
        'displayName': displayName,
        'company': company,
        'birthDate': JsonConverters.toJson(birthDate,'DateTime',context!),
        'birthDateRaw': birthDateRaw,
        'address': address,
        'address2': address2,
        'city': city,
        'state': state,
        'country': country,
        'culture': culture,
        'fullName': fullName,
        'gender': gender,
        'language': language,
        'mailAddress': mailAddress,
        'nickname': nickname,
        'postalCode': postalCode,
        'timeZone': timeZone,
        'salt': salt,
        'passwordHash': passwordHash,
        'digestHa1Hash': digestHa1Hash,
        'roles': JsonConverters.toJson(roles,'List<String>',context!),
        'permissions': JsonConverters.toJson(permissions,'List<String>',context!),
        'createdDate': JsonConverters.toJson(createdDate,'DateTime',context!),
        'modifiedDate': JsonConverters.toJson(modifiedDate,'DateTime',context!),
        'invalidLoginAttempts': invalidLoginAttempts,
        'lastLoginAttempt': JsonConverters.toJson(lastLoginAttempt,'DateTime',context!),
        'lockedDate': JsonConverters.toJson(lockedDate,'DateTime',context!),
        'recoveryToken': recoveryToken,
        'refId': refId,
        'refIdStr': refIdStr,
        'meta': meta
    };

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

class RegisterPaidUser implements IConvertible
{
    String? guid;
    int? period;
    String? reference;
    int? plan;
    ResponseStatus? responseStatus;

    RegisterPaidUser({this.guid,this.period,this.reference,this.plan,this.responseStatus});
    RegisterPaidUser.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        guid = json['guid'];
        period = json['period'];
        reference = json['reference'];
        plan = json['plan'];
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'guid': guid,
        'period': period,
        'reference': reference,
        'plan': plan,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'api.sfgtec.com', types: <String, TypeInfo> {
    'UserAuth': TypeInfo(TypeOf.Class, create:() => UserAuth()),
    'RegisterPaidUser': TypeInfo(TypeOf.Class, create:() => RegisterPaidUser()),
});

Dart RegisterPaidUser 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.

POST /registerpaiduser HTTP/1.1 
Host: api.sfgtec.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"guid":"00000000000000000000000000000000","period":0,"reference":"String","plan":0,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":0,"userName":"String","email":"String","primaryEmail":"String","phoneNumber":"String","firstName":"String","lastName":"String","displayName":"String","company":"String","birthDate":"\/Date(-62135596800000-0000)\/","birthDateRaw":"String","address":"String","address2":"String","city":"String","state":"String","country":"String","culture":"String","fullName":"String","gender":"String","language":"String","mailAddress":"String","nickname":"String","postalCode":"String","timeZone":"String","salt":"String","passwordHash":"String","digestHa1Hash":"String","roles":["String"],"permissions":["String"],"createdDate":"\/Date(-62135596800000-0000)\/","modifiedDate":"\/Date(-62135596800000-0000)\/","invalidLoginAttempts":0,"lastLoginAttempt":"\/Date(-62135596800000-0000)\/","lockedDate":"\/Date(-62135596800000-0000)\/","recoveryToken":"String","refId":0,"refIdStr":"String","meta":{"String":"String"}}