Class: SyncteraRubySdk::IncomingWire
- Inherits:
-
Object
- Object
- SyncteraRubySdk::IncomingWire
- Defined in:
- lib/synctera_ruby_sdk/models/incoming_wire.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#account_id ⇒ Object
The internal account uuid representing the recipient of the wire.
-
#amount ⇒ Object
Transfer amount in cents ($100 would be 10000).
-
#bank_id ⇒ Object
ID of bank.
-
#bank_message ⇒ Object
Information from the sending bank to the receiving bank.
-
#creation_time ⇒ Object
Returns the value of attribute creation_time.
-
#currency ⇒ Object
3-character currency code.
-
#customer_id ⇒ Object
The customer UUID representing the person initiating the Wire transfer.
-
#decline_reason ⇒ Object
Description of the reason the transfer was declined.
-
#id ⇒ Object
wire ID.
-
#is_return ⇒ Object
Indicates if the wire is a return of an outgoing wire.
-
#originating_account_number ⇒ Object
The account number representing the sender account.
-
#partner_id ⇒ Object
ID of partner.
-
#receiver ⇒ Object
Returns the value of attribute receiver.
-
#receiving_account_id ⇒ Object
The internal Synctera account uuid representing the recipient of the wire.
-
#receiving_account_number ⇒ Object
The account number representing the recipient account.
-
#recipient_message ⇒ Object
Information from the originator to the beneficiary (recipient).
-
#return_data ⇒ Object
Returns the value of attribute return_data.
-
#return_reason ⇒ Object
The reason we are returning this wire.
-
#sender ⇒ Object
Returns the value of attribute sender.
-
#sender_reference_id ⇒ Object
Sender’s id associated with fedwire transfer.
-
#status ⇒ Object
The current status of the transfer.
-
#transaction_id ⇒ Object
ID of the resulting transaction resource.
-
#type_subtype ⇒ Object
The fedwire label associated with the subtype code.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ IncomingWire
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ IncomingWire
Initializes the object
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 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 176 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `SyncteraRubySdk::IncomingWire` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `SyncteraRubySdk::IncomingWire`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'account_id') self.account_id = attributes[:'account_id'] end if attributes.key?(:'amount') self.amount = attributes[:'amount'] end if attributes.key?(:'bank_id') self.bank_id = attributes[:'bank_id'] end if attributes.key?(:'bank_message') self. = attributes[:'bank_message'] end if attributes.key?(:'creation_time') self.creation_time = attributes[:'creation_time'] end if attributes.key?(:'currency') self.currency = attributes[:'currency'] end if attributes.key?(:'customer_id') self.customer_id = attributes[:'customer_id'] end if attributes.key?(:'decline_reason') self.decline_reason = attributes[:'decline_reason'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'is_return') self.is_return = attributes[:'is_return'] end if attributes.key?(:'originating_account_number') self.originating_account_number = attributes[:'originating_account_number'] end if attributes.key?(:'partner_id') self.partner_id = attributes[:'partner_id'] end if attributes.key?(:'receiver') self.receiver = attributes[:'receiver'] end if attributes.key?(:'receiving_account_id') self.receiving_account_id = attributes[:'receiving_account_id'] end if attributes.key?(:'receiving_account_number') self.receiving_account_number = attributes[:'receiving_account_number'] end if attributes.key?(:'recipient_message') self. = attributes[:'recipient_message'] end if attributes.key?(:'return_data') self.return_data = attributes[:'return_data'] end if attributes.key?(:'return_reason') self.return_reason = attributes[:'return_reason'] end if attributes.key?(:'sender') self.sender = attributes[:'sender'] end if attributes.key?(:'sender_reference_id') self.sender_reference_id = attributes[:'sender_reference_id'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'transaction_id') self.transaction_id = attributes[:'transaction_id'] end if attributes.key?(:'type_subtype') self.type_subtype = attributes[:'type_subtype'] end end |
Instance Attribute Details
#account_id ⇒ Object
The internal account uuid representing the recipient of the wire.
19 20 21 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 19 def account_id @account_id end |
#amount ⇒ Object
Transfer amount in cents ($100 would be 10000)
22 23 24 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 22 def amount @amount end |
#bank_id ⇒ Object
ID of bank
25 26 27 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 25 def bank_id @bank_id end |
#bank_message ⇒ Object
Information from the sending bank to the receiving bank.
28 29 30 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 28 def @bank_message end |
#creation_time ⇒ Object
Returns the value of attribute creation_time.
30 31 32 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 30 def creation_time @creation_time end |
#currency ⇒ Object
3-character currency code
33 34 35 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 33 def currency @currency end |
#customer_id ⇒ Object
The customer UUID representing the person initiating the Wire transfer
36 37 38 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 36 def customer_id @customer_id end |
#decline_reason ⇒ Object
Description of the reason the transfer was declined
39 40 41 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 39 def decline_reason @decline_reason end |
#id ⇒ Object
wire ID
42 43 44 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 42 def id @id end |
#is_return ⇒ Object
Indicates if the wire is a return of an outgoing wire
45 46 47 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 45 def is_return @is_return end |
#originating_account_number ⇒ Object
The account number representing the sender account. If the incoming wire is a return, it refers to the sender of the initial wire not the sender of the return.
48 49 50 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 48 def originating_account_number @originating_account_number end |
#partner_id ⇒ Object
ID of partner
51 52 53 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 51 def partner_id @partner_id end |
#receiver ⇒ Object
Returns the value of attribute receiver.
53 54 55 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 53 def receiver @receiver end |
#receiving_account_id ⇒ Object
The internal Synctera account uuid representing the recipient of the wire.
56 57 58 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 56 def receiving_account_id @receiving_account_id end |
#receiving_account_number ⇒ Object
The account number representing the recipient account. If the incoming wire is a return, it refers to the recipient of the initial wire not the destination of the return.
59 60 61 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 59 def receiving_account_number @receiving_account_number end |
#recipient_message ⇒ Object
Information from the originator to the beneficiary (recipient).
62 63 64 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 62 def @recipient_message end |
#return_data ⇒ Object
Returns the value of attribute return_data.
64 65 66 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 64 def return_data @return_data end |
#return_reason ⇒ Object
The reason we are returning this wire.
67 68 69 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 67 def return_reason @return_reason end |
#sender ⇒ Object
Returns the value of attribute sender.
69 70 71 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 69 def sender @sender end |
#sender_reference_id ⇒ Object
Sender’s id associated with fedwire transfer
72 73 74 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 72 def sender_reference_id @sender_reference_id end |
#status ⇒ Object
The current status of the transfer
75 76 77 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 75 def status @status end |
#transaction_id ⇒ Object
ID of the resulting transaction resource
78 79 80 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 78 def transaction_id @transaction_id end |
#type_subtype ⇒ Object
The fedwire label associated with the subtype code
81 82 83 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 81 def type_subtype @type_subtype end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
135 136 137 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 135 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 106 def self.attribute_map { :'account_id' => :'account_id', :'amount' => :'amount', :'bank_id' => :'bank_id', :'bank_message' => :'bank_message', :'creation_time' => :'creation_time', :'currency' => :'currency', :'customer_id' => :'customer_id', :'decline_reason' => :'decline_reason', :'id' => :'id', :'is_return' => :'is_return', :'originating_account_number' => :'originating_account_number', :'partner_id' => :'partner_id', :'receiver' => :'receiver', :'receiving_account_id' => :'receiving_account_id', :'receiving_account_number' => :'receiving_account_number', :'recipient_message' => :'recipient_message', :'return_data' => :'return_data', :'return_reason' => :'return_reason', :'sender' => :'sender', :'sender_reference_id' => :'sender_reference_id', :'status' => :'status', :'transaction_id' => :'transaction_id', :'type_subtype' => :'type_subtype' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
419 420 421 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 419 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
169 170 171 172 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 169 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 140 def self.openapi_types { :'account_id' => :'String', :'amount' => :'Integer', :'bank_id' => :'Integer', :'bank_message' => :'String', :'creation_time' => :'Time', :'currency' => :'String', :'customer_id' => :'String', :'decline_reason' => :'String', :'id' => :'String', :'is_return' => :'Boolean', :'originating_account_number' => :'String', :'partner_id' => :'Integer', :'receiver' => :'Party', :'receiving_account_id' => :'String', :'receiving_account_number' => :'String', :'recipient_message' => :'String', :'return_data' => :'ReturnData', :'return_reason' => :'String', :'sender' => :'Party', :'sender_reference_id' => :'String', :'status' => :'String', :'transaction_id' => :'String', :'type_subtype' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 376 def ==(o) return true if self.equal?(o) self.class == o.class && account_id == o.account_id && amount == o.amount && bank_id == o.bank_id && == o. && creation_time == o.creation_time && currency == o.currency && customer_id == o.customer_id && decline_reason == o.decline_reason && id == o.id && is_return == o.is_return && originating_account_number == o.originating_account_number && partner_id == o.partner_id && receiver == o.receiver && receiving_account_id == o.receiving_account_id && receiving_account_number == o.receiving_account_number && == o. && return_data == o.return_data && return_reason == o.return_reason && sender == o.sender && sender_reference_id == o.sender_reference_id && status == o.status && transaction_id == o.transaction_id && type_subtype == o.type_subtype end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 450 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = SyncteraRubySdk.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
521 522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 521 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 426 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
406 407 408 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 406 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
412 413 414 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 412 def hash [account_id, amount, bank_id, , creation_time, currency, customer_id, decline_reason, id, is_return, originating_account_number, partner_id, receiver, receiving_account_id, receiving_account_number, , return_data, return_reason, sender, sender_reference_id, status, transaction_id, type_subtype].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 284 def list_invalid_properties invalid_properties = Array.new if @amount.nil? invalid_properties.push('invalid value for "amount", amount cannot be nil.') end if @bank_id.nil? invalid_properties.push('invalid value for "bank_id", bank_id cannot be nil.') end if @creation_time.nil? invalid_properties.push('invalid value for "creation_time", creation_time cannot be nil.') end if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @is_return.nil? invalid_properties.push('invalid value for "is_return", is_return cannot be nil.') end if @originating_account_number.nil? invalid_properties.push('invalid value for "originating_account_number", originating_account_number cannot be nil.') end if @receiver.nil? invalid_properties.push('invalid value for "receiver", receiver cannot be nil.') end if @receiving_account_number.nil? invalid_properties.push('invalid value for "receiving_account_number", receiving_account_number cannot be nil.') end if @sender.nil? invalid_properties.push('invalid value for "sender", sender cannot be nil.') end if @sender_reference_id.nil? invalid_properties.push('invalid value for "sender_reference_id", sender_reference_id cannot be nil.') end if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
497 498 499 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 497 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
503 504 505 506 507 508 509 510 511 512 513 514 515 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 503 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
491 492 493 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 491 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/synctera_ruby_sdk/models/incoming_wire.rb', line 335 def valid? return false if @amount.nil? return false if @bank_id.nil? return false if @creation_time.nil? return false if @id.nil? return false if @is_return.nil? return false if @originating_account_number.nil? return false if @receiver.nil? return false if @receiving_account_number.nil? return false if @sender.nil? return false if @sender_reference_id.nil? return false if @status.nil? status_validator = EnumAttributeValidator.new('String', ["READY", "BLOCKED", "POSTED", "RETURNED"]) return false unless status_validator.valid?(@status) type_subtype_validator = EnumAttributeValidator.new('String', ["BASIC_FUNDS_TRANSFER", "SAME_DAY_TRANSFER_REVERSAL", "PRIOR_DAY_TRANSFER_REVERSAL"]) return false unless type_subtype_validator.valid?(@type_subtype) true end |