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_status ⇒ String
Status of the document.
-
#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, invoice_status = SKIP, sort_by = SKIP) ⇒ EIDSearchReq
constructor
A new instance of EIDSearchReq.
Methods inherited from BaseModel
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, invoice_status = SKIP, sort_by = SKIP) ⇒ EIDSearchReq
Returns a new instance of EIDSearchReq.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 110 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, invoice_status = 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 @invoice_status = invoice_status unless invoice_status == 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_status ⇒ String
Status of the document. Optional. Possible values: • NEW • VIEWED • DOWNLOADED • RESTORED
59 60 61 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 59 def invoice_status @invoice_status 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
68 69 70 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 68 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.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 126 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 invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : 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, invoice_status, sort_by) end |
.names ⇒ Object
A mapping from model property names to API property names.
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 71 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['invoice_status'] = 'InvoiceStatus' @_hash['sort_by'] = 'SortBy' @_hash end |
.nullables ⇒ Object
An array for nullable fields
98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/shell_data_reporting_ap_is/models/eid_search_req.rb', line 98 def self.nullables %w[ col_co_code account_group_country account_group_name from_date to_date invoice_type invoice_status ] end |
.optionals ⇒ Object
An array for optional 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.optionals %w[ account_group_name from_date to_date invoice_type invoice_status sort_by ] end |