Class: ShellCardManagementApIs::CardBlockSchedule
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::CardBlockSchedule
- Defined in:
- lib/shell_card_management_ap_is/models/card_block_schedule.rb
Overview
Response entity object for CardBlockSchedule list
Instance Attribute Summary collapse
-
#from_date ⇒ String
Effective start date of Block / Unblock<br /> Format: yyyyMMdd.
-
#to_date ⇒ String
Effective end date of Block / Unblock<br /> Format: yyyyMMdd.
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(from_date = SKIP, to_date = SKIP) ⇒ CardBlockSchedule
constructor
A new instance of CardBlockSchedule.
Methods inherited from BaseModel
Constructor Details
#initialize(from_date = SKIP, to_date = SKIP) ⇒ CardBlockSchedule
Returns a new instance of CardBlockSchedule.
46 47 48 49 |
# File 'lib/shell_card_management_ap_is/models/card_block_schedule.rb', line 46 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_date ⇒ String
Effective start date of Block / Unblock<br /> Format: yyyyMMdd
15 16 17 |
# File 'lib/shell_card_management_ap_is/models/card_block_schedule.rb', line 15 def from_date @from_date end |
#to_date ⇒ String
Effective end date of Block / Unblock<br /> Format: yyyyMMdd
20 21 22 |
# File 'lib/shell_card_management_ap_is/models/card_block_schedule.rb', line 20 def to_date @to_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/shell_card_management_ap_is/models/card_block_schedule.rb', line 52 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. CardBlockSchedule.new(from_date, to_date) end |
.names ⇒ Object
A mapping from model property names to API property names.
23 24 25 26 27 28 |
# File 'lib/shell_card_management_ap_is/models/card_block_schedule.rb', line 23 def self.names @_hash = {} if @_hash.nil? @_hash['from_date'] = 'FromDate' @_hash['to_date'] = 'ToDate' @_hash end |
.nullables ⇒ Object
An array for nullable fields
39 40 41 42 43 44 |
# File 'lib/shell_card_management_ap_is/models/card_block_schedule.rb', line 39 def self.nullables %w[ from_date to_date ] end |
.optionals ⇒ Object
An array for optional fields
31 32 33 34 35 36 |
# File 'lib/shell_card_management_ap_is/models/card_block_schedule.rb', line 31 def self.optionals %w[ from_date to_date ] end |