Class: Credova::Client

Inherits:
Base
  • Object
show all
Includes:
API
Defined in:
lib/credova/client.rb

Constant Summary

Constants included from API

API::API_VERSION, API::DEVELOPMENT_URL, API::PRODUCTION_URL, API::USER_AGENT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from API

#get_request, #post_request

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



13
14
15
16
17
18
# File 'lib/credova/client.rb', line 13

def initialize(options = {})
  requires!(options, :username, :password)
  @options = options

  authenticate!
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



11
12
13
# File 'lib/credova/client.rb', line 11

def access_token
  @access_token
end

Instance Method Details

#applicationObject



20
21
22
# File 'lib/credova/client.rb', line 20

def application
  @application ||= Credova::Application.new(self)
end

#fflObject



24
25
26
# File 'lib/credova/client.rb', line 24

def ffl
  @ffl ||= Credova::FFL.new(self)
end

#retailerObject



28
29
30
# File 'lib/credova/client.rb', line 28

def retailer
  @retailer ||= Credova::Retailer.new(self)
end