|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +module Lithic |
| 4 | + module Models |
| 5 | + module AuthRules |
| 6 | + class AuthRuleVersion < Lithic::Internal::Type::BaseModel |
| 7 | + # @!attribute created |
| 8 | + # Timestamp of when this version was created. |
| 9 | + # |
| 10 | + # @return [Time] |
| 11 | + required :created, Time |
| 12 | + |
| 13 | + # @!attribute parameters |
| 14 | + # Parameters for the Auth Rule |
| 15 | + # |
| 16 | + # @return [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::TypescriptCodeParameters] |
| 17 | + required :parameters, union: -> { Lithic::AuthRules::AuthRuleVersion::Parameters } |
| 18 | + |
| 19 | + # @!attribute state |
| 20 | + # The current state of this version. |
| 21 | + # |
| 22 | + # @return [Symbol, Lithic::Models::AuthRules::AuthRuleVersion::State] |
| 23 | + required :state, enum: -> { Lithic::AuthRules::AuthRuleVersion::State } |
| 24 | + |
| 25 | + response_only do |
| 26 | + # @!attribute version |
| 27 | + # The version of the rule, this is incremented whenever the rule's parameters |
| 28 | + # change. |
| 29 | + # |
| 30 | + # @return [Integer] |
| 31 | + required :version, Integer |
| 32 | + end |
| 33 | + |
| 34 | + # @!method initialize(created:, parameters:, state:, version:) |
| 35 | + # Some parameter documentations has been truncated, see |
| 36 | + # {Lithic::Models::AuthRules::AuthRuleVersion} for more details. |
| 37 | + # |
| 38 | + # @param created [Time] Timestamp of when this version was created. |
| 39 | + # |
| 40 | + # @param parameters [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::TypescriptCodeParameters] Parameters for the Auth Rule |
| 41 | + # |
| 42 | + # @param state [Symbol, Lithic::Models::AuthRules::AuthRuleVersion::State] The current state of this version. |
| 43 | + # |
| 44 | + # @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan |
| 45 | + |
| 46 | + # Parameters for the Auth Rule |
| 47 | + # |
| 48 | + # @see Lithic::Models::AuthRules::AuthRuleVersion#parameters |
| 49 | + module Parameters |
| 50 | + extend Lithic::Internal::Type::Union |
| 51 | + |
| 52 | + # Deprecated: Use CONDITIONAL_ACTION instead. |
| 53 | + variant -> { Lithic::AuthRules::ConditionalBlockParameters } |
| 54 | + |
| 55 | + variant -> { Lithic::AuthRules::VelocityLimitParams } |
| 56 | + |
| 57 | + variant -> { Lithic::AuthRules::MerchantLockParameters } |
| 58 | + |
| 59 | + variant -> { Lithic::AuthRules::Conditional3DSActionParameters } |
| 60 | + |
| 61 | + variant -> { Lithic::AuthRules::ConditionalAuthorizationActionParameters } |
| 62 | + |
| 63 | + variant -> { Lithic::AuthRules::ConditionalACHActionParameters } |
| 64 | + |
| 65 | + variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } |
| 66 | + |
| 67 | + # Parameters for defining a TypeScript code rule |
| 68 | + variant -> { Lithic::AuthRules::TypescriptCodeParameters } |
| 69 | + |
| 70 | + # @!method self.variants |
| 71 | + # @return [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::TypescriptCodeParameters)] |
| 72 | + end |
| 73 | + |
| 74 | + # The current state of this version. |
| 75 | + # |
| 76 | + # @see Lithic::Models::AuthRules::AuthRuleVersion#state |
| 77 | + module State |
| 78 | + extend Lithic::Internal::Type::Enum |
| 79 | + |
| 80 | + ACTIVE = :ACTIVE |
| 81 | + SHADOW = :SHADOW |
| 82 | + INACTIVE = :INACTIVE |
| 83 | + |
| 84 | + # @!method self.values |
| 85 | + # @return [Array<Symbol>] |
| 86 | + end |
| 87 | + end |
| 88 | + end |
| 89 | + |
| 90 | + AuthRuleVersion = AuthRules::AuthRuleVersion |
| 91 | + end |
| 92 | +end |
0 commit comments