Skip to content

Commit fbf0234

Browse files
docs(client): add MCP Server section to README
1 parent 46555c1 commit fbf0234

55 files changed

Lines changed: 3852 additions & 207 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 189
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c37843d1525e87f47a292bf11a6fdcc277157556da21c923cc1b4a4473147ef0.yml
3-
openapi_spec_hash: 29a8c4637c8a00339aa0095a929a6096
4-
config_hash: 8799cfd589579f105ef8696a6d664c71
1+
configured_endpoints: 190
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-e88a4837037207e9591d48d534bd61acca57ca6e7c59ec0d4fdcf6e05288cc6d.yml
3+
openapi_spec_hash: fd8bbc173d1b6dafd117fb1a3a3d446c
4+
config_hash: f227b67dc32a8917717490e63f855d42

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
The Lithic Ruby library provides convenient access to the Lithic REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/lithic-com/lithic-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
44

5+
## MCP Server
6+
7+
Use the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
8+
9+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2xpdGhpYy5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWxpdGhpYy1hcGkta2V5IjoiTXkgTGl0aGljIEFQSSBLZXkifX0)
10+
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%22%2C%22headers%22%3A%7B%22x-lithic-api-key%22%3A%22My%20Lithic%20API%20Key%22%7D%7D)
11+
12+
> Note: You may need to set environment variables in your MCP client.
13+
514
## Documentation
615

716
Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/lithic).

lib/lithic.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
require_relative "lithic/models/api_status"
116116
require_relative "lithic/models/auth_rules/auth_rule"
117117
require_relative "lithic/models/auth_rules/auth_rule_condition"
118+
require_relative "lithic/models/auth_rules/auth_rule_version"
118119
require_relative "lithic/models/auth_rules/backtest_stats"
119120
require_relative "lithic/models/auth_rules/conditional_3ds_action_parameters"
120121
require_relative "lithic/models/auth_rules/conditional_ach_action_parameters"
@@ -138,6 +139,8 @@
138139
require_relative "lithic/models/auth_rules/v2_list_params"
139140
require_relative "lithic/models/auth_rules/v2_list_results_params"
140141
require_relative "lithic/models/auth_rules/v2_list_results_response"
142+
require_relative "lithic/models/auth_rules/v2_list_versions_params"
143+
require_relative "lithic/models/auth_rules/v2_list_versions_response"
141144
require_relative "lithic/models/auth_rules/v2_promote_params"
142145
require_relative "lithic/models/auth_rules/v2_retrieve_features_params"
143146
require_relative "lithic/models/auth_rules/v2_retrieve_features_response"

lib/lithic/models/account_activity_list_params.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ module Category
110110
extend Lithic::Internal::Type::Enum
111111

112112
ACH = :ACH
113+
WIRE = :WIRE
113114
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
114115
FEE = :FEE
115116
REWARD = :REWARD

lib/lithic/models/account_activity_list_response.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ module Category
149149
extend Lithic::Internal::Type::Enum
150150

151151
ACH = :ACH
152+
WIRE = :WIRE
152153
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
153154
FEE = :FEE
154155
REWARD = :REWARD

lib/lithic/models/account_activity_retrieve_transaction_response.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ module Category
152152
extend Lithic::Internal::Type::Enum
153153

