Class: ShellCardManagementApIs::CreateCardGroupResponseErrorCardsItems
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::CreateCardGroupResponseErrorCardsItems
- Defined in:
- lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb
Overview
CreateCardGroupResponseErrorCardsItems Model.
Instance Attribute Summary collapse
-
#card_id ⇒ Integer
Card Id of the card.
-
#error_code ⇒ String
Error code for validation failure.
-
#error_description ⇒ String
Description of validation failure.
-
#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(card_id = SKIP, pan = SKIP, error_code = SKIP, error_description = SKIP) ⇒ CreateCardGroupResponseErrorCardsItems
constructor
A new instance of CreateCardGroupResponseErrorCardsItems.
Methods inherited from BaseModel
Constructor Details
#initialize(card_id = SKIP, pan = SKIP, error_code = SKIP, error_description = SKIP) ⇒ CreateCardGroupResponseErrorCardsItems
Returns a new instance of CreateCardGroupResponseErrorCardsItems.
53 54 55 56 57 58 59 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb', line 53 def initialize(card_id = SKIP, pan = SKIP, error_code = SKIP, error_description = SKIP) @card_id = card_id unless card_id == SKIP @pan = pan unless pan == SKIP @error_code = error_code unless error_code == SKIP @error_description = error_description unless error_description == SKIP end |
Instance Attribute Details
#card_id ⇒ Integer
Card Id of the card.
14 15 16 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb', line 14 def card_id @card_id end |
#error_code ⇒ String
Error code for validation failure.
22 23 24 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb', line 22 def error_code @error_code end |
#error_description ⇒ String
Description of validation failure.
26 27 28 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb', line 26 def error_description @error_description end |
#pan ⇒ String
PAN of the card.
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb', line 18 def pan @pan 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/create_card_group_response_error_cards_items.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. card_id = hash.key?('CardId') ? hash['CardId'] : SKIP pan = hash.key?('PAN') ? hash['PAN'] : SKIP error_code = hash.key?('ErrorCode') ? hash['ErrorCode'] : SKIP error_description = hash.key?('ErrorDescription') ? hash['ErrorDescription'] : SKIP # Create object from extracted values. CreateCardGroupResponseErrorCardsItems.new(card_id, pan, error_code, error_description) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['card_id'] = 'CardId' @_hash['pan'] = 'PAN' @_hash['error_code'] = 'ErrorCode' @_hash['error_description'] = 'ErrorDescription' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb', line 39 def self.optionals %w[ card_id pan error_code error_description ] end |