Class: ShellCardManagementApIs::CardDetailsResponseCardBlockSchedulesItemsAllOf0

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

Overview

CardDetailsResponseCardBlockSchedulesItemsAllOf0 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(from_date = SKIP, to_date = SKIP) ⇒ CardDetailsResponseCardBlockSchedulesItemsAllOf0

Returns a new instance of CardDetailsResponseCardBlockSchedulesItemsAllOf0.



41
42
43
44
# File 'lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb', line 41

def initialize(from_date = SKIP, to_date = SKIP)
  @from_date = from_date unless from_date == SKIP
  @to_date = to_date unless to_date == SKIP
end

Instance Attribute Details

#from_dateString

Effective start date of Block / Unblock

Returns:

  • (String)


14
15
16
# File 'lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb', line 14

def from_date
  @from_date
end

#to_dateString

Effective end date of Block / Unblock

Returns:

  • (String)


18
19
20
# File 'lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb', line 18

def to_date
  @to_date
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb', line 47

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
  to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP

  # Create object from extracted values.
  CardDetailsResponseCardBlockSchedulesItemsAllOf0.new(from_date,
                                                       to_date)
end

.namesObject

A mapping from model property names to API property names.



21
22
23
24
25
26
# File 'lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb', line 21

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['from_date'] = 'FromDate'
  @_hash['to_date'] = 'ToDate'
  @_hash
end

.nullablesObject

An array for nullable fields



37
38
39
# File 'lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb', line 37

def self.nullables
  []
end

.optionalsObject

An array for optional fields



29
30
31
32
33
34
# File 'lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb', line 29

def self.optionals
  %w[
    from_date
    to_date
  ]
end