Current section

Files

Jump to
docusign lib docusign model recipient_identity_phone_number.ex
Raw

lib/docusign/model/recipient_identity_phone_number.ex

# NOTE: This file is auto generated by OpenAPI Generator
# https://openapi-generator.tech
# Do not edit this file manually.
defmodule DocuSign.Model.RecipientIdentityPhoneNumber do
@moduledoc """
"""
alias DocuSign.Deserializer
alias DocuSign.Model.PropertyMetadata
defstruct [
:countryCode,
:countryCodeLock,
:countryCodeMetadata,
:extension,
:extensionMetadata,
:number,
:numberMetadata
]
@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__{
:countryCode => String.t() | nil,
:countryCodeLock => String.t() | nil,
:countryCodeMetadata => PropertyMetadata.t() | nil,
:extension => String.t() | nil,
:extensionMetadata => PropertyMetadata.t() | nil,
:number => String.t() | nil,
:numberMetadata => PropertyMetadata.t() | nil
}
def decode(value) do
value
|> Deserializer.deserialize(
:countryCodeMetadata,
:struct,
PropertyMetadata
)
|> Deserializer.deserialize(
:extensionMetadata,
:struct,
PropertyMetadata
)
|> Deserializer.deserialize(
:numberMetadata,
:struct,
PropertyMetadata
)
|> then(&struct(__MODULE__, &1))
end
end