Class: ShellCardManagementApIs::UpdateCard

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

Overview

Request entity object for UpdateCardRequest list

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(caller = SKIP, is_replacement_chargeable = SKIP, notify_caller = SKIP, notify_caller_on_sync = SKIP, order_card_replacement = SKIP, card_settings = SKIP, account_id = SKIP, account_number = SKIP, card_expiry_date = SKIP, card_id = SKIP, col_co_code = SKIP, col_co_id = SKIP, pan = SKIP, panid = SKIP, payer_id = SKIP, payer_number = SKIP) ⇒ UpdateCard

Returns a new instance of UpdateCard.



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

def initialize(caller = SKIP, is_replacement_chargeable = SKIP,
               notify_caller = SKIP, notify_caller_on_sync = SKIP,
               order_card_replacement = SKIP, card_settings = SKIP,
                = SKIP,  = SKIP,
               card_expiry_date = SKIP, card_id = SKIP, col_co_code = SKIP,
               col_co_id = SKIP, pan = SKIP, panid = SKIP, payer_id = SKIP,
               payer_number = SKIP)
  @caller = caller unless caller == SKIP
  unless is_replacement_chargeable == SKIP
    @is_replacement_chargeable =
      is_replacement_chargeable
  end
  @notify_caller = notify_caller unless notify_caller == SKIP
  @notify_caller_on_sync = notify_caller_on_sync unless notify_caller_on_sync == SKIP
  @order_card_replacement = order_card_replacement unless order_card_replacement == SKIP
  @card_settings = card_settings unless card_settings == SKIP
  @account_id =  unless  == SKIP
  @account_number =  unless  == SKIP
  @card_expiry_date = card_expiry_date unless card_expiry_date == SKIP
  @card_id = card_id unless card_id == SKIP
  @col_co_code = col_co_code unless col_co_code == SKIP
  @col_co_id = col_co_id unless col_co_id == SKIP
  @pan = pan unless pan == SKIP
  @panid = panid unless panid == SKIP
  @payer_id = payer_id unless payer_id == SKIP
  @payer_number = payer_number unless payer_number == SKIP
end

Instance Attribute Details

#account_idInteger

Account Id of the customer.<br /> Optional if AccountNumber is passed, else Mandatory.

Returns:

  • (Integer)


87
88
89
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 87

def 
  @account_id
end

#account_numberString

Account Number of the customer.<br /> Optional if AccountId is passed, else Mandatory.

Returns:

  • (String)


92
93
94
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 92

def 
  @account_number
end

#callerString

The caller to be notified with the status of the update card status request. <br /> The caller will also be notified with the status of the replacement card order request, if any.<br /> Mandatory, if NotifyCaller is true. <br /> Maximum field length: 20<br /> Allowed values:<br />

  • NextGenUI: This value to be used by next gen UI application.<br />

  • Motix: This value to be used by MOTiX application.<br />

  • FleetHubUILifeTime: This value to be used by Fleet Hub UI application

for life time restriction cards.<br /> Note: The values passed in this field are case insensitive.

Returns:

  • (String)


25
26
27
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 25

def caller
  @caller
end

#card_expiry_dateString

Expiry date of the card.<br /> Mandatory if PAN is passed, else optional.<br /> Format: yyyyMMdd

Returns:

  • (String)


98
99
100
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 98

def card_expiry_date
  @card_expiry_date
end

#card_idInteger

Card Id of the card.<br /> Optional if PAN is passed, else Mandatory.

Returns:

  • (Integer)


103
104
105
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 103

def card_id
  @card_id
end

#card_settingsCardSettings

True/False.<br /> Pass True if a replacement order card request is to be placed, else False.<br /> Optional.Default value False.<br /> Replacement of a card is only applicable when the target status requested is either permanently Block or Damaged for the existing card.<br /> Request for Replacement card will be placed only when the Block card or Block damaged card request is successfully placed.<br /> The Replacement card request will be processed only when the permanent Block card request is successfully processed. <br /> In case of damaged card request, the replacement card request will be processed immediately.

Returns:



82
83
84
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 82

def card_settings
  @card_settings
end

#col_co_codeInteger

Collecting company code of the customer. <br /> Optional if ColCoId is passed, else Mandatory.<br />

Returns:

  • (Integer)


108
109
110
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 108

def col_co_code
  @col_co_code
end

#col_co_idInteger

Collecting company id of the customer. <br /> Optional if ColCoCode is passed, else Mandatory.<br />

Returns:

  • (Integer)


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

def col_co_id
  @col_co_id
end

#is_replacement_chargeableTrueClass | FalseClass

True/False<br /> Optional<br /> When not provided will considered as default value as True.<br /> If passed True, the replacement card will be chargeable, else replacement card will not be charged.

Returns:

  • (TrueClass | FalseClass)


33
34
35
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 33

def is_replacement_chargeable
  @is_replacement_chargeable
end

#notify_callerTrueClass | FalseClass

