Class: ShellDataReportingApIs::TransactionExceptionsRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::TransactionExceptionsRequest
- Defined in:
- lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb
Overview
TransactionExceptionsRequest Model.
Instance Attribute Summary collapse
-
#accounts ⇒ Array[Accounts]
Payer Number of the selected payer.
-
#col_co_code ⇒ Integer
Collecting Company Code of the selected payer.
-
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer.
-
#condition ⇒ Integer
Filter condition for the Exceptions.
-
#exception_period ⇒ Integer
Period in which the Exceptions such as Monthly/Weekly or Daily volume, value or usage to be identified in the given transactions date range.
-
#fuel_only ⇒ TrueClass | FalseClass
True/False Optional Default value: False.
-
#output_type ⇒ Integer
Output Type for Exceptions.
-
#payer_id ⇒ Integer
Payer Id of the selected payer.
-
#payer_number ⇒ String
Payer Number of the selected payer.
-
#products ⇒ Array[ExceptionProduct]
Filter condition for the Exceptions.
-
#site_group_ids ⇒ Array[Integer]
SiteGroupIds to be applied to the Filter Condition.
-
#transactions_from_date ⇒ String
Exceptions to be searched in transactions from date.
-
#transactions_to_date ⇒ String
Exceptions to be searched in transactions until date.
-
#use_field_id ⇒ TrueClass | FalseClass
True/False Optional Default value – False.
-
#value ⇒ Float
Value to be used on the Filter Condition.
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(transactions_from_date = nil, transactions_to_date = nil, condition = nil, output_type = nil, col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, accounts = SKIP, value = SKIP, products = SKIP, exception_period = SKIP, fuel_only = SKIP, site_group_ids = SKIP, use_field_id = SKIP) ⇒ TransactionExceptionsRequest
constructor
A new instance of TransactionExceptionsRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(transactions_from_date = nil, transactions_to_date = nil, condition = nil, output_type = nil, col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, accounts = SKIP, value = SKIP, products = SKIP, exception_period = SKIP, fuel_only = SKIP, site_group_ids = SKIP, use_field_id = SKIP) ⇒ TransactionExceptionsRequest
Returns a new instance of TransactionExceptionsRequest.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 175 def initialize(transactions_from_date = nil, transactions_to_date = nil, condition = nil, output_type = nil, col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, accounts = SKIP, value = SKIP, products = SKIP, exception_period = SKIP, fuel_only = SKIP, site_group_ids = SKIP, use_field_id = SKIP) @col_co_id = col_co_id unless col_co_id == SKIP @col_co_code = col_co_code unless col_co_code == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP @accounts = accounts unless accounts == SKIP @transactions_from_date = transactions_from_date @transactions_to_date = transactions_to_date @value = value unless value == SKIP @condition = condition @products = products unless products == SKIP @exception_period = exception_period unless exception_period == SKIP @output_type = output_type @fuel_only = fuel_only unless fuel_only == SKIP @site_group_ids = site_group_ids unless site_group_ids == SKIP @use_field_id = use_field_id unless use_field_id == SKIP end |
Instance Attribute Details
#accounts ⇒ Array[Accounts]
Payer Number of the selected payer. Optional if PayerId is passed else Mandatory
42 43 44 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 42 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/transaction_exceptions_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/transaction_exceptions_request.rb', line 18 def col_co_id @col_co_id end |
#condition ⇒ Integer
Filter condition for the Exceptions. Mandatory
-
VolumeGreaterThan
-
VolumeLessThan
-
UsageGreaterThan
-
UsageLessThan
-
ValueGreaterThan (in Customer Currency)
-
ValueLessThan (in Customer Currency)
Note: - When “OutputType” = 1 is passed as input, above 3 and 4 Condition are not applicable.
73 74 75 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 73 def condition @condition end |
#exception_period ⇒ Integer
Period in which the Exceptions such as Monthly/Weekly or Daily volume, value or usage to be identified in the given transactions date range. It is only applied when the Output Type is specified as “Cards”. Mandatory when Output Type is Cards
-
Month
-
Week
-
Day
-
Date Range
98 99 100 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 98 def exception_period @exception_period 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.
114 115 116 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 114 def fuel_only @fuel_only end |
#output_type ⇒ Integer
Output Type for Exceptions. Mandatory. Possible values:
-
Transactions
-
Cards
106 107 108 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 106 def output_type @output_type end |
#payer_id ⇒ Integer
Payer Id of the selected payer. Optional if PayerNumber is passed else Mandatory
32 33 34 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 32 def payer_id @payer_id end |
#payer_number ⇒ String
Payer Number of the selected payer. Optional if PayerId is passed else Mandatory
37 38 39 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 37 def payer_number @payer_number end |
#products ⇒ Array[ExceptionProduct]
Filter condition for the Exceptions. Mandatory
-
VolumeGreaterThan
-
VolumeLessThan
-
UsageGreaterThan
-
UsageLessThan
-
ValueGreaterThan (in Customer Currency)
-
ValueLessThan (in Customer Currency)
Note: - When “OutputType” = 1 is passed as input, above 3 and 4 Condition are not applicable.
87 88 89 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 87 def products @products end |
#site_group_ids ⇒ Array[Integer]
SiteGroupIds to be applied to the Filter Condition. Optional When not passed, ignored. When passed, transactions that are matching with the provided list of site group id’s are only returned.
122 123 124 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 122 def site_group_ids @site_group_ids end |
#transactions_from_date ⇒ String
Exceptions to be searched in transactions from date. Should be with in last 24 months from the ToDate parameter. Mandatory Format: yyyyMMdd
49 50 51 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 49 def transactions_from_date @transactions_from_date end |
#transactions_to_date ⇒ String
Exceptions to be searched in transactions until date. Mandatory. Format: yyyyMMdd
55 56 57 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 55 def transactions_to_date @transactions_to_date end |
#use_field_id ⇒ TrueClass | FalseClass
True/False Optional Default value – False. When set to True, the property names in the output will be replaced by Field IDs.
130 131 132 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 130 def use_field_id @use_field_id end |
#value ⇒ Float
Value to be used on the Filter Condition
59 60 61 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 59 def value @value end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 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 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 199 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. transactions_from_date = hash.key?('TransactionsFromDate') ? hash['TransactionsFromDate'] : nil transactions_to_date = hash.key?('TransactionsToDate') ? hash['TransactionsToDate'] : nil condition = hash.key?('Condition') ? hash['Condition'] : nil output_type = hash.key?('OutputType') ? hash['OutputType'] : nil col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP # Parameter is an array, so we need to iterate through it accounts = nil unless hash['Accounts'].nil? accounts = [] hash['Accounts'].each do |structure| accounts << (Accounts.from_hash(structure) if structure) end end accounts = SKIP unless hash.key?('Accounts') value = hash.key?('Value') ? hash['Value'] : SKIP # Parameter is an array, so we need to iterate through it products = nil unless hash['Products'].nil? products = [] hash['Products'].each do |structure| products << (ExceptionProduct.from_hash(structure) if structure) end end products = SKIP unless hash.key?('Products') exception_period = hash.key?('ExceptionPeriod') ? hash['ExceptionPeriod'] : SKIP fuel_only = hash.key?('FuelOnly') ? hash['FuelOnly'] : SKIP site_group_ids = hash.key?('SiteGroupIds') ? hash['SiteGroupIds'] : SKIP use_field_id = hash.key?('UseFieldId') ? hash['UseFieldId'] : SKIP # Create object from extracted values. TransactionExceptionsRequest.new(transactions_from_date, transactions_to_date, condition, output_type, col_co_id, col_co_code, payer_id, payer_number, accounts, value, products, exception_period, fuel_only, site_group_ids, use_field_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 133 def self.names @_hash = {} if @_hash.nil? @_hash['col_co_id'] = 'ColCoId' @_hash['col_co_code'] = 'ColCoCode' @_hash['payer_id'] = 'PayerId' @_hash['payer_number'] = 'PayerNumber' @_hash['accounts'] = 'Accounts' @_hash['transactions_from_date'] = 'TransactionsFromDate' @_hash['transactions_to_date'] = 'TransactionsToDate' @_hash['value'] = 'Value' @_hash['condition'] = 'Condition' @_hash['products'] = 'Products' @_hash['exception_period'] = 'ExceptionPeriod' @_hash['output_type'] = 'OutputType' @_hash['fuel_only'] = 'FuelOnly' @_hash['site_group_ids'] = 'SiteGroupIds' @_hash['use_field_id'] = 'UseFieldId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
171 172 173 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 171 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/shell_data_reporting_ap_is/models/transaction_exceptions_request.rb', line 154 def self.optionals %w[ col_co_id col_co_code payer_id payer_number accounts value products exception_period fuel_only site_group_ids use_field_id ] end |