Class: ShellCardManagementApIs::ScheduleCardBlockResponseDataItems

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb

Overview

ScheduleCardBlockResponseDataItems Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#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_idInteger

Unique Id of the card.

Returns:

  • (Integer)


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_dateString

Effective start date & time of Block / Unblock as updated in the intermediate queue table. Format: yyyyMMdd HH:mm Eg: 20230512 12:30

Returns:

  • (String)


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_idInteger

Effective end date & time of Block / Unblock as updated in the intermediate queue table. Format: yyyyMMdd HH:mm Eg: 20230512 14:30

Returns:

  • (Integer)


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_dateString

Effective end date & time of Block / Unblock as updated in the intermediate queue table. Format: yyyyMMdd HH:mm Eg: 20230512 14:30

Returns:

  • (String)


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

.namesObject

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

.nullablesObject

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

.optionalsObject

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