Class: GoCardlessPro::Resources::OutboundPaymentImportEntry

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

Overview

Import Entries are the individual rows of an outbound payment import, representing each payment to be created.

Defined Under Namespace

Classes: Links

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, response = nil) ⇒ OutboundPaymentImportEntry

Initialize a outbound_payment_import_entry resource instance

Parameters:

  • object (Hash)

    an object returned from the API



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/gocardless_pro/resources/outbound_payment_import_entry.rb', line 28

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

  @amount = object['amount']
  @created_at = object['created_at']
  @id = object['id']
  @links = object['links']
  @metadata = object['metadata']
  @processed_at = object['processed_at']
  @reference = object['reference']
  @scheme = object['scheme']
  @validation_errors = object['validation_errors']
  @verification_result = object['verification_result']
  @response = response
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



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

def amount
  @amount
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



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

def 
  @metadata
end

#processed_atObject (readonly)

Returns the value of attribute processed_at.



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

def processed_at
  @processed_at
end

#referenceObject (readonly)

Returns the value of attribute reference.



21
22
23
# File 'lib/gocardless_pro/resources/outbound_payment_import_entry.rb', line 21

def reference
  @reference
end

#schemeObject (readonly)

Returns the value of attribute scheme.



22
23
24
# File 'lib/gocardless_pro/resources/outbound_payment_import_entry.rb', line 22

def scheme
  @scheme
end

#validation_errorsObject (readonly)

Returns the value of attribute validation_errors.



23
24
25
# File 'lib/gocardless_pro/resources/outbound_payment_import_entry.rb', line 23

def validation_errors
  @validation_errors
end

#verification_resultObject (readonly)

Returns the value of attribute verification_result.



24
25
26
# File 'lib/gocardless_pro/resources/outbound_payment_import_entry.rb', line 24

def verification_result
  @verification_result
end

Instance Method Details

#api_responseObject



44
45
46
# File 'lib/gocardless_pro/resources/outbound_payment_import_entry.rb', line 44

def api_response
  ApiResponse.new(@response)
end

Return the links that the resource has



49
50
51
# File 'lib/gocardless_pro/resources/outbound_payment_import_entry.rb', line 49

def links
  @outbound_payment_import_entry_links ||= Links.new(@links)
end

#to_hObject

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



54
55
56
# File 'lib/gocardless_pro/resources/outbound_payment_import_entry.rb', line 54

def to_h
  @object
end