Current section

Files

Jump to
docusign lib docusign model plan_information.ex
Raw

lib/docusign/model/plan_information.ex

# NOTE: This file is auto generated by OpenAPI Generator
# https://openapi-generator.tech
# Do not edit this file manually.
defmodule DocuSign.Model.PlanInformation do
@moduledoc """
An object used to identify the features and attributes of the account being created.
"""
alias DocuSign.Deserializer
alias DocuSign.Model.AddOn
alias DocuSign.Model.FeatureSet
alias DocuSign.Model.RecipientDomain
defstruct [
:addOns,
:currencyCode,
:freeTrialDaysOverride,
:planFeatureSets,
:planId,
:recipientDomains
]
@doc false
defimpl Jason.Encoder, for: __MODULE__ do
def encode(struct, opts) do
struct
|> Map.from_struct()
|> Enum.reject(fn {_k, v} -> is_nil(v) end)
|> Map.new()
|> Jason.Encode.map(opts)
end
end
@type t :: %__MODULE__{
:addOns => [AddOn.t()] | nil,
:currencyCode => String.t() | nil,
:freeTrialDaysOverride => String.t() | nil,
:planFeatureSets => [FeatureSet.t()] | nil,
:planId => String.t() | nil,
:recipientDomains => [RecipientDomain.t()] | nil
}
def decode(value) do
value
|> Deserializer.deserialize(
:addOns,
:list,
AddOn
)
|> Deserializer.deserialize(
:planFeatureSets,
:list,
FeatureSet
)
|> Deserializer.deserialize(
:recipientDomains,
:list,
RecipientDomain
)
|> then(&struct(__MODULE__, &1))
end
end