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
Hash
of all attribute values -
#attributes_tuple
Returns a
NamedTuple
of all attribute values. -
#bookable : Bool | Nil
#bookable
getter -
#bookable=(value : Bool | Nil)
#bookable
setter -
#bookable_change
Returns
{ bookable_was, bookable }
if#bookable
has changed. -
#bookable_changed?
Check if
#bookable
is 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
#bookable
in the set of changed attributes, whether it has changed or not. -
#calendars : String | Nil
#calendars
getter -
#calendars=(value : String | Nil)
Override the map json
#calendars
setter -
#calendars_change
Returns
{ calendars_was, calendars }
if#calendars
has changed. -
#calendars_changed?
Check if
#calendars
is 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
#calendars
in the set of changed attributes, whether it has changed or not. -
#capacity : Int32 | Nil
#capacity
getter -
#capacity=(value : Int32 | Nil)
#capacity
setter -
#capacity_change
Returns
{ capacity_was, capacity }
if#capacity
has changed. -
#capacity_changed?
Check if
#capacity
is 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
#capacity
in the set of changed attributes, whether it has changed or not. -
#changed?
Check if any attributes have changed.
-
#changed_attributes
Returns a
Hash
with 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
#features
getter -
#features=(value : String | Nil)
#features
setter -
#features_change
Returns
{ features_was, features }
if#features
has changed. -
#features_changed?
Check if
#features
is 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
#features
in the set of changed attributes, whether it has changed or not. -
#persistent_attributes
Returns a
Hash
of all attributes that can be persisted. -
#restore_attributes
Reset each attribute to their previous values and clears all changes.
-
#system_ids : String | Nil
#system_ids
getter -
#system_ids=(value : String | Nil)
#system_ids
setter -
#system_ids_change
Returns
{ system_ids_was, system_ids }
if#system_ids
has changed. -
#system_ids_changed?
Check if
#system_ids
is 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_ids
in 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_ids
getter -
#zone_ids=(value : String | Nil)
#zone_ids
setter -
#zone_ids_change
Returns
{ zone_ids_was, zone_ids }
if#zone_ids
has changed. -
#zone_ids_changed?
Check if
#zone_ids
is 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_ids
in 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.