Class: AILabTools::Generated::Params::PortraitAIBeardStylingParams

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image:, beard: nil, image_template: nil) ⇒ PortraitAIBeardStylingParams

Returns a new instance of PortraitAIBeardStylingParams.

Raises:

  • (ArgumentError)


8
9
10
11
12
13
# File 'lib/ailabtools/generated/params/portrait_ai_beard_styling_params.rb', line 8

def initialize(image:, beard: nil, image_template: nil)
  @image = image
  @beard = beard
  @image_template = image_template
  raise ArgumentError, "At least one of beard, image_template is required" if @beard.nil? && @image_template.nil?
end

Instance Attribute Details

#beardObject (readonly)

Returns the value of attribute beard.



7
8
9
# File 'lib/ailabtools/generated/params/portrait_ai_beard_styling_params.rb', line 7

def beard
  @beard
end

#imageObject (readonly)

Returns the value of attribute image.



7
8
9
# File 'lib/ailabtools/generated/params/portrait_ai_beard_styling_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_ai_beard_styling_params.rb', line 7

def image_template
  @image_template
end

Instance Method Details

#body_fieldsObject



19
20
21
22
23
24
25
# File 'lib/ailabtools/generated/params/portrait_ai_beard_styling_params.rb', line 19

def body_fields
  compact_hash({
    "image" => @image,
    "beard" => @beard,
    "image_template" => @image_template,
  })
end

#query_fieldsObject



15
16
17
# File 'lib/ailabtools/generated/params/portrait_ai_beard_styling_params.rb', line 15

def query_fields
  {}
end