Billhighway Cloud API

<back to all web services

Receipt

The following routes are available for this service:
POST/v1.1/receipts/send
POST/v1.2/receipts/send
import 'package:servicestack/servicestack.dart';

class ReceiptSentStatus implements IConvertible
{
    bool? IsSent;

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

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

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

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

class ReceiptResponse implements IConvertible
{
    ReceiptSentStatus? Email;
    ReceiptSentStatus? Sms;

    ReceiptResponse({this.Email,this.Sms});
    ReceiptResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Email': JsonConverters.toJson(Email,'ReceiptSentStatus',context!),
        'Sms': JsonConverters.toJson(Sms,'ReceiptSentStatus',context!)
    };

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

class Receipt extends Receipt implements IReturnLegacyException, IConvertible
{
    Receipt();
    Receipt.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "Receipt";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'devapi.billhighway.com', types: <String, TypeInfo> {
    'ReceiptSentStatus': TypeInfo(TypeOf.Class, create:() => ReceiptSentStatus()),
    'ReceiptResponse': TypeInfo(TypeOf.Class, create:() => ReceiptResponse()),
    'Receipt': TypeInfo(TypeOf.Class, create:() => Receipt()),
});

Dart Receipt 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.1/receipts/send HTTP/1.1 
Host: devapi.billhighway.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	EmailReceiptRequest: 
	{
		From: String,
		Subject: String,
		Message: String,
		To: String
	},
	SmsReceiptRequest: 
	{
		Message: String,
		To: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Email: 
	{
		IsSent: False
	},
	Sms: 
	{
		IsSent: False
	}
}