UNPKG

cybersource-api

Version:

Module for connect with CyberSource by soap methods.

29 lines (27 loc) 827 B
const PurchaseTotals = require("../../model/PurchaseTotals"); module.exports = class SubscriptionRequest { constructor(merchantReferenceCode,billTo,card){ this.merchantReferenceCode = merchantReferenceCode; this.billTo = billTo; this.card = card; this.recurringSubscriptionInfo = { frequency:'on-demand' }; this.paySubscriptionCreateService = { attributes:{ run:true } } } getJSON(){ return { merchantID:this.merchantID, merchantReferenceCode:this.merchantReferenceCode, billTo:this.billTo.getJSON(), purchaseTotals:this.purchaseTotals.getOnlyCurrencyJSON(), card:this.card.getJSON(), recurringSubscriptionInfo: this.recurringSubscriptionInfo, paySubscriptionCreateService: this.paySubscriptionCreateService } } }