154154
ACH = :ACH
155+
WIRE = :WIRE
155156
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
156157
FEE = :FEE
157158
REWARD = :REWARD
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
module AuthRules
6+
class AuthRuleVersion < Lithic::Internal::Type::BaseModel
7+
# @!attribute created
8+
# Timestamp of when this version was created.
9+
#
10+
# @return [Time]
11+
required :created, Time
12+
13+
# @!attribute parameters
14+
# Parameters for the Auth Rule
15+
#
16+
# @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters]
17+
required :parameters, union: -> { Lithic::AuthRules::AuthRuleVersion::Parameters }
18+
19+
# @!attribute state
20+
# The current state of this version.
21+
#
22+
# @return [Symbol, Lithic::Models::AuthRules::AuthRuleVersion::State]
23+
required :state, enum: -> { Lithic::AuthRules::AuthRuleVersion::State }
24+
25+
response_only do
26+
# @!attribute version
27+
# The version of the rule, this is incremented whenever the rule's parameters
28+
# change.
29+
#
30+
# @return [Integer]
31+
required :version, Integer
32+
end
33+
34+
# @!method initialize(created:, parameters:, state:, version:)
35+
# Some parameter documentations has been truncated, see
36+
# {Lithic::Models::AuthRules::AuthRuleVersion} for more details.
37+
#
38+
# @param created [Time] Timestamp of when this version was created.
39+
#
40+
# @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule
41+
#
42+
# @param state [Symbol, Lithic::Models::AuthRules::AuthRuleVersion::State] The current state of this version.
43+
#
44+
# @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan
45+
46+
# Parameters for the Auth Rule
47+
#
48+
# @see Lithic::Models::AuthRules::AuthRuleVersion#parameters
49+
module Parameters
50+
extend Lithic::Internal::Type::Union
51+
52+
# Deprecated: Use CONDITIONAL_ACTION instead.
53+
variant -> { Lithic::AuthRules::ConditionalBlockParameters }
54+
55+
variant -> { Lithic::AuthRules::VelocityLimitParams }
56+
57+
variant -> { Lithic::AuthRules::MerchantLockParameters }
58+
59+
variant -> { Lithic::AuthRules::Conditional3DSActionParameters }
60+
61+
variant -> { Lithic::AuthRules::ConditionalAuthorizationActionParameters }
62+
63+
variant -> { Lithic::AuthRules::ConditionalACHActionParameters }
64+
65+
variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters }
66+
67+
# Parameters for defining a TypeScript code rule
68+
variant -> { Lithic::AuthRules::TypescriptCodeParameters }
69+
70+
# @!method self.variants
71+
# @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)]
72+
end
73+
74+
# The current state of this version.
75+
#
76+
# @see Lithic::Models::AuthRules::AuthRuleVersion#state
77+
module State
78+
extend Lithic::Internal::Type::Enum
79+
80+
ACTIVE = :ACTIVE
81+
SHADOW = :SHADOW
82+
INACTIVE = :INACTIVE
83+
84+
# @!method self.values
85+
# @return [Array<Symbol>]
86+
end
87+
end
88+
end
89+
90+
AuthRuleVersion = AuthRules::AuthRuleVersion
91+
end
92+
end

lib/lithic/models/auth_rules/v2/backtest_results.rb

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,30 +48,22 @@ class Results < Lithic::Internal::Type::BaseModel
4848

4949
# @see Lithic::Models::AuthRules::V2::BacktestResults#simulation_parameters
5050
class SimulationParameters < Lithic::Internal::Type::BaseModel
51-
# @!attribute auth_rule_token
52-
# Auth Rule Token
53-
#
54-
# @return [String, nil]
55-
optional :auth_rule_token, String
56-
5751
# @!attribute end_
58-
# The end time of the simulation.
52+
# The end time of the simulation
5953
#
60-
# @return [Time, nil]
61-
optional :end_, Time, api_name: :end
54+
# @return [Time]
55+
required :end_, Time, api_name: :end
6256

6357
# @!attribute start
64-
# The start time of the simulation.
58+
# The start time of the simulation
6559
#
66-
# @return [Time, nil]
67-
optional :start, Time
60+
# @return [Time]
61+
required :start, Time
6862

69-
# @!method initialize(auth_rule_token: nil, end_: nil, start: nil)
70-
# @param auth_rule_token [String] Auth Rule Token
71-
#
72-
# @param end_ [Time] The end time of the simulation.
63+
# @!method initialize(end_:, start:)
64+
# @param end_ [Time] The end time of the simulation
7365
#
74-
# @param start [Time] The start time of the simulation.
66+
# @param start [Time] The start time of the simulation
7567
end
7668
end
7769
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
module AuthRules
6+
# @see Lithic::Resources::AuthRules::V2#list_versions
7+
class V2ListVersionsParams < Lithic::Internal::Type::BaseModel
8+
extend Lithic::Internal::Type::RequestParameters::Converter
9+
include Lithic::Internal::Type::RequestParameters
10+
11+
# @!attribute auth_rule_token
12+
#
13+
# @return [String]
14+
required :auth_rule_token, String
15+
16+
# @!method initialize(auth_rule_token:, request_options: {})
17+
# @param auth_rule_token [String]
18+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
19+
end
20+
end
21+
end
22+
end
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# frozen_string_literal: true
2+
3+
module Lithic
4+
module Models
5+
module AuthRules
6+
# @see Lithic::Resources::AuthRules::V2#list_versions
7+
class V2ListVersionsResponse < Lithic::Internal::Type::BaseModel
8+
# @!attribute data
9+
#
10+
# @return [Array<Lithic::Models::AuthRules::AuthRuleVersion>]
11+
required :data, -> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::AuthRuleVersion] }
12+
13+
# @!method initialize(data:)
14+
# @param data [Array<Lithic::Models::AuthRules::AuthRuleVersion>]
15+
end
16+
end
17+
end
18+
end

0 commit comments

Comments
 (0)