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.

Restricted: 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:help@gocardless.com) if you wish to enable this feature on your account.

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



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 39

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']
  @country_code = object['country_code']
  @description = object['description']
  @directors = object['directors']
  @links = object['links']
  @name = object['name']
  @postal_code = object['postal_code']
  @region = object['region']
  @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.



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

def address_line2
  @address_line2
end

#address_line3Object (readonly)

Returns the value of attribute address_line3.



27
28
29
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 27

def address_line3
  @address_line3
end

#cityObject (readonly)

Returns the value of attribute city.



28
29
30
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 28

def city
  @city
end

#company_numberObject (readonly)

Returns the value of attribute company_number.



29
30
31
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 29

def company_number
  @company_number
end

#country_codeObject (readonly)

Returns the value of attribute country_code.



30
31
32
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 30

def country_code
  @country_code
end

#descriptionObject (readonly)

Returns the value of attribute description.



31
32
33
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 31

def description
  @description
end

#directorsObject (readonly)

Returns the value of attribute directors.



32
33
34
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 32

def directors
  @directors
end

#nameObject (readonly)

Returns the value of attribute name.



33
34
35
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 33

def name
  @name
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code.



34
35
36
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 34

def postal_code
  @postal_code
end

#regionObject (readonly)

Returns the value of attribute region.



35
36
37
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 35

def region
  @region
end

Instance Method Details

#api_responseObject



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

def api_response
  ApiResponse.new(@response)
end

Return the links that the resource has



62
63
64
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 62

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

#to_hObject

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



67
68
69
# File 'lib/gocardless_pro/resources/verification_detail.rb', line 67

def to_h
  @object
end