Skip to content

Commit 7eacd6a

Browse files
feat(api): add Google WPP to SDKs
docs(api): clarify error 422 for 3DS challenge response feat(api): add IS_AFTER / IS_BEFORE operators to Auth Rule APIs
1 parent f728be5 commit 7eacd6a

22 files changed

+530
-239
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 176
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-3e50857d2b8f4c85922abf83df7b3c6894f5bd500d6226ff589476029bbb258b.yml
3-
openapi_spec_hash: 6bef8b283eb7292ad6f3f62d40fda699
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-abe6a4f82f696099fa8ecb1cc44f08979e17d56578ae7ea68b0e9182e21df508.yml
3+
openapi_spec_hash: d2ce51592a9a234c6f34a1168a31f91f
44
config_hash: ba3fbfc99a1b8635d9e79e9e49d12952

lib/lithic/models/auth_rules/auth_rule_condition.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class AuthRuleCondition < Lithic::Internal::Type::BaseModel
6868
# @!attribute value
6969
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
7070
#
71-
# @return [String, Integer, Array<String>]
71+
# @return [String, Integer, Array<String>, Time]
7272
required :value, union: -> { Lithic::AuthRules::ConditionalValue }
7373

7474
# @!method initialize(attribute:, operation:, value:)
@@ -79,7 +79,7 @@ class AuthRuleCondition < Lithic::Internal::Type::BaseModel
7979
#
8080
# @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute
8181
#
82-
# @param value [String, Integer, Array<String>] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
82+
# @param value [String, Integer, Array<String>, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
8383
end
8484
end
8585

lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Condition < Lithic::Internal::Type::BaseModel
7373
# @!attribute value
7474
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
7575
#
76-
# @return [String, Integer, Array<String>]
76+
# @return [String, Integer, Array<String>, Time]
7777
required :value, union: -> { Lithic::AuthRules::ConditionalValue }
7878

7979
# @!method initialize(attribute:, operation:, value:)
@@ -85,7 +85,7 @@ class Condition < Lithic::Internal::Type::BaseModel
8585
#
8686
# @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute
8787
#
88-
# @param value [String, Integer, Array<String>] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
88+
# @param value [String, Integer, Array<String>, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
8989

9090
# The attribute to target.
9191
#

lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class Condition < Lithic::Internal::Type::BaseModel
209209
# @!attribute value
210210
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
211211
#
212-
# @return [String, Integer, Array<String>]
212+
# @return [String, Integer, Array<String>, Time]
213213
required :value, union: -> { Lithic::AuthRules::ConditionalValue }
214214

215215
# @!method initialize(attribute:, operation:, value:)
@@ -221,7 +221,7 @@ class Condition < Lithic::Internal::Type::BaseModel
221221
#
222222
# @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute
223223
#
224-
# @param value [String, Integer, Array<String>] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
224+
# @param value [String, Integer, Array<String>, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
225225

226226
# The attribute to target.
227227
#

lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Condition < Lithic::Internal::Type::BaseModel
104104
# @!attribute value
105105
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
106106
#
107-
# @return [String, Integer, Array<String>]
107+
# @return [String, Integer, Array<String>, Time]
108108
required :value, union: -> { Lithic::AuthRules::ConditionalValue }
109109

110110
# @!method initialize(attribute:, operation:, value:)
@@ -116,7 +116,7 @@ class Condition < Lithic::Internal::Type::BaseModel
116116
#
117117
# @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute
118118
#
119-
# @param value [String, Integer, Array<String>] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
119+
# @param value [String, Integer, Array<String>, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
120120

121121
# The attribute to target.
122122
#

