Class: ShellCardManagementApIs::ScheduleCardBlockCardsItems

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

Overview

ScheduleCardBlockCardsItems Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(action = nil, col_co_code = SKIP, col_co_id = SKIP, account_id = SKIP, account_number = SKIP, payer_id = SKIP, payer_number = SKIP, card_id = SKIP, pan = SKIP, panid = SKIP, card_expiry_date = SKIP, from_date = SKIP, to_date = SKIP, caller = SKIP, notify_caller = SKIP) ⇒ ScheduleCardBlockCardsItems

Returns a new instance of ScheduleCardBlockCardsItems.



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 190

def initialize(action = nil, col_co_code = SKIP, col_co_id = SKIP,
                = SKIP,  = SKIP, payer_id = SKIP,
               payer_number = SKIP, card_id = SKIP, pan = SKIP,
               panid = SKIP, card_expiry_date = SKIP, from_date = SKIP,
               to_date = SKIP, caller = SKIP, notify_caller = SKIP)
  @col_co_code = col_co_code unless col_co_code == SKIP
  @col_co_id = col_co_id unless col_co_id == SKIP
  @account_id =  unless  == SKIP
  @account_number =  unless  == SKIP
  @payer_id = payer_id unless payer_id == SKIP
  @payer_number = payer_number unless payer_number == SKIP
  @card_id = card_id unless card_id == SKIP
  @pan = pan unless pan == SKIP
  @panid = panid unless panid == SKIP
  @card_expiry_date = card_expiry_date unless card_expiry_date == SKIP
  @action = action
  @from_date = from_date unless from_date == SKIP
  @to_date = to_date unless to_date == SKIP
  @caller = caller unless caller == SKIP
  @notify_caller = notify_caller unless notify_caller == SKIP
end

Instance Attribute Details

#account_idInteger

Account Id of the customer. Optional if AccountNumber is passed, else Mandatory.

Returns:

  • (Integer)


32
33
34
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 32

def 
  @account_id
end

#account_numberString

Account Number of the customer. Optional if AccountId is passed, else Mandatory.

Returns:

  • (String)


37
38
39
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 37

def 
  @account_number
end

#actionString

Action Mandatory Possible values are: • AddOrUpdate – adds a new request or updates any existing requests, with overlapping dates, for the card • AddAndOverwriteAll - all the existing requests of the given card will be removed and a new request with the specified FromDate and ToDate will be added. • Delete – deletes any existing request with the same start date and end date for the card • DeleteAll – deletes all saved future dated requests (all block and unblock requests) of the card.

Returns:

  • (String)


86
87
88
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 86

def action
  @action
end

#callerString

The caller to be notified with the status of the scheduled card block / unblock request. Mandatory, if NotifyCaller is true. Maximum field length: 20

Returns:

  • (String)


132
133
134
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 132

def caller
  @caller
end

#card_expiry_dateString

Expiry date of the card. Optional if CardId is passed, else Mandatory. Format: yyyyMMdd Example: 20170930

Returns:

  • (String)


71
72
73
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 71

def card_expiry_date
  @card_expiry_date
end

#card_idInteger

Unique Id of the card. Optional if PAN is passed, else Mandatory.

Returns:

  • (Integer)


53
54
55
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 53

def card_id
  @card_id
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-Philippines 5-UK

Returns:

  • (Integer)


19
20
21
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 19

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-Philippines 5-UK

Returns:

  • (Integer)


27
28
29
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 27

def col_co_id
  @col_co_id
end

#from_dateString

Effective start date of Block / Unblock Allowed Formats: – • yyyyMMdd • yyyyMMdd HH:mm Eg: 20230512 14:30, 20230512 Optional Default value: • If the card status is “Active” then Current date & Time • If the card status is “TemporaryBlock (Customer)” then null. Note: • Time is considered only when “IsTimeSupported” is true else it will be treated as a date. • Time will be passed in UTC time-zone. • If the Card Status is “Temporary Block (Customer)” and FromDate is provided – The fromdate & time is considered as starting period of unblock request.

