infusionsoft
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -167,4 +167,9 @@ var xmlrpc = require('xmlrpc'); | ||
this.methodCaller('APIEmailService.sendEmail', ca, callback); | ||
} | ||
}; | ||
iSDK.prototype.optStatus = function (email, callback) { | ||
var ca = [this.apiKey, email]; | ||
this.methodCaller('APIEmailService.getOptStatus', ca, callback); | ||
}; | ||
iSDK.prototype.validateCard = function (card, callback) { | ||
@@ -171,0 +176,0 @@ var t = typeof(card); |
{ | ||
"name": "infusionsoft", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "InfusionSoft node.js SDK", | ||
@@ -5,0 +5,0 @@ "contributors": [{ "name": "Patrick Lodder", "email": "plodder@intellibiz.org" }], |
infusionsoft | ||
============ | ||
InfusionSoft node.js SDK | ||
InfusionSoft node.js SDK. | ||
[![npm](https://nodei.co/npm/infusionsoft.png?downloads=true)](https://npmjs.org/package/infusionsoft) | ||
[![Travis](https://travis-ci.org/patricklodder/infusionsoft.png)](https://travis-ci.org/patricklodder/infusionsoft) | ||
### Installation ### | ||
```bash | ||
npm install infusionsoft | ||
``` | ||
### Usage ### | ||
```javascript | ||
var iSDK = require('infusionsoft'); | ||
var client = new iSDK('app_name', 'api_key); | ||
``` | ||
### Implemented methods ### | ||
*see [help.infusionsoft.com](http://help.infusionsoft.com/api-docs) for more information* | ||
**APIEmailService.getEmailTemplate**: ```client.getEmailTemplate(templateId, callback)``` | ||
**APIEmailService.getOptStatus**: ```client.optStatus(email, callback)``` | ||
**APIEmailService.optIn**: ```client.optIn(email, reason, callback)``` | ||
**APIEmailService.optOut**: ```client.optOut(email, reason, callback)``` | ||
**APIEmailService.sendEmail**: ```client.sendEmail(contactList, fromAddr, toAddr, ccAddr, bccAddr, contentType, subject, html, text, templateId, callback)``` | ||
**ContactService.add**: ```client.addCon(contactData, callback)``` | ||
**ContactService.addToCampaign**: ```client.campAssign(contactId, campaignId, callback)``` | ||
**ContactService.addToGroup**: ```client.grpAssign(contactId, groupId, callback)``` | ||
**ContactService.addWithDupCheck**: ```client.addWithDupCheck(data, dupCheckType, callback)``` | ||
**ContactService.findByEmail**: ```client.findByEmail(email, fMap, callback)``` | ||
**ContactService.load**: ```client.findCon(contactId, fieldList, callback)``` | ||
**ContactService.removeFromGroup**: ```client.grpRemove(contactId, groupId, callback)``` | ||
**ContactService.runActionSequence**: ```client.runAS(contactId, seqId, callback)``` | ||
**ContactService.update**: ```client.updateCon(contactId, contactData, callback)``` | ||
**DataService.add**: ```client.dsAdd(tableName, data, callback)``` | ||
**DataService.delete**: ```client.dsDelete(tableName, id, callback)``` | ||
**DataService.echo**: ```client.appEcho(text, callback)``` | ||
**DataService.findByField**: ```client.dsFind(tableName, limit, page, field, value, fieldMap, callback)``` | ||
**DataService.getAppSetting**: ```client.dsGetSetting(module, setting, callback)``` | ||
**DataService.load**: ```client.dsLoad(tableName, id, callback)``` | ||
**DataService.update**: ```client.dsUpdate(tableName, id, data, callback)``` | ||
**DataService.query**: ```client.dsQuery(tableName, limit, page, query, fieldMap, callback)``` | ||
**InvoiceService.addManualPayment**: ```client.addManualPayment(invoiceId, amount, paymentDate, paymentType, paymentDescription, bypassCommissions, callback)``` | ||
**InvoiceService.addOrderItem**: ```client.addOrderItem(invoiceId, productId, type, price, quantity, description, notes, callback)``` | ||
**InvoiceService.calculateAmountOwed**: ```client.calculateAmountOwed(invoiceId, callback)``` | ||
**InvoiceService.createBlankOrder**: ```client.createBlankOrder(contactId, description, date, leadAffiliateId, saleAffiliateId, callback)``` | ||
**InvoiceService.createInvoiceForRecurring**: ```client.createInvoiceForRecurring(recurringOrderId, callback)``` | ||
**InvoiceService.locateExistingCard**: ```client.locateCard(contactId, lastFour, callback)``` | ||
**InvoiceService.validateCreditCard**: ```client.validateCard(card, callback)``` | ||
**OrderService.placeOrder**: ```client.placeOrder(contactId, creditCardId, payPlanId, productIds, subscriptionIds, processSpecials, promocodes, callback)``` |
@@ -177,3 +177,3 @@ var vows = require('vows'); | ||
topic: function (isdk) { | ||
isdk.validateCard(11,this.callback); | ||
isdk.validateCard(11, this.callback); | ||
}, | ||
@@ -184,3 +184,3 @@ "must match xml": assertXml('validateCard-byId_call') | ||
topic: function (isdk) { | ||
isdk.validateCard({CardNumber: '7357', ContactId: 1, ExpirationMonth: '13', ExpirationYear: '1991', CVV2: '123', CardType: 'MasterCard'},this.callback); | ||
isdk.validateCard({CardNumber: '7357', ContactId: 1, ExpirationMonth: '13', ExpirationYear: '1991', CVV2: '123', CardType: 'MasterCard'}, this.callback); | ||
}, | ||
@@ -191,3 +191,3 @@ "must match xml": assertXml('validateCard_call') | ||
topic: function (isdk) { | ||
isdk.locateCard(1, '7357',this.callback); | ||
isdk.locateCard(1, '7357', this.callback); | ||
}, | ||
@@ -207,2 +207,8 @@ "must match xml": assertXml('locateCard_call') | ||
"must match xml": assertXml('sendEmail_call') | ||
}, | ||
"optStatus": { | ||
topic: function (isdk) { | ||
isdk.optStatus('test1@email.com', this.callback); | ||
}, | ||
"must match xml": assertXml('optStatus_call') | ||
} | ||
@@ -219,2 +225,1 @@ } | ||
} | ||
30876
39
384
93