Current section

Files

Jump to
docusign lib docusign model workflow_step.ex
Raw

lib/docusign/model/workflow_step.ex

# NOTE: This file is auto generated by OpenAPI Generator
# https://openapi-generator.tech
# Do not edit this file manually.
defmodule DocuSign.Model.WorkflowStep do
@moduledoc """
Describes a single step in a workflow.
"""
alias DocuSign.Deserializer
alias DocuSign.Model.DelayedRouting
alias DocuSign.Model.RecipientRouting
defstruct [
:action,
:completedDate,
:delayedRouting,
:itemId,
:recipientRouting,
:status,
:triggerOnItem,
:triggeredDate,
:workflowStepId
]
@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__{
:action => String.t() | nil,
:completedDate => String.t() | nil,
:delayedRouting => DelayedRouting.t() | nil,
:itemId => String.t() | nil,
:recipientRouting => RecipientRouting.t() | nil,
:status => String.t() | nil,
:triggerOnItem => String.t() | nil,
:triggeredDate => String.t() | nil,
:workflowStepId => String.t() | nil
}
def decode(value) do
value
|> Deserializer.deserialize(
:delayedRouting,
:struct,
DelayedRouting
)
|> Deserializer.deserialize(
:recipientRouting,
:struct,
RecipientRouting
)
|> then(&struct(__MODULE__, &1))
end
end