Class: Lithic::Models::AuthRules::AuthRule

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/lithic/models/auth_rules/auth_rule.rb,
sig/lithic/models/auth_rules/auth_rule.rbs

Overview

See Also:

  • Lithic::Resources::AuthRules::V2#create

Defined Under Namespace

Modules: State, Type Classes: CurrentVersion, DraftVersion

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(token:, account_tokens:, business_account_tokens:, card_tokens:, current_version:, draft_version:, event_stream:, lithic_managed:, name:, program_level:, state:, type:, excluded_account_tokens: nil, excluded_business_account_tokens: nil, excluded_card_tokens: nil) ⇒ Object

Some parameter documentations has been truncated, see Lithic::Models::AuthRules::AuthRule for more details.

Parameters:

  • token (String) —

    Auth Rule Token

  • account_tokens (Array<String>) —

    Account tokens to which the Auth Rule applies.

  • business_account_tokens (Array<String>) —

    Business Account tokens to which the Auth Rule applies.

  • card_tokens (Array<String>) —

    Card tokens to which the Auth Rule applies.

  • current_version (Lithic::Models::AuthRules::AuthRule::CurrentVersion, nil)
  • draft_version (Lithic::Models::AuthRules::AuthRule::DraftVersion, nil)
  • event_stream (Symbol, Lithic::Models::AuthRules::EventStream) —

    The event stream during which the rule will be evaluated.

  • lithic_managed (Boolean) —

    Indicates whether this auth rule is managed by Lithic. If true, the rule cannot

  • name (String, nil) —

    Auth Rule Name

  • program_level (Boolean) —

    Whether the Auth Rule applies to all authorizations on the card program.

  • state (Symbol, Lithic::Models::AuthRules::AuthRule::State) —

    The state of the Auth Rule

  • type (Symbol, Lithic::Models::AuthRules::AuthRule::Type) —

    The type of Auth Rule. For certain rule types, this determines the event stream

  • excluded_account_tokens (Array<String>) (defaults to: nil) —

    Account tokens to which the Auth Rule does not apply.

  • excluded_business_account_tokens (Array<String>) (defaults to: nil) —

    Business account tokens to which the Auth Rule does not apply.

  • excluded_card_tokens (Array<String>) (defaults to: nil) —

    Card tokens to which the Auth Rule does not apply.



# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 113


Instance Attribute Details

#account_tokens ⇒ Array<String>

Account tokens to which the Auth Rule applies.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


18
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 18

required :account_tokens, Lithic::Internal::Type::ArrayOf[String]

#business_account_tokens ⇒ Array<String>

Business Account tokens to which the Auth Rule applies.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


24
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 24

required :business_account_tokens, Lithic::Internal::Type::ArrayOf[String]

#card_tokens ⇒ Array<String>

Card tokens to which the Auth Rule applies.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


30
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 30

required :card_tokens, Lithic::Internal::Type::ArrayOf[String]

#current_version ⇒ Lithic::Models::AuthRules::AuthRule::CurrentVersion?

Parameters:

  • value (Lithic::AuthRules::AuthRule::CurrentVersion, nil)

Returns:



35
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 35

required :current_version, -> { Lithic::AuthRules::AuthRule::CurrentVersion }, nil?: true

#draft_version ⇒ Lithic::Models::AuthRules::AuthRule::DraftVersion?

Parameters:

  • value (Lithic::AuthRules::AuthRule::DraftVersion, nil)

Returns:



40
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 40

required :draft_version, -> { Lithic::AuthRules::AuthRule::DraftVersion }, nil?: true

#event_stream ⇒ Symbol, Lithic::Models::AuthRules::EventStream

The event stream during which the rule will be evaluated.

Parameters:

  • value (Lithic::Models::AuthRules::event_stream)

Returns:



46
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 46

required :event_stream, enum: -> { Lithic::AuthRules::EventStream }

#excluded_account_tokens ⇒ Array<String>?

Account tokens to which the Auth Rule does not apply.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


99
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 99

optional :excluded_account_tokens, Lithic::Internal::Type::ArrayOf[String]

#excluded_business_account_tokens ⇒ Array<String>?

Business account tokens to which the Auth Rule does not apply.

Returns:

  • (Array<String>, nil)


105
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 105

optional :excluded_business_account_tokens, Lithic::Internal::Type::ArrayOf[String]

#excluded_card_tokens ⇒ Array<String>?

Card tokens to which the Auth Rule does not apply.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


111
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 111

optional :excluded_card_tokens, Lithic::Internal::Type::ArrayOf[String]

#lithic_managed ⇒ Boolean

Indicates whether this auth rule is managed by Lithic. If true, the rule cannot be modified or deleted by the user

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


53
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 53

required :lithic_managed, Lithic::Internal::Type::Boolean

#name ⇒ String?

Auth Rule Name

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


59
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 59

required :name, String, nil?: true

#program_level ⇒ Boolean

Whether the Auth Rule applies to all authorizations on the card program.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


65
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 65

required :program_level, Lithic::Internal::Type::Boolean

#state ⇒ Symbol, Lithic::Models::AuthRules::AuthRule::State

The state of the Auth Rule

Parameters:

  • value (Lithic::Models::AuthRules::AuthRule::state)

Returns:



71
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 71

required :state, enum: -> { Lithic::AuthRules::AuthRule::State }

#token ⇒ String

Auth Rule Token

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 12

required :token, String

#type ⇒ Symbol, Lithic::Models::AuthRules::AuthRule::Type

The type of Auth Rule. For certain rule types, this determines the event stream during which it will be evaluated. For rules that can be applied to one of several event streams, the effective one is defined by the separate event_stream field.

  • CONDITIONAL_BLOCK: Deprecated. Use CONDITIONAL_ACTION instead. AUTHORIZATION event stream.
  • VELOCITY_LIMIT: AUTHORIZATION event stream.
  • MERCHANT_LOCK: AUTHORIZATION event stream.
  • CONDITIONAL_ACTION: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or ACH_PAYMENT_UPDATE event stream.
  • TYPESCRIPT_CODE: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, CARD_TRANSACTION_UPDATE, or ACH_PAYMENT_UPDATE event stream.
  • OTHER: A rule whose type is not exposed through this API. Rules of this type are read-only; OTHER cannot be used when creating a rule.

Parameters:

  • value (Lithic::Models::AuthRules::AuthRule::type_)

Returns:



93
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 93

required :type, enum: -> { Lithic::AuthRules::AuthRule::Type }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 311


.variants ⇒ Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::ConditionalACHPaymentUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, Lithic::Models::AuthRules::ConditionalAuthorizationAdjustmentParameters)



# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 202


Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


82
# File 'sig/lithic/models/auth_rules/auth_rule.rbs', line 82

def to_hash: -> {