lib/google_api/content/v21/model/return_pricing_info.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.ReturnPricingInfo do
  @moduledoc """


  ## Attributes

  *   `chargeReturnShippingFee` (*type:* `boolean()`, *default:* `nil`) - Default option for whether merchant should charge the customer for return shipping costs, based on customer selected return reason and merchant's return policy for the items being returned.
  *   `maxReturnShippingFee` (*type:* `GoogleApi.Content.V21.Model.MonetaryAmount.t`, *default:* `nil`) - Maximum return shipping costs that may be charged to the customer depending on merchant's assessment of the return reason and the merchant's return policy for the items being returned.
  *   `refundableItemsTotalAmount` (*type:* `GoogleApi.Content.V21.Model.MonetaryAmount.t`, *default:* `nil`) - Total amount that can be refunded for the items in this return. It represents the total amount received by the merchant for the items, after applying merchant coupons.
  *   `refundableShippingAmount` (*type:* `GoogleApi.Content.V21.Model.MonetaryAmount.t`, *default:* `nil`) - Maximum amount that can be refunded for the original shipping fee.
  *   `totalRefundedAmount` (*type:* `GoogleApi.Content.V21.Model.MonetaryAmount.t`, *default:* `nil`) - Total amount already refunded by the merchant. It includes all types of refunds (items, shipping, etc.) Not provided if no refund has been applied yet.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :chargeReturnShippingFee => boolean() | nil,
          :maxReturnShippingFee => GoogleApi.Content.V21.Model.MonetaryAmount.t() | nil,
          :refundableItemsTotalAmount => GoogleApi.Content.V21.Model.MonetaryAmount.t() | nil,
          :refundableShippingAmount => GoogleApi.Content.V21.Model.MonetaryAmount.t() | nil,
          :totalRefundedAmount => GoogleApi.Content.V21.Model.MonetaryAmount.t() | nil
        }

  field(:chargeReturnShippingFee)
  field(:maxReturnShippingFee, as: GoogleApi.Content.V21.Model.MonetaryAmount)
  field(:refundableItemsTotalAmount, as: GoogleApi.Content.V21.Model.MonetaryAmount)
  field(:refundableShippingAmount, as: GoogleApi.Content.V21.Model.MonetaryAmount)
  field(:totalRefundedAmount, as: GoogleApi.Content.V21.Model.MonetaryAmount)
end

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

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