Class: Asdawqw::InternetPolicy
- Defined in:
- lib/asdawqw/models/internet_policy.rb
Overview
InternetPolicy Model.
Instance Attribute Summary collapse
-
#access_internet ⇒ Boolean
Access internet into properties.
-
#available_internet ⇒ AvailableInternetEnum
Available internet BusinessCenter, SomeRooms.
-
#charge_internet ⇒ String
Charge internet.
-
#kind_of_internet ⇒ KindOfInternetTypeEnum
Kind of Internet Wired.
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.
Instance Method Summary collapse
-
#initialize(access_internet = nil, kind_of_internet = nil, available_internet = nil, charge_internet = nil) ⇒ InternetPolicy
constructor
A new instance of InternetPolicy.
Methods inherited from BaseModel
Constructor Details
#initialize(access_internet = nil, kind_of_internet = nil, available_internet = nil, charge_internet = nil) ⇒ InternetPolicy
Returns a new instance of InternetPolicy.
35 36 37 38 39 40 41 42 43 |
# File 'lib/asdawqw/models/internet_policy.rb', line 35 def initialize(access_internet = nil, kind_of_internet = nil, available_internet = nil, charge_internet = nil) @access_internet = access_internet @kind_of_internet = kind_of_internet @available_internet = available_internet @charge_internet = charge_internet end |
Instance Attribute Details
#access_internet ⇒ Boolean
Access internet into properties
11 12 13 |
# File 'lib/asdawqw/models/internet_policy.rb', line 11 def access_internet @access_internet end |
#available_internet ⇒ AvailableInternetEnum
Available internet BusinessCenter, SomeRooms
19 20 21 |
# File 'lib/asdawqw/models/internet_policy.rb', line 19 def available_internet @available_internet end |
#charge_internet ⇒ String
Charge internet. Example: “Free”, “$ 100”.
23 24 25 |
# File 'lib/asdawqw/models/internet_policy.rb', line 23 def charge_internet @charge_internet end |
#kind_of_internet ⇒ KindOfInternetTypeEnum
Kind of Internet Wired
15 16 17 |
# File 'lib/asdawqw/models/internet_policy.rb', line 15 def kind_of_internet @kind_of_internet end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/asdawqw/models/internet_policy.rb', line 46 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. access_internet = hash['accessInternet'] kind_of_internet = hash['kindOfInternet'] available_internet = hash['availableInternet'] charge_internet = hash['chargeInternet'] # Create object from extracted values. InternetPolicy.new(access_internet, kind_of_internet, available_internet, charge_internet) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 33 |
# File 'lib/asdawqw/models/internet_policy.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['access_internet'] = 'accessInternet' @_hash['kind_of_internet'] = 'kindOfInternet' @_hash['available_internet'] = 'availableInternet' @_hash['charge_internet'] = 'chargeInternet' @_hash end |