Class: ShellCardManagementApIs::UpdateCardGroupResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::UpdateCardGroupResponse
- Defined in:
- lib/shell_card_management_ap_is/models/update_card_group_response.rb
Overview
UpdateCardGroupResponse Model.
Instance Attribute Summary collapse
-
#main_reference ⇒ Integer
Reference number for tracking the overall request.
-
#move_card_references ⇒ Array[UpdateCardGroupResponseMoveCardReferencesItems]
List of cards submitted successfully for processing the move to the target card-group or to change card-group to null.
-
#new_card_group_reference ⇒ Integer
Reference number for tracking the execution of new card group creation in the case when the cards in the terminating card-group have to be moved to a new card-group.
-
#update_card_group_reference ⇒ Integer
Reference number for tracking the execution of terminate card-group request.
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(main_reference = SKIP, update_card_group_reference = SKIP, new_card_group_reference = SKIP, move_card_references = SKIP) ⇒ UpdateCardGroupResponse
constructor
A new instance of UpdateCardGroupResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(main_reference = SKIP, update_card_group_reference = SKIP, new_card_group_reference = SKIP, move_card_references = SKIP) ⇒ UpdateCardGroupResponse
Returns a new instance of UpdateCardGroupResponse.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 65 def initialize(main_reference = SKIP, update_card_group_reference = SKIP, new_card_group_reference = SKIP, move_card_references = SKIP) @main_reference = main_reference unless main_reference == SKIP unless update_card_group_reference == SKIP @update_card_group_reference = update_card_group_reference end @new_card_group_reference = new_card_group_reference unless new_card_group_reference == SKIP @move_card_references = move_card_references unless move_card_references == SKIP end |
Instance Attribute Details
#main_reference ⇒ Integer
Reference number for tracking the overall request. The value will be null when the validation fails.
15 16 17 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 15 def main_reference @main_reference end |
#move_card_references ⇒ Array[UpdateCardGroupResponseMoveCardReferencesItems]
List of cards submitted successfully for processing the move to the target card-group or to change card-group to null. This list will be empty when the validations fail or there are no cards in the card-group that is getting terminated or MoveCards in the request object is false
38 39 40 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 38 def move_card_references @move_card_references end |
#new_card_group_reference ⇒ Integer
Reference number for tracking the execution of new card group creation in the case when the cards in the terminating card-group have to be moved to a new card-group. Reference number will be null when the validations fail or new card-group creation is not requested.
30 31 32 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 30 def new_card_group_reference @new_card_group_reference end |
#update_card_group_reference ⇒ Integer
Reference number for tracking the execution of terminate card-group request. Reference number will be null when the validations fail or TerminateCardGroup in the request object is false.
22 23 24 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 22 def update_card_group_reference @update_card_group_reference end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 77 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. main_reference = hash.key?('MainReference') ? hash['MainReference'] : SKIP update_card_group_reference = hash.key?('UpdateCardGroupReference') ? hash['UpdateCardGroupReference'] : SKIP new_card_group_reference = hash.key?('NewCardGroupReference') ? hash['NewCardGroupReference'] : SKIP # Parameter is an array, so we need to iterate through it move_card_references = nil unless hash['MoveCardReferences'].nil? move_card_references = [] hash['MoveCardReferences'].each do |structure| move_card_references << (UpdateCardGroupResponseMoveCardReferencesItems.from_hash(structure) if structure) end end move_card_references = SKIP unless hash.key?('MoveCardReferences') # Create object from extracted values. UpdateCardGroupResponse.new(main_reference, update_card_group_reference, new_card_group_reference, move_card_references) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['main_reference'] = 'MainReference' @_hash['update_card_group_reference'] = 'UpdateCardGroupReference' @_hash['new_card_group_reference'] = 'NewCardGroupReference' @_hash['move_card_references'] = 'MoveCardReferences' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 61 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
51 52 53 54 55 56 57 58 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 51 def self.optionals %w[ main_reference update_card_group_reference new_card_group_reference move_card_references ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
113 114 115 116 117 118 119 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 113 def inspect class_name = self.class.name.split('::').last "<#{class_name} main_reference: #{@main_reference.inspect}, update_card_group_reference:"\ " #{@update_card_group_reference.inspect}, new_card_group_reference:"\ " #{@new_card_group_reference.inspect}, move_card_references:"\ " #{@move_card_references.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
105 106 107 108 109 110 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 105 def to_s class_name = self.class.name.split('::').last "<#{class_name} main_reference: #{@main_reference}, update_card_group_reference:"\ " #{@update_card_group_reference}, new_card_group_reference: #{@new_card_group_reference},"\ " move_card_references: #{@move_card_references}>" end |