infusionsoft-javascript-api
Version:
Javscript wrapper for the Infusionsoft XML-RPC API
100 lines (78 loc) • 4.77 kB
JavaScript
module.exports = IInvoiceService = require('typedef')
// THIS CODE WAS GENERATED BY AN AUTOMATED TOOL. Editing it is not recommended.
// For more information, see http://github.com/bvalosek/grunt-infusionsoft
// Generated on Wed Jan 08 2014 12:43:55 GMT-0600 (CST)
// InvoiceService allows you to manage eCommerce transactions.
.interface('IInvoiceService') .define({
// Creates a one-time order with no added line items
__xmlrpc__createBlankOrder: function(contactId, description,
orderDate, leadAffiliateId, saleAffiliateId) {},
// Adds a line item to an order. This used to add a Product to an order as
// well as any other sort of charge/discount.
__xmlrpc__addOrderItem: function(invoiceId, productId, type,
price, quantity, description, notes) {},
// This will cause a credit card to be charged for the amount currently due on
// an invoice
__xmlrpc__chargeInvoice: function(invoiceId, notes,
creditCardId, merchantAccountId, bypassCommissions) {},
// Deletes the specified subscription from the database, as well as all
// invoices tied to the subscription
__xmlrpc__deleteSubscription: function(recurringOrderId) {},
// This method is used when you would like to delete an order (not a
// subscription). You pass in the invoice for this particular order, and the
// method handles deleting the invoice as well as the order (Job table) tied
// to the invoice.
__xmlrpc__deleteInvoice: function(invoiceId) {},
// Creates a subscription for a contact. Subscriptions are billing
// automatically by Infusionsoft within the next six hours. If you want to
// bill immediately you will need to utilize the
// InvoiceService.createInvoiceForRecurring and InvoiceService.chargeInvoice
// methods to accomplish this.
__xmlrpc__addRecurringOrder: function(contactId,
allowDuplicate, cProgramId, qty, price, taxable, merchantAccountId,
creditCardId, affiliateId, daysTillCharge) {},
// Modifies the commissions being earned on a particular subscription. This
// does not affect previously generated invoices for this subscription.
__xmlrpc__addRecurringCommissionOverride: function(apiKey,
recurringOrderId, affiliateId, amount, payoutType, description) {},
// This will create an invoice for all charges due on a Subscription. If the
// subscription has three billing cycles that are due, it will create one
// invoice with all three items attached.
__xmlrpc__createInvoiceForRecurring: function(recurringOrderId) {},
// Adds a payment to an invoice without actually processing a charge through a
// merchant. This is useful if you accept cash/check, or handle payments
// outside of Infusionsoft.
__xmlrpc__addManualPayment: function(invoiceId, amt,
paymentDate, paymentType, paymentDescription, bypassCommissions) {},
// Allows you to setup a custom payment plan for an invoice.
__xmlrpc__addPaymentPlan: function(invoiceId, autoCharge,
creditCardId, merchantAccountId, daysBetweenRetry, maxRetry,
initialPmtAmt, initialPmtDate, planStartDate, numPmts, daysBetweenPmts) {},
// Used to determine the outstanding amount owed on a given invoice.
__xmlrpc__calculateAmountOwed: function(invoiceId) {},
// This is used to retrieve all Payment Types currently setup under the Order
// Settings section of Infusionsoft.
__xmlrpc__getAllPaymentOptions: function(apiKey) {},
// Retrieves all payments for a given invoice.
__xmlrpc__getPayments: function(invoiceId) {},
// Finds a credit card on file for a contactId that matches the last four
// digits of the card.
__xmlrpc__locateExistingCard: function(contactId, last4) {},
// Calculates tax, and places it onto the given invoice.
__xmlrpc__recalculateTax: function(invoiceId) {},
// Validates a credit card in one of two ways - the first will validate an
// existing card in the Infusionsoft system by grabbing card data via the
// credit card ID. The second takes card details as a struct and validates it
// without having it already saved.
__xmlrpc__validateCreditCard: function(creditCardId) {},
// Retrieves the shipping options currently setup for the Infusionsoft
// shopping cart.
__xmlrpc__getAllShippingOptions: function(apiKey) {},
// Changes the next bill date on a subscription.
__xmlrpc__updateJobRecurringNextBillDate: function(apiKey,
recurringOrderId, nextBillDate) {},
// Creates a commission on an existing invoice.
__xmlrpc__addOrderCommissionOverride: function(invoiceId,
affiliateId, productId, percentage, amount, payoutType, description,
date) {}
});