lib/lithic/models/auth_rules/conditional_operation.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module ConditionalOperation
1717
IS_GREATER_THAN_OR_EQUAL_TO = :IS_GREATER_THAN_OR_EQUAL_TO
1818
IS_LESS_THAN = :IS_LESS_THAN
1919
IS_LESS_THAN_OR_EQUAL_TO = :IS_LESS_THAN_OR_EQUAL_TO
20+
IS_AFTER = :IS_AFTER
21+
IS_BEFORE = :IS_BEFORE
2022
CONTAINS_ANY = :CONTAINS_ANY
2123
CONTAINS_ALL = :CONTAINS_ALL
2224
CONTAINS_NONE = :CONTAINS_NONE

lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class Condition < Lithic::Internal::Type::BaseModel
199199
# @!attribute value
200200
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
201201
#
202-
# @return [String, Integer, Array<String>]
202+
# @return [String, Integer, Array<String>, Time]
203203
required :value, union: -> { Lithic::AuthRules::ConditionalValue }
204204

205205
# @!method initialize(attribute:, operation:, value:)
@@ -211,7 +211,7 @@ class Condition < Lithic::Internal::Type::BaseModel
211211
#
212212
# @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute
213213
#
214-
# @param value [String, Integer, Array<String>] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
214+
# @param value [String, Integer, Array<String>, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
215215

216216
# The attribute to target.
217217
#

lib/lithic/models/auth_rules/conditional_value.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ module ConditionalValue
1616
# An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF`
1717
variant -> { Lithic::Models::AuthRules::ConditionalValue::StringArray }
1818

19+
# A timestamp, to be used with `IS_AFTER` or `IS_BEFORE`
20+
variant Time
21+
1922
# @!method self.variants
20-
# @return [Array(String, Integer, Array<String>)]
23+
# @return [Array(String, Integer, Array<String>, Time)]
2124

2225
# @type [Lithic::Internal::Type::Converter]
2326
StringArray = Lithic::Internal::Type::ArrayOf[String]

lib/lithic/models/card_web_provision_params.rb

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,53 @@ class CardWebProvisionParams < Lithic::Internal::Type::BaseModel
77
extend Lithic::Internal::Type::RequestParameters::Converter
88
include Lithic::Internal::Type::RequestParameters
99

10+
# @!attribute client_device_id
11+
# Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push
12+
# Provisioning device identifier required for the tokenization flow
13+
#
14+
# @return [String, nil]
15+
optional :client_device_id, String
16+
17+
# @!attribute client_wallet_account_id
18+
# Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push
19+
# Provisioning wallet account identifier required for the tokenization flow
20+
#
21+
# @return [String, nil]
22+
optional :client_wallet_account_id, String
23+
1024
# @!attribute digital_wallet
1125
# Name of digital wallet provider.
1226
#
1327
# @return [Symbol, Lithic::Models::CardWebProvisionParams::DigitalWallet, nil]
1428
optional :digital_wallet, enum: -> { Lithic::CardWebProvisionParams::DigitalWallet }
1529

16-
# @!method initialize(digital_wallet: nil, request_options: {})
30+
# @!attribute server_session_id
31+
# Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push
32+
# Provisioning session identifier required for the FPAN flow.
33+
#
34+
# @return [String, nil]
35+
optional :server_session_id, String
36+
37+
# @!method initialize(client_device_id: nil, client_wallet_account_id: nil, digital_wallet: nil, server_session_id: nil, request_options: {})
38+
# Some parameter documentations has been truncated, see
39+
# {Lithic::Models::CardWebProvisionParams} for more details.
40+
#
41+
# @param client_device_id [String] Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push Provision
42+
#
43+
# @param client_wallet_account_id [String] Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push Provision
44+
#
1745
# @param digital_wallet [Symbol, Lithic::Models::CardWebProvisionParams::DigitalWallet] Name of digital wallet provider.
1846
#
47+
# @param server_session_id [String] Only applicable if `digital_wallet` is GOOGLE_PAY. Google Pay Web Push Provision
48+
#
1949
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
2050

2151
# Name of digital wallet provider.
2252
module DigitalWallet
2353
extend Lithic::Internal::Type::Enum
2454

