Class: AILabTools::Generated::Params::PortraitHairstyleEditingPremiumParams
- Inherits:
-
Params
- Object
- Params
- AILabTools::Generated::Params::PortraitHairstyleEditingPremiumParams
- Defined in:
- lib/ailabtools/generated/params/portrait_hairstyle_editing_premium_params.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#hair_style ⇒ Object
readonly
Returns the value of attribute hair_style.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#image_template ⇒ Object
readonly
Returns the value of attribute image_template.
Instance Method Summary collapse
- #body_fields ⇒ Object
-
#initialize(image:, image_template: nil, hair_style: nil, color: nil) ⇒ PortraitHairstyleEditingPremiumParams
constructor
A new instance of PortraitHairstyleEditingPremiumParams.
- #query_fields ⇒ Object
Constructor Details
#initialize(image:, image_template: nil, hair_style: nil, color: nil) ⇒ PortraitHairstyleEditingPremiumParams
Returns a new instance of PortraitHairstyleEditingPremiumParams.
8 9 10 11 12 13 14 |
# File 'lib/ailabtools/generated/params/portrait_hairstyle_editing_premium_params.rb', line 8 def initialize(image:, image_template: nil, hair_style: nil, color: nil) @image = image @image_template = image_template @hair_style = hair_style @color = color raise ArgumentError, "At least one of hair_style, image_template is required" if @hair_style.nil? && @image_template.nil? end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
7 8 9 |
# File 'lib/ailabtools/generated/params/portrait_hairstyle_editing_premium_params.rb', line 7 def color @color end |
#hair_style ⇒ Object (readonly)
Returns the value of attribute hair_style.
7 8 9 |
# File 'lib/ailabtools/generated/params/portrait_hairstyle_editing_premium_params.rb', line 7 def hair_style @hair_style end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
7 8 9 |
# File 'lib/ailabtools/generated/params/portrait_hairstyle_editing_premium_params.rb', line 7 def image @image end |
#image_template ⇒ Object (readonly)
Returns the value of attribute image_template.
7 8 9 |
# File 'lib/ailabtools/generated/params/portrait_hairstyle_editing_premium_params.rb', line 7 def image_template @image_template end |
Instance Method Details
#body_fields ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/ailabtools/generated/params/portrait_hairstyle_editing_premium_params.rb', line 20 def body_fields compact_hash({ "image" => @image, "image_template" => @image_template, "hair_style" => @hair_style, "color" => @color, }) end |
#query_fields ⇒ Object
16 17 18 |
# File 'lib/ailabtools/generated/params/portrait_hairstyle_editing_premium_params.rb', line 16 def query_fields {} end |