Class: Worldline::Connect::SDK::V1::Domain::DirectoryEntry

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/directory_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#country_namesArray<String>

Returns the current value of country_names.

Returns:

  • (Array<String>)

    the current value of country_names



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/directory_entry.rb', line 16

def country_names
  @country_names
end

#issuer_idString

Returns the current value of issuer_id.

Returns:

  • (String)

    the current value of issuer_id



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/directory_entry.rb', line 16

def issuer_id
  @issuer_id
end

#issuer_listString

Returns the current value of issuer_list.

Returns:

  • (String)

    the current value of issuer_list



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/directory_entry.rb', line 16

def issuer_list
  @issuer_list
end

#issuer_nameString

Returns the current value of issuer_name.

Returns:

  • (String)

    the current value of issuer_name



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/directory_entry.rb', line 16

def issuer_name
  @issuer_name
end

Instance Method Details

#from_hash(hash) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/worldline/connect/sdk/v1/domain/directory_entry.rb', line 36

def from_hash(hash)
  super
  if hash.has_key? 'countryNames'
    raise TypeError, "value '%s' is not an Array" % [hash['countryNames']] unless hash['countryNames'].is_a? Array
    @country_names = []
    hash['countryNames'].each do |e|
      @country_names << e
    end
  end
  if hash.has_key? 'issuerId'
    @issuer_id = hash['issuerId']
  end
  if hash.has_key? 'issuerList'
    @issuer_list = hash['issuerList']
  end
  if hash.has_key? 'issuerName'
    @issuer_name = hash['issuerName']
  end
end

#to_hHash

Returns:

  • (Hash)


27
28
29
30
31
32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/directory_entry.rb', line 27

def to_h
  hash = super
  hash['countryNames'] = @country_names unless @country_names.nil?
  hash['issuerId'] = @issuer_id unless @issuer_id.nil?
  hash['issuerList'] = @issuer_list unless @issuer_list.nil?
  hash['issuerName'] = @issuer_name unless @issuer_name.nil?
  hash
end