Class: ShellCardManagementApIs::PINReminderReference

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

Overview

This class holds the PIN Reminder References

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(card_id = SKIP, panid = SKIP, pan = SKIP, card_expiry_date = SKIP, reference_id = SKIP) ⇒ PINReminderReference

Returns a new instance of PINReminderReference.



67
68
69
70
71
72
73
74
# File 'lib/shell_card_management_ap_is/models/pin_reminder_reference.rb', line 67

def initialize(card_id = SKIP, panid = SKIP, pan = SKIP,
               card_expiry_date = SKIP, reference_id = 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
  @reference_id = reference_id unless reference_id == 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)


28
29
30
# File 'lib/shell_card_management_ap_is/models/pin_reminder_reference.rb', line 28

def card_expiry_date
  @card_expiry_date
end

#card_idInteger

Card Id

Returns:

  • (Integer)


14
15
16
# File 'lib/shell_card_management_ap_is/models/pin_reminder_reference.rb', line 14

def card_id
  @card_id
end

#panInteger

PAN

Returns:

  • (Integer)


22
23
24
# File 'lib/shell_card_management_ap_is/models/pin_reminder_reference.rb', line 22

def pan
  @pan
end

#panidInteger

PAN ID

Returns:

  • (Integer)


18
19
20
# File 'lib/shell_card_management_ap_is/models/pin_reminder_reference.rb', line 18

def panid
  @panid
end

#reference_idInteger

Individual card pin reminder reference number for the Pin Reminder request.

Returns:

  • (Integer)


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

def reference_id
  @reference_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/shell_card_management_ap_is/models/pin_reminder_reference.rb', line 77

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  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
  reference_id = hash.key?('ReferenceId') ? hash['ReferenceId'] : SKIP

  # Create object from extracted values.
  PINReminderReference.new(card_id,
                           panid,
                           pan,
                           card_expiry_date,
                           reference_id)
end

.namesObject

A mapping from model property names to API property names.



36
37
38
39
40
41
42
43
44
# File 'lib/shell_card_management_ap_is/models/pin_reminder_reference.rb', line 36

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['card_id'] = 'CardId'
  @_hash['panid'] = 'PANID'
  @_hash['pan'] = 'PAN'
  @_hash['card_expiry_date'] = 'CardExpiryDate'
  @_hash['reference_id'] = 'ReferenceId'
  @_hash
end

.nullablesObject

An array for nullable fields



58
59
60
61
62
63
64
65
# File 'lib/shell_card_management_ap_is/models/pin_reminder_reference.rb', line 58

def self.nullables
  %w[
    card_id
    panid
    pan
    card_expiry_date
  ]
end

.optionalsObject

An array for optional fields



47
48
49
50
51
52
53
54
55
# File 'lib/shell_card_management_ap_is/models/pin_reminder_reference.rb', line 47

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