Returns:

  • (String)


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

def from_date
  @from_date
end

#notify_callerTrueClass | FalseClass

True/False. Optional. Default: False If true, the caller would be notified back with the status as success or failure after the scheduled card block / unblock request is processed.

Returns:

  • (TrueClass | FalseClass)


140
141
142
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 140

def notify_caller
  @notify_caller
end

#panString

PAN of the card. Optional if CardId is passed, else Mandatory.

Returns:

  • (String)


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

def pan
  @pan
end

#panidString

Card PAN ID. Optional if CardId is given, else mandatory. Note: PANID is ignored if CardId is given.

Returns:

  • (String)


64
65
66
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 64

def panid
  @panid
end

#payer_idInteger

Payer id of the customer. Optional if PayerNumber is passed, else Mandatory. Example: 123456

Returns:

  • (Integer)


43
44
45
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 43

def payer_id
  @payer_id
end

#payer_numberString

PayerNumber of the customer. Optional if PayerId is passed, else Mandatory.

Returns:

  • (String)


48
49
50
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 48

def payer_number
  @payer_number
end

#to_dateString

Effective end date of Block / Unblock Allowed Formats: – • yyyyMMdd • yyyyMMdd HH:mm Eg: 20230512 14:30, 20230512 Optional – When the Card status is Active else mandatory. When not provided, the card will remain blocked until manually unblocked. Note: • Time is considered only when the “IsTimeSupported” flag is set as true, else it will be considered as only date. • Date & Time passed in the request will be considered in UTC time-zone. • If the card is currently in ‘Temporary Block (Customer)’ status, then this date is treated as the unblock date and is mandatory. • If the Card Status is “Temporary Block (Customer)” and FromDate & ToDate is provided - The request will be considered as a scheduled specific period unblock request.

Returns:

  • (String)


125
126
127
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 125

def to_date
  @to_date
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  action = hash.key?('Action') ? hash['Action'] : nil
  col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
  col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
  payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
  pan = hash.key?('PAN') ? hash['PAN'] : SKIP
  panid = hash.key?('PANID') ? hash['PANID'] : SKIP
  card_expiry_date =
    hash.key?('CardExpiryDate') ? hash['CardExpiryDate'] : SKIP
  from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
  to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP
  caller = hash.key?('Caller') ? hash['Caller'] : SKIP
  notify_caller = hash.key?('NotifyCaller') ? hash['NotifyCaller'] : SKIP

  # Create object from extracted values.
  ScheduleCardBlockCardsItems.new(action,
                                  col_co_code,
                                  col_co_id,
                                  ,
                                  ,
                                  payer_id,
                                  payer_number,
                                  card_id,
                                  pan,
                                  panid,
                                  card_expiry_date,
                                  from_date,
                                  to_date,
                                  caller,
                                  notify_caller)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['col_co_code'] = 'ColCoCode'
  @_hash['col_co_id'] = 'ColCoId'
  @_hash['account_id'] = 'AccountId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['payer_id'] = 'PayerId'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash['card_id'] = 'CardId'
  @_hash['pan'] = 'PAN'
  @_hash['panid'] = 'PANID'
  @_hash['card_expiry_date'] = 'CardExpiryDate'
  @_hash['action'] = 'Action'
  @_hash['from_date'] = 'FromDate'
  @_hash['to_date'] = 'ToDate'
  @_hash['caller'] = 'Caller'
  @_hash['notify_caller'] = 'NotifyCaller'
  @_hash
end

.nullablesObject

An array for nullable fields



184
185
186
187
188
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 184

def self.nullables
  %w[
    caller
  ]
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    col_co_code
    col_co_id
    account_id
    account_number
    payer_id
    payer_number
    card_id
    pan
    panid
    card_expiry_date
    from_date
    to_date
    caller
    notify_caller
  ]
end