lithic 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +73 -0
- data/README.md +10 -1
- data/lib/lithic/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/lithic/internal/util.rb +1 -1
- data/lib/lithic/models/account_holder.rb +14 -5
- data/lib/lithic/models/account_holder_create_params.rb +10 -1
- data/lib/lithic/models/account_holder_simulate_enrollment_review_params.rb +1 -0
- data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +14 -5
- data/lib/lithic/models/account_holder_update_params.rb +10 -1
- data/lib/lithic/models/account_holder_update_response.rb +14 -5
- data/lib/lithic/models/account_holder_updated_webhook_event.rb +10 -1
- data/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb +3 -3
- data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +47 -21
- data/lib/lithic/models/auth_rules/v2_list_results_params.rb +70 -0
- data/lib/lithic/models/auth_rules/v2_list_results_response.rb +740 -0
- data/lib/lithic/models/auth_rules/velocity_limit_params.rb +21 -21
- data/lib/lithic/models/book_transfer_create_params.rb +9 -1
- data/lib/lithic/models/card_authorization_approval_request_webhook_event.rb +178 -25
- data/lib/lithic/models/card_create_params.rb +12 -5
- data/lib/lithic/models/card_updated_webhook_event.rb +40 -0
- data/lib/lithic/models/card_web_provision_response.rb +5 -5
- data/lib/lithic/models/event.rb +3 -0
- data/lib/lithic/models/event_list_params.rb +2 -0
- data/lib/lithic/models/event_subscription.rb +2 -0
- data/lib/lithic/models/events/subscription_create_params.rb +2 -0
- data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +1 -0
- data/lib/lithic/models/events/subscription_update_params.rb +2 -0
- data/lib/lithic/models/financial_transaction.rb +4 -2
- data/lib/lithic/models/kyb.rb +10 -1
- data/lib/lithic/models/non_pci_card.rb +8 -10
- data/lib/lithic/models/parsed_webhook_event.rb +13 -2
- data/lib/lithic/models/payment.rb +1 -1
- data/lib/lithic/models/payment_create_params.rb +1 -1
- data/lib/lithic/models/transaction.rb +10 -1
- data/lib/lithic/models/transaction_simulate_authorization_params.rb +25 -1
- data/lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb +25 -1
- data/lib/lithic/models.rb +2 -0
- data/lib/lithic/resources/account_holders.rb +6 -2
- data/lib/lithic/resources/auth_rules/v2.rb +42 -0
- data/lib/lithic/resources/book_transfers.rb +3 -1
- data/lib/lithic/resources/cards.rb +32 -22
- data/lib/lithic/resources/financial_accounts.rb +5 -5
- data/lib/lithic/resources/transactions.rb +14 -2
- data/lib/lithic/resources/webhooks.rb +1 -1
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +3 -0
- data/rbi/lithic/internal/util.rbi +1 -1
- data/rbi/lithic/models/account_holder.rbi +19 -6
- data/rbi/lithic/models/account_holder_create_params.rbi +13 -0
- data/rbi/lithic/models/account_holder_simulate_enrollment_review_params.rbi +5 -0
- data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +19 -6
- data/rbi/lithic/models/account_holder_update_params.rbi +13 -0
- data/rbi/lithic/models/account_holder_update_response.rbi +19 -6
- data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +13 -0
- data/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +3 -3
- data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +69 -30
- data/rbi/lithic/models/auth_rules/v2_list_results_params.rbi +112 -0
- data/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +1826 -0
- data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +47 -45
- data/rbi/lithic/models/book_transfer_create_params.rbi +11 -0
- data/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi +337 -36
- data/rbi/lithic/models/card_create_params.rbi +15 -6
- data/rbi/lithic/models/card_updated_webhook_event.rbi +61 -0
- data/rbi/lithic/models/card_web_provision_response.rbi +5 -10
- data/rbi/lithic/models/event.rbi +5 -0
- data/rbi/lithic/models/event_list_params.rbi +6 -0
- data/rbi/lithic/models/event_subscription.rbi +6 -0
- data/rbi/lithic/models/events/subscription_create_params.rbi +6 -0
- data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +5 -0
- data/rbi/lithic/models/events/subscription_update_params.rbi +6 -0
- data/rbi/lithic/models/financial_transaction.rbi +8 -4
- data/rbi/lithic/models/kyb.rbi +13 -0
- data/rbi/lithic/models/non_pci_card.rbi +12 -15
- data/rbi/lithic/models/parsed_webhook_event.rbi +14 -0
- data/rbi/lithic/models/payment.rbi +5 -2
- data/rbi/lithic/models/transaction.rbi +10 -0
- data/rbi/lithic/models/transaction_simulate_authorization_params.rbi +33 -0
- data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi +33 -0
- data/rbi/lithic/models.rbi +2 -0
- data/rbi/lithic/resources/account_holders.rbi +8 -0
- data/rbi/lithic/resources/auth_rules/v2.rbi +42 -0
- data/rbi/lithic/resources/book_transfers.rbi +3 -0
- data/rbi/lithic/resources/cards.rbi +51 -45
- data/rbi/lithic/resources/financial_accounts.rbi +5 -5
- data/rbi/lithic/resources/transactions.rbi +18 -0
- data/rbi/lithic/resources/webhooks.rbi +62 -1
- data/sig/lithic/models/account_holder.rbs +7 -0
- data/sig/lithic/models/account_holder_create_params.rbs +7 -0
- data/sig/lithic/models/account_holder_simulate_enrollment_review_params.rbs +2 -1
- data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +7 -0
- data/sig/lithic/models/account_holder_update_params.rbs +7 -0
- data/sig/lithic/models/account_holder_update_response.rbs +7 -0
- data/sig/lithic/models/account_holder_updated_webhook_event.rbs +7 -0
- data/sig/lithic/models/auth_rules/v2_list_results_params.rbs +65 -0
- data/sig/lithic/models/auth_rules/v2_list_results_response.rbs +752 -0
- data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +20 -16
- data/sig/lithic/models/book_transfer_create_params.rbs +7 -0
- data/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs +96 -0
- data/sig/lithic/models/card_create_params.rbs +8 -1
- data/sig/lithic/models/card_updated_webhook_event.rbs +35 -0
- data/sig/lithic/models/card_web_provision_response.rbs +4 -10
- data/sig/lithic/models/event.rbs +2 -0
- data/sig/lithic/models/event_list_params.rbs +2 -0
- data/sig/lithic/models/event_subscription.rbs +2 -0
- data/sig/lithic/models/events/subscription_create_params.rbs +2 -0
- data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +2 -0
- data/sig/lithic/models/events/subscription_update_params.rbs +2 -0
- data/sig/lithic/models/kyb.rbs +7 -0
- data/sig/lithic/models/parsed_webhook_event.rbs +8 -0
- data/sig/lithic/models/payment.rbs +2 -2
- data/sig/lithic/models/transaction.rbs +5 -0
- data/sig/lithic/models/transaction_simulate_authorization_params.rbs +21 -0
- data/sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs +22 -1
- data/sig/lithic/models.rbs +2 -0
- data/sig/lithic/resources/account_holders.rbs +2 -0
- data/sig/lithic/resources/auth_rules/v2.rbs +10 -0
- data/sig/lithic/resources/book_transfers.rbs +1 -0
- data/sig/lithic/resources/cards.rbs +1 -0
- data/sig/lithic/resources/transactions.rbs +6 -0
- data/sig/lithic/resources/webhooks.rbs +58 -1
- metadata +25 -2
|
@@ -12,16 +12,6 @@ module Lithic
|
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
sig { returns(Lithic::AuthRules::VelocityLimitParams::Filters) }
|
|
16
|
-
attr_reader :filters
|
|
17
|
-
|
|
18
|
-
sig do
|
|
19
|
-
params(
|
|
20
|
-
filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash
|
|
21
|
-
).void
|
|
22
|
-
end
|
|
23
|
-
attr_writer :filters
|
|
24
|
-
|
|
25
15
|
# Velocity over the current day since 00:00 / 12 AM in Eastern Time
|
|
26
16
|
sig do
|
|
27
17
|
returns(
|
|
@@ -40,6 +30,18 @@ module Lithic
|
|
|
40
30
|
sig { returns(Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol) }
|
|
41
31
|
attr_accessor :scope
|
|
42
32
|
|
|
33
|
+
sig do
|
|
34
|
+
returns(T.nilable(Lithic::AuthRules::VelocityLimitParams::Filters))
|
|
35
|
+
end
|
|
36
|
+
attr_reader :filters
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash
|
|
41
|
+
).void
|
|
42
|
+
end
|
|
43
|
+
attr_writer :filters
|
|
44
|
+
|
|
43
45
|
# The maximum amount of spend velocity allowed in the period in minor units (the
|
|
44
46
|
# smallest unit of a currency, e.g. cents for USD). Transactions exceeding this
|
|
45
47
|
# limit will be declined.
|
|
@@ -56,7 +58,6 @@ module Lithic
|
|
|
56
58
|
|
|
57
59
|
sig do
|
|
58
60
|
params(
|
|
59
|
-
filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash,
|
|
60
61
|
period:
|
|
61
62
|
T.any(
|
|
62
63
|
Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject::OrHash,
|
|
@@ -66,16 +67,17 @@ module Lithic
|
|
|
66
67
|
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear::OrHash
|
|
67
68
|
),
|
|
68
69
|
scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol,
|
|
70
|
+
filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash,
|
|
69
71
|
limit_amount: T.nilable(Integer),
|
|
70
72
|
limit_count: T.nilable(Integer)
|
|
71
73
|
).returns(T.attached_class)
|
|
72
74
|
end
|
|
73
75
|
def self.new(
|
|
74
|
-
filters:,
|
|
75
76
|
# Velocity over the current day since 00:00 / 12 AM in Eastern Time
|
|
76
77
|
period:,
|
|
77
78
|
# The scope the velocity is calculated for
|
|
78
79
|
scope:,
|
|
80
|
+
filters: nil,
|
|
79
81
|
# The maximum amount of spend velocity allowed in the period in minor units (the
|
|
80
82
|
# smallest unit of a currency, e.g. cents for USD). Transactions exceeding this
|
|
81
83
|
# limit will be declined.
|
|
@@ -92,7 +94,6 @@ module Lithic
|
|
|
92
94
|
sig do
|
|
93
95
|
override.returns(
|
|
94
96
|
{
|
|
95
|
-
filters: Lithic::AuthRules::VelocityLimitParams::Filters,
|
|
96
97
|
period:
|
|
97
98
|
T.any(
|
|
98
99
|
Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject,
|
|
@@ -102,6 +103,7 @@ module Lithic
|
|
|
102
103
|
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear
|
|
103
104
|
),
|
|
104
105
|
scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol,
|
|
106
|
+
filters: Lithic::AuthRules::VelocityLimitParams::Filters,
|
|
105
107
|
limit_amount: T.nilable(Integer),
|
|
106
108
|
limit_count: T.nilable(Integer)
|
|
107
109
|
}
|
|
@@ -110,6 +112,38 @@ module Lithic
|
|
|
110
112
|
def to_hash
|
|
111
113
|
end
|
|
112
114
|
|
|
115
|
+
# The scope the velocity is calculated for
|
|
116
|
+
module Scope
|
|
117
|
+
extend Lithic::Internal::Type::Enum
|
|
118
|
+
|
|
119
|
+
TaggedSymbol =
|
|
120
|
+
T.type_alias do
|
|
121
|
+
T.all(Symbol, Lithic::AuthRules::VelocityLimitParams::Scope)
|
|
122
|
+
end
|
|
123
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
124
|
+
|
|
125
|
+
CARD =
|
|
126
|
+
T.let(
|
|
127
|
+
:CARD,
|
|
128
|
+
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
129
|
+
)
|
|
130
|
+
ACCOUNT =
|
|
131
|
+
T.let(
|
|
132
|
+
:ACCOUNT,
|
|
133
|
+
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
sig do
|
|
137
|
+
override.returns(
|
|
138
|
+
T::Array[
|
|
139
|
+
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
140
|
+
]
|
|
141
|
+
)
|
|
142
|
+
end
|
|
143
|
+
def self.values
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
113
147
|
class Filters < Lithic::Internal::Type::BaseModel
|
|
114
148
|
OrHash =
|
|
115
149
|
T.type_alias do
|
|
@@ -307,38 +341,6 @@ module Lithic
|
|
|
307
341
|
end
|
|
308
342
|
end
|
|
309
343
|
end
|
|
310
|
-
|
|
311
|
-
# The scope the velocity is calculated for
|
|
312
|
-
module Scope
|
|
313
|
-
extend Lithic::Internal::Type::Enum
|
|
314
|
-
|
|
315
|
-
TaggedSymbol =
|
|
316
|
-
T.type_alias do
|
|
317
|
-
T.all(Symbol, Lithic::AuthRules::VelocityLimitParams::Scope)
|
|
318
|
-
end
|
|
319
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
320
|
-
|
|
321
|
-
CARD =
|
|
322
|
-
T.let(
|
|
323
|
-
:CARD,
|
|
324
|
-
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
325
|
-
)
|
|
326
|
-
ACCOUNT =
|
|
327
|
-
T.let(
|
|
328
|
-
:ACCOUNT,
|
|
329
|
-
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
330
|
-
)
|
|
331
|
-
|
|
332
|
-
sig do
|
|
333
|
-
override.returns(
|
|
334
|
-
T::Array[
|
|
335
|
-
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
336
|
-
]
|
|
337
|
-
)
|
|
338
|
-
end
|
|
339
|
-
def self.values
|
|
340
|
-
end
|
|
341
|
-
end
|
|
342
344
|
end
|
|
343
345
|
end
|
|
344
346
|
end
|
|
@@ -52,6 +52,13 @@ module Lithic
|
|
|
52
52
|
sig { params(external_id: String).void }
|
|
53
53
|
attr_writer :external_id
|
|
54
54
|
|
|
55
|
+
# Token of an existing hold to settle when this transfer is initiated
|
|
56
|
+
sig { returns(T.nilable(String)) }
|
|
57
|
+
attr_reader :hold_token
|
|
58
|
+
|
|
59
|
+
sig { params(hold_token: String).void }
|
|
60
|
+
attr_writer :hold_token
|
|
61
|
+
|
|
55
62
|
# Optional descriptor for the transfer.
|
|
56
63
|
sig { returns(T.nilable(String)) }
|
|
57
64
|
attr_reader :memo
|
|
@@ -85,6 +92,7 @@ module Lithic
|
|
|
85
92
|
type: Lithic::BookTransferCreateParams::Type::OrSymbol,
|
|
86
93
|
token: String,
|
|
87
94
|
external_id: String,
|
|
95
|
+
hold_token: String,
|
|
88
96
|
memo: String,
|
|
89
97
|
on_closed_account:
|
|
90
98
|
Lithic::BookTransferCreateParams::OnClosedAccount::OrSymbol,
|
|
@@ -111,6 +119,8 @@ module Lithic
|
|
|
111
119
|
token: nil,
|
|
112
120
|
# External ID defined by the customer
|
|
113
121
|
external_id: nil,
|
|
122
|
+
# Token of an existing hold to settle when this transfer is initiated
|
|
123
|
+
hold_token: nil,
|
|
114
124
|
# Optional descriptor for the transfer.
|
|
115
125
|
memo: nil,
|
|
116
126
|
# What to do if the financial account is closed when posting an operation
|
|
@@ -130,6 +140,7 @@ module Lithic
|
|
|
130
140
|
type: Lithic::BookTransferCreateParams::Type::OrSymbol,
|
|
131
141
|
token: String,
|
|
132
142
|
external_id: String,
|
|
143
|
+
hold_token: String,
|
|
133
144
|
memo: String,
|
|
134
145
|
on_closed_account:
|
|
135
146
|
Lithic::BookTransferCreateParams::OnClosedAccount::OrSymbol,
|
|
@@ -21,14 +21,33 @@ module Lithic
|
|
|
21
21
|
sig { returns(Integer) }
|
|
22
22
|
attr_accessor :acquirer_fee
|
|
23
23
|
|
|
24
|
-
# Authorization amount of the transaction (in cents),
|
|
25
|
-
# The contents of this field are identical to
|
|
24
|
+
# Deprecated, use `amounts`. Authorization amount of the transaction (in cents),
|
|
25
|
+
# including any acquirer fees. The contents of this field are identical to
|
|
26
|
+
# `authorization_amount`.
|
|
26
27
|
sig { returns(Integer) }
|
|
27
28
|
attr_accessor :amount
|
|
28
29
|
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
30
|
+
# Structured amounts for this authorization. The `cardholder` and `merchant`
|
|
31
|
+
# amounts reflect the original network authorization values. For programs with
|
|
32
|
+
# hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
|
|
33
|
+
# `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
|
|
34
|
+
# anticipated final transaction amounts such as tips or fuel fill-ups
|
|
35
|
+
sig do
|
|
36
|
+
returns(Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts)
|
|
37
|
+
end
|
|
38
|
+
attr_reader :amounts
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
params(
|
|
42
|
+
amounts:
|
|
43
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::OrHash
|
|
44
|
+
).void
|
|
45
|
+
end
|
|
46
|
+
attr_writer :amounts
|
|
47
|
+
|
|
48
|
+
# Deprecated, use `amounts`. The base transaction amount (in cents) plus the
|
|
49
|
+
# acquirer fee field. This is the amount the issuer should authorize against
|
|
50
|
+
# unless the issuer is paying the acquirer fee on behalf of the cardholder.
|
|
32
51
|
sig { returns(Integer) }
|
|
33
52
|
attr_accessor :authorization_amount
|
|
34
53
|
|
|
@@ -56,7 +75,8 @@ module Lithic
|
|
|
56
75
|
end
|
|
57
76
|
attr_writer :card
|
|
58
77
|
|
|
59
|
-
# 3-character alphabetic ISO 4217 code for cardholder's
|
|
78
|
+
# Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
|
|
79
|
+
# billing currency.
|
|
60
80
|
sig { returns(String) }
|
|
61
81
|
attr_accessor :cardholder_currency
|
|
62
82
|
|
|
@@ -82,11 +102,11 @@ module Lithic
|
|
|
82
102
|
sig { params(merchant: Lithic::Merchant::OrHash).void }
|
|
83
103
|
attr_writer :merchant
|
|
84
104
|
|
|
85
|
-
# The amount that the merchant will receive,
|
|
86
|
-
# and in the smallest currency unit. Note the
|
|
87
|
-
# similar to `authorization_amount`. It will be
|
|
88
|
-
# `authorization_amount` if the merchant is taking payment in a
|
|
89
|
-
# currency.
|
|
105
|
+
# Deprecated, use `amounts`. The amount that the merchant will receive,
|
|
106
|
+
# denominated in `merchant_currency` and in the smallest currency unit. Note the
|
|
107
|
+
# amount includes `acquirer_fee`, similar to `authorization_amount`. It will be
|
|
108
|
+
# different from `authorization_amount` if the merchant is taking payment in a
|
|
109
|
+
# different currency.
|
|
90
110
|
sig { returns(Integer) }
|
|
91
111
|
attr_accessor :merchant_amount
|
|
92
112
|
|
|
@@ -94,8 +114,8 @@ module Lithic
|
|
|
94
114
|
sig { returns(String) }
|
|
95
115
|
attr_accessor :merchant_currency
|
|
96
116
|
|
|
97
|
-
# Amount (in cents) of the transaction that has been
|
|
98
|
-
# acquirer fees
|
|
117
|
+
# Deprecated, use `amounts`. Amount (in cents) of the transaction that has been
|
|
118
|
+
# settled, including any acquirer fees.
|
|
99
119
|
sig { returns(Integer) }
|
|
100
120
|
attr_accessor :settled_amount
|
|
101
121
|
|
|
@@ -151,11 +171,11 @@ module Lithic
|
|
|
151
171
|
sig { params(cashback: Integer).void }
|
|
152
172
|
attr_writer :cashback
|
|
153
173
|
|
|
154
|
-
# If the transaction was requested in a currency other
|
|
155
|
-
# currency, this field will be populated to indicate the rate
|
|
156
|
-
# the merchant_amount to the amount (i.e., `merchant_amount` x
|
|
157
|
-
# `amount`). Note that the `merchant_amount` is in the local
|
|
158
|
-
# amount is in the settlement currency.
|
|
174
|
+
# Deprecated, use `amounts`. If the transaction was requested in a currency other
|
|
175
|
+
# than the settlement currency, this field will be populated to indicate the rate
|
|
176
|
+
# used to translate the merchant_amount to the amount (i.e., `merchant_amount` x
|
|
177
|
+
# `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local
|
|
178
|
+
# currency and the amount is in the settlement currency.
|
|
159
179
|
sig { returns(T.nilable(Float)) }
|
|
160
180
|
attr_reader :conversion_rate
|
|
161
181
|
|
|
@@ -293,6 +313,8 @@ module Lithic
|
|
|
293
313
|
token: String,
|
|
294
314
|
acquirer_fee: Integer,
|
|
295
315
|
amount: Integer,
|
|
316
|
+
amounts:
|
|
317
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::OrHash,
|
|
296
318
|
authorization_amount: Integer,
|
|
297
319
|
avs:
|
|
298
320
|
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::OrHash,
|
|
@@ -342,17 +364,25 @@ module Lithic
|
|
|
342
364
|
# zero if no fee is assessed. Rebates may be transmitted as a negative value to
|
|
343
365
|
# indicate credited fees.
|
|
344
366
|
acquirer_fee:,
|
|
345
|
-
# Authorization amount of the transaction (in cents),
|
|
346
|
-
# The contents of this field are identical to
|
|
367
|
+
# Deprecated, use `amounts`. Authorization amount of the transaction (in cents),
|
|
368
|
+
# including any acquirer fees. The contents of this field are identical to
|
|
369
|
+
# `authorization_amount`.
|
|
347
370
|
amount:,
|
|
348
|
-
#
|
|
349
|
-
#
|
|
350
|
-
#
|
|
371
|
+
# Structured amounts for this authorization. The `cardholder` and `merchant`
|
|
372
|
+
# amounts reflect the original network authorization values. For programs with
|
|
373
|
+
# hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
|
|
374
|
+
# `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
|
|
375
|
+
# anticipated final transaction amounts such as tips or fuel fill-ups
|
|
376
|
+
amounts:,
|
|
377
|
+
# Deprecated, use `amounts`. The base transaction amount (in cents) plus the
|
|
378
|
+
# acquirer fee field. This is the amount the issuer should authorize against
|
|
379
|
+
# unless the issuer is paying the acquirer fee on behalf of the cardholder.
|
|
351
380
|
authorization_amount:,
|
|
352
381
|
avs:,
|
|
353
382
|
# Card object in ASA
|
|
354
383
|
card:,
|
|
355
|
-
# 3-character alphabetic ISO 4217 code for cardholder's
|
|
384
|
+
# Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
|
|
385
|
+
# billing currency.
|
|
356
386
|
cardholder_currency:,
|
|
357
387
|
# The portion of the transaction requested as cash back by the cardholder, and
|
|
358
388
|
# does not include any acquirer fees. The amount field includes the purchase
|
|
@@ -364,16 +394,16 @@ module Lithic
|
|
|
364
394
|
# Date and time when the transaction first occurred in UTC.
|
|
365
395
|
created:,
|
|
366
396
|
merchant:,
|
|
367
|
-
# The amount that the merchant will receive,
|
|
368
|
-
# and in the smallest currency unit. Note the
|
|
369
|
-
# similar to `authorization_amount`. It will be
|
|
370
|
-
# `authorization_amount` if the merchant is taking payment in a
|
|
371
|
-
# currency.
|
|
397
|
+
# Deprecated, use `amounts`. The amount that the merchant will receive,
|
|
398
|
+
# denominated in `merchant_currency` and in the smallest currency unit. Note the
|
|
399
|
+
# amount includes `acquirer_fee`, similar to `authorization_amount`. It will be
|
|
400
|
+
# different from `authorization_amount` if the merchant is taking payment in a
|
|
401
|
+
# different currency.
|
|
372
402
|
merchant_amount:,
|
|
373
403
|
# 3-character alphabetic ISO 4217 code for the local currency of the transaction.
|
|
374
404
|
merchant_currency:,
|
|
375
|
-
# Amount (in cents) of the transaction that has been
|
|
376
|
-
# acquirer fees
|
|
405
|
+
# Deprecated, use `amounts`. Amount (in cents) of the transaction that has been
|
|
406
|
+
# settled, including any acquirer fees.
|
|
377
407
|
settled_amount:,
|
|
378
408
|
# The type of authorization request that this request is for. Note that
|
|
379
409
|
# `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
|
|
@@ -385,11 +415,11 @@ module Lithic
|
|
|
385
415
|
cardholder_authentication: nil,
|
|
386
416
|
# Deprecated, use `cash_amount`.
|
|
387
417
|
cashback: nil,
|
|
388
|
-
# If the transaction was requested in a currency other
|
|
389
|
-
# currency, this field will be populated to indicate the rate
|
|
390
|
-
# the merchant_amount to the amount (i.e., `merchant_amount` x
|
|
391
|
-
# `amount`). Note that the `merchant_amount` is in the local
|
|
392
|
-
# amount is in the settlement currency.
|
|
418
|
+
# Deprecated, use `amounts`. If the transaction was requested in a currency other
|
|
419
|
+
# than the settlement currency, this field will be populated to indicate the rate
|
|
420
|
+
# used to translate the merchant_amount to the amount (i.e., `merchant_amount` x
|
|
421
|
+
# `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local
|
|
422
|
+
# currency and the amount is in the settlement currency.
|
|
393
423
|
conversion_rate: nil,
|
|
394
424
|
# The event token associated with the authorization. This field is only set for
|
|
395
425
|
# programs enrolled into the beta.
|
|
@@ -429,6 +459,8 @@ module Lithic
|
|
|
429
459
|
token: String,
|
|
430
460
|
acquirer_fee: Integer,
|
|
431
461
|
amount: Integer,
|
|
462
|
+
amounts:
|
|
463
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts,
|
|
432
464
|
authorization_amount: Integer,
|
|
433
465
|
avs: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs,
|
|
434
466
|
card: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card,
|
|
@@ -472,6 +504,275 @@ module Lithic
|
|
|
472
504
|
def to_hash
|
|
473
505
|
end
|
|
474
506
|
|
|
507
|
+
class Amounts < Lithic::Internal::Type::BaseModel
|
|
508
|
+
OrHash =
|
|
509
|
+
T.type_alias do
|
|
510
|
+
T.any(
|
|
511
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts,
|
|
512
|
+
Lithic::Internal::AnyHash
|
|
513
|
+
)
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
sig do
|
|
517
|
+
returns(
|
|
518
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder
|
|
519
|
+
)
|
|
520
|
+
end
|
|
521
|
+
attr_reader :cardholder
|
|
522
|
+
|
|
523
|
+
sig do
|
|
524
|
+
params(
|
|
525
|
+
cardholder:
|
|
526
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder::OrHash
|
|
527
|
+
).void
|
|
528
|
+
end
|
|
529
|
+
attr_writer :cardholder
|
|
530
|
+
|
|
531
|
+
sig do
|
|
532
|
+
returns(
|
|
533
|
+
T.nilable(
|
|
534
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold
|
|
535
|
+
)
|
|
536
|
+
)
|
|
537
|
+
end
|
|
538
|
+
attr_reader :hold
|
|
539
|
+
|
|
540
|
+
sig do
|
|
541
|
+
params(
|
|
542
|
+
hold:
|
|
543
|
+
T.nilable(
|
|
544
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold::OrHash
|
|
545
|
+
)
|
|
546
|
+
).void
|
|
547
|
+
end
|
|
548
|
+
attr_writer :hold
|
|
549
|
+
|
|
550
|
+
sig do
|
|
551
|
+
returns(
|
|
552
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant
|
|
553
|
+
)
|
|
554
|
+
end
|
|
555
|
+
attr_reader :merchant
|
|
556
|
+
|
|
557
|
+
sig do
|
|
558
|
+
params(
|
|
559
|
+
merchant:
|
|
560
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant::OrHash
|
|
561
|
+
).void
|
|
562
|
+
end
|
|
563
|
+
attr_writer :merchant
|
|
564
|
+
|
|
565
|
+
sig do
|
|
566
|
+
returns(
|
|
567
|
+
T.nilable(
|
|
568
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement
|
|
569
|
+
)
|
|
570
|
+
)
|
|
571
|
+
end
|
|
572
|
+
attr_reader :settlement
|
|
573
|
+
|
|
574
|
+
sig do
|
|
575
|
+
params(
|
|
576
|
+
settlement:
|
|
577
|
+
T.nilable(
|
|
578
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement::OrHash
|
|
579
|
+
)
|
|
580
|
+
).void
|
|
581
|
+
end
|
|
582
|
+
attr_writer :settlement
|
|
583
|
+
|
|
584
|
+
# Structured amounts for this authorization. The `cardholder` and `merchant`
|
|
585
|
+
# amounts reflect the original network authorization values. For programs with
|
|
586
|
+
# hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
|
|
587
|
+
# `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
|
|
588
|
+
# anticipated final transaction amounts such as tips or fuel fill-ups
|
|
589
|
+
sig do
|
|
590
|
+
params(
|
|
591
|
+
cardholder:
|
|
592
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder::OrHash,
|
|
593
|
+
hold:
|
|
594
|
+
T.nilable(
|
|
595
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold::OrHash
|
|
596
|
+
),
|
|
597
|
+
merchant:
|
|
598
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant::OrHash,
|
|
599
|
+
settlement:
|
|
600
|
+
T.nilable(
|
|
601
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement::OrHash
|
|
602
|
+
)
|
|
603
|
+
).returns(T.attached_class)
|
|
604
|
+
end
|
|
605
|
+
def self.new(cardholder:, hold:, merchant:, settlement:)
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
sig do
|
|
609
|
+
override.returns(
|
|
610
|
+
{
|
|
611
|
+
cardholder:
|
|
612
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder,
|
|
613
|
+
hold:
|
|
614
|
+
T.nilable(
|
|
615
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold
|
|
616
|
+
),
|
|
617
|
+
merchant:
|
|
618
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant,
|
|
619
|
+
settlement:
|
|
620
|
+
T.nilable(
|
|
621
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement
|
|
622
|
+
)
|
|
623
|
+
}
|
|
624
|
+
)
|
|
625
|
+
end
|
|
626
|
+
def to_hash
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
class Cardholder < Lithic::Internal::Type::BaseModel
|
|
630
|
+
OrHash =
|
|
631
|
+
T.type_alias do
|
|
632
|
+
T.any(
|
|
633
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder,
|
|
634
|
+
Lithic::Internal::AnyHash
|
|
635
|
+
)
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
# Amount in the smallest unit of the applicable currency (e.g., cents)
|
|
639
|
+
sig { returns(Integer) }
|
|
640
|
+
attr_accessor :amount
|
|
641
|
+
|
|
642
|
+
# Exchange rate used for currency conversion
|
|
643
|
+
sig { returns(String) }
|
|
644
|
+
attr_accessor :conversion_rate
|
|
645
|
+
|
|
646
|
+
# 3-character alphabetic ISO 4217 currency
|
|
647
|
+
sig { returns(String) }
|
|
648
|
+
attr_accessor :currency
|
|
649
|
+
|
|
650
|
+
sig do
|
|
651
|
+
params(
|
|
652
|
+
amount: Integer,
|
|
653
|
+
conversion_rate: String,
|
|
654
|
+
currency: String
|
|
655
|
+
).returns(T.attached_class)
|
|
656
|
+
end
|
|
657
|
+
def self.new(
|
|
658
|
+
# Amount in the smallest unit of the applicable currency (e.g., cents)
|
|
659
|
+
amount:,
|
|
660
|
+
# Exchange rate used for currency conversion
|
|
661
|
+
conversion_rate:,
|
|
662
|
+
# 3-character alphabetic ISO 4217 currency
|
|
663
|
+
currency:
|
|
664
|
+
)
|
|
665
|
+
end
|
|
666
|
+
|
|
667
|
+
sig do
|
|
668
|
+
override.returns(
|
|
669
|
+
{ amount: Integer, conversion_rate: String, currency: String }
|
|
670
|
+
)
|
|
671
|
+
end
|
|
672
|
+
def to_hash
|
|
673
|
+
end
|
|
674
|
+
end
|
|
675
|
+
|
|
676
|
+
class Hold < Lithic::Internal::Type::BaseModel
|
|
677
|
+
OrHash =
|
|
678
|
+
T.type_alias do
|
|
679
|
+
T.any(
|
|
680
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold,
|
|
681
|
+
Lithic::Internal::AnyHash
|
|
682
|
+
)
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
# Amount in the smallest unit of the applicable currency (e.g., cents)
|
|
686
|
+
sig { returns(Integer) }
|
|
687
|
+
attr_accessor :amount
|
|
688
|
+
|
|
689
|
+
# 3-character alphabetic ISO 4217 currency
|
|
690
|
+
sig { returns(String) }
|
|
691
|
+
attr_accessor :currency
|
|
692
|
+
|
|
693
|
+
sig do
|
|
694
|
+
params(amount: Integer, currency: String).returns(T.attached_class)
|
|
695
|
+
end
|
|
696
|
+
def self.new(
|
|
697
|
+
# Amount in the smallest unit of the applicable currency (e.g., cents)
|
|
698
|
+
amount:,
|
|
699
|
+
# 3-character alphabetic ISO 4217 currency
|
|
700
|
+
currency:
|
|
701
|
+
)
|
|
702
|
+
end
|
|
703
|
+
|
|
704
|
+
sig { override.returns({ amount: Integer, currency: String }) }
|
|
705
|
+
def to_hash
|
|
706
|
+
end
|
|
707
|
+
end
|
|
708
|
+
|
|
709
|
+
class Merchant < Lithic::Internal::Type::BaseModel
|
|
710
|
+
OrHash =
|
|
711
|
+
T.type_alias do
|
|
712
|
+
T.any(
|
|
713
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant,
|
|
714
|
+
Lithic::Internal::AnyHash
|
|
715
|
+
)
|
|
716
|
+
end
|
|
717
|
+
|
|
718
|
+
# Amount in the smallest unit of the applicable currency (e.g., cents)
|
|
719
|
+
sig { returns(Integer) }
|
|
720
|
+
attr_accessor :amount
|
|
721
|
+
|
|
722
|
+
# 3-character alphabetic ISO 4217 currency
|
|
723
|
+
sig { returns(String) }
|
|
724
|
+
attr_accessor :currency
|
|
725
|
+
|
|
726
|
+
sig do
|
|
727
|
+
params(amount: Integer, currency: String).returns(T.attached_class)
|
|
728
|
+
end
|
|
729
|
+
def self.new(
|
|
730
|
+
# Amount in the smallest unit of the applicable currency (e.g., cents)
|
|
731
|
+
amount:,
|
|
732
|
+
# 3-character alphabetic ISO 4217 currency
|
|
733
|
+
currency:
|
|
734
|
+
)
|
|
735
|
+
end
|
|
736
|
+
|
|
737
|
+
sig { override.returns({ amount: Integer, currency: String }) }
|
|
738
|
+
def to_hash
|
|
739
|
+
end
|
|
740
|
+
end
|
|
741
|
+
|
|
742
|
+
class Settlement < Lithic::Internal::Type::BaseModel
|
|
743
|
+
OrHash =
|
|
744
|
+
T.type_alias do
|
|
745
|
+
T.any(
|
|
746
|
+
Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement,
|
|
747
|
+
Lithic::Internal::AnyHash
|
|
748
|
+
)
|
|
749
|
+
end
|
|
750
|
+
|
|
751
|
+
# Amount in the smallest unit of the applicable currency (e.g., cents)
|
|
752
|
+
sig { returns(Integer) }
|
|
753
|
+
attr_accessor :amount
|
|
754
|
+
|
|
755
|
+
# 3-character alphabetic ISO 4217 currency
|
|
756
|
+
sig { returns(String) }
|
|
757
|
+
attr_accessor :currency
|
|
758
|
+
|
|
759
|
+
sig do
|
|
760
|
+
params(amount: Integer, currency: String).returns(T.attached_class)
|
|
761
|
+
end
|
|
762
|
+
def self.new(
|
|
763
|
+
# Amount in the smallest unit of the applicable currency (e.g., cents)
|
|
764
|
+
amount:,
|
|
765
|
+
# 3-character alphabetic ISO 4217 currency
|
|
766
|
+
currency:
|
|
767
|
+
)
|
|
768
|
+
end
|
|
769
|
+
|
|
770
|
+
sig { override.returns({ amount: Integer, currency: String }) }
|
|
771
|
+
def to_hash
|
|
772
|
+
end
|
|
773
|
+
end
|
|
774
|
+
end
|
|
775
|
+
|
|
475
776
|
class Avs < Lithic::Internal::Type::BaseModel
|
|
476
777
|
OrHash =
|
|
477
778
|
T.type_alias do
|