Class: FdxV660Api::PaymentInitiationPartyEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::PaymentInitiationPartyEntity
- Defined in:
- lib/fdx_v660_api/models/payment_initiation_party_entity.rb
Overview
Party details for FI payment initiation. Each payment initiation party will have a separate entry per FI customer, for example we might have multiple payment initiation parties that represent the same physical person; since they are registered for separate customers they will have separate entries.
Instance Attribute Summary collapse
-
#contact_preferences ⇒ Array[PaymentInitiationPartyContactMethodEntity]
Contact methods for this payment initiation party.
-
#expires_timestamp ⇒ DateTime
Describes when the entity will be automatically deleted.
-
#government_issued_party_ids ⇒ Array[GovernmentIssuedPartyIdentificationEntity]
Government-issued identification documents that are used to uniquely identify this payment initiation party.
-
#home_uri ⇒ String
URI for party, where an end user could learn more about the company or application involved in the data sharing chain.
-
#locations ⇒ Array[PaymentDeliveryAddressEntity]
Delivery addresses associated with this payment initiation party.
-
#logo_uri ⇒ String
URI for a logo asset to be displayed to the end user.
-
#name ⇒ String
Human recognizable common name.
-
#party_groups ⇒ Array[PartyGroupEntity]
The PartyGroups to which this initiation party belongs.
-
#payment_initiation_party_name ⇒ PaymentInitiationPartyNameEntity1
Name entity associated with the payment initiation party.
-
#payment_methods ⇒ Array[PaymentInitiationPartyToPaymentMethodEntity]
Registrations between this payment initiation party and its payment methods.
-
#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.
-
#status ⇒ PartyStatus1
Current status of the payment initiation party entry.
-
#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, party_groups: SKIP, payment_initiation_party_name: SKIP, government_issued_party_ids: SKIP, payment_methods: SKIP, locations: SKIP, expires_timestamp: SKIP, status: SKIP, contact_preferences: SKIP, additional_properties: nil) ⇒ PaymentInitiationPartyEntity
constructor
A new instance of PaymentInitiationPartyEntity.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_expires_timestamp ⇒ Object
-
#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, party_groups: SKIP, payment_initiation_party_name: SKIP, government_issued_party_ids: SKIP, payment_methods: SKIP, locations: SKIP, expires_timestamp: SKIP, status: SKIP, contact_preferences: SKIP, additional_properties: nil) ⇒ PaymentInitiationPartyEntity
Returns a new instance of PaymentInitiationPartyEntity.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 128 def initialize(name:, type:, home_uri: SKIP, logo_uri: SKIP, registry: SKIP, registered_entity_name: SKIP, registered_entity_id: SKIP, party_groups: SKIP, payment_initiation_party_name: SKIP, government_issued_party_ids: SKIP, payment_methods: SKIP, locations: SKIP, expires_timestamp: SKIP, status: SKIP, contact_preferences: 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 @party_groups = party_groups unless party_groups == SKIP unless payment_initiation_party_name == SKIP @payment_initiation_party_name = payment_initiation_party_name end unless government_issued_party_ids == SKIP @government_issued_party_ids = government_issued_party_ids end @payment_methods = payment_methods unless payment_methods == SKIP @locations = locations unless locations == SKIP @expires_timestamp = unless == SKIP @status = status unless status == SKIP @contact_preferences = contact_preferences unless contact_preferences == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#contact_preferences ⇒ Array[PaymentInitiationPartyContactMethodEntity]
Contact methods for this payment initiation party
81 82 83 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 81 def contact_preferences @contact_preferences end |
#expires_timestamp ⇒ DateTime
Describes when the entity will be automatically deleted. The entity will not go into the "DELETED" state. If this value is null or not provided, the entity will not expire automatically
73 74 75 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 73 def @expires_timestamp end |
#government_issued_party_ids ⇒ Array[GovernmentIssuedPartyIdentificationEntity]
Government-issued identification documents that are used to uniquely identify this payment initiation party
58 59 60 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 58 def government_issued_party_ids @government_issued_party_ids end |
#home_uri ⇒ String
URI for party, where an end user could learn more about the company or application involved in the data sharing chain
27 28 29 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 27 def home_uri @home_uri end |
#locations ⇒ Array[PaymentDeliveryAddressEntity]
Delivery addresses associated with this payment initiation party
67 68 69 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 67 def locations @locations end |
#logo_uri ⇒ String
URI for a logo asset to be displayed to the end user
31 32 33 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 31 def logo_uri @logo_uri end |
#name ⇒ String
Human recognizable common name
18 19 20 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 18 def name @name end |
#party_groups ⇒ Array[PartyGroupEntity]
The PartyGroups to which this initiation party belongs. Optional, can be omitted if party belongs to no groups.
49 50 51 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 49 def party_groups @party_groups end |
#payment_initiation_party_name ⇒ PaymentInitiationPartyNameEntity1
Name entity associated with the payment initiation party
53 54 55 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 53 def payment_initiation_party_name @payment_initiation_party_name end |
#payment_methods ⇒ Array[PaymentInitiationPartyToPaymentMethodEntity]
Registrations between this payment initiation party and its payment methods
63 64 65 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 63 def payment_methods @payment_methods end |
#registered_entity_id ⇒ String
Registered id of party
44 45 46 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 44 def registered_entity_id @registered_entity_id end |
#registered_entity_name ⇒ String
Registered name of party
40 41 42 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 40 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
36 37 38 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 36 def registry @registry end |
#status ⇒ PartyStatus1
Current status of the payment initiation party entry
77 78 79 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 77 def status @status end |
#type ⇒ PartyType3
Extensible string enum identifying the type of the party
22 23 24 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 22 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 162 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 # Parameter is an array, so we need to iterate through it party_groups = nil unless hash['partyGroups'].nil? party_groups = [] hash['partyGroups'].each do |structure| party_groups << (PartyGroupEntity.from_hash(structure) if structure) end end party_groups = SKIP unless hash.key?('partyGroups') if hash['paymentInitiationPartyName'] payment_initiation_party_name = PaymentInitiationPartyNameEntity1.from_hash(hash['paymentInitiationPartyName']) end # Parameter is an array, so we need to iterate through it government_issued_party_ids = nil unless hash['governmentIssuedPartyIds'].nil? government_issued_party_ids = [] hash['governmentIssuedPartyIds'].each do |structure| government_issued_party_ids << (GovernmentIssuedPartyIdentificationEntity.from_hash(structure) if structure) end end government_issued_party_ids = SKIP unless hash.key?('governmentIssuedPartyIds') # Parameter is an array, so we need to iterate through it payment_methods = nil unless hash['paymentMethods'].nil? payment_methods = [] hash['paymentMethods'].each do |structure| payment_methods << (PaymentInitiationPartyToPaymentMethodEntity.from_hash(structure) if structure) end end payment_methods = SKIP unless hash.key?('paymentMethods') # Parameter is an array, so we need to iterate through it locations = nil unless hash['locations'].nil? locations = [] hash['locations'].each do |structure| locations << (PaymentDeliveryAddressEntity.from_hash(structure) if structure) end end locations = SKIP unless hash.key?('locations') = if hash.key?('expiresTimestamp') (DateTimeHelper.from_rfc3339(hash['expiresTimestamp']) if hash['expiresTimestamp']) else SKIP end status = hash.key?('status') ? hash['status'] : SKIP # Parameter is an array, so we need to iterate through it contact_preferences = nil unless hash['contactPreferences'].nil? contact_preferences = [] hash['contactPreferences'].each do |structure| contact_preferences << (PaymentInitiationPartyContactMethodEntity.from_hash(structure) if structure) end end contact_preferences = SKIP unless hash.key?('contactPreferences') # 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. PaymentInitiationPartyEntity.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, party_groups: party_groups, payment_initiation_party_name: payment_initiation_party_name, government_issued_party_ids: government_issued_party_ids, payment_methods: payment_methods, locations: locations, expires_timestamp: , status: status, contact_preferences: contact_preferences, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 84 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['party_groups'] = 'partyGroups' @_hash['payment_initiation_party_name'] = 'paymentInitiationPartyName' @_hash['government_issued_party_ids'] = 'governmentIssuedPartyIds' @_hash['payment_methods'] = 'paymentMethods' @_hash['locations'] = 'locations' @_hash['expires_timestamp'] = 'expiresTimestamp' @_hash['status'] = 'status' @_hash['contact_preferences'] = 'contactPreferences' @_hash end |
.nullables ⇒ Object
An array for nullable fields
124 125 126 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 124 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 105 def self.optionals %w[ home_uri logo_uri registry registered_entity_name registered_entity_id party_groups payment_initiation_party_name government_issued_party_ids payment_methods locations expires_timestamp status contact_preferences ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 279 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}, party_groups: #{@party_groups.inspect},"\ " payment_initiation_party_name: #{@payment_initiation_party_name.inspect},"\ " government_issued_party_ids: #{@government_issued_party_ids.inspect}, payment_methods:"\ " #{@payment_methods.inspect}, locations: #{@locations.inspect}, expires_timestamp:"\ " #{@expires_timestamp.inspect}, status: #{@status.inspect}, contact_preferences:"\ " #{@contact_preferences.inspect}, additional_properties: #{@additional_properties}>" end |
#to_custom_expires_timestamp ⇒ Object
261 262 263 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 261 def DateTimeHelper.to_rfc3339() end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/fdx_v660_api/models/payment_initiation_party_entity.rb', line 266 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}, party_groups: #{@party_groups},"\ " payment_initiation_party_name: #{@payment_initiation_party_name},"\ " government_issued_party_ids: #{@government_issued_party_ids}, payment_methods:"\ " #{@payment_methods}, locations: #{@locations}, expires_timestamp: #{@expires_timestamp},"\ " status: #{@status}, contact_preferences: #{@contact_preferences}, additional_properties:"\ " #{@additional_properties}>" end |