TicketUserServices

<back to all web services

BorgunServicesGetSingleTokenRequest

Requires Authentication
Requires the role:AdminRequires the permission:ReadData
The following routes are available for this service:
POST/borgunServices/token/singleTest 3D
import 'package:servicestack/servicestack.dart';

class BorgunVerifyCardResult implements IConvertible
{
    String? transactionId;
    String? actionCode;

    BorgunVerifyCardResult({this.transactionId,this.actionCode});
    BorgunVerifyCardResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        transactionId = json['transactionId'];
        actionCode = json['actionCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'transactionId': transactionId,
        'actionCode': actionCode
    };

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

class BorgunMetadata implements IConvertible
{
    String? payload;

    BorgunMetadata({this.payload});
    BorgunMetadata.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        payload = json['payload'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'payload': payload
    };

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

class BorgunTokenSingleInfo implements IConvertible
{
    String? virtualNumber;
    String? token;
    String? pan;
    String? expYear;
    String? expMonth;
    bool? enabled;
    BorgunVerifyCardResult? verifyCardResult;
    BorgunMetadata? metadata;

    BorgunTokenSingleInfo({this.virtualNumber,this.token,this.pan,this.expYear,this.expMonth,this.enabled,this.verifyCardResult,this.metadata});
    BorgunTokenSingleInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        virtualNumber = json['virtualNumber'];
        token = json['token'];
        pan = json['pan'];
        expYear = json['expYear'];
        expMonth = json['expMonth'];
        enabled = json['enabled'];
        verifyCardResult = JsonConverters.fromJson(json['verifyCardResult'],'BorgunVerifyCardResult',context!);
        metadata = JsonConverters.fromJson(json['metadata'],'BorgunMetadata',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'virtualNumber': virtualNumber,
        'token': token,
        'pan': pan,
        'expYear': expYear,
        'expMonth': expMonth,
        'enabled': enabled,
        'verifyCardResult': JsonConverters.toJson(verifyCardResult,'BorgunVerifyCardResult',context!),
        'metadata': JsonConverters.toJson(metadata,'BorgunMetadata',context!)
    };

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

class BorgunTokenSingleResponse implements IConvertible
{
    int? statusCode;
    BorgunTokenSingleInfo? token;
    String? uri;
    String? message;

