efun.id.api

<back to all web services

ChangeEmailRequest

Requires Authentication
The following routes are available for this service:
POST/api/v1/users/change-email
import 'package:servicestack/servicestack.dart';

class ChangeEmailRequest implements IConvertible
{
    String? currentPassword;
    String? verifyCode;
    String? email;
    String? twoFaCode;

    ChangeEmailRequest({this.currentPassword,this.verifyCode,this.email,this.twoFaCode});
    ChangeEmailRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        currentPassword = json['currentPassword'];
        verifyCode = json['verifyCode'];
        email = json['email'];
        twoFaCode = json['twoFaCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'currentPassword': currentPassword,
        'verifyCode': verifyCode,
        'email': email,
        'twoFaCode': twoFaCode
    };

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

class BannerListResponse implements IConvertible
{
    int? id;
    String? title;
    String? image;
    String? url;
    bool? publish;
    DateTime? publishDate;
    int? orderIndex;

    BannerListResponse({this.id,this.title,this.image,this.url,this.publish,this.publishDate,this.orderIndex});
    BannerListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        title = json['title'];
        image = json['image'];
        url = json['url'];
        publish = json['publish'];
        publishDate = JsonConverters.fromJson(json['publishDate'],'DateTime',context!);
        orderIndex = json['orderIndex'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'title': title,
        'image': image,
        'url': url,
        'publish': publish,
        'publishDate': JsonConverters.toJson(publishDate,'DateTime',context!),
        'orderIndex': orderIndex
    };

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

class BaseResponse<List> implements IResponseRequest, IConvertible
{
    int? code;
    String? message;
    List<BannerListResponse>? data;

    BaseResponse({this.code,this.message,this.data});
    BaseResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        code = json['code'];
        message = json['message'];
        data = JsonConverters.fromJson(json['data'],'List<BannerListResponse>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'code': code,
        'message': message,
        'data': JsonConverters.toJson(data,'List<BannerListResponse>',context!)
    };

    getTypeName() => "BaseResponse<$List`1>";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'efun_id_api_sandbox.efun.vn', types: <String, TypeInfo> {
    'ChangeEmailRequest': TypeInfo(TypeOf.Class, create:() => ChangeEmailRequest()),
    'BannerListResponse': TypeInfo(TypeOf.Class, create:() => BannerListResponse()),
    'BaseResponse<List>': TypeInfo(TypeOf.Class, create:() => BaseResponse<List>()),
    'List<BannerListResponse>': TypeInfo(TypeOf.Class, create:() => <BannerListResponse>[]),
});

Dart ChangeEmailRequest 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 /api/v1/users/change-email HTTP/1.1 
Host: efun-id-api-sandbox.efun.vn 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ChangeEmailRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/efun.id.api.ServiceModel">
  <CurrentPassword>String</CurrentPassword>
  <Email>String</Email>
  <TwoFaCode>String</TwoFaCode>
  <VerifyCode>String</VerifyCode>
</ChangeEmailRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<BaseResponseOfUser53LsApX4 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/efun.id.api.ServiceModel">
  <Code>0</Code>
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/efun.id.data.Models">
    <d2p1:Address>String</d2p1:Address>
    <d2p1:AdnxAppId>String</d2p1:AdnxAppId>
    <d2p1:AllowTransferGame>String</d2p1:AllowTransferGame>
    <d2p1:Country>String</d2p1:Country>
    <d2p1:CreatedDate>0001-01-01T00:00:00</d2p1:CreatedDate>
    <d2p1:Dob>0001-01-01T00:00:00</d2p1:Dob>
    <d2p1:Email>String</d2p1:Email>
    <d2p1:FirstName>String</d2p1:FirstName>
    <d2p1:FullName>String</d2p1:FullName>
    <d2p1:Gender>0</d2p1:Gender>
    <d2p1:Id>0</d2p1:Id>
    <d2p1:IdAddressProvide>String</d2p1:IdAddressProvide>
    <d2p1:IdNumber>String</d2p1:IdNumber>
    <d2p1:IdRegDate>0001-01-01T00:00:00</d2p1:IdRegDate>
    <d2p1:IpAddress>String</d2p1:IpAddress>
    <d2p1:IpRegister>String</d2p1:IpRegister>
    <d2p1:IsActiveEmail>false</d2p1:IsActiveEmail>
    <d2p1:IsActivePhone>false</d2p1:IsActivePhone>
    <d2p1:IsLoginByPlayNow>0</d2p1:IsLoginByPlayNow>
    <d2p1:IsPlayNow>0</d2p1:IsPlayNow>
    <d2p1:IsUpdatedUserName>0</d2p1:IsUpdatedUserName>
    <d2p1:Job>String</d2p1:Job>
    <d2p1:LastMonthMoney>0</d2p1:LastMonthMoney>
    <d2p1:LastName>String</d2p1:LastName>
    <d2p1:Money>0</d2p1:Money>
    <d2p1:MoneyLock>0</d2p1:MoneyLock>
    <d2p1:Phone>String</d2p1:Phone>
    <d2p1:Rank>String</d2p1:Rank>
    <d2p1:RegisteredDate>0001-01-01T00:00:00</d2p1:RegisteredDate>
    <d2p1:RequestChangeTime>0001-01-01T00:00:00</d2p1:RequestChangeTime>
    <d2p1:Status>0</d2p1:Status>
    <d2p1:TotalMoney>0</d2p1:TotalMoney>
    <d2p1:TwoFAStatus>0</d2p1:TwoFAStatus>
    <d2p1:UID>0</d2p1:UID>
    <d2p1:UpdatedDate>0001-01-01T00:00:00</d2p1:UpdatedDate>
    <d2p1:UseTwoFA>false</d2p1:UseTwoFA>
    <d2p1:UserName>String</d2p1:UserName>
    <d2p1:VipGameId>0</d2p1:VipGameId>
    <d2p1:VipPoint>0</d2p1:VipPoint>
  </Data>
  <Message>String</Message>
</BaseResponseOfUser53LsApX4>