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

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #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) ⇒ TransactionFeesRequest

Returns a new instance of TransactionFeesRequest.



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
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 232

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)
  @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
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

#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

#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.



261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
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
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 261

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

  # 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)
end

.namesObject

A mapping from model property names to API property names.



162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 162

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
end

.nullablesObject

An array for nullable fields



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 210

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
  ]
end

.optionalsObject

An array for optional fields



186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 186

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
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



329
330
331
332
333
334
335
336
337
338
339
340
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 329

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} col_co_id: #{@col_co_id.inspect}, col_co_code: #{@col_co_code.inspect},"\
  " payer_id: #{@payer_id.inspect}, payer_number: #{@payer_number.inspect}, accounts:"\
  " #{@accounts.inspect}, card_id: #{@card_id.inspect}, card_pan: #{@card_pan.inspect},"\
  " invoice_status: #{@invoice_status.inspect}, fee_type_group: #{@fee_type_group.inspect},"\
  " fee_type_id: #{@fee_type_id.inspect}, from_date: #{@from_date.inspect}, to_date:"\
  " #{@to_date.inspect}, period: #{@period.inspect}, include_cancelled_items:"\
  " #{@include_cancelled_items.inspect}, product_id: #{@product_id.inspect}, product_code:"\
  " #{@product_code.inspect}, line_item_description: #{@line_item_description.inspect},"\
  " sort_order: #{@sort_order.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



317
318
319
320
321
322
323
324
325
326
# File 'lib/shell_data_reporting_ap_is/models/transaction_fees_request.rb', line 317

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} col_co_id: #{@col_co_id}, col_co_code: #{@col_co_code}, payer_id:"\
  " #{@payer_id}, payer_number: #{@payer_number}, accounts: #{@accounts}, card_id:"\
  " #{@card_id}, card_pan: #{@card_pan}, invoice_status: #{@invoice_status}, fee_type_group:"\
  " #{@fee_type_group}, fee_type_id: #{@fee_type_id}, from_date: #{@from_date}, to_date:"\
  " #{@to_date}, period: #{@period}, include_cancelled_items: #{@include_cancelled_items},"\
  " product_id: #{@product_id}, product_code: #{@product_code}, line_item_description:"\
  " #{@line_item_description}, sort_order: #{@sort_order}>"
end