BigMachines
Ruby gem for the undocumented BigMachines SOAP API
Implemented Operations
- Security API - login, logout, getUserInfo, setSessionCurrency
- Commerce API - getTransaction, updateTransaction (partial)
Services Not Implemented
- Configuration, Parts, Data Tables, Users, Groups, Exchange Rates
Installation
Add this line to your application's Gemfile:
gem 'big_machines'
And then execute:
$ bundle
Or install it yourself as:
$ gem install big_machines
Usage
Create Client
client = BigMachines::Client.new('subdomain')
# Specify process name
client = BigMachines::Client.new('subdomain', process_name: 'quotes_process')
Authenticate
client.login('foo', 'password')
set_session_currency
client.set_session_currency('USD')
# => Hash[:status]
get_user_info
client.get_user_info
# => Hash[:user_info]
Commerce
get_transaction
# Find transaction by id
client.get_transaction(id)
# => BigMachines::Transaction
update_transaction
# Update transaction (quote_process)
client.update_transaction(id, data={notesCMPM_es: "Sample Notes"})
# => Hash[:status]
Attachments
get_attachment
# Retrieve Single File Attachment
client.get_attachment(transaction_id, "uploadTemplate_File")
# => BigMachines::Attachment
upload_attachment
# Upload File Attachment
client.upload_attachment(transaction_id, file, "uploadTemplate_File")
# => {status: true, message: '...'}
delete_attachment
# Delete File Attachement
client.delete_attachment(transaction_id, "uploadTemplate_File")
# => {status: true, message: '...'}
logout
client.logout
Contributing
- Fork it ( http://github.com/TinderBox/big_machines/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request