Class: ShellEv::ChargesessionStartBody
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellEv::ChargesessionStartBody
- Defined in:
- lib/shell_ev/models/chargesession_start_body.rb
Overview
ChargesessionStartBody Model.
Instance Attribute Summary collapse
-
#ev_charge_number ⇒ String
Ev charge number.
-
#evse_id ⇒ String
This is the Electric Vehicle EquipmentID.
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(ev_charge_number = nil, evse_id = nil) ⇒ ChargesessionStartBody
constructor
A new instance of ChargesessionStartBody.
Methods inherited from BaseModel
Constructor Details
#initialize(ev_charge_number = nil, evse_id = nil) ⇒ ChargesessionStartBody
Returns a new instance of ChargesessionStartBody.
38 39 40 41 |
# File 'lib/shell_ev/models/chargesession_start_body.rb', line 38 def initialize(ev_charge_number = nil, evse_id = nil) @ev_charge_number = ev_charge_number @evse_id = evse_id end |
Instance Attribute Details
#ev_charge_number ⇒ String
Ev charge number
14 15 16 |
# File 'lib/shell_ev/models/chargesession_start_body.rb', line 14 def ev_charge_number @ev_charge_number end |
#evse_id ⇒ String
This is the Electric Vehicle EquipmentID
18 19 20 |
# File 'lib/shell_ev/models/chargesession_start_body.rb', line 18 def evse_id @evse_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/shell_ev/models/chargesession_start_body.rb', line 44 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ev_charge_number = hash.key?('evChargeNumber') ? hash['evChargeNumber'] : nil evse_id = hash.key?('evseId') ? hash['evseId'] : nil # Create object from extracted values. ChargesessionStartBody.new(ev_charge_number, evse_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/shell_ev/models/chargesession_start_body.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['ev_charge_number'] = 'evChargeNumber' @_hash['evse_id'] = 'evseId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
34 35 36 |
# File 'lib/shell_ev/models/chargesession_start_body.rb', line 34 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 |
# File 'lib/shell_ev/models/chargesession_start_body.rb', line 29 def self.optionals [] end |