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

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #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.



105
106
107
108
109
110
111
112
113
114
115
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 105

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
4.    None
Note: - Paper delivery not applicable for selfselctedPIN type and

FleetPIN enabled Accounts

Returns:

  • (Integer)


49
50
51
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 49

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 “1,2,3” is only allowed for Paper delivery

Returns:

  • (Integer)


60
61
62
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 60

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 “1,2,3” is only allowed for Paper delivery

Returns:



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

def pin_deliver_to
  @pin_deliver_to
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

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.



74
75
76
77
78
79
80
81
82
83
84
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 74

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



99
100
101
102
103
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 99

def self.nullables
  %w[
    card_expiry_date
  ]
end

.optionalsObject

An array for optional fields



87
88
89
90
91
92
93
94
95
96
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 87

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

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



151
152
153
154
155
156
157
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 151

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} card_id: #{@card_id.inspect}, panid: #{@panid.inspect}, pan:"\
  " #{@pan.inspect}, card_expiry_date: #{@card_expiry_date.inspect}, pin_advice_type:"\
  " #{@pin_advice_type.inspect}, pin_contact_type: #{@pin_contact_type.inspect},"\
  " pin_deliver_to: #{@pin_deliver_to.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



143
144
145
146
147
148
# File 'lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb', line 143

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} card_id: #{@card_id}, panid: #{@panid}, pan: #{@pan}, card_expiry_date:"\
  " #{@card_expiry_date}, pin_advice_type: #{@pin_advice_type}, pin_contact_type:"\
  " #{@pin_contact_type}, pin_deliver_to: #{@pin_deliver_to}>"
end