class Utils::PlaceOSHelpers::CalendarSelection
- Utils::PlaceOSHelpers::CalendarSelection
- Params
- ActiveModel::Model
- Reference
- Object
Defined in:
controllers/utilities/placeos-helpers.crConstructors
-
.from_trusted_json(string_or_io : String | IO) : self
Serialize from a trusted JSON source
-
.from_trusted_yaml(string_or_io : String | IO) : self
Serialize from a trusted YAML source
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(calendars : String | Nil | Nil = nil, zone_ids : String | Nil | Nil = nil, system_ids : String | Nil | Nil = nil, features : String | Nil | Nil = nil, capacity : Int32 | Nil | Nil = nil, bookable : Bool | Nil | Nil = nil)
-
.new(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
Initialize Utils::PlaceOSHelpers::CalendarSelection from
HTTP::Params.
Class Method Summary
-
.attributes : Array(Symbol)
Returns all attribute keys.
Instance Method Summary
-
#apply_defaults
Generate code to apply default values
-
#assign_attributes(calendars : String | Nil | Missing = Missing, zone_ids : String | Nil | Missing = Missing, system_ids : String | Nil | Missing = Missing, features : String | Nil | Missing = Missing, capacity : Int32 | Nil | Missing = Missing, bookable : Bool | Nil | Missing = Missing)
Assign to multiple attributes.
-
#assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
Assign to mulitple attributes via
HTTP::Params. - #assign_attributes_from_json(json)
- #assign_attributes_from_trusted_json(json)
- #assign_attributes_from_trusted_yaml(yaml)
-
#assign_attributes_from_yaml(yaml)
Uses the YAML parser as JSON is valid YAML
-
#attributes
Returns a
Hashof all attribute values -
#attributes_tuple
Returns a
NamedTupleof all attribute values. -
#bookable : Bool | Nil
#bookablegetter -
#bookable=(value : Bool | Nil)
#bookablesetter -
#bookable_change
Returns
{ bookable_was, bookable }if#bookablehas changed. -
#bookable_changed?
Check if
#bookableis in the set of changed attributes. -
#bookable_default : Bool | Nil
#bookable's default value -
#bookable_was : Bool?
Returns the previous value of
#bookable. -
#bookable_will_change!
Include
#bookablein the set of changed attributes, whether it has changed or not. -
#calendars : String | Nil
#calendarsgetter -
#calendars=(value : String | Nil)
Override the map json
#calendarssetter -
#calendars_change
Returns
{ calendars_was, calendars }if#calendarshas changed. -
#calendars_changed?
Check if
#calendarsis in the set of changed attributes. -
#calendars_default : String | Nil
#calendars's default value -
#calendars_was : String?
Returns the previous value of
#calendars. -
#calendars_will_change!
Include
#calendarsin the set of changed attributes, whether it has changed or not. -
#capacity : Int32 | Nil
#capacitygetter -
#capacity=(value : Int32 | Nil)
#capacitysetter -
#capacity_change
Returns
{ capacity_was, capacity }if#capacityhas changed. -
#capacity_changed?
Check if
#capacityis in the set of changed attributes. -
#capacity_default : Int32 | Nil
#capacity's default value -
#capacity_was : Int32?
Returns the previous value of
#capacity. -
#capacity_will_change!
Include
#capacityin the set of changed attributes, whether it has changed or not. -
#changed?
Check if any attributes have changed.
-
#changed_attributes
Returns a
Hashwith all changed attributes. -
#changed_json(io : IO) : Nil
Serialize the set of changed attributes to JSON.
-
#changed_json : String
Serialize the set of changed attributes to JSON.
-
#changed_yaml(io : IO) : Nil
Serialize the set of changed attributes to YAML.
-
#changed_yaml : String
Serialize the set of changed attributes to YAML.
-
#clear_changes_information
Reset changes for all attributes.
-
#features : String | Nil
#featuresgetter -
#features=(value : String | Nil)
#featuressetter -
#features_change
Returns
{ features_was, features }if#featureshas changed. -
#features_changed?
Check if
#featuresis in the set of changed attributes. -
#features_default : String | Nil
#features's default value -
#features_was : String?
Returns the previous value of
#features. -
#features_will_change!
Include
#featuresin the set of changed attributes, whether it has changed or not. -
#persistent_attributes
Returns a
Hashof all attributes that can be persisted. -
#restore_attributes
Reset each attribute to their previous values and clears all changes.
-
#system_ids : String | Nil
#system_idsgetter -
#system_ids=(value : String | Nil)
#system_idssetter -
#system_ids_change
Returns
{ system_ids_was, system_ids }if#system_idshas changed. -
#system_ids_changed?
Check if
#system_idsis in the set of changed attributes. -
#system_ids_default : String | Nil
#system_ids's default value -
#system_ids_was : String?
Returns the previous value of
#system_ids. -
#system_ids_will_change!
Include
#system_idsin the set of changed attributes, whether it has changed or not. - #to_json(json : JSON::Builder)
- #to_yaml(__temp_1818 : YAML::Nodes::Builder)
-
#validate_nilability
Validate that all non-nillable fields have values.
-
#zone_ids : String | Nil
#zone_idsgetter -
#zone_ids=(value : String | Nil)
#zone_idssetter -
#zone_ids_change
Returns
{ zone_ids_was, zone_ids }if#zone_idshas changed. -
#zone_ids_changed?
Check if
#zone_idsis in the set of changed attributes. -
#zone_ids_default : String | Nil
#zone_ids's default value -
#zone_ids_was : String?
Returns the previous value of
#zone_ids. -
#zone_ids_will_change!
Include
#zone_idsin the set of changed attributes, whether it has changed or not.
Instance methods inherited from class Params
apply_defaults
apply_defaults,
assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))assign_attributes assign_attributes, attributes attributes, attributes_tuple attributes_tuple, persistent_attributes persistent_attributes, validate! validate!
Class methods inherited from class Params
attributes : Array(Symbol)
attributes
Constructor Detail
Serialize from a trusted JSON source
Serialize from a trusted YAML source
Initialize Utils::PlaceOSHelpers::CalendarSelection from HTTP::Params.
Class Method Detail
Instance Method Detail
Assign to multiple attributes.
Assign to mulitple attributes via HTTP::Params.
Include #bookable in the set of changed attributes, whether it has changed or not.
Include #calendars in the set of changed attributes, whether it has changed or not.
Include #capacity in the set of changed attributes, whether it has changed or not.
Include #features in the set of changed attributes, whether it has changed or not.
Include #system_ids in the set of changed attributes, whether it has changed or not.