Class: FdxV660Api::PartyEntity4
- Defined in:
- lib/fdx_v660_api/models/party_entity4.rb
Overview
Identity of the party responsible for identifying and reporting the suspected fraud. This might be the DP, DAP, a vendor, a payment network, or other entity
Instance Attribute Summary collapse
-
#home_uri ⇒ String
URI for party, where an end user could learn more about the company or application involved in the data sharing chain.
-
#logo_uri ⇒ String
URI for a logo asset to be displayed to the end user.
-
#name ⇒ String
Human recognizable common name.
-
#registered_entity_id ⇒ String
Registered id of party.
-
#registered_entity_name ⇒ String
Registered name of party.
-
#registry ⇒ Registry3
The registry containing the party's registration with name and id: FDX, GLEIF, ICANN, PRIVATE.
-
#type ⇒ PartyType3
Extensible string enum identifying the type of the party.
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(name:, type:, home_uri: SKIP, logo_uri: SKIP, registry: SKIP, registered_entity_name: SKIP, registered_entity_id: SKIP, additional_properties: nil) ⇒ PartyEntity4
constructor
A new instance of PartyEntity4.
-
#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(name:, type:, home_uri: SKIP, logo_uri: SKIP, registry: SKIP, registered_entity_name: SKIP, registered_entity_id: SKIP, additional_properties: nil) ⇒ PartyEntity4
Returns a new instance of PartyEntity4.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 73 def initialize(name:, type:, home_uri: SKIP, logo_uri: SKIP, registry: SKIP, registered_entity_name: SKIP, registered_entity_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name @type = type @home_uri = home_uri unless home_uri == SKIP @logo_uri = logo_uri unless logo_uri == SKIP @registry = registry unless registry == SKIP @registered_entity_name = registered_entity_name unless registered_entity_name == SKIP @registered_entity_id = registered_entity_id unless registered_entity_id == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#home_uri ⇒ String
URI for party, where an end user could learn more about the company or application involved in the data sharing chain
25 26 27 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 25 def home_uri @home_uri end |
#logo_uri ⇒ String
URI for a logo asset to be displayed to the end user
29 30 31 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 29 def logo_uri @logo_uri end |
#name ⇒ String
Human recognizable common name
16 17 18 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 16 def name @name end |
#registered_entity_id ⇒ String
Registered id of party
42 43 44 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 42 def registered_entity_id @registered_entity_id end |
#registered_entity_name ⇒ String
Registered name of party
38 39 40 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 38 def registered_entity_name @registered_entity_name end |
#registry ⇒ Registry3
The registry containing the party's registration with name and id: FDX, GLEIF, ICANN, PRIVATE
34 35 36 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 34 def registry @registry end |
#type ⇒ PartyType3
Extensible string enum identifying the type of the party
20 21 22 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 20 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 120 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 90 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : nil type = hash.key?('type') ? hash['type'] : nil home_uri = hash.key?('homeUri') ? hash['homeUri'] : SKIP logo_uri = hash.key?('logoUri') ? hash['logoUri'] : SKIP registry = hash.key?('registry') ? hash['registry'] : SKIP registered_entity_name = hash.key?('registeredEntityName') ? hash['registeredEntityName'] : SKIP registered_entity_id = hash.key?('registeredEntityId') ? hash['registeredEntityId'] : SKIP # 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. PartyEntity4.new(name: name, type: type, home_uri: home_uri, logo_uri: logo_uri, registry: registry, registered_entity_name: registered_entity_name, registered_entity_id: registered_entity_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['type'] = 'type' @_hash['home_uri'] = 'homeUri' @_hash['logo_uri'] = 'logoUri' @_hash['registry'] = 'registry' @_hash['registered_entity_name'] = 'registeredEntityName' @_hash['registered_entity_id'] = 'registeredEntityId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
69 70 71 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 69 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
58 59 60 61 62 63 64 65 66 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 58 def self.optionals %w[ home_uri logo_uri registry registered_entity_name registered_entity_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
132 133 134 135 136 137 138 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 132 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, type: #{@type.inspect}, home_uri:"\ " #{@home_uri.inspect}, logo_uri: #{@logo_uri.inspect}, registry: #{@registry.inspect},"\ " registered_entity_name: #{@registered_entity_name.inspect}, registered_entity_id:"\ " #{@registered_entity_id.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
123 124 125 126 127 128 129 |
# File 'lib/fdx_v660_api/models/party_entity4.rb', line 123 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, type: #{@type}, home_uri: #{@home_uri}, logo_uri:"\ " #{@logo_uri}, registry: #{@registry}, registered_entity_name: #{@registered_entity_name},"\ " registered_entity_id: #{@registered_entity_id}, additional_properties:"\ " #{@additional_properties}>" end |