Class: FdxV660Api::RecipientRecordAtEcosystemRegistry

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb

Overview

Record of Recipient at the Ecosystem Registry. Properties in this structure use 'snake_case' names to match the properties in IETF RFC 7591.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(client_name:, redirect_uris:, recipient_id:, dap_client_id: SKIP, description: SKIP, logo_uri: SKIP, client_uri: SKIP, contacts: SKIP, scope: SKIP, duration_type: SKIP, duration_period: SKIP, lookback_period: SKIP, registry_references: SKIP, intermediaries: SKIP, additional_properties: nil) ⇒ RecipientRecordAtEcosystemRegistry

Returns a new instance of RecipientRecordAtEcosystemRegistry.



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 122

def initialize(client_name:, redirect_uris:, recipient_id:,
               dap_client_id: SKIP, description: SKIP, logo_uri: SKIP,
               client_uri: SKIP, contacts: SKIP, scope: SKIP,
               duration_type: SKIP, duration_period: SKIP,
               lookback_period: SKIP, registry_references: SKIP,
               intermediaries: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @dap_client_id = dap_client_id unless dap_client_id == SKIP
  @client_name = client_name
  @description = description unless description == SKIP
  @redirect_uris = redirect_uris
  @logo_uri = logo_uri unless logo_uri == SKIP
  @client_uri = client_uri unless client_uri == SKIP
  @contacts = contacts unless contacts == SKIP
  @scope = scope unless scope == SKIP
  @duration_type = duration_type unless duration_type == SKIP
  @duration_period = duration_period unless duration_period == SKIP
  @lookback_period = lookback_period unless lookback_period == SKIP
  @registry_references = registry_references unless registry_references == SKIP
  @intermediaries = intermediaries unless intermediaries == SKIP
  @recipient_id = recipient_id
  @additional_properties = additional_properties
end

Instance Attribute Details

#client_nameString

The Data Recipient or Data Recipient Application name displayed by Data Provider during the consent Flow as well as in the Consent Dashboard

Returns:

  • (String)


23
24
25
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 23

def client_name
  @client_name
end

#client_uriString

The URI which provides additional information about the Data Recipient

Returns:

  • (String)


39
40
41
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 39

def client_uri
  @client_uri
end

#contactsArray[String]

Array of strings representing ways to contact individuals responsible for the Data Recipient application

Returns:

  • (Array[String])


44
45
46
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 44

def contacts
  @contacts
end

#dap_client_idString

Data Access Platform's client_id. If this field is populated, then return the Data Recipient's identifier client_id, not a client_id and client_secret

Returns:

  • (String)


18
19
20
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 18

def dap_client_id
  @dap_client_id
end

#descriptionString

A short description of the Data Recipient application

Returns:

  • (String)


27
28
29
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 27

def description
  @description
end

#duration_periodInteger

The maximum consent duration in days for duration_type TIME_BOUND for the Data Recipient, effective from the date of consent

Returns:

  • (Integer)


59
60
61
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 59

def duration_period
  @duration_period
end

#duration_typeArray[ConsentDurationType]

The duration of consent for the Data Recipient consumers

Returns:



54
55
56
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 54

def duration_type
  @duration_type
end

#intermediariesArray[Intermediary]

An array of the intermediaries for this data recipient

Returns:



74
75
76
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 74

def intermediaries
  @intermediaries
end

#logo_uriString

Data Recipient Logo URL location

Returns:

  • (String)


35
36
37
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 35

def logo_uri
  @logo_uri
end

#lookback_periodInteger

The maximum number of days allowed for Data Recipient to obtain in transaction history, effective from the current date

Returns:

  • (Integer)


64
65
66
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 64

def lookback_period
  @lookback_period
end

#recipient_idString

Recipient Id at ecosystem registry

Returns:

  • (String)


78
79
80
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 78

def recipient_id
  @recipient_id
end

#redirect_urisArray[String]

An array of eligible Redirect URI targets

Returns:

  • (Array[String])


31
32
33
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 31

def redirect_uris
  @redirect_uris
end

#registry_referencesArray[RegistryReference]

An array of external registries containing registered entity name, registered entity id and registry fields for the registries where the data recipient is registered

Returns:



70
71
72
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 70

def registry_references
  @registry_references
end

#scopeString

String containing a space-separated list of scope values. Applicable FDX scopes are defined in OauthScope and FdxOauthScope enumerations. Prior use of DataCluster enumeration for scopes is deprecated with release V6.3

Returns:

  • (String)


50
51
52
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 50

def scope
  @scope
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 149

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  client_name = hash.key?('client_name') ? hash['client_name'] : nil
  redirect_uris = hash.key?('redirect_uris') ? hash['redirect_uris'] : nil
  recipient_id = hash.key?('recipient_id') ? hash['recipient_id'] : nil
  dap_client_id = hash.key?('dap_client_id') ? hash['dap_client_id'] : SKIP
  description = hash.key?('description') ? hash['description'] : SKIP
  logo_uri = hash.key?('logo_uri') ? hash['logo_uri'] : SKIP
  client_uri = hash.key?('client_uri') ? hash['client_uri'] : SKIP
  contacts = hash.key?('contacts') ? hash['contacts'] : SKIP
  scope = hash.key?('scope') ? hash['scope'] : SKIP
  duration_type = hash.key?('duration_type') ? hash['duration_type'] : SKIP
  duration_period =
    hash.key?('duration_period') ? hash['duration_period'] : SKIP
  lookback_period =
    hash.key?('lookback_period') ? hash['lookback_period'] : SKIP
  # Parameter is an array, so we need to iterate through it
  registry_references = nil
  unless hash['registry_references'].nil?
    registry_references = []
    hash['registry_references'].each do |structure|
      registry_references << (RegistryReference.from_hash(structure) if structure)
    end
  end

  registry_references = SKIP unless hash.key?('registry_references')
  # Parameter is an array, so we need to iterate through it
  intermediaries = nil
  unless hash['intermediaries'].nil?
    intermediaries = []
    hash['intermediaries'].each do |structure|
      intermediaries << (Intermediary.from_hash(structure) if structure)
    end
  end

  intermediaries = SKIP unless hash.key?('intermediaries')

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  RecipientRecordAtEcosystemRegistry.new(client_name: client_name,
                                         redirect_uris: redirect_uris,
                                         recipient_id: recipient_id,
                                         dap_client_id: dap_client_id,
                                         description: description,
                                         logo_uri: logo_uri,
                                         client_uri: client_uri,
                                         contacts: contacts,
                                         scope: scope,
                                         duration_type: duration_type,
                                         duration_period: duration_period,
                                         lookback_period: lookback_period,
                                         registry_references: registry_references,
                                         intermediaries: intermediaries,
                                         additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 81

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['dap_client_id'] = 'dap_client_id'
  @_hash['client_name'] = 'client_name'
  @_hash['description'] = 'description'
  @_hash['redirect_uris'] = 'redirect_uris'
  @_hash['logo_uri'] = 'logo_uri'
  @_hash['client_uri'] = 'client_uri'
  @_hash['contacts'] = 'contacts'
  @_hash['scope'] = 'scope'
  @_hash['duration_type'] = 'duration_type'
  @_hash['duration_period'] = 'duration_period'
  @_hash['lookback_period'] = 'lookback_period'
  @_hash['registry_references'] = 'registry_references'
  @_hash['intermediaries'] = 'intermediaries'
  @_hash['recipient_id'] = 'recipient_id'
  @_hash
end

.nullablesObject

An array for nullable fields



118
119
120
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 118

def self.nullables
  []
end

.optionalsObject

An array for optional fields



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 101

def self.optionals
  %w[
    dap_client_id
    description
    logo_uri
    client_uri
    contacts
    scope
    duration_type
    duration_period
    lookback_period
    registry_references
    intermediaries
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



226
227
228
229
230
231
232
233
234
235
236
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 226

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} dap_client_id: #{@dap_client_id.inspect}, client_name:"\
  " #{@client_name.inspect}, description: #{@description.inspect}, redirect_uris:"\
  " #{@redirect_uris.inspect}, logo_uri: #{@logo_uri.inspect}, client_uri:"\
  " #{@client_uri.inspect}, contacts: #{@contacts.inspect}, scope: #{@scope.inspect},"\
  " duration_type: #{@duration_type.inspect}, duration_period: #{@duration_period.inspect},"\
  " lookback_period: #{@lookback_period.inspect}, registry_references:"\
  " #{@registry_references.inspect}, intermediaries: #{@intermediaries.inspect}, recipient_id:"\
  " #{@recipient_id.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



214
215
216
217
218
219
220
221
222
223
# File 'lib/fdx_v660_api/models/recipient_record_at_ecosystem_registry.rb', line 214

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} dap_client_id: #{@dap_client_id}, client_name: #{@client_name},"\
  " description: #{@description}, redirect_uris: #{@redirect_uris}, logo_uri: #{@logo_uri},"\
  " client_uri: #{@client_uri}, contacts: #{@contacts}, scope: #{@scope}, duration_type:"\
  " #{@duration_type}, duration_period: #{@duration_period}, lookback_period:"\
  " #{@lookback_period}, registry_references: #{@registry_references}, intermediaries:"\
  " #{@intermediaries}, recipient_id: #{@recipient_id}, additional_properties:"\
  " #{@additional_properties}>"
end