2555
APPLE_PAY = :APPLE_PAY
56+
GOOGLE_PAY = :GOOGLE_PAY
2657

2758
# @!method self.values
2859
# @return [Array<Symbol>]

lib/lithic/models/card_web_provision_response.rb

Lines changed: 98 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3,81 +3,119 @@
33
module Lithic
44
module Models
55
# @see Lithic::Resources::Cards#web_provision
6-
class CardWebProvisionResponse < Lithic::Internal::Type::BaseModel
7-
# @!attribute jws
8-
# JWS object required for handoff to Apple's script.
9-
#
10-
# @return [Lithic::Models::CardWebProvisionResponse::Jws, nil]
11-
optional :jws, -> { Lithic::Models::CardWebProvisionResponse::Jws }
12-
13-
# @!attribute state
14-
# A unique identifier for the JWS object.
15-
#
16-
# @return [String, nil]
17-
optional :state, String
18-
19-
# @!method initialize(jws: nil, state: nil)
20-
# @param jws [Lithic::Models::CardWebProvisionResponse::Jws] JWS object required for handoff to Apple's script.
21-
#
22-
# @param state [String] A unique identifier for the JWS object.
23-
24-
# @see Lithic::Models::CardWebProvisionResponse#jws
25-
class Jws < Lithic::Internal::Type::BaseModel
26-
# @!attribute header
27-
# JWS unprotected headers containing header parameters that aren't
28-
# integrity-protected by the JWS signature.
29-
#
30-
# @return [Lithic::Models::CardWebProvisionResponse::Jws::Header, nil]
31-
optional :header, -> { Lithic::Models::CardWebProvisionResponse::Jws::Header }
6+
module CardWebProvisionResponse
7+
extend Lithic::Internal::Type::Union
328

33-
# @!attribute payload
34-
# Base64url encoded JSON object containing the provisioning payload.
35-
#
36-
# @return [String, nil]
37-
optional :payload, String
9+
variant -> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse }
3810

39-
# @!attribute protected
40-
# Base64url encoded JWS protected headers containing the header parameters that
41-
# are integrity-protected by the JWS signature.
11+
variant -> { Lithic::Models::CardWebProvisionResponse::GoogleWebPushProvisioningResponse }
12+
13+
class AppleWebPushProvisioningResponse < Lithic::Internal::Type::BaseModel
14+
# @!attribute jws
15+
# JWS object required for handoff to Apple's script.
4216
#
43-
# @return [String, nil]
44-
optional :protected, String
17+
# @return [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws, nil]
18+
optional :jws, -> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws }
4519

46-
# @!attribute signature
47-
# Base64url encoded signature of the JWS object.
20+
# @!attribute state
21+
# A unique identifier for the JWS object.
4822
#
4923
# @return [String, nil]
50-
optional :signature, String
24+
optional :state, String
5125

52-
# @!method initialize(header: nil, payload: nil, protected: nil, signature: nil)
53-
# Some parameter documentations has been truncated, see
54-
# {Lithic::Models::CardWebProvisionResponse::Jws} for more details.
55-
#
56-
# JWS object required for handoff to Apple's script.
57-
#
58-
# @param header [Lithic::Models::CardWebProvisionResponse::Jws::Header] JWS unprotected headers containing header parameters that aren't integrity-prote
59-
#
60-
# @param payload [String] Base64url encoded JSON object containing the provisioning payload.
26+
# @!method initialize(jws: nil, state: nil)
27+
# @param jws [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws] JWS object required for handoff to Apple's script.
6128
#
62-
# @param protected [String] Base64url encoded JWS protected headers containing the header parameters that ar
63-
#
64-
# @param signature [String] Base64url encoded signature of the JWS object.
29+
# @param state [String] A unique identifier for the JWS object.
30+
31+
# @see Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse#jws
32+
class Jws < Lithic::Internal::Type::BaseModel
33+
# @!attribute header
34+
# JWS unprotected headers containing header parameters that aren't
35+
# integrity-protected by the JWS signature.
36+
#
37+
# @return [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws::Header, nil]
38+
optional :header,
39+
-> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws::Header }
6540

