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.
- checksums.yaml +4 -4
- data/README.md +35 -60
- data/bin/console +4 -4
- data/lib/ccip_directory_and_configuration_rest_api_v1/api_helper.rb +10 -0
- data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/apis/base_api.rb +5 -5
- data/lib/ccip_directory_and_configuration_rest_api_v1/apis/chains_api.rb +69 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/apis/lanes_api.rb +75 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/apis/tokens_api.rb +51 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/client.rb +72 -0
- data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/configuration.rb +27 -41
- data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/exceptions/api_exception.rb +4 -4
- data/lib/ccip_directory_and_configuration_rest_api_v1/exceptions/error_response_exception.rb +57 -0
- data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/http/api_response.rb +4 -4
- data/lib/ccip_directory_and_configuration_rest_api_v1/http/http_call_back.rb +10 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/http/http_method_enum.rb +10 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/http/http_request.rb +10 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/http/http_response.rb +10 -0
- data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/http/proxy_settings.rb +4 -4
- data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/logging/configuration/api_logging_configuration.rb +4 -4
- data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/logging/sdk_logger.rb +4 -4
- data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/models/base_model.rb +4 -4
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_api_response.rb +99 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_config_error.rb +100 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_details.rb +272 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_family.rb +64 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_info.rb +135 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_metadata.rb +144 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/chain_type.rb +64 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/data.rb +171 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/enrich_fee_tokens.rb +36 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/environment.rb +36 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/environment3.rb +36 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/family.rb +64 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/fee_token_enriched.rb +130 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/lane_api_response.rb +102 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/lane_config_error.rb +102 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb +116 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/lane_metadata.rb +119 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/off_ramp.rb +82 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/on_ramp.rb +95 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/output_key.rb +40 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/pool_type.rb +44 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/search_type.rb +46 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_api_response.rb +101 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_chain_data.rb +190 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_chain_info.rb +159 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_config_error.rb +91 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_details.rb +99 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/models/token_metadata.rb +119 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1/utilities/date_time_helper.rb +11 -0
- data/lib/{swagger_petstore_open_api30 → ccip_directory_and_configuration_rest_api_v1}/utilities/file_wrapper.rb +4 -4
- data/lib/ccip_directory_and_configuration_rest_api_v1/utilities/union_type_lookup.rb +61 -0
- data/lib/ccip_directory_and_configuration_rest_api_v1.rb +112 -0
- metadata +51 -36
- data/lib/swagger_petstore_open_api30/api_helper.rb +0 -10
- data/lib/swagger_petstore_open_api30/apis/pet_api.rb +0 -287
- data/lib/swagger_petstore_open_api30/apis/store_api.rb +0 -131
- data/lib/swagger_petstore_open_api30/apis/user_api.rb +0 -233
- data/lib/swagger_petstore_open_api30/client.rb +0 -94
- data/lib/swagger_petstore_open_api30/exceptions/oauth_provider_exception.rb +0 -64
- data/lib/swagger_petstore_open_api30/http/auth/api_key.rb +0 -52
- data/lib/swagger_petstore_open_api30/http/auth/petstore_auth.rb +0 -112
- data/lib/swagger_petstore_open_api30/http/http_call_back.rb +0 -10
- data/lib/swagger_petstore_open_api30/http/http_method_enum.rb +0 -10
- data/lib/swagger_petstore_open_api30/http/http_request.rb +0 -10
- data/lib/swagger_petstore_open_api30/http/http_response.rb +0 -10
- data/lib/swagger_petstore_open_api30/models/api_response.rb +0 -118
- data/lib/swagger_petstore_open_api30/models/category.rb +0 -105
- data/lib/swagger_petstore_open_api30/models/oauth_provider_error.rb +0 -62
- data/lib/swagger_petstore_open_api30/models/oauth_scope_petstore_auth.rb +0 -36
- data/lib/swagger_petstore_open_api30/models/oauth_token.rb +0 -125
- data/lib/swagger_petstore_open_api30/models/order.rb +0 -167
- data/lib/swagger_petstore_open_api30/models/order_status.rb +0 -40
- data/lib/swagger_petstore_open_api30/models/pet.rb +0 -168
- data/lib/swagger_petstore_open_api30/models/pet_status.rb +0 -40
- data/lib/swagger_petstore_open_api30/models/tag.rb +0 -105
- data/lib/swagger_petstore_open_api30/models/user.rb +0 -182
- data/lib/swagger_petstore_open_api30/utilities/date_time_helper.rb +0 -11
- data/lib/swagger_petstore_open_api30/utilities/xml_utilities.rb +0 -12
- data/lib/swagger_petstore_open_api30.rb +0 -62
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
# LaneDetails Model.
|
|
8
|
+
class LaneDetails < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Chain information used in lane endpoints. Note: chainType and chainFamily
|
|
13
|
+
# are intentionally excluded from this schema for API responses.
|
|
14
|
+
# @return [ChainInfo]
|
|
15
|
+
attr_accessor :source_chain
|
|
16
|
+
|
|
17
|
+
# Chain information used in lane endpoints. Note: chainType and chainFamily
|
|
18
|
+
# are intentionally excluded from this schema for API responses.
|
|
19
|
+
# @return [ChainInfo]
|
|
20
|
+
attr_accessor :destination_chain
|
|
21
|
+
|
|
22
|
+
# Chain information used in lane endpoints. Note: chainType and chainFamily
|
|
23
|
+
# are intentionally excluded from this schema for API responses.
|
|
24
|
+
# @return [OnRamp]
|
|
25
|
+
attr_accessor :on_ramp
|
|
26
|
+
|
|
27
|
+
# Chain information used in lane endpoints. Note: chainType and chainFamily
|
|
28
|
+
# are intentionally excluded from this schema for API responses.
|
|
29
|
+
# @return [OffRamp]
|
|
30
|
+
attr_accessor :off_ramp
|
|
31
|
+
|
|
32
|
+
# List of supported token keys (e.g., LINK, CCIP-BnM, USDC)
|
|
33
|
+
# @return [Array[String]]
|
|
34
|
+
attr_accessor :supported_tokens
|
|
35
|
+
|
|
36
|
+
# A mapping from model property names to API property names.
|
|
37
|
+
def self.names
|
|
38
|
+
@_hash = {} if @_hash.nil?
|
|
39
|
+
@_hash['source_chain'] = 'sourceChain'
|
|
40
|
+
@_hash['destination_chain'] = 'destinationChain'
|
|
41
|
+
@_hash['on_ramp'] = 'onRamp'
|
|
42
|
+
@_hash['off_ramp'] = 'offRamp'
|
|
43
|
+
@_hash['supported_tokens'] = 'supportedTokens'
|
|
44
|
+
@_hash
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for optional fields
|
|
48
|
+
def self.optionals
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# An array for nullable fields
|
|
53
|
+
def self.nullables
|
|
54
|
+
[]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def initialize(source_chain:, destination_chain:, on_ramp:, off_ramp:,
|
|
58
|
+
supported_tokens:, additional_properties: nil)
|
|
59
|
+
# Add additional model properties to the instance
|
|
60
|
+
additional_properties = {} if additional_properties.nil?
|
|
61
|
+
|
|
62
|
+
@source_chain = source_chain
|
|
63
|
+
@destination_chain = destination_chain
|
|
64
|
+
@on_ramp = on_ramp
|
|
65
|
+
@off_ramp = off_ramp
|
|
66
|
+
@supported_tokens = supported_tokens
|
|
67
|
+
@additional_properties = additional_properties
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Creates an instance of the object from a hash.
|
|
71
|
+
def self.from_hash(hash)
|
|
72
|
+
return nil unless hash
|
|
73
|
+
|
|
74
|
+
# Extract variables from the hash.
|
|
75
|
+
source_chain = ChainInfo.from_hash(hash['sourceChain']) if hash['sourceChain']
|
|
76
|
+
destination_chain = ChainInfo.from_hash(hash['destinationChain']) if
|
|
77
|
+
hash['destinationChain']
|
|
78
|
+
on_ramp = OnRamp.from_hash(hash['onRamp']) if hash['onRamp']
|
|
79
|
+
off_ramp = OffRamp.from_hash(hash['offRamp']) if hash['offRamp']
|
|
80
|
+
supported_tokens =
|
|
81
|
+
hash.key?('supportedTokens') ? hash['supportedTokens'] : nil
|
|
82
|
+
|
|
83
|
+
# Create a new hash for additional properties, removing known properties.
|
|
84
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
85
|
+
|
|
86
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
87
|
+
new_hash, proc { |value| value }
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
# Create object from extracted values.
|
|
91
|
+
LaneDetails.new(source_chain: source_chain,
|
|
92
|
+
destination_chain: destination_chain,
|
|
93
|
+
on_ramp: on_ramp,
|
|
94
|
+
off_ramp: off_ramp,
|
|
95
|
+
supported_tokens: supported_tokens,
|
|
96
|
+
additional_properties: additional_properties)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Provides a human-readable string representation of the object.
|
|
100
|
+
def to_s
|
|
101
|
+
class_name = self.class.name.split('::').last
|
|
102
|
+
"<#{class_name} source_chain: #{@source_chain}, destination_chain: #{@destination_chain},"\
|
|
103
|
+
" on_ramp: #{@on_ramp}, off_ramp: #{@off_ramp}, supported_tokens: #{@supported_tokens},"\
|
|
104
|
+
" additional_properties: #{@additional_properties}>"
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
108
|
+
def inspect
|
|
109
|
+
class_name = self.class.name.split('::').last
|
|
110
|
+
"<#{class_name} source_chain: #{@source_chain.inspect}, destination_chain:"\
|
|
111
|
+
" #{@destination_chain.inspect}, on_ramp: #{@on_ramp.inspect}, off_ramp:"\
|
|
112
|
+
" #{@off_ramp.inspect}, supported_tokens: #{@supported_tokens.inspect},"\
|
|
113
|
+
" additional_properties: #{@additional_properties}>"
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
require 'date'
|
|
7
|
+
module CcipDirectoryAndConfigurationRestApiV1
|
|
8
|
+
# LaneMetadata Model.
|
|
9
|
+
class LaneMetadata < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The network environment
|
|
14
|
+
# @return [Environment]
|
|
15
|
+
attr_accessor :environment
|
|
16
|
+
|
|
17
|
+
# ISO timestamp of the response
|
|
18
|
+
# @return [DateTime]
|
|
19
|
+
attr_accessor :timestamp
|
|
20
|
+
|
|
21
|
+
# Unique identifier for the request
|
|
22
|
+
# @return [UUID | String]
|
|
23
|
+
attr_accessor :request_id
|
|
24
|
+
|
|
25
|
+
# Number of lanes ignored due to configuration issues
|
|
26
|
+
# @return [Integer]
|
|
27
|
+
attr_accessor :ignored_lane_count
|
|
28
|
+
|
|
29
|
+
# Number of valid lanes in the response
|
|
30
|
+
# @return [Integer]
|
|
31
|
+
attr_accessor :valid_lane_count
|
|
32
|
+
|
|
33
|
+
# A mapping from model property names to API property names.
|
|
34
|
+
def self.names
|
|
35
|
+
@_hash = {} if @_hash.nil?
|
|
36
|
+
@_hash['environment'] = 'environment'
|
|
37
|
+
@_hash['timestamp'] = 'timestamp'
|
|
38
|
+
@_hash['request_id'] = 'requestId'
|
|
39
|
+
@_hash['ignored_lane_count'] = 'ignoredLaneCount'
|
|
40
|
+
@_hash['valid_lane_count'] = 'validLaneCount'
|
|
41
|
+
@_hash
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# An array for optional fields
|
|
45
|
+
def self.optionals
|
|
46
|
+
[]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for nullable fields
|
|
50
|
+
def self.nullables
|
|
51
|
+
[]
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def initialize(environment:, timestamp:, request_id:, ignored_lane_count:,
|
|
55
|
+
valid_lane_count:, additional_properties: nil)
|
|
56
|
+
# Add additional model properties to the instance
|
|
57
|
+
additional_properties = {} if additional_properties.nil?
|
|
58
|
+
|
|
59
|
+
@environment = environment
|
|
60
|
+
@timestamp = timestamp
|
|
61
|
+
@request_id = request_id
|
|
62
|
+
@ignored_lane_count = ignored_lane_count
|
|
63
|
+
@valid_lane_count = valid_lane_count
|
|
64
|
+
@additional_properties = additional_properties
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Creates an instance of the object from a hash.
|
|
68
|
+
def self.from_hash(hash)
|
|
69
|
+
return nil unless hash
|
|
70
|
+
|
|
71
|
+
# Extract variables from the hash.
|
|
72
|
+
environment = hash.key?('environment') ? hash['environment'] : nil
|
|
73
|
+
timestamp = if hash.key?('timestamp')
|
|
74
|
+
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
|
75
|
+
end
|
|
76
|
+
request_id = hash.key?('requestId') ? hash['requestId'] : nil
|
|
77
|
+
ignored_lane_count =
|
|
78
|
+
hash.key?('ignoredLaneCount') ? hash['ignoredLaneCount'] : nil
|
|
79
|
+
valid_lane_count =
|
|
80
|
+
hash.key?('validLaneCount') ? hash['validLaneCount'] : nil
|
|
81
|
+
|
|
82
|
+
# Create a new hash for additional properties, removing known properties.
|
|
83
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
84
|
+
|
|
85
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
86
|
+
new_hash, proc { |value| value }
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
# Create object from extracted values.
|
|
90
|
+
LaneMetadata.new(environment: environment,
|
|
91
|
+
timestamp: timestamp,
|
|
92
|
+
request_id: request_id,
|
|
93
|
+
ignored_lane_count: ignored_lane_count,
|
|
94
|
+
valid_lane_count: valid_lane_count,
|
|
95
|
+
additional_properties: additional_properties)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def to_custom_timestamp
|
|
99
|
+
DateTimeHelper.to_rfc3339(timestamp)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Provides a human-readable string representation of the object.
|
|
103
|
+
def to_s
|
|
104
|
+
class_name = self.class.name.split('::').last
|
|
105
|
+
"<#{class_name} environment: #{@environment}, timestamp: #{@timestamp}, request_id:"\
|
|
106
|
+
" #{@request_id}, ignored_lane_count: #{@ignored_lane_count}, valid_lane_count:"\
|
|
107
|
+
" #{@valid_lane_count}, additional_properties: #{@additional_properties}>"
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
111
|
+
def inspect
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} environment: #{@environment.inspect}, timestamp: #{@timestamp.inspect},"\
|
|
114
|
+
" request_id: #{@request_id.inspect}, ignored_lane_count: #{@ignored_lane_count.inspect},"\
|
|
115
|
+
" valid_lane_count: #{@valid_lane_count.inspect}, additional_properties:"\
|
|
116
|
+
" #{@additional_properties}>"
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
# OffRamp Model.
|
|
8
|
+
class OffRamp < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# OffRamp contract address
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :address
|
|
15
|
+
|
|
16
|
+
# Normalized semantic version of the OffRamp contract
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :version
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['address'] = 'address'
|
|
24
|
+
@_hash['version'] = 'version'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for nullable fields
|
|
34
|
+
def self.nullables
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def initialize(address:, version:, additional_properties: nil)
|
|
39
|
+
# Add additional model properties to the instance
|
|
40
|
+
additional_properties = {} if additional_properties.nil?
|
|
41
|
+
|
|
42
|
+
@address = address
|
|
43
|
+
@version = version
|
|
44
|
+
@additional_properties = additional_properties
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Creates an instance of the object from a hash.
|
|
48
|
+
def self.from_hash(hash)
|
|
49
|
+
return nil unless hash
|
|
50
|
+
|
|
51
|
+
# Extract variables from the hash.
|
|
52
|
+
address = hash.key?('address') ? hash['address'] : nil
|
|
53
|
+
version = hash.key?('version') ? hash['version'] : nil
|
|
54
|
+
|
|
55
|
+
# Create a new hash for additional properties, removing known properties.
|
|
56
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
57
|
+
|
|
58
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
59
|
+
new_hash, proc { |value| value }
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# Create object from extracted values.
|
|
63
|
+
OffRamp.new(address: address,
|
|
64
|
+
version: version,
|
|
65
|
+
additional_properties: additional_properties)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Provides a human-readable string representation of the object.
|
|
69
|
+
def to_s
|
|
70
|
+
class_name = self.class.name.split('::').last
|
|
71
|
+
"<#{class_name} address: #{@address}, version: #{@version}, additional_properties:"\
|
|
72
|
+
" #{@additional_properties}>"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
76
|
+
def inspect
|
|
77
|
+
class_name = self.class.name.split('::').last
|
|
78
|
+
"<#{class_name} address: #{@address.inspect}, version: #{@version.inspect},"\
|
|
79
|
+
" additional_properties: #{@additional_properties}>"
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
# OnRamp Model.
|
|
8
|
+
class OnRamp < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# OnRamp contract address
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :address
|
|
15
|
+
|
|
16
|
+
# Normalized semantic version of the OnRamp contract
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :version
|
|
19
|
+
|
|
20
|
+
# Whether the OnRamp enforces out-of-order execution
|
|
21
|
+
# @return [TrueClass | FalseClass]
|
|
22
|
+
attr_accessor :enforce_out_of_order
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['address'] = 'address'
|
|
28
|
+
@_hash['version'] = 'version'
|
|
29
|
+
@_hash['enforce_out_of_order'] = 'enforceOutOfOrder'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
enforce_out_of_order
|
|
37
|
+
]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# An array for nullable fields
|
|
41
|
+
def self.nullables
|
|
42
|
+
[]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def initialize(address:, version:, enforce_out_of_order: SKIP,
|
|
46
|
+
additional_properties: nil)
|
|
47
|
+
# Add additional model properties to the instance
|
|
48
|
+
additional_properties = {} if additional_properties.nil?
|
|
49
|
+
|
|
50
|
+
@address = address
|
|
51
|
+
@version = version
|
|
52
|
+
@enforce_out_of_order = enforce_out_of_order unless enforce_out_of_order == SKIP
|
|
53
|
+
@additional_properties = additional_properties
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Creates an instance of the object from a hash.
|
|
57
|
+
def self.from_hash(hash)
|
|
58
|
+
return nil unless hash
|
|
59
|
+
|
|
60
|
+
# Extract variables from the hash.
|
|
61
|
+
address = hash.key?('address') ? hash['address'] : nil
|
|
62
|
+
version = hash.key?('version') ? hash['version'] : nil
|
|
63
|
+
enforce_out_of_order =
|
|
64
|
+
hash.key?('enforceOutOfOrder') ? hash['enforceOutOfOrder'] : SKIP
|
|
65
|
+
|
|
66
|
+
# Create a new hash for additional properties, removing known properties.
|
|
67
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
68
|
+
|
|
69
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
70
|
+
new_hash, proc { |value| value }
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
# Create object from extracted values.
|
|
74
|
+
OnRamp.new(address: address,
|
|
75
|
+
version: version,
|
|
76
|
+
enforce_out_of_order: enforce_out_of_order,
|
|
77
|
+
additional_properties: additional_properties)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Provides a human-readable string representation of the object.
|
|
81
|
+
def to_s
|
|
82
|
+
class_name = self.class.name.split('::').last
|
|
83
|
+
"<#{class_name} address: #{@address}, version: #{@version}, enforce_out_of_order:"\
|
|
84
|
+
" #{@enforce_out_of_order}, additional_properties: #{@additional_properties}>"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
88
|
+
def inspect
|
|
89
|
+
class_name = self.class.name.split('::').last
|
|
90
|
+
"<#{class_name} address: #{@address.inspect}, version: #{@version.inspect},"\
|
|
91
|
+
" enforce_out_of_order: #{@enforce_out_of_order.inspect}, additional_properties:"\
|
|
92
|
+
" #{@additional_properties}>"
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
# outputKey.
|
|
8
|
+
class OutputKey
|
|
9
|
+
OUTPUT_KEY = [
|
|
10
|
+
# TODO: Write general description for CHAINID
|
|
11
|
+
CHAINID = 'chainId'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for SELECTOR
|
|
14
|
+
SELECTOR = 'selector'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for INTERNALID
|
|
17
|
+
INTERNALID = 'internalId'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
OUTPUT_KEY.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = CHAINID)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'chainid' then CHAINID
|
|
33
|
+
when 'selector' then SELECTOR
|
|
34
|
+
when 'internalid' then INTERNALID
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
# Type of pool for this token
|
|
8
|
+
class PoolType
|
|
9
|
+
POOL_TYPE = [
|
|
10
|
+
# TODO: Write general description for LOCKRELEASE
|
|
11
|
+
LOCKRELEASE = 'lockRelease'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for BURNMINT
|
|
14
|
+
BURNMINT = 'burnMint'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for USDC
|
|
17
|
+
USDC = 'usdc'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for FEETOKENONLY
|
|
20
|
+
FEETOKENONLY = 'feeTokenOnly'.freeze
|
|
21
|
+
].freeze
|
|
22
|
+
|
|
23
|
+
def self.validate(value)
|
|
24
|
+
return false if value.nil?
|
|
25
|
+
|
|
26
|
+
POOL_TYPE.include?(value)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = LOCKRELEASE)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'lockrelease' then LOCKRELEASE
|
|
36
|
+
when 'burnmint' then BURNMINT
|
|
37
|
+
when 'usdc' then USDC
|
|
38
|
+
when 'feetokenonly' then FEETOKENONLY
|
|
39
|
+
else
|
|
40
|
+
default_value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
# The detected type of search query. 'selector' for CCIP selectors (>17
|
|
8
|
+
# digits), 'chainId' for chain IDs (≤17 digits or Solana base58), 'internalId'
|
|
9
|
+
# for kebab-case identifiers, 'displayName' for fuzzy text search.
|
|
10
|
+
class SearchType
|
|
11
|
+
SEARCH_TYPE = [
|
|
12
|
+
# TODO: Write general description for SELECTOR
|
|
13
|
+
SELECTOR = 'selector'.freeze,
|
|
14
|
+
|
|
15
|
+
# TODO: Write general description for CHAINID
|
|
16
|
+
CHAINID = 'chainId'.freeze,
|
|
17
|
+
|
|
18
|
+
# TODO: Write general description for INTERNALID
|
|
19
|
+
INTERNALID = 'internalId'.freeze,
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for DISPLAYNAME
|
|
22
|
+
DISPLAYNAME = 'displayName'.freeze
|
|
23
|
+
].freeze
|
|
24
|
+
|
|
25
|
+
def self.validate(value)
|
|
26
|
+
return false if value.nil?
|
|
27
|
+
|
|
28
|
+
SEARCH_TYPE.include?(value)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def self.from_value(value, default_value = SELECTOR)
|
|
32
|
+
return default_value if value.nil?
|
|
33
|
+
|
|
34
|
+
str = value.to_s.strip
|
|
35
|
+
|
|
36
|
+
case str.downcase
|
|
37
|
+
when 'selector' then SELECTOR
|
|
38
|
+
when 'chainid' then CHAINID
|
|
39
|
+
when 'internalid' then INTERNALID
|
|
40
|
+
when 'displayname' then DISPLAYNAME
|
|
41
|
+
else
|
|
42
|
+
default_value
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
# TokenApiResponse Model.
|
|
8
|
+
class TokenApiResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [TokenMetadata]
|
|
14
|
+
attr_accessor :metadata
|
|
15
|
+
|
|
16
|
+
# Token data indexed by token symbol and then by chain ID/selector
|
|
17
|
+
# @return [Hash[String, TokenChainData]]
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
20
|
+
# List of tokens that were ignored due to configuration issues
|
|
21
|
+
# @return [Array[TokenConfigError]]
|
|
22
|
+
attr_accessor :ignored
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['metadata'] = 'metadata'
|
|
28
|
+
@_hash['data'] = 'data'
|
|
29
|
+
@_hash['ignored'] = 'ignored'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for nullable fields
|
|
39
|
+
def self.nullables
|
|
40
|
+
[]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def initialize(metadata:, data:, ignored:, additional_properties: nil)
|
|
44
|
+
# Add additional model properties to the instance
|
|
45
|
+
additional_properties = {} if additional_properties.nil?
|
|
46
|
+
|
|
47
|
+
@metadata = metadata
|
|
48
|
+
@data = data
|
|
49
|
+
@ignored = ignored
|
|
50
|
+
@additional_properties = additional_properties
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Creates an instance of the object from a hash.
|
|
54
|
+
def self.from_hash(hash)
|
|
55
|
+
return nil unless hash
|
|
56
|
+
|
|
57
|
+
# Extract variables from the hash.
|
|
58
|
+
metadata = TokenMetadata.from_hash(hash['metadata']) if hash['metadata']
|
|
59
|
+
data = TokenChainData.from_hash(hash['data']) if hash['data']
|
|
60
|
+
|
|
61
|
+
data = nil unless hash.key?('data')
|
|
62
|
+
# Parameter is an array, so we need to iterate through it
|
|
63
|
+
ignored = nil
|
|
64
|
+
unless hash['ignored'].nil?
|
|
65
|
+
ignored = []
|
|
66
|
+
hash['ignored'].each do |structure|
|
|
67
|
+
ignored << (TokenConfigError.from_hash(structure) if structure)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
ignored = nil unless hash.key?('ignored')
|
|
72
|
+
|
|
73
|
+
# Create a new hash for additional properties, removing known properties.
|
|
74
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
75
|
+
|
|
76
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
77
|
+
new_hash, proc { |value| value }
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
# Create object from extracted values.
|
|
81
|
+
TokenApiResponse.new(metadata: metadata,
|
|
82
|
+
data: data,
|
|
83
|
+
ignored: ignored,
|
|
84
|
+
additional_properties: additional_properties)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Provides a human-readable string representation of the object.
|
|
88
|
+
def to_s
|
|
89
|
+
class_name = self.class.name.split('::').last
|
|
90
|
+
"<#{class_name} metadata: #{@metadata}, data: #{@data}, ignored: #{@ignored},"\
|
|
91
|
+
" additional_properties: #{@additional_properties}>"
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
95
|
+
def inspect
|
|
96
|
+
class_name = self.class.name.split('::').last
|
|
97
|
+
"<#{class_name} metadata: #{@metadata.inspect}, data: #{@data.inspect}, ignored:"\
|
|
98
|
+
" #{@ignored.inspect}, additional_properties: #{@additional_properties}>"
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|