lib/google_api/content/v21/model/account_item_updates_settings.ex

# 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.AccountItemUpdatesSettings do
  @moduledoc """
  Settings for the Automatic Item Updates.

  ## Attributes

  *   `allowAvailabilityUpdates` (*type:* `boolean()`, *default:* `nil`) - If availability updates are enabled, any previous availability values get overwritten if Google finds an out-of-stock annotation on the offer's page. If additionally `allow_availability_updates` field is set to true, values get overwritten if Google finds an in-stock annotation on the offer’s page.
  *   `allowPriceUpdates` (*type:* `boolean()`, *default:* `nil`) - If price updates are enabled, Google always updates the active price with the crawled information.
  *   `allowStrictAvailabilityUpdates` (*type:* `boolean()`, *default:* `nil`) - If allow_availability_updates is enabled, items are automatically updated in all your Shopping target countries. By default, availability updates will only be applied to items that are 'out of stock' on your website but 'in stock' on Shopping. Set this to true to also update items that are 'in stock' on your website, but 'out of stock' on Google Shopping. In order for this field to have an effect, you must also allow availability updates.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :allowAvailabilityUpdates => boolean() | nil,
          :allowPriceUpdates => boolean() | nil,
          :allowStrictAvailabilityUpdates => boolean() | nil
        }

  field(:allowAvailabilityUpdates)
  field(:allowPriceUpdates)
  field(:allowStrictAvailabilityUpdates)
end

defimpl Poison.Decoder, for: GoogleApi.Content.V21.Model.AccountItemUpdatesSettings do
  def decode(value, options) do
    GoogleApi.Content.V21.Model.AccountItemUpdatesSettings.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Content.V21.Model.AccountItemUpdatesSettings do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end