# 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.MyBusinessLodging.V1.Model.PaymentOptions do
  @moduledoc """
  Forms of payment accepted at the property.

  ## Attributes

  *   `cash` (*type:* `boolean()`, *default:* `nil`) - Cash. The hotel accepts payment by paper/coin currency.
  *   `cashException` (*type:* `String.t`, *default:* `nil`) - Cash exception.
  *   `cheque` (*type:* `boolean()`, *default:* `nil`) - Cheque. The hotel accepts a printed document issued by the guest's bank in the guest's name as a form of payment.
  *   `chequeException` (*type:* `String.t`, *default:* `nil`) - Cheque exception.
  *   `creditCard` (*type:* `boolean()`, *default:* `nil`) - Credit card. The hotel accepts payment by a card issued by a bank or credit card company. Also known as charge card, debit card, bank card, or charge plate.
  *   `creditCardException` (*type:* `String.t`, *default:* `nil`) - Credit card exception.
  *   `debitCard` (*type:* `boolean()`, *default:* `nil`) - Debit card. The hotel accepts a bank-issued card that immediately deducts the charged funds from the guest's bank account upon processing.
  *   `debitCardException` (*type:* `String.t`, *default:* `nil`) - Debit card exception.
  *   `mobileNfc` (*type:* `boolean()`, *default:* `nil`) - Mobile nfc. The hotel has the compatible computer hardware terminal that reads and charges a payment app on the guest's smartphone without requiring the two devices to make physical contact. Also known as Apple Pay, Google Pay, Samsung Pay.
  *   `mobileNfcException` (*type:* `String.t`, *default:* `nil`) - Mobile nfc exception.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :cash => boolean() | nil,
          :cashException => String.t() | nil,
          :cheque => boolean() | nil,
          :chequeException => String.t() | nil,
          :creditCard => boolean() | nil,
          :creditCardException => String.t() | nil,
          :debitCard => boolean() | nil,
          :debitCardException => String.t() | nil,
          :mobileNfc => boolean() | nil,
          :mobileNfcException => String.t() | nil
        }

  field(:cash)
  field(:cashException)
  field(:cheque)
  field(:chequeException)
  field(:creditCard)
  field(:creditCardException)
  field(:debitCard)
  field(:debitCardException)
  field(:mobileNfc)
  field(:mobileNfcException)
end

defimpl Poison.Decoder, for: GoogleApi.MyBusinessLodging.V1.Model.PaymentOptions do
  def decode(value, options) do
    GoogleApi.MyBusinessLodging.V1.Model.PaymentOptions.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.MyBusinessLodging.V1.Model.PaymentOptions do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
