Class: GoCardlessPro::Resources::Export

Inherits:
Object
  • Object
show all
Defined in:
lib/gocardless_pro/resources/export.rb

Overview

File-based exports of data

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, response = nil) ⇒ Export

Initialize a export resource instance

Parameters:

  • object (Hash)

    an object returned from the API



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/gocardless_pro/resources/export.rb', line 24

def initialize(object, response = nil)
  @object = object

  @created_at = object['created_at']
  @currency = object['currency']
  @download_url = object['download_url']
  @error_message = object['error_message']
  @export_type = object['export_type']
  @id = object['id']
  @response = response
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



15
16
17
# File 'lib/gocardless_pro/resources/export.rb', line 15

def created_at
  @created_at
end

#currencyObject (readonly)

Returns the value of attribute currency.



16
17
18
# File 'lib/gocardless_pro/resources/export.rb', line 16

def currency
  @currency
end

#download_urlObject (readonly)

Returns the value of attribute download_url.



17
18
19
# File 'lib/gocardless_pro/resources/export.rb', line 17

def download_url
  @download_url
end

#error_messageObject (readonly)

Returns the value of attribute error_message.



18
19
20
# File 'lib/gocardless_pro/resources/export.rb', line 18

def error_message
  @error_message
end

#export_typeObject (readonly)

Returns the value of attribute export_type.



19
20
21
# File 'lib/gocardless_pro/resources/export.rb', line 19

def export_type
  @export_type
end

#idObject (readonly)

Returns the value of attribute id.



20
21
22
# File 'lib/gocardless_pro/resources/export.rb', line 20

def id
  @id
end

Instance Method Details

#api_responseObject



36
37
38
# File 'lib/gocardless_pro/resources/export.rb', line 36

def api_response
  ApiResponse.new(@response)
end

#to_hObject

Provides the export resource as a hash of all its readable attributes



41
42
43
# File 'lib/gocardless_pro/resources/export.rb', line 41

def to_h
  @object
end