Class: Rerout::UpdateTagInput
- Inherits:
-
Object
- Object
- Rerout::UpdateTagInput
- Defined in:
- lib/rerout/update_tag_input.rb
Overview
Request body for ‘PATCH /v1/projects/me/tags/:tag_id`. Both fields are optional; an omitted field is left unchanged. Unlike UpdateLinkInput, there is no client-side empty-payload check — mirroring the reference SDKs, the server returns `400` for a fully empty patch. Neither field is nullable, so there is no `Rerout::CLEAR` handling here.
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#empty? ⇒ Boolean
True when no field was set.
-
#initialize(name: OMIT, color: OMIT) ⇒ UpdateTagInput
constructor
A new instance of UpdateTagInput.
-
#to_h ⇒ Object
Serialize for the wire.
Constructor Details
#initialize(name: OMIT, color: OMIT) ⇒ UpdateTagInput
Returns a new instance of UpdateTagInput.
18 19 20 21 22 |
# File 'lib/rerout/update_tag_input.rb', line 18 def initialize(name: OMIT, color: OMIT) @name = name @color = color freeze end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
14 15 16 |
# File 'lib/rerout/update_tag_input.rb', line 14 def color @color end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/rerout/update_tag_input.rb', line 14 def name @name end |
Instance Method Details
#empty? ⇒ Boolean
Returns true when no field was set.
33 34 35 |
# File 'lib/rerout/update_tag_input.rb', line 33 def empty? to_h.empty? end |