increase 1.157.0 → 1.159.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 +16 -0
- data/README.md +1 -1
- data/lib/increase/models/card_payment.rb +1313 -255
- data/lib/increase/models/simulations/card_balance_inquiry_create_params.rb +279 -0
- data/lib/increase/resources/simulations/card_balance_inquiries.rb +70 -0
- data/lib/increase/resources/simulations.rb +4 -0
- data/lib/increase/version.rb +1 -1
- data/lib/increase.rb +2 -0
- data/rbi/increase/models/card_payment.rbi +2275 -244
- data/rbi/increase/models/simulations/card_balance_inquiry_create_params.rbi +587 -0
- data/rbi/increase/resources/simulations/card_balance_inquiries.rbi +80 -0
- data/rbi/increase/resources/simulations.rbi +3 -0
- data/sig/increase/models/card_payment.rbs +940 -254
- data/sig/increase/models/simulations/card_balance_inquiry_create_params.rbs +294 -0
- data/sig/increase/resources/simulations/card_balance_inquiries.rbs +28 -0
- data/sig/increase/resources/simulations.rbs +2 -0
- metadata +8 -2
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Increase
|
|
4
|
+
module Models
|
|
5
|
+
module Simulations
|
|
6
|
+
class CardBalanceInquiryCreateParams < Increase::Internal::Type::BaseModel
|
|
7
|
+
extend Increase::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Increase::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Increase::Simulations::CardBalanceInquiryCreateParams,
|
|
14
|
+
Increase::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# The balance amount in cents. The account balance will be used if not provided.
|
|
19
|
+
sig { returns(T.nilable(Integer)) }
|
|
20
|
+
attr_reader :balance
|
|
21
|
+
|
|
22
|
+
sig { params(balance: Integer).void }
|
|
23
|
+
attr_writer :balance
|
|
24
|
+
|
|
25
|
+
# The identifier of the Card to be authorized.
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :card_id
|
|
28
|
+
|
|
29
|
+
sig { params(card_id: String).void }
|
|
30
|
+
attr_writer :card_id
|
|
31
|
+
|
|
32
|
+
# Forces a card decline with a specific reason. No real time decision will be
|
|
33
|
+
# sent.
|
|
34
|
+
sig do
|
|
35
|
+
returns(
|
|
36
|
+
T.nilable(
|
|
37
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::OrSymbol
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
attr_reader :decline_reason
|
|
42
|
+
|
|
43
|
+
sig do
|
|
44
|
+
params(
|
|
45
|
+
decline_reason:
|
|
46
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::OrSymbol
|
|
47
|
+
).void
|
|
48
|
+
end
|
|
49
|
+
attr_writer :decline_reason
|
|
50
|
+
|
|
51
|
+
# The identifier of the Digital Wallet Token to be authorized.
|
|
52
|
+
sig { returns(T.nilable(String)) }
|
|
53
|
+
attr_reader :digital_wallet_token_id
|
|
54
|
+
|
|
55
|
+
sig { params(digital_wallet_token_id: String).void }
|
|
56
|
+
attr_writer :digital_wallet_token_id
|
|
57
|
+
|
|
58
|
+
# The identifier of the Event Subscription to use. If provided, will override the
|
|
59
|
+
# default real time event subscription. Because you can only create one real time
|
|
60
|
+
# decision event subscription, you can use this field to route events to any
|
|
61
|
+
# specified event subscription for testing purposes.
|
|
62
|
+
sig { returns(T.nilable(String)) }
|
|
63
|
+
attr_reader :event_subscription_id
|
|
64
|
+
|
|
65
|
+
sig { params(event_subscription_id: String).void }
|
|
66
|
+
attr_writer :event_subscription_id
|
|
67
|
+
|
|
68
|
+
# The merchant identifier (commonly abbreviated as MID) of the merchant the card
|
|
69
|
+
# is transacting with.
|
|
70
|
+
sig { returns(T.nilable(String)) }
|
|
71
|
+
attr_reader :merchant_acceptor_id
|
|
72
|
+
|
|
73
|
+
sig { params(merchant_acceptor_id: String).void }
|
|
74
|
+
attr_writer :merchant_acceptor_id
|
|
75
|
+
|
|
76
|
+
# The Merchant Category Code (commonly abbreviated as MCC) of the merchant the
|
|
77
|
+
# card is transacting with.
|
|
78
|
+
sig { returns(T.nilable(String)) }
|
|
79
|
+
attr_reader :merchant_category_code
|
|
80
|
+
|
|
81
|
+
sig { params(merchant_category_code: String).void }
|
|
82
|
+
attr_writer :merchant_category_code
|
|
83
|
+
|
|
84
|
+
# The city the merchant resides in.
|
|
85
|
+
sig { returns(T.nilable(String)) }
|
|
86
|
+
attr_reader :merchant_city
|
|
87
|
+
|
|
88
|
+
sig { params(merchant_city: String).void }
|
|
89
|
+
attr_writer :merchant_city
|
|
90
|
+
|
|
91
|
+
# The country the merchant resides in.
|
|
92
|
+
sig { returns(T.nilable(String)) }
|
|
93
|
+
attr_reader :merchant_country
|
|
94
|
+
|
|
95
|
+
sig { params(merchant_country: String).void }
|
|
96
|
+
attr_writer :merchant_country
|
|
97
|
+
|
|
98
|
+
# The merchant descriptor of the merchant the card is transacting with.
|
|
99
|
+
sig { returns(T.nilable(String)) }
|
|
100
|
+
attr_reader :merchant_descriptor
|
|
101
|
+
|
|
102
|
+
sig { params(merchant_descriptor: String).void }
|
|
103
|
+
attr_writer :merchant_descriptor
|
|
104
|
+
|
|
105
|
+
# The state the merchant resides in.
|
|
106
|
+
sig { returns(T.nilable(String)) }
|
|
107
|
+
attr_reader :merchant_state
|
|
108
|
+
|
|
109
|
+
sig { params(merchant_state: String).void }
|
|
110
|
+
attr_writer :merchant_state
|
|
111
|
+
|
|
112
|
+
# Fields specific to a given card network.
|
|
113
|
+
sig do
|
|
114
|
+
returns(
|
|
115
|
+
T.nilable(
|
|
116
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails
|
|
117
|
+
)
|
|
118
|
+
)
|
|
119
|
+
end
|
|
120
|
+
attr_reader :network_details
|
|
121
|
+
|
|
122
|
+
sig do
|
|
123
|
+
params(
|
|
124
|
+
network_details:
|
|
125
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::OrHash
|
|
126
|
+
).void
|
|
127
|
+
end
|
|
128
|
+
attr_writer :network_details
|
|
129
|
+
|
|
130
|
+
# The risk score generated by the card network. For Visa this is the Visa Advanced
|
|
131
|
+
# Authorization risk score, from 0 to 99, where 99 is the riskiest.
|
|
132
|
+
sig { returns(T.nilable(Integer)) }
|
|
133
|
+
attr_reader :network_risk_score
|
|
134
|
+
|
|
135
|
+
sig { params(network_risk_score: Integer).void }
|
|
136
|
+
attr_writer :network_risk_score
|
|
137
|
+
|
|
138
|
+
# The identifier of the Physical Card to be authorized.
|
|
139
|
+
sig { returns(T.nilable(String)) }
|
|
140
|
+
attr_reader :physical_card_id
|
|
141
|
+
|
|
142
|
+
sig { params(physical_card_id: String).void }
|
|
143
|
+
attr_writer :physical_card_id
|
|
144
|
+
|
|
145
|
+
# The terminal identifier (commonly abbreviated as TID) of the terminal the card
|
|
146
|
+
# is transacting with.
|
|
147
|
+
sig { returns(T.nilable(String)) }
|
|
148
|
+
attr_reader :terminal_id
|
|
149
|
+
|
|
150
|
+
sig { params(terminal_id: String).void }
|
|
151
|
+
attr_writer :terminal_id
|
|
152
|
+
|
|
153
|
+
sig do
|
|
154
|
+
params(
|
|
155
|
+
balance: Integer,
|
|
156
|
+
card_id: String,
|
|
157
|
+
decline_reason:
|
|
158
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::OrSymbol,
|
|
159
|
+
digital_wallet_token_id: String,
|
|
160
|
+
event_subscription_id: String,
|
|
161
|
+
merchant_acceptor_id: String,
|
|
162
|
+
merchant_category_code: String,
|
|
163
|
+
merchant_city: String,
|
|
164
|
+
merchant_country: String,
|
|
165
|
+
merchant_descriptor: String,
|
|
166
|
+
merchant_state: String,
|
|
167
|
+
network_details:
|
|
168
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::OrHash,
|
|
169
|
+
network_risk_score: Integer,
|
|
170
|
+
physical_card_id: String,
|
|
171
|
+
terminal_id: String,
|
|
172
|
+
request_options: Increase::RequestOptions::OrHash
|
|
173
|
+
).returns(T.attached_class)
|
|
174
|
+
end
|
|
175
|
+
def self.new(
|
|
176
|
+
# The balance amount in cents. The account balance will be used if not provided.
|
|
177
|
+
balance: nil,
|
|
178
|
+
# The identifier of the Card to be authorized.
|
|
179
|
+
card_id: nil,
|
|
180
|
+
# Forces a card decline with a specific reason. No real time decision will be
|
|
181
|
+
# sent.
|
|
182
|
+
decline_reason: nil,
|
|
183
|
+
# The identifier of the Digital Wallet Token to be authorized.
|
|
184
|
+
digital_wallet_token_id: nil,
|
|
185
|
+
# The identifier of the Event Subscription to use. If provided, will override the
|
|
186
|
+
# default real time event subscription. Because you can only create one real time
|
|
187
|
+
# decision event subscription, you can use this field to route events to any
|
|
188
|
+
# specified event subscription for testing purposes.
|
|
189
|
+
event_subscription_id: nil,
|
|
190
|
+
# The merchant identifier (commonly abbreviated as MID) of the merchant the card
|
|
191
|
+
# is transacting with.
|
|
192
|
+
merchant_acceptor_id: nil,
|
|
193
|
+
# The Merchant Category Code (commonly abbreviated as MCC) of the merchant the
|
|
194
|
+
# card is transacting with.
|
|
195
|
+
merchant_category_code: nil,
|
|
196
|
+
# The city the merchant resides in.
|
|
197
|
+
merchant_city: nil,
|
|
198
|
+
# The country the merchant resides in.
|
|
199
|
+
merchant_country: nil,
|
|
200
|
+
# The merchant descriptor of the merchant the card is transacting with.
|
|
201
|
+
merchant_descriptor: nil,
|
|
202
|
+
# The state the merchant resides in.
|
|
203
|
+
merchant_state: nil,
|
|
204
|
+
# Fields specific to a given card network.
|
|
205
|
+
network_details: nil,
|
|
206
|
+
# The risk score generated by the card network. For Visa this is the Visa Advanced
|
|
207
|
+
# Authorization risk score, from 0 to 99, where 99 is the riskiest.
|
|
208
|
+
network_risk_score: nil,
|
|
209
|
+
# The identifier of the Physical Card to be authorized.
|
|
210
|
+
physical_card_id: nil,
|
|
211
|
+
# The terminal identifier (commonly abbreviated as TID) of the terminal the card
|
|
212
|
+
# is transacting with.
|
|
213
|
+
terminal_id: nil,
|
|
214
|
+
request_options: {}
|
|
215
|
+
)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
sig do
|
|
219
|
+
override.returns(
|
|
220
|
+
{
|
|
221
|
+
balance: Integer,
|
|
222
|
+
card_id: String,
|
|
223
|
+
decline_reason:
|
|
224
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::OrSymbol,
|
|
225
|
+
digital_wallet_token_id: String,
|
|
226
|
+
event_subscription_id: String,
|
|
227
|
+
merchant_acceptor_id: String,
|
|
228
|
+
merchant_category_code: String,
|
|
229
|
+
merchant_city: String,
|
|
230
|
+
merchant_country: String,
|
|
231
|
+
merchant_descriptor: String,
|
|
232
|
+
merchant_state: String,
|
|
233
|
+
network_details:
|
|
234
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails,
|
|
235
|
+
network_risk_score: Integer,
|
|
236
|
+
physical_card_id: String,
|
|
237
|
+
terminal_id: String,
|
|
238
|
+
request_options: Increase::RequestOptions
|
|
239
|
+
}
|
|
240
|
+
)
|
|
241
|
+
end
|
|
242
|
+
def to_hash
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Forces a card decline with a specific reason. No real time decision will be
|
|
246
|
+
# sent.
|
|
247
|
+
module DeclineReason
|
|
248
|
+
extend Increase::Internal::Type::Enum
|
|
249
|
+
|
|
250
|
+
TaggedSymbol =
|
|
251
|
+
T.type_alias do
|
|
252
|
+
T.all(
|
|
253
|
+
Symbol,
|
|
254
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason
|
|
255
|
+
)
|
|
256
|
+
end
|
|
257
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
258
|
+
|
|
259
|
+
# The account has been closed.
|
|
260
|
+
ACCOUNT_CLOSED =
|
|
261
|
+
T.let(
|
|
262
|
+
:account_closed,
|
|
263
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
# The Card was not active.
|
|
267
|
+
CARD_NOT_ACTIVE =
|
|
268
|
+
T.let(
|
|
269
|
+
:card_not_active,
|
|
270
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
# The Card has been canceled.
|
|
274
|
+
CARD_CANCELED =
|
|
275
|
+
T.let(
|
|
276
|
+
:card_canceled,
|
|
277
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
# The Physical Card was not active.
|
|
281
|
+
PHYSICAL_CARD_NOT_ACTIVE =
|
|
282
|
+
T.let(
|
|
283
|
+
:physical_card_not_active,
|
|
284
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
# The account's entity was not active.
|
|
288
|
+
ENTITY_NOT_ACTIVE =
|
|
289
|
+
T.let(
|
|
290
|
+
:entity_not_active,
|
|
291
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
# The account was inactive.
|
|
295
|
+
GROUP_LOCKED =
|
|
296
|
+
T.let(
|
|
297
|
+
:group_locked,
|
|
298
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
# The Card's Account did not have a sufficient available balance.
|
|
302
|
+
INSUFFICIENT_FUNDS =
|
|
303
|
+
T.let(
|
|
304
|
+
:insufficient_funds,
|
|
305
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
# The given CVV2 did not match the card's value.
|
|
309
|
+
CVV2_MISMATCH =
|
|
310
|
+
T.let(
|
|
311
|
+
:cvv2_mismatch,
|
|
312
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
# The given PIN did not match the card's value.
|
|
316
|
+
PIN_MISMATCH =
|
|
317
|
+
T.let(
|
|
318
|
+
:pin_mismatch,
|
|
319
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
# The given expiration date did not match the card's value. Only applies when a CVV2 is present.
|
|
323
|
+
CARD_EXPIRATION_MISMATCH =
|
|
324
|
+
T.let(
|
|
325
|
+
:card_expiration_mismatch,
|
|
326
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
# The attempted card transaction is not allowed per Increase's terms.
|
|
330
|
+
TRANSACTION_NOT_ALLOWED =
|
|
331
|
+
T.let(
|
|
332
|
+
:transaction_not_allowed,
|
|
333
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
# The transaction was blocked by a Limit.
|
|
337
|
+
BREACHES_LIMIT =
|
|
338
|
+
T.let(
|
|
339
|
+
:breaches_limit,
|
|
340
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
# Your application declined the transaction via webhook.
|
|
344
|
+
WEBHOOK_DECLINED =
|
|
345
|
+
T.let(
|
|
346
|
+
:webhook_declined,
|
|
347
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
348
|
+
)
|
|
349
|
+
|
|
350
|
+
# Your application webhook did not respond without the required timeout.
|
|
351
|
+
WEBHOOK_TIMED_OUT =
|
|
352
|
+
T.let(
|
|
353
|
+
:webhook_timed_out,
|
|
354
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
# Declined by stand-in processing.
|
|
358
|
+
DECLINED_BY_STAND_IN_PROCESSING =
|
|
359
|
+
T.let(
|
|
360
|
+
:declined_by_stand_in_processing,
|
|
361
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
362
|
+
)
|
|
363
|
+
|
|
364
|
+
# The card read had an invalid CVV, dCVV, or authorization request cryptogram.
|
|
365
|
+
INVALID_PHYSICAL_CARD =
|
|
366
|
+
T.let(
|
|
367
|
+
:invalid_physical_card,
|
|
368
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
# The original card authorization for this incremental authorization does not exist.
|
|
372
|
+
MISSING_ORIGINAL_AUTHORIZATION =
|
|
373
|
+
T.let(
|
|
374
|
+
:missing_original_authorization,
|
|
375
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
376
|
+
)
|
|
377
|
+
|
|
378
|
+
# The transaction was declined because the 3DS authentication failed.
|
|
379
|
+
FAILED_3DS_AUTHENTICATION =
|
|
380
|
+
T.let(
|
|
381
|
+
:failed_3ds_authentication,
|
|
382
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
# The transaction was suspected to be used by a card tester to test for valid card numbers.
|
|
386
|
+
SUSPECTED_CARD_TESTING =
|
|
387
|
+
T.let(
|
|
388
|
+
:suspected_card_testing,
|
|
389
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
390
|
+
)
|
|
391
|
+
|
|
392
|
+
# The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information.
|
|
393
|
+
SUSPECTED_FRAUD =
|
|
394
|
+
T.let(
|
|
395
|
+
:suspected_fraud,
|
|
396
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
sig do
|
|
400
|
+
override.returns(
|
|
401
|
+
T::Array[
|
|
402
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol
|
|
403
|
+
]
|
|
404
|
+
)
|
|
405
|
+
end
|
|
406
|
+
def self.values
|
|
407
|
+
end
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
class NetworkDetails < Increase::Internal::Type::BaseModel
|
|
411
|
+
OrHash =
|
|
412
|
+
T.type_alias do
|
|
413
|
+
T.any(
|
|
414
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails,
|
|
415
|
+
Increase::Internal::AnyHash
|
|
416
|
+
)
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
# Fields specific to the Visa network.
|
|
420
|
+
sig do
|
|
421
|
+
returns(
|
|
422
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa
|
|
423
|
+
)
|
|
424
|
+
end
|
|
425
|
+
attr_reader :visa
|
|
426
|
+
|
|
427
|
+
sig do
|
|
428
|
+
params(
|
|
429
|
+
visa:
|
|
430
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::OrHash
|
|
431
|
+
).void
|
|
432
|
+
end
|
|
433
|
+
attr_writer :visa
|
|
434
|
+
|
|
435
|
+
# Fields specific to a given card network.
|
|
436
|
+
sig do
|
|
437
|
+
params(
|
|
438
|
+
visa:
|
|
439
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::OrHash
|
|
440
|
+
).returns(T.attached_class)
|
|
441
|
+
end
|
|
442
|
+
def self.new(
|
|
443
|
+
# Fields specific to the Visa network.
|
|
444
|
+
visa:
|
|
445
|
+
)
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
sig do
|
|
449
|
+
override.returns(
|
|
450
|
+
{
|
|
451
|
+
visa:
|
|
452
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa
|
|
453
|
+
}
|
|
454
|
+
)
|
|
455
|
+
end
|
|
456
|
+
def to_hash
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
class Visa < Increase::Internal::Type::BaseModel
|
|
460
|
+
OrHash =
|
|
461
|
+
T.type_alias do
|
|
462
|
+
T.any(
|
|
463
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa,
|
|
464
|
+
Increase::Internal::AnyHash
|
|
465
|
+
)
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
# The reason code for the stand-in processing.
|
|
469
|
+
sig do
|
|
470
|
+
returns(
|
|
471
|
+
T.nilable(
|
|
472
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::OrSymbol
|
|
473
|
+
)
|
|
474
|
+
)
|
|
475
|
+
end
|
|
476
|
+
attr_reader :stand_in_processing_reason
|
|
477
|
+
|
|
478
|
+
sig do
|
|
479
|
+
params(
|
|
480
|
+
stand_in_processing_reason:
|
|
481
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::OrSymbol
|
|
482
|
+
).void
|
|
483
|
+
end
|
|
484
|
+
attr_writer :stand_in_processing_reason
|
|
485
|
+
|
|
486
|
+
# Fields specific to the Visa network.
|
|
487
|
+
sig do
|
|
488
|
+
params(
|
|
489
|
+
stand_in_processing_reason:
|
|
490
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::OrSymbol
|
|
491
|
+
).returns(T.attached_class)
|
|
492
|
+
end
|
|
493
|
+
def self.new(
|
|
494
|
+
# The reason code for the stand-in processing.
|
|
495
|
+
stand_in_processing_reason: nil
|
|
496
|
+
)
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
sig do
|
|
500
|
+
override.returns(
|
|
501
|
+
{
|
|
502
|
+
stand_in_processing_reason:
|
|
503
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::OrSymbol
|
|
504
|
+
}
|
|
505
|
+
)
|
|
506
|
+
end
|
|
507
|
+
def to_hash
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
# The reason code for the stand-in processing.
|
|
511
|
+
module StandInProcessingReason
|
|
512
|
+
extend Increase::Internal::Type::Enum
|
|
513
|
+
|
|
514
|
+
TaggedSymbol =
|
|
515
|
+
T.type_alias do
|
|
516
|
+
T.all(
|
|
517
|
+
Symbol,
|
|
518
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason
|
|
519
|
+
)
|
|
520
|
+
end
|
|
521
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
522
|
+
|
|
523
|
+
# Increase failed to process the authorization in a timely manner.
|
|
524
|
+
ISSUER_ERROR =
|
|
525
|
+
T.let(
|
|
526
|
+
:issuer_error,
|
|
527
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol
|
|
528
|
+
)
|
|
529
|
+
|
|
530
|
+
# The physical card read had an invalid CVV, dCVV, or authorization request cryptogram.
|
|
531
|
+
INVALID_PHYSICAL_CARD =
|
|
532
|
+
T.let(
|
|
533
|
+
:invalid_physical_card,
|
|
534
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol
|
|
535
|
+
)
|
|
536
|
+
|
|
537
|
+
# The 3DS cardholder authentication verification value was invalid.
|
|
538
|
+
INVALID_CARDHOLDER_AUTHENTICATION_VERIFICATION_VALUE =
|
|
539
|
+
T.let(
|
|
540
|
+
:invalid_cardholder_authentication_verification_value,
|
|
541
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol
|
|
542
|
+
)
|
|
543
|
+
|
|
544
|
+
# An internal Visa error occurred. Visa uses this reason code for certain expected occurrences as well, such as Application Transaction Counter (ATC) replays.
|
|
545
|
+
INTERNAL_VISA_ERROR =
|
|
546
|
+
T.let(
|
|
547
|
+
:internal_visa_error,
|
|
548
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
# The merchant has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier.
|
|
552
|
+
MERCHANT_TRANSACTION_ADVISORY_SERVICE_AUTHENTICATION_REQUIRED =
|
|
553
|
+
T.let(
|
|
554
|
+
:merchant_transaction_advisory_service_authentication_required,
|
|
555
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol
|
|
556
|
+
)
|
|
557
|
+
|
|
558
|
+
# The transaction was blocked by Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, such as card testing.
|
|
559
|
+
PAYMENT_FRAUD_DISRUPTION_ACQUIRER_BLOCK =
|
|
560
|
+
T.let(
|
|
561
|
+
:payment_fraud_disruption_acquirer_block,
|
|
562
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol
|
|
563
|
+
)
|
|
564
|
+
|
|
565
|
+
# An unspecific reason for stand-in processing.
|
|
566
|
+
OTHER =
|
|
567
|
+
T.let(
|
|
568
|
+
:other,
|
|
569
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol
|
|
570
|
+
)
|
|
571
|
+
|
|
572
|
+
sig do
|
|
573
|
+
override.returns(
|
|
574
|
+
T::Array[
|
|
575
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol
|
|
576
|
+
]
|
|
577
|
+
)
|
|
578
|
+
end
|
|
579
|
+
def self.values
|
|
580
|
+
end
|
|
581
|
+
end
|
|
582
|
+
end
|
|
583
|
+
end
|
|
584
|
+
end
|
|
585
|
+
end
|
|
586
|
+
end
|
|
587
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Increase
|
|
4
|
+
module Resources
|
|
5
|
+
class Simulations
|
|
6
|
+
class CardBalanceInquiries
|
|
7
|
+
# Simulates a balance inquiry on a [Card](#cards).
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
balance: Integer,
|
|
11
|
+
card_id: String,
|
|
12
|
+
decline_reason:
|
|
13
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::OrSymbol,
|
|
14
|
+
digital_wallet_token_id: String,
|
|
15
|
+
event_subscription_id: String,
|
|
16
|
+
merchant_acceptor_id: String,
|
|
17
|
+
merchant_category_code: String,
|
|
18
|
+
merchant_city: String,
|
|
19
|
+
merchant_country: String,
|
|
20
|
+
merchant_descriptor: String,
|
|
21
|
+
merchant_state: String,
|
|
22
|
+
network_details:
|
|
23
|
+
Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::OrHash,
|
|
24
|
+
network_risk_score: Integer,
|
|
25
|
+
physical_card_id: String,
|
|
26
|
+
terminal_id: String,
|
|
27
|
+
request_options: Increase::RequestOptions::OrHash
|
|
28
|
+
).returns(Increase::CardPayment)
|
|
29
|
+
end
|
|
30
|
+
def create(
|
|
31
|
+
# The balance amount in cents. The account balance will be used if not provided.
|
|
32
|
+
balance: nil,
|
|
33
|
+
# The identifier of the Card to be authorized.
|
|
34
|
+
card_id: nil,
|
|
35
|
+
# Forces a card decline with a specific reason. No real time decision will be
|
|
36
|
+
# sent.
|
|
37
|
+
decline_reason: nil,
|
|
38
|
+
# The identifier of the Digital Wallet Token to be authorized.
|
|
39
|
+
digital_wallet_token_id: nil,
|
|
40
|
+
# The identifier of the Event Subscription to use. If provided, will override the
|
|
41
|
+
# default real time event subscription. Because you can only create one real time
|
|
42
|
+
# decision event subscription, you can use this field to route events to any
|
|
43
|
+
# specified event subscription for testing purposes.
|
|
44
|
+
event_subscription_id: nil,
|
|
45
|
+
# The merchant identifier (commonly abbreviated as MID) of the merchant the card
|
|
46
|
+
# is transacting with.
|
|
47
|
+
merchant_acceptor_id: nil,
|
|
48
|
+
# The Merchant Category Code (commonly abbreviated as MCC) of the merchant the
|
|
49
|
+
# card is transacting with.
|
|
50
|
+
merchant_category_code: nil,
|
|
51
|
+
# The city the merchant resides in.
|
|
52
|
+
merchant_city: nil,
|
|
53
|
+
# The country the merchant resides in.
|
|
54
|
+
merchant_country: nil,
|
|
55
|
+
# The merchant descriptor of the merchant the card is transacting with.
|
|
56
|
+
merchant_descriptor: nil,
|
|
57
|
+
# The state the merchant resides in.
|
|
58
|
+
merchant_state: nil,
|
|
59
|
+
# Fields specific to a given card network.
|
|
60
|
+
network_details: nil,
|
|
61
|
+
# The risk score generated by the card network. For Visa this is the Visa Advanced
|
|
62
|
+
# Authorization risk score, from 0 to 99, where 99 is the riskiest.
|
|
63
|
+
network_risk_score: nil,
|
|
64
|
+
# The identifier of the Physical Card to be authorized.
|
|
65
|
+
physical_card_id: nil,
|
|
66
|
+
# The terminal identifier (commonly abbreviated as TID) of the terminal the card
|
|
67
|
+
# is transacting with.
|
|
68
|
+
terminal_id: nil,
|
|
69
|
+
request_options: {}
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# @api private
|
|
74
|
+
sig { params(client: Increase::Client).returns(T.attached_class) }
|
|
75
|
+
def self.new(client:)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -12,6 +12,9 @@ module Increase
|
|
|
12
12
|
sig { returns(Increase::Resources::Simulations::CardAuthorizations) }
|
|
13
13
|
attr_reader :card_authorizations
|
|
14
14
|
|
|
15
|
+
sig { returns(Increase::Resources::Simulations::CardBalanceInquiries) }
|
|
16
|
+
attr_reader :card_balance_inquiries
|
|
17
|
+
|
|
15
18
|
sig do
|
|
16
19
|
returns(Increase::Resources::Simulations::CardAuthorizationExpirations)
|
|
17
20
|
end
|