Class: XeroGateway::PrivateApp
- Defined in:
- lib/xero_gateway/private_app.rb
Constant Summary
Constants included from Http
Http::OPEN_TIMEOUT, Http::READ_TIMEOUT, Http::ROOT_CA_FILE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
-
#initialize(consumer_key, consumer_secret, path_to_private_key, options = {}) ⇒ PrivateApp
constructor
The consumer key and secret here correspond to those provided to you by Xero inside the API Previewer.
Methods inherited from Gateway
#build_contact, #build_credit_note, #build_invoice, #create_bank_transaction, #create_contact, #create_credit_note, #create_credit_notes, #create_invoice, #create_invoices, #create_manual_journal, #create_payment, #get_accounts, #get_accounts_list, #get_bank_transaction, #get_bank_transactions, #get_contact_by_id, #get_contact_by_number, #get_contacts, #get_credit_note, #get_credit_notes, #get_currencies, #get_invoice, #get_invoices, #get_manual_journal, #get_manual_journals, #get_organisation, #get_payments, #get_report, #get_tax_rates, #get_tracking_categories, #update_bank_transaction, #update_contact, #update_contacts, #update_invoice, #update_manual_journal
Methods included from Dates
Methods included from Http
#http_get, #http_post, #http_put, #log
Constructor Details
#initialize(consumer_key, consumer_secret, path_to_private_key, options = {}) ⇒ PrivateApp
The consumer key and secret here correspond to those provided to you by Xero inside the API Previewer.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/xero_gateway/private_app.rb', line 6 def initialize(consumer_key, consumer_secret, path_to_private_key, = {}) .merge!( :signature_method => 'RSA-SHA1', :private_key_file => path_to_private_key ) @xero_url = [:xero_url] || "https://api.xero.com/api.xro/2.0" @client = OAuth.new(consumer_key, consumer_secret, ) @client.(consumer_key, consumer_secret) end |