"use strict";
export class ResponseBase {
/** @param {{Status?:boolean,Message?:string,Errors?:{ [index:string]: string[]; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
Status;
/** @type {string} */
Message;
/** @type {{ [index:string]: string[]; }} */
Errors;
}
export class InitialisePaymentResponse extends ResponseBase {
/** @param {{TransactionId?:string,Signature?:string,Url?:string,Status?:boolean,Message?:string,Errors?:{ [index:string]: string[]; }}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
TransactionId;
/** @type {string} */
Signature;
/** @type {string} */
Url;
}
/** @typedef {number} */
export var PaymentTypeEnum;
(function (PaymentTypeEnum) {
PaymentTypeEnum[PaymentTypeEnum["OneTime"] = 1] = "OneTime"
PaymentTypeEnum[PaymentTypeEnum["Recurring"] = 2] = "Recurring"
})(PaymentTypeEnum || (PaymentTypeEnum = {}));
/** @typedef {number} */
export var FrequencyEnum;
(function (FrequencyEnum) {
FrequencyEnum[FrequencyEnum["Daily"] = 1] = "Daily"
FrequencyEnum[FrequencyEnum["Weekly"] = 2] = "Weekly"
FrequencyEnum[FrequencyEnum["Monthly"] = 3] = "Monthly"
FrequencyEnum[FrequencyEnum["Quarterly"] = 4] = "Quarterly"
FrequencyEnum[FrequencyEnum["Biannually"] = 5] = "Biannually"
FrequencyEnum[FrequencyEnum["Annually"] = 6] = "Annually"
})(FrequencyEnum || (FrequencyEnum = {}));
export class InitialisePaymentRequest {
/** @param {{PaymentType?:PaymentTypeEnum,Uuid?:string,ReferenceNumber?:string,Amount?:number,Currency?:string,ItemName?:string,ItemDescription?:string,BillingDate?:string,Frequency?:FrequencyEnum,Cycles?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {PaymentTypeEnum} */
PaymentType;
/** @type {string} */
Uuid;
/** @type {string} */
ReferenceNumber;
/** @type {number} */
Amount;
/** @type {string} */
Currency;
/** @type {string} */
ItemName;
/** @type {string} */
ItemDescription;
/** @type {string} */
BillingDate;
/** @type {FrequencyEnum} */
Frequency;
/** @type {number} */
Cycles;
}
JavaScript InitialisePaymentRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /xml/reply/InitialisePaymentRequest HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<InitialisePaymentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel">
<Amount>0</Amount>
<BillingDate>0001-01-01T00:00:00</BillingDate>
<CampaignActionsRequestsId>0</CampaignActionsRequestsId>
<Currency>String</Currency>
<Cycles>0</Cycles>
<Frequency>Daily</Frequency>
<ItemDescription>String</ItemDescription>
<ItemName>String</ItemName>
<PaymentType>OneTime</PaymentType>
<ReferenceNumber>String</ReferenceNumber>
<Uuid>00000000-0000-0000-0000-000000000000</Uuid>
</InitialisePaymentRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<InitialisePaymentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel">
<Errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringArrayOfstringty7Ep6D1>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>
<d2p1:string>String</d2p1:string>
</d2p1:Value>
</d2p1:KeyValueOfstringArrayOfstringty7Ep6D1>
</Errors>
<Message>String</Message>
<Status>false</Status>
<Signature>String</Signature>
<TransactionId>String</TransactionId>
<Url>String</Url>
</InitialisePaymentResponse>