Class: CcipDirectoryAndConfigurationRestApiV1::LaneDetails
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CcipDirectoryAndConfigurationRestApiV1::LaneDetails
- Defined in:
- lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb
Overview
LaneDetails Model.
Instance Attribute Summary collapse
-
#destination_chain ⇒ ChainInfo
Chain information used in lane endpoints.
-
#off_ramp ⇒ OffRamp
Chain information used in lane endpoints.
-
#on_ramp ⇒ OnRamp
Chain information used in lane endpoints.
-
#source_chain ⇒ ChainInfo
Chain information used in lane endpoints.
-
#supported_tokens ⇒ Array[String]
List of supported token keys (e.g., LINK, CCIP-BnM, USDC).
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(source_chain:, destination_chain:, on_ramp:, off_ramp:, supported_tokens:, additional_properties: nil) ⇒ LaneDetails
constructor
A new instance of LaneDetails.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(source_chain:, destination_chain:, on_ramp:, off_ramp:, supported_tokens:, additional_properties: nil) ⇒ LaneDetails
Returns a new instance of LaneDetails.
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 57 def initialize(source_chain:, destination_chain:, on_ramp:, off_ramp:, supported_tokens:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @source_chain = source_chain @destination_chain = destination_chain @on_ramp = on_ramp @off_ramp = off_ramp @supported_tokens = supported_tokens @additional_properties = additional_properties end |
Instance Attribute Details
#destination_chain ⇒ ChainInfo
Chain information used in lane endpoints. Note: chainType and chainFamily are intentionally excluded from this schema for API responses.
20 21 22 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 20 def destination_chain @destination_chain end |
#off_ramp ⇒ OffRamp
Chain information used in lane endpoints. Note: chainType and chainFamily are intentionally excluded from this schema for API responses.
30 31 32 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 30 def off_ramp @off_ramp end |
#on_ramp ⇒ OnRamp
Chain information used in lane endpoints. Note: chainType and chainFamily are intentionally excluded from this schema for API responses.
25 26 27 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 25 def on_ramp @on_ramp end |
#source_chain ⇒ ChainInfo
Chain information used in lane endpoints. Note: chainType and chainFamily are intentionally excluded from this schema for API responses.
15 16 17 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 15 def source_chain @source_chain end |
#supported_tokens ⇒ Array[String]
List of supported token keys (e.g., LINK, CCIP-BnM, USDC)
34 35 36 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 34 def supported_tokens @supported_tokens end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. source_chain = ChainInfo.from_hash(hash['sourceChain']) if hash['sourceChain'] destination_chain = ChainInfo.from_hash(hash['destinationChain']) if hash['destinationChain'] on_ramp = OnRamp.from_hash(hash['onRamp']) if hash['onRamp'] off_ramp = OffRamp.from_hash(hash['offRamp']) if hash['offRamp'] supported_tokens = hash.key?('supportedTokens') ? hash['supportedTokens'] : nil # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. LaneDetails.new(source_chain: source_chain, destination_chain: destination_chain, on_ramp: on_ramp, off_ramp: off_ramp, supported_tokens: supported_tokens, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['source_chain'] = 'sourceChain' @_hash['destination_chain'] = 'destinationChain' @_hash['on_ramp'] = 'onRamp' @_hash['off_ramp'] = 'offRamp' @_hash['supported_tokens'] = 'supportedTokens' @_hash end |
.nullables ⇒ Object
An array for nullable fields
53 54 55 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 53 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
48 49 50 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 48 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
108 109 110 111 112 113 114 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 108 def inspect class_name = self.class.name.split('::').last "<#{class_name} source_chain: #{@source_chain.inspect}, destination_chain:"\ " #{@destination_chain.inspect}, on_ramp: #{@on_ramp.inspect}, off_ramp:"\ " #{@off_ramp.inspect}, supported_tokens: #{@supported_tokens.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
100 101 102 103 104 105 |
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/lane_details.rb', line 100 def to_s class_name = self.class.name.split('::').last "<#{class_name} source_chain: #{@source_chain}, destination_chain: #{@destination_chain},"\ " on_ramp: #{@on_ramp}, off_ramp: #{@off_ramp}, supported_tokens: #{@supported_tokens},"\ " additional_properties: #{@additional_properties}>" end |