Class: ShellCardManagementApIs::ScheduleCardBlockResponseDataItems
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::ScheduleCardBlockResponseDataItems
- Defined in:
- lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb
Overview
ScheduleCardBlockResponseDataItems Model.
Instance Attribute Summary collapse
-
#card_id ⇒ Integer
Unique Id of the card.
-
#from_date ⇒ String
Effective start date & time of Block / Unblock as updated in the intermediate queue table.
-
#reference_id ⇒ Integer
Effective end date & time of Block / Unblock as updated in the intermediate queue table.
-
#to_date ⇒ String
Effective end date & time of Block / Unblock as updated in the intermediate queue table.
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, from_date = SKIP, to_date = SKIP, reference_id = SKIP) ⇒ ScheduleCardBlockResponseDataItems
constructor
A new instance of ScheduleCardBlockResponseDataItems.
-
#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(card_id = SKIP, from_date = SKIP, to_date = SKIP, reference_id = SKIP) ⇒ ScheduleCardBlockResponseDataItems
Returns a new instance of ScheduleCardBlockResponseDataItems.
62 63 64 65 66 67 68 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb', line 62 def initialize(card_id = SKIP, from_date = SKIP, to_date = SKIP, reference_id = SKIP) @card_id = card_id unless card_id == SKIP @from_date = from_date unless from_date == SKIP @to_date = to_date unless to_date == SKIP @reference_id = reference_id unless reference_id == SKIP end |
Instance Attribute Details
#card_id ⇒ Integer
Unique Id of the card.
14 15 16 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb', line 14 def card_id @card_id end |
#from_date ⇒ String
Effective start date & time of Block / Unblock as updated in the intermediate queue table. Format: yyyyMMdd HH:mm Eg: 20230512 12:30
21 22 23 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb', line 21 def from_date @from_date end |
#reference_id ⇒ Integer
Effective end date & time of Block / Unblock as updated in the intermediate queue table. Format: yyyyMMdd HH:mm Eg: 20230512 14:30
35 36 37 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb', line 35 def reference_id @reference_id end |
#to_date ⇒ String
Effective end date & time of Block / Unblock as updated in the intermediate queue table. Format: yyyyMMdd HH:mm Eg: 20230512 14:30
28 29 30 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb', line 28 def to_date @to_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. card_id = hash.key?('CardId') ? hash['CardId'] : SKIP from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP reference_id = hash.key?('ReferenceId') ? hash['ReferenceId'] : SKIP # Create object from extracted values. ScheduleCardBlockResponseDataItems.new(card_id, from_date, to_date, reference_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['card_id'] = 'CardId' @_hash['from_date'] = 'FromDate' @_hash['to_date'] = 'ToDate' @_hash['reference_id'] = 'ReferenceId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb', line 58 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
48 49 50 51 52 53 54 55 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb', line 48 def self.optionals %w[ card_id from_date to_date reference_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
95 96 97 98 99 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb', line 95 def inspect class_name = self.class.name.split('::').last "<#{class_name} card_id: #{@card_id.inspect}, from_date: #{@from_date.inspect}, to_date:"\ " #{@to_date.inspect}, reference_id: #{@reference_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
88 89 90 91 92 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb', line 88 def to_s class_name = self.class.name.split('::').last "<#{class_name} card_id: #{@card_id}, from_date: #{@from_date}, to_date: #{@to_date},"\ " reference_id: #{@reference_id}>" end |