chainlink-apimatic-sdk 0.0.1 → 0.0.2

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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -60
  3. data/bin/console +4 -4
  4. data/lib/ccip_directory_and_configuration_rest_api_v1/api_helper.rb +10 -0
  5. data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/apis/base_api.rb +5 -5
  6. data/lib/ccip_directory_and_configuration_rest_api_v1/apis/chains_api.rb +69 -0
  7. data/lib/ccip_directory_and_configuration_rest_api_v1/apis/lanes_api.rb +75 -0
  8. data/lib/ccip_directory_and_configuration_rest_api_v1/apis/tokens_api.rb +51 -0
  9. data/lib/ccip_directory_and_configuration_rest_api_v1/client.rb +72 -0
  10. data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/configuration.rb +27 -41
  11. data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/exceptions/api_exception.rb +4 -4
  12. data/lib/ccip_directory_and_configuration_rest_api_v1/exceptions/error_response_exception.rb +57 -0
  13. data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/http/api_response.rb +4 -4
  14. data/lib/ccip_directory_and_configuration_rest_api_v1/http/http_call_back.rb +10 -0
  15. data/lib/ccip_directory_and_configuration_rest_api_v1/http/http_method_enum.rb +10 -0
  16. data/lib/ccip_directory_and_configuration_rest_api_v1/http/http_request.rb +10 -0
  17. data/lib/ccip_directory_and_configuration_rest_api_v1/http/http_response.rb +10 -0
  18. data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/http/proxy_settings.rb +4 -4
  19. data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/logging/configuration/api_logging_configuration.rb +4 -4
  20. data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/logging/sdk_logger.rb +4 -4
  21. data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/models/base_model.rb +4 -4
  22. data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_api_response.rb +99 -0
  23. data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_config_error.rb +100 -0
  24. data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_details.rb +272 -0
  25. data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_family.rb +64 -0
  26. data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_info.rb +135 -0
  27. data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_metadata.rb +144 -0
  28. data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_type.rb +64 -0
  29. data/lib/ccip_directory_and_configuration_rest_api_v1/models/data.rb +171 -0
  30. data/lib/ccip_directory_and_configuration_rest_api_v1/models/enrich_fee_tokens.rb +36 -0
  31. data/lib/ccip_directory_and_configuration_rest_api_v1/models/environment.rb +36 -0
  32. data/lib/ccip_directory_and_configuration_rest_api_v1/models/environment3.rb +36 -0
  33. data/lib/ccip_directory_and_configuration_rest_api_v1/models/family.rb +64 -0
  34. data/lib/ccip_directory_and_configuration_rest_api_v1/models/fee_token_enriched.rb +130 -0
  35. data/lib/ccip_directory_and_configuration_rest_api_v1/models/lane_api_response.rb +102 -0
  36. data/lib/ccip_directory_and_configuration_rest_api_v1/models/lane_config_error.rb +102 -0
  37. data/lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb +116 -0
  38. data/lib/ccip_directory_and_configuration_rest_api_v1/models/lane_metadata.rb +119 -0
  39. data/lib/ccip_directory_and_configuration_rest_api_v1/models/off_ramp.rb +82 -0
  40. data/lib/ccip_directory_and_configuration_rest_api_v1/models/on_ramp.rb +95 -0
  41. data/lib/ccip_directory_and_configuration_rest_api_v1/models/output_key.rb +40 -0
  42. data/lib/ccip_directory_and_configuration_rest_api_v1/models/pool_type.rb +44 -0
  43. data/lib/ccip_directory_and_configuration_rest_api_v1/models/search_type.rb +46 -0
  44. data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_api_response.rb +101 -0
  45. data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_chain_data.rb +190 -0
  46. data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_chain_info.rb +159 -0
  47. data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_config_error.rb +91 -0
  48. data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_details.rb +99 -0
  49. data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_metadata.rb +119 -0
  50. data/lib/ccip_directory_and_configuration_rest_api_v1/utilities/date_time_helper.rb +11 -0
  51. data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/utilities/file_wrapper.rb +4 -4
  52. data/lib/ccip_directory_and_configuration_rest_api_v1/utilities/union_type_lookup.rb +61 -0
  53. data/lib/ccip_directory_and_configuration_rest_api_v1.rb +112 -0
  54. metadata +51 -36
  55. data/lib/swagger_petstore_open_api30/api_helper.rb +0 -10
  56. data/lib/swagger_petstore_open_api30/apis/pet_api.rb +0 -287
  57. data/lib/swagger_petstore_open_api30/apis/store_api.rb +0 -131
  58. data/lib/swagger_petstore_open_api30/apis/user_api.rb +0 -233
  59. data/lib/swagger_petstore_open_api30/client.rb +0 -94
  60. data/lib/swagger_petstore_open_api30/exceptions/oauth_provider_exception.rb +0 -64
  61. data/lib/swagger_petstore_open_api30/http/auth/api_key.rb +0 -52
  62. data/lib/swagger_petstore_open_api30/http/auth/petstore_auth.rb +0 -112
  63. data/lib/swagger_petstore_open_api30/http/http_call_back.rb +0 -10
  64. data/lib/swagger_petstore_open_api30/http/http_method_enum.rb +0 -10
  65. data/lib/swagger_petstore_open_api30/http/http_request.rb +0 -10
  66. data/lib/swagger_petstore_open_api30/http/http_response.rb +0 -10
  67. data/lib/swagger_petstore_open_api30/models/api_response.rb +0 -118
  68. data/lib/swagger_petstore_open_api30/models/category.rb +0 -105
  69. data/lib/swagger_petstore_open_api30/models/oauth_provider_error.rb +0 -62
  70. data/lib/swagger_petstore_open_api30/models/oauth_scope_petstore_auth.rb +0 -36
  71. data/lib/swagger_petstore_open_api30/models/oauth_token.rb +0 -125
  72. data/lib/swagger_petstore_open_api30/models/order.rb +0 -167
  73. data/lib/swagger_petstore_open_api30/models/order_status.rb +0 -40
  74. data/lib/swagger_petstore_open_api30/models/pet.rb +0 -168
  75. data/lib/swagger_petstore_open_api30/models/pet_status.rb +0 -40
  76. data/lib/swagger_petstore_open_api30/models/tag.rb +0 -105
  77. data/lib/swagger_petstore_open_api30/models/user.rb +0 -182
  78. data/lib/swagger_petstore_open_api30/utilities/date_time_helper.rb +0 -11
  79. data/lib/swagger_petstore_open_api30/utilities/xml_utilities.rb +0 -12
  80. data/lib/swagger_petstore_open_api30.rb +0 -62
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5929dd7a18b6de3b65d9ebb4b9cc92dbb2bf7712578d6cee5412257c2081b7f8
4
- data.tar.gz: 6453adf7bfc7e5d1de00bc451727cab73dcf00a9cf28bbd670cdf245bea9dda9
3
+ metadata.gz: c3cdf222a90b98b940c209aa5862738d6498fa5a352bd5bf116072b1fbd57482
4
+ data.tar.gz: 4898ca5fa5909bf0a067dc2e3cfa07d17108f8160d0fe375d9a423e9d2ea25b4
5
5
  SHA512:
