Skip to content

Commit

Permalink
fix(specs): correct type for banners [skip-bc] (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3939

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
  • Loading branch information
algolia-bot committed Oct 10, 2024
1 parent f667bbf commit b585fd6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 426 deletions.
6 changes: 4 additions & 2 deletions lib/algolia/models/recommend/banner_image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def self.acceptable_attributes
# Attribute type mapping.
def self.types_mapping
{
:urls => :"BannerImageUrl",
:urls => :"Array<BannerImageUrl>",
:title => :"String"
}
end
Expand Down Expand Up @@ -63,7 +63,9 @@ def initialize(attributes = {})
}

if attributes.key?(:urls)
self.urls = attributes[:urls]
if (value = attributes[:urls]).is_a?(Array)
self.urls = value
end
end

if attributes.key?(:title)
Expand Down
209 changes: 0 additions & 209 deletions lib/algolia/models/recommend/banners.rb

This file was deleted.

7 changes: 5 additions & 2 deletions lib/algolia/models/recommend/widgets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module Algolia
module Recommend
# widgets returned from any rules that are applied to the current search.
class Widgets
# banners defined in the merchandising studio for the given search.
attr_accessor :banners

# Attribute mapping from ruby-style variable name to JSON key.
Expand All @@ -24,7 +25,7 @@ def self.acceptable_attributes
# Attribute type mapping.
def self.types_mapping
{
:banners => :"Banners"
:banners => :"Array<Banner>"
}
end

Expand Down Expand Up @@ -56,7 +57,9 @@ def initialize(attributes = {})
}

if attributes.key?(:banners)
self.banners = attributes[:banners]
if (value = attributes[:banners]).is_a?(Array)
self.banners = value
end
end
end

Expand Down
6 changes: 4 additions & 2 deletions lib/algolia/models/search/banner_image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def self.acceptable_attributes
# Attribute type mapping.
def self.types_mapping
{
:urls => :"BannerImageUrl",
:urls => :"Array<BannerImageUrl>",
:title => :"String"
}
end
Expand Down Expand Up @@ -63,7 +63,9 @@ def initialize(attributes = {})
}

if attributes.key?(:urls)
self.urls = attributes[:urls]
if (value = attributes[:urls]).is_a?(Array)
self.urls = value
end
end

if attributes.key?(:title)
Expand Down
Loading

0 comments on commit b585fd6

Please sign in to comment.