# NOTE: This file is auto generated by OpenAPI Generator # https://openapi-generator.tech # Do not edit this file manually. defmodule DocuSign.Model.PaymentGatewayAccounts do @moduledoc """ Information about a connected payment gateway account. """ alias DocuSign.Deserializer alias DocuSign.Model.PaymentGatewayAccountSetting alias DocuSign.Model.PaymentMethodWithOptions alias DocuSign.Model.PayPalLegacySettings defstruct [ :allowCustomMetadata, :config, :displayName, :isEnabled, :isLegacy, :lastModified, :paymentGateway, :paymentGatewayAccountId, :paymentGatewayDisplayName, :payPalLegacySettings, :supportedCurrencies, :supportedPaymentMethods, :supportedPaymentMethodsWithOptions, :zeroDecimalCurrencies ] @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__{ :allowCustomMetadata => boolean() | nil, :config => PaymentGatewayAccountSetting.t() | nil, :displayName => String.t() | nil, :isEnabled => String.t() | nil, :isLegacy => String.t() | nil, :lastModified => String.t() | nil, :paymentGateway => String.t() | nil, :paymentGatewayAccountId => String.t() | nil, :paymentGatewayDisplayName => String.t() | nil, :payPalLegacySettings => PayPalLegacySettings.t() | nil, :supportedCurrencies => [String.t()] | nil, :supportedPaymentMethods => [String.t()] | nil, :supportedPaymentMethodsWithOptions => [PaymentMethodWithOptions.t()] | nil, :zeroDecimalCurrencies => [String.t()] | nil } def decode(value) do value |> Deserializer.deserialize( :config, :struct, PaymentGatewayAccountSetting ) |> Deserializer.deserialize( :payPalLegacySettings, :struct, PayPalLegacySettings ) |> Deserializer.deserialize( :supportedPaymentMethodsWithOptions, :list, PaymentMethodWithOptions ) |> then(&struct(__MODULE__, &1)) end end