Class: FattureInCloud_Ruby_Sdk::IssuedDocument

Inherits:
Object
  • Object
show all
Defined in:
lib/fattureincloud_ruby_sdk/models/issued_document.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ IssuedDocument

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
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
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 529

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?(:'year')
    self.year = attributes[:'year']
  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?(:'amount_cassa')
    self.amount_cassa = attributes[:'amount_cassa']
  end

  if attributes.key?(:'cassa_taxable')
    self.cassa_taxable = attributes[:'cassa_taxable']
  end

  if attributes.key?(:'amount_cassa_taxable')
    self.amount_cassa_taxable = attributes[:'amount_cassa_taxable']
  end

  if attributes.key?(:'cassa2')
    self.cassa2 = attributes[:'cassa2']
  end

  if attributes.key?(:'amount_cassa2')
    self.amount_cassa2 = attributes[:'amount_cassa2']
  end

  if attributes.key?(:'cassa2_taxable')
    self.cassa2_taxable = attributes[:'cassa2_taxable']
  end

  if attributes.key?(:'amount_cassa2_taxable')
    self.amount_cassa2_taxable = attributes[:'amount_cassa2_taxable']
  end

  if attributes.key?(:'global_cassa_taxable')
    self.global_cassa_taxable = attributes[:'global_cassa_taxable']
  end

  if attributes.key?(:'amount_global_cassa_taxable')
    self.amount_global_cassa_taxable = attributes[:'amount_global_cassa_taxable']
  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']
  end

  if attributes.key?(:'use_gross_prices')
    self.use_gross_prices = attributes[:'use_gross_prices']
  end

  if attributes.key?(:'e_invoice')
    self.e_invoice = attributes[:'e_invoice']
  end

  if attributes.key?(:'ei_data')
    self.ei_data = attributes[:'ei_data']
  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?(:'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?(:'v_margins')
    self.v_margins = attributes[:'v_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?(:'show_paypal_button')
    self.show_paypal_button = attributes[:'show_paypal_button']
  end

  if attributes.key?(:'show_notification_button')
    self.show_notification_button = attributes[:'show_notification_button']
  end

  if attributes.key?(:'show_tspay_button')
    self.show_tspay_button = attributes[:'show_tspay_button']
  end

  if attributes.key?(:'delivery_note')
    self.delivery_note = attributes[:'delivery_note']
  end

  if attributes.key?(:'accompanying_invoice')
    self.accompanying_invoice = attributes[:'accompanying_invoice']
  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?(:'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_due_discount')
    self.amount_due_discount = attributes[:'amount_due_discount']
  end

  if attributes.key?(:'amount_rivalsa')
    self.amount_rivalsa = attributes[:'amount_rivalsa']
  end

  if attributes.key?(:'amount_rivalsa_taxable')
    self.amount_rivalsa_taxable = attributes[:'amount_rivalsa_taxable']
  end

  if attributes.key?(:'amount_withholding_tax')
    self.amount_withholding_tax = attributes[:'amount_withholding_tax']
  end

  if attributes.key?(:'amount_withholding_tax_taxable')
    self.amount_withholding_tax_taxable = attributes[:'amount_withholding_tax_taxable']
  end

  if attributes.key?(:'amount_other_withholding_tax')
    self.amount_other_withholding_tax = attributes[:'amount_other_withholding_tax']
  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?(:'amount_enasarco_taxable')
    self.amount_enasarco_taxable = attributes[:'amount_enasarco_taxable']
  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.attachment_url = attributes[:'attachment_url']
  end

  if attributes.key?(:'attachment_token')
    self.attachment_token = attributes[:'attachment_token']
  end

  if attributes.key?(:'ei_raw')
    self.ei_raw = attributes[:'ei_raw']
  end

  if attributes.key?(:'ei_status')
    self.ei_status = attributes[:'ei_status']
  end
end

Instance Attribute Details

#acc_inv_templateObject

Returns the value of attribute acc_inv_template.



135
136
137
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 135

def acc_inv_template
  @acc_inv_template
end

#accompanying_invoiceObject

Attach an accompanying invoice.



163
164
165
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 163

def accompanying_invoice
  @accompanying_invoice
end

#amount_cassaObject

Read Only

Cassa amount.



61
62
63
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 61

def amount_cassa
  @amount_cassa
end

#amount_cassa2Object

Read Only

Cassa amount.



73
74
75
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 73

def amount_cassa2
  @amount_cassa2
end

#amount_cassa2_taxableObject

Can be set only if cassa2_taxable is NULL

Cassa2 taxable amount



79
80
81
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 79

def amount_cassa2_taxable
  @amount_cassa2_taxable
end

#amount_cassa_taxableObject

Can be set only if cassa_taxable is NULL

Cassa2 taxable amount



67
68
69
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 67

def amount_cassa_taxable
  @amount_cassa_taxable
end

#amount_due_discountObject

Amount due discount



202
203
204
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 202

def amount_due_discount
  @amount_due_discount
end

#amount_enasarco_taxableObject

Taxable enasarco amount



223
224
225
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 223

def amount_enasarco_taxable
  @amount_enasarco_taxable
end

#amount_global_cassa_taxableObject

Can be set only if global_cassa_taxable is NULL

Global cassa taxable amount



85
86
87
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 85

def amount_global_cassa_taxable
  @amount_global_cassa_taxable
end

#amount_grossObject

Read Only

Total gross amount (totale documento).



199
200
201
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 199

def amount_gross
  @amount_gross
end

#amount_netObject

Read Only

Total net amount (competenze).



193
194
195
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 193

def amount_net
  @amount_net
end

#amount_other_withholding_taxObject

Read Only

Other withholding tax amount (altra ritenuta).



217
218
219
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 217

def amount_other_withholding_tax
  @amount_other_withholding_tax
end

#amount_other_withholding_tax_taxableObject

Taxable other withholding tax amount



220
221
222
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 220

def amount_other_withholding_tax_taxable
  @amount_other_withholding_tax_taxable
end

#amount_rivalsaObject

Read Only

Rivalsa amount.



205
206
207
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 205

def amount_rivalsa
  @amount_rivalsa
end

#amount_rivalsa_taxableObject

Taxable rivalsa amount



208
209
210
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 208

def amount_rivalsa_taxable
  @amount_rivalsa_taxable
end

#amount_vatObject

Read Only

Total vat amount (IVA).



196
197
198
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 196

def amount_vat
  @amount_vat
end

#amount_withholding_taxObject

Read Only

Withholding tax amount (ritenuta d’acconto).



211
212
213
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 211

def amount_withholding_tax
  @amount_withholding_tax
end

#amount_withholding_tax_taxableObject

Taxable withholding tax amount



214
215
216
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 214

def amount_withholding_tax_taxable
  @amount_withholding_tax_taxable
end

#attachment_tokenObject

Write Only

Attachment token returned by POST /issued_documents/attachment. Used to attach the file already uploaded.



240
241
242
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 240

def attachment_token
  @attachment_token
end

#attachment_urlObject

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.



237
238
239
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 237

def attachment_url
  @attachment_url
end

#cassaObject

"Cassa previdenziale" percentual value



58
59
60
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 58

def cassa
  @cassa
end

#cassa2Object

"Cassa previdenziale 2" percentual value



70
71
72
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 70

def cassa2
  @cassa2
end

#cassa2_taxableObject

Cassa2 taxable percentage



76
77
78
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 76

def cassa2_taxable
  @cassa2_taxable
end

#cassa_taxableObject

Cassa taxable percentage



64
65
66
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 64

def cassa_taxable
  @cassa_taxable
end

#currencyObject

Returns the value of attribute currency.



38
39
40
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 38

def currency
  @currency
end

#dateObject

Date of the document [If not specified, today date is used]



33
34
35
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 33

def date
  @date
end

#delivery_noteObject

Returns the value of attribute delivery_note.



160
161
162
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 160

def delivery_note
  @delivery_note
end

#delivery_note_templateObject

Returns the value of attribute delivery_note_template.



133
134
135
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 133

def delivery_note_template
  @delivery_note_template
end

#dn_ai_causalObject

Causal (for the attached delivery note).



178
179
180
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 178

def dn_ai_causal
  @dn_ai_causal
end

#dn_ai_destinationObject

Destination (for the attached delivery note).



181
182
183
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 181

def dn_ai_destination
  @dn_ai_destination
end

#dn_ai_notesObject

Notes (for the attached delivery note).



187
188
189
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 187

def dn_ai_notes
  @dn_ai_notes
end

#dn_ai_packages_numberObject

Number of packages (for the attached delivery note).



172
173
174
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 172

def dn_ai_packages_number
  @dn_ai_packages_number
end

#dn_ai_transporterObject

Transporter (for the attached delivery note).



184
185
186
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 184

def dn_ai_transporter
  @dn_ai_transporter
end

#dn_ai_weightObject

Weight (for the attached delivery note).



175
176
177
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 175

def dn_ai_weight
  @dn_ai_weight
end

#dn_dateObject

Date (for the attached delivery note).



169
170
171
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 169

def dn_date
  @dn_date
end

#dn_numberObject

Number (for the attached delivery note).



166
167
168
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 166

def dn_number
  @dn_number
end

#e_invoiceObject

Indicates if this is an e-invoice.



108
109
110
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 108

def e_invoice
  @e_invoice
end

#ei_cassa2_typeObject

E-invoice cassa2 type



116
117
118
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 116

def ei_cassa2_type
  @ei_cassa2_type
end

#ei_cassa_typeObject

E-invoice cassa type



113
114
115
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 113

def ei_cassa_type
  @ei_cassa_type
end

#ei_dataObject

Returns the value of attribute ei_data.



110
111
112
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 110

def ei_data
  @ei_data
end

#ei_other_withholding_tax_causalObject

E-invoice other withholding tax causal



125
126
127
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 125

def ei_other_withholding_tax_causal
  @ei_other_withholding_tax_causal
end

#ei_other_withholding_tax_typeObject

E-invoice other withholding tax type



122
123
124
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 122

def ei_other_withholding_tax_type
  @ei_other_withholding_tax_type
end

#ei_rawObject

Advanced raw attributes for e-invoices.



243
244
245
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 243

def ei_raw
  @ei_raw
end

#ei_statusObject

Read only

Status of the e-invoice. * ‘attempt` - We are trying to send the invoice, please wait up to 2 hours * `missing` - The invoice is missing * `not_sent` - The invoice has yet to be sent * `sent` - The invoice was sent * `pending` - The checks for the digital signature and sending are in progress * `processing` - The SDI is delivering the invoice to the customer * `error` - An error occurred while handling the invoice, please try to resend it or contact support * `discarded` - The invoice has been rejected by the SDI, so it must be corrected and re-sent * `not_delivered` - The SDI was unable to deliver the invoice * `accepted` - The customer accepted the invoice * `rejected` - The customer rejected the invoice, so it must be corrected * `no_response` - A response has not yet been received whithin the deadline, contact the customer to ascertain the status of the invoice



246
247
248
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 246

def ei_status
  @ei_status
end

#ei_withholding_tax_causalObject

E-invoice withholding tax causal



119
120
121
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 119

def ei_withholding_tax_causal
  @ei_withholding_tax_causal
end

#entityObject

Returns the value of attribute entity.



22
23
24
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 22

def entity
  @entity
end

#extra_dataObject

Returns the value of attribute extra_data.



225
226
227
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 225

def extra_data
  @extra_data
end

#global_cassa_taxableObject

Global cassa taxable percentage



82
83
84
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 82

def global_cassa_taxable
  @global_cassa_taxable
end

#h_marginsObject

Horizontal margins.



138
139
140
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 138

def h_margins
  @h_margins
end

#idObject

Unique identifier of the document.



20
21
22
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 20

def id
  @id
end

#is_markedObject

This is true if the document is marked.



190
191
192
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 190

def is_marked
  @is_marked
end

#items_listObject

Returns the value of attribute items_list.



127
128
129
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 127

def items_list
  @items_list
end

#languageObject

Returns the value of attribute language.



40
41
42
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 40

def language
  @language
end

#next_due_dateObject

Date of the next not paid payment.



231
232
233
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 231

def next_due_date
  @next_due_date
end

#notesObject

Issued document extra notes.



52
53
54
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 52

def notes
  @notes
end

#numberObject

Number of the document [If not specified, next number is used]



27
28
29
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 27

def number
  @number
end

#numerationObject

Numeration of the document [Not available if type=delivery_note]



30
31
32
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 30

def numeration
  @numeration
end

#other_withholding_taxObject

Other withholding tax (altra ritenuta) percentual value



94
95
96
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 94

def other_withholding_tax
  @other_withholding_tax
end

#payment_methodObject

Returns the value of attribute payment_method.



99
100
101
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 99

def payment_method
  @payment_method
end

#payments_listObject

Returns the value of attribute payments_list.



129
130
131
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 129

def payments_list
  @payments_list
end

#rc_centerObject

Revenue center [or cost center if type=supplier_order].



49
50
51
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 49

def rc_center
  @rc_center
end

#rivalsaObject

"Rivalsa INPS" percentual value



55
56
57
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 55

def rivalsa
  @rivalsa
end

#seen_dateObject

Date when the client/supplier has seen the document.



228
229
230
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 228

def seen_date
  @seen_date
end

#show_notification_buttonObject

Show notification button



155
156
157
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 155

def show_notification_button
  @show_notification_button
end

#show_payment_methodObject

Show the payment method details on the document.



147
148
149
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 147

def show_payment_method
  @show_payment_method
end

#show_paymentsObject

Shows the expiration dates of the payments on the document.



144
145
146
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 144

def show_payments
  @show_payments
end

#show_paypal_buttonObject

Show paypal button



152
153
154
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 152

def show_paypal_button
  @show_paypal_button
end

#show_totalsObject

Returns the value of attribute show_totals.



149
150
151
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 149

def show_totals
  @show_totals
end

#show_tspay_buttonObject

Show ts pay button.



158
159
160
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 158

def show_tspay_button
  @show_tspay_button
end

#stamp_dutyObject

Stamp duty value [0 if not present]



97
98
99
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 97

def stamp_duty
  @stamp_duty
end

#subjectObject

Issued document subject.



43
44
45
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 43

def subject
  @subject
end

#templateObject

Returns the value of attribute template.



131
132
133
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 131

def template
  @template
end

#typeObject

Returns the value of attribute type.



24
25
26
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 24

def type
  @type
end

#urlObject

Public url of the document PDF file.



234
235
236
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 234

def url
  @url
end

#use_gross_pricesObject

Use gross prices



105
106
107
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 105

def use_gross_prices
  @use_gross_prices
end

#use_split_paymentObject

Use split payment



102
103
104
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 102

def use_split_payment
  @use_split_payment
end

#v_marginsObject

Vertical margins.



141
142
143
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 141

def v_margins
  @v_margins
end

#visible_subjectObject

Issued document visible subject.



46
47
48
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 46

def visible_subject
  @visible_subject
end

#withholding_taxObject

Withholding tax (ritenuta d’acconto) percentual value



88
89
90
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 88

def withholding_tax
  @withholding_tax
end

#withholding_tax_taxableObject

Withholding tax taxable (imponibile) percentual value



91
92
93
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 91

def withholding_tax_taxable
  @withholding_tax_taxable
end

#yearObject

Invoice year.



36
37
38
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 36

def year
  @year
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



358
359
360
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 358

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 271

def self.attribute_map
  {
    :'id' => :'id',
    :'entity' => :'entity',
    :'type' => :'type',
    :'number' => :'number',
    :'numeration' => :'numeration',
    :'date' => :'date',
    :'year' => :'year',
    :'currency' => :'currency',
    :'language' => :'language',
    :'subject' => :'subject',
    :'visible_subject' => :'visible_subject',
    :'rc_center' => :'rc_center',
    :'notes' => :'notes',
    :'rivalsa' => :'rivalsa',
    :'cassa' => :'cassa',
    :'amount_cassa' => :'amount_cassa',
    :'cassa_taxable' => :'cassa_taxable',
    :'amount_cassa_taxable' => :'amount_cassa_taxable',
    :'cassa2' => :'cassa2',
    :'amount_cassa2' => :'amount_cassa2',
    :'cassa2_taxable' => :'cassa2_taxable',
    :'amount_cassa2_taxable' => :'amount_cassa2_taxable',
    :'global_cassa_taxable' => :'global_cassa_taxable',
    :'amount_global_cassa_taxable' => :'amount_global_cassa_taxable',
    :'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',
    :'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',
    :'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',
    :'v_margins' => :'v_margins',
    :'show_payments' => :'show_payments',
    :'show_payment_method' => :'show_payment_method',
    :'show_totals' => :'show_totals',
    :'show_paypal_button' => :'show_paypal_button',
    :'show_notification_button' => :'show_notification_button',
    :'show_tspay_button' => :'show_tspay_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',
    :'is_marked' => :'is_marked',
    :'amount_net' => :'amount_net',
    :'amount_vat' => :'amount_vat',
    :'amount_gross' => :'amount_gross',
    :'amount_due_discount' => :'amount_due_discount',
    :'amount_rivalsa' => :'amount_rivalsa',
    :'amount_rivalsa_taxable' => :'amount_rivalsa_taxable',
    :'amount_withholding_tax' => :'amount_withholding_tax',
    :'amount_withholding_tax_taxable' => :'amount_withholding_tax_taxable',
    :'amount_other_withholding_tax' => :'amount_other_withholding_tax',
    :'amount_other_withholding_tax_taxable' => :'amount_other_withholding_tax_taxable',
    :'amount_enasarco_taxable' => :'amount_enasarco_taxable',
    :'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',
    :'ei_status' => :'ei_status'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



1003
1004
1005
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1003

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



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
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 450

def self.openapi_nullable
  Set.new([
    :'id',
    :'number',
    :'numeration',
    :'date',
    :'year',
    :'subject',
    :'visible_subject',
    :'rc_center',
    :'notes',
    :'rivalsa',
    :'cassa',
    :'amount_cassa',
    :'cassa_taxable',
    :'amount_cassa_taxable',
    :'cassa2',
    :'amount_cassa2',
    :'cassa2_taxable',
    :'amount_cassa2_taxable',
    :'global_cassa_taxable',
    :'amount_global_cassa_taxable',
    :'withholding_tax',
    :'withholding_tax_taxable',
    :'other_withholding_tax',
    :'stamp_duty',
    :'use_split_payment',
    :'use_gross_prices',
    :'e_invoice',
    :'ei_data',
    :'ei_cassa_type',
    :'ei_cassa2_type',
    :'ei_withholding_tax_causal',
    :'ei_other_withholding_tax_type',
    :'ei_other_withholding_tax_causal',
    :'items_list',
    :'payments_list',
    :'h_margins',
    :'v_margins',
    :'show_payments',
    :'show_payment_method',
    :'show_paypal_button',
    :'show_notification_button',
    :'show_tspay_button',
    :'delivery_note',
    :'accompanying_invoice',
    :'dn_number',
    :'dn_date',
    :'dn_ai_packages_number',
    :'dn_ai_weight',
    :'dn_ai_causal',
    :'dn_ai_destination',
    :'dn_ai_transporter',
    :'dn_ai_notes',
    :'is_marked',
    :'amount_net',
    :'amount_vat',
    :'amount_gross',
    :'amount_due_discount',
    :'amount_rivalsa',
    :'amount_rivalsa_taxable',
    :'amount_withholding_tax',
    :'amount_withholding_tax_taxable',
    :'amount_other_withholding_tax',
    :'amount_other_withholding_tax_taxable',
    :'amount_enasarco_taxable',
    :'extra_data',
    :'seen_date',
    :'next_due_date',
    :'url',
    :'attachment_url',
    :'attachment_token',
    :'ei_raw',
    :'ei_status'
  ])
end

.openapi_typesObject

Attribute type mapping.



363
364
365
366
367
368
369
370
371
372
373
374
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
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 363

def self.openapi_types
  {
    :'id' => :'Integer',
    :'entity' => :'Entity',
    :'type' => :'IssuedDocumentType',
    :'number' => :'Integer',
    :'numeration' => :'String',
    :'date' => :'Date',
    :'year' => :'Integer',
    :'currency' => :'Currency',
    :'language' => :'Language',
    :'subject' => :'String',
    :'visible_subject' => :'String',
    :'rc_center' => :'String',
    :'notes' => :'String',
    :'rivalsa' => :'Float',
    :'cassa' => :'Float',
    :'amount_cassa' => :'Float',
    :'cassa_taxable' => :'Float',
    :'amount_cassa_taxable' => :'Float',
    :'cassa2' => :'Float',
    :'amount_cassa2' => :'Float',
    :'cassa2_taxable' => :'Float',
    :'amount_cassa2_taxable' => :'Float',
    :'global_cassa_taxable' => :'Float',
    :'amount_global_cassa_taxable' => :'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',
    :'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',
    :'items_list' => :'Array<IssuedDocumentItemsListItem>',
    :'payments_list' => :'Array<IssuedDocumentPaymentsListItem>',
    :'template' => :'DocumentTemplate',
    :'delivery_note_template' => :'DocumentTemplate',
    :'acc_inv_template' => :'DocumentTemplate',
    :'h_margins' => :'Integer',
    :'v_margins' => :'Integer',
    :'show_payments' => :'Boolean',
    :'show_payment_method' => :'Boolean',
    :'show_totals' => :'ShowTotalsMode',
    :'show_paypal_button' => :'Boolean',
    :'show_notification_button' => :'Boolean',
    :'show_tspay_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',
    :'is_marked' => :'Boolean',
    :'amount_net' => :'Float',
    :'amount_vat' => :'Float',
    :'amount_gross' => :'Float',
    :'amount_due_discount' => :'Float',
    :'amount_rivalsa' => :'Float',
    :'amount_rivalsa_taxable' => :'Float',
    :'amount_withholding_tax' => :'Float',
    :'amount_withholding_tax_taxable' => :'Float',
    :'amount_other_withholding_tax' => :'Float',
    :'amount_other_withholding_tax_taxable' => :'Float',
    :'amount_enasarco_taxable' => :'Float',
    :'extra_data' => :'IssuedDocumentExtraData',
    :'seen_date' => :'Date',
    :'next_due_date' => :'Date',
    :'url' => :'String',
    :'attachment_url' => :'String',
    :'attachment_token' => :'String',
    :'ei_raw' => :'Object',
    :'ei_status' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
981
982
983
984
985
986
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 902

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 &&
      year == o.year &&
      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 &&
      amount_cassa == o.amount_cassa &&
      cassa_taxable == o.cassa_taxable &&
      amount_cassa_taxable == o.amount_cassa_taxable &&
      cassa2 == o.cassa2 &&
      amount_cassa2 == o.amount_cassa2 &&
      cassa2_taxable == o.cassa2_taxable &&
      amount_cassa2_taxable == o.amount_cassa2_taxable &&
      global_cassa_taxable == o.global_cassa_taxable &&
      amount_global_cassa_taxable == o.amount_global_cassa_taxable &&
      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 &&
      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 &&
      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 &&
      v_margins == o.v_margins &&
      show_payments == o.show_payments &&
      show_payment_method == o.show_payment_method &&
      show_totals == o.show_totals &&
      show_paypal_button == o.show_paypal_button &&
      show_notification_button == o.show_notification_button &&
      show_tspay_button == o.show_tspay_button &&
      delivery_note == o.delivery_note &&
      accompanying_invoice == o.accompanying_invoice &&
      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 &&
      is_marked == o.is_marked &&
      amount_net == o.amount_net &&
      amount_vat == o.amount_vat &&
      amount_gross == o.amount_gross &&
      amount_due_discount == o.amount_due_discount &&
      amount_rivalsa == o.amount_rivalsa &&
      amount_rivalsa_taxable == o.amount_rivalsa_taxable &&
      amount_withholding_tax == o.amount_withholding_tax &&
      amount_withholding_tax_taxable == o.amount_withholding_tax_taxable &&
      amount_other_withholding_tax == o.amount_other_withholding_tax &&
      amount_other_withholding_tax_taxable == o.amount_other_withholding_tax_taxable &&
      amount_enasarco_taxable == o.amount_enasarco_taxable &&
      extra_data == o.extra_data &&
      seen_date == o.seen_date &&
      next_due_date == o.next_due_date &&
      url == o.url &&
      attachment_url == o.attachment_url &&
      attachment_token == o.attachment_token &&
      ei_raw == o.ei_raw &&
      ei_status == o.ei_status
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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
1065
1066
1067
1068
1069
1070
1071
1072
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1033

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
  when :Hash
    value
  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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1106

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1010

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


990
991
992
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 990

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



996
997
998
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 996

def hash
  [id, entity, type, number, numeration, date, year, currency, language, subject, visible_subject, rc_center, notes, rivalsa, cassa, amount_cassa, cassa_taxable, amount_cassa_taxable, cassa2, amount_cassa2, cassa2_taxable, amount_cassa2_taxable, global_cassa_taxable, amount_global_cassa_taxable, withholding_tax, withholding_tax_taxable, other_withholding_tax, stamp_duty, payment_method, use_split_payment, use_gross_prices, e_invoice, ei_data, ei_cassa_type, ei_cassa2_type, ei_withholding_tax_causal, ei_other_withholding_tax_type, ei_other_withholding_tax_causal, items_list, payments_list, template, delivery_note_template, acc_inv_template, h_margins, v_margins, show_payments, show_payment_method, show_totals, show_paypal_button, show_notification_button, show_tspay_button, delivery_note, accompanying_invoice, dn_number, dn_date, dn_ai_packages_number, dn_ai_weight, dn_ai_causal, dn_ai_destination, dn_ai_transporter, dn_ai_notes, is_marked, amount_net, amount_vat, amount_gross, amount_due_discount, amount_rivalsa, amount_rivalsa_taxable, amount_withholding_tax, amount_withholding_tax_taxable, amount_other_withholding_tax, amount_other_withholding_tax_taxable, amount_enasarco_taxable, extra_data, seen_date, next_due_date, url, attachment_url, attachment_token, ei_raw, ei_status].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



877
878
879
880
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 877

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



1082
1083
1084
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1082

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1088

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



1076
1077
1078
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 1076

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



884
885
886
887
888
# File 'lib/fattureincloud_ruby_sdk/models/issued_document.rb', line 884

def valid?
  ei_status_validator = EnumAttributeValidator.new('String', ["attempt", "missing", "not_sent", "sent", "pending", "processing", "error", "discarded", "not_delivered", "accepted", "rejected", "no_response"])
  return false unless ei_status_validator.valid?(@ei_status)
  true
end