Class: ShellDataReportingApIs::EIDSearchReq
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::EIDSearchReq
- Defined in:
- lib/shell_data_reporting_ap_is/models/eid_search_req.rb
Overview
EIDSearchReq Model.
Instance Attribute Summary collapse
-
#account_group_country ⇒ Integer
Country code (colco code) of the account group.
-
#account_group_id ⇒ Array[String]
List of IDs of the account groups that user has access to.
-
#account_group_name ⇒ String
Account group name Optional.
-
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer.
-
#from_date ⇒ String
EID date searched from this date.
-
#invoice_type ⇒ String
Invoice type.
-
#sort_by ⇒ Array[String]
Sort option – • InvoiceNumber ASC • InvoiceDate ASC • InvoiceNumber DESC • InvoiceDate DESC Optional.
-
#to_date ⇒ String
Invoice date searched until this date.
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_code = nil, account_group_country = nil, account_group_id = nil, account_group_name = SKIP, from_date = SKIP, to_date = SKIP, invoice_type = SKIP, sort_by = SKIP) ⇒ EIDSearchReq
constructor
A new instance of EIDSearchReq.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(col_co_code = nil, account_group_country = nil, account_group_id = nil, account_group_name = SKIP, from_date = SKIP, to_date = SKIP, invoice_type = SKIP, sort_by = SKIP) ⇒ EIDSearchReq
Returns a new instance of EIDSearchReq.
97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 97 def initialize(col_co_code = nil, account_group_country = nil, account_group_id = nil, account_group_name = SKIP, from_date = SKIP, to_date = SKIP, invoice_type = SKIP, sort_by = SKIP) @col_co_code = col_co_code @account_group_country = account_group_country @account_group_id = account_group_id @account_group_name = account_group_name unless account_group_name == SKIP @from_date = from_date unless from_date == SKIP @to_date = to_date unless to_date == SKIP @invoice_type = invoice_type unless invoice_type == SKIP @sort_by = sort_by unless sort_by == SKIP end |
Instance Attribute Details
#account_group_country ⇒ Integer
Country code (colco code) of the account group. Mandatory
20 21 22 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 20 def account_group_country @account_group_country end |
#account_group_id ⇒ Array[String]
List of IDs of the account groups that user has access to. Mandatory
25 26 27 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 25 def account_group_id @account_group_id end |
#account_group_name ⇒ String
Account group name Optional. This input is a search criterion, if given.
31 32 33 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 31 def account_group_name @account_group_name end |
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer. Mandatory
15 16 17 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 15 def col_co_code @col_co_code end |
#from_date ⇒ String
EID date searched from this date. Optional.
36 37 38 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 36 def from_date @from_date end |
#invoice_type ⇒ String
Invoice type. Optional. Possible values: • NAT (National) • INT (International)
49 50 51 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 49 def invoice_type @invoice_type end |
#sort_by ⇒ Array[String]
Sort option –• InvoiceNumber ASC • InvoiceDate ASC • InvoiceNumber DESC • InvoiceDate DESC Optional
58 59 60 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 58 def sort_by @sort_by end |
#to_date ⇒ String
Invoice date searched until this date. Optional.
41 42 43 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 41 def to_date @to_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 112 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : nil account_group_country = hash.key?('AccountGroupCountry') ? hash['AccountGroupCountry'] : nil account_group_id = hash.key?('AccountGroupId') ? hash['AccountGroupId'] : nil account_group_name = hash.key?('AccountGroupName') ? hash['AccountGroupName'] : SKIP from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP invoice_type = hash.key?('InvoiceType') ? hash['InvoiceType'] : SKIP sort_by = hash.key?('SortBy') ? hash['SortBy'] : SKIP # Create object from extracted values. EIDSearchReq.new(col_co_code, account_group_country, account_group_id, account_group_name, from_date, to_date, invoice_type, sort_by) end |
.names ⇒ Object
A mapping from model property names to API property names.
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 61 def self.names @_hash = {} if @_hash.nil? @_hash['col_co_code'] = 'ColCoCode' @_hash['account_group_country'] = 'AccountGroupCountry' @_hash['account_group_id'] = 'AccountGroupId' @_hash['account_group_name'] = 'AccountGroupName' @_hash['from_date'] = 'FromDate' @_hash['to_date'] = 'ToDate' @_hash['invoice_type'] = 'InvoiceType' @_hash['sort_by'] = 'SortBy' @_hash end |
.nullables ⇒ Object
An array for nullable fields
86 87 88 89 90 91 92 93 94 95 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 86 def self.nullables %w[ col_co_code account_group_country account_group_name from_date to_date invoice_type ] end |
.optionals ⇒ Object
An array for optional fields
75 76 77 78 79 80 81 82 83 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 75 def self.optionals %w[ account_group_name from_date to_date invoice_type sort_by ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
149 150 151 152 153 154 155 156 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 149 def inspect class_name = self.class.name.split('::').last "<#{class_name} col_co_code: #{@col_co_code.inspect}, account_group_country:"\ " #{@account_group_country.inspect}, account_group_id: #{@account_group_id.inspect},"\ " account_group_name: #{@account_group_name.inspect}, from_date: #{@from_date.inspect},"\ " to_date: #{@to_date.inspect}, invoice_type: #{@invoice_type.inspect}, sort_by:"\ " #{@sort_by.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
140 141 142 143 144 145 146 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 140 def to_s class_name = self.class.name.split('::').last "<#{class_name} col_co_code: #{@col_co_code}, account_group_country:"\ " #{@account_group_country}, account_group_id: #{@account_group_id}, account_group_name:"\ " #{@account_group_name}, from_date: #{@from_date}, to_date: #{@to_date}, invoice_type:"\ " #{@invoice_type}, sort_by: #{@sort_by}>" end |