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
-
#error ⇒ ErrorStatus
List of cards submitted successfully for processing the move to the target card-group or to change card-group to null.
-
#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.
-
#request_id ⇒ String
API Request ID.
-
#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, error = SKIP, request_id = SKIP) ⇒ UpdateCardGroupResponse
constructor
A new instance of UpdateCardGroupResponse.
Methods inherited from BaseModel
Constructor Details
#initialize(main_reference = SKIP, update_card_group_reference = SKIP, new_card_group_reference = SKIP, move_card_references = SKIP, error = SKIP, request_id = SKIP) ⇒ UpdateCardGroupResponse
Returns a new instance of UpdateCardGroupResponse.
81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 81 def initialize(main_reference = SKIP, update_card_group_reference = SKIP, new_card_group_reference = SKIP, move_card_references = SKIP, error = SKIP, request_id = 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 @error = error unless error == SKIP @request_id = request_id unless request_id == SKIP end |
Instance Attribute Details
#error ⇒ ErrorStatus
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
46 47 48 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 46 def error @error end |
#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 |
#request_id ⇒ String
API Request ID
50 51 52 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 50 def request_id @request_id 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.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 96 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') error = ErrorStatus.from_hash(hash['Error']) if hash['Error'] request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP # Create object from extracted values. UpdateCardGroupResponse.new(main_reference, update_card_group_reference, new_card_group_reference, move_card_references, error, request_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 53 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['error'] = 'Error' @_hash['request_id'] = 'RequestId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
77 78 79 |
# File 'lib/shell_card_management_ap_is/models/update_card_group_response.rb', line 77 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
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 self.optionals %w[ main_reference update_card_group_reference new_card_group_reference move_card_references error request_id ] end |