Class: GoCardlessPro::Resources::SchemeIdentifier

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

Overview

This represents a scheme identifier (e.g. a SUN in Bacs or a CID in SEPA). Scheme identifiers are used to specify the beneficiary name that appears on customers' bank statements.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, response = nil) ⇒ SchemeIdentifier

Initialize a scheme_identifier resource instance

Parameters:

  • an object returned from the API



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/gocardless_pro/resources/scheme_identifier.rb', line 38

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

  @address_line1 = object['address_line1']
  @address_line2 = object['address_line2']
  @address_line3 = object['address_line3']
  @can_specify_mandate_reference = object['can_specify_mandate_reference']
  @city = object['city']
  @country_code = object['country_code']
  @created_at = object['created_at']
  @currency = object['currency']
  @email = object['email']
  @id = object['id']
  @minimum_advance_notice = object['minimum_advance_notice']
  @name = object['name']
  @phone_number = object['phone_number']
  @postal_code = object['postal_code']
  @reference = object['reference']
  @region = object['region']
  @scheme = object['scheme']
  @status = object['status']
  @response = response
end

Instance Attribute Details

#address_line1Object (readonly)

Returns the value of attribute address_line1.



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

def address_line1
  @address_line1
end

#address_line2Object (readonly)

Returns the value of attribute address_line2.



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

def address_line2
  @address_line2
end

#address_line3Object (readonly)

Returns the value of attribute address_line3.



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

def address_line3
  @address_line3
end

#can_specify_mandate_referenceObject (readonly)

Returns the value of attribute can_specify_mandate_reference.



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

def can_specify_mandate_reference
  @can_specify_mandate_reference
end

#cityObject (readonly)

Returns the value of attribute city.



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

def city
  @city
end

#country_codeObject (readonly)

Returns the value of attribute country_code.



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

def country_code
  @country_code
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#currencyObject (readonly)

Returns the value of attribute currency.



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

def currency
  @currency
end

#emailObject (readonly)

Returns the value of attribute email.



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

def email
  @email
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#minimum_advance_noticeObject (readonly)

Returns the value of attribute minimum_advance_notice.



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

def minimum_advance_notice
  @minimum_advance_notice
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#phone_numberObject (readonly)

Returns the value of attribute phone_number.



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

def phone_number
  @phone_number
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code.



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

def postal_code
  @postal_code
end

#referenceObject (readonly)

Returns the value of attribute reference.



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

def reference
  @reference
end

#regionObject (readonly)

Returns the value of attribute region.



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

def region
  @region
end

#schemeObject (readonly)

Returns the value of attribute scheme.



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

def scheme
  @scheme
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

Instance Method Details

#api_responseObject



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

def api_response
  ApiResponse.new(@response)
end

#to_hObject

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



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

def to_h
  @object
end