Class: ShellDataReportingApIs::InvoiceSearchRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::InvoiceSearchRequest
- Defined in:
- lib/shell_data_reporting_ap_is/models/invoice_search_request.rb
Overview
InvoiceSearchRequest Model.
Instance Attribute Summary collapse
-
#filters ⇒ InvoiceSearchRequestFilters
TODO: Write general description for this method.
-
#page ⇒ Integer
TODO: Write general description for this method.
-
#page_size ⇒ Integer
TODO: Write general description for this method.
-
#sort_by ⇒ Array[Integer]
Sort option – 1.
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(filters = SKIP, page_size = SKIP, page = SKIP, sort_by = SKIP) ⇒ InvoiceSearchRequest
constructor
A new instance of InvoiceSearchRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(filters = SKIP, page_size = SKIP, page = SKIP, sort_by = SKIP) ⇒ InvoiceSearchRequest
Returns a new instance of InvoiceSearchRequest.
64 65 66 67 68 69 70 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_request.rb', line 64 def initialize(filters = SKIP, page_size = SKIP, page = SKIP, sort_by = SKIP) @filters = filters unless filters == SKIP @page_size = page_size unless page_size == SKIP @page = page unless page == SKIP @sort_by = sort_by unless sort_by == SKIP end |
Instance Attribute Details
#filters ⇒ InvoiceSearchRequestFilters
TODO: Write general description for this method
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_request.rb', line 14 def filters @filters end |
#page ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_request.rb', line 22 def page @page end |
#page_size ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_request.rb', line 18 def page_size @page_size end |
#sort_by ⇒ Array[Integer]
Sort option –
-
InvoiceDate ASC
-
InvoiceDate DESC
-
NetAmountCustomerCurrency ASC
-
NetAmountCustomerCurrency DESC
Optional Note: This option uses a column name with a combination of “ASC or DESC” for sorting. If only the column name is provided, it is sorted by ascending. Example values to be passed:
- “InvoiceDate”, “NetAmountCustomerCurrency DESC”
37 38 39 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_request.rb', line 37 def sort_by @sort_by end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_request.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. filters = InvoiceSearchRequestFilters.from_hash(hash['Filters']) if hash['Filters'] page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP page = hash.key?('Page') ? hash['Page'] : SKIP sort_by = hash.key?('SortBy') ? hash['SortBy'] : SKIP # Create object from extracted values. InvoiceSearchRequest.new(filters, page_size, page, sort_by) end |
.names ⇒ Object
A mapping from model property names to API property names.
40 41 42 43 44 45 46 47 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_request.rb', line 40 def self.names @_hash = {} if @_hash.nil? @_hash['filters'] = 'Filters' @_hash['page_size'] = 'PageSize' @_hash['page'] = 'Page' @_hash['sort_by'] = 'SortBy' @_hash end |
.nullables ⇒ Object
An array for nullable fields
60 61 62 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_request.rb', line 60 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 57 |
# File 'lib/shell_data_reporting_ap_is/models/invoice_search_request.rb', line 50 def self.optionals %w[ filters page_size page sort_by ] end |