lib/docusign/model/conditional_recipient_rule.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.ConditionalRecipientRule do
  @moduledoc """
  A rule that defines a set of recipients and the conditions under which they will be used for the envelope.
  """

  @derive Jason.Encoder
  defstruct [
    :conditions,
    :order,
    :recipientGroup,
    :recipientId
  ]

  @type t :: %__MODULE__{
          :conditions => [DocuSign.Model.ConditionalRecipientRuleCondition.t()] | nil,
          :order => String.t() | nil,
          :recipientGroup => DocuSign.Model.RecipientGroup.t() | nil,
          :recipientId => String.t() | nil
        }

  alias DocuSign.Deserializer

  def decode(value) do
    value
    |> Deserializer.deserialize(
      :conditions,
      :list,
      DocuSign.Model.ConditionalRecipientRuleCondition
    )
    |> Deserializer.deserialize(:recipientGroup, :struct, DocuSign.Model.RecipientGroup)
  end
end