Class: ShellDataReportingApIs::TransactionFeesRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb

Overview

TransactionFeesRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, accounts = SKIP, card_id = SKIP, card_pan = SKIP, invoice_status = SKIP, fee_type_group = SKIP, fee_type_id = SKIP, from_date = SKIP, to_date = SKIP, period = SKIP, include_cancelled_items = SKIP, product_id = SKIP, product_code = SKIP, line_item_description = SKIP, sort_order = SKIP, current_page = SKIP, page_size = SKIP) ⇒ TransactionFeesRequest

Returns a new instance of TransactionFeesRequest.



246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 246

def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
               payer_number = SKIP, accounts = SKIP, card_id = SKIP,
               card_pan = SKIP, invoice_status = SKIP,
               fee_type_group = SKIP, fee_type_id = SKIP, from_date = SKIP,
               to_date = SKIP, period = SKIP,
               include_cancelled_items = SKIP, product_id = SKIP,
               product_code = SKIP, line_item_description = 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 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
  @card_id = card_id unless card_id == SKIP
  @card_pan = card_pan unless card_pan == SKIP
  @invoice_status = invoice_status unless invoice_status == SKIP
  @fee_type_group = fee_type_group unless fee_type_group == SKIP
  @fee_type_id = fee_type_id unless fee_type_id == SKIP
  @from_date = from_date unless from_date == SKIP
  @to_date = to_date unless to_date == SKIP
  @period = period unless period == SKIP
  @include_cancelled_items = include_cancelled_items unless include_cancelled_items == SKIP
  @product_id = product_id unless product_id == SKIP
  @product_code = product_code unless product_code == SKIP
  @line_item_description = line_item_description unless line_item_description == 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

#accountsArray[Accounts]

Payer Number (Ex: GB000000123) of the selected payer. Optional if PayerId is passed else Mandatory

Returns:



43
44
45
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 43

def accounts
  @accounts
end

#card_idInteger

Card Id Optional When both Card Id and Card PAN are not present on request, the response will have all the fee items under the selected payer or account. Example: 275549

Returns:

  • (Integer)


51
52
53
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 51

def card_id
  @card_id
end

#card_panString

Full Card PAN Optional When both Card Id and Card PAN are not present on request, the response will have all the fee items under the selected payer or account or card group.

Returns:

  • (String)


59
60
61
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 59

def card_pan
  @card_pan
end

#col_co_codeInteger

