lib/docusign/model/billing_plans.ex

# NOTE: This file is auto generated by OpenAPI Generator 7.12.0 (https://openapi-generator.tech).
# Do not edit this file manually.

defmodule DocuSign.Model.BillingPlans do
  @moduledoc """
  Billing plans
  """

  @derive Jason.Encoder
  defstruct [
    :billingAddress,
    :billingAddressIsCreditCardAddress,
    :billingPlan,
    :creditCardInformation,
    :directDebitProcessorInformation,
    :downgradePlanInformation,
    :downgradeRequestInformation,
    :entityInformation,
    :paymentMethod,
    :paymentProcessorInformation,
    :referralInformation,
    :successorPlans,
    :taxExemptId
  ]

  @type t :: %__MODULE__{
          :billingAddress => DocuSign.Model.AccountAddress.t() | nil,
          :billingAddressIsCreditCardAddress => String.t() | nil,
          :billingPlan => DocuSign.Model.AccountBillingPlan.t() | nil,
          :creditCardInformation => DocuSign.Model.CreditCardInformation.t() | nil,
          :directDebitProcessorInformation =>
            DocuSign.Model.DirectDebitProcessorInformation.t() | nil,
          :downgradePlanInformation => DocuSign.Model.DowngradePlanUpdateResponse.t() | nil,
          :downgradeRequestInformation => DocuSign.Model.DowngradeRequestInformation.t() | nil,
          :entityInformation => DocuSign.Model.BillingEntityInformationResponse.t() | nil,
          :paymentMethod => String.t() | nil,
          :paymentProcessorInformation => DocuSign.Model.PaymentProcessorInformation.t() | nil,
          :referralInformation => DocuSign.Model.ReferralInformation.t() | nil,
          :successorPlans => [DocuSign.Model.BillingPlan.t()] | nil,
          :taxExemptId => String.t() | nil
        }

  alias DocuSign.Deserializer

  def decode(value) do
    value
    |> Deserializer.deserialize(:billingAddress, :struct, DocuSign.Model.AccountAddress)
    |> Deserializer.deserialize(:billingPlan, :struct, DocuSign.Model.AccountBillingPlan)
    |> Deserializer.deserialize(
      :creditCardInformation,
      :struct,
      DocuSign.Model.CreditCardInformation
    )
    |> Deserializer.deserialize(
      :directDebitProcessorInformation,
      :struct,
      DocuSign.Model.DirectDebitProcessorInformation
    )
    |> Deserializer.deserialize(
      :downgradePlanInformation,
      :struct,
      DocuSign.Model.DowngradePlanUpdateResponse
    )
    |> Deserializer.deserialize(
      :downgradeRequestInformation,
      :struct,
      DocuSign.Model.DowngradeRequestInformation
    )
    |> Deserializer.deserialize(
      :entityInformation,
      :struct,
      DocuSign.Model.BillingEntityInformationResponse
    )
    |> Deserializer.deserialize(
      :paymentProcessorInformation,
      :struct,
      DocuSign.Model.PaymentProcessorInformation
    )
    |> Deserializer.deserialize(:referralInformation, :struct, DocuSign.Model.ReferralInformation)
    |> Deserializer.deserialize(:successorPlans, :list, DocuSign.Model.BillingPlan)
  end
end