Class: ShellDataReportingApIs::InvoiceDatesData
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::InvoiceDatesData
- Defined in:
- lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb
Overview
InvoiceDatesData Model.
Instance Attribute Summary collapse
-
#invoice_dates ⇒ Array[String]
List of Invoicing dates.
-
#invoice_numbers ⇒ Array[String]
List of Invoice numbers.
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(invoice_numbers = SKIP, invoice_dates = SKIP) ⇒ InvoiceDatesData
constructor
A new instance of InvoiceDatesData.
Methods inherited from BaseModel
Constructor Details
#initialize(invoice_numbers = SKIP, invoice_dates = SKIP) ⇒ InvoiceDatesData
Returns a new instance of InvoiceDatesData.
42 43 44 45 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb', line 42 def initialize(invoice_numbers = SKIP, invoice_dates = SKIP) @invoice_numbers = invoice_numbers unless invoice_numbers == SKIP @invoice_dates = invoice_dates unless invoice_dates == SKIP end |
Instance Attribute Details
#invoice_dates ⇒ Array[String]
List of Invoicing dates. Format: yyyyMMdd
19 20 21 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb', line 19 def invoice_dates @invoice_dates end |
#invoice_numbers ⇒ Array[String]
List of Invoice numbers.
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb', line 14 def invoice_numbers @invoice_numbers end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb', line 48 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. invoice_numbers = hash.key?('InvoiceNumbers') ? hash['InvoiceNumbers'] : SKIP invoice_dates = hash.key?('InvoiceDates') ? hash['InvoiceDates'] : SKIP # Create object from extracted values. InvoiceDatesData.new(invoice_numbers, invoice_dates) end |
.names ⇒ Object
A mapping from model property names to API property names.
22 23 24 25 26 27 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb', line 22 def self.names @_hash = {} if @_hash.nil? @_hash['invoice_numbers'] = 'InvoiceNumbers' @_hash['invoice_dates'] = 'InvoiceDates' @_hash end |
.nullables ⇒ Object
An array for nullable fields
38 39 40 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb', line 38 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
30 31 32 33 34 35 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_dates_data.rb', line 30 def self.optionals %w[ invoice_numbers invoice_dates ] end |