Class: FdxV660Api::RecipientRequest
- Defined in:
- lib/fdx_v660_api/models/recipient_request.rb
Overview
Used to request a recipient registration. Properties in this structure use 'snake_case' names to match the properties in IETF RFC 7591
Instance Attribute Summary collapse
-
#client_name ⇒ String
The Data Recipient or Data Recipient Application name displayed by Data Provider during the consent Flow as well as in the Consent Dashboard.
-
#client_uri ⇒ String
The URI which provides additional information about the Data Recipient.
-
#contacts ⇒ Array[String]
Array of strings representing ways to contact individuals responsible for the Data Recipient application.
-
#dap_client_id ⇒ String
Data Access Platform's client_id.
-
#description ⇒ String
A short description of the Data Recipient application.
-
#duration_period ⇒ Integer
The maximum consent duration in days for duration_type TIME_BOUND for the Data Recipient, effective from the date of consent.
-
#duration_type ⇒ Array[ConsentDurationType]
The duration of consent for the Data Recipient consumers.
-
#intermediaries ⇒ Array[Intermediary]
An array of the intermediaries for this data recipient.
-
#logo_uri ⇒ String
Data Recipient Logo URL location.
-
#lookback_period ⇒ Integer
The maximum number of days allowed for Data Recipient to obtain in transaction history, effective from the current date.
-
#redirect_uris ⇒ Array[String]
An array of eligible Redirect URI targets.
-
#registry_references ⇒ Array[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.
-
#scope ⇒ String
String containing a space-separated list of scope values.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(client_name:, redirect_uris:, 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) ⇒ RecipientRequest
constructor
A new instance of RecipientRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
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:, 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) ⇒ RecipientRequest
Returns a new instance of RecipientRequest.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 117 def initialize(client_name:, redirect_uris:, 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 @additional_properties = additional_properties end |
Instance Attribute Details
#client_name ⇒ String
The Data Recipient or Data Recipient Application name displayed by Data Provider during the consent Flow as well as in the Consent Dashboard
23 24 25 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 23 def client_name @client_name end |
#client_uri ⇒ String
The URI which provides additional information about the Data Recipient
39 40 41 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 39 def client_uri @client_uri end |
#contacts ⇒ Array[String]
Array of strings representing ways to contact individuals responsible for the Data Recipient application
44 45 46 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 44 def contacts @contacts end |
#dap_client_id ⇒ String
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
18 19 20 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 18 def dap_client_id @dap_client_id end |
#description ⇒ String
A short description of the Data Recipient application
27 28 29 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 27 def description @description end |
#duration_period ⇒ Integer
The maximum consent duration in days for duration_type TIME_BOUND for the Data Recipient, effective from the date of consent
59 60 61 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 59 def duration_period @duration_period end |
#duration_type ⇒ Array[ConsentDurationType]
The duration of consent for the Data Recipient consumers
54 55 56 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 54 def duration_type @duration_type end |
#intermediaries ⇒ Array[Intermediary]
An array of the intermediaries for this data recipient
74 75 76 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 74 def intermediaries @intermediaries end |
#logo_uri ⇒ String
Data Recipient Logo URL location
35 36 37 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 35 def logo_uri @logo_uri end |
#lookback_period ⇒ Integer
The maximum number of days allowed for Data Recipient to obtain in transaction history, effective from the current date
64 65 66 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 64 def lookback_period @lookback_period end |
#redirect_uris ⇒ Array[String]
An array of eligible Redirect URI targets
31 32 33 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 31 def redirect_uris @redirect_uris end |
#registry_references ⇒ Array[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
70 71 72 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 70 def registry_references @registry_references end |
#scope ⇒ String
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
50 51 52 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 50 def scope @scope end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
143 144 145 146 147 148 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 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 143 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 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. RecipientRequest.new(client_name: client_name, redirect_uris: redirect_uris, 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 |
.names ⇒ Object
A mapping from model property names to API property names.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 77 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 end |
.nullables ⇒ Object
An array for nullable fields
113 114 115 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 113 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 96 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
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 217 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},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
206 207 208 209 210 211 212 213 214 |
# File 'lib/fdx_v660_api/models/recipient_request.rb', line 206 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}, additional_properties: #{@additional_properties}>" end |