Class: FireflyIIIClient::TransactionSplit
- Inherits:
-
Object
- Object
- FireflyIIIClient::TransactionSplit
- Defined in:
- lib/firefly_iii_client/models/transaction_split.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#amount ⇒ Object
Amount of the transaction.
-
#bill_id ⇒ Object
Optional.
-
#bill_name ⇒ Object
Optional.
-
#book_date ⇒ Object
Returns the value of attribute book_date.
-
#budget_id ⇒ Object
The budget ID for this transaction.
-
#budget_name ⇒ Object
The name of the budget to be used.
-
#bunq_payment_id ⇒ Object
Internal ID of bunq transaction.
-
#category_id ⇒ Object
The category ID for this transaction.
-
#category_name ⇒ Object
The name of the category to be used.
-
#currency_code ⇒ Object
Currency code.
-
#currency_decimal_places ⇒ Object
Number of decimals used in this currency.
-
#currency_id ⇒ Object
Currency ID.
-
#currency_name ⇒ Object
Returns the value of attribute currency_name.
-
#currency_symbol ⇒ Object
Returns the value of attribute currency_symbol.
-
#date ⇒ Object
Date of the transaction.
-
#description ⇒ Object
Description of the transaction.
-
#destination_iban ⇒ Object
Returns the value of attribute destination_iban.
-
#destination_id ⇒ Object
ID of the destination account.
-
#destination_name ⇒ Object
Name of the destination account.
-
#destination_type ⇒ Object
Returns the value of attribute destination_type.
-
#due_date ⇒ Object
Returns the value of attribute due_date.
-
#external_id ⇒ Object
Reference to external ID in other systems.
-
#foreign_amount ⇒ Object
The amount in a foreign currency.
-
#foreign_currency_code ⇒ Object
Currency code.
-
#foreign_currency_decimal_places ⇒ Object
Number of decimals in the currency.
-
#foreign_currency_id ⇒ Object
Currency ID.
-
#foreign_currency_symbol ⇒ Object
Returns the value of attribute foreign_currency_symbol.
-
#import_hash_v2 ⇒ Object
Hash value of original import transaction (for duplicate detection).
-
#interest_date ⇒ Object
Returns the value of attribute interest_date.
-
#internal_reference ⇒ Object
Reference to internal reference of other systems.
-
#invoice_date ⇒ Object
Returns the value of attribute invoice_date.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#order ⇒ Object
Order of this entry in the list of transactions.
-
#original_source ⇒ Object
System generated identifier for original creator of transaction.
-
#payment_date ⇒ Object
Returns the value of attribute payment_date.
-
#piggy_bank_id ⇒ Object
Optional.
-
#piggy_bank_name ⇒ Object
Optional.
-
#process_date ⇒ Object
Returns the value of attribute process_date.
-
#reconciled ⇒ Object
If the transaction has been reconciled already.
-
#recurrence_id ⇒ Object
Reference to recurrence that made the transaction.
-
#sepa_batch_id ⇒ Object
SEPA Batch ID.
-
#sepa_cc ⇒ Object
SEPA Clearing Code.
-
#sepa_ci ⇒ Object
SEPA Creditor Identifier.
-
#sepa_country ⇒ Object
SEPA Country.
-
#sepa_ct_id ⇒ Object
SEPA end-to-end Identifier.
-
#sepa_ct_op ⇒ Object
SEPA Opposing Account Identifier.
-
#sepa_db ⇒ Object
SEPA mandate identifier.
-
#sepa_ep ⇒ Object
SEPA External Purpose indicator.
-
#source_iban ⇒ Object
Returns the value of attribute source_iban.
-
#source_id ⇒ Object
ID of the source account.
-
#source_name ⇒ Object
Name of the source account.
-
#source_type ⇒ Object
Returns the value of attribute source_type.
-
#tags ⇒ Object
Array of tags.
-
#transaction_journal_id ⇒ Object
ID of the underlying transaction journal.
-
#type ⇒ Object
Type of transaction.
-
#user ⇒ Object
User ID.
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 = {}) ⇒ TransactionSplit
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 = {}) ⇒ TransactionSplit
Initializes the object
375 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 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 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 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 375 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FireflyIIIClient::TransactionSplit` 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 `FireflyIIIClient::TransactionSplit`. 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?(:'user') self.user = attributes[:'user'] end if attributes.key?(:'transaction_journal_id') self.transaction_journal_id = attributes[:'transaction_journal_id'] end if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'date') self.date = attributes[:'date'] end if attributes.key?(:'amount') self.amount = attributes[:'amount'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'order') self.order = attributes[:'order'] end if attributes.key?(:'currency_id') self.currency_id = attributes[:'currency_id'] end if attributes.key?(:'currency_code') self.currency_code = attributes[:'currency_code'] end if attributes.key?(:'currency_symbol') self.currency_symbol = attributes[:'currency_symbol'] end if attributes.key?(:'currency_name') self.currency_name = attributes[:'currency_name'] end if attributes.key?(:'currency_decimal_places') self.currency_decimal_places = attributes[:'currency_decimal_places'] end if attributes.key?(:'foreign_amount') self.foreign_amount = attributes[:'foreign_amount'] end if attributes.key?(:'foreign_currency_id') self.foreign_currency_id = attributes[:'foreign_currency_id'] end if attributes.key?(:'foreign_currency_code') self.foreign_currency_code = attributes[:'foreign_currency_code'] end if attributes.key?(:'foreign_currency_symbol') self.foreign_currency_symbol = attributes[:'foreign_currency_symbol'] end if attributes.key?(:'foreign_currency_decimal_places') self.foreign_currency_decimal_places = attributes[:'foreign_currency_decimal_places'] end if attributes.key?(:'budget_id') self.budget_id = attributes[:'budget_id'] end if attributes.key?(:'budget_name') self.budget_name = attributes[:'budget_name'] end if attributes.key?(:'category_id') self.category_id = attributes[:'category_id'] end if attributes.key?(:'category_name') self.category_name = attributes[:'category_name'] end if attributes.key?(:'source_id') self.source_id = attributes[:'source_id'] end if attributes.key?(:'source_name') self.source_name = attributes[:'source_name'] end if attributes.key?(:'source_iban') self.source_iban = attributes[:'source_iban'] end if attributes.key?(:'source_type') self.source_type = attributes[:'source_type'] end if attributes.key?(:'destination_id') self.destination_id = attributes[:'destination_id'] end if attributes.key?(:'destination_name') self.destination_name = attributes[:'destination_name'] end if attributes.key?(:'destination_iban') self.destination_iban = attributes[:'destination_iban'] end if attributes.key?(:'destination_type') self.destination_type = attributes[:'destination_type'] end if attributes.key?(:'reconciled') self.reconciled = attributes[:'reconciled'] end if attributes.key?(:'piggy_bank_id') self.piggy_bank_id = attributes[:'piggy_bank_id'] end if attributes.key?(:'piggy_bank_name') self.piggy_bank_name = attributes[:'piggy_bank_name'] end if attributes.key?(:'bill_id') self.bill_id = attributes[:'bill_id'] end if attributes.key?(:'bill_name') self.bill_name = attributes[:'bill_name'] end if attributes.key?(:'tags') if (value = attributes[:'tags']).is_a?(Array) self. = value end end if attributes.key?(:'notes') self.notes = attributes[:'notes'] end if attributes.key?(:'internal_reference') self.internal_reference = attributes[:'internal_reference'] end if attributes.key?(:'external_id') self.external_id = attributes[:'external_id'] end if attributes.key?(:'original_source') self.original_source = attributes[:'original_source'] end if attributes.key?(:'recurrence_id') self.recurrence_id = attributes[:'recurrence_id'] end if attributes.key?(:'bunq_payment_id') self.bunq_payment_id = attributes[:'bunq_payment_id'] end if attributes.key?(:'import_hash_v2') self.import_hash_v2 = attributes[:'import_hash_v2'] end if attributes.key?(:'sepa_cc') self.sepa_cc = attributes[:'sepa_cc'] end if attributes.key?(:'sepa_ct_op') self.sepa_ct_op = attributes[:'sepa_ct_op'] end if attributes.key?(:'sepa_ct_id') self.sepa_ct_id = attributes[:'sepa_ct_id'] end if attributes.key?(:'sepa_db') self.sepa_db = attributes[:'sepa_db'] end if attributes.key?(:'sepa_country') self.sepa_country = attributes[:'sepa_country'] end if attributes.key?(:'sepa_ep') self.sepa_ep = attributes[:'sepa_ep'] end if attributes.key?(:'sepa_ci') self.sepa_ci = attributes[:'sepa_ci'] end if attributes.key?(:'sepa_batch_id') self.sepa_batch_id = attributes[:'sepa_batch_id'] end if attributes.key?(:'interest_date') self.interest_date = attributes[:'interest_date'] end if attributes.key?(:'book_date') self.book_date = attributes[:'book_date'] end if attributes.key?(:'process_date') self.process_date = attributes[:'process_date'] end if attributes.key?(:'due_date') self.due_date = attributes[:'due_date'] end if attributes.key?(:'payment_date') self.payment_date = attributes[:'payment_date'] end if attributes.key?(:'invoice_date') self.invoice_date = attributes[:'invoice_date'] end end |
Instance Attribute Details
#amount ⇒ Object
Amount of the transaction.
31 32 33 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 31 def amount @amount end |
#bill_id ⇒ Object
Optional. Use either this or the bill_name
108 109 110 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 108 def bill_id @bill_id end |
#bill_name ⇒ Object
Optional. Use either this or the bill_id
111 112 113 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 111 def bill_name @bill_name end |
#book_date ⇒ Object
Returns the value of attribute book_date.
162 163 164 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 162 def book_date @book_date end |
#budget_id ⇒ Object
The budget ID for this transaction.
67 68 69 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 67 def budget_id @budget_id end |
#budget_name ⇒ Object
The name of the budget to be used. If the budget name is unknown, the ID will be used or the value will be ignored.
70 71 72 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 70 def budget_name @budget_name end |
#bunq_payment_id ⇒ Object
Internal ID of bunq transaction.
131 132 133 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 131 def bunq_payment_id @bunq_payment_id end |
#category_id ⇒ Object
The category ID for this transaction.
73 74 75 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 73 def category_id @category_id end |
#category_name ⇒ Object
The name of the category to be used. If the category is unknown, it will be created. If the ID and the name point to different categories, the ID overrules the name.
76 77 78 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 76 def category_name @category_name end |
#currency_code ⇒ Object
Currency code. Default is the source account’s currency, or the user’s default currency. Can be used instead of currency_id.
43 44 45 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 43 def currency_code @currency_code end |
#currency_decimal_places ⇒ Object
Number of decimals used in this currency.
50 51 52 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 50 def currency_decimal_places @currency_decimal_places end |
#currency_id ⇒ Object
Currency ID. Default is the source account’s currency, or the user’s default currency. Can be used instead of currency_code.
40 41 42 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 40 def currency_id @currency_id end |
#currency_name ⇒ Object
Returns the value of attribute currency_name.
47 48 49 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 47 def currency_name @currency_name end |
#currency_symbol ⇒ Object
Returns the value of attribute currency_symbol.
45 46 47 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 45 def currency_symbol @currency_symbol end |
#date ⇒ Object
Date of the transaction
28 29 30 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 28 def date @date end |
#description ⇒ Object
Description of the transaction. Will only be used if more than one split is submitted.
34 35 36 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 34 def description @description end |
#destination_iban ⇒ Object
Returns the value of attribute destination_iban.
94 95 96 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 94 def destination_iban @destination_iban end |
#destination_id ⇒ Object
ID of the destination account. For a deposit or a transfer, this must always be an asset account. For withdrawals this must be an expense account.
89 90 91 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 89 def destination_id @destination_id end |
#destination_name ⇒ Object
Name of the destination account. You can submit the name instead of the ID. For everything except transfers, the account will be auto-generated if unknown, so submitting a name is enough.
92 93 94 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 92 def destination_name @destination_name end |
#destination_type ⇒ Object
Returns the value of attribute destination_type.
96 97 98 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 96 def destination_type @destination_type end |
#due_date ⇒ Object
Returns the value of attribute due_date.
166 167 168 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 166 def due_date @due_date end |
#external_id ⇒ Object
Reference to external ID in other systems.
122 123 124 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 122 def external_id @external_id end |
#foreign_amount ⇒ Object
The amount in a foreign currency.
53 54 55 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 53 def foreign_amount @foreign_amount end |
#foreign_currency_code ⇒ Object
Currency code. Default is NULL. Can be used instead of the foreign_currency_id, but either is required when submitting a foreign amount.
59 60 61 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 59 def foreign_currency_code @foreign_currency_code end |
#foreign_currency_decimal_places ⇒ Object
Number of decimals in the currency
64 65 66 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 64 def foreign_currency_decimal_places @foreign_currency_decimal_places end |
#foreign_currency_id ⇒ Object
Currency ID. Default is null. Is required when you submit a foreign amount.
56 57 58 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 56 def foreign_currency_id @foreign_currency_id end |
#foreign_currency_symbol ⇒ Object
Returns the value of attribute foreign_currency_symbol.
61 62 63 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 61 def foreign_currency_symbol @foreign_currency_symbol end |
#import_hash_v2 ⇒ Object
Hash value of original import transaction (for duplicate detection).
134 135 136 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 134 def import_hash_v2 @import_hash_v2 end |
#interest_date ⇒ Object
Returns the value of attribute interest_date.
160 161 162 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 160 def interest_date @interest_date end |
#internal_reference ⇒ Object
Reference to internal reference of other systems.
119 120 121 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 119 def internal_reference @internal_reference end |
#invoice_date ⇒ Object
Returns the value of attribute invoice_date.
170 171 172 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 170 def invoice_date @invoice_date end |
#notes ⇒ Object
Returns the value of attribute notes.
116 117 118 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 116 def notes @notes end |
#order ⇒ Object
Order of this entry in the list of transactions.
37 38 39 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 37 def order @order end |
#original_source ⇒ Object
System generated identifier for original creator of transaction.
125 126 127 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 125 def original_source @original_source end |
#payment_date ⇒ Object
Returns the value of attribute payment_date.
168 169 170 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 168 def payment_date @payment_date end |
#piggy_bank_id ⇒ Object
Optional. Use either this or the piggy_bank_name
102 103 104 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 102 def piggy_bank_id @piggy_bank_id end |
#piggy_bank_name ⇒ Object
Optional. Use either this or the piggy_bank_id
105 106 107 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 105 def piggy_bank_name @piggy_bank_name end |
#process_date ⇒ Object
Returns the value of attribute process_date.
164 165 166 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 164 def process_date @process_date end |
#reconciled ⇒ Object
If the transaction has been reconciled already. When you set this, the amount can no longer be edited by the user.
99 100 101 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 99 def reconciled @reconciled end |
#recurrence_id ⇒ Object
Reference to recurrence that made the transaction.
128 129 130 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 128 def recurrence_id @recurrence_id end |
#sepa_batch_id ⇒ Object
SEPA Batch ID
158 159 160 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 158 def sepa_batch_id @sepa_batch_id end |
#sepa_cc ⇒ Object
SEPA Clearing Code
137 138 139 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 137 def sepa_cc @sepa_cc end |
#sepa_ci ⇒ Object
SEPA Creditor Identifier
155 156 157 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 155 def sepa_ci @sepa_ci end |
#sepa_country ⇒ Object
SEPA Country
149 150 151 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 149 def sepa_country @sepa_country end |
#sepa_ct_id ⇒ Object
SEPA end-to-end Identifier
143 144 145 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 143 def sepa_ct_id @sepa_ct_id end |
#sepa_ct_op ⇒ Object
SEPA Opposing Account Identifier
140 141 142 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 140 def sepa_ct_op @sepa_ct_op end |
#sepa_db ⇒ Object
SEPA mandate identifier
146 147 148 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 146 def sepa_db @sepa_db end |
#sepa_ep ⇒ Object
SEPA External Purpose indicator
152 153 154 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 152 def sepa_ep @sepa_ep end |
#source_iban ⇒ Object
Returns the value of attribute source_iban.
84 85 86 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 84 def source_iban @source_iban end |
#source_id ⇒ Object
ID of the source account. For a withdrawal or a transfer, this must always be an asset account. For deposits, this must be a revenue account.
79 80 81 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 79 def source_id @source_id end |
#source_name ⇒ Object
Name of the source account. For a withdrawal or a transfer, this must always be an asset account. For deposits, this must be a revenue account. Can be used instead of the source_id. If the transaction is a deposit, the source_name can be filled in freely: the account will be created based on the name.
82 83 84 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 82 def source_name @source_name end |
#source_type ⇒ Object
Returns the value of attribute source_type.
86 87 88 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 86 def source_type @source_type end |
#tags ⇒ Object
Array of tags.
114 115 116 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 114 def @tags end |
#transaction_journal_id ⇒ Object
ID of the underlying transaction journal. Each transaction consists of a transaction group (see the top ID) and one or more journals making up the splits of the transaction.
22 23 24 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 22 def transaction_journal_id @transaction_journal_id end |
#type ⇒ Object
Type of transaction. expense cannot be written.
25 26 27 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 25 def type @type end |
#user ⇒ Object
User ID
19 20 21 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 19 def user @user end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
257 258 259 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 257 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 195 def self.attribute_map { :'user' => :'user', :'transaction_journal_id' => :'transaction_journal_id', :'type' => :'type', :'date' => :'date', :'amount' => :'amount', :'description' => :'description', :'order' => :'order', :'currency_id' => :'currency_id', :'currency_code' => :'currency_code', :'currency_symbol' => :'currency_symbol', :'currency_name' => :'currency_name', :'currency_decimal_places' => :'currency_decimal_places', :'foreign_amount' => :'foreign_amount', :'foreign_currency_id' => :'foreign_currency_id', :'foreign_currency_code' => :'foreign_currency_code', :'foreign_currency_symbol' => :'foreign_currency_symbol', :'foreign_currency_decimal_places' => :'foreign_currency_decimal_places', :'budget_id' => :'budget_id', :'budget_name' => :'budget_name', :'category_id' => :'category_id', :'category_name' => :'category_name', :'source_id' => :'source_id', :'source_name' => :'source_name', :'source_iban' => :'source_iban', :'source_type' => :'source_type', :'destination_id' => :'destination_id', :'destination_name' => :'destination_name', :'destination_iban' => :'destination_iban', :'destination_type' => :'destination_type', :'reconciled' => :'reconciled', :'piggy_bank_id' => :'piggy_bank_id', :'piggy_bank_name' => :'piggy_bank_name', :'bill_id' => :'bill_id', :'bill_name' => :'bill_name', :'tags' => :'tags', :'notes' => :'notes', :'internal_reference' => :'internal_reference', :'external_id' => :'external_id', :'original_source' => :'original_source', :'recurrence_id' => :'recurrence_id', :'bunq_payment_id' => :'bunq_payment_id', :'import_hash_v2' => :'import_hash_v2', :'sepa_cc' => :'sepa_cc', :'sepa_ct_op' => :'sepa_ct_op', :'sepa_ct_id' => :'sepa_ct_id', :'sepa_db' => :'sepa_db', :'sepa_country' => :'sepa_country', :'sepa_ep' => :'sepa_ep', :'sepa_ci' => :'sepa_ci', :'sepa_batch_id' => :'sepa_batch_id', :'interest_date' => :'interest_date', :'book_date' => :'book_date', :'process_date' => :'process_date', :'due_date' => :'due_date', :'payment_date' => :'payment_date', :'invoice_date' => :'invoice_date' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
733 734 735 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 733 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 324 def self.openapi_nullable Set.new([ :'order', :'currency_id', :'currency_code', :'foreign_amount', :'foreign_currency_id', :'foreign_currency_code', :'foreign_currency_symbol', :'foreign_currency_decimal_places', :'budget_id', :'budget_name', :'category_id', :'category_name', :'source_id', :'source_name', :'source_iban', :'destination_id', :'destination_name', :'destination_iban', :'reconciled', :'piggy_bank_id', :'piggy_bank_name', :'bill_id', :'bill_name', :'tags', :'notes', :'internal_reference', :'external_id', :'original_source', :'recurrence_id', :'bunq_payment_id', :'import_hash_v2', :'sepa_cc', :'sepa_ct_id', :'sepa_db', :'sepa_country', :'sepa_ep', :'sepa_ci', :'sepa_batch_id', :'interest_date', :'book_date', :'process_date', :'due_date', :'payment_date', :'invoice_date' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 262 def self.openapi_types { :'user' => :'Integer', :'transaction_journal_id' => :'Integer', :'type' => :'String', :'date' => :'Date', :'amount' => :'Float', :'description' => :'String', :'order' => :'Integer', :'currency_id' => :'Integer', :'currency_code' => :'String', :'currency_symbol' => :'String', :'currency_name' => :'String', :'currency_decimal_places' => :'Integer', :'foreign_amount' => :'Float', :'foreign_currency_id' => :'Integer', :'foreign_currency_code' => :'String', :'foreign_currency_symbol' => :'String', :'foreign_currency_decimal_places' => :'Integer', :'budget_id' => :'Integer', :'budget_name' => :'String', :'category_id' => :'Integer', :'category_name' => :'String', :'source_id' => :'Integer', :'source_name' => :'String', :'source_iban' => :'String', :'source_type' => :'AccountTypeProperty', :'destination_id' => :'Integer', :'destination_name' => :'String', :'destination_iban' => :'String', :'destination_type' => :'AccountTypeProperty', :'reconciled' => :'Boolean', :'piggy_bank_id' => :'Integer', :'piggy_bank_name' => :'String', :'bill_id' => :'Integer', :'bill_name' => :'String', :'tags' => :'Array<String>', :'notes' => :'String', :'internal_reference' => :'String', :'external_id' => :'String', :'original_source' => :'String', :'recurrence_id' => :'Integer', :'bunq_payment_id' => :'String', :'import_hash_v2' => :'String', :'sepa_cc' => :'String', :'sepa_ct_op' => :'String', :'sepa_ct_id' => :'String', :'sepa_db' => :'String', :'sepa_country' => :'String', :'sepa_ep' => :'String', :'sepa_ci' => :'String', :'sepa_batch_id' => :'String', :'interest_date' => :'Date', :'book_date' => :'Date', :'process_date' => :'Date', :'due_date' => :'Date', :'payment_date' => :'Date', :'invoice_date' => :'Date' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 657 def ==(o) return true if self.equal?(o) self.class == o.class && user == o.user && transaction_journal_id == o.transaction_journal_id && type == o.type && date == o.date && amount == o.amount && description == o.description && order == o.order && currency_id == o.currency_id && currency_code == o.currency_code && currency_symbol == o.currency_symbol && currency_name == o.currency_name && currency_decimal_places == o.currency_decimal_places && foreign_amount == o.foreign_amount && foreign_currency_id == o.foreign_currency_id && foreign_currency_code == o.foreign_currency_code && foreign_currency_symbol == o.foreign_currency_symbol && foreign_currency_decimal_places == o.foreign_currency_decimal_places && budget_id == o.budget_id && budget_name == o.budget_name && category_id == o.category_id && category_name == o.category_name && source_id == o.source_id && source_name == o.source_name && source_iban == o.source_iban && source_type == o.source_type && destination_id == o.destination_id && destination_name == o.destination_name && destination_iban == o.destination_iban && destination_type == o.destination_type && reconciled == o.reconciled && piggy_bank_id == o.piggy_bank_id && piggy_bank_name == o.piggy_bank_name && bill_id == o.bill_id && bill_name == o.bill_name && == o. && notes == o.notes && internal_reference == o.internal_reference && external_id == o.external_id && original_source == o.original_source && recurrence_id == o.recurrence_id && bunq_payment_id == o.bunq_payment_id && import_hash_v2 == o.import_hash_v2 && sepa_cc == o.sepa_cc && sepa_ct_op == o.sepa_ct_op && sepa_ct_id == o.sepa_ct_id && sepa_db == o.sepa_db && sepa_country == o.sepa_country && sepa_ep == o.sepa_ep && sepa_ci == o.sepa_ci && sepa_batch_id == o.sepa_batch_id && interest_date == o.interest_date && book_date == o.book_date && process_date == o.process_date && due_date == o.due_date && payment_date == o.payment_date && invoice_date == o.invoice_date end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 763 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 = FireflyIIIClient.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
834 835 836 837 838 839 840 841 842 843 844 845 846 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 834 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
740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 740 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) 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
720 721 722 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 720 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
726 727 728 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 726 def hash [user, transaction_journal_id, type, date, amount, description, order, currency_id, currency_code, currency_symbol, currency_name, currency_decimal_places, foreign_amount, foreign_currency_id, foreign_currency_code, foreign_currency_symbol, foreign_currency_decimal_places, budget_id, budget_name, category_id, category_name, source_id, source_name, source_iban, source_type, destination_id, destination_name, destination_iban, destination_type, reconciled, piggy_bank_id, piggy_bank_name, bill_id, bill_name, , notes, internal_reference, external_id, original_source, recurrence_id, bunq_payment_id, import_hash_v2, sepa_cc, sepa_ct_op, sepa_ct_id, sepa_db, sepa_country, sepa_ep, sepa_ci, sepa_batch_id, interest_date, book_date, process_date, due_date, payment_date, invoice_date].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 617 def list_invalid_properties invalid_properties = Array.new if @date.nil? invalid_properties.push('invalid value for "date", date cannot be nil.') end if @amount.nil? invalid_properties.push('invalid value for "amount", amount cannot be nil.') end if @description.nil? invalid_properties.push('invalid value for "description", description cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
810 811 812 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 810 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
816 817 818 819 820 821 822 823 824 825 826 827 828 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 816 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
804 805 806 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 804 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
636 637 638 639 640 641 642 643 |
# File 'lib/firefly_iii_client/models/transaction_split.rb', line 636 def valid? type_validator = EnumAttributeValidator.new('String', ["withdrawal", "expense", "deposit", "transfer", "opening-balance", "reconciliation"]) return false unless type_validator.valid?(@type) return false if @date.nil? return false if @amount.nil? return false if @description.nil? true end |