Class: Custplace::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/custplace/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account_id, access_token, options = {}) ⇒ Custplace::Client

Public: Initialize a new Custplace::Client

Parameters:

  • account_id (String)

    the account id found in custplace account url

  • access_token (String)

    the access token for the account found in the integration page on Custplace

  • options (Hash) (defaults to: {})

    the options to initialize the client with



16
17
18
19
# File 'lib/custplace/client.rb', line 16

def initialize(, access_token, options = {})
  @account_id = .to_s
  @access_token = access_token
end

Instance Attribute Details

#access_tokenObject (readonly)

Returns the value of attribute access_token.



8
9
10
# File 'lib/custplace/client.rb', line 8

def access_token
  @access_token
end

#account_idObject (readonly)

Returns the value of attribute account_id.



8
9
10
# File 'lib/custplace/client.rb', line 8

def 
  @account_id
end

Instance Method Details

#answersObject



29
30
31
# File 'lib/custplace/client.rb', line 29

def answers
  @answers ||= Custplace::Answers.new(self)
end

#reviewsObject



25
26
27
# File 'lib/custplace/client.rb', line 25

def reviews
  @reviews ||= Custplace::Reviews.new(self)
end

#storesObject



21
22
23
# File 'lib/custplace/client.rb', line 21

def stores
  @stores ||= Custplace::Stores.new(self)
end