66-
# @see Lithic::Models::CardWebProvisionResponse::Jws#header
67-
class Header < Lithic::Internal::Type::BaseModel
68-
# @!attribute kid
69-
# The ID for the JWS Public Key of the key pair used to generate the signature.
41+
# @!attribute payload
42+
# Base64url encoded JSON object containing the provisioning payload.
7043
#
7144
# @return [String, nil]
72-
optional :kid, String
45+
optional :payload, String
7346

74-
# @!method initialize(kid: nil)
75-
# JWS unprotected headers containing header parameters that aren't
76-
# integrity-protected by the JWS signature.
47+
# @!attribute protected
48+
# Base64url encoded JWS protected headers containing the header parameters that
49+
# are integrity-protected by the JWS signature.
50+
#
51+
# @return [String, nil]
52+
optional :protected, String
53+
54+
# @!attribute signature
55+
# Base64url encoded signature of the JWS object.
7756
#
78-
# @param kid [String] The ID for the JWS Public Key of the key pair used to generate the signature.
57+
# @return [String, nil]
58+
optional :signature, String
59+
60+
# @!method initialize(header: nil, payload: nil, protected: nil, signature: nil)
61+
# Some parameter documentations has been truncated, see
62+
# {Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws}
63+
# for more details.
64+
#
65+
# JWS object required for handoff to Apple's script.
66+
#
67+
# @param header [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws::Header] JWS unprotected headers containing header parameters that aren't integrity-prote
68+
#
69+
# @param payload [String] Base64url encoded JSON object containing the provisioning payload.
70+
#
71+
# @param protected [String] Base64url encoded JWS protected headers containing the header parameters that ar
72+
#
73+
# @param signature [String] Base64url encoded signature of the JWS object.
74+
75+
# @see Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws#header
76+
class Header < Lithic::Internal::Type::BaseModel
77+
# @!attribute kid
78+
# The ID for the JWS Public Key of the key pair used to generate the signature.
79+
#
80+
# @return [String, nil]
81+
optional :kid, String
82+
83+
# @!method initialize(kid: nil)
84+
# JWS unprotected headers containing header parameters that aren't
85+
# integrity-protected by the JWS signature.
86+
#
87+
# @param kid [String] The ID for the JWS Public Key of the key pair used to generate the signature.
88+
end
7989
end
8090
end
91+
92+
class GoogleWebPushProvisioningResponse < Lithic::Internal::Type::BaseModel
93+
# @!attribute google_opc
94+
# A base64 encoded and encrypted payload representing card data for the Google Pay
95+
# UWPP FPAN flow.
96+
#
97+
# @return [String, nil]
98+
optional :google_opc, String
99+
100+
# @!attribute tsp_opc
101+
# A base64 encoded and encrypted payload representing card data for the Google Pay
102+
# UWPP tokenization flow.
103+
#
104+
# @return [String, nil]
105+
optional :tsp_opc, String
106+
107+
# @!method initialize(google_opc: nil, tsp_opc: nil)
108+
# Some parameter documentations has been truncated, see
109+
# {Lithic::Models::CardWebProvisionResponse::GoogleWebPushProvisioningResponse}
110+
# for more details.
111+
#
112+
# @param google_opc [String] A base64 encoded and encrypted payload representing card data for the Google Pay
113+
#
114+
# @param tsp_opc [String] A base64 encoded and encrypted payload representing card data for the Google Pay
115+
end
116+
117+
# @!method self.variants
118+
# @return [Array(Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse, Lithic::Models::CardWebProvisionResponse::GoogleWebPushProvisioningResponse)]
81119
end
82120
end
83121
end

0 commit comments

Comments
 (0)