Class: Asdawqw::ParkingPolicy
- Defined in:
- lib/asdawqw/models/parking_policy.rb
Overview
ParkingPolicy Model.
Instance Attribute Summary collapse
-
#access_parking ⇒ Boolean
Access parking into properties true,false.
-
#charge_parking ⇒ String
Charge parking.
-
#located_parking ⇒ LocatedParkingTypeEnum
Located parking Nearby.
-
#necessary_reservation_parking ⇒ ReservationParkingTypeEnum
Necessary reservation parking NotPossible, ReservationNeeded Necessary reservation parking.
-
#private_parking ⇒ Boolean
Parking is private or no.
-
#time_cost_parking ⇒ TimeCostParkingEnum
Time cost parking PerWeek, PerStay, PerDay.
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_parking = nil, located_parking = nil, private_parking = nil, charge_parking = nil, time_cost_parking = nil, necessary_reservation_parking = nil) ⇒ ParkingPolicy
constructor
A new instance of ParkingPolicy.
Methods inherited from BaseModel
Constructor Details
#initialize(access_parking = nil, located_parking = nil, private_parking = nil, charge_parking = nil, time_cost_parking = nil, necessary_reservation_parking = nil) ⇒ ParkingPolicy
Returns a new instance of ParkingPolicy.
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/asdawqw/models/parking_policy.rb', line 46 def initialize(access_parking = nil, located_parking = nil, private_parking = nil, charge_parking = nil, time_cost_parking = nil, necessary_reservation_parking = nil) @access_parking = access_parking @located_parking = located_parking @private_parking = private_parking @charge_parking = charge_parking @time_cost_parking = time_cost_parking @necessary_reservation_parking = necessary_reservation_parking end |
Instance Attribute Details
#access_parking ⇒ Boolean
Access parking into properties true,false
11 12 13 |
# File 'lib/asdawqw/models/parking_policy.rb', line 11 def access_parking @access_parking end |
#charge_parking ⇒ String
Charge parking. Example: “Free”, “$ 100”.
23 24 25 |
# File 'lib/asdawqw/models/parking_policy.rb', line 23 def charge_parking @charge_parking end |
#located_parking ⇒ LocatedParkingTypeEnum
Located parking Nearby
15 16 17 |
# File 'lib/asdawqw/models/parking_policy.rb', line 15 def located_parking @located_parking end |
#necessary_reservation_parking ⇒ ReservationParkingTypeEnum
Necessary reservation parking NotPossible, ReservationNeeded Necessary reservation parking
32 33 34 |
# File 'lib/asdawqw/models/parking_policy.rb', line 32 def necessary_reservation_parking @necessary_reservation_parking end |
#private_parking ⇒ Boolean
Parking is private or no. true,false
19 20 21 |
# File 'lib/asdawqw/models/parking_policy.rb', line 19 def private_parking @private_parking end |
#time_cost_parking ⇒ TimeCostParkingEnum
Time cost parking PerWeek, PerStay, PerDay
27 28 29 |
# File 'lib/asdawqw/models/parking_policy.rb', line 27 def time_cost_parking @time_cost_parking end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/asdawqw/models/parking_policy.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. access_parking = hash['accessParking'] located_parking = hash['locatedParking'] private_parking = hash['privateParking'] charge_parking = hash['chargeParking'] time_cost_parking = hash['timeCostParking'] necessary_reservation_parking = hash['necessaryReservationParking'] # Create object from extracted values. ParkingPolicy.new(access_parking, located_parking, private_parking, charge_parking, time_cost_parking, necessary_reservation_parking) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/asdawqw/models/parking_policy.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['access_parking'] = 'accessParking' @_hash['located_parking'] = 'locatedParking' @_hash['private_parking'] = 'privateParking' @_hash['charge_parking'] = 'chargeParking' @_hash['time_cost_parking'] = 'timeCostParking' @_hash['necessary_reservation_parking'] = 'necessaryReservationParking' @_hash end |