lib/google_api/content/v2/model/test_order_line_item.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.V2.Model.TestOrderLineItem do
  @moduledoc """


  ## Attributes

  *   `product` (*type:* `GoogleApi.Content.V2.Model.TestOrderLineItemProduct.t`, *default:* `nil`) - Required. Product data from the time of the order placement.
  *   `quantityOrdered` (*type:* `integer()`, *default:* `nil`) - Required. Number of items ordered.
  *   `returnInfo` (*type:* `GoogleApi.Content.V2.Model.OrderLineItemReturnInfo.t`, *default:* `nil`) - Required. Details of the return policy for the line item.
  *   `shippingDetails` (*type:* `GoogleApi.Content.V2.Model.OrderLineItemShippingDetails.t`, *default:* `nil`) - Required. Details of the requested shipping for the line item.
  *   `unitTax` (*type:* `GoogleApi.Content.V2.Model.Price.t`, *default:* `nil`) - Deprecated. Ignored if provided.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :product => GoogleApi.Content.V2.Model.TestOrderLineItemProduct.t() | nil,
          :quantityOrdered => integer() | nil,
          :returnInfo => GoogleApi.Content.V2.Model.OrderLineItemReturnInfo.t() | nil,
          :shippingDetails => GoogleApi.Content.V2.Model.OrderLineItemShippingDetails.t() | nil,
          :unitTax => GoogleApi.Content.V2.Model.Price.t() | nil
        }

  field(:product, as: GoogleApi.Content.V2.Model.TestOrderLineItemProduct)
  field(:quantityOrdered)
  field(:returnInfo, as: GoogleApi.Content.V2.Model.OrderLineItemReturnInfo)
  field(:shippingDetails, as: GoogleApi.Content.V2.Model.OrderLineItemShippingDetails)
  field(:unitTax, as: GoogleApi.Content.V2.Model.Price)
end

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

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