lib/docusign/model/conditional_recipient_rule.ex

# NOTE: This file is auto generated by OpenAPI Generator 6.4.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 [Poison.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
        }
end

defimpl Poison.Decoder, for: DocuSign.Model.ConditionalRecipientRule do
  import DocuSign.Deserializer

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