Class: Xeroizer::GenericApplication
- Inherits:
-
Object
- Object
- Xeroizer::GenericApplication
- Extended by:
- Forwardable, Record::ApplicationHelper
- Includes:
- Http
- Defined in:
- lib/xeroizer/generic_application.rb
Direct Known Subclasses
Constant Summary
Constants included from Http
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#rate_limit_max_attempts ⇒ Object
readonly
Returns the value of attribute rate_limit_max_attempts.
-
#rate_limit_sleep ⇒ Object
readonly
Returns the value of attribute rate_limit_sleep.
-
#xero_url ⇒ Object
readonly
Returns the value of attribute xero_url.
Instance Method Summary collapse
-
#initialize(consumer_key, consumer_secret, options = {}) ⇒ GenericApplication
constructor
Never used directly.
Methods included from Record::ApplicationHelper
Methods included from Http
#http_get, #http_post, #http_put
Constructor Details
#initialize(consumer_key, consumer_secret, options = {}) ⇒ GenericApplication
Never used directly. Use sub-classes instead.
46 47 48 49 50 51 |
# File 'lib/xeroizer/generic_application.rb', line 46 def initialize(consumer_key, consumer_secret, = {}) @xero_url = [:xero_url] || "https://api.xero.com/api.xro/2.0" @rate_limit_sleep = [:rate_limit_sleep] || false @rate_limit_max_attempts = [:rate_limit_max_attempts] || 5 @client = OAuth.new(consumer_key, consumer_secret, ) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
9 10 11 |
# File 'lib/xeroizer/generic_application.rb', line 9 def client @client end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
9 10 11 |
# File 'lib/xeroizer/generic_application.rb', line 9 def logger @logger end |
#rate_limit_max_attempts ⇒ Object (readonly)
Returns the value of attribute rate_limit_max_attempts.
9 10 11 |
# File 'lib/xeroizer/generic_application.rb', line 9 def rate_limit_max_attempts @rate_limit_max_attempts end |
#rate_limit_sleep ⇒ Object (readonly)
Returns the value of attribute rate_limit_sleep.
9 10 11 |
# File 'lib/xeroizer/generic_application.rb', line 9 def rate_limit_sleep @rate_limit_sleep end |
#xero_url ⇒ Object (readonly)
Returns the value of attribute xero_url.
9 10 11 |
# File 'lib/xeroizer/generic_application.rb', line 9 def xero_url @xero_url end |