Class: ShellCardManagementApIs::AutoRenewCardRequestAutoRenewCardsItems
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::AutoRenewCardRequestAutoRenewCardsItems
- 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
-
#account_id ⇒ Integer
Account Id of the customer.
-
#account_number ⇒ String
Account Number of the customer.
-
#card_id ⇒ Integer
Card Id of the card.
-
#pan ⇒ String
PAN of the card.
-
#panid ⇒ Float
Card PAN ID.
-
#reissue_setting ⇒ TrueClass | FalseClass
Reissue setting of the card.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(reissue_setting = nil, account_number = SKIP, account_id = SKIP, pan = SKIP, panid = SKIP, card_id = SKIP) ⇒ AutoRenewCardRequestAutoRenewCardsItems
constructor
A new instance of AutoRenewCardRequestAutoRenewCardsItems.
Methods inherited from BaseModel
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, account_number = SKIP, account_id = SKIP, pan = SKIP, panid = SKIP, card_id = SKIP) @account_number = account_number unless account_number == SKIP @account_id = account_id unless account_id == 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_id ⇒ Integer
Account Id of the customer. Optional if AccountNumber is passed, else Mandatory.
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 @account_id end |
#account_number ⇒ String
Account Number of the customer. Optional if AccountId is passed, else Mandatory.
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 @account_number end |
#card_id ⇒ Integer
Card Id of the card. Optional if PAN is passed, else Mandatory.
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 |
#pan ⇒ String
PAN of the card. Optional if CardId is passed, else Mandatory.
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 |
#panid ⇒ Float
Card PAN ID. Optional if CardId is given, else mandatory. Note: PANID is ignored if CardId is given.
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_setting ⇒ TrueClass | FalseClass
Reissue setting of the card. Values: True – Card will be Reissued when nearing its expiry date False – Card will not be Reissued Mandatory
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 account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP account_id = 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, account_number, account_id, pan, panid, card_id) end |
.names ⇒ Object
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 |
.nullables ⇒ Object
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 |
.optionals ⇒ Object
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 |