Class: ShellCardManagementApIs::PINReminderCardDetails

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

Overview

Request entity object for PINReminderCardDetails

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(pin_advice_type = nil, card_id = SKIP, panid = SKIP, pan = SKIP, card_expiry_date = SKIP, pin_contact_type = SKIP, pin_deliver_to = SKIP) ⇒ PINReminderCardDetails

Returns a new instance of PINReminderCardDetails.



102
103
104
105
106
107
108
109
110
111
112
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 102

def initialize(pin_advice_type = nil, card_id = SKIP, panid = SKIP,
               pan = SKIP, card_expiry_date = SKIP, pin_contact_type = SKIP,
               pin_deliver_to = SKIP)
  @card_id = card_id unless card_id == SKIP
  @panid = panid unless panid == SKIP
  @pan = pan unless pan == SKIP
  @card_expiry_date = card_expiry_date unless card_expiry_date == SKIP
  @pin_advice_type = pin_advice_type
  @pin_contact_type = pin_contact_type unless pin_contact_type == SKIP
  @pin_deliver_to = pin_deliver_to unless pin_deliver_to == SKIP
end

Instance Attribute Details

#card_expiry_dateString

Expiry date of the card. Mandatory if Either PAN or PANID is passed, else optional. Format: yyyyMMdd

Returns:

  • (String)


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

def card_expiry_date
  @card_expiry_date
end

#card_idInteger

Card Id Optional if Either PANID AND CardExpiryDate or PAN AND CardExpiryDate is passed, else Mandatory. Example: 275549 .<br/>Note:PANID, PAN & ExpiryDate parameters will be ignored if CardId is provided.

Returns:

  • (Integer)


17
18
19
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 17

def card_id
  @card_id
end

#panString

PAN of the card. Optional if Either CardId or PANID is passed, else Mandatory. <br/>Note:PAN & ExpiryDate parameters will be considered only if CardId & PANID are not provided

Returns:

  • (String)


31
32
33
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 31

def pan
  @pan
end

#panidInteger

PAN ID - Unique PAN ID Optional if Either CardId or PAN AND ExpiryDate is passed, else Mandatory. Example: 123456. <br/>Note:PANID parameter will be considered only if CardId is not provided

Returns:

  • (Integer)


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

def panid
  @panid
end

#pin_advice_typeInteger

PIN delivery method. Mandatory Allowed Values:

1.    Paper
2.    Email
3.    SMS

Returns:

  • (Integer)


46
47
48
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 46

def pin_advice_type
  @pin_advice_type
end

#pin_contact_typeInteger

PIN Contact Type. Mandatory Allowed Values:

  1. Use PIN Delivery contact details stored previously for this card

  2. Use Card Delivery contact details stored previously for this card

  3. Use default PIN Delivery contact details stored for this customer

  4. Use new specific contact for PIN Reminder only

Note: - PINContactType “3” is only allowed for Paper delivery

Returns:

  • (Integer)


57
58
59
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 57

def pin_contact_type
  @pin_contact_type
end

#pin_deliver_toPINDeliverTo

PIN Contact Type. Mandatory Allowed Values:

  1. Use PIN Delivery contact details stored previously for this card

  2. Use Card Delivery contact details stored previously for this card

  3. Use default PIN Delivery contact details stored for this customer

  4. Use new specific contact for PIN Reminder only

Note: - PINContactType “3” is only allowed for Paper delivery

Returns:



68
69
70
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 68

def pin_deliver_to
  @pin_deliver_to
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 115

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  pin_advice_type = hash.key?('PINAdviceType') ? hash['PINAdviceType'] : nil
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
  panid = hash.key?('PANID') ? hash['PANID'] : SKIP
  pan = hash.key?('PAN') ? hash['PAN'] : SKIP
  card_expiry_date =
    hash.key?('CardExpiryDate') ? hash['CardExpiryDate'] : SKIP
  pin_contact_type =
    hash.key?('PINContactType') ? hash['PINContactType'] : SKIP
  pin_deliver_to = PINDeliverTo.from_hash(hash['PINDeliverTo']) if hash['PINDeliverTo']

  # Create object from extracted values.
  PINReminderCardDetails.new(pin_advice_type,
                             card_id,
                             panid,
                             pan,
                             card_expiry_date,
                             pin_contact_type,
                             pin_deliver_to)
end

.namesObject

A mapping from model property names to API property names.



71
72
73
74
75
76
77
78
79
80
81
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 71

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['card_id'] = 'CardId'
  @_hash['panid'] = 'PANID'
  @_hash['pan'] = 'PAN'
  @_hash['card_expiry_date'] = 'CardExpiryDate'
  @_hash['pin_advice_type'] = 'PINAdviceType'
  @_hash['pin_contact_type'] = 'PINContactType'
  @_hash['pin_deliver_to'] = 'PINDeliverTo'
  @_hash
end

.nullablesObject

An array for nullable fields



96
97
98
99
100
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 96

def self.nullables
  %w[
    card_expiry_date
  ]
end

.optionalsObject

An array for optional fields



84
85
86
87
88
89
90
91
92
93
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 84

def self.optionals
  %w[
    card_id
    panid
    pan
    card_expiry_date
    pin_contact_type
    pin_deliver_to
  ]
end