Class: GoCardlessPro::Resources::VerificationDetail

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

Overview

Verification details represent any information needed by GoCardless to verify a creditor.

<p class=“restricted-notice”><strong>Restricted</strong>:

These endpoints are restricted to customers who want to collect their

merchant’s

verification details and pass them to GoCardless via our API. Please

[get in

touch](mailto:[email protected]) if you wish to enable this feature on

your

account.</p>

Defined Under Namespace

Classes: Links

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, response = nil) ⇒ VerificationDetail

Initialize a verification_detail resource instance

Parameters:

  • object (Hash)

    an object returned from the API



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

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

  @address_line1 = object['address_line1']
  @address_line2 = object['address_line2']
  @address_line3 = object['address_line3']
  @city = object['city']
  @company_number = object['company_number']
  @description = object['description']
  @directors = object['directors']
  @links = object['links']
  @name = object['name']
  @postal_code = object['postal_code']
  @response = response
end

Instance Attribute Details

#address_line1Object (readonly)

Returns the value of attribute address_line1.



25
26
27
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 25

def address_line1
  @address_line1
end

#address_line2Object (readonly)

Returns the value of attribute address_line2.



25
26
27
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 25

def address_line2
  @address_line2
end

#address_line3Object (readonly)

Returns the value of attribute address_line3.



25
26
27
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 25

def address_line3
  @address_line3
end

#cityObject (readonly)

Returns the value of attribute city.



25
26
27
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 25

def city
  @city
end

#company_numberObject (readonly)

Returns the value of attribute company_number.



25
26
27
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 25

def company_number
  @company_number
end

#descriptionObject (readonly)

Returns the value of attribute description.



25
26
27
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 25

def description
  @description
end

#directorsObject (readonly)

Returns the value of attribute directors.



25
26
27
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 25

def directors
  @directors
end

#nameObject (readonly)

Returns the value of attribute name.



25
26
27
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 25

def name
  @name
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code.



25
26
27
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 25

def postal_code
  @postal_code
end

Instance Method Details

#api_responseObject



46
47
48
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 46

def api_response
  ApiResponse.new(@response)
end

Return the links that the resource has



51
52
53
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 51

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

#to_hObject

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



56
57
58
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 56

def to_h
  @object
end