increase 1.240.0 → 1.242.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/client.rb +7 -0
- data/lib/increase/models/card_payment.rb +9 -1
- data/lib/increase/resources/events.rb +11 -1
- data/lib/increase/version.rb +1 -1
- data/lib/increase.rb +1 -0
- data/rbi/increase/client.rbi +6 -0
- data/rbi/increase/models/card_payment.rbi +8 -0
- data/rbi/increase/resources/events.rbi +12 -2
- data/sig/increase/client.rbs +3 -0
- data/sig/increase/models/card_payment.rbs +5 -0
- data/sig/increase/resources/events.rbs +5 -1
- metadata +15 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fce3493743b7f1e3f2193de6a7e044d9e7b987320e8eaec2715c6c19b26e87e6
|
|
4
|
+
data.tar.gz: 8a9a9b0689feff56ecd5005669356613b69a33f67e44e545ae1170d79dfa62e3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9f299a870b76d3fb04e30499ba66af6bf54dbd225d061846d4e519746ea6399e121302149124382ab46ca93cb6286820056949f5ed46c801cb1847e4d648d0bc
|
|
7
|
+
data.tar.gz: 02b939d5884249325b3f4d1a54d78603d421b26189c34fec5f0624e3aa017694933585c5b2dd053b9df1033d2108a1f90b745b7bb12a66f91c012393eb890be2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.242.0 (2026-03-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.241.0...v1.242.0](https://github.com/Increase/increase-ruby/compare/v1.241.0...v1.242.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **client:** add webhook support ([227d6ab](https://github.com/Increase/increase-ruby/commit/227d6ab8bec444b348c61ae7b85969cd38dcd764))
|
|
10
|
+
|
|
11
|
+
## 1.241.0 (2026-03-11)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v1.240.0...v1.241.0](https://github.com/Increase/increase-ruby/compare/v1.240.0...v1.241.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([bb3ea5f](https://github.com/Increase/increase-ruby/commit/bb3ea5f6f2b649f19a38ba32b5f5ffd75e7cc9b0))
|
|
18
|
+
|
|
3
19
|
## 1.240.0 (2026-03-10)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v1.239.0...v1.240.0](https://github.com/Increase/increase-ruby/compare/v1.239.0...v1.240.0)
|
data/README.md
CHANGED
data/lib/increase/client.rb
CHANGED
|
@@ -23,6 +23,9 @@ module Increase
|
|
|
23
23
|
# @return [String]
|
|
24
24
|
attr_reader :api_key
|
|
25
25
|
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
attr_reader :webhook_secret
|
|
28
|
+
|
|
26
29
|
# @return [Increase::Resources::Accounts]
|
|
27
30
|
attr_reader :accounts
|
|
28
31
|
|
|
@@ -210,6 +213,8 @@ module Increase
|
|
|
210
213
|
#
|
|
211
214
|
# @param api_key [String, nil] Defaults to `ENV["INCREASE_API_KEY"]`
|
|
212
215
|
#
|
|
216
|
+
# @param webhook_secret [String, nil] Defaults to `ENV["INCREASE_WEBHOOK_SECRET"]`
|
|
217
|
+
#
|
|
213
218
|
# @param environment [:production, :sandbox, nil] Specifies the environment to use for the API.
|
|
214
219
|
#
|
|
215
220
|
# Each environment maps to a different base URL:
|
|
@@ -231,6 +236,7 @@ module Increase
|
|
|
231
236
|
# @param idempotency_header [String]
|
|
232
237
|
def initialize(
|
|
233
238
|
api_key: ENV["INCREASE_API_KEY"],
|
|
239
|
+
webhook_secret: ENV["INCREASE_WEBHOOK_SECRET"],
|
|
234
240
|
environment: nil,
|
|
235
241
|
base_url: ENV["INCREASE_BASE_URL"],
|
|
236
242
|
max_retries: self.class::DEFAULT_MAX_RETRIES,
|
|
@@ -249,6 +255,7 @@ module Increase
|
|
|
249
255
|
end
|
|
250
256
|
|
|
251
257
|
@api_key = api_key.to_s
|
|
258
|
+
@webhook_secret = webhook_secret&.to_s
|
|
252
259
|
|
|
253
260
|
super(
|
|
254
261
|
base_url: base_url,
|
|
@@ -685,6 +685,12 @@ module Increase
|
|
|
685
685
|
# @return [String]
|
|
686
686
|
required :one_time_code, String
|
|
687
687
|
|
|
688
|
+
# @!attribute real_time_decision_id
|
|
689
|
+
# The identifier of the Real-Time Decision used to deliver this challenge.
|
|
690
|
+
#
|
|
691
|
+
# @return [String, nil]
|
|
692
|
+
required :real_time_decision_id, String, nil?: true
|
|
693
|
+
|
|
688
694
|
# @!attribute verification_method
|
|
689
695
|
# The method used to verify the Card Authentication Challenge.
|
|
690
696
|
#
|
|
@@ -699,7 +705,7 @@ module Increase
|
|
|
699
705
|
# @return [String, nil]
|
|
700
706
|
required :verification_value, String, nil?: true
|
|
701
707
|
|
|
702
|
-
# @!method initialize(attempts:, created_at:, one_time_code:, verification_method:, verification_value:)
|
|
708
|
+
# @!method initialize(attempts:, created_at:, one_time_code:, real_time_decision_id:, verification_method:, verification_value:)
|
|
703
709
|
# Some parameter documentations has been truncated, see
|
|
704
710
|
# {Increase::Models::CardPayment::Element::CardAuthentication::Challenge} for more
|
|
705
711
|
# details.
|
|
@@ -712,6 +718,8 @@ module Increase
|
|
|
712
718
|
#
|
|
713
719
|
# @param one_time_code [String] The one-time code used for the Card Authentication Challenge.
|
|
714
720
|
#
|
|
721
|
+
# @param real_time_decision_id [String, nil] The identifier of the Real-Time Decision used to deliver this challenge.
|
|
722
|
+
#
|
|
715
723
|
# @param verification_method [Symbol, Increase::Models::CardPayment::Element::CardAuthentication::Challenge::VerificationMethod] The method used to verify the Card Authentication Challenge.
|
|
716
724
|
#
|
|
717
725
|
# @param verification_value [String, nil] E.g., the email address or phone number used for the Card Authentication Challen
|
|
@@ -60,8 +60,18 @@ module Increase
|
|
|
60
60
|
|
|
61
61
|
# @param payload [String] The raw webhook payload as a string
|
|
62
62
|
#
|
|
63
|
+
# @param headers [Hash{String=>String}] The raw HTTP headers that came with the payload
|
|
64
|
+
#
|
|
65
|
+
# @param key [String, nil] The webhook signing key
|
|
66
|
+
#
|
|
63
67
|
# @return [Increase::Models::UnwrapWebhookEvent]
|
|
64
|
-
def unwrap(payload)
|
|
68
|
+
def unwrap(payload, headers:, key: @client.webhook_secret)
|
|
69
|
+
if key.nil?
|
|
70
|
+
raise ArgumentError.new("Cannot verify a webhook without a key on either the client's webhook_secret or passed in as an argument")
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
::StandardWebhooks::Webhook.new(Base64.strict_encode64(key)).verify(payload, headers)
|
|
74
|
+
|
|
65
75
|
parsed = JSON.parse(payload, symbolize_names: true)
|
|
66
76
|
Increase::Internal::Type::Converter.coerce(Increase::Models::UnwrapWebhookEvent, parsed)
|
|
67
77
|
end
|
data/lib/increase/version.rb
CHANGED
data/lib/increase.rb
CHANGED
data/rbi/increase/client.rbi
CHANGED
|
@@ -22,6 +22,9 @@ module Increase
|
|
|
22
22
|
sig { returns(String) }
|
|
23
23
|
attr_reader :api_key
|
|
24
24
|
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_reader :webhook_secret
|
|
27
|
+
|
|
25
28
|
sig { returns(Increase::Resources::Accounts) }
|
|
26
29
|
attr_reader :accounts
|
|
27
30
|
|
|
@@ -205,6 +208,7 @@ module Increase
|
|
|
205
208
|
sig do
|
|
206
209
|
params(
|
|
207
210
|
api_key: T.nilable(String),
|
|
211
|
+
webhook_secret: T.nilable(String),
|
|
208
212
|
environment: T.nilable(T.any(Symbol, String)),
|
|
209
213
|
base_url: T.nilable(String),
|
|
210
214
|
max_retries: Integer,
|
|
@@ -217,6 +221,8 @@ module Increase
|
|
|
217
221
|
def self.new(
|
|
218
222
|
# Defaults to `ENV["INCREASE_API_KEY"]`
|
|
219
223
|
api_key: ENV["INCREASE_API_KEY"],
|
|
224
|
+
# Defaults to `ENV["INCREASE_WEBHOOK_SECRET"]`
|
|
225
|
+
webhook_secret: ENV["INCREASE_WEBHOOK_SECRET"],
|
|
220
226
|
# Specifies the environment to use for the API.
|
|
221
227
|
#
|
|
222
228
|
# Each environment maps to a different base URL:
|
|
@@ -1114,6 +1114,10 @@ module Increase
|
|
|
1114
1114
|
sig { returns(String) }
|
|
1115
1115
|
attr_accessor :one_time_code
|
|
1116
1116
|
|
|
1117
|
+
# The identifier of the Real-Time Decision used to deliver this challenge.
|
|
1118
|
+
sig { returns(T.nilable(String)) }
|
|
1119
|
+
attr_accessor :real_time_decision_id
|
|
1120
|
+
|
|
1117
1121
|
# The method used to verify the Card Authentication Challenge.
|
|
1118
1122
|
sig do
|
|
1119
1123
|
returns(
|
|
@@ -1136,6 +1140,7 @@ module Increase
|
|
|
1136
1140
|
],
|
|
1137
1141
|
created_at: Time,
|
|
1138
1142
|
one_time_code: String,
|
|
1143
|
+
real_time_decision_id: T.nilable(String),
|
|
1139
1144
|
verification_method:
|
|
1140
1145
|
Increase::CardPayment::Element::CardAuthentication::Challenge::VerificationMethod::OrSymbol,
|
|
1141
1146
|
verification_value: T.nilable(String)
|
|
@@ -1149,6 +1154,8 @@ module Increase
|
|
|
1149
1154
|
created_at:,
|
|
1150
1155
|
# The one-time code used for the Card Authentication Challenge.
|
|
1151
1156
|
one_time_code:,
|
|
1157
|
+
# The identifier of the Real-Time Decision used to deliver this challenge.
|
|
1158
|
+
real_time_decision_id:,
|
|
1152
1159
|
# The method used to verify the Card Authentication Challenge.
|
|
1153
1160
|
verification_method:,
|
|
1154
1161
|
# E.g., the email address or phone number used for the Card Authentication
|
|
@@ -1166,6 +1173,7 @@ module Increase
|
|
|
1166
1173
|
],
|
|
1167
1174
|
created_at: Time,
|
|
1168
1175
|
one_time_code: String,
|
|
1176
|
+
real_time_decision_id: T.nilable(String),
|
|
1169
1177
|
verification_method:
|
|
1170
1178
|
Increase::CardPayment::Element::CardAuthentication::Challenge::VerificationMethod::TaggedSymbol,
|
|
1171
1179
|
verification_value: T.nilable(String)
|
|
@@ -42,10 +42,20 @@ module Increase
|
|
|
42
42
|
)
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
sig
|
|
45
|
+
sig do
|
|
46
|
+
params(
|
|
47
|
+
payload: String,
|
|
48
|
+
headers: T::Hash[String, String],
|
|
49
|
+
key: T.nilable(String)
|
|
50
|
+
).returns(Increase::UnwrapWebhookEvent)
|
|
51
|
+
end
|
|
46
52
|
def unwrap(
|
|
47
53
|
# The raw webhook payload as a string
|
|
48
|
-
payload
|
|
54
|
+
payload,
|
|
55
|
+
# The raw HTTP headers that came with the payload
|
|
56
|
+
headers:,
|
|
57
|
+
# The webhook signing key
|
|
58
|
+
key: @client.webhook_secret
|
|
49
59
|
)
|
|
50
60
|
end
|
|
51
61
|
|
data/sig/increase/client.rbs
CHANGED
|
@@ -15,6 +15,8 @@ module Increase
|
|
|
15
15
|
|
|
16
16
|
attr_reader api_key: String
|
|
17
17
|
|
|
18
|
+
attr_reader webhook_secret: String?
|
|
19
|
+
|
|
18
20
|
attr_reader accounts: Increase::Resources::Accounts
|
|
19
21
|
|
|
20
22
|
attr_reader account_numbers: Increase::Resources::AccountNumbers
|
|
@@ -135,6 +137,7 @@ module Increase
|
|
|
135
137
|
|
|
136
138
|
def initialize: (
|
|
137
139
|
?api_key: String?,
|
|
140
|
+
?webhook_secret: String?,
|
|
138
141
|
?environment: :production | :sandbox | nil,
|
|
139
142
|
?base_url: String?,
|
|
140
143
|
?max_retries: Integer,
|
|
@@ -418,6 +418,7 @@ module Increase
|
|
|
418
418
|
attempts: ::Array[Increase::CardPayment::Element::CardAuthentication::Challenge::Attempt],
|
|
419
419
|
created_at: Time,
|
|
420
420
|
one_time_code: String,
|
|
421
|
+
real_time_decision_id: String?,
|
|
421
422
|
verification_method: Increase::Models::CardPayment::Element::CardAuthentication::Challenge::verification_method,
|
|
422
423
|
verification_value: String?
|
|
423
424
|
}
|
|
@@ -429,6 +430,8 @@ module Increase
|
|
|
429
430
|
|
|
430
431
|
attr_accessor one_time_code: String
|
|
431
432
|
|
|
433
|
+
attr_accessor real_time_decision_id: String?
|
|
434
|
+
|
|
432
435
|
attr_accessor verification_method: Increase::Models::CardPayment::Element::CardAuthentication::Challenge::verification_method
|
|
433
436
|
|
|
434
437
|
attr_accessor verification_value: String?
|
|
@@ -437,6 +440,7 @@ module Increase
|
|
|
437
440
|
attempts: ::Array[Increase::CardPayment::Element::CardAuthentication::Challenge::Attempt],
|
|
438
441
|
created_at: Time,
|
|
439
442
|
one_time_code: String,
|
|
443
|
+
real_time_decision_id: String?,
|
|
440
444
|
verification_method: Increase::Models::CardPayment::Element::CardAuthentication::Challenge::verification_method,
|
|
441
445
|
verification_value: String?
|
|
442
446
|
) -> void
|
|
@@ -445,6 +449,7 @@ module Increase
|
|
|
445
449
|
attempts: ::Array[Increase::CardPayment::Element::CardAuthentication::Challenge::Attempt],
|
|
446
450
|
created_at: Time,
|
|
447
451
|
one_time_code: String,
|
|
452
|
+
real_time_decision_id: String?,
|
|
448
453
|
verification_method: Increase::Models::CardPayment::Element::CardAuthentication::Challenge::verification_method,
|
|
449
454
|
verification_value: String?
|
|
450
455
|
}
|
|
@@ -15,7 +15,11 @@ module Increase
|
|
|
15
15
|
?request_options: Increase::request_opts
|
|
16
16
|
) -> Increase::Internal::Page[Increase::Event]
|
|
17
17
|
|
|
18
|
-
def unwrap: (
|
|
18
|
+
def unwrap: (
|
|
19
|
+
String payload,
|
|
20
|
+
headers: ::Hash[String, String],
|
|
21
|
+
?key: String?
|
|
22
|
+
) -> Increase::UnwrapWebhookEvent
|
|
19
23
|
|
|
20
24
|
def initialize: (client: Increase::Client) -> void
|
|
21
25
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: increase
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.242.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Increase
|
|
@@ -38,6 +38,20 @@ dependencies:
|
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: standardwebhooks
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :runtime
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
41
55
|
description:
|
|
42
56
|
email: dev-feedback@increase.com
|
|
43
57
|
executables: []
|