Method: Genba::Client#initialize
- Defined in:
- lib/genba/client.rb
#initialize(resource:, account_id:, cert:, key:, sandbox: false, options: {}) ⇒ Client
Desribe the behaviour of the method
Attributes
-
config- Genba API credential attribute
Options
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/genba/client.rb', line 22 def initialize(resource:, account_id:, cert:, key:, sandbox: false, options: {}) @api_url = sandbox ? SANDBOX_API_URL : PRODUCTION_API_URL @resource = resource @account_id = account_id @cert = cert @key = key @tenant = 'aad.genbadigital.io' @authority_url = "https://login.microsoftonline.com/#{@tenant}" @client_id = "https://aad-snd.genbadigital.io/#{@account_id}" @open_timeout = [:open_timeout] || 15 @read_timeout = [:read_timeout] || 60 @max_retry = [:max_retry] || 0 @retry_delay = [:retry_delay] || 2 end |