lib/google_api/content/v21/model/repricing_rule_report.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.RepricingRuleReport do
  @moduledoc """
  Resource that represents a daily Repricing rule report. Next ID: 11

  ## Attributes

  *   `buyboxWinningRuleStats` (*type:* `GoogleApi.Content.V21.Model.RepricingRuleReportBuyboxWinningRuleStats.t`, *default:* `nil`) - Stats specific to buybox winning rules for rule report (deprecated).
  *   `date` (*type:* `GoogleApi.Content.V21.Model.Date.t`, *default:* `nil`) - Date of the stats in this report. The report starts and ends according to the merchant's timezone.
  *   `impactedProducts` (*type:* `list(String.t)`, *default:* `nil`) - List of product ids that are impacted by this rule during this reporting period. Out of stock products and products not searched for by customers are examples of non-impacted products.
  *   `inapplicabilityDetails` (*type:* `list(GoogleApi.Content.V21.Model.InapplicabilityDetails.t)`, *default:* `nil`) - List of all reasons the rule did not apply to the inapplicable products during the specified reporting period.
  *   `inapplicableProducts` (*type:* `list(String.t)`, *default:* `nil`) - List of product ids that are inapplicable to this rule during this reporting period. To get the inapplicable reason for a specific product, see RepricingProductReport.
  *   `orderItemCount` (*type:* `integer()`, *default:* `nil`) - Total unit count of impacted products ordered while the rule was active on the date of the report. This count includes all orders that were started while the rule was active, even if the rule was no longer active when the order was completed.
  *   `ruleId` (*type:* `String.t`, *default:* `nil`) - Id of the Repricing rule for this report.
  *   `totalGmv` (*type:* `GoogleApi.Content.V21.Model.PriceAmount.t`, *default:* `nil`) - Total GMV generated by impacted products while the rule was active on the date of the report. This value includes all orders that were started while the rule was active, even if the rule was no longer active when the order was completed.
  *   `type` (*type:* `String.t`, *default:* `nil`) - Type of the rule.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :buyboxWinningRuleStats =>
            GoogleApi.Content.V21.Model.RepricingRuleReportBuyboxWinningRuleStats.t() | nil,
          :date => GoogleApi.Content.V21.Model.Date.t() | nil,
          :impactedProducts => list(String.t()) | nil,
          :inapplicabilityDetails =>
            list(GoogleApi.Content.V21.Model.InapplicabilityDetails.t()) | nil,
          :inapplicableProducts => list(String.t()) | nil,
          :orderItemCount => integer() | nil,
          :ruleId => String.t() | nil,
          :totalGmv => GoogleApi.Content.V21.Model.PriceAmount.t() | nil,
          :type => String.t() | nil
        }

  field(:buyboxWinningRuleStats,
    as: GoogleApi.Content.V21.Model.RepricingRuleReportBuyboxWinningRuleStats
  )

  field(:date, as: GoogleApi.Content.V21.Model.Date)
  field(:impactedProducts, type: :list)

  field(:inapplicabilityDetails,
    as: GoogleApi.Content.V21.Model.InapplicabilityDetails,
    type: :list
  )

  field(:inapplicableProducts, type: :list)
  field(:orderItemCount)
  field(:ruleId)
  field(:totalGmv, as: GoogleApi.Content.V21.Model.PriceAmount)
  field(:type)
end

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

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