Skip to content

Commit 0eefd0a

Browse files
feat(api): new Funding Events and Card Web Provision API's
- Card Web Provisioning API allows your cardholders to directly add payment cards to the device's digital wallet from a browser on the web. Currently only supported for Apple Pay. - new Funding Events API and Webhooks
1 parent d81899d commit 0eefd0a

40 files changed

Lines changed: 1893 additions & 4 deletions

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 157
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-9580d7ed7ee603cba3dd0db9bb1ee48094dfe2a90c1ca13a7f10ab8deaa73e2c.yml
3-
openapi_spec_hash: 6f707e3df699aec761f20db720fb3a32
4-
config_hash: dc221a354631e360e545ebb7435ecd35
1+
configured_endpoints: 161
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-025f40c854a9485cf316c9058f9cc5fa37f069add30e409d49ab93f2e166f4fb.yml
3+
openapi_spec_hash: a9391f3a54b8db5d5df40169de8c645c
4+
config_hash: fa3481d1d8505e4157f6cebe93211bd0

lib/lithic.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@
140140
require_relative "lithic/models/card_search_by_pan_params"
141141
require_relative "lithic/models/card_spend_limits"
142142
require_relative "lithic/models/card_update_params"
143+
require_relative "lithic/models/card_web_provision_params"
144+
require_relative "lithic/models/card_web_provision_response"
143145
require_relative "lithic/models/carrier"
144146
require_relative "lithic/models/client_api_status_params"
145147
require_relative "lithic/models/credit_products/extended_credit"
@@ -227,6 +229,12 @@
227229
require_relative "lithic/models/financial_account_update_params"
228230
require_relative "lithic/models/financial_account_update_status_params"
229231
require_relative "lithic/models/financial_transaction"
232+
require_relative "lithic/models/funding_event_list_params"
233+
require_relative "lithic/models/funding_event_list_response"
234+
require_relative "lithic/models/funding_event_retrieve_details_params"
235+
require_relative "lithic/models/funding_event_retrieve_details_response"
236+
require_relative "lithic/models/funding_event_retrieve_params"
237+
require_relative "lithic/models/funding_event_retrieve_response"
230238
require_relative "lithic/models/instance_financial_account_type"
231239
require_relative "lithic/models/kyb"
232240
require_relative "lithic/models/kyb_business_entity"
@@ -355,6 +363,7 @@
355363
require_relative "lithic/resources/financial_accounts/loan_tapes"
356364
require_relative "lithic/resources/financial_accounts/statements"
357365
require_relative "lithic/resources/financial_accounts/statements/line_items"
366+
require_relative "lithic/resources/funding_events"
358367
require_relative "lithic/resources/management_operations"
359368
require_relative "lithic/resources/payments"
360369
require_relative "lithic/resources/reports"

lib/lithic/client.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ class Client < Lithic::Internal::Transport::BaseClient
9898
# @return [Lithic::Resources::ManagementOperations]
9999
attr_reader :management_operations
100100

