Class: ShellDataReportingApIs::InvoiceSummaryRequestFilters
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::InvoiceSummaryRequestFilters
- Defined in:
- lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb
Overview
InvoiceSummaryRequestFilters Model.
Instance Attribute Summary collapse
-
#accounts ⇒ Array[Accounts]
Collecting Company Code of the selected payer.
-
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer.
-
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer.
-
#from_date ⇒ String
Invoice date searched from this date.
-
#include_e_invoice_details ⇒ TrueClass | FalseClass
Whether to include the additional invoice details in the API response.
-
#invoice_date ⇒ String
Date of invoicing.
-
#invoice_id ⇒ Integer
Invoice id.
-
#invoice_number ⇒ String
Invoice number.
-
#invoice_status ⇒ String
Status of the invoice.
-
#invoiced_on_behalf_of ⇒ String
ISO code of the country i.e., UK, DE, MY, etc.
-
#payer_id ⇒ Integer
Payer Id of the selected payer.
-
#payer_number ⇒ String
Payer Number of the selected payer.
-
#period ⇒ Integer
Invoice date search period.
-
#so_a_reference_number ⇒ String
Statement of Account reference number of the payment customer.
-
#statement_of_account_id ⇒ String
Statement of Account Id of the payment customer.
-
#summary_document_id ⇒ Integer
Summary document id Optional.
-
#summary_document_number ⇒ String
Summary document number Optional.
-
#to_date ⇒ String
Invoice date searched until this date.
-
#type ⇒ String
Invoice type.
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(col_co_id = SKIP, payer_id = SKIP, payer_number = SKIP, invoice_id = SKIP, invoice_number = SKIP, from_date = SKIP, to_date = SKIP, invoice_date = SKIP, summary_document_id = SKIP, summary_document_number = SKIP, statement_of_account_id = SKIP, so_a_reference_number = SKIP, period = SKIP, invoice_status = SKIP, invoiced_on_behalf_of = SKIP, include_e_invoice_details = SKIP, col_co_code = SKIP, accounts = SKIP, type = SKIP) ⇒ InvoiceSummaryRequestFilters
constructor
A new instance of InvoiceSummaryRequestFilters.
Methods inherited from BaseModel
Constructor Details
#initialize(col_co_id = SKIP, payer_id = SKIP, payer_number = SKIP, invoice_id = SKIP, invoice_number = SKIP, from_date = SKIP, to_date = SKIP, invoice_date = SKIP, summary_document_id = SKIP, summary_document_number = SKIP, statement_of_account_id = SKIP, so_a_reference_number = SKIP, period = SKIP, invoice_status = SKIP, invoiced_on_behalf_of = SKIP, include_e_invoice_details = SKIP, col_co_code = SKIP, accounts = SKIP, type = SKIP) ⇒ InvoiceSummaryRequestFilters
Returns a new instance of InvoiceSummaryRequestFilters.
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 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 240 def initialize(col_co_id = SKIP, payer_id = SKIP, payer_number = SKIP, invoice_id = SKIP, invoice_number = SKIP, from_date = SKIP, to_date = SKIP, invoice_date = SKIP, summary_document_id = SKIP, summary_document_number = SKIP, statement_of_account_id = SKIP, so_a_reference_number = SKIP, period = SKIP, invoice_status = SKIP, invoiced_on_behalf_of = SKIP, include_e_invoice_details = SKIP, col_co_code = SKIP, accounts = SKIP, type = SKIP) @col_co_id = col_co_id unless col_co_id == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP @invoice_id = invoice_id unless invoice_id == SKIP @invoice_number = invoice_number unless invoice_number == SKIP @from_date = from_date unless from_date == SKIP @to_date = to_date unless to_date == SKIP @invoice_date = invoice_date unless invoice_date == SKIP @summary_document_id = summary_document_id unless summary_document_id == SKIP @summary_document_number = summary_document_number unless summary_document_number == SKIP @statement_of_account_id = statement_of_account_id unless statement_of_account_id == SKIP @so_a_reference_number = so_a_reference_number unless so_a_reference_number == SKIP @period = period unless period == SKIP @invoice_status = invoice_status unless invoice_status == SKIP @invoiced_on_behalf_of = invoiced_on_behalf_of unless invoiced_on_behalf_of == SKIP unless include_e_invoice_details == SKIP @include_e_invoice_details = include_e_invoice_details end @col_co_code = col_co_code unless col_co_code == SKIP @accounts = accounts unless accounts == SKIP @type = type unless type == SKIP end |
Instance Attribute Details
#accounts ⇒ Array[Accounts]
Collecting Company Code of the selected payer. Mandatory - It is mandatory field to external source ATOS for E-invoicing.
Example: 86-Philippines 5-UK
154 155 156 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 154 def accounts @accounts end |
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer. Mandatory - It is mandatory field to external source ATOS for E-invoicing.
Example: 86-Philippines 5-UK
145 146 147 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 145 def col_co_code @col_co_code end |
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer. Optional. Example: 1-Philippines 5-UK
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 18 def col_co_id @col_co_id end |
#from_date ⇒ String
Invoice date searched from this date. Optional. This input is a search criterion, if given. Date format: yyyyMMdd Example: 20170830 Note: This criterion is ignored if ‘Period’ is given. Also, this criterion is ignored if ‘ToDate’ is not provided.
54 55 56 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 54 def from_date @from_date end |
#include_e_invoice_details ⇒ TrueClass | FalseClass
Whether to include the additional invoice details in the API response. Optional. Default value “False”. The parameters that are populated • DocumentReference • AdditionalDocuments The above fields will not be present in the response when the respective data is not available in the source system.
136 137 138 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 136 def include_e_invoice_details @include_e_invoice_details end |
#invoice_date ⇒ String
Date of invoicing. Optional. This input is a search criterion, if given. Date format: yyyyMMdd Example: 20170830
72 73 74 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 72 def invoice_date @invoice_date end |
#invoice_id ⇒ Integer
Invoice id. Optional. This input is a search criterion, if given. Example: 1
37 38 39 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 37 def invoice_id @invoice_id end |
#invoice_number ⇒ String
Invoice number. Optional. This input is a search criterion, if given. Example: 0123456789
44 45 46 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 44 def invoice_number @invoice_number end |
#invoice_status ⇒ String
Status of the invoice. Valid values – • Due – Invoices due for payment and is within the due date. • Paid – Fully paid Invoices. • Overdue – Invoices due of payment and has crossed the due date. • CreditNote – Credit notes • CreditStatement Optional. This input is a search criterion, if given.
121 122 123 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 121 def invoice_status @invoice_status end |
#invoiced_on_behalf_of ⇒ String
ISO code of the country i.e., UK, DE, MY, etc. Optional
126 127 128 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 126 def invoiced_on_behalf_of @invoiced_on_behalf_of end |
#payer_id ⇒ Integer
Payer Id of the selected payer. Optional if PayerNumber is passed else Mandatory Example: 123456
24 25 26 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 24 def payer_id @payer_id end |
#payer_number ⇒ String
Payer Number of the selected payer. Optional if PayerId is passed else Mandatory Example: GB000000123
30 31 32 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 30 def payer_number @payer_number end |
#period ⇒ Integer
Invoice date search period. Valid values –
-
Last 7 days – Issued in last 7 days.
-
Last 30 days – Issued in last 30 days.
-
Last 90 days – Issued in last 90 days.
Optional. This input is a search criterion, if given. Example: 1
110 111 112 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 110 def period @period end |
#so_a_reference_number ⇒ String
Statement of Account reference number of the payment customer. Optional. This input is a search criterion, if given. Example: 123
100 101 102 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 100 def so_a_reference_number @so_a_reference_number end |
#statement_of_account_id ⇒ String
Statement of Account Id of the payment customer. Optional. This input is a search criterion, if given. Example: 1
93 94 95 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 93 def statement_of_account_id @statement_of_account_id end |
#summary_document_id ⇒ Integer
Summary document id Optional. This input is a search criterion, if given. Example: 1
79 80 81 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 79 def summary_document_id @summary_document_id end |
#summary_document_number ⇒ String
Summary document number Optional. This input is a search criterion, if given. Example: ‘0/CZ0000000123456/2017’
86 87 88 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 86 def summary_document_number @summary_document_number end |
#to_date ⇒ String
Invoice date searched until this date. Optional. This input is a search criterion, if given. Date format: yyyyMMdd Example: 20170830 Note: This criterion is ignored if ‘Period’ is given. Also, this criterion is ignored if ‘FromDate’ is not provided.
64 65 66 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 64 def to_date @to_date end |
#type ⇒ String
Invoice type. Allowed values – • Original – Original document. • Reversal – Reversed document. • Replacement – Replaced document. Optional. (When not passed all invoice, types are considered for search) This input is a search criterion, if given. Example: Original
164 165 166 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 164 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 274 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP invoice_id = hash.key?('InvoiceId') ? hash['InvoiceId'] : SKIP invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP summary_document_id = hash.key?('SummaryDocumentId') ? hash['SummaryDocumentId'] : SKIP summary_document_number = hash.key?('SummaryDocumentNumber') ? hash['SummaryDocumentNumber'] : SKIP statement_of_account_id = hash.key?('StatementOfAccountId') ? hash['StatementOfAccountId'] : SKIP so_a_reference_number = hash.key?('SoAReferenceNumber') ? hash['SoAReferenceNumber'] : SKIP period = hash.key?('Period') ? hash['Period'] : SKIP invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP invoiced_on_behalf_of = hash.key?('InvoicedOnBehalfOf') ? hash['InvoicedOnBehalfOf'] : SKIP include_e_invoice_details = hash.key?('IncludeEInvoiceDetails') ? hash['IncludeEInvoiceDetails'] : SKIP col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP # Parameter is an array, so we need to iterate through it accounts = nil unless hash['Accounts'].nil? accounts = [] hash['Accounts'].each do |structure| accounts << (Accounts.from_hash(structure) if structure) end end accounts = SKIP unless hash.key?('Accounts') type = hash.key?('Type') ? hash['Type'] : SKIP # Create object from extracted values. InvoiceSummaryRequestFilters.new(col_co_id, payer_id, payer_number, invoice_id, invoice_number, from_date, to_date, invoice_date, summary_document_id, summary_document_number, statement_of_account_id, so_a_reference_number, period, invoice_status, invoiced_on_behalf_of, include_e_invoice_details, col_co_code, accounts, type) end |
.names ⇒ Object
A mapping from model property names to API property names.
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 167 def self.names @_hash = {} if @_hash.nil? @_hash['col_co_id'] = 'ColCoId' @_hash['payer_id'] = 'PayerId' @_hash['payer_number'] = 'PayerNumber' @_hash['invoice_id'] = 'InvoiceId' @_hash['invoice_number'] = 'InvoiceNumber' @_hash['from_date'] = 'FromDate' @_hash['to_date'] = 'ToDate' @_hash['invoice_date'] = 'InvoiceDate' @_hash['summary_document_id'] = 'SummaryDocumentId' @_hash['summary_document_number'] = 'SummaryDocumentNumber' @_hash['statement_of_account_id'] = 'StatementOfAccountId' @_hash['so_a_reference_number'] = 'SoAReferenceNumber' @_hash['period'] = 'Period' @_hash['invoice_status'] = 'InvoiceStatus' @_hash['invoiced_on_behalf_of'] = 'InvoicedOnBehalfOf' @_hash['include_e_invoice_details'] = 'IncludeEInvoiceDetails' @_hash['col_co_code'] = 'ColCoCode' @_hash['accounts'] = 'Accounts' @_hash['type'] = 'Type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 217 def self.nullables %w[ col_co_id payer_id payer_number invoice_id invoice_number from_date to_date invoice_date summary_document_id summary_document_number statement_of_account_id so_a_reference_number period invoice_status invoiced_on_behalf_of include_e_invoice_details col_co_code type ] end |
.optionals ⇒ Object
An array for optional fields
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_summary_request_filters.rb', line 192 def self.optionals %w[ col_co_id payer_id payer_number invoice_id invoice_number from_date to_date invoice_date summary_document_id summary_document_number statement_of_account_id so_a_reference_number period invoice_status invoiced_on_behalf_of include_e_invoice_details col_co_code accounts type ] end |