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.
-
#invoice_status ⇒ String
Included tax amount in the invoice.
-
#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_status = SKIP, invoice_date = SKIP, due_date = SKIP, vat_country_iso_code = SKIP) ⇒ SearchDocumentsInvoice
constructor
A new instance of SearchDocumentsInvoice.
Methods inherited from BaseModel
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_status = SKIP, invoice_date = SKIP, due_date = SKIP, vat_country_iso_code = 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 156 |
# 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_status = SKIP, invoice_date = SKIP, due_date = SKIP, vat_country_iso_code = 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_status = invoice_status unless invoice_status == 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 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
70 71 72 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 70 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
66 67 68 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 66 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 |
#invoice_status ⇒ 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_status @invoice_status 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
74 75 76 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 74 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.
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 159 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_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : 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 # 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_status, invoice_date, due_date, vat_country_iso_code) end |
.names ⇒ Object
A mapping from model property names to API property names.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 77 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_status'] = 'InvoiceStatus' @_hash['invoice_date'] = 'InvoiceDate' @_hash['due_date'] = 'DueDate' @_hash['vat_country_iso_code'] = 'VATCountryISOCode' @_hash end |
.nullables ⇒ Object
An array for nullable fields
117 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 117 def self.nullables %w[ invoice_number payer_name account_number account_name document_type gross_amount net_amount tax_amount currency_code invoice_status invoice_date due_date vat_country_iso_code ] end |
.optionals ⇒ Object
An array for optional fields
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/shell_data_reporting_ap_is/models/search_documents_invoice.rb', line 97 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_status invoice_date due_date vat_country_iso_code ] end |