efun.id.api

<back to all web services

LogRechargeRequest

Requires Authentication
The following routes are available for this service:
GET/api/v1/logs/recharge
import 'package:servicestack/servicestack.dart';

class PagingRequest implements IConvertible
{
    int? page;
    int? limit;
    int? offSet;

    PagingRequest({this.page,this.limit,this.offSet});
    PagingRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'page': page,
        'limit': limit,
        'offSet': offSet
    };

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

class LogRechargeRequest extends PagingRequest implements IConvertible
{
    String? type;
    int? price;
    DateTime? fromDate;
    DateTime? toDate;

    LogRechargeRequest({this.type,this.price,this.fromDate,this.toDate});
    LogRechargeRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        type = json['type'];
        price = json['price'];
        fromDate = JsonConverters.fromJson(json['fromDate'],'DateTime',context!);
        toDate = JsonConverters.fromJson(json['toDate'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'type': type,
        'price': price,
        'fromDate': JsonConverters.toJson(fromDate,'DateTime',context!),
        'toDate': JsonConverters.toJson(toDate,'DateTime',context!)
    });

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

class Pagination implements IConvertible
{
    int? total;
    int? pages;
    int? offset;
    int? limit;
    int? currentPage;

    Pagination({this.total,this.pages,this.offset,this.limit,this.currentPage});
    Pagination.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        total = json['total'];
        pages = json['pages'];
        offset = json['offset'];
        limit = json['limit'];
        currentPage = json['currentPage'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'total': total,
        'pages': pages,
        'offset': offset,
        'limit': limit,
        'currentPage': currentPage
    };

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

class PageResponse<dynamic> implements IResponseRequest, IConvertible
{
    int? code;
    String? message;
    List<dynamic>? data;
    Pagination? pagination;

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

    fromMap(Map<String, dynamic> json) {
        code = json['code'];
        message = json['message'];
        data = JsonConverters.fromJson(json['data'],'List<${runtimeGenericTypeDefs(this,[0]).join(",")}>',context!);
        pagination = JsonConverters.fromJson(json['pagination'],'Pagination',context!);
        return this;
    }

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

    getTypeName() => "PageResponse<$Object>";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'efun_id_api_sandbox.efun.vn', types: <String, TypeInfo> {
    'PagingRequest': TypeInfo(TypeOf.Class, create:() => PagingRequest()),
    'LogRechargeRequest': TypeInfo(TypeOf.Class, create:() => LogRechargeRequest()),
    'Pagination': TypeInfo(TypeOf.Class, create:() => Pagination()),
    'PageResponse<dynamic>': TypeInfo(TypeOf.Class, create:() => PageResponse<dynamic>()),
});

Dart LogRechargeRequest DTOs

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

HTTP + OTHER

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

GET /api/v1/logs/recharge HTTP/1.1 
Host: efun-id-api-sandbox.efun.vn 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"code":0,"message":"String","data":[{}],"pagination":null}