Collecting Company Code (Shell 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

Returns:

  • (Integer)


27
28
29
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 27

def col_co_code
  @col_co_code
end

#col_co_idInteger

Collecting Company Id of the selected payer. Optional if ColCoCode is passed else Mandatory. Example: 1 for Philippines 5 for UK

Returns:

  • (Integer)


18
19
20
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 18

def col_co_id
  @col_co_id
end

#current_pageInteger

Page Number

Returns:

  • (Integer)


163
164
165
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 163

def current_page
  @current_page
end

#fee_type_groupString

Fee type group in under which the Fee item is generated. Optional. Allowed values:

  • Account Charges

  • Card Charges

  • Others Charges

Returns:

  • (String)


77
78
79
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 77

def fee_type_group
  @fee_type_group
end

#fee_type_idInteger

Fee Type Id. Optional. Example:

  1. Simple Fee

  2. Card Event Fee

  3. Customer Event Fee

Returns:

  • (Integer)


86
87
88
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 86

def fee_type_id
  @fee_type_id
end

#from_dateString

Fee Item FromDate/Time Should be with in last 24 months Optional Maximum of 210 days duration allowed per search, its configurable. Format: yyyyMMdd

Returns:

  • (String)


94
95
96
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 94

def from_date
  @from_date
end

#include_cancelled_itemsTrueClass | FalseClass

True or False. When True, cancelled fee items are included on API response

Returns:

  • (TrueClass | FalseClass)


119
120
121
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 119

def include_cancelled_items
  @include_cancelled_items
end

#invoice_statusString

Invoice status of the fee items Mandatory Possible options: I - Invoiced U – Un-Invoiced A – All

Returns:

  • (String)


68
69
70
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 68

def invoice_status
  @invoice_status
end

#line_item_descriptionString

Line item description. Optional Minimum of 4 characters should be provided else not considered Those fee items that have the entered value at any part of the line item description will be returned.

Returns:

  • (String)


149
150
151
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 149

def line_item_description
  @line_item_description
end

#page_sizeInteger

Page Size – Number of records to show on a page

Returns:

  • (Integer)


167
168
169
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 167

def page_size
  @page_size
end

#payer_idInteger

Payer Id of the selected payer. Optional if PayerNumber is passed else Mandatory Example: 123456

Returns:

  • (Integer)


33
34
35
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 33

def payer_id
  @payer_id
end

#payer_numberString

Payer Number (Ex: GB000000123) of the selected payer. Optional if PayerId is passed else Mandatory

Returns:

  • (String)


38
39
40
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 38

def payer_number
  @payer_number
end

#periodInteger

Fee items Period. This is ignored when FromDate/Todate is supplied on the request.

  1. Last 7 Days

  2. Last 30 Days

  3. Last 90 Days

  4. Last 180 Days

Example : Pass 1 for Last 7 days fee items

Returns:

  • (Integer)


115
116
117
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 115

def period
  @period
end

#product_codeString

Product Code Optional Example:

  1. Service fee

  2. Invoice production fee

  3. Account fee

  4. Transaction fee

  5. Card membership fee

Returns:

  • (String)


141
142
143
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 141

def product_code
  @product_code
end

#product_idInteger

Product Id Optional Example: Sample list of product ids and description. 100 Service fee 102 Invoice production fee 103 Account fee 104 Transaction fee 105 Card membership fee

Returns:

  • (Integer)


130
131
132
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 130

def product_id
  @product_id
end

#sort_orderString

Allowed Sorting Options: • FeeDateAscending • FeeDateDescending • NetAmountAscending • NetAmountDescending Optional. Default: 1

Returns:

  • (String)


159
160
161
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 159

def sort_order
  @sort_order
end

#to_dateString

Fee Item To Date/Time Optional When blank and FromDate is provided on the input, all fee items took place after the given from date/time should be returned. Note that the search is allowed for the maximum of 60 days. Hence if the FromDate is older than 60 days from current date then the fee items for 60 days from FromDate will be returned. Format: yyyyMMdd

Returns:

  • (String)


105
106
107
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 105

def to_date
  @to_date
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



277
278
279
280
281
282
283
284
285
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
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 277

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  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')
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
  card_pan = hash.key?('CardPAN') ? hash['CardPAN'] : SKIP
  invoice_status = hash.key?('InvoiceStatus') ? hash['InvoiceStatus'] : SKIP
  fee_type_group = hash.key?('FeeTypeGroup') ? hash['FeeTypeGroup'] : SKIP
  fee_type_id = hash.key?('FeeTypeId') ? hash['FeeTypeId'] : SKIP
  from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
  to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
  period = hash.key?('Period') ? hash['Period'] : SKIP
  include_cancelled_items =
    hash.key?('IncludeCancelledItems') ? hash['IncludeCancelledItems'] : SKIP
  product_id = hash.key?('ProductId') ? hash['ProductId'] : SKIP
  product_code = hash.key?('ProductCode') ? hash['ProductCode'] : SKIP
  line_item_description =
    hash.key?('LineItemDescription') ? hash['LineItemDescription'] : 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.
  TransactionFeesRequest.new(col_co_id,
                             col_co_code,
                             payer_id,
                             payer_number,
                             accounts,
                             card_id,
                             card_pan,
                             invoice_status,
                             fee_type_group,
                             fee_type_id,
                             from_date,
                             to_date,
                             period,
                             include_cancelled_items,
                             product_id,
                             product_code,
                             line_item_description,
                             sort_order,
                             current_page,
                             page_size)
end

.namesObject

A mapping from model property names to API property names.



170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 170

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['card_id'] = 'CardId'
  @_hash['card_pan'] = 'CardPAN'
  @_hash['invoice_status'] = 'InvoiceStatus'
  @_hash['fee_type_group'] = 'FeeTypeGroup'
  @_hash['fee_type_id'] = 'FeeTypeId'
  @_hash['from_date'] = 'FromDate'
  @_hash['to_date'] = 'ToDate'
  @_hash['period'] = 'Period'
  @_hash['include_cancelled_items'] = 'IncludeCancelledItems'
  @_hash['product_id'] = 'ProductId'
  @_hash['product_code'] = 'ProductCode'
  @_hash['line_item_description'] = 'LineItemDescription'
  @_hash['sort_order'] = 'SortOrder'
  @_hash['current_page'] = 'CurrentPage'
  @_hash['page_size'] = 'PageSize'
  @_hash
end

.nullablesObject

An array for nullable fields



222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 222

def self.nullables
  %w[
    col_co_id
    col_co_code
    payer_id
    payer_number
    card_id
    card_pan
    invoice_status
    fee_type_group
    fee_type_id
    from_date
    to_date
    period
    include_cancelled_items
    product_id
    product_code
    line_item_description
    sort_order
    current_page
    page_size
  ]
end

.optionalsObject

An array for optional fields



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 196

def self.optionals
  %w[
    col_co_id
    col_co_code
    payer_id
    payer_number
    accounts
    card_id
    card_pan
    invoice_status
    fee_type_group
    fee_type_id
    from_date
    to_date
    period
    include_cancelled_items
    product_id
    product_code
    line_item_description
    sort_order
    current_page
    page_size
  ]
end