Class: ShellDataReportingApIs::MultiPricedTransactionRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::MultiPricedTransactionRequest
- Defined in:
- lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb
Overview
MultiPricedTransactionRequest Model.
Instance Attribute Summary collapse
-
#accounts ⇒ Array[MultiPricedTransactionRequestAccountsItems]
List of Payers/Accounts entity.
-
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer.
-
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer.
-
#current_page ⇒ Integer
Page Number (as shown to the users) Optional Default value 1 Note: If IncludeFees is ‘True’ then pagination is not allowed.
-
#from_date ⇒ String
Transactions from Date/Time.
-
#fuel_only ⇒ TrueClass | FalseClass
True/False Optional Default value: False.
-
#include_fees ⇒ TrueClass | FalseClass
True/False Optional Default value: False When passed as ‘True’ then ignore complex filters, all sales items along with fees included on the same response.
-
#invoice_date ⇒ String
Invoice Date.
-
#invoice_from_date ⇒ String
Start date for transaction search by invoice date.
-
#invoice_number ⇒ String
Invoice Number.
-
#invoice_status ⇒ String
Invoice status of the transactions Mandatory Possible options: I - Invoiced U – Un-Invoiced A – All Max Length: 1.
-
#invoice_to_date ⇒ String
End date for transaction search by invoice date.
-
#page_size ⇒ Integer
Page Size – Number of records to show on a page Optional Default value 50 Note: If IncludeFees is ‘True’ then pagination is not allowed.
-
#period ⇒ Integer
Transactions Period.
-
#posting_date_from ⇒ String
Transaction Posting Date/time in the Cards Platform - From Date/time.
-
#posting_date_to ⇒ String
Transaction Posting Date/time in the Cards Platform – To Date/time.
-
#purchased_in_country ⇒ String
ISO Country Code (ex: UK, FR) Optional Note: If IncludeFees is true then this filter will be ignored.
-
#sort_order ⇒ String
Allowed Sorting Options: 1.
-
#to_date ⇒ String
Transactions to Date/Time.
-
#valid_invoice_date_only ⇒ TrueClass | FalseClass
True/False Optional Default value: True.
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, accounts = nil, col_co_id = SKIP, invoice_status = SKIP, purchased_in_country = SKIP, from_date = SKIP, to_date = SKIP, period = SKIP, posting_date_from = SKIP, posting_date_to = SKIP, invoice_date = SKIP, invoice_number = SKIP, valid_invoice_date_only = SKIP, invoice_from_date = SKIP, invoice_to_date = SKIP, fuel_only = SKIP, include_fees = SKIP, sort_order = SKIP, current_page = SKIP, page_size = SKIP) ⇒ MultiPricedTransactionRequest
constructor
A new instance of MultiPricedTransactionRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(col_co_code = nil, accounts = nil, col_co_id = SKIP, invoice_status = SKIP, purchased_in_country = SKIP, from_date = SKIP, to_date = SKIP, period = SKIP, posting_date_from = SKIP, posting_date_to = SKIP, invoice_date = SKIP, invoice_number = SKIP, valid_invoice_date_only = SKIP, invoice_from_date = SKIP, invoice_to_date = SKIP, fuel_only = SKIP, include_fees = SKIP, sort_order = SKIP, current_page = SKIP, page_size = SKIP) ⇒ MultiPricedTransactionRequest
Returns a new instance of MultiPricedTransactionRequest.
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 254 def initialize(col_co_code = nil, accounts = nil, col_co_id = SKIP, invoice_status = SKIP, purchased_in_country = SKIP, from_date = SKIP, to_date = SKIP, period = SKIP, posting_date_from = SKIP, posting_date_to = SKIP, invoice_date = SKIP, invoice_number = SKIP, valid_invoice_date_only = SKIP, invoice_from_date = SKIP, invoice_to_date = SKIP, fuel_only = SKIP, include_fees = SKIP, sort_order = SKIP, current_page = SKIP, page_size = SKIP) @col_co_id = col_co_id unless col_co_id == SKIP @col_co_code = col_co_code @accounts = accounts @invoice_status = invoice_status unless invoice_status == SKIP @purchased_in_country = purchased_in_country unless purchased_in_country == SKIP @from_date = from_date unless from_date == SKIP @to_date = to_date unless to_date == SKIP @period = period unless period == SKIP @posting_date_from = posting_date_from unless posting_date_from == SKIP @posting_date_to = posting_date_to unless posting_date_to == SKIP @invoice_date = invoice_date unless invoice_date == SKIP @invoice_number = invoice_number unless invoice_number == SKIP @valid_invoice_date_only = valid_invoice_date_only unless valid_invoice_date_only == SKIP @invoice_from_date = invoice_from_date unless invoice_from_date == SKIP @invoice_to_date = invoice_to_date unless invoice_to_date == SKIP @fuel_only = fuel_only unless fuel_only == SKIP @include_fees = include_fees unless include_fees == SKIP @sort_order = sort_order unless sort_order == SKIP @current_page = current_page unless current_page == SKIP @page_size = page_size unless page_size == SKIP end |
Instance Attribute Details
#accounts ⇒ Array[MultiPricedTransactionRequestAccountsItems]
List of Payers/Accounts entity. Mandatory. • Max number of payers allowed in the input is 10, if it exceeds in the input it will throw an error. • This value is configurable. Initial configuration will be 100 and will change to 10 once SFH changes are integrated. Note:
-
At least one payer should be present.
Accounts information are optional.
39 40 41 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 39 def accounts @accounts end |
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer. Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia, Ukraine etc. It is optional for other countries if ColCoID is provided. Example: 86 for Philippines 5 for UK
27 28 29 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 27 def col_co_code @col_co_code end |
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer. Optional if ColCoCode is passed else Mandatory. Example: 1 for Philippines 5 for UK
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 18 def col_co_id @col_co_id end |
#current_page ⇒ Integer
Page Number (as shown to the users) Optional Default value 1 Note: If IncludeFees is ‘True’ then pagination is not allowed. This parameter will be ignored.
189 190 191 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 189 def current_page @current_page end |
#from_date ⇒ String
Transactions from Date/Time. Optional – When provided, it should be with in last 24 months. Format: yyyyMMdd
61 62 63 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 61 def from_date @from_date end |
#fuel_only ⇒ TrueClass | FalseClass
True/False Optional Default value: False. When passed as ‘True’ Only returned records with Fuel transactions. When passed as ‘False’ the above condition will not be checked. Note: If IncludeFees is ‘True’ then this filter will be ignored
160 161 162 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 160 def fuel_only @fuel_only end |
#include_fees ⇒ TrueClass | FalseClass
True/False Optional Default value: False When passed as ‘True’ then ignore complex filters, all sales items along with fees included on the same response
168 169 170 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 168 def include_fees @include_fees end |
#invoice_date ⇒ String
Invoice Date. Optional Note: 1) If value is not blank then the system will ignore the InvoiceStatus parameter and it will return all the billed transactions for the given invoice date. 2) If IncludeFees is true then this filter will be ignored
Format: yyyyMMdd
111 112 113 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 111 def invoice_date @invoice_date end |
#invoice_from_date ⇒ String
Start date for transaction search by invoice date. Optional Note: 1) Value should be with in last 24 months (if provided). 2) Maximum of 90(Configurable) days duration allowed per search. 3) When provided, InvoiceFromDate has to be less than or equal to InvoiceToDate. Format: yyyyMMdd
141 142 143 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 141 def invoice_from_date @invoice_from_date end |
#invoice_number ⇒ String
Invoice Number. Optional Note: 1) If value is not blank then the system will ignore the InvoiceStatus parameter and it will return all the billed transactions for the given invoice date.
120 121 122 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 120 def invoice_number @invoice_number end |
#invoice_status ⇒ String
Invoice status of the transactions Mandatory Possible options: I - Invoiced U – Un-Invoiced A – All Max Length: 1
49 50 51 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 49 def invoice_status @invoice_status end |
#invoice_to_date ⇒ String
End date for transaction search by invoice date. Optional Note: 1) When InvoiceFromDate is provided and InvoiceToDate is null, then InvoiceToDate will be calculated as (InvoiceFromDate + 90 days) or (CurrentDate) whichever is lesser. Format: yyyyMMdd
151 152 153 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 151 def invoice_to_date @invoice_to_date end |
#page_size ⇒ Integer
Page Size – Number of records to show on a page Optional Default value 50 Note: If IncludeFees is ‘True’ then pagination is not allowed. This parameter will be ignored.
197 198 199 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 197 def page_size @page_size end |
#period ⇒ Integer
Transactions Period. Possible values are:
-
Last 7 Days
-
Last 30 Days
-
Last 90 Days
79 80 81 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 79 def period @period end |
#posting_date_from ⇒ String
Transaction Posting Date/time in the Cards Platform - From Date/time. Note: 1) When the value of both PostingDateFrom and PostingDateTo are present in the request then the value of PostingDateFrom must be less than PostingDateTo. 2) If IncludeFees is true then this filter will be ignored Format: yyyyMMdd HH:mm:ss
89 90 91 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 89 def posting_date_from @posting_date_from end |
#posting_date_to ⇒ String
Transaction Posting Date/time in the Cards Platform – To Date/time. Note: 1) If IncludeFees is true then this filter will be ignored. 2) When the value of both PostingDateFrom and PostingDateTo are present in the request then the value of PostingDateFrom must be less than PostingDateTo. Format: yyyyMMdd HH:mm:ss
99 100 101 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 99 def posting_date_to @posting_date_to end |
#purchased_in_country ⇒ String
ISO Country Code (ex: UK, FR) Optional Note: If IncludeFees is true then this filter will be ignored
55 56 57 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 55 def purchased_in_country @purchased_in_country end |
#sort_order ⇒ String
Allowed Sorting Options:
-
TransactionDateAscending
-
TransactionDateDescending
-
GrossAmountDescending
-
GrossAmountAscending
-
NetAmountAscending
-
NetAmountDescensding
Example value to be passed: 1,3 Note: If IncludeFees is ‘True’ then sorting is not allowed. This parameter will be ignored.
181 182 183 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 181 def sort_order @sort_order end |
#to_date ⇒ String
Transactions to Date/Time. 1) When the value is blank and FromDate is provided on the input, all transactions took place 210(Configurable) days after the given FromDate is returned. 2) Difference between FromDate and ToDate cannot be more than 210 (Configurable) days. Format: yyyyMMdd
71 72 73 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 71 def to_date @to_date end |
#valid_invoice_date_only ⇒ TrueClass | FalseClass
True/False Optional Default value: True. When passed as ‘True’ the transactions records with report date not equal to 9999-12-30 will be returned. When passed as ‘False’ the above condition will not be checked. Note: If IncludeFees is ‘True’ then this filter will be ignored
130 131 132 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 130 def valid_invoice_date_only @valid_invoice_date_only end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 286 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : nil # Parameter is an array, so we need to iterate through it accounts = nil unless hash['Accounts'].nil? accounts = [] hash['Accounts'].each do |structure| accounts << (MultiPricedTransactionRequestAccountsItems.from_hash(structure) if structure) end end accounts = nil unless hash.key?('Accounts') col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP purchased_in_country = hash.key?('PurchasedInCountry') ? hash['PurchasedInCountry'] : SKIP from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP period = hash.key?('Period') ? hash['Period'] : SKIP posting_date_from = hash.key?('PostingDateFrom') ? hash['PostingDateFrom'] : SKIP posting_date_to = hash.key?('PostingDateTo') ? hash['PostingDateTo'] : SKIP invoice_date = hash.key?('InvoiceDate') ? hash['InvoiceDate'] : SKIP invoice_number = hash.key?('InvoiceNumber') ? hash['InvoiceNumber'] : SKIP valid_invoice_date_only = hash.key?('ValidInvoiceDateOnly') ? hash['ValidInvoiceDateOnly'] : SKIP invoice_from_date = hash.key?('InvoiceFromDate') ? hash['InvoiceFromDate'] : SKIP invoice_to_date = hash.key?('InvoiceToDate') ? hash['InvoiceToDate'] : SKIP fuel_only = hash.key?('FuelOnly') ? hash['FuelOnly'] : SKIP include_fees = hash.key?('IncludeFees') ? hash['IncludeFees'] : SKIP sort_order = hash.key?('SortOrder') ? hash['SortOrder'] : SKIP current_page = hash.key?('CurrentPage') ? hash['CurrentPage'] : SKIP page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP # Create object from extracted values. MultiPricedTransactionRequest.new(col_co_code, accounts, col_co_id, invoice_status, purchased_in_country, from_date, to_date, period, posting_date_from, posting_date_to, invoice_date, invoice_number, valid_invoice_date_only, invoice_from_date, invoice_to_date, fuel_only, include_fees, sort_order, current_page, page_size) end |
.names ⇒ Object
A mapping from model property names to API property names.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 200 def self.names @_hash = {} if @_hash.nil? @_hash['col_co_id'] = 'ColCoId' @_hash['col_co_code'] = 'ColCoCode' @_hash['accounts'] = 'Accounts' @_hash['invoice_status'] = 'InvoiceStatus' @_hash['purchased_in_country'] = 'PurchasedInCountry' @_hash['from_date'] = 'FromDate' @_hash['to_date'] = 'ToDate' @_hash['period'] = 'Period' @_hash['posting_date_from'] = 'PostingDateFrom' @_hash['posting_date_to'] = 'PostingDateTo' @_hash['invoice_date'] = 'InvoiceDate' @_hash['invoice_number'] = 'InvoiceNumber' @_hash['valid_invoice_date_only'] = 'ValidInvoiceDateOnly' @_hash['invoice_from_date'] = 'InvoiceFromDate' @_hash['invoice_to_date'] = 'InvoiceToDate' @_hash['fuel_only'] = 'FuelOnly' @_hash['include_fees'] = 'IncludeFees' @_hash['sort_order'] = 'SortOrder' @_hash['current_page'] = 'CurrentPage' @_hash['page_size'] = 'PageSize' @_hash end |
.nullables ⇒ Object
An array for nullable fields
250 251 252 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 250 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/shell_data_reporting_ap_is/models/multi_priced_transaction_request.rb', line 226 def self.optionals %w[ col_co_id invoice_status purchased_in_country from_date to_date period posting_date_from posting_date_to invoice_date invoice_number valid_invoice_date_only invoice_from_date invoice_to_date fuel_only include_fees sort_order current_page page_size ] end |