6
- metadata.gz: 199c9664401cdfa2bde086162a6a33b107ff3589aa1565d8626750ce8a6775d2e627157429462fdb9de3f81d761de1e0339ba52e135f48d3743d112c23b82168
7
- data.tar.gz: 2e3d20c95f59b1d4f63143ad1814396cb31343c250da8ebf04c04a36c5ad79cf535957d02d41e36728e9d0c57c861c1fb38aaa2365459f14b30bfcf96707bb4a
6
+ metadata.gz: 452df95bda83b217cf40eb9f58b747fc1f33d4d83ce6ce9ac03ae712a815e64efc2dbd4743272e877eac97e1988c070957ab66dd437b148a48cc32d55daf2bf5
7
+ data.tar.gz: 616360cc2f5f627a6482c5964806200a4e444cee1849adf3aad49cb5ebf51828992e3825ab94250f160b9f97fbbc641691a6aec44b5c48f692928d358835e182
data/README.md CHANGED
@@ -1,35 +1,29 @@
1
1
 
2
- # Getting Started with Swagger Petstore - OpenAPI 3.0
2
+ # Getting Started with CCIP directory and configuration REST API (v1)
3
3
 
4
4
  ## Introduction
5
5
 
6
- This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about
7
- Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!
8
- You can now help us improve the API whether it's by making changes to the definition itself or to the code.
9
- That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
6
+ **Deprecation:** This CCIP Directory and configuration REST API (v1), including `/api/ccip/v1/*` on docs.chain.link, is **planned for deprecation soon**. Timelines and migration guidance will be published in the [CCIP Tools documentation](https://docs.chain.link/ccip/tools/). For new integrations, prefer the [CCIP Tools REST API (v2)](https://docs.chain.link/ccip/tools/api/) where it meets your needs.
10
7
 
11
- Some useful links:
8
+ REST API for CCIP supported chains, tokens, lanes, and related configuration on docs.chain.link. This is distinct from the CCIP Tools REST API (v2), which covers messages, lane latency, intents, and related tooling (https://docs.chain.link/ccip/tools/api/). For on-chain Solidity, Move, SVM, and TON interfaces, see https://docs.chain.link/ccip/api-reference.
12
9
 
13
- - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
14
- - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
15
-
16
- Find out more about Swagger: [https://swagger.io](https://swagger.io)
10
+ To get started quickly, you can download our [Postman Collection](/api/ccip/v1/postman-collection.json) which includes all endpoints and example requests.
17
11
 
18
12
  ## Install the Package
19
13
 
20
14
  Install the gem from the command line:
21
15
 
22
16
  ```bash
23
- gem install chainlink-apimatic-sdk -v 0.0.1
17
+ gem install chainlink-apimatic-sdk -v 0.0.2
24
18
  ```
25
19
 
26
20
  Or add the gem to your Gemfile and run `bundle`:
27
21
 
28
22
  ```ruby
29
- gem 'chainlink-apimatic-sdk', '0.0.1'
23
+ gem 'chainlink-apimatic-sdk', '0.0.2'
30
24
  ```
31
25
 
32
- For additional gem details, see the [RubyGems page for the chainlink-apimatic-sdk gem](https://rubygems.org/gems/chainlink-apimatic-sdk/versions/0.0.1).
26
+ For additional gem details, see the [RubyGems page for the chainlink-apimatic-sdk gem](https://rubygems.org/gems/chainlink-apimatic-sdk/versions/0.0.2).
33
27
 
34
28
  ## IRB Console Usage
35
29
 
@@ -46,8 +40,8 @@ irb
46
40
  Now you can load the SDK in the IRB
47
41
 
48
42
  ```ruby
49
- require 'swagger_petstore_open_api30'
50
- include SwaggerPetstoreOpenApi30
43
+ require 'ccip_directory_and_configuration_rest_api_v1'
44
+ include CcipDirectoryAndConfigurationRestApiV1
51
45
  ```
52
46
 
53
47
  ### 2. Use IRB within SDK
@@ -55,7 +49,7 @@ include SwaggerPetstoreOpenApi30
55
49
  Open your system terminal (Command Prompt, Git Bash or macOS Terminal) and navigate to the root folder of SDK.
56
50
 
57
51
  ```
58
- cd path/to/swagger_petstore_open_api30
52
+ cd path/to/ccip_directory_and_configuration_rest_api_v1
59
53
  ```
60
54
 
61
55
  Now you can start the preconfigured irb console by running the following command
@@ -68,13 +62,13 @@ ruby bin/console
68
62
 
69
63
  ## Initialize the API Client
70
64
 
71
- **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/client.md)
65
+ **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/client.md)
72
66
 
73
67
  The following parameters are configurable for the API Client:
74
68
 
75
69
  | Parameter | Type | Description |
76
70
  | --- | --- | --- |
77
- | environment | [`Environment`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/README.md#environments) | The API environment. <br> **Default: `Environment.PRODUCTION`** |
71
+ | environment | [`Environment`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/README.md#environments) | The API environment. <br> **Default: `Environment.PRODUCTION`** |
78
72
  | connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
79
73
  | adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
80
74
  | timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
@@ -84,31 +78,18 @@ The following parameters are configurable for the API Client:
84
78
  | retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
85
79
  | retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
86
80
  | http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
87
- | proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
88
- | logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md) | The SDK logging configuration for API calls |
89
- | petstore_auth_credentials | [`PetstoreAuthCredentials`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/auth/oauth-2-implicit-grant.md) | The credential object for OAuth 2 Implicit Grant |
90
- | api_key_credentials | [`ApiKeyCredentials`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/auth/custom-header-signature.md) | The credential object for Custom Header Signature |
81
+ | proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
82
+ | logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/logging-configuration.md) | The SDK logging configuration for API calls |
91
83
 
92
84
  The API client can be initialized as follows:
93
85
 
94
86
  ### Code-Based Client Initialization
95
87
 
96
88
  ```ruby
97
- require 'swagger_petstore_open_api30'
98
- include SwaggerPetstoreOpenApi30
89
+ require 'ccip_directory_and_configuration_rest_api_v1'
90
+ include CcipDirectoryAndConfigurationRestApiV1
99
91
 
100
92
  client = Client.new(
101
- petstore_auth_credentials: PetstoreAuthCredentials.new(
102
- oauth_client_id: 'OAuthClientId',
103
- oauth_redirect_uri: 'OAuthRedirectUri',
104
- oauth_scopes: [
105
- OauthScopePetstoreAuth::WRITEPETS,
106
- OauthScopePetstoreAuth::READPETS
107
- ]
108
- ),
109
- api_key_credentials: ApiKeyCredentials.new(
110
- api_key: 'api_key'
111
- ),
112
93
  environment: Environment::PRODUCTION,
113
94
  logging_configuration: LoggingConfiguration.new(
114
95
  log_level: Logger::INFO,
@@ -125,14 +106,14 @@ client = Client.new(
125
106
  ### Environment-Based Client Initialization
126
107
 
127
108
  ```ruby
128
- require 'swagger_petstore_open_api30'
129
- include SwaggerPetstoreOpenApi30
109
+ require 'ccip_directory_and_configuration_rest_api_v1'
110
+ include CcipDirectoryAndConfigurationRestApiV1
130
111
 
131
112
  # Create client from environment
132
113
  client = Client.from_env
133
114
  ```
134
115
 
135
- See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md) section for details.
116
+ See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/environment-based-client-initialization.md) section for details.
136
117
 
137
118
  ## Environments
138
119
 
@@ -142,40 +123,34 @@ The SDK can be configured to use a different environment for making API calls. A
142
123
 
143
124
  | Name | Description |
144
125
  | --- | --- |
145
- | PRODUCTION | **Default** |
146
-
147
- ## Authorization
148
-
149
- This API uses the following authentication schemes.
150
-
151
- * [`petstore_auth (OAuth 2 Implicit Grant)`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/auth/oauth-2-implicit-grant.md)
152
- * [`api_key (Custom Header Signature)`](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/auth/custom-header-signature.md)
126
+ | PRODUCTION | **Default** Production server |
127
+ | ENVIRONMENT2 | Development server |
153
128
 
154
129
  ## List of APIs
155
130
 
156
- * [Pet](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/pet.md)
157
- * [Store](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/store.md)
158
- * [User](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/controllers/user.md)
131
+ * [Chains](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/controllers/chains.md)
132
+ * [Tokens](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/controllers/tokens.md)
133
+ * [Lanes](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/controllers/lanes.md)
159
134
 
160
135
  ## SDK Infrastructure
161
136
 
162
137
  ### Configuration
163
138
 
164
- * [ProxySettings](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/proxy-settings.md)
165
- * [Environment-Based Client Initialization](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/environment-based-client-initialization.md)
166
- * [AbstractLogger](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/abstract-logger.md)
167
- * [LoggingConfiguration](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/logging-configuration.md)
168
- * [RequestLoggingConfiguration](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/request-logging-configuration.md)
169
- * [ResponseLoggingConfiguration](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/response-logging-configuration.md)
139
+ * [ProxySettings](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/proxy-settings.md)
140
+ * [Environment-Based Client Initialization](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/environment-based-client-initialization.md)
141
+ * [AbstractLogger](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/abstract-logger.md)
142
+ * [LoggingConfiguration](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/logging-configuration.md)
143
+ * [RequestLoggingConfiguration](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/request-logging-configuration.md)
144
+ * [ResponseLoggingConfiguration](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/response-logging-configuration.md)
170
145
 
171
146
  ### HTTP
172
147
 
173
- * [HttpResponse](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/http-response.md)
174
- * [HttpRequest](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/http-request.md)
148
+ * [HttpResponse](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/http-response.md)
149
+ * [HttpRequest](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/http-request.md)
175
150
 
176
151
  ### Utilities
177
152
 
178
- * [ApiResponse](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/api-response.md)
179
- * [ApiHelper](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/api-helper.md)
180
- * [DateTimeHelper](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.1/doc/date-time-helper.md)
153
+ * [ApiResponse](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/api-response.md)
154
+ * [ApiHelper](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/api-helper.md)
155
+ * [DateTimeHelper](https://www.github.com/sdks-io/chainlink-apimatic-ruby-sdk/tree/0.0.2/doc/date-time-helper.md)
181
156
 
data/bin/console CHANGED
@@ -4,11 +4,11 @@
4
4
  $LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
5
5
 
6
6
  # Require the gem
7
- require 'swagger_petstore_open_api30'
7
+ require 'ccip_directory_and_configuration_rest_api_v1'
8
8
 
9
- puts 'SwaggerPetstoreOpenApi30 SDK loaded!'
10
- puts 'You can now create a client with: client = SwaggerPetstoreOpenApi30::Client.new'
11
- puts 'Or use from_env: client = SwaggerPetstoreOpenApi30::Client.from_env'
9
+ puts 'CcipDirectoryAndConfigurationRestApiV1 SDK loaded!'
10
+ puts 'You can now create a client with: client = CcipDirectoryAndConfigurationRestApiV1::Client.new'
11
+ puts 'Or use from_env: client = CcipDirectoryAndConfigurationRestApiV1::Client.from_env'
12
12
 
13
13
  # Start an interactive IRB session
14
14
  require 'irb'
@@ -0,0 +1,10 @@
1
+ # ccip_directory_and_configuration_rest_api_v1
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module CcipDirectoryAndConfigurationRestApiV1
7
+ # API utility class
8
+ class APIHelper < CoreLibrary::ApiHelper
9
+ end
10
+ end
@@ -1,16 +1,16 @@
1
- # swagger_petstore_open_api30
1
+ # ccip_directory_and_configuration_rest_api_v1
2
2
  #
3
- # This file was automatically generated by
4
- # APIMATIC v3.0 ( https://www.apimatic.io ).
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
5
 
6
- module SwaggerPetstoreOpenApi30
6
+ module CcipDirectoryAndConfigurationRestApiV1
7
7
  # BaseApi.
8
8
  class BaseApi
9
9
  include CoreLibrary
10
10
  attr_accessor :config, :http_call_back
11
11
 
12
12
  def self.user_agent
13
- 'Ruby-SDK/0.0.1 (OS: {os-info}, Engine: {engine}/{engine-version})'
13
+ 'Ruby-SDK/0.0.2 (OS: {os-info}, Engine: {engine}/{engine-version})'
14
14
  end
15
15
 
16
16
  def self.user_agent_parameters
@@ -0,0 +1,69 @@
1
+ # ccip_directory_and_configuration_rest_api_v1
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module CcipDirectoryAndConfigurationRestApiV1
7
+ # ChainsApi
8
+ class ChainsApi < BaseApi
9
+ # Returns information about Cross-Chain Interoperability Protocol (CCIP)
10
+ # chains across different blockchain families (EVM, Solana, Aptos)
11
+ # @param [Environment3] environment Required parameter: The network
12
+ # environment to query
13
+ # @param [String] chain_id Optional parameter: Filter by chain ID (e.g., "1"
14
+ # for Ethereum, "56" for BSC, or a Solana pubkey)
15
+ # @param [String] selector Optional parameter: Filter by CCIP chain
16
+ # selector. Multiple selectors can be specified using comma-separated
17
+ # values
18
+ # @param [String] internal_id Optional parameter: Filter by internal chain
19
+ # identifier. Multiple IDs can be specified using comma-separated values
20
+ # (e.g., "ethereum-mainnet,bsc-mainnet")
21
+ # @param [OutputKey] output_key Optional parameter: Key to use for
22
+ # organizing the response data
23
+ # @param [EnrichFeeTokens] enrich_fee_tokens Optional parameter: When set to
24
+ # 'true', returns detailed fee token information including addresses, names,
25
+ # and decimals instead of just symbol strings
26
+ # @param [String] search Optional parameter: Unified search query.
27
+ # Automatically detects query type: selector (>17 digits), chainId (≤17
28
+ # digits or Solana base58 hash), internalId (kebab-case), or displayName
29
+ # (fuzzy text search). Cannot be combined with chainId, selector, or
30
+ # internalId filters.
31
+ # @param [Family] family Optional parameter: Filter results by chain family.
32
+ # Only effective when using the search parameter.
33
+ # @return [ApiResponse] Complete http response with raw body and status code.
34
+ def get_chains(environment,
35
+ chain_id: nil,
36
+ selector: nil,
37
+ internal_id: nil,
38
+ output_key: OutputKey::CHAINID,
39
+ enrich_fee_tokens: EnrichFeeTokens::ENUM_FALSE,
40
+ search: nil,
41
+ family: nil)
42
+ @api_call
43
+ .request(new_request_builder(HttpMethodEnum::GET,
44
+ '/chains',
45
+ Server::DEFAULT)
46
+ .query_param(new_parameter(environment, key: 'environment')
47
+ .is_required(true))
48
+ .query_param(new_parameter(chain_id, key: 'chainId'))
49
+ .query_param(new_parameter(selector, key: 'selector'))
50
+ .query_param(new_parameter(internal_id, key: 'internalId'))
51
+ .query_param(new_parameter(output_key, key: 'outputKey'))
52
+ .query_param(new_parameter(enrich_fee_tokens, key: 'enrichFeeTokens'))
53
+ .query_param(new_parameter(search, key: 'search'))
54
+ .query_param(new_parameter(family, key: 'family'))
55
+ .header_param(new_parameter('application/json', key: 'accept')))
56
+ .response(new_response_handler
57
+ .deserializer(APIHelper.method(:custom_type_deserializer))
58
+ .deserialize_into(ChainApiResponse.method(:from_hash))
59
+ .is_api_response(true)
60
+ .local_error('400',
61
+ 'Invalid request parameters',
62
+ ErrorResponseException)
63
+ .local_error('500',
64
+ 'Internal server error',
65
+ ErrorResponseException))
66
+ .execute
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,75 @@
1
+ # ccip_directory_and_configuration_rest_api_v1
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module CcipDirectoryAndConfigurationRestApiV1
7
+ # LanesApi
8
+ class LanesApi < BaseApi
9
+ # Returns information about Cross-Chain Interoperability Protocol (CCIP)
10
+ # lanes between supported chains. Each lane represents a unidirectional
11
+ # connection from a source chain to a destination chain, with associated
12
+ # onRamp and offRamp contracts and supported tokens.
13
+ # @param [Environment3] environment Required parameter: The network
14
+ # environment to query
15
+ # @param [String] source_chain_id Optional parameter: Filter by source chain
16
+ # ID. Multiple chain IDs can be specified using comma-separated values
17
+ # @param [String] destination_chain_id Optional parameter: Filter by
18
+ # destination chain ID. Multiple chain IDs can be specified using
19
+ # comma-separated values
20
+ # @param [String] source_selector Optional parameter: Filter by source chain
21
+ # CCIP selector. Multiple selectors can be specified using comma-separated
22
+ # values
23
+ # @param [String] destination_selector Optional parameter: Filter by
24
+ # destination chain CCIP selector. Multiple selectors can be specified using
25
+ # comma-separated values
26
+ # @param [String] source_internal_id Optional parameter: Filter by source
27
+ # chain internal identifier. Multiple IDs can be specified using
28
+ # comma-separated values
29
+ # @param [String] destination_internal_id Optional parameter: Filter by
30
+ # destination chain internal identifier. Multiple IDs can be specified using
31
+ # comma-separated values
32
+ # @param [String] version Optional parameter: Filter by lane version. Only
33
+ # lanes where both onRamp and offRamp match the specified version will be
34
+ # returned
35
+ # @param [OutputKey] output_key Optional parameter: Key format to use for
36
+ # organizing the lane keys in the response
37
+ # @return [ApiResponse] Complete http response with raw body and status code.
38
+ def get_lanes(environment,
39
+ source_chain_id: nil,
40
+ destination_chain_id: nil,
41
+ source_selector: nil,
42
+ destination_selector: nil,
43
+ source_internal_id: nil,
44
+ destination_internal_id: nil,
45
+ version: nil,
46
+ output_key: OutputKey::CHAINID)
47
+ @api_call
48
+ .request(new_request_builder(HttpMethodEnum::GET,
49
+ '/lanes',
50
+ Server::DEFAULT)
51
+ .query_param(new_parameter(environment, key: 'environment')
52
+ .is_required(true))
53
+ .query_param(new_parameter(source_chain_id, key: 'sourceChainId'))
54
+ .query_param(new_parameter(destination_chain_id, key: 'destinationChainId'))
55
+ .query_param(new_parameter(source_selector, key: 'sourceSelector'))
56
+ .query_param(new_parameter(destination_selector, key: 'destinationSelector'))
57
+ .query_param(new_parameter(source_internal_id, key: 'sourceInternalId'))
58
+ .query_param(new_parameter(destination_internal_id, key: 'destinationInternalId'))
59
+ .query_param(new_parameter(version, key: 'version'))
60
+ .query_param(new_parameter(output_key, key: 'outputKey'))
61
+ .header_param(new_parameter('application/json', key: 'accept')))
62
+ .response(new_response_handler
63
+ .deserializer(APIHelper.method(:custom_type_deserializer))
64
+ .deserialize_into(LaneApiResponse.method(:from_hash))
65
+ .is_api_response(true)
66
+ .local_error('400',
67
+ 'Bad request - invalid parameters',
68
+ ErrorResponseException)
69
+ .local_error('500',
70
+ 'Internal server error',
71
+ ErrorResponseException))
72
+ .execute
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,51 @@
1
+ # ccip_directory_and_configuration_rest_api_v1
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module CcipDirectoryAndConfigurationRestApiV1
7
+ # TokensApi
8
+ class TokensApi < BaseApi
9
+ # Returns information about Cross-Chain Interoperability Protocol (CCIP)
10
+ # supported tokens. The response includes token details organized by token
11
+ # symbol, with chain-specific information nested under each token and
12
+ # indexed by chain ID or selector (depending on the outputKey parameter).
13
+ # @param [Environment3] environment Required parameter: The network
14
+ # environment to query
15
+ # @param [String] token_id Optional parameter: Filter by token canonical
16
+ # identifier (e.g., "LINK" for Chainlink token, or "LINK,ETH" for multiple
17
+ # tokens)
18
+ # @param [String] chain_id Optional parameter: Filter by chain ID where the
19
+ # token is supported (e.g., "1" for Ethereum, or "1,56" for Ethereum and
20
+ # BSC)
21
+ # @param [OutputKey] output_key Optional parameter: Key to use for
22
+ # organizing the response data
23
+ # @return [ApiResponse] Complete http response with raw body and status code.
24
+ def get_tokens(environment,
25
+ token_id: nil,
26
+ chain_id: nil,
27
+ output_key: OutputKey::CHAINID)
28
+ @api_call
29
+ .request(new_request_builder(HttpMethodEnum::GET,
30
+ '/tokens',
31
+ Server::DEFAULT)
32
+ .query_param(new_parameter(environment, key: 'environment')
33
+ .is_required(true))
34
+ .query_param(new_parameter(token_id, key: 'token_id'))
35
+ .query_param(new_parameter(chain_id, key: 'chain_id'))
36
+ .query_param(new_parameter(output_key, key: 'outputKey'))
37
+ .header_param(new_parameter('application/json', key: 'accept')))
38
+ .response(new_response_handler
39
+ .deserializer(APIHelper.method(:custom_type_deserializer))
40
+ .deserialize_into(TokenApiResponse.method(:from_hash))
41
+ .is_api_response(true)
42
+ .local_error('400',
43
+ 'Invalid request parameters',
44
+ ErrorResponseException)
45
+ .local_error('500',
46
+ 'Internal server error',
47
+ ErrorResponseException))
48
+ .execute
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,72 @@
1
+ # ccip_directory_and_configuration_rest_api_v1
2
+ #
3
+ # This file was automatically
4
+ # generated by APIMATIC v3.0 ( https://www.apimatic.io ).
5
+
6
+ module CcipDirectoryAndConfigurationRestApiV1
7
+ # ccip_directory_and_configuration_rest_api_v1 client class.
8
+ class Client
9
+ include CoreLibrary
10
+ attr_reader :config
11
+
12
+ def user_agent_detail
13
+ config.user_agent_detail
14
+ end
15
+
16
+ # Access to chains controller.
17
+ # @return [ChainsApi] Returns the controller instance.
18
+ def chains
19
+ @chains ||= ChainsApi.new @global_configuration
20
+ end
21
+
22
+ # Access to tokens controller.
23
+ # @return [TokensApi] Returns the controller instance.
24
+ def tokens
25
+ @tokens ||= TokensApi.new @global_configuration
26
+ end
27
+
28
+ # Access to lanes controller.
29
+ # @return [LanesApi] Returns the controller instance.
30
+ def lanes
31
+ @lanes ||= LanesApi.new @global_configuration
32
+ end
33
+
34
+ def initialize(
35
+ connection: nil, adapter: :net_http_persistent, timeout: 30,
36
+ max_retries: 0, retry_interval: 1, backoff_factor: 2,
37
+ retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
38
+ retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
39
+ logging_configuration: nil, environment: Environment::PRODUCTION,
40
+ config: nil
41
+ )
42
+ @config = if config.nil?
43
+ Configuration.new(
44
+ connection: connection, adapter: adapter, timeout: timeout,
45
+ max_retries: max_retries, retry_interval: retry_interval,
46
+ backoff_factor: backoff_factor,
47
+ retry_statuses: retry_statuses,
48
+ retry_methods: retry_methods, http_callback: http_callback,
49
+ proxy_settings: proxy_settings,
50
+ logging_configuration: logging_configuration,
51
+ environment: environment
52
+ )
53
+ else
54
+ config
55
+ end
56
+ user_agent_params = BaseApi.user_agent_parameters
57
+
58
+ @global_configuration = GlobalConfiguration.new(client_configuration: @config)
59
+ .base_uri_executor(@config.method(:get_base_uri))
60
+ .global_errors(BaseApi::GLOBAL_ERRORS)
61
+ .user_agent(BaseApi.user_agent,
62
+ agent_parameters: user_agent_params)
63
+ end
64
+
65
+ # Creates a client directly from environment variables.
66
+ def self.from_env(**overrides)
67
+ default_config = Configuration.build_default_config_from_env
68
+ new_config = default_config.clone_with(**overrides)
69
+ new(config: new_config)
70
+ end
71
+ end
72
+ end