Class: ShellCardManagementApIs::PINAdviceTypes

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

Overview

PINAdviceTypes Model.

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_id = SKIP, is_card_order_option = SKIP, is_pin_reminder_option = SKIP) ⇒ PINAdviceTypes

Returns a new instance of PINAdviceTypes.



54
55
56
57
58
59
# File 'lib/shell_card_management_ap_is/models/pin_advice_types.rb', line 54

def initialize(pin_advice_type_id = SKIP, is_card_order_option = SKIP,
               is_pin_reminder_option = SKIP)
  @pin_advice_type_id = pin_advice_type_id unless pin_advice_type_id == SKIP
  @is_card_order_option = is_card_order_option unless is_card_order_option == SKIP
  @is_pin_reminder_option = is_pin_reminder_option unless is_pin_reminder_option == SKIP
end

Instance Attribute Details

#is_card_order_optionTrueClass | FalseClass

Whether the PIN advice type is available for card ordering

Returns:

  • (TrueClass | FalseClass)


23
24
25
# File 'lib/shell_card_management_ap_is/models/pin_advice_types.rb', line 23

def is_card_order_option
  @is_card_order_option
end

#is_pin_reminder_optionTrueClass | FalseClass

Whether the PIN advice type is available for PIN Reminder

Returns:

  • (TrueClass | FalseClass)


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

def is_pin_reminder_option
  @is_pin_reminder_option
end

#pin_advice_type_idInteger

Id of of PIN advice type. Possible Values:

  1. Paper

  2. Email

  3. SMS

  4. None

Returns:

  • (Integer)


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

def pin_advice_type_id
  @pin_advice_type_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/shell_card_management_ap_is/models/pin_advice_types.rb', line 62

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  pin_advice_type_id =
    hash.key?('PINAdviceTypeID') ? hash['PINAdviceTypeID'] : SKIP
  is_card_order_option =
    hash.key?('IsCardOrderOption') ? hash['IsCardOrderOption'] : SKIP
  is_pin_reminder_option =
    hash.key?('IsPINReminderOption') ? hash['IsPINReminderOption'] : SKIP

  # Create object from extracted values.
  PINAdviceTypes.new(pin_advice_type_id,
                     is_card_order_option,
                     is_pin_reminder_option)
end

.namesObject

A mapping from model property names to API property names.



30
31
32
33
34
35
36
# File 'lib/shell_card_management_ap_is/models/pin_advice_types.rb', line 30

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['pin_advice_type_id'] = 'PINAdviceTypeID'
  @_hash['is_card_order_option'] = 'IsCardOrderOption'
  @_hash['is_pin_reminder_option'] = 'IsPINReminderOption'
  @_hash
end

.nullablesObject

An array for nullable fields



48
49
50
51
52
# File 'lib/shell_card_management_ap_is/models/pin_advice_types.rb', line 48

def self.nullables
  %w[
    pin_advice_type_id
  ]
end

.optionalsObject

An array for optional fields



39
40
41
42
43
44
45
# File 'lib/shell_card_management_ap_is/models/pin_advice_types.rb', line 39

def self.optionals
  %w[
    pin_advice_type_id
    is_card_order_option
    is_pin_reminder_option
  ]
end