True/False.<br /> Optional.<br /> Default: False<br /> If true, the caller would be notified back with the status as success or failure after the update card status request is processed. Notification API subscription required to use this feature , please refer API documetation for more details

Returns:

  • (TrueClass | FalseClass)


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

def notify_caller
  @notify_caller
end

#notify_caller_on_syncTrueClass | FalseClass

True/False.<br /> Optional.<br /> Default: False<br /> If true, the caller would be notified back with the status as success or failed after the replacement card is synced with Gateway, if a replacement card was requested.

Returns:

  • (TrueClass | FalseClass)


52
53
54
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 52

def notify_caller_on_sync
  @notify_caller_on_sync
end

#order_card_replacementTrueClass | FalseClass

True/False.<br /> Pass True if a replacement order card request is to be placed, else False.<br /> Optional.Default value False.<br /> Replacement of a card is only applicable when the target status requested is either permanently Block or Damaged for the existing card.<br /> Request for Replacement card will be placed only when the Block card or Block damaged card request is successfully placed.<br /> The Replacement card request will be processed only when the permanent Block card request is successfully processed. <br /> In case of damaged card request, the replacement card request will be processed immediately.

Returns:

  • (TrueClass | FalseClass)


67
68
69
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 67

def order_card_replacement
  @order_card_replacement
end

#panString

PAN of the card.<br /> Optional if CardId is passed, else Mandatory.<br />

Returns:

  • (String)


118
119
120
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 118

def pan
  @pan
end

#panidFloat

PANID of the card

Returns:

  • (Float)


122
123
124
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 122

def panid
  @panid
end

#payer_idInteger

Payer id of the customer.<br /> Optional if PayerNumber is passed, else Mandatory.

Returns:

  • (Integer)


127
128
129
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 127

def payer_id
  @payer_id
end

#payer_numberString

PayerNumber of the customer.<br /> Optional if PayerId is passed, else Mandatory.

Returns:

  • (String)


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

def payer_number
  @payer_number
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
259
260
261
262
263
264
265
266
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 224

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  caller = hash.key?('Caller') ? hash['Caller'] : SKIP
  is_replacement_chargeable =
    hash.key?('IsReplacementChargeable') ? hash['IsReplacementChargeable'] : SKIP
  notify_caller = hash.key?('NotifyCaller') ? hash['NotifyCaller'] : SKIP
  notify_caller_on_sync =
    hash.key?('NotifyCallerOnSync') ? hash['NotifyCallerOnSync'] : SKIP
  order_card_replacement =
    hash.key?('OrderCardReplacement') ? hash['OrderCardReplacement'] : SKIP
  card_settings = CardSettings.from_hash(hash['CardSettings']) if hash['CardSettings']
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
  card_expiry_date =
    hash.key?('CardExpiryDate') ? hash['CardExpiryDate'] : SKIP
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
  col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
  col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
  pan = hash.key?('PAN') ? hash['PAN'] : SKIP
  panid = hash.key?('PANID') ? hash['PANID'] : SKIP
  payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP

  # Create object from extracted values.
  UpdateCard.new(caller,
                 is_replacement_chargeable,
                 notify_caller,
                 notify_caller_on_sync,
                 order_card_replacement,
                 card_settings,
                 ,
                 ,
                 card_expiry_date,
                 card_id,
                 col_co_code,
                 col_co_id,
                 pan,
                 panid,
                 payer_id,
                 payer_number)
end

.namesObject

A mapping from model property names to API property names.



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 135

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['caller'] = 'Caller'
  @_hash['is_replacement_chargeable'] = 'IsReplacementChargeable'
  @_hash['notify_caller'] = 'NotifyCaller'
  @_hash['notify_caller_on_sync'] = 'NotifyCallerOnSync'
  @_hash['order_card_replacement'] = 'OrderCardReplacement'
  @_hash['card_settings'] = 'CardSettings'
  @_hash['account_id'] = 'AccountId'
  @_hash['account_number'] = 'AccountNumber'
  @_hash['card_expiry_date'] = 'CardExpiryDate'
  @_hash['card_id'] = 'CardId'
  @_hash['col_co_code'] = 'ColCoCode'
  @_hash['col_co_id'] = 'ColCoId'
  @_hash['pan'] = 'PAN'
  @_hash['panid'] = 'PANID'
  @_hash['payer_id'] = 'PayerId'
  @_hash['payer_number'] = 'PayerNumber'
  @_hash
end

.nullablesObject

An array for nullable fields



179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 179

def self.nullables
  %w[
    caller
    account_id
    account_number
    card_expiry_date
    card_id
    col_co_code
    col_co_id
    pan
    panid
    payer_id
    payer_number
  ]
end

.optionalsObject

An array for optional fields



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 157

def self.optionals
  %w[
    caller
    is_replacement_chargeable
    notify_caller
    notify_caller_on_sync
    order_card_replacement
    card_settings
    account_id
    account_number
    card_expiry_date
    card_id
    col_co_code
    col_co_id
    pan
    panid
    payer_id
    payer_number
  ]
end