Class: FdxV660Api::CapabilityEntity
- Defined in:
- lib/fdx_v660_api/models/capability_entity.rb
Overview
The response object for the API /capability request
Instance Attribute Summary collapse
-
#active_connections ⇒ Integer
The current number of active connections for this client.
-
#allowed_connections ⇒ Integer
The number of concurrent connections allowed for this client.
-
#fdx_versions ⇒ Array[FdxVersion]
The FDX schema versions supported by one or more operations.
-
#jwks_url ⇒ HateoasLink5
The URL to retrieve the JWKS public keys from the data provider, needed to enable payload level encryption above the TLS layer.
-
#message_format ⇒ MessageFormat2
Defaults to JSON.
-
#operations ⇒ Array[OperationEntity]
The FDX API endpoints supported.
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(fdx_versions: SKIP, allowed_connections: SKIP, active_connections: SKIP, message_format: SKIP, operations: SKIP, jwks_url: SKIP, additional_properties: nil) ⇒ CapabilityEntity
constructor
A new instance of CapabilityEntity.
-
#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(fdx_versions: SKIP, allowed_connections: SKIP, active_connections: SKIP, message_format: SKIP, operations: SKIP, jwks_url: SKIP, additional_properties: nil) ⇒ CapabilityEntity
Returns a new instance of CapabilityEntity.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 66 def initialize(fdx_versions: SKIP, allowed_connections: SKIP, active_connections: SKIP, message_format: SKIP, operations: SKIP, jwks_url: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @fdx_versions = fdx_versions unless fdx_versions == SKIP @allowed_connections = allowed_connections unless allowed_connections == SKIP @active_connections = active_connections unless active_connections == SKIP @message_format = unless == SKIP @operations = operations unless operations == SKIP @jwks_url = jwks_url unless jwks_url == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#active_connections ⇒ Integer
The current number of active connections for this client
22 23 24 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 22 def active_connections @active_connections end |
#allowed_connections ⇒ Integer
The number of concurrent connections allowed for this client
18 19 20 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 18 def allowed_connections @allowed_connections end |
#fdx_versions ⇒ Array[FdxVersion]
The FDX schema versions supported by one or more operations
14 15 16 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 14 def fdx_versions @fdx_versions end |
#jwks_url ⇒ HateoasLink5
The URL to retrieve the JWKS public keys from the data provider, needed to enable payload level encryption above the TLS layer
35 36 37 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 35 def jwks_url @jwks_url end |
#message_format ⇒ MessageFormat2
Defaults to JSON
26 27 28 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 26 def @message_format end |
#operations ⇒ Array[OperationEntity]
The FDX API endpoints supported
30 31 32 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 30 def operations @operations end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 82 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. fdx_versions = hash.key?('fdxVersions') ? hash['fdxVersions'] : SKIP allowed_connections = hash.key?('allowedConnections') ? hash['allowedConnections'] : SKIP active_connections = hash.key?('activeConnections') ? hash['activeConnections'] : SKIP = hash.key?('messageFormat') ? hash['messageFormat'] : SKIP # Parameter is an array, so we need to iterate through it operations = nil unless hash['operations'].nil? operations = [] hash['operations'].each do |structure| operations << (OperationEntity.from_hash(structure) if structure) end end operations = SKIP unless hash.key?('operations') jwks_url = HateoasLink5.from_hash(hash['jwksUrl']) if hash['jwksUrl'] # 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. CapabilityEntity.new(fdx_versions: fdx_versions, allowed_connections: allowed_connections, active_connections: active_connections, message_format: , operations: operations, jwks_url: jwks_url, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['fdx_versions'] = 'fdxVersions' @_hash['allowed_connections'] = 'allowedConnections' @_hash['active_connections'] = 'activeConnections' @_hash['message_format'] = 'messageFormat' @_hash['operations'] = 'operations' @_hash['jwks_url'] = 'jwksUrl' @_hash end |
.nullables ⇒ Object
An array for nullable fields
62 63 64 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 62 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 50 def self.optionals %w[ fdx_versions allowed_connections active_connections message_format operations jwks_url ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
131 132 133 134 135 136 137 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 131 def inspect class_name = self.class.name.split('::').last "<#{class_name} fdx_versions: #{@fdx_versions.inspect}, allowed_connections:"\ " #{@allowed_connections.inspect}, active_connections: #{@active_connections.inspect},"\ " message_format: #{@message_format.inspect}, operations: #{@operations.inspect}, jwks_url:"\ " #{@jwks_url.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
122 123 124 125 126 127 128 |
# File 'lib/fdx_v660_api/models/capability_entity.rb', line 122 def to_s class_name = self.class.name.split('::').last "<#{class_name} fdx_versions: #{@fdx_versions}, allowed_connections:"\ " #{@allowed_connections}, active_connections: #{@active_connections}, message_format:"\ " #{@message_format}, operations: #{@operations}, jwks_url: #{@jwks_url},"\ " additional_properties: #{@additional_properties}>" end |