    BorgunTokenSingleResponse({this.statusCode,this.token,this.uri,this.message});
    BorgunTokenSingleResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class BorgunServicesGetSingleTokenResponse implements IConvertible
{
    BorgunTokenSingleResponse? response;
    bool? success;
    int? httpStatusCode;
    String? message;

    BorgunServicesGetSingleTokenResponse({this.response,this.success,this.httpStatusCode,this.message});
    BorgunServicesGetSingleTokenResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        response = JsonConverters.fromJson(json['response'],'BorgunTokenSingleResponse',context!);
        success = json['success'];
        httpStatusCode = json['httpStatusCode'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'response': JsonConverters.toJson(response,'BorgunTokenSingleResponse',context!),
        'success': success,
        'httpStatusCode': httpStatusCode,
        'message': message
    };

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

class BorgunVerifyCardRequest implements IConvertible
{
    int? checkAmount;
    String? currency;
    String? cvc;

    BorgunVerifyCardRequest({this.checkAmount,this.currency,this.cvc});
    BorgunVerifyCardRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        checkAmount = json['checkAmount'];
        currency = json['currency'];
        cvc = json['cvc'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'checkAmount': checkAmount,
        'currency': currency,
        'cvc': cvc
    };

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

class BorgunTokenSingleRequest implements IConvertible
{
    String? pan;
    String? expMonth;
    String? expYear;
    int? tokenLifetime;
    BorgunVerifyCardRequest? verifyCard;
    BorgunMetadata? metadata;

    BorgunTokenSingleRequest({this.pan,this.expMonth,this.expYear,this.tokenLifetime,this.verifyCard,this.metadata});
    BorgunTokenSingleRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        pan = json['pan'];
        expMonth = json['expMonth'];
        expYear = json['expYear'];
        tokenLifetime = json['tokenLifetime'];
        verifyCard = JsonConverters.fromJson(json['verifyCard'],'BorgunVerifyCardRequest',context!);
        metadata = JsonConverters.fromJson(json['metadata'],'BorgunMetadata',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'pan': pan,
        'expMonth': expMonth,
        'expYear': expYear,
        'tokenLifetime': tokenLifetime,
        'verifyCard': JsonConverters.toJson(verifyCard,'BorgunVerifyCardRequest',context!),
        'metadata': JsonConverters.toJson(metadata,'BorgunMetadata',context!)
    };

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

class BorgunServicesGetSingleTokenRequest implements IConvertible
{
    BorgunTokenSingleRequest? request;

    BorgunServicesGetSingleTokenRequest({this.request});
    BorgunServicesGetSingleTokenRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'request': JsonConverters.toJson(request,'BorgunTokenSingleRequest',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'stubbur_autoupdates_live.smartnewapis.com', types: <String, TypeInfo> {
    'BorgunVerifyCardResult': TypeInfo(TypeOf.Class, create:() => BorgunVerifyCardResult()),
    'BorgunMetadata': TypeInfo(TypeOf.Class, create:() => BorgunMetadata()),
    'BorgunTokenSingleInfo': TypeInfo(TypeOf.Class, create:() => BorgunTokenSingleInfo()),
    'BorgunTokenSingleResponse': TypeInfo(TypeOf.Class, create:() => BorgunTokenSingleResponse()),
    'BorgunServicesGetSingleTokenResponse': TypeInfo(TypeOf.Class, create:() => BorgunServicesGetSingleTokenResponse()),
    'BorgunVerifyCardRequest': TypeInfo(TypeOf.Class, create:() => BorgunVerifyCardRequest()),
    'BorgunTokenSingleRequest': TypeInfo(TypeOf.Class, create:() => BorgunTokenSingleRequest()),
    'BorgunServicesGetSingleTokenRequest': TypeInfo(TypeOf.Class, create:() => BorgunServicesGetSingleTokenRequest()),
});

Dart BorgunServicesGetSingleTokenRequest DTOs

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

HTTP + XML

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

POST /borgunServices/token/single HTTP/1.1 
Host: stubbur-autoupdates-live.smartnewapis.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<BorgunServicesGetSingleTokenRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <Request xmlns:d2p1="http://schemas.datacontract.org/2004/07/BorgunRPGData">
    <d2p1:ExpMonth>String</d2p1:ExpMonth>
    <d2p1:ExpYear>String</d2p1:ExpYear>
    <d2p1:Metadata>
      <d2p1:Payload>String</d2p1:Payload>
    </d2p1:Metadata>
    <d2p1:PAN>String</d2p1:PAN>
    <d2p1:TokenLifetime>0</d2p1:TokenLifetime>
    <d2p1:VerifyCard>
      <d2p1:CVC>String</d2p1:CVC>
      <d2p1:CheckAmount>0</d2p1:CheckAmount>
      <d2p1:Currency>String</d2p1:Currency>
    </d2p1:VerifyCard>
  </Request>
</BorgunServicesGetSingleTokenRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<BorgunServicesGetSingleTokenResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <HttpStatusCode>0</HttpStatusCode>
  <Message>String</Message>
  <Response xmlns:d2p1="http://schemas.datacontract.org/2004/07/BorgunRPGData">
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StatusCode>0</d2p1:StatusCode>
    <d2p1:Token>
      <d2p1:Enabled>false</d2p1:Enabled>
      <d2p1:ExpMonth>String</d2p1:ExpMonth>
      <d2p1:ExpYear>String</d2p1:ExpYear>
      <d2p1:Metadata>
        <d2p1:Payload>String</d2p1:Payload>
      </d2p1:Metadata>
      <d2p1:PAN>String</d2p1:PAN>
      <d2p1:Token>String</d2p1:Token>
      <d2p1:VerifyCardResult>
        <d2p1:ActionCode>String</d2p1:ActionCode>
        <d2p1:TransactionId>String</d2p1:TransactionId>
      </d2p1:VerifyCardResult>
      <d2p1:VirtualNumber>String</d2p1:VirtualNumber>
    </d2p1:Token>
    <d2p1:Uri>String</d2p1:Uri>
  </Response>
  <Success>false</Success>
</BorgunServicesGetSingleTokenResponse>