Class: FattureInCloud_Ruby_Sdk::IssuedDocument
- Inherits:
-
Object
- Object
- FattureInCloud_Ruby_Sdk::IssuedDocument
- Defined in:
- lib/fattureincloud_ruby_sdk/models/issued_document.rb
Instance Attribute Summary collapse
-
#acc_inv_template ⇒ Object
Returns the value of attribute acc_inv_template.
-
#accompanying_invoice ⇒ Object
Attach an accompanying invoice.
-
#amount_cassa ⇒ Object
- Read Only
-
Cassa amount.
-
#amount_cassa2 ⇒ Object
Returns the value of attribute amount_cassa2.
-
#amount_cassa2_taxable ⇒ Object
Returns the value of attribute amount_cassa2_taxable.
-
#amount_cassa_taxable ⇒ Object
Returns the value of attribute amount_cassa_taxable.
-
#amount_due_discount ⇒ Object
Returns the value of attribute amount_due_discount.
-
#amount_enasarco_taxable ⇒ Object
Returns the value of attribute amount_enasarco_taxable.
-
#amount_global_cassa_taxable ⇒ Object
Returns the value of attribute amount_global_cassa_taxable.
-
#amount_gross ⇒ Object
- Read Only
-
Total gross amount (totale documento).
-
#amount_net ⇒ Object
- Read Only
-
Total net amount (competenze).
-
#amount_other_withholding_tax ⇒ Object
- Read Only
-
Other withholding tax amount (altra ritenuta).
-
#amount_other_withholding_tax_taxable ⇒ Object
Returns the value of attribute amount_other_withholding_tax_taxable.
-
#amount_rivalsa ⇒ Object
- Read Only
-
Rivalsa amount.
-
#amount_rivalsa_taxable ⇒ Object
Returns the value of attribute amount_rivalsa_taxable.
-
#amount_vat ⇒ Object
- Read Only
-
Total vat amount (IVA).
-
#amount_withholding_tax ⇒ Object
- Read Only
-
Withholding tax amount (ritenuta d’acconto).
-
#amount_withholding_tax_taxable ⇒ Object
Returns the value of attribute amount_withholding_tax_taxable.
-
#attachment_token ⇒ Object
- Write Only
-
Attachment token returned by POST /issued_documents/attachment.
-
#attachment_url ⇒ Object
- Read Only
-
Public url of the attached file.
-
#cassa ⇒ Object
"Cassa previdenziale" percentual value.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#date ⇒ Object
Date of the document [If not specified, today date is used].
-
#delivery_note ⇒ Object
Returns the value of attribute delivery_note.
-
#delivery_note_template ⇒ Object
Returns the value of attribute delivery_note_template.
-
#dn_ai_causal ⇒ Object
Causal (for the attached delivery note).
-
#dn_ai_destination ⇒ Object
Destination (for the attached delivery note).
-
#dn_ai_notes ⇒ Object
Notes (for the attached delivery note).
-
#dn_ai_packages_number ⇒ Object
Number of packages (for the attached delivery note).
-
#dn_ai_transporter ⇒ Object
Transporter (for the attached delivery note).
-
#dn_ai_weight ⇒ Object
Weight (for the attached delivery note).
-
#dn_date ⇒ Object
Date (for the attached delivery note).
-
#dn_number ⇒ Object
Number (for the attached delivery note).
-
#e_invoice ⇒ Object
Indicates if this is an e-invoice.
-
#ei_cassa2_type ⇒ Object
Returns the value of attribute ei_cassa2_type.
-
#ei_cassa_type ⇒ Object
Returns the value of attribute ei_cassa_type.
-
#ei_data ⇒ Object
Returns the value of attribute ei_data.
-
#ei_other_withholding_tax_causal ⇒ Object
Returns the value of attribute ei_other_withholding_tax_causal.
-
#ei_other_withholding_tax_type ⇒ Object
Returns the value of attribute ei_other_withholding_tax_type.
-
#ei_raw ⇒ Object
Advanced raw attributes for e-invoices.
-
#ei_withholding_tax_causal ⇒ Object
Returns the value of attribute ei_withholding_tax_causal.
-
#entity ⇒ Object
Returns the value of attribute entity.
-
#extra_data ⇒ Object
Returns the value of attribute extra_data.
-
#h_margins ⇒ Object
Horizontal margins.
-
#id ⇒ Object
Unique identifier of the document.
-
#is_marked ⇒ Object
This is true if the document is marked.
-
#items_list ⇒ Object
Returns the value of attribute items_list.
-
#language ⇒ Object
Returns the value of attribute language.
-
#next_due_date ⇒ Object
Date of the next not paid payment.
-
#notes ⇒ Object
Issued document extra notes.
-
#number ⇒ Object
Number of the document [If not specified, next number is used].
-
#numeration ⇒ Object
Numeration of the document [Not available if type=delivery_note].
-
#other_withholding_tax ⇒ Object
Other withholding tax (altra ritenuta) percentual value.
-
#payment_method ⇒ Object
Returns the value of attribute payment_method.
-
#payments_list ⇒ Object
Returns the value of attribute payments_list.
-
#rc_center ⇒ Object
Revenue center [or cost center if type=supplier_order].
-
#refers_to ⇒ Object
Returns the value of attribute refers_to.
-
#rivalsa ⇒ Object
"Rivalsa INPS" percentual value.
-
#seen_date ⇒ Object
Date when the client/supplier has seen the document.
-
#show_notification_button ⇒ Object
Returns the value of attribute show_notification_button.
-
#show_payment_method ⇒ Object
Show the payment method details on the document.
-
#show_payments ⇒ Object
Shows the expiration dates of the payments on the document.
-
#show_paypal_button ⇒ Object
Returns the value of attribute show_paypal_button.
-
#show_totals ⇒ Object
Returns the value of attribute show_totals.
-
#show_tspay_button ⇒ Object
Show ts pay button.
-
#stamp_duty ⇒ Object
Stamp duty value [0 if not present].
-
#subject ⇒ Object
Issued document subject.
-
#template ⇒ Object
Returns the value of attribute template.
-
#type ⇒ Object
Returns the value of attribute type.
-
#url ⇒ Object
Public url of the document PDF file.
-
#use_gross_prices ⇒ Object
Returns the value of attribute use_gross_prices.
-
#use_split_payment ⇒ Object
Returns the value of attribute use_split_payment.
-
#v_margins ⇒ Object
Vertical margins.
-
#visible_subject ⇒ Object
Issued document visible subject.
-
#withholding_tax ⇒ Object
Withholding tax (ritenuta d’acconto) percentual value.
-
#withholding_tax_taxable ⇒ Object
Withholding tax taxable (imponibile) percentual value.
-
#year ⇒ Object
Invoice year.
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 = {}) ⇒ IssuedDocument
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 = {}) ⇒ IssuedDocument
Initializes the object
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 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 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 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 423 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FattureInCloud_Ruby_Sdk::IssuedDocument` 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 `FattureInCloud_Ruby_Sdk::IssuedDocument`. 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?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'entity') self.entity = attributes[:'entity'] end if attributes.key?(:'type') self.type = attributes[:'type'] else self.type = 'invoice' end if attributes.key?(:'number') self.number = attributes[:'number'] end if attributes.key?(:'numeration') self.numeration = attributes[:'numeration'] end if attributes.key?(:'date') self.date = attributes[:'date'] end if attributes.key?(:'currency') self.currency = attributes[:'currency'] end if attributes.key?(:'language') self.language = attributes[:'language'] end if attributes.key?(:'subject') self.subject = attributes[:'subject'] end if attributes.key?(:'visible_subject') self.visible_subject = attributes[:'visible_subject'] end if attributes.key?(:'rc_center') self.rc_center = attributes[:'rc_center'] end if attributes.key?(:'notes') self.notes = attributes[:'notes'] end if attributes.key?(:'rivalsa') self.rivalsa = attributes[:'rivalsa'] end if attributes.key?(:'cassa') self.cassa = attributes[:'cassa'] end if attributes.key?(:'withholding_tax') self.withholding_tax = attributes[:'withholding_tax'] end if attributes.key?(:'withholding_tax_taxable') self.withholding_tax_taxable = attributes[:'withholding_tax_taxable'] end if attributes.key?(:'other_withholding_tax') self.other_withholding_tax = attributes[:'other_withholding_tax'] end if attributes.key?(:'stamp_duty') self.stamp_duty = attributes[:'stamp_duty'] end if attributes.key?(:'payment_method') self.payment_method = attributes[:'payment_method'] end if attributes.key?(:'use_split_payment') self.use_split_payment = attributes[:'use_split_payment'] else self.use_split_payment = false end if attributes.key?(:'use_gross_prices') self.use_gross_prices = attributes[:'use_gross_prices'] else self.use_gross_prices = false end if attributes.key?(:'e_invoice') self.e_invoice = attributes[:'e_invoice'] else self.e_invoice = false end if attributes.key?(:'ei_data') self.ei_data = attributes[:'ei_data'] end if attributes.key?(:'items_list') if (value = attributes[:'items_list']).is_a?(Array) self.items_list = value end end if attributes.key?(:'payments_list') if (value = attributes[:'payments_list']).is_a?(Array) self.payments_list = value end end if attributes.key?(:'template') self.template = attributes[:'template'] end if attributes.key?(:'delivery_note_template') self.delivery_note_template = attributes[:'delivery_note_template'] end if attributes.key?(:'acc_inv_template') self.acc_inv_template = attributes[:'acc_inv_template'] end if attributes.key?(:'h_margins') self.h_margins = attributes[:'h_margins'] end if attributes.key?(:'show_payments') self.show_payments = attributes[:'show_payments'] end if attributes.key?(:'show_payment_method') self.show_payment_method = attributes[:'show_payment_method'] end if attributes.key?(:'show_totals') self.show_totals = attributes[:'show_totals'] else self.show_totals = 'all' end if attributes.key?(:'v_margins') self.v_margins = attributes[:'v_margins'] end if attributes.key?(:'show_paypal_button') self. = attributes[:'show_paypal_button'] else self. = false end if attributes.key?(:'show_notification_button') self. = attributes[:'show_notification_button'] else self. = false end if attributes.key?(:'delivery_note') self.delivery_note = attributes[:'delivery_note'] end if attributes.key?(:'accompanying_invoice') self. = attributes[:'accompanying_invoice'] else self. = false end if attributes.key?(:'dn_number') self.dn_number = attributes[:'dn_number'] end if attributes.key?(:'dn_date') self.dn_date = attributes[:'dn_date'] end if attributes.key?(:'dn_ai_packages_number') self.dn_ai_packages_number = attributes[:'dn_ai_packages_number'] end if attributes.key?(:'dn_ai_weight') self.dn_ai_weight = attributes[:'dn_ai_weight'] end if attributes.key?(:'dn_ai_causal') self.dn_ai_causal = attributes[:'dn_ai_causal'] end if attributes.key?(:'dn_ai_destination') self.dn_ai_destination = attributes[:'dn_ai_destination'] end if attributes.key?(:'dn_ai_transporter') self.dn_ai_transporter = attributes[:'dn_ai_transporter'] end if attributes.key?(:'dn_ai_notes') self.dn_ai_notes = attributes[:'dn_ai_notes'] end if attributes.key?(:'refers_to') self.refers_to = attributes[:'refers_to'] end if attributes.key?(:'is_marked') self.is_marked = attributes[:'is_marked'] end if attributes.key?(:'amount_net') self.amount_net = attributes[:'amount_net'] end if attributes.key?(:'amount_vat') self.amount_vat = attributes[:'amount_vat'] end if attributes.key?(:'amount_gross') self.amount_gross = attributes[:'amount_gross'] end if attributes.key?(:'amount_rivalsa') self.amount_rivalsa = attributes[:'amount_rivalsa'] end if attributes.key?(:'amount_cassa') self.amount_cassa = attributes[:'amount_cassa'] end if attributes.key?(:'amount_withholding_tax') self.amount_withholding_tax = attributes[:'amount_withholding_tax'] end if attributes.key?(:'amount_other_withholding_tax') self.amount_other_withholding_tax = attributes[:'amount_other_withholding_tax'] end if attributes.key?(:'extra_data') self.extra_data = attributes[:'extra_data'] end if attributes.key?(:'seen_date') self.seen_date = attributes[:'seen_date'] end if attributes.key?(:'next_due_date') self.next_due_date = attributes[:'next_due_date'] end if attributes.key?(:'url') self.url = attributes[:'url'] end if attributes.key?(:'attachment_url') self. = attributes[:'attachment_url'] end if attributes.key?(:'attachment_token') self. = attributes[:'attachment_token'] end if attributes.key?(:'ei_raw') self.ei_raw = attributes[:'ei_raw'] end if attributes.key?(:'show_tspay_button') self. = attributes[:'show_tspay_button'] end if attributes.key?(:'year') self.year = attributes[:'year'] end if attributes.key?(:'amount_rivalsa_taxable') self.amount_rivalsa_taxable = attributes[:'amount_rivalsa_taxable'] end if attributes.key?(:'amount_global_cassa_taxable') self.amount_global_cassa_taxable = attributes[:'amount_global_cassa_taxable'] end if attributes.key?(:'amount_cassa_taxable') self.amount_cassa_taxable = attributes[:'amount_cassa_taxable'] end if attributes.key?(:'amount_cassa2') self.amount_cassa2 = attributes[:'amount_cassa2'] end if attributes.key?(:'amount_cassa2_taxable') self.amount_cassa2_taxable = attributes[:'amount_cassa2_taxable'] end if attributes.key?(:'amount_withholding_tax_taxable') self.amount_withholding_tax_taxable = attributes[:'amount_withholding_tax_taxable'] end if attributes.key?(:'amount_enasarco_taxable') self.amount_enasarco_taxable = attributes[:'amount_enasarco_taxable'] end if attributes.key?(:'amount_other_withholding_tax_taxable') self.amount_other_withholding_tax_taxable = attributes[:'amount_other_withholding_tax_taxable'] end if attributes.key?(:'ei_cassa_type') self.ei_cassa_type = attributes[:'ei_cassa_type'] end if attributes.key?(:'ei_cassa2_type') self.ei_cassa2_type = attributes[:'ei_cassa2_type'] end if attributes.key?(:'ei_withholding_tax_causal') self.ei_withholding_tax_causal = attributes[:'ei_withholding_tax_causal'] end if attributes.key?(:'ei_other_withholding_tax_type') self.ei_other_withholding_tax_type = attributes[:'ei_other_withholding_tax_type'] end if attributes.key?(:'ei_other_withholding_tax_causal') self.ei_other_withholding_tax_causal = attributes[:'ei_other_withholding_tax_causal'] end if attributes.key?(:'amount_due_discount') self.amount_due_discount = attributes[:'amount_due_discount'] end end |
Instance Attribute Details
#acc_inv_template ⇒ Object
Returns the value of attribute acc_inv_template.
87 88 89 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 87 def acc_inv_template @acc_inv_template end |
#accompanying_invoice ⇒ Object
Attach an accompanying invoice.
110 111 112 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 110 def @accompanying_invoice end |
#amount_cassa ⇒ Object
- Read Only
-
Cassa amount.
154 155 156 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 154 def amount_cassa @amount_cassa end |
#amount_cassa2 ⇒ Object
Returns the value of attribute amount_cassa2.
194 195 196 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 194 def amount_cassa2 @amount_cassa2 end |
#amount_cassa2_taxable ⇒ Object
Returns the value of attribute amount_cassa2_taxable.
196 197 198 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 196 def amount_cassa2_taxable @amount_cassa2_taxable end |
#amount_cassa_taxable ⇒ Object
Returns the value of attribute amount_cassa_taxable.
192 193 194 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 192 def amount_cassa_taxable @amount_cassa_taxable end |
#amount_due_discount ⇒ Object
Returns the value of attribute amount_due_discount.
214 215 216 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 214 def amount_due_discount @amount_due_discount end |
#amount_enasarco_taxable ⇒ Object
Returns the value of attribute amount_enasarco_taxable.
200 201 202 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 200 def amount_enasarco_taxable @amount_enasarco_taxable end |
#amount_global_cassa_taxable ⇒ Object
Returns the value of attribute amount_global_cassa_taxable.
190 191 192 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 190 def amount_global_cassa_taxable @amount_global_cassa_taxable end |
#amount_gross ⇒ Object
- Read Only
-
Total gross amount (totale documento).
148 149 150 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 148 def amount_gross @amount_gross end |
#amount_net ⇒ Object
- Read Only
-
Total net amount (competenze).
142 143 144 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 142 def amount_net @amount_net end |
#amount_other_withholding_tax ⇒ Object
- Read Only
-
Other withholding tax amount (altra ritenuta).
160 161 162 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 160 def amount_other_withholding_tax @amount_other_withholding_tax end |
#amount_other_withholding_tax_taxable ⇒ Object
Returns the value of attribute amount_other_withholding_tax_taxable.
202 203 204 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 202 def amount_other_withholding_tax_taxable @amount_other_withholding_tax_taxable end |
#amount_rivalsa ⇒ Object
- Read Only
-
Rivalsa amount.
151 152 153 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 151 def amount_rivalsa @amount_rivalsa end |
#amount_rivalsa_taxable ⇒ Object
Returns the value of attribute amount_rivalsa_taxable.
188 189 190 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 188 def amount_rivalsa_taxable @amount_rivalsa_taxable end |
#amount_vat ⇒ Object
- Read Only
-
Total vat amount (IVA).
145 146 147 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 145 def amount_vat @amount_vat end |
#amount_withholding_tax ⇒ Object
- Read Only
-
Withholding tax amount (ritenuta d’acconto).
157 158 159 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 157 def amount_withholding_tax @amount_withholding_tax end |
#amount_withholding_tax_taxable ⇒ Object
Returns the value of attribute amount_withholding_tax_taxable.
198 199 200 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 198 def amount_withholding_tax_taxable @amount_withholding_tax_taxable end |
#attachment_token ⇒ Object
- Write Only
-
Attachment token returned by POST /issued_documents/attachment. Used to attach the file already uploaded.
177 178 179 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 177 def @attachment_token end |
#attachment_url ⇒ Object
- Read Only
-
Public url of the attached file. Authomatically set if a valid attachment token is passed via POST /issued_documents or PUT /issued_documents/documentId.
174 175 176 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 174 def @attachment_url end |
#cassa ⇒ Object
"Cassa previdenziale" percentual value
54 55 56 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 54 def cassa @cassa end |
#currency ⇒ Object
Returns the value of attribute currency.
34 35 36 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 34 def currency @currency end |
#date ⇒ Object
Date of the document [If not specified, today date is used]
32 33 34 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 32 def date @date end |
#delivery_note ⇒ Object
Returns the value of attribute delivery_note.
107 108 109 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 107 def delivery_note @delivery_note end |
#delivery_note_template ⇒ Object
Returns the value of attribute delivery_note_template.
85 86 87 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 85 def delivery_note_template @delivery_note_template end |
#dn_ai_causal ⇒ Object
Causal (for the attached delivery note).
125 126 127 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 125 def dn_ai_causal @dn_ai_causal end |
#dn_ai_destination ⇒ Object
Destination (for the attached delivery note).
128 129 130 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 128 def dn_ai_destination @dn_ai_destination end |
#dn_ai_notes ⇒ Object
Notes (for the attached delivery note).
134 135 136 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 134 def dn_ai_notes @dn_ai_notes end |
#dn_ai_packages_number ⇒ Object
Number of packages (for the attached delivery note).
119 120 121 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 119 def dn_ai_packages_number @dn_ai_packages_number end |
#dn_ai_transporter ⇒ Object
Transporter (for the attached delivery note).
131 132 133 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 131 def dn_ai_transporter @dn_ai_transporter end |
#dn_ai_weight ⇒ Object
Weight (for the attached delivery note).
122 123 124 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 122 def dn_ai_weight @dn_ai_weight end |
#dn_date ⇒ Object
Date (for the attached delivery note).
116 117 118 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 116 def dn_date @dn_date end |
#dn_number ⇒ Object
Number (for the attached delivery note).
113 114 115 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 113 def dn_number @dn_number end |
#e_invoice ⇒ Object
Indicates if this is an e-invoice.
75 76 77 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 75 def e_invoice @e_invoice end |
#ei_cassa2_type ⇒ Object
Returns the value of attribute ei_cassa2_type.
206 207 208 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 206 def ei_cassa2_type @ei_cassa2_type end |
#ei_cassa_type ⇒ Object
Returns the value of attribute ei_cassa_type.
204 205 206 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 204 def ei_cassa_type @ei_cassa_type end |
#ei_data ⇒ Object
Returns the value of attribute ei_data.
77 78 79 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 77 def ei_data @ei_data end |
#ei_other_withholding_tax_causal ⇒ Object
Returns the value of attribute ei_other_withholding_tax_causal.
212 213 214 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 212 def ei_other_withholding_tax_causal @ei_other_withholding_tax_causal end |
#ei_other_withholding_tax_type ⇒ Object
Returns the value of attribute ei_other_withholding_tax_type.
210 211 212 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 210 def ei_other_withholding_tax_type @ei_other_withholding_tax_type end |
#ei_raw ⇒ Object
Advanced raw attributes for e-invoices.
180 181 182 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 180 def ei_raw @ei_raw end |
#ei_withholding_tax_causal ⇒ Object
Returns the value of attribute ei_withholding_tax_causal.
208 209 210 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 208 def ei_withholding_tax_causal @ei_withholding_tax_causal end |
#entity ⇒ Object
Returns the value of attribute entity.
21 22 23 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 21 def entity @entity end |
#extra_data ⇒ Object
Returns the value of attribute extra_data.
162 163 164 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 162 def extra_data @extra_data end |
#h_margins ⇒ Object
Horizontal margins.
90 91 92 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 90 def h_margins @h_margins end |
#id ⇒ Object
Unique identifier of the document.
19 20 21 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 19 def id @id end |
#is_marked ⇒ Object
This is true if the document is marked.
139 140 141 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 139 def is_marked @is_marked end |
#items_list ⇒ Object
Returns the value of attribute items_list.
79 80 81 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 79 def items_list @items_list end |
#language ⇒ Object
Returns the value of attribute language.
36 37 38 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 36 def language @language end |
#next_due_date ⇒ Object
Date of the next not paid payment.
168 169 170 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 168 def next_due_date @next_due_date end |
#notes ⇒ Object
Issued document extra notes.
48 49 50 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 48 def notes @notes end |
#number ⇒ Object
Number of the document [If not specified, next number is used]
26 27 28 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 26 def number @number end |
#numeration ⇒ Object
Numeration of the document [Not available if type=delivery_note]
29 30 31 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 29 def numeration @numeration end |
#other_withholding_tax ⇒ Object
Other withholding tax (altra ritenuta) percentual value
63 64 65 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 63 def other_withholding_tax @other_withholding_tax end |
#payment_method ⇒ Object
Returns the value of attribute payment_method.
68 69 70 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 68 def payment_method @payment_method end |
#payments_list ⇒ Object
Returns the value of attribute payments_list.
81 82 83 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 81 def payments_list @payments_list end |
#rc_center ⇒ Object
Revenue center [or cost center if type=supplier_order].
45 46 47 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 45 def rc_center @rc_center end |
#refers_to ⇒ Object
Returns the value of attribute refers_to.
136 137 138 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 136 def refers_to @refers_to end |
#rivalsa ⇒ Object
"Rivalsa INPS" percentual value
51 52 53 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 51 def rivalsa @rivalsa end |
#seen_date ⇒ Object
Date when the client/supplier has seen the document.
165 166 167 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 165 def seen_date @seen_date end |
#show_notification_button ⇒ Object
Returns the value of attribute show_notification_button.
105 106 107 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 105 def @show_notification_button end |
#show_payment_method ⇒ Object
Show the payment method details on the document.
96 97 98 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 96 def show_payment_method @show_payment_method end |
#show_payments ⇒ Object
Shows the expiration dates of the payments on the document.
93 94 95 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 93 def show_payments @show_payments end |
#show_paypal_button ⇒ Object
Returns the value of attribute show_paypal_button.
103 104 105 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 103 def @show_paypal_button end |
#show_totals ⇒ Object
Returns the value of attribute show_totals.
98 99 100 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 98 def show_totals @show_totals end |
#show_tspay_button ⇒ Object
Show ts pay button.
183 184 185 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 183 def @show_tspay_button end |
#stamp_duty ⇒ Object
Stamp duty value [0 if not present]
66 67 68 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 66 def stamp_duty @stamp_duty end |
#subject ⇒ Object
Issued document subject.
39 40 41 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 39 def subject @subject end |
#template ⇒ Object
Returns the value of attribute template.
83 84 85 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 83 def template @template end |
#type ⇒ Object
Returns the value of attribute type.
23 24 25 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 23 def type @type end |
#url ⇒ Object
Public url of the document PDF file.
171 172 173 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 171 def url @url end |
#use_gross_prices ⇒ Object
Returns the value of attribute use_gross_prices.
72 73 74 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 72 def use_gross_prices @use_gross_prices end |
#use_split_payment ⇒ Object
Returns the value of attribute use_split_payment.
70 71 72 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 70 def use_split_payment @use_split_payment end |
#v_margins ⇒ Object
Vertical margins.
101 102 103 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 101 def v_margins @v_margins end |
#visible_subject ⇒ Object
Issued document visible subject.
42 43 44 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 42 def visible_subject @visible_subject end |
#withholding_tax ⇒ Object
Withholding tax (ritenuta d’acconto) percentual value
57 58 59 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 57 def withholding_tax @withholding_tax end |
#withholding_tax_taxable ⇒ Object
Withholding tax taxable (imponibile) percentual value
60 61 62 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 60 def withholding_tax_taxable @withholding_tax_taxable end |
#year ⇒ Object
Invoice year.
186 187 188 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 186 def year @year end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
300 301 302 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 300 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 217 def self.attribute_map { :'id' => :'id', :'entity' => :'entity', :'type' => :'type', :'number' => :'number', :'numeration' => :'numeration', :'date' => :'date', :'currency' => :'currency', :'language' => :'language', :'subject' => :'subject', :'visible_subject' => :'visible_subject', :'rc_center' => :'rc_center', :'notes' => :'notes', :'rivalsa' => :'rivalsa', :'cassa' => :'cassa', :'withholding_tax' => :'withholding_tax', :'withholding_tax_taxable' => :'withholding_tax_taxable', :'other_withholding_tax' => :'other_withholding_tax', :'stamp_duty' => :'stamp_duty', :'payment_method' => :'payment_method', :'use_split_payment' => :'use_split_payment', :'use_gross_prices' => :'use_gross_prices', :'e_invoice' => :'e_invoice', :'ei_data' => :'ei_data', :'items_list' => :'items_list', :'payments_list' => :'payments_list', :'template' => :'template', :'delivery_note_template' => :'delivery_note_template', :'acc_inv_template' => :'acc_inv_template', :'h_margins' => :'h_margins', :'show_payments' => :'show_payments', :'show_payment_method' => :'show_payment_method', :'show_totals' => :'show_totals', :'v_margins' => :'v_margins', :'show_paypal_button' => :'show_paypal_button', :'show_notification_button' => :'show_notification_button', :'delivery_note' => :'delivery_note', :'accompanying_invoice' => :'accompanying_invoice', :'dn_number' => :'dn_number', :'dn_date' => :'dn_date', :'dn_ai_packages_number' => :'dn_ai_packages_number', :'dn_ai_weight' => :'dn_ai_weight', :'dn_ai_causal' => :'dn_ai_causal', :'dn_ai_destination' => :'dn_ai_destination', :'dn_ai_transporter' => :'dn_ai_transporter', :'dn_ai_notes' => :'dn_ai_notes', :'refers_to' => :'refers_to', :'is_marked' => :'is_marked', :'amount_net' => :'amount_net', :'amount_vat' => :'amount_vat', :'amount_gross' => :'amount_gross', :'amount_rivalsa' => :'amount_rivalsa', :'amount_cassa' => :'amount_cassa', :'amount_withholding_tax' => :'amount_withholding_tax', :'amount_other_withholding_tax' => :'amount_other_withholding_tax', :'extra_data' => :'extra_data', :'seen_date' => :'seen_date', :'next_due_date' => :'next_due_date', :'url' => :'url', :'attachment_url' => :'attachment_url', :'attachment_token' => :'attachment_token', :'ei_raw' => :'ei_raw', :'show_tspay_button' => :'show_tspay_button', :'year' => :'year', :'amount_rivalsa_taxable' => :'amount_rivalsa_taxable', :'amount_global_cassa_taxable' => :'amount_global_cassa_taxable', :'amount_cassa_taxable' => :'amount_cassa_taxable', :'amount_cassa2' => :'amount_cassa2', :'amount_cassa2_taxable' => :'amount_cassa2_taxable', :'amount_withholding_tax_taxable' => :'amount_withholding_tax_taxable', :'amount_enasarco_taxable' => :'amount_enasarco_taxable', :'amount_other_withholding_tax_taxable' => :'amount_other_withholding_tax_taxable', :'ei_cassa_type' => :'ei_cassa_type', :'ei_cassa2_type' => :'ei_cassa2_type', :'ei_withholding_tax_causal' => :'ei_withholding_tax_causal', :'ei_other_withholding_tax_type' => :'ei_other_withholding_tax_type', :'ei_other_withholding_tax_causal' => :'ei_other_withholding_tax_causal', :'amount_due_discount' => :'amount_due_discount' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
997 998 999 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 997 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
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 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 388 def self.openapi_nullable Set.new([ :'ei_data', :'items_list', :'payments_list', :'dn_ai_packages_number', :'dn_ai_weight', :'dn_ai_causal', :'dn_ai_destination', :'dn_ai_transporter', :'dn_ai_notes', :'extra_data', :'seen_date', :'next_due_date', :'attachment_token', :'ei_raw', :'show_tspay_button', :'amount_rivalsa_taxable', :'amount_global_cassa_taxable', :'amount_cassa_taxable', :'amount_cassa2', :'amount_cassa2_taxable', :'amount_withholding_tax_taxable', :'amount_enasarco_taxable', :'amount_other_withholding_tax_taxable', :'ei_cassa_type', :'ei_cassa2_type', :'ei_withholding_tax_causal', :'ei_other_withholding_tax_type', :'ei_other_withholding_tax_causal', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 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 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 305 def self.openapi_types { :'id' => :'Integer', :'entity' => :'Entity', :'type' => :'IssuedDocumentType', :'number' => :'Integer', :'numeration' => :'String', :'date' => :'Date', :'currency' => :'Currency', :'language' => :'Language', :'subject' => :'String', :'visible_subject' => :'String', :'rc_center' => :'String', :'notes' => :'String', :'rivalsa' => :'Float', :'cassa' => :'Float', :'withholding_tax' => :'Float', :'withholding_tax_taxable' => :'Float', :'other_withholding_tax' => :'Float', :'stamp_duty' => :'Float', :'payment_method' => :'PaymentMethod', :'use_split_payment' => :'Boolean', :'use_gross_prices' => :'Boolean', :'e_invoice' => :'Boolean', :'ei_data' => :'IssuedDocumentEiData', :'items_list' => :'Array<IssuedDocumentItemsList>', :'payments_list' => :'Array<IssuedDocumentPaymentsList>', :'template' => :'DocumentTemplate', :'delivery_note_template' => :'DocumentTemplate', :'acc_inv_template' => :'DocumentTemplate', :'h_margins' => :'Integer', :'show_payments' => :'Boolean', :'show_payment_method' => :'Boolean', :'show_totals' => :'ShowTotalsMode', :'v_margins' => :'Integer', :'show_paypal_button' => :'Boolean', :'show_notification_button' => :'Boolean', :'delivery_note' => :'Boolean', :'accompanying_invoice' => :'Boolean', :'dn_number' => :'Integer', :'dn_date' => :'Date', :'dn_ai_packages_number' => :'String', :'dn_ai_weight' => :'String', :'dn_ai_causal' => :'String', :'dn_ai_destination' => :'String', :'dn_ai_transporter' => :'String', :'dn_ai_notes' => :'String', :'refers_to' => :'IssuedDocumentRefersTo', :'is_marked' => :'Boolean', :'amount_net' => :'Float', :'amount_vat' => :'Float', :'amount_gross' => :'Float', :'amount_rivalsa' => :'Float', :'amount_cassa' => :'Float', :'amount_withholding_tax' => :'Float', :'amount_other_withholding_tax' => :'Float', :'extra_data' => :'IssuedDocumentExtraData', :'seen_date' => :'Date', :'next_due_date' => :'Date', :'url' => :'String', :'attachment_url' => :'String', :'attachment_token' => :'String', :'ei_raw' => :'Object', :'show_tspay_button' => :'Boolean', :'year' => :'Integer', :'amount_rivalsa_taxable' => :'Float', :'amount_global_cassa_taxable' => :'Float', :'amount_cassa_taxable' => :'Float', :'amount_cassa2' => :'Float', :'amount_cassa2_taxable' => :'Float', :'amount_withholding_tax_taxable' => :'Float', :'amount_enasarco_taxable' => :'Float', :'amount_other_withholding_tax_taxable' => :'Float', :'ei_cassa_type' => :'String', :'ei_cassa2_type' => :'String', :'ei_withholding_tax_causal' => :'String', :'ei_other_withholding_tax_type' => :'String', :'ei_other_withholding_tax_causal' => :'String', :'amount_due_discount' => :'Float' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 900 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && entity == o.entity && type == o.type && number == o.number && numeration == o.numeration && date == o.date && currency == o.currency && language == o.language && subject == o.subject && visible_subject == o.visible_subject && rc_center == o.rc_center && notes == o.notes && rivalsa == o.rivalsa && cassa == o.cassa && withholding_tax == o.withholding_tax && withholding_tax_taxable == o.withholding_tax_taxable && other_withholding_tax == o.other_withholding_tax && stamp_duty == o.stamp_duty && payment_method == o.payment_method && use_split_payment == o.use_split_payment && use_gross_prices == o.use_gross_prices && e_invoice == o.e_invoice && ei_data == o.ei_data && items_list == o.items_list && payments_list == o.payments_list && template == o.template && delivery_note_template == o.delivery_note_template && acc_inv_template == o.acc_inv_template && h_margins == o.h_margins && show_payments == o.show_payments && show_payment_method == o.show_payment_method && show_totals == o.show_totals && v_margins == o.v_margins && == o. && == o. && delivery_note == o.delivery_note && == o. && dn_number == o.dn_number && dn_date == o.dn_date && dn_ai_packages_number == o.dn_ai_packages_number && dn_ai_weight == o.dn_ai_weight && dn_ai_causal == o.dn_ai_causal && dn_ai_destination == o.dn_ai_destination && dn_ai_transporter == o.dn_ai_transporter && dn_ai_notes == o.dn_ai_notes && refers_to == o.refers_to && is_marked == o.is_marked && amount_net == o.amount_net && amount_vat == o.amount_vat && amount_gross == o.amount_gross && amount_rivalsa == o.amount_rivalsa && amount_cassa == o.amount_cassa && amount_withholding_tax == o.amount_withholding_tax && amount_other_withholding_tax == o.amount_other_withholding_tax && extra_data == o.extra_data && seen_date == o.seen_date && next_due_date == o.next_due_date && url == o.url && == o. && == o. && ei_raw == o.ei_raw && == o. && year == o.year && amount_rivalsa_taxable == o.amount_rivalsa_taxable && amount_global_cassa_taxable == o.amount_global_cassa_taxable && amount_cassa_taxable == o.amount_cassa_taxable && amount_cassa2 == o.amount_cassa2 && amount_cassa2_taxable == o.amount_cassa2_taxable && amount_withholding_tax_taxable == o.amount_withholding_tax_taxable && amount_enasarco_taxable == o.amount_enasarco_taxable && amount_other_withholding_tax_taxable == o.amount_other_withholding_tax_taxable && ei_cassa_type == o.ei_cassa_type && ei_cassa2_type == o.ei_cassa2_type && ei_withholding_tax_causal == o.ei_withholding_tax_causal && ei_other_withholding_tax_type == o.ei_other_withholding_tax_type && ei_other_withholding_tax_causal == o.ei_other_withholding_tax_causal && amount_due_discount == o.amount_due_discount end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1027 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 = FattureInCloud_Ruby_Sdk.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
1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1098 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
1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1004 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
984 985 986 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 984 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
990 991 992 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 990 def hash [id, entity, type, number, numeration, date, currency, language, subject, visible_subject, rc_center, notes, rivalsa, cassa, withholding_tax, withholding_tax_taxable, other_withholding_tax, stamp_duty, payment_method, use_split_payment, use_gross_prices, e_invoice, ei_data, items_list, payments_list, template, delivery_note_template, acc_inv_template, h_margins, show_payments, show_payment_method, show_totals, v_margins, , , delivery_note, , dn_number, dn_date, dn_ai_packages_number, dn_ai_weight, dn_ai_causal, dn_ai_destination, dn_ai_transporter, dn_ai_notes, refers_to, is_marked, amount_net, amount_vat, amount_gross, amount_rivalsa, amount_cassa, amount_withholding_tax, amount_other_withholding_tax, extra_data, seen_date, next_due_date, url, , , ei_raw, , year, amount_rivalsa_taxable, amount_global_cassa_taxable, amount_cassa_taxable, amount_cassa2, amount_cassa2_taxable, amount_withholding_tax_taxable, amount_enasarco_taxable, amount_other_withholding_tax_taxable, ei_cassa_type, ei_cassa2_type, ei_withholding_tax_causal, ei_other_withholding_tax_type, ei_other_withholding_tax_causal, amount_due_discount].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 801 802 803 804 805 806 807 808 809 810 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 767 def list_invalid_properties invalid_properties = Array.new if !@rivalsa.nil? && @rivalsa > 100 invalid_properties.push('invalid value for "rivalsa", must be smaller than or equal to 100.') end if !@rivalsa.nil? && @rivalsa < 0 invalid_properties.push('invalid value for "rivalsa", must be greater than or equal to 0.') end if !@cassa.nil? && @cassa > 100 invalid_properties.push('invalid value for "cassa", must be smaller than or equal to 100.') end if !@cassa.nil? && @cassa < 0 invalid_properties.push('invalid value for "cassa", must be greater than or equal to 0.') end if !@withholding_tax.nil? && @withholding_tax > 100 invalid_properties.push('invalid value for "withholding_tax", must be smaller than or equal to 100.') end if !@withholding_tax.nil? && @withholding_tax < 0 invalid_properties.push('invalid value for "withholding_tax", must be greater than or equal to 0.') end if !@withholding_tax_taxable.nil? && @withholding_tax_taxable > 100 invalid_properties.push('invalid value for "withholding_tax_taxable", must be smaller than or equal to 100.') end if !@withholding_tax_taxable.nil? && @withholding_tax_taxable < 0 invalid_properties.push('invalid value for "withholding_tax_taxable", must be greater than or equal to 0.') end if !@other_withholding_tax.nil? && @other_withholding_tax > 100 invalid_properties.push('invalid value for "other_withholding_tax", must be smaller than or equal to 100.') end if !@other_withholding_tax.nil? && @other_withholding_tax < 0 invalid_properties.push('invalid value for "other_withholding_tax", must be greater than or equal to 0.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
1074 1075 1076 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1074 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1080 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
1068 1069 1070 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1068 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
814 815 816 817 818 819 820 821 822 823 824 825 826 |
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 814 def valid? return false if !@rivalsa.nil? && @rivalsa > 100 return false if !@rivalsa.nil? && @rivalsa < 0 return false if !@cassa.nil? && @cassa > 100 return false if !@cassa.nil? && @cassa < 0 return false if !@withholding_tax.nil? && @withholding_tax > 100 return false if !@withholding_tax.nil? && @withholding_tax < 0 return false if !@withholding_tax_taxable.nil? && @withholding_tax_taxable > 100 return false if !@withholding_tax_taxable.nil? && @withholding_tax_taxable < 0 return false if !@other_withholding_tax.nil? && @other_withholding_tax > 100 return false if !@other_withholding_tax.nil? && @other_withholding_tax < 0 true end |