Class: ShellDataReportingApIs::SearchDocReq
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::SearchDocReq
- Defined in:
- lib/shell_data_reporting_ap_is/models/search_doc_req.rb
Overview
SearchDocReq Model.
Instance Attribute Summary collapse
-
#account_number ⇒ String
Account Number of the customer.
-
#account_number_list ⇒ Array[String]
Account Number of the customers.
-
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer.
-
#document_type ⇒ String
Document Type Optional One of the following values: • NAT (National) • INT (International) • SOA (Statement of Account).
-
#due_date_from ⇒ String
Invoice Due Date Range/From Optional Format: yyyy/MM/dd.
-
#due_date_to ⇒ String
Invoice Due Date Range/To Optional Format: yyyy/MM/dd.
-
#gross_amount ⇒ String
Gross amount of the bill.
-
#gross_amount_operator ⇒ String
Criteria on the gross amount, for instance use GT when to retrieve the invoices for that gross amount is greater than the given amount on GrossAmount parameter above.
-
#invoice_number ⇒ String
Invoice number.
-
#invoice_number_list ⇒ Array[String]
List of Invoice number.
-
#invoice_status ⇒ String
The status of the invoices Optional One of the following values: • NEW • VIEWED • DOWNLOADED • RESTORED.
-
#issuing_date_from ⇒ String
Invoice Issuing Date Range/From Optional Format: yyyy/MM/dd.
-
#issuing_date_to ⇒ String
Invoice Issuing Date Range/To Optional Format: yyyy/MM/dd.
-
#payer_number ⇒ String
Payer Number of the selected payer.
-
#sorty_by ⇒ Array[String]
Collecting Company Code of the selected payer.
-
#vat_issuer_country ⇒ String
Two letter ISO country code.
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
Methods inherited from BaseModel
Constructor Details
#initialize(payer_number = nil, col_co_code = nil, account_number = SKIP, account_number_list = SKIP, invoice_number = SKIP, invoice_number_list = SKIP, invoice_status = SKIP, issuing_date_from = SKIP, issuing_date_to = SKIP, due_date_from = SKIP, due_date_to = SKIP, gross_amount = SKIP, gross_amount_operator = SKIP, document_type = SKIP, vat_issuer_country = SKIP, sorty_by = SKIP) ⇒ SearchDocReq
Returns a new instance of SearchDocReq.
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 188 def initialize(payer_number = nil, col_co_code = nil, account_number = SKIP, account_number_list = SKIP, invoice_number = SKIP, invoice_number_list = SKIP, invoice_status = SKIP, issuing_date_from = SKIP, issuing_date_to = SKIP, due_date_from = SKIP, due_date_to = SKIP, gross_amount = SKIP, gross_amount_operator = SKIP, document_type = SKIP, vat_issuer_country = SKIP, sorty_by = SKIP) @payer_number = payer_number @account_number = account_number unless account_number == SKIP @account_number_list = account_number_list unless account_number_list == SKIP @invoice_number = invoice_number unless invoice_number == SKIP @invoice_number_list = invoice_number_list unless invoice_number_list == SKIP @invoice_status = invoice_status unless invoice_status == SKIP @issuing_date_from = issuing_date_from unless issuing_date_from == SKIP @issuing_date_to = issuing_date_to unless issuing_date_to == SKIP @due_date_from = due_date_from unless due_date_from == SKIP @due_date_to = due_date_to unless due_date_to == SKIP @gross_amount = gross_amount unless gross_amount == SKIP @gross_amount_operator = gross_amount_operator unless gross_amount_operator == SKIP @document_type = document_type unless document_type == SKIP @vat_issuer_country = vat_issuer_country unless vat_issuer_country == SKIP @sorty_by = sorty_by unless sorty_by == SKIP @col_co_code = col_co_code end |
Instance Attribute Details
#account_number ⇒ String
Account Number of the customer. Mandatory for customer users else optional. This input is a search criterion, if given. Example: GB000000123
23 24 25 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 23 def account_number @account_number end |
#account_number_list ⇒ Array[String]
Account Number of the customers. optional. This input is a search criterion, if given. Example: [“GB00000123”, “GB00000225”]
30 31 32 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 30 def account_number_list @account_number_list end |
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer. Mandatory Example: 86-Philippines 5-UK
125 126 127 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 125 def col_co_code @col_co_code end |
#document_type ⇒ String
Document Type Optional One of the following values: • NAT (National) • INT (International) • SOA (Statement of Account)
105 106 107 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 105 def document_type @document_type end |
#due_date_from ⇒ String
Invoice Due Date Range/From Optional Format: yyyy/MM/dd
71 72 73 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 71 def due_date_from @due_date_from end |
#due_date_to ⇒ String
Invoice Due Date Range/To Optional Format: yyyy/MM/dd
77 78 79 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 77 def due_date_to @due_date_to end |
#gross_amount ⇒ String
Gross amount of the bill. Optional
82 83 84 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 82 def gross_amount @gross_amount end |
#gross_amount_operator ⇒ String
Criteria on the gross amount, for instance use GT when to retrieve the invoices for that gross amount is greater than the given amount on GrossAmount parameter above. Optional This parameter will be ignored if GrossAmount parameter is not set. One of the following values: • LT (Less Than) • LE (Lesser or Equal) • EQ (equal) • GE (Greater or equal) • GT (Greater than)
96 97 98 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 96 def gross_amount_operator @gross_amount_operator end |
#invoice_number ⇒ String
Invoice number. Optional if InvoiceNumberList is passed else Mandatory This input is a search criterion, if given. Example: 0123456789
37 38 39 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 37 def invoice_number @invoice_number end |
#invoice_number_list ⇒ Array[String]
List of Invoice number. Optional if InvoiceNumber is passed else Mandatory Example: [“0123456789”, “0123459799”]
43 44 45 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 43 def invoice_number_list @invoice_number_list end |
#invoice_status ⇒ String
The status of the invoices Optional One of the following values: • NEW • VIEWED • DOWNLOADED • RESTORED
53 54 55 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 53 def invoice_status @invoice_status end |
#issuing_date_from ⇒ String
Invoice Issuing Date Range/From Optional Format: yyyy/MM/dd
59 60 61 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 59 def issuing_date_from @issuing_date_from end |
#issuing_date_to ⇒ String
Invoice Issuing Date Range/To Optional Format: yyyy/MM/dd
65 66 67 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 65 def issuing_date_to @issuing_date_to end |
#payer_number ⇒ String
Payer Number of the selected payer. Mandatory Example: GB000000123
16 17 18 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 16 def payer_number @payer_number end |
#sorty_by ⇒ Array[String]
Collecting Company Code of the selected payer. Mandatory Example: 86-Philippines 5-UK
117 118 119 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 117 def sorty_by @sorty_by end |
#vat_issuer_country ⇒ String
Two letter ISO country code.
109 110 111 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 109 def vat_issuer_country @vat_issuer_country end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 215 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : nil col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : nil account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP account_number_list = hash.key?('AccountNumberList') ? hash['AccountNumberList'] : SKIP invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP invoice_number_list = hash.key?('InvoiceNumberList') ? hash['InvoiceNumberList'] : SKIP invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP issuing_date_from = hash.key?('IssuingDateFrom') ? hash['IssuingDateFrom'] : SKIP issuing_date_to = hash.key?('IssuingDateTo') ? hash['IssuingDateTo'] : SKIP due_date_from = hash.key?('DueDateFrom') ? hash['DueDateFrom'] : SKIP due_date_to = hash.key?('DueDateTo') ? hash['DueDateTo'] : SKIP gross_amount = hash.key?('GrossAmount') ? hash['GrossAmount'] : SKIP gross_amount_operator = hash.key?('GrossAmountOperator') ? hash['GrossAmountOperator'] : SKIP document_type = hash.key?('DocumentType') ? hash['DocumentType'] : SKIP vat_issuer_country = hash.key?('VATIssuerCountry') ? hash['VATIssuerCountry'] : SKIP sorty_by = hash.key?('SortyBy') ? hash['SortyBy'] : SKIP # Create object from extracted values. SearchDocReq.new(payer_number, col_co_code, account_number, account_number_list, invoice_number, invoice_number_list, invoice_status, issuing_date_from, issuing_date_to, due_date_from, due_date_to, gross_amount, gross_amount_operator, document_type, vat_issuer_country, sorty_by) end |
.names ⇒ Object
A mapping from model property names to API property names.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 128 def self.names @_hash = {} if @_hash.nil? @_hash['payer_number'] = 'PayerNumber' @_hash['account_number'] = 'AccountNumber' @_hash['account_number_list'] = 'AccountNumberList' @_hash['invoice_number'] = 'InvoiceNumber' @_hash['invoice_number_list'] = 'InvoiceNumberList' @_hash['invoice_status'] = 'InvoiceStatus' @_hash['issuing_date_from'] = 'IssuingDateFrom' @_hash['issuing_date_to'] = 'IssuingDateTo' @_hash['due_date_from'] = 'DueDateFrom' @_hash['due_date_to'] = 'DueDateTo' @_hash['gross_amount'] = 'GrossAmount' @_hash['gross_amount_operator'] = 'GrossAmountOperator' @_hash['document_type'] = 'DocumentType' @_hash['vat_issuer_country'] = 'VATIssuerCountry' @_hash['sorty_by'] = 'SortyBy' @_hash['col_co_code'] = 'ColCoCode' @_hash end |
.nullables ⇒ Object
An array for nullable fields
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 170 def self.nullables %w[ payer_number account_number invoice_number invoice_status issuing_date_from issuing_date_to due_date_from due_date_to gross_amount gross_amount_operator document_type vat_issuer_country col_co_code ] end |
.optionals ⇒ Object
An array for optional fields
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/shell_data_reporting_ap_is/models/search_doc_req.rb', line 150 def self.optionals %w[ account_number account_number_list invoice_number invoice_number_list invoice_status issuing_date_from issuing_date_to due_date_from due_date_to gross_amount gross_amount_operator document_type vat_issuer_country sorty_by ] end |