Class: PensioAPI::FundingList

Inherits:
Object
  • Object
show all
Defined in:
lib/pensio_api/funding_list.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(funding_list_body) ⇒ FundingList

Returns a new instance of FundingList.



15
16
17
18
19
20
21
22
23
24
# File 'lib/pensio_api/funding_list.rb', line 15

def initialize(funding_list_body)
  @raw = funding_list_body

  @filename = @raw['Filename']
  @amount = @raw['Amount']
  @acquirer = @raw['Acquirer']
  @funding_date = Date.parse(@raw['FundingDate'])
  @created_at = Date.parse(@raw['CreatedDate'])
  @download_link = @raw['DownloadLink'].strip
end

Instance Attribute Details

#acquirerObject (readonly)

Returns the value of attribute acquirer.



5
6
7
# File 'lib/pensio_api/funding_list.rb', line 5

def acquirer
  @acquirer
end

#amountObject (readonly)

Returns the value of attribute amount.



4
5
6
# File 'lib/pensio_api/funding_list.rb', line 4

def amount
  @amount
end

#created_atObject (readonly)

Returns the value of attribute created_at.



7
8
9
# File 'lib/pensio_api/funding_list.rb', line 7

def created_at
  @created_at
end

Returns the value of attribute download_link.



8
9
10
# File 'lib/pensio_api/funding_list.rb', line 8

def download_link
  @download_link
end

#filenameObject (readonly)

Returns the value of attribute filename.



3
4
5
# File 'lib/pensio_api/funding_list.rb', line 3

def filename
  @filename
end

#funding_dateObject (readonly)

Returns the value of attribute funding_date.



6
7
8
# File 'lib/pensio_api/funding_list.rb', line 6

def funding_date
  @funding_date
end

Class Method Details

.all(options = {}) ⇒ Object



10
11
12
13
# File 'lib/pensio_api/funding_list.rb', line 10

def self.all(options={})
  request = Request.new('/merchant/API/fundingList', options)
  Responses::FundingList.new(request)
end

Instance Method Details

#download(options = {}) ⇒ Object



26
27
28
# File 'lib/pensio_api/funding_list.rb', line 26

def download(options={})
  @result ||= FundingListRequest.new(@download_link, options).result
end