Class: AILabTools::Generated::Params::PortraitHairstyleEditingPremiumParams

Inherits:
Params
  • Object
show all
Defined in:
lib/ailabtools/generated/params/portrait_hairstyle_editing_premium_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image:, image_template: nil, hair_style: nil, color: nil) ⇒ PortraitHairstyleEditingPremiumParams

Returns a new instance of PortraitHairstyleEditingPremiumParams.

Raises:

  • (ArgumentError)


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

#colorObject (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_styleObject (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

#imageObject (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_templateObject (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_fieldsObject



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_fieldsObject



16
17
18
# File 'lib/ailabtools/generated/params/portrait_hairstyle_editing_premium_params.rb', line 16

def query_fields
  {}
end