Sha256: 5ea700b738d09bfce93430cf0e578a0a6b508e75679a670e0ccd603ca0f22b19

Contents?: true

Size: 1.42 KB

Versions: 31

Compression:

Stored size: 1.42 KB

Contents

require 'xeroizer/record/application_helper'

module Xeroizer
  class GenericApplication
    
    include Http
    extend Record::ApplicationHelper
    
    attr_reader :client, :xero_url, :logger, :rate_limit_sleep, :rate_limit_max_attempts
    
    extend Forwardable
    def_delegators :client, :access_token
    
    record :Account
    record :BrandingTheme
    record :Contact
    record :CreditNote
    record :Currency
    record :Employee
    record :Invoice
    record :Item
    record :Journal
    record :ManualJournal
    record :Organisation
    record :Payment
    record :TaxRate
    record :TrackingCategory
    record :BankTransaction

    report :AgedPayablesByContact
    report :AgedReceivablesByContact
    report :BalanceSheet
    report :BankStatement
    report :BankSummary
    report :BudgetSummary
    report :ExecutiveSummary
    report :ProfitAndLoss
    report :TrialBalance
    
    public
    
      # Never used directly. Use sub-classes instead.
      # @see PublicApplication
      # @see PrivateApplication
      # @see PartnerApplication
      def initialize(consumer_key, consumer_secret, options = {})
        @xero_url = options[:xero_url] || "https://api.xero.com/api.xro/2.0"
        @rate_limit_sleep = options[:rate_limit_sleep] || false
        @rate_limit_max_attempts = options[:rate_limit_max_attempts] || 5
        @client   = OAuth.new(consumer_key, consumer_secret, options)
      end
          
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
xeroizer-float-2.15.5.2 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.5.1 lib/xeroizer/generic_application.rb
xeroizer-2.15.5 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.16 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.15 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.14 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.13 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.12 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.11 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.10 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.9 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.8 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.7 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.6 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.5 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.4 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.3 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.2 lib/xeroizer/generic_application.rb
xeroizer-float-2.15.3.1 lib/xeroizer/generic_application.rb
xeroizer-2.15.3 lib/xeroizer/generic_application.rb