Class: SyncteraRubySdk::TransactionLine1
- Inherits:
-
Object
- Object
- SyncteraRubySdk::TransactionLine1
- Defined in:
- lib/synctera_ruby_sdk/models/transaction_line1.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#account_id ⇒ Object
The account uuid associated with this transaction line.
-
#account_no ⇒ Object
The account number associated with this transaction line.
-
#amount ⇒ Object
The amount (in cents) of the transaction.
-
#avail_balance ⇒ Object
The account "available balance" at the point in time this (to be deprecated) transaction was posted.
-
#available_balance ⇒ Object
The account "available balance" at the point in time this transaction was posted.
-
#balance ⇒ Object
The account balance at the point in time this transaction was posted.
-
#created ⇒ Object
The creation date of the transaction.
-
#currency ⇒ Object
ISO 4217 alphabetic currency code of the transfer amount.
-
#dc_sign ⇒ Object
Returns the value of attribute dc_sign.
-
#is_fee ⇒ Object
Whether or not this line is considered a fee.
-
#is_gl_acc ⇒ Object
Whether or not this line represents a GL account.
-
#is_offset ⇒ Object
Whether or not this line is considered the "offset" line.
-
#is_primary ⇒ Object
Whether or not this line is considered the "primary" line.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#network ⇒ Object
The network this transaction is associated with.
-
#related_line ⇒ Object
Returns the value of attribute related_line.
-
#seq ⇒ Object
Returns the value of attribute seq.
-
#tenant ⇒ Object
The tenant associated with this transaction, in the form "<bankid>_<partnerid>".
-
#updated ⇒ Object
The date the transaction was last updated.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
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 = {}) ⇒ TransactionLine1
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 = {}) ⇒ TransactionLine1
Initializes the object
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 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 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 161 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `SyncteraRubySdk::TransactionLine1` 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::TransactionLine1`. 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?(:'account_no') self.account_no = attributes[:'account_no'] end if attributes.key?(:'amount') self.amount = attributes[:'amount'] end if attributes.key?(:'avail_balance') self.avail_balance = attributes[:'avail_balance'] end if attributes.key?(:'available_balance') self.available_balance = attributes[:'available_balance'] end if attributes.key?(:'balance') self.balance = attributes[:'balance'] end if attributes.key?(:'created') self.created = attributes[:'created'] end if attributes.key?(:'currency') self.currency = attributes[:'currency'] end if attributes.key?(:'dc_sign') self.dc_sign = attributes[:'dc_sign'] end if attributes.key?(:'is_fee') self.is_fee = attributes[:'is_fee'] end if attributes.key?(:'is_gl_acc') self.is_gl_acc = attributes[:'is_gl_acc'] end if attributes.key?(:'is_offset') self.is_offset = attributes[:'is_offset'] end if attributes.key?(:'is_primary') self.is_primary = attributes[:'is_primary'] end if attributes.key?(:'meta') self. = attributes[:'meta'] end if attributes.key?(:'network') self.network = attributes[:'network'] end if attributes.key?(:'related_line') self. = attributes[:'related_line'] end if attributes.key?(:'seq') self.seq = attributes[:'seq'] end if attributes.key?(:'tenant') self.tenant = attributes[:'tenant'] end if attributes.key?(:'updated') self.updated = attributes[:'updated'] end if attributes.key?(:'uuid') self.uuid = attributes[:'uuid'] end end |
Instance Attribute Details
#account_id ⇒ Object
The account uuid associated with this transaction line
19 20 21 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 19 def account_id @account_id end |
#account_no ⇒ Object
The account number associated with this transaction line
22 23 24 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 22 def account_no @account_no end |
#amount ⇒ Object
The amount (in cents) of the transaction
25 26 27 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 25 def amount @amount end |
#avail_balance ⇒ Object
The account "available balance" at the point in time this (to be deprecated) transaction was posted
28 29 30 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 28 def avail_balance @avail_balance end |
#available_balance ⇒ Object
The account "available balance" at the point in time this transaction was posted
31 32 33 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 31 def available_balance @available_balance end |
#balance ⇒ Object
The account balance at the point in time this transaction was posted
34 35 36 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 34 def balance @balance end |
#created ⇒ Object
The creation date of the transaction
37 38 39 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 37 def created @created end |
#currency ⇒ Object
ISO 4217 alphabetic currency code of the transfer amount
40 41 42 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 40 def currency @currency end |
#dc_sign ⇒ Object
Returns the value of attribute dc_sign.
42 43 44 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 42 def dc_sign @dc_sign end |
#is_fee ⇒ Object
Whether or not this line is considered a fee
45 46 47 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 45 def is_fee @is_fee end |
#is_gl_acc ⇒ Object
Whether or not this line represents a GL account
48 49 50 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 48 def is_gl_acc @is_gl_acc end |
#is_offset ⇒ Object
Whether or not this line is considered the "offset" line
51 52 53 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 51 def is_offset @is_offset end |
#is_primary ⇒ Object
Whether or not this line is considered the "primary" line
54 55 56 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 54 def is_primary @is_primary end |
#meta ⇒ Object
Returns the value of attribute meta.
56 57 58 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 56 def @meta end |
#network ⇒ Object
The network this transaction is associated with
59 60 61 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 59 def network @network end |
#related_line ⇒ Object
Returns the value of attribute related_line.
61 62 63 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 61 def @related_line end |
#seq ⇒ Object
Returns the value of attribute seq.
63 64 65 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 63 def seq @seq end |
#tenant ⇒ Object
The tenant associated with this transaction, in the form "<bankid>_<partnerid>"
66 67 68 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 66 def tenant @tenant end |
#updated ⇒ Object
The date the transaction was last updated
69 70 71 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 69 def updated @updated end |
#uuid ⇒ Object
Returns the value of attribute uuid.
71 72 73 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 71 def uuid @uuid end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
122 123 124 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 122 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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/synctera_ruby_sdk/models/transaction_line1.rb', line 96 def self.attribute_map { :'account_id' => :'account_id', :'account_no' => :'account_no', :'amount' => :'amount', :'avail_balance' => :'avail_balance', :'available_balance' => :'available_balance', :'balance' => :'balance', :'created' => :'created', :'currency' => :'currency', :'dc_sign' => :'dc_sign', :'is_fee' => :'is_fee', :'is_gl_acc' => :'is_gl_acc', :'is_offset' => :'is_offset', :'is_primary' => :'is_primary', :'meta' => :'meta', :'network' => :'network', :'related_line' => :'related_line', :'seq' => :'seq', :'tenant' => :'tenant', :'updated' => :'updated', :'uuid' => :'uuid' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
405 406 407 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 405 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
153 154 155 156 157 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 153 def self.openapi_nullable Set.new([ :'meta', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 127 def self.openapi_types { :'account_id' => :'String', :'account_no' => :'String', :'amount' => :'Integer', :'avail_balance' => :'Integer', :'available_balance' => :'Integer', :'balance' => :'Integer', :'created' => :'Time', :'currency' => :'String', :'dc_sign' => :'DcSign', :'is_fee' => :'Boolean', :'is_gl_acc' => :'Boolean', :'is_offset' => :'Boolean', :'is_primary' => :'Boolean', :'meta' => :'Object', :'network' => :'String', :'related_line' => :'Integer', :'seq' => :'Integer', :'tenant' => :'String', :'updated' => :'Time', :'uuid' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 365 def ==(o) return true if self.equal?(o) self.class == o.class && account_id == o.account_id && account_no == o.account_no && amount == o.amount && avail_balance == o.avail_balance && available_balance == o.available_balance && balance == o.balance && created == o.created && currency == o.currency && dc_sign == o.dc_sign && is_fee == o.is_fee && is_gl_acc == o.is_gl_acc && is_offset == o.is_offset && is_primary == o.is_primary && == o. && network == o.network && == o. && seq == o.seq && tenant == o.tenant && updated == o.updated && uuid == o.uuid end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 436 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
507 508 509 510 511 512 513 514 515 516 517 518 519 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 507 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
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 412 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
392 393 394 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 392 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
398 399 400 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 398 def hash [account_id, account_no, amount, avail_balance, available_balance, balance, created, currency, dc_sign, is_fee, is_gl_acc, is_offset, is_primary, , network, , seq, tenant, updated, uuid].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 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 332 333 334 335 336 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 257 def list_invalid_properties invalid_properties = Array.new if @account_id.nil? invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') end if @account_no.nil? invalid_properties.push('invalid value for "account_no", account_no cannot be nil.') end if @amount.nil? invalid_properties.push('invalid value for "amount", amount cannot be nil.') end if @avail_balance.nil? invalid_properties.push('invalid value for "avail_balance", avail_balance cannot be nil.') end if @available_balance.nil? invalid_properties.push('invalid value for "available_balance", available_balance cannot be nil.') end if @balance.nil? invalid_properties.push('invalid value for "balance", balance cannot be nil.') end if @created.nil? invalid_properties.push('invalid value for "created", created cannot be nil.') end if @currency.nil? invalid_properties.push('invalid value for "currency", currency cannot be nil.') end if @dc_sign.nil? invalid_properties.push('invalid value for "dc_sign", dc_sign cannot be nil.') end if @is_fee.nil? invalid_properties.push('invalid value for "is_fee", is_fee cannot be nil.') end if @is_gl_acc.nil? invalid_properties.push('invalid value for "is_gl_acc", is_gl_acc cannot be nil.') end if @is_offset.nil? invalid_properties.push('invalid value for "is_offset", is_offset cannot be nil.') end if @is_primary.nil? invalid_properties.push('invalid value for "is_primary", is_primary cannot be nil.') end if @network.nil? invalid_properties.push('invalid value for "network", network cannot be nil.') end if @related_line.nil? invalid_properties.push('invalid value for "related_line", related_line cannot be nil.') end if @seq.nil? invalid_properties.push('invalid value for "seq", seq cannot be nil.') end if @tenant.nil? invalid_properties.push('invalid value for "tenant", tenant cannot be nil.') end if @updated.nil? invalid_properties.push('invalid value for "updated", updated cannot be nil.') end if @uuid.nil? invalid_properties.push('invalid value for "uuid", uuid cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
483 484 485 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 483 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
489 490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 489 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
477 478 479 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 477 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/synctera_ruby_sdk/models/transaction_line1.rb', line 340 def valid? return false if @account_id.nil? return false if @account_no.nil? return false if @amount.nil? return false if @avail_balance.nil? return false if @available_balance.nil? return false if @balance.nil? return false if @created.nil? return false if @currency.nil? return false if @dc_sign.nil? return false if @is_fee.nil? return false if @is_gl_acc.nil? return false if @is_offset.nil? return false if @is_primary.nil? return false if @network.nil? return false if @related_line.nil? return false if @seq.nil? return false if @tenant.nil? return false if @updated.nil? return false if @uuid.nil? true end |