Class: ShellCardManagementApIs::AuditRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_card_management_ap_is/models/audit_request.rb

Overview

AuditRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(status = SKIP, payer_number = SKIP, payer_id = SKIP, account_number = SKIP, col_co_code = SKIP, col_co_id = SKIP, accounts = SKIP, page_size = SKIP, requested_operation = SKIP, sort_order = SKIP, search_text = SKIP, current_page = SKIP, from_date = SKIP, to_date = SKIP) ⇒ AuditRequest

Returns a new instance of AuditRequest.



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 200

def initialize(status = SKIP, payer_number = SKIP, payer_id = SKIP,
                = SKIP, col_co_code = SKIP, col_co_id = SKIP,
               accounts = SKIP, page_size = SKIP,
               requested_operation = SKIP, sort_order = SKIP,
               search_text = SKIP, current_page = SKIP, from_date = SKIP,
               to_date = SKIP)
  @status = status unless status == SKIP
  @payer_number = payer_number unless payer_number == SKIP
  @payer_id = payer_id unless payer_id == SKIP
  @account_number =  unless  == SKIP
  @col_co_code = col_co_code unless col_co_code == SKIP
  @col_co_id = col_co_id unless col_co_id == SKIP
  @accounts = accounts unless accounts == SKIP
  @page_size = page_size unless page_size == SKIP
  @requested_operation = requested_operation unless requested_operation == SKIP
  @sort_order = sort_order unless sort_order == SKIP
  @search_text = search_text unless search_text == SKIP
  @current_page = current_page unless current_page == SKIP
  @from_date = from_date unless from_date == SKIP
  @to_date = to_date unless to_date == SKIP
end

Instance Attribute Details

#account_numberString

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

Returns:

  • (String)


41
42
43
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 41

def 
  @account_number
end

#accountsAccounts

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

Returns:



66
67
68
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 66

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


50
51
52
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 50

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)


58
59
60
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 58

def col_co_id
  @col_co_id
end

#current_pageInteger

Page Number (as shown to the users) Optional Default value 1

Returns:

  • (Integer)


119
120
121
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 119

def current_page
  @current_page
end

#from_dateString

To search for requests submitted from this date. Optional Maximum of X days duration allowed per search. The X value is configurable and initially set to 180 days. Format: yyyyMMdd Example: 20200101 If FromDate is not provided and ToDate is provided, then FromDate will be considered as 30 days less than ToDate. However, when both FromDate and ToDate is not provided then last 30 days will be considered for filtering.

Returns:

  • (String)


131
132
133
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 131

def from_date
  @from_date
end

#page_sizeInteger

Page Size – Number of records to show on a page Optional Default value 50

Returns:

  • (Integer)


72
73
74
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 72

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)


35
36
37
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 35

def payer_id
  @payer_id
end

#payer_numberString

Payer Number of the selected payer. Optional if PayerId is passed else Mandatory

Returns:

  • (String)


29
30
31
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 29

def payer_number
  @payer_number
end

#requested_operationArray[String]

Type of requests to be fetched. Optional Allowed values: • OrderCard • CreateCardGroup • PINReminder • MoveCard • UpdateCardStatus • UpdateCardGroup • AutoRenew • BulkCardOrder • BulkCardBlock • BulkCardOrderMultiAccount • MobilePaymentRegistration • UpdateCompanyInfo • BCOSummary • BCOMultiAccountSummary • BCBSummary • FundTransfer • DeliveryAddressUpdate

Returns:

  • (Array[String])


95
96
97
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 95

def requested_operation
  @requested_operation
end

#search_textString

Search text used as criteria to filter the requests. Optional Minimum length is 4 characters (configurable). Else, an error (0007) will be returned. When valid text is provided, MS will return all the records that contains the Search Text within any of the look up fields

Returns:

  • (String)


113
114
115
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 113

def search_text
  @search_text
end

#sort_orderString

Allowed Sorting Options:

  1. SubmittedDateDescending

  2. SubmittedDateAscending

  3. AccountNumberAscending

  4. AccountNumberDescending

Optional: Default value is 1 Example value to be passed: 1,3

Returns:

  • (String)


105
106
107
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 105

def sort_order
  @sort_order
end

#statusString

Status of requests to be fetched. • Success • Failed • InProgress • Submitted • Rejected • PendingApproval • All • MailedToCSC Optional If not passed “All” will be considered as the default value.

Returns:

  • (String)


24
25
26
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 24

def status
  @status
end

#to_dateString

To search for requests submitted until this date. Optional Format: yyyyMMdd Example: 20200130 If ToDate is not provided and FromDate is provided, then ToDate will be considered as current date or 30 days from FromDate, whichever is earlier. However, when both FromDate and ToDate is not provided then last 30 days will be considered for filtering.

Returns:

  • (String)


142
143
144
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 142

def to_date
  @to_date
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 223

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  status = hash.key?('Status') ? hash['Status'] : SKIP
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
  payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
  col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
  col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
  accounts = Accounts.from_hash(hash['Accounts']) if hash['Accounts']
  page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
  requested_operation =
    hash.key?('RequestedOperation') ? hash['RequestedOperation'] : SKIP
  sort_order = hash.key?('SortOrder') ? hash['SortOrder'] : SKIP
  search_text = hash.key?('SearchText') ? hash['SearchText'] : SKIP
  current_page = hash.key?('CurrentPage') ? hash['CurrentPage'] : SKIP
  from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
  to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP

  # Create object from extracted values.
  AuditRequest.new(status,
                   payer_number,
                   payer_id,
                   ,
                   col_co_code,
                   col_co_id,
                   accounts,
                   page_size,
                   requested_operation,
                   sort_order,
                   search_text,
                   current_page,
                   from_date,
                   to_date)
end

.namesObject

A mapping from model property names to API property names.



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 145

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['status'] = 'Status'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash['payer_id'] = 'PayerId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['col_co_code'] = 'ColCoCode'
  @_hash['col_co_id'] = 'ColCoId'
  @_hash['accounts'] = 'Accounts'
  @_hash['page_size'] = 'PageSize'
  @_hash['requested_operation'] = 'RequestedOperation'
  @_hash['sort_order'] = 'SortOrder'
  @_hash['search_text'] = 'SearchText'
  @_hash['current_page'] = 'CurrentPage'
  @_hash['from_date'] = 'FromDate'
  @_hash['to_date'] = 'ToDate'
  @_hash
end

.nullablesObject

An array for nullable fields



185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 185

def self.nullables
  %w[
    payer_number
    payer_id
    account_number
    col_co_code
    col_co_id
    sort_order
    search_text
    current_page
    from_date
    to_date
  ]
end

.optionalsObject

An array for optional fields



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/shell_card_management_ap_is/models/audit_request.rb', line 165

def self.optionals
  %w[
    status
    payer_number
    payer_id
    account_number
    col_co_code
    col_co_id
    accounts
    page_size
    requested_operation
    sort_order
    search_text
    current_page
    from_date
    to_date
  ]
end