Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 1.86 KB

README.md

File metadata and controls

59 lines (43 loc) · 1.86 KB

Ruxero (Xero API Ruby Client) Project status

Goals for this project

  • Provide a Rails 3 like syntax for querying records

    Ruxero::Invoice.find('abc123-abc123-abc123-abc123')
    Ruxero::Contact.where(:status => 'ACTIVE').all
    Ruxero::Contact.where(:status => 'ACTIVE').order('Name').first
    Ruxero::Contact.where(:status => 'ACTIVE').order('Name').last
  • Provide a Rails 3 like syntax for creating records

    Ruxero::Contact.new(:name => 'Joe Somebody')
    
    Ruxero::Contact.create(:name => 'Joe Somebody')
    
    record = Ruxero::Contact.new
    record.name = 'Joe Somebody'
    record.save
  • Provide a Rails 3 like syntax for updating records

    record = Ruxero::Contact.find('abc123-abc123-abc123-abc123')
    record.update_attributes(:name => 'Joe Somebody')
    
    record = Ruxero::Contact.find('abc123-abc123-abc123-abc123')
    record.name = 'Joe Somebody'
    record.save
  • Provide an easy configuration interface

    Ruxero.configure do |config|
      config.application = Ruxero::PrivateApplication
      config.oauth_consumer_key = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCD'
      config.oauth_consumer_secret = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCD'
      config.private_key_path = Rails.root.join('config/xero/privatekey.pem')
      # OR
      config.private_key = '<private-key>' 
    end
    
    Ruxero.configuration.oauth_consumer_key = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCD'
  • Provide thorough code documentation using SDoc

  • Provide clear usage examples through a detailed test suite