Skip to content

Commit f12343f

Browse files
feat(api): adds support for Auth Rule features
1 parent 16903a8 commit f12343f

44 files changed

Lines changed: 1705 additions & 20 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 169
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fbbce0ea11d3e86e532f705804f3d79e8eecfb8a7796e3a6ad3c50cccee14bb1.yml
3-
openapi_spec_hash: 3f44b97866ca74effe5e70fc9c64effb
4-
config_hash: 768e8f0faa1a21e26b07e6cdc395cebf
1+
configured_endpoints: 170
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-1a0e3a42c88b88140af0f9ad05ab0026fc87f0a500d6879c86b93dfa7f923810.yml
3+
openapi_spec_hash: 2b4db6185c6e4ab3626461a448c97d4b
4+
config_hash: 7a6a0c0bab3306093c6c171cd7407a45

lib/lithic.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@
110110
require_relative "lithic/models/auth_rules/v2_promote_response"
111111
require_relative "lithic/models/auth_rules/v2_report_params"
112112
require_relative "lithic/models/auth_rules/v2_report_response"
113+
require_relative "lithic/models/auth_rules/v2_retrieve_features_params"
114+
require_relative "lithic/models/auth_rules/v2_retrieve_features_response"
113115
require_relative "lithic/models/auth_rules/v2_retrieve_params"
114116
require_relative "lithic/models/auth_rules/v2_retrieve_report_params"
115117
require_relative "lithic/models/auth_rules/v2_retrieve_report_response"

lib/lithic/models/auth_rules/v2_apply_response.rb

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ class V2ApplyResponse < Lithic::Internal::Type::BaseModel
4545
# @return [Symbol, Lithic::Models::AuthRules::V2ApplyResponse::EventStream]
4646
required :event_stream, enum: -> { Lithic::Models::AuthRules::V2ApplyResponse::EventStream }
4747

48+
# @!attribute lithic_managed
49+
# Indicates whether this auth rule is managed by Lithic. If true, the rule cannot
50+
# be modified or deleted by the user
51+
#
52+
# @return [Boolean]
53+
required :lithic_managed, Lithic::Internal::Type::Boolean
54+
4855
# @!attribute name
4956
# Auth Rule Name
5057
#
@@ -83,7 +90,7 @@ class V2ApplyResponse < Lithic::Internal::Type::BaseModel
8390
# @return [Array<String>, nil]
8491
optional :excluded_card_tokens, Lithic::Internal::Type::ArrayOf[String]
8592

86-
# @!method initialize(token:, account_tokens:, business_account_tokens:, card_tokens:, current_version:, draft_version:, event_stream:, name:, program_level:, state:, type:, excluded_card_tokens: nil)
93+
# @!method initialize(token:, account_tokens:, business_account_tokens:, card_tokens:, current_version:, draft_version:, event_stream:, lithic_managed:, name:, program_level:, state:, type:, excluded_card_tokens: nil)
8794
# Some parameter documentations has been truncated, see
8895
# {Lithic::Models::AuthRules::V2ApplyResponse} for more details.
8996
#
@@ -101,6 +108,8 @@ class V2ApplyResponse < Lithic::Internal::Type::BaseModel
101108
#
102109
# @param event_stream [Symbol, Lithic::Models::AuthRules::V2ApplyResponse::EventStream] The event stream during which the rule will be evaluated.
103110
#
111+
# @param lithic_managed [Boolean] Indicates whether this auth rule is managed by Lithic. If true, the rule cannot
112+
#
104113
# @param name [String, nil] Auth Rule Name
105114
#
106115
# @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program.
@@ -216,6 +225,8 @@ class Condition < Lithic::Internal::Type::BaseModel
216225
# fee field in the settlement/cardholder billing currency. This is the amount
217226
# the issuer should authorize against unless the issuer is paying the acquirer
218227
# fee on behalf of the cardholder.
228+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
229+
# represents the amount of cash being withdrawn or advanced.
219230
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
220231
# given authorization. Scores are on a range of 0-999, with 0 representing the
221232
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -295,6 +306,8 @@ class Condition < Lithic::Internal::Type::BaseModel
295306
# fee field in the settlement/cardholder billing currency. This is the amount
296307
# the issuer should authorize against unless the issuer is paying the acquirer
297308
# fee on behalf of the cardholder.
309+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
310+
# represents the amount of cash being withdrawn or advanced.
298311
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
299312
# given authorization. Scores are on a range of 0-999, with 0 representing the
300313
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -331,6 +344,7 @@ module Attribute
331344
LIABILITY_SHIFT = :LIABILITY_SHIFT
332345
PAN_ENTRY_MODE = :PAN_ENTRY_MODE
333346
TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
347+
CASH_AMOUNT = :CASH_AMOUNT
334348
RISK_SCORE = :RISK_SCORE
335349
CARD_TRANSACTION_COUNT_15_M = :CARD_TRANSACTION_COUNT_15M
336350
CARD_TRANSACTION_COUNT_1_H = :CARD_TRANSACTION_COUNT_1H
@@ -500,6 +514,8 @@ class Condition < Lithic::Internal::Type::BaseModel
500514
# fee field in the settlement/cardholder billing currency. This is the amount
501515
# the issuer should authorize against unless the issuer is paying the acquirer
502516
# fee on behalf of the cardholder.
517+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
518+
# represents the amount of cash being withdrawn or advanced.
503519
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
504520
# given authorization. Scores are on a range of 0-999, with 0 representing the
505521
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -579,6 +595,8 @@ class Condition < Lithic::Internal::Type::BaseModel
579595
# fee field in the settlement/cardholder billing currency. This is the amount
580596
# the issuer should authorize against unless the issuer is paying the acquirer
581597
# fee on behalf of the cardholder.
598+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
599+
# represents the amount of cash being withdrawn or advanced.
582600
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
583601
# given authorization. Scores are on a range of 0-999, with 0 representing the
584602
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -615,6 +633,7 @@ module Attribute
615633
LIABILITY_SHIFT = :LIABILITY_SHIFT
616634
PAN_ENTRY_MODE = :PAN_ENTRY_MODE
617635
TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
636+
CASH_AMOUNT = :CASH_AMOUNT
618637
RISK_SCORE = :RISK_SCORE
619638
CARD_TRANSACTION_COUNT_15_M = :CARD_TRANSACTION_COUNT_15M
620639
CARD_TRANSACTION_COUNT_1_H = :CARD_TRANSACTION_COUNT_1H

