Class: ShellCardManagementApIs::CreateCardGroupRequestCardsItems
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::CreateCardGroupRequestCardsItems
- Defined in:
- lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb
Overview
CreateCardGroupRequestCardsItems Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account Id of the account of the card.
-
#account_number ⇒ String
Account Number of the account of the card.
-
#card_id ⇒ Integer
Card Id of the card.
-
#pan ⇒ String
PAN 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(account_id = SKIP, account_number = SKIP, card_id = SKIP, pan = SKIP) ⇒ CreateCardGroupRequestCardsItems
constructor
A new instance of CreateCardGroupRequestCardsItems.
Methods inherited from BaseModel
Constructor Details
#initialize(account_id = SKIP, account_number = SKIP, card_id = SKIP, pan = SKIP) ⇒ CreateCardGroupRequestCardsItems
Returns a new instance of CreateCardGroupRequestCardsItems.
57 58 59 60 61 62 63 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb', line 57 def initialize(account_id = SKIP, account_number = SKIP, card_id = SKIP, pan = SKIP) @account_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP @card_id = card_id unless card_id == SKIP @pan = pan unless pan == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Account Id of the account of the card. Optional if AccountNumber is passed, else Mandatory.
15 16 17 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb', line 15 def account_id @account_id end |
#account_number ⇒ String
Account Number of the account of the card. Optional if AccountId is passed, else Mandatory.
20 21 22 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb', line 20 def account_number @account_number end |
#card_id ⇒ Integer
Card Id of the card. Optional if PAN is passed, else Mandatory.
25 26 27 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb', line 25 def card_id @card_id end |
#pan ⇒ String
PAN of the card. Optional if CardId is passed, else Mandatory.
30 31 32 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb', line 30 def pan @pan end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb', line 66 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP card_id = hash.key?('CardId') ? hash['CardId'] : SKIP pan = hash.key?('PAN') ? hash['PAN'] : SKIP # Create object from extracted values. CreateCardGroupRequestCardsItems.new(account_id, account_number, card_id, pan) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'AccountId' @_hash['account_number'] = 'AccountNumber' @_hash['card_id'] = 'CardId' @_hash['pan'] = 'PAN' @_hash end |
.nullables ⇒ Object
An array for nullable fields
53 54 55 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb', line 53 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 46 47 48 49 50 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb', line 43 def self.optionals %w[ account_id account_number card_id pan ] end |