Skip to content

Commit f3089b7

Browse files
fix(types): [breaking] remove deprecated fields from auth_rules report_stats
1 parent 4729281 commit f3089b7

7 files changed

Lines changed: 145 additions & 3270 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 190
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-bc1866f92f50e1de35c16e782a13052913aeedc56723b13de396dea7c754889b.yml
3-
openapi_spec_hash: d7110a33edc390903093258735ee0cfb
4-
config_hash: edbdfefeb0d3d927c2f9fe3402793215
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-df28ee30a3bd4fa595befc2048216e1ee1d3845fcfcf179c1c694ba58fd5e4ed.yml
3+
openapi_spec_hash: 79bfc19d85c7f03754684d794653e333
4+
config_hash: 5eca052bb23d273fa970eac3127dd919

lib/lithic/models/auth_rules/report_stats.rb

Lines changed: 39 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -6,112 +6,71 @@ module AuthRules
66
class ReportStats < Lithic::Internal::Type::BaseModel
77
# @!attribute action_counts
88
# A mapping of action types to the number of times that action was returned by
9-
# this rule during the relevant period. Actions are the possible outcomes of a
9+
# this version during the relevant period. Actions are the possible outcomes of a
1010
# rule evaluation, such as DECLINE, CHALLENGE, REQUIRE_TFA, etc. In case rule
1111
# didn't trigger any action, it's counted under NO_ACTION key.
1212
#
13-
# @return [Hash{Symbol=>Integer}, nil]
14-
optional :action_counts, Lithic::Internal::Type::HashOf[Integer]
13+
# @return [Hash{Symbol=>Integer}]
14+
required :action_counts, Lithic::Internal::Type::HashOf[Integer]
1515

16-
# @!attribute approved
17-
# @deprecated
18-
#
19-
# The total number of historical transactions approved by this rule during the
20-
# relevant period, or the number of transactions that would have been approved if
21-
# the rule was evaluated in shadow mode.
16+
# @!attribute examples
17+
# Example events and their outcomes for this version.
2218
#
23-
# @return [Integer, nil]
24-
optional :approved, Integer
19+
# @return [Array<Lithic::Models::AuthRules::ReportStats::Example>]
20+
required :examples, -> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::ReportStats::Example] }
2521

26-
# @!attribute challenged
27-
# @deprecated
28-
#
29-
# The total number of historical transactions challenged by this rule during the
30-
# relevant period, or the number of transactions that would have been challenged
31-
# if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth
32-
# Rules.
22+
# @!attribute state
23+
# The evaluation mode of this version during the reported period.
3324
#
34-
# @return [Integer, nil]
35-
optional :challenged, Integer
25+
# @return [Symbol, Lithic::Models::AuthRules::ReportStats::State]
26+
required :state, enum: -> { Lithic::AuthRules::ReportStats::State }
3627

37-
# @!attribute declined
38-
# @deprecated
28+
# @!attribute version
29+
# The rule version number.
3930
#
40-
# The total number of historical transactions declined by this rule during the
41-
# relevant period, or the number of transactions that would have been declined if
42-
# the rule was evaluated in shadow mode.
43-
#
44-
# @return [Integer, nil]
45-
optional :declined, Integer
31+
# @return [Integer]
32+
required :version, Integer
4633

47-
# @!attribute examples
48-
# Example events and their outcomes.
49-
#
50-
# @return [Array<Lithic::Models::AuthRules::ReportStats::Example>, nil]
51-
optional :examples, -> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::ReportStats::Example] }
52-
53-
# @!method initialize(action_counts: nil, approved: nil, challenged: nil, declined: nil, examples: nil)
34+
# @!method initialize(action_counts:, examples:, state:, version:)
5435
# Some parameter documentations has been truncated, see
5536
# {Lithic::Models::AuthRules::ReportStats} for more details.
5637
#
5738
# @param action_counts [Hash{Symbol=>Integer}] A mapping of action types to the number of times that action was returned by thi
5839
#
59-
# @param approved [Integer] The total number of historical transactions approved by this rule during the rel
60-
#
61-
# @param challenged [Integer] The total number of historical transactions challenged by this rule during the r
40+
# @param examples [Array<Lithic::Models::AuthRules::ReportStats::Example>] Example events and their outcomes for this version.
6241
#
63-
# @param declined [Integer] The total number of historical transactions declined by this rule during the rel
42+
# @param state [Symbol, Lithic::Models::AuthRules::ReportStats::State] The evaluation mode of this version during the reported period.
6443
#
65-
# @param examples [Array<Lithic::Models::AuthRules::ReportStats::Example>] Example events and their outcomes.
44+
# @param version [Integer] The rule version number.
6645

6746
class Example < Lithic::Internal::Type::BaseModel
6847
# @!attribute actions
69-
# The actions taken by the rule for this event.
48+
# The actions taken by this version for this event.
7049
#
71-
# @return [Array<Lithic::Models::AuthRules::ReportStats::Example::Action::DeclineActionAuthorization, Lithic::Models::AuthRules::ReportStats::Example::Action::ChallengeActionAuthorization, Lithic::Models::AuthRules::ReportStats::Example::Action::ResultAuthentication3DSAction, Lithic::Models::AuthRules::ReportStats::Example::Action::DeclineActionTokenization, Lithic::Models::AuthRules::ReportStats::Example::Action::RequireTfaAction, Lithic::Models::AuthRules::ReportStats::Example::Action::ApproveActionACH, Lithic::Models::AuthRules::ReportStats::Example::Action::ReturnAction>, nil]
72-
optional :actions,
50+
# @return [Array<Lithic::Models::AuthRules::ReportStats::Example::Action::DeclineActionAuthorization, Lithic::Models::AuthRules::ReportStats::Example::Action::ChallengeActionAuthorization, Lithic::Models::AuthRules::ReportStats::Example::Action::ResultAuthentication3DSAction, Lithic::Models::AuthRules::ReportStats::Example::Action::DeclineActionTokenization, Lithic::Models::AuthRules::ReportStats::Example::Action::RequireTfaAction, Lithic::Models::AuthRules::ReportStats::Example::Action::ApproveActionACH, Lithic::Models::AuthRules::ReportStats::Example::Action::ReturnAction>]
51+
required :actions,
7352
-> { Lithic::Internal::Type::ArrayOf[union: Lithic::AuthRules::ReportStats::Example::Action] }
7453