lib/lithic/models/auth_rules/v2_create_params.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ class Condition < Lithic::Internal::Type::BaseModel
179179
# fee field in the settlement/cardholder billing currency. This is the amount
180180
# the issuer should authorize against unless the issuer is paying the acquirer
181181
# fee on behalf of the cardholder.
182+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
183+
# represents the amount of cash being withdrawn or advanced.
182184
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
183185
# given authorization. Scores are on a range of 0-999, with 0 representing the
184186
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -258,6 +260,8 @@ class Condition < Lithic::Internal::Type::BaseModel
258260
# fee field in the settlement/cardholder billing currency. This is the amount
259261
# the issuer should authorize against unless the issuer is paying the acquirer
260262
# fee on behalf of the cardholder.
263+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
264+
# represents the amount of cash being withdrawn or advanced.
261265
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
262266
# given authorization. Scores are on a range of 0-999, with 0 representing the
263267
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -294,6 +298,7 @@ module Attribute
294298
LIABILITY_SHIFT = :LIABILITY_SHIFT
295299
PAN_ENTRY_MODE = :PAN_ENTRY_MODE
296300
TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
301+
CASH_AMOUNT = :CASH_AMOUNT
297302
RISK_SCORE = :RISK_SCORE
298303
CARD_TRANSACTION_COUNT_15_M = :CARD_TRANSACTION_COUNT_15M
299304
CARD_TRANSACTION_COUNT_1_H = :CARD_TRANSACTION_COUNT_1H

lib/lithic/models/auth_rules/v2_create_response.rb

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ class V2CreateResponse < Lithic::Internal::Type::BaseModel
4545
# @return [Symbol, Lithic::Models::AuthRules::V2CreateResponse::EventStream]
4646
required :event_stream, enum: -> { Lithic::Models::AuthRules::V2CreateResponse::EventStream }
4747

48+
# @!attribute lithic_managed
49+
# Indicates whether this auth rule is managed by Lithic. If true, the rule cannot
50+
# be modified or deleted by the user
51+
#
52+
# @return [Boolean]
53+
required :lithic_managed, Lithic::Internal::Type::Boolean
54+
4855
# @!attribute name
4956
# Auth Rule Name
5057
#
@@ -83,7 +90,7 @@ class V2CreateResponse < Lithic::Internal::Type::BaseModel
8390
# @return [Array<String>, nil]
8491
optional :excluded_card_tokens, Lithic::Internal::Type::ArrayOf[String]
8592

