Class: Credova::Retailer

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

Constant Summary collapse

ENDPOINTS =
{
  lenders: "lenders".freeze,
  stores:  "stores".freeze,
}

Constants included from API

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

Instance Method Summary collapse

Methods included from API

#get_request, #post_file_request, #post_request

Constructor Details

#initialize(client) ⇒ Retailer



13
14
15
# File 'lib/credova/retailer.rb', line 13

def initialize(client)
  @client = client
end

Instance Method Details

#lendersObject



17
18
19
20
21
# File 'lib/credova/retailer.rb', line 17

def lenders
  endpoint = ENDPOINTS[:lenders]

  get_request(endpoint, auth_header(@client.access_token))
end

#storesObject



23
24
25
26
27
# File 'lib/credova/retailer.rb', line 23

def stores
  endpoint = ENDPOINTS[:stores]

  get_request(endpoint, auth_header(@client.access_token))
end