Module: ZohoInvoice::Configurable
- Included in:
- ZohoInvoice, Client
- Defined in:
- lib/zoho_invoice/configurable.rb
Instance Attribute Summary collapse
-
#apikey ⇒ String
The key used to authenticate the API caller.
-
#authtoken ⇒ String
The permanent authtoken used to authenticate each API request.
-
#client_options ⇒ Hash
Client configuration to pass to Faraday.
-
#scope ⇒ String
The value for this parameter has to be invoiceapi.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#apikey ⇒ String
Returns The key used to authenticate the API caller.
11 12 13 |
# File 'lib/zoho_invoice/configurable.rb', line 11 def apikey @apikey end |
#authtoken ⇒ String
Returns The permanent authtoken used to authenticate each API request.
5 6 7 |
# File 'lib/zoho_invoice/configurable.rb', line 5 def authtoken @authtoken end |
#client_options ⇒ Hash
Returns Client configuration to pass to Faraday.
14 15 16 |
# File 'lib/zoho_invoice/configurable.rb', line 14 def @client_options end |
#scope ⇒ String
Returns The value for this parameter has to be invoiceapi.
8 9 10 |
# File 'lib/zoho_invoice/configurable.rb', line 8 def scope @scope end |
Class Method Details
.keys ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/zoho_invoice/configurable.rb', line 18 def keys @keys ||= [ :authtoken, :scope, :apikey, :client_options ] end |
Instance Method Details
#config_hash ⇒ Object
34 35 36 |
# File 'lib/zoho_invoice/configurable.rb', line 34 def config_hash Hash[ZohoInvoice::Configurable.keys.map{ |key| [key, instance_variable_get(:"@#{key}")] }] end |
#configure {|_self| ... } ⇒ Object
29 30 31 32 |
# File 'lib/zoho_invoice/configurable.rb', line 29 def configure yield self self end |