Class: ShellDataReportingApIs::InvoiceSearchAdditionalDocument
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::InvoiceSearchAdditionalDocument
- Defined in:
- lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb
Overview
Invoice document reference number for the additional invoice files such as KSeF file (Poland). This field is optional, and it will be missing if additional documents are not applicable. Also, it will not be populated if the invoice date is older than 13 months.
Instance Attribute Summary collapse
-
#is_applicable ⇒ String
True if a KSeF PDF will be produced for the customer.
-
#reference ⇒ String
Unique ID for the additional invoice document.
-
#type ⇒ String
Type of the additional document.
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(reference = SKIP, type = SKIP, is_applicable = SKIP) ⇒ InvoiceSearchAdditionalDocument
constructor
A new instance of InvoiceSearchAdditionalDocument.
Methods inherited from BaseModel
Constructor Details
#initialize(reference = SKIP, type = SKIP, is_applicable = SKIP) ⇒ InvoiceSearchAdditionalDocument
Returns a new instance of InvoiceSearchAdditionalDocument.
57 58 59 60 61 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb', line 57 def initialize(reference = SKIP, type = SKIP, is_applicable = SKIP) @reference = reference unless reference == SKIP @type = type unless type == SKIP @is_applicable = is_applicable unless is_applicable == SKIP end |
Instance Attribute Details
#is_applicable ⇒ String
True if a KSeF PDF will be produced for the customer.
28 29 30 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb', line 28 def is_applicable @is_applicable end |
#reference ⇒ String
Unique ID for the additional invoice document.
17 18 19 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb', line 17 def reference @reference end |
#type ⇒ String
Type of the additional document. Mandatory Possible values: • KSeF - Applicable for Poland market.
24 25 26 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb', line 24 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb', line 64 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. reference = hash.key?('Reference') ? hash['Reference'] : SKIP type = hash.key?('Type') ? hash['Type'] : SKIP is_applicable = hash.key?('IsApplicable') ? hash['IsApplicable'] : SKIP # Create object from extracted values. InvoiceSearchAdditionalDocument.new(reference, type, is_applicable) end |
.names ⇒ Object
A mapping from model property names to API property names.
31 32 33 34 35 36 37 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb', line 31 def self.names @_hash = {} if @_hash.nil? @_hash['reference'] = 'Reference' @_hash['type'] = 'Type' @_hash['is_applicable'] = 'IsApplicable' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 52 53 54 55 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb', line 49 def self.nullables %w[ reference type is_applicable ] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_additional_document.rb', line 40 def self.optionals %w[ reference type is_applicable ] end |