101+
# @return [Lithic::Resources::FundingEvents]
102+
attr_reader :funding_events
103+
101104
# Status of api
102105
#
103106
# @overload api_status(request_options: {})
@@ -197,6 +200,7 @@ def initialize(
197200
@credit_products = Lithic::Resources::CreditProducts.new(client: self)
198201
@external_payments = Lithic::Resources::ExternalPayments.new(client: self)
199202
@management_operations = Lithic::Resources::ManagementOperations.new(client: self)
203+
@funding_events = Lithic::Resources::FundingEvents.new(client: self)
200204
end
201205
end
202206
end

lib/lithic/models.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ module Lithic
129129

130130
CardUpdateParams = Lithic::Models::CardUpdateParams
131131

132+
CardWebProvisionParams = Lithic::Models::CardWebProvisionParams
133+
132134
Carrier = Lithic::Models::Carrier
133135

134136
ClientAPIStatusParams = Lithic::Models::ClientAPIStatusParams
@@ -227,6 +229,12 @@ module Lithic
227229

228230
FinancialTransaction = Lithic::Models::FinancialTransaction
229231

232+
FundingEventListParams = Lithic::Models::FundingEventListParams
233+
234+
FundingEventRetrieveDetailsParams = Lithic::Models::FundingEventRetrieveDetailsParams
235+
236+
FundingEventRetrieveParams = Lithic::Models::FundingEventRetrieveParams
237+
230238
InstanceFinancialAccountType = Lithic::Models::InstanceFinancialAccountType
231239

232240
KYB = Lithic::Models::KYB
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
# @see Lithic::Resources::Cards#web_provision
6+
class CardWebProvisionParams < Lithic::Internal::Type::BaseModel
7+
extend Lithic::Internal::Type::RequestParameters::Converter
8+
include Lithic::Internal::Type::RequestParameters
9+
10+
# @!attribute digital_wallet
11+
# Name of digital wallet provider.
12+
#
13+
# @return [Symbol, Lithic::CardWebProvisionParams::DigitalWallet, nil]
14+
optional :digital_wallet, enum: -> { Lithic::CardWebProvisionParams::DigitalWallet }
15+
16+
# @!method initialize(digital_wallet: nil, request_options: {})
17+
# @param digital_wallet [Symbol, Lithic::CardWebProvisionParams::DigitalWallet] Name of digital wallet provider.
18+
#
19+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
20+
21+
# Name of digital wallet provider.
22+
module DigitalWallet
23+
extend Lithic::Internal::Type::Enum
24+
25+
APPLE_PAY = :APPLE_PAY
26+
27+
# @!method self.values
28+
# @return [Array<Symbol>]
29+
end
30+
end
31+
end
32+
end
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
# @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 }
32+
33+
# @!attribute payload
34+
# Base64url encoded JSON object containing the provisioning payload.
35+
#
36+
# @return [String, nil]
37+
optional :payload, String
38+
39+
# @!attribute protected
40+
# Base64url encoded JWS protected headers containing the header parameters that
41+
# are integrity-protected by the JWS signature.
42+
#
43+
# @return [String, nil]
44+
optional :protected, String
45+
46+
# @!attribute signature
47+
# Base64url encoded signature of the JWS object.
48+
#
49+
# @return [String, nil]
50+
optional :signature, String
51+
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.
61+
#
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.
65+
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.
70+
#
71+
# @return [String, nil]
72+
optional :kid, String
73+
74+
# @!method initialize(kid: nil)
75+
# JWS unprotected headers containing header parameters that aren't
76+
# integrity-protected by the JWS signature.
77+
#
78+
# @param kid [String] The ID for the JWS Public Key of the key pair used to generate the signature.
79+
end
80+
end
81+
end
82+
end
83+
end
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
# @see Lithic::Resources::FundingEvents#list
6+
class FundingEventListParams < Lithic::Internal::Type::BaseModel
7+
extend Lithic::Internal::Type::RequestParameters::Converter
8+
include Lithic::Internal::Type::RequestParameters
9+
10+
# @!attribute ending_before
11+
# A cursor representing an item's token before which a page of results should end.
12+
# Used to retrieve the previous page of results before this item.
13+
#
14+
# @return [String, nil]
15+
optional :ending_before, String
16+
17+
# @!attribute page_size
18+
# Page size (for pagination).
19+
#
20+
# @return [Integer, nil]
21+
optional :page_size, Integer
22+
23+
# @!attribute starting_after
24+
# A cursor representing an item's token after which a page of results should
25+
# begin. Used to retrieve the next page of results after this item.
26+
#
27+
# @return [String, nil]
28+
optional :starting_after, String
29+
30+
# @!method initialize(ending_before: nil, page_size: nil, starting_after: nil, request_options: {})
31+
# Some parameter documentations has been truncated, see
32+
# {Lithic::Models::FundingEventListParams} for more details.
33+
#
34+
# @param ending_before [String] A cursor representing an item's token before which a page of results should end.
35+
#
36+
# @param page_size [Integer] Page size (for pagination).
37+
#
38+
# @param starting_after [String] A cursor representing an item's token after which a page of results should begin
39+
#
40+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
41+
end
42+
end
43+
end
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
# @see Lithic::Resources::FundingEvents#list
6+
class FundingEventListResponse < Lithic::Internal::Type::BaseModel
7+
# @!attribute token
8+
# Unique token ID
9+
#
10+
# @return [String]
11+
required :token, String
12+
13+
# @!attribute collection_resource_type
14+
# Collection resource type
15+
#
16+
# @return [Symbol, Lithic::Models::FundingEventListResponse::CollectionResourceType]
17+
required :collection_resource_type,
18+
enum: -> { Lithic::Models::FundingEventListResponse::CollectionResourceType }
19+
20+
# @!attribute collection_tokens
21+
# IDs of collections
22+
#
23+
# @return [Array<String>]
24+
required :collection_tokens, Lithic::Internal::Type::ArrayOf[String]
25+
26+
# @!attribute created
27+
# Time of the creation
28+
#
29+
# @return [Time]
30+
required :created, Time
31+
32+
# @!attribute high_watermark
33+
# Time of the high watermark
34+
#
35+
# @return [Time]
36+
required :high_watermark, Time
37+
38+
# @!attribute previous_high_watermark
39+
# Time of the previous high watermark
40+
#
41+
# @return [Time]
42+
required :previous_high_watermark, Time
43+
44+
# @!attribute settlement_breakdowns
45+
# List of settlements
46+
#
47+
# @return [Array<Lithic::Models::FundingEventListResponse::SettlementBreakdown>]
48+
required :settlement_breakdowns,
49+
-> { Lithic::Internal::Type::ArrayOf[Lithic::Models::FundingEventListResponse::SettlementBreakdown] }
50+
51+
# @!attribute updated
52+
# Time of the update
53+
#
54+
# @return [Time]
55+
required :updated, Time
56+
57+
# @!method initialize(token:, collection_resource_type:, collection_tokens:, created:, high_watermark:, previous_high_watermark:, settlement_breakdowns:, updated:)
58+
# @param token [String] Unique token ID
59+
#
60+
# @param collection_resource_type [Symbol, Lithic::Models::FundingEventListResponse::CollectionResourceType] Collection resource type
61+
#
62+
# @param collection_tokens [Array<String>] IDs of collections
63+
#
64+
# @param created [Time] Time of the creation
65+
#
66+
# @param high_watermark [Time] Time of the high watermark
67+
#
68+
# @param previous_high_watermark [Time] Time of the previous high watermark
69+
#
70+
# @param settlement_breakdowns [Array<Lithic::Models::FundingEventListResponse::SettlementBreakdown>] List of settlements
71+
#
72+
# @param updated [Time] Time of the update
73+
74+
# Collection resource type
75+
#
76+
# @see Lithic::Models::FundingEventListResponse#collection_resource_type
77+
module CollectionResourceType
78+
extend Lithic::Internal::Type::Enum
79+
80+
BOOK_TRANSFER = :BOOK_TRANSFER
81+
PAYMENT = :PAYMENT
82+
83+
# @!method self.values
84+
# @return [Array<Symbol>]
85+
end
86+
87+
class SettlementBreakdown < Lithic::Internal::Type::BaseModel
88+
# @!attribute amount
89+
#
90+
# @return [Integer]
91+
required :amount, Integer
92+
93+
# @!attribute settlement_date
94+
#
95+
# @return [Date]
96+
required :settlement_date, Date
97+
98+
# @!method initialize(amount:, settlement_date:)
99+
# @param amount [Integer]
100+
# @param settlement_date [Date]
101+
end
102+
end
103+
end
104+
end
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
# @see Lithic::Resources::FundingEvents#retrieve_details
6+
class FundingEventRetrieveDetailsParams < Lithic::Internal::Type::BaseModel
7+
extend Lithic::Internal::Type::RequestParameters::Converter
8+
include Lithic::Internal::Type::RequestParameters
9+
10+
# @!method initialize(request_options: {})
11+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
12+
end
13+
end
14+
end
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
# @see Lithic::Resources::FundingEvents#retrieve_details
6+
class FundingEventRetrieveDetailsResponse < Lithic::Internal::Type::BaseModel
7+
# @!attribute token
8+
# Unique token ID
9+
#
10+
# @return [String]
11+
required :token, String
12+
13+
# @!attribute settlement_details_url
14+
# URL of the settlement details
15+
#
16+
# @return [String]
17+
required :settlement_details_url, String
18+
19+
# @!attribute settlement_summary_url
20+
# URL of the settlement summary
21+
#
22+
# @return [String]
23+
required :settlement_summary_url, String
24+
25+
# @!method initialize(token:, settlement_details_url:, settlement_summary_url:)
26+
# @param token [String] Unique token ID
27+
#
28+
# @param settlement_details_url [String] URL of the settlement details
29+
#
30+
# @param settlement_summary_url [String] URL of the settlement summary
31+
end
32+
end
33+
end

0 commit comments

Comments
 (0)