Class: Greensky::DocumentDownloader

Inherits:
RestClient::Request
  • Object
show all
Defined in:
lib/greensky/document_downloader.rb

Instance Method Summary collapse

Constructor Details

#initialize(config, application) ⇒ DocumentDownloader

Returns a new instance of DocumentDownloader.



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/greensky/document_downloader.rb', line 3

def initialize(config, application)
  params = {
    x: application.applicationId,
    q: application.token,
    clientip: config.outbound_ip,
    channel: config.channel
  }

  super({
    method:   :post,
    url:      "#{config.endpoint}/ViewDoc",
    payload:  params,
    user:     config.username,
    password: config.password
  })
end