86-
# @!method initialize(token:, account_tokens:, business_account_tokens:, card_tokens:, current_version:, draft_version:, event_stream:, name:, program_level:, state:, type:, excluded_card_tokens: nil)
93+
# @!method initialize(token:, account_tokens:, business_account_tokens:, card_tokens:, current_version:, draft_version:, event_stream:, lithic_managed:, name:, program_level:, state:, type:, excluded_card_tokens: nil)
8794
# Some parameter documentations has been truncated, see
8895
# {Lithic::Models::AuthRules::V2CreateResponse} for more details.
8996
#
@@ -101,6 +108,8 @@ class V2CreateResponse < Lithic::Internal::Type::BaseModel
101108
#
102109
# @param event_stream [Symbol, Lithic::Models::AuthRules::V2CreateResponse::EventStream] The event stream during which the rule will be evaluated.
103110
#
111+
# @param lithic_managed [Boolean] Indicates whether this auth rule is managed by Lithic. If true, the rule cannot
112+
#
104113
# @param name [String, nil] Auth Rule Name
105114
#
106115
# @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program.
@@ -217,6 +226,8 @@ class Condition < Lithic::Internal::Type::BaseModel
217226
# fee field in the settlement/cardholder billing currency. This is the amount
218227
# the issuer should authorize against unless the issuer is paying the acquirer
219228
# fee on behalf of the cardholder.
229+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
230+
# represents the amount of cash being withdrawn or advanced.
220231
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
221232
# given authorization. Scores are on a range of 0-999, with 0 representing the
222233
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -296,6 +307,8 @@ class Condition < Lithic::Internal::Type::BaseModel
296307
# fee field in the settlement/cardholder billing currency. This is the amount
297308
# the issuer should authorize against unless the issuer is paying the acquirer
298309
# fee on behalf of the cardholder.
310+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
311+
# represents the amount of cash being withdrawn or advanced.
299312
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
300313
# given authorization. Scores are on a range of 0-999, with 0 representing the
301314
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -332,6 +345,7 @@ module Attribute
332345
LIABILITY_SHIFT = :LIABILITY_SHIFT
333346
PAN_ENTRY_MODE = :PAN_ENTRY_MODE
334347
TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
348+
CASH_AMOUNT = :CASH_AMOUNT
335349
RISK_SCORE = :RISK_SCORE
336350
CARD_TRANSACTION_COUNT_15_M = :CARD_TRANSACTION_COUNT_15M
337351
CARD_TRANSACTION_COUNT_1_H = :CARD_TRANSACTION_COUNT_1H
@@ -501,6 +515,8 @@ class Condition < Lithic::Internal::Type::BaseModel
501515
# fee field in the settlement/cardholder billing currency. This is the amount
502516
# the issuer should authorize against unless the issuer is paying the acquirer
503517
# fee on behalf of the cardholder.
518+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
519+
# represents the amount of cash being withdrawn or advanced.
504520
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
505521
# given authorization. Scores are on a range of 0-999, with 0 representing the
506522
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -580,6 +596,8 @@ class Condition < Lithic::Internal::Type::BaseModel
580596
# fee field in the settlement/cardholder billing currency. This is the amount
581597
# the issuer should authorize against unless the issuer is paying the acquirer
582598
# fee on behalf of the cardholder.
599+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
600+
# represents the amount of cash being withdrawn or advanced.
583601
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
584602
# given authorization. Scores are on a range of 0-999, with 0 representing the
585603
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -616,6 +634,7 @@ module Attribute
616634
LIABILITY_SHIFT = :LIABILITY_SHIFT
617635
PAN_ENTRY_MODE = :PAN_ENTRY_MODE
618636
TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
637+
CASH_AMOUNT = :CASH_AMOUNT
619638
RISK_SCORE = :RISK_SCORE
620639
CARD_TRANSACTION_COUNT_15_M = :CARD_TRANSACTION_COUNT_15M
621640
CARD_TRANSACTION_COUNT_1_H = :CARD_TRANSACTION_COUNT_1H

lib/lithic/models/auth_rules/v2_draft_params.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ class Condition < Lithic::Internal::Type::BaseModel
9393
# fee field in the settlement/cardholder billing currency. This is the amount
9494
# the issuer should authorize against unless the issuer is paying the acquirer
9595
# fee on behalf of the cardholder.
96+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
97+
# represents the amount of cash being withdrawn or advanced.
9698
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
9799
# given authorization. Scores are on a range of 0-999, with 0 representing the
98100
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -172,6 +174,8 @@ class Condition < Lithic::Internal::Type::BaseModel
172174
# fee field in the settlement/cardholder billing currency. This is the amount
173175
# the issuer should authorize against unless the issuer is paying the acquirer
174176
# fee on behalf of the cardholder.
177+
# - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This
178+
# represents the amount of cash being withdrawn or advanced.
175179
# - `RISK_SCORE`: Network-provided score assessing risk level associated with a
176180
# given authorization. Scores are on a range of 0-999, with 0 representing the
177181
# lowest risk and 999 representing the highest risk. For Visa transactions,
@@ -208,6 +212,7 @@ module Attribute
208212
LIABILITY_SHIFT = :LIABILITY_SHIFT
209213
PAN_ENTRY_MODE = :PAN_ENTRY_MODE
210214
TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT
215+
CASH_AMOUNT = :CASH_AMOUNT
211216
RISK_SCORE = :RISK_SCORE
212217
CARD_TRANSACTION_COUNT_15_M = :CARD_TRANSACTION_COUNT_15M
213218
CARD_TRANSACTION_COUNT_1_H = :CARD_TRANSACTION_COUNT_1H

0 commit comments

Comments
 (0)