Class: RootInsurance::Client

Inherits:
Object
  • Object
show all
Includes:
Api::Application, Api::Call, Api::Claim, Api::Payment, Api::Policy, Api::Policyholder, Api::Quote
Defined in:
lib/root_insurance/client.rb

Instance Method Summary collapse

Methods included from Api::Payment

#create_payment_method, #link_payment_method

Methods included from Api::Call

#get_call, #list_call_events, #list_calls

Methods included from Api::Claim

#create_claim_attachment, #get_claim, #link_policy_to_claim, #link_policyholder_to_claim, #list_claim_events, #list_claims, #open_claim, #update_claim

Methods included from Api::Policy

#add_policy_beneficiary, #cancel_policy, #get_policy, #issue_policy, #list_policies, #list_policy_beneficiaries, #list_policy_events, #update_policy, #update_policy_billing_amount

Methods included from Api::Application

#create_application

Methods included from Api::Policyholder

#create_policyholder, #get_policyholder, #list_policyholder_events, #list_policyholders, #update_policyholder

Methods included from Api::Quote

#create_quote, #list_gadget_models

Constructor Details

#initialize(app_id, app_secret, env = nil) ⇒ Client

Initialize a new client

Parameters:

  • app_id (String)

    The app’s id

  • app_secret (String)

    The app’s secret. Currently it’s a blank string

  • env (Symbol) (defaults to: nil)

    The environment to use. Either :production or :sandbox. The default is :sandbox



25
26
27
28
29
# File 'lib/root_insurance/client.rb', line 25

def initialize(app_id, app_secret, env=nil)
  @app_id = app_id
  @app_secret = app_secret
  @env = env || :sandbox
end