Trendsic Platform Service

<back to all web services

BusinessCardTypeRequest

Requires Authentication
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/BusinessCardType/{BusinessCardTypeId}
GET,POST,PUT,DELETE,OPTIONS/v1/BusinessCardType
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class BusinessCardType implements IConvertible
{
    int? BusinessCardTypeId;
    String? Name;
    String? Description;
    bool? IsBack;

    BusinessCardType({this.BusinessCardTypeId,this.Name,this.Description,this.IsBack});
    BusinessCardType.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        BusinessCardTypeId = json['BusinessCardTypeId'];
        Name = json['Name'];
        Description = json['Description'];
        IsBack = json['IsBack'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'BusinessCardTypeId': BusinessCardTypeId,
        'Name': Name,
        'Description': Description,
        'IsBack': IsBack
    };

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

class BusinessCardTypeResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<BusinessCardType>? BusinessCardType = [];

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

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

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

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

class BusinessCardTypeRequest implements IConvertible
{
    List<BusinessCardType>? BusinessCardType = [];

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'BusinessCardType': TypeInfo(TypeOf.Class, create:() => BusinessCardType()),
    'BusinessCardTypeResponse': TypeInfo(TypeOf.Class, create:() => BusinessCardTypeResponse()),
    'List<BusinessCardType>': TypeInfo(TypeOf.Class, create:() => <BusinessCardType>[]),
    'BusinessCardTypeRequest': TypeInfo(TypeOf.Class, create:() => BusinessCardTypeRequest()),
});

Dart BusinessCardTypeRequest DTOs

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

HTTP + JSV

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

POST /v1/BusinessCardType/{BusinessCardTypeId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	BusinessCardType: 
	[
		{
			BusinessCardTypeId: 0,
			Name: String,
			Description: String,
			IsBack: False
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	BusinessCardType: 
	[
		{
			BusinessCardTypeId: 0,
			Name: String,
			Description: String,
			IsBack: False
		}
	]
}