Class: ShellCardManagementApIs::AutoRenewCardRequestAutoRenewCardsItems

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

Overview

AutoRenewCardRequestAutoRenewCardsItems Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(reissue_setting = nil, account_number = SKIP, account_id = SKIP, pan = SKIP, panid = SKIP, card_id = SKIP) ⇒ AutoRenewCardRequestAutoRenewCardsItems

Returns a new instance of AutoRenewCardRequestAutoRenewCardsItems.



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

def initialize(reissue_setting = nil,  = SKIP,
                = SKIP, pan = SKIP, panid = SKIP, card_id = SKIP)
  @account_number =  unless  == SKIP
  @account_id =  unless  == SKIP
  @pan = pan unless pan == SKIP
  @panid = panid unless panid == SKIP
  @card_id = card_id unless card_id == SKIP
  @reissue_setting = reissue_setting
end

Instance Attribute Details

#account_idInteger

Account Id of the customer. Optional if AccountNumber is passed, else Mandatory.

Returns:

  • (Integer)


20
21
22
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb', line 20

def 
  @account_id
end

#account_numberString

Account Number of the customer. Optional if AccountId is passed, else Mandatory.

Returns:

  • (String)


15
16
17
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb', line 15

def 
  @account_number
end

#card_idInteger

Card Id of the card. Optional if PAN is passed, else Mandatory.

Returns:

  • (Integer)


36
37
38
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb', line 36

def card_id
  @card_id
end

#panString

PAN of the card. Optional if CardId is passed, else Mandatory.

Returns:

  • (String)


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

def pan
  @pan
end

#panidFloat

Card PAN ID. Optional if CardId is given, else mandatory. Note: PANID is ignored if CardId is given.

Returns:

  • (Float)


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

def panid
  @panid
end

#reissue_settingTrueClass | FalseClass

Reissue setting of the card. Values: True – Card will be Reissued when nearing its expiry date False – Card will not be Reissued Mandatory

Returns:

  • (TrueClass | FalseClass)


44
45
46
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb', line 44

def reissue_setting
  @reissue_setting
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb', line 85

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  reissue_setting =
    hash.key?('ReissueSetting') ? hash['ReissueSetting'] : nil
   = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
   = hash.key?('AccountId') ? hash['AccountId'] : SKIP
  pan = hash.key?('PAN') ? hash['PAN'] : SKIP
  panid = hash.key?('PANID') ? hash['PANID'] : SKIP
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP

  # Create object from extracted values.
  AutoRenewCardRequestAutoRenewCardsItems.new(reissue_setting,
                                              ,
                                              ,
                                              pan,
                                              panid,
                                              card_id)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_number'] = 'AccountNumber'
  @_hash['account_id'] = 'AccountId'
  @_hash['pan'] = 'PAN'
  @_hash['panid'] = 'PANID'
  @_hash['card_id'] = 'CardId'
  @_hash['reissue_setting'] = 'ReissueSetting'
  @_hash
end

.nullablesObject

An array for nullable fields



70
71
72
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb', line 70

def self.nullables
  []
end

.optionalsObject

An array for optional fields



59
60
61
62
63
64
65
66
67
# File 'lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb', line 59

def self.optionals
  %w[
    account_number
    account_id
    pan
    panid
    card_id
  ]
end