75-
# @!attribute approved
76-
# @deprecated
77-
#
78-
# Whether the rule would have approved the request.
79-
#
80-
# @return [Boolean, nil]
81-
optional :approved, Lithic::Internal::Type::Boolean
82-
83-
# @!attribute decision
84-
# @deprecated
85-
#
86-
# The decision made by the rule for this event.
87-
#
88-
# @return [Symbol, Lithic::Models::AuthRules::ReportStats::Example::Decision, nil]
89-
optional :decision, enum: -> { Lithic::AuthRules::ReportStats::Example::Decision }
90-
9154
# @!attribute event_token
9255
# The event token.
9356
#
94-
# @return [String, nil]
95-
optional :event_token, String
57+
# @return [String]
58+
required :event_token, String
9659

9760
# @!attribute timestamp
9861
# The timestamp of the event.
9962
#
100-
# @return [Time, nil]
101-
optional :timestamp, Time
63+
# @return [Time]
64+
required :timestamp, Time
10265

10366
# @!attribute transaction_token
10467
# The token of the transaction associated with the event
10568
#
10669
# @return [String, nil]
10770
optional :transaction_token, String, nil?: true
10871

109-
# @!method initialize(actions: nil, approved: nil, decision: nil, event_token: nil, timestamp: nil, transaction_token: nil)
110-
# @param actions [Array<Lithic::Models::AuthRules::ReportStats::Example::Action::DeclineActionAuthorization, Lithic::Models::AuthRules::ReportStats::Example::Action::ChallengeActionAuthorization, Lithic::Models::AuthRules::ReportStats::Example::Action::ResultAuthentication3DSAction, Lithic::Models::AuthRules::ReportStats::Example::Action::DeclineActionTokenization, Lithic::Models::AuthRules::ReportStats::Example::Action::RequireTfaAction, Lithic::Models::AuthRules::ReportStats::Example::Action::ApproveActionACH, Lithic::Models::AuthRules::ReportStats::Example::Action::ReturnAction>] The actions taken by the rule for this event.
111-
#
112-
# @param approved [Boolean] Whether the rule would have approved the request.
113-
#
114-
# @param decision [Symbol, Lithic::Models::AuthRules::ReportStats::Example::Decision] The decision made by the rule for this event.
72+
# @!method initialize(actions:, event_token:, timestamp:, transaction_token: nil)
73+
# @param actions [Array<Lithic::Models::AuthRules::ReportStats::Example::Action::DeclineActionAuthorization, Lithic::Models::AuthRules::ReportStats::Example::Action::ChallengeActionAuthorization, Lithic::Models::AuthRules::ReportStats::Example::Action::ResultAuthentication3DSAction, Lithic::Models::AuthRules::ReportStats::Example::Action::DeclineActionTokenization, Lithic::Models::AuthRules::ReportStats::Example::Action::RequireTfaAction, Lithic::Models::AuthRules::ReportStats::Example::Action::ApproveActionACH, Lithic::Models::AuthRules::ReportStats::Example::Action::ReturnAction>] The actions taken by this version for this event.
11574
#
11675
# @param event_token [String] The event token.
11776
#
@@ -537,22 +496,20 @@ module Type
537496
# @!method self.variants
538497
# @return [Array(Lithic::Models::AuthRules::ReportStats::Example::Action::DeclineActionAuthorization, Lithic::Models::AuthRules::ReportStats::Example::Action::ChallengeActionAuthorization, Lithic::Models::AuthRules::ReportStats::Example::Action::ResultAuthentication3DSAction, Lithic::Models::AuthRules::ReportStats::Example::Action::DeclineActionTokenization, Lithic::Models::AuthRules::ReportStats::Example::Action::RequireTfaAction, Lithic::Models::AuthRules::ReportStats::Example::Action::ApproveActionACH, Lithic::Models::AuthRules::ReportStats::Example::Action::ReturnAction)]
539498
end
499+
end
540500

541-
# @deprecated
542-
#
543-
# The decision made by the rule for this event.
544-
#
545-
# @see Lithic::Models::AuthRules::ReportStats::Example#decision
546-
module Decision
547-
extend Lithic::Internal::Type::Enum
501+
# The evaluation mode of this version during the reported period.
502+
#
503+
# @see Lithic::Models::AuthRules::ReportStats#state
504+
module State
505+
extend Lithic::Internal::Type::Enum
548506

549-
APPROVED = :APPROVED
550-
DECLINED = :DECLINED
551-
CHALLENGED = :CHALLENGED
507+
ACTIVE = :ACTIVE
508+
SHADOW = :SHADOW
509+
INACTIVE = :INACTIVE
552510

553-
# @!method self.values
554-
# @return [Array<Symbol>]
555-
end
511+
# @!method self.values
512+
# @return [Array<Symbol>]
556513
end
557514
end
558515
end

0 commit comments

Comments
 (0)