GithubHelp home page GithubHelp logo

todddickerson / infusionsoft Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nateleavitt/infusionsoft

0.0 1.0 1.0 310 KB

Ruby Gem for the Infusionsoft API

License: MIT License

Ruby 100.00%

infusionsoft's Introduction

The Infusionsoft Ruby Gem

A Ruby wrapper for the Infusionsoft API

update notes

  • v1.1.8 - Added a default user-agent in the headers. Also, give the ability to set your own user-agent in the config block.
  • v1.1.5 - Added a custom logger option. This will allow you to track all api calls/results in a separate log file. Defaults to $stdout if none is specified. To add logger specify api_logger in your config block.
gem install infusionsoft

http://rubydoc.info/gems/infusionsoft/frames

  1. Rails 2.3 - add config.gem 'infusionsoft' Rails 3 - add 'infusionsoft' to your Gemfile
  2. Then create an initializer in config\initializers called infusionsoft.rb and the following

# Added to your config\initializers file
Infusionsoft.configure do |config|
  config.api_url = 'YOUR_INFUSIONSOFT_URL' # example infused.infusionsoft.com
  config.api_key = 'YOUR_INFUSIONSOFT_API_KEY'
  config.api_logger = Logger.new("#{Rails.root}/log/infusionsoft_api.log") # optional logger file
end
# Get a users first and last name using the DataService
Infusionsoft.data_load('Contact', contact_id, [:FirstName, :LastName])

# Get a list of custom fields
Infusionsoft.data_find_by_field('DataFormField', 100, 0, 'FormId', -1, ['Name'])
# Note, when updating custom fields they are case sensisitve and need to be prefaced with a '_'

# Update a contact with specific field values
Infusionsoft.contact_update(contact_id, { :FirstName => 'first_name', :Email => '[email protected]' })

# Add a new Contact
Infusionsoft.contact_add({:FirstName => 'first_name', :LastName => 'last_name', :Email => '[email protected]'})

# Create a blank Invoice
invoice_id = Infusionsoft.invoice_create_blank_order(contact_id, description, Date.today, lead_affiliate_id, sale_affiliate_id)

# Then add item to invoice
Infusionsoft.invoice_add_order_item(invoice_id, product_id, product_type, amount, quantity, description_here, notes)

# Then charge the invoice
Infusionsoft.invoice_charge_invoice(invoice_id, notes, credit_card_id, merchange_id, bypass_commissions)

In the spirit of free software, everyone is encouraged to help improve this project.

Here are some ways you can contribute:

  • by using alpha, beta, and prerelease versions
  • by reporting bugs
  • by suggesting new features
  • by writing or editing documentation
  • by writing specifications
  • by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
  • by refactoring code
  • by closing issues
  • by reviewing patches

We use the GitHub issue tracker to track bugs and features.

This library aims to support the following Ruby implementations:

If something doesn't work on one of these interpreters, it should be considered a bug.

This library may inadvertently work (or seem to work) on other Ruby implementations, however support will only be provided for the versions listed above.

If you would like this library to support another Ruby version, you may volunteer to be a maintainer. Being a maintainer entails making sure all tests run and pass on that implementation. When something breaks on your implementation, you will be personally responsible for providing patches in a timely fashion. If critical issues for a particular implementation exist at the time of a major release, support for that Ruby version may be dropped.

  • Need to fully implement testing
  • Need to add a history log for additional contributers

Copyright (c) 2014 Nathan Leavitt

See LICENSE for details.

infusionsoft's People

Contributors

bboughton avatar denniskuczynski avatar dfried avatar inportland99 avatar jaredjackson avatar johnhampton avatar mattmerrill avatar munen avatar nateleavitt avatar petedickson avatar scottwater avatar todddickerson avatar

Watchers

 avatar

Forkers

etison

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.