Class: ShellDataReportingApIs::SearchDocumentsInvoice
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::SearchDocumentsInvoice
- Defined in:
- lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb
Overview
SearchDocumentsInvoice Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
Invoice account name.
-
#account_number ⇒ String
Account Number Example: GB99215176.
-
#currency_code ⇒ String
Included tax amount in the invoice.
-
#document_reference ⇒ Integer
Unique Invoice Reference id of the invoice for downloading the zip file containing PDF and proofing elements.
-
#document_type ⇒ String
Document type String containing one of the following values: • NAT (National) • INT (International) • SOA (Statement of Account).
-
#due_date ⇒ String
Included tax amount in the invoice.
-
#gross_amount ⇒ Float
Included tax amount in the invoice.
-
#invoice_date ⇒ String
Included tax amount in the invoice.
-
#invoice_number ⇒ String
Payment customer number.
-
#ksef_document_reference ⇒ String
Unique identifier for the invoice in KSeF system.
-
#net_amount ⇒ Float
Included tax amount in the invoice.
-
#payer_name ⇒ String
Customer payer name.
-
#tax_amount ⇒ Float
Included tax amount in the invoice.
-
#vat_country_iso_code ⇒ String
Included tax amount in the invoice.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(document_reference = SKIP, invoice_number = SKIP, payer_name = SKIP, account_number = SKIP, account_name = SKIP, document_type = SKIP, gross_amount = SKIP, net_amount = SKIP, tax_amount = SKIP, currency_code = SKIP, invoice_date = SKIP, due_date = SKIP, vat_country_iso_code = SKIP, ksef_document_reference = SKIP) ⇒ SearchDocumentsInvoice
constructor
A new instance of SearchDocumentsInvoice.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(document_reference = SKIP, invoice_number = SKIP, payer_name = SKIP, account_number = SKIP, account_name = SKIP, document_type = SKIP, gross_amount = SKIP, net_amount = SKIP, tax_amount = SKIP, currency_code = SKIP, invoice_date = SKIP, due_date = SKIP, vat_country_iso_code = SKIP, ksef_document_reference = SKIP) ⇒ SearchDocumentsInvoice
Returns a new instance of SearchDocumentsInvoice.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 135 def initialize(document_reference = SKIP, invoice_number = SKIP, payer_name = SKIP, account_number = SKIP, account_name = SKIP, document_type = SKIP, gross_amount = SKIP, net_amount = SKIP, tax_amount = SKIP, currency_code = SKIP, invoice_date = SKIP, due_date = SKIP, vat_country_iso_code = SKIP, ksef_document_reference = SKIP) @document_reference = document_reference unless document_reference == SKIP @invoice_number = invoice_number unless invoice_number == SKIP @payer_name = payer_name unless payer_name == SKIP @account_number = account_number unless account_number == SKIP @account_name = account_name unless account_name == SKIP @document_type = document_type unless document_type == SKIP @gross_amount = gross_amount unless gross_amount == SKIP @net_amount = net_amount unless net_amount == SKIP @tax_amount = tax_amount unless tax_amount == SKIP @currency_code = currency_code unless currency_code == SKIP @invoice_date = invoice_date unless invoice_date == SKIP @due_date = due_date unless due_date == SKIP @vat_country_iso_code = vat_country_iso_code unless vat_country_iso_code == SKIP @ksef_document_reference = ksef_document_reference unless ksef_document_reference == SKIP end |
Instance Attribute Details
#account_name ⇒ String
Invoice account name
34 35 36 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 34 def account_name @account_name end |
#account_number ⇒ String
Account Number Example: GB99215176
30 31 32 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 30 def account_number @account_number end |
#currency_code ⇒ String
Included tax amount in the invoice
58 59 60 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 58 def currency_code @currency_code end |
#document_reference ⇒ Integer
Unique Invoice Reference id of the invoice for downloading the zip file containing PDF and proofing elements. Example: 123456
16 17 18 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 16 def document_reference @document_reference end |
#document_type ⇒ String
Document type String containing one of the following values: • NAT (National) • INT (International) • SOA (Statement of Account)
42 43 44 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 42 def document_type @document_type end |
#due_date ⇒ String
Included tax amount in the invoice
66 67 68 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 66 def due_date @due_date end |
#gross_amount ⇒ Float
Included tax amount in the invoice
46 47 48 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 46 def gross_amount @gross_amount end |
#invoice_date ⇒ String
Included tax amount in the invoice
62 63 64 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 62 def invoice_date @invoice_date end |
#invoice_number ⇒ String
Payment customer number. Example: GB000000123
21 22 23 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 21 def invoice_number @invoice_number end |
#ksef_document_reference ⇒ String
Unique identifier for the invoice in KSeF system. This field is populated only when the invoice is registered in KSeF system.
75 76 77 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 75 def ksef_document_reference @ksef_document_reference end |
#net_amount ⇒ Float
Included tax amount in the invoice
50 51 52 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 50 def net_amount @net_amount end |
#payer_name ⇒ String
Customer payer name
25 26 27 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 25 def payer_name @payer_name end |
#tax_amount ⇒ Float
Included tax amount in the invoice
54 55 56 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 54 def tax_amount @tax_amount end |
#vat_country_iso_code ⇒ String
Included tax amount in the invoice
70 71 72 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 70 def vat_country_iso_code @vat_country_iso_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 158 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. document_reference = hash.key?('DocumentReference') ? hash['DocumentReference'] : SKIP invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP payer_name = hash.key?('PayerName') ? hash['PayerName'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP account_name = hash.key?('AccountName') ? hash['AccountName'] : SKIP document_type = hash.key?('DocumentType') ? hash['DocumentType'] : SKIP gross_amount = hash.key?('GrossAmount') ? hash['GrossAmount'] : SKIP net_amount = hash.key?('NetAmount') ? hash['NetAmount'] : SKIP tax_amount = hash.key?('TaxAmount') ? hash['TaxAmount'] : SKIP currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP due_date = hash.key?('DueDate') ? hash['DueDate'] : SKIP vat_country_iso_code = hash.key?('VATCountryISOCode') ? hash['VATCountryISOCode'] : SKIP ksef_document_reference = hash.key?('KsefDocumentReference') ? hash['KsefDocumentReference'] : SKIP # Create object from extracted values. SearchDocumentsInvoice.new(document_reference, invoice_number, payer_name, account_number, account_name, document_type, gross_amount, net_amount, tax_amount, currency_code, invoice_date, due_date, vat_country_iso_code, ksef_document_reference) end |
.names ⇒ Object
A mapping from model property names to API property names.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 78 def self.names @_hash = {} if @_hash.nil? @_hash['document_reference'] = 'DocumentReference' @_hash['invoice_number'] = 'InvoiceNumber' @_hash['payer_name'] = 'PayerName' @_hash['account_number'] = 'AccountNumber' @_hash['account_name'] = 'AccountName' @_hash['document_type'] = 'DocumentType' @_hash['gross_amount'] = 'GrossAmount' @_hash['net_amount'] = 'NetAmount' @_hash['tax_amount'] = 'TaxAmount' @_hash['currency_code'] = 'CurrencyCode' @_hash['invoice_date'] = 'InvoiceDate' @_hash['due_date'] = 'DueDate' @_hash['vat_country_iso_code'] = 'VATCountryISOCode' @_hash['ksef_document_reference'] = 'KsefDocumentReference' @_hash end |
.nullables ⇒ Object
An array for nullable fields
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 118 def self.nullables %w[ invoice_number payer_name account_number account_name document_type gross_amount net_amount tax_amount currency_code invoice_date due_date vat_country_iso_code ] end |
.optionals ⇒ Object
An array for optional fields
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 98 def self.optionals %w[ document_reference invoice_number payer_name account_number account_name document_type gross_amount net_amount tax_amount currency_code invoice_date due_date vat_country_iso_code ksef_document_reference ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 210 def inspect class_name = self.class.name.split('::').last "<#{class_name} document_reference: #{@document_reference.inspect}, invoice_number:"\ " #{@invoice_number.inspect}, payer_name: #{@payer_name.inspect}, account_number:"\ " #{@account_number.inspect}, account_name: #{@account_name.inspect}, document_type:"\ " #{@document_type.inspect}, gross_amount: #{@gross_amount.inspect}, net_amount:"\ " #{@net_amount.inspect}, tax_amount: #{@tax_amount.inspect}, currency_code:"\ " #{@currency_code.inspect}, invoice_date: #{@invoice_date.inspect}, due_date:"\ " #{@due_date.inspect}, vat_country_iso_code: #{@vat_country_iso_code.inspect},"\ " ksef_document_reference: #{@ksef_document_reference.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
198 199 200 201 202 203 204 205 206 207 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 198 def to_s class_name = self.class.name.split('::').last "<#{class_name} document_reference: #{@document_reference}, invoice_number:"\ " #{@invoice_number}, payer_name: #{@payer_name}, account_number: #{@account_number},"\ " account_name: #{@account_name}, document_type: #{@document_type}, gross_amount:"\ " #{@gross_amount}, net_amount: #{@net_amount}, tax_amount: #{@tax_amount}, currency_code:"\ " #{@currency_code}, invoice_date: #{@invoice_date}, due_date: #{@due_date},"\ " vat_country_iso_code: #{@vat_country_iso_code}, ksef_document_reference:"\ " #{@ksef_document_reference}>" end |