Trendsic Platform Service

<back to all web services

BusinessCardCreditRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/BusinessCard/Credit/{AgentId}/{CardQuantity}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class BusinessCardCreditResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    bool? Success;

    BusinessCardCreditResponse({this.ResponseStatus,this.Success});
    BusinessCardCreditResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class BusinessCardCreditRequest implements IConvertible
{
    int? AgentId;
    int? CardQuantity;

    BusinessCardCreditRequest({this.AgentId,this.CardQuantity});
    BusinessCardCreditRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'BusinessCardCreditResponse': TypeInfo(TypeOf.Class, create:() => BusinessCardCreditResponse()),
    'BusinessCardCreditRequest': TypeInfo(TypeOf.Class, create:() => BusinessCardCreditRequest()),
});

Dart BusinessCardCreditRequest DTOs

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

HTTP + CSV

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

POST /v1/BusinessCard/Credit/{AgentId}/{CardQuantity} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"AgentId":0,"CardQuantity":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Success":false}