Class: Lithic::Models::AuthRules::RuleStats::Example

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/lithic/models/auth_rules/rule_stats.rb

Defined Under Namespace

Modules: Decision

Instance Attribute 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(approved: nil, decision: nil, event_token: nil, timestamp: nil) ⇒ Object

Parameters:

  • approved (Boolean) (defaults to: nil)

    Whether the rule would have approved the request.

  • decision (Symbol, Lithic::Models::AuthRules::RuleStats::Example::Decision) (defaults to: nil)

    The decision made by the rule for this event.

  • event_token (String) (defaults to: nil)

    The event token.

  • timestamp (Time) (defaults to: nil)

    The timestamp of the event.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/lithic/models/auth_rules/rule_stats.rb', line 61

class Example < Lithic::Internal::Type::BaseModel
  # @!attribute approved
  #   Whether the rule would have approved the request.
  #
  #   @return [Boolean, nil]
  optional :approved, Lithic::Internal::Type::Boolean

  # @!attribute decision
  #   The decision made by the rule for this event.
  #
  #   @return [Symbol, Lithic::Models::AuthRules::RuleStats::Example::Decision, nil]
  optional :decision, enum: -> { Lithic::AuthRules::RuleStats::Example::Decision }

  # @!attribute event_token
  #   The event token.
  #
  #   @return [String, nil]
  optional :event_token, String

  # @!attribute timestamp
  #   The timestamp of the event.
  #
  #   @return [Time, nil]
  optional :timestamp, Time

  # @!method initialize(approved: nil, decision: nil, event_token: nil, timestamp: nil)
  #   @param approved [Boolean] Whether the rule would have approved the request.
  #
  #   @param decision [Symbol, Lithic::Models::AuthRules::RuleStats::Example::Decision] The decision made by the rule for this event.
  #
  #   @param event_token [String] The event token.
  #
  #   @param timestamp [Time] The timestamp of the event.

  # The decision made by the rule for this event.
  #
  # @see Lithic::Models::AuthRules::RuleStats::Example#decision
  module Decision
    extend Lithic::Internal::Type::Enum

    APPROVED = :APPROVED
    DECLINED = :DECLINED
    CHALLENGED = :CHALLENGED

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#approvedBoolean?

Whether the rule would have approved the request.

Returns:

  • (Boolean, nil)


66
# File 'lib/lithic/models/auth_rules/rule_stats.rb', line 66

optional :approved, Lithic::Internal::Type::Boolean

#decisionSymbol, ...

The decision made by the rule for this event.



72
# File 'lib/lithic/models/auth_rules/rule_stats.rb', line 72

optional :decision, enum: -> { Lithic::AuthRules::RuleStats::Example::Decision }

#event_tokenString?

The event token.

Returns:

  • (String, nil)


78
# File 'lib/lithic/models/auth_rules/rule_stats.rb', line 78

optional :event_token, String

#timestampTime?

The timestamp of the event.

Returns:

  • (Time, nil)


84
# File 'lib/lithic/models/auth_rules/rule_stats.rb', line 84

optional :timestamp, Time