From 6a30703e2686dbdc0652743350bfc32c4332ba91 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 18 Dec 2024 13:13:21 +0000 Subject: [PATCH] feat: Automated regeneration of Content client --- clients/content/README.md | 2 +- .../lib/google_api/content/v21/metadata.ex | 2 +- .../google_api/content/v21/model/product.ex | 9 ++++ .../model/product_sustainability_incentive.ex | 52 +++++++++++++++++++ clients/content/mix.exs | 2 +- 5 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 clients/content/lib/google_api/content/v21/model/product_sustainability_incentive.ex diff --git a/clients/content/README.md b/clients/content/README.md index 71a593da12..cfbcd1a90d 100644 --- a/clients/content/README.md +++ b/clients/content/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_content, "~> 0.72"}] + [{:google_api_content, "~> 0.73"}] end ``` diff --git a/clients/content/lib/google_api/content/v21/metadata.ex b/clients/content/lib/google_api/content/v21/metadata.ex index 55c661b8b0..8e08c0ecf2 100644 --- a/clients/content/lib/google_api/content/v21/metadata.ex +++ b/clients/content/lib/google_api/content/v21/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Content.V21 do API client metadata for GoogleApi.Content.V21. """ - @discovery_revision "20241120" + @discovery_revision "20241217" def discovery_revision(), do: @discovery_revision end diff --git a/clients/content/lib/google_api/content/v21/model/product.ex b/clients/content/lib/google_api/content/v21/model/product.ex index 23fe61c800..8e0db5c905 100644 --- a/clients/content/lib/google_api/content/v21/model/product.ex +++ b/clients/content/lib/google_api/content/v21/model/product.ex @@ -95,6 +95,7 @@ defmodule GoogleApi.Content.V21.Model.Product do * `productHighlights` (*type:* `list(String.t)`, *default:* `nil`) - Bullet points describing the most relevant highlights of a product. * `sizeType` (*type:* `String.t`, *default:* `nil`) - The cut of the item. Recommended for apparel items. * `customAttributes` (*type:* `list(GoogleApi.Content.V21.Model.CustomAttribute.t)`, *default:* `nil`) - A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form (for example, `{ "name": "size type", "value": "regular" }`). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google (formerly known as Shopping Actions). + * `sustainabilityIncentives` (*type:* `list(GoogleApi.Content.V21.Model.ProductSustainabilityIncentive.t)`, *default:* `nil`) - Optional. The list of sustainability incentive programs. * `pickupSla` (*type:* `String.t`, *default:* `nil`) - Item store pickup timeline. Acceptable values are: - "`same day`" - "`next day`" - "`2-day`" - "`3-day`" - "`4-day`" - "`5-day`" - "`6-day`" - "`7-day`" - "`multi-week`" * `expirationDate` (*type:* `String.t`, *default:* `nil`) - Date on which the item should expire, as specified upon insertion, in ISO 8601 format. The actual expiration date in Google Shopping is exposed in `productstatuses` as `googleExpirationDate` and might be earlier if `expirationDate` is too far in the future. * `channel` (*type:* `String.t`, *default:* `nil`) - Required. The item's channel (online or local). Acceptable values are: - "`local`" - "`online`" @@ -205,6 +206,8 @@ defmodule GoogleApi.Content.V21.Model.Product do :productHighlights => list(String.t()) | nil, :sizeType => String.t() | nil, :customAttributes => list(GoogleApi.Content.V21.Model.CustomAttribute.t()) | nil, + :sustainabilityIncentives => + list(GoogleApi.Content.V21.Model.ProductSustainabilityIncentive.t()) | nil, :pickupSla => String.t() | nil, :expirationDate => String.t() | nil, :channel => String.t() | nil, @@ -317,6 +320,12 @@ defmodule GoogleApi.Content.V21.Model.Product do field(:productHighlights, type: :list) field(:sizeType) field(:customAttributes, as: GoogleApi.Content.V21.Model.CustomAttribute, type: :list) + + field(:sustainabilityIncentives, + as: GoogleApi.Content.V21.Model.ProductSustainabilityIncentive, + type: :list + ) + field(:pickupSla) field(:expirationDate) field(:channel) diff --git a/clients/content/lib/google_api/content/v21/model/product_sustainability_incentive.ex b/clients/content/lib/google_api/content/v21/model/product_sustainability_incentive.ex new file mode 100644 index 0000000000..e3dbd71116 --- /dev/null +++ b/clients/content/lib/google_api/content/v21/model/product_sustainability_incentive.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Content.V21.Model.ProductSustainabilityIncentive do + @moduledoc """ + Information regarding sustainability related incentive programs such as rebates or tax relief. + + ## Attributes + + * `amount` (*type:* `GoogleApi.Content.V21.Model.Price.t`, *default:* `nil`) - Optional. The fixed amount of the incentive. + * `percentage` (*type:* `float()`, *default:* `nil`) - Optional. The percentage of the sale price that the incentive is applied to. + * `type` (*type:* `String.t`, *default:* `nil`) - Required. Sustainability incentive program. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :amount => GoogleApi.Content.V21.Model.Price.t() | nil, + :percentage => float() | nil, + :type => String.t() | nil + } + + field(:amount, as: GoogleApi.Content.V21.Model.Price) + field(:percentage) + field(:type) +end + +defimpl Poison.Decoder, for: GoogleApi.Content.V21.Model.ProductSustainabilityIncentive do + def decode(value, options) do + GoogleApi.Content.V21.Model.ProductSustainabilityIncentive.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Content.V21.Model.ProductSustainabilityIncentive do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/content/mix.exs b/clients/content/mix.exs index 025404c9d7..96d0f81a2b 100644 --- a/clients/content/mix.exs +++ b/clients/content/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.Content.Mixfile do use Mix.Project - @version "0.72.1" + @version "0.73.0" def project() do [