Class: GatewayServiceModel
- Inherits:
-
Object
- Object
- GatewayServiceModel
- Defined in:
- lib/wingify/models/gateway_service_model.rb
Overview
Copyright 2024-2026 Wingify Software Pvt. Ltd.
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Instance Attribute Summary collapse
-
#port ⇒ Object
Returns the value of attribute port.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #get_port ⇒ Object
- #get_url ⇒ Object
-
#initialize(url = '', port = nil) ⇒ GatewayServiceModel
constructor
A new instance of GatewayServiceModel.
-
#model_from_dictionary(gateway_service_model) ⇒ Object
Creates a model instance from a hash (dictionary).
Constructor Details
#initialize(url = '', port = nil) ⇒ GatewayServiceModel
Returns a new instance of GatewayServiceModel.
18 19 20 21 |
# File 'lib/wingify/models/gateway_service_model.rb', line 18 def initialize(url = '', port = nil) @url = url @port = port end |
Instance Attribute Details
#port ⇒ Object
Returns the value of attribute port.
16 17 18 |
# File 'lib/wingify/models/gateway_service_model.rb', line 16 def port @port end |
#url ⇒ Object
Returns the value of attribute url.
16 17 18 |
# File 'lib/wingify/models/gateway_service_model.rb', line 16 def url @url end |
Instance Method Details
#get_port ⇒ Object
34 35 36 |
# File 'lib/wingify/models/gateway_service_model.rb', line 34 def get_port @port end |
#get_url ⇒ Object
30 31 32 |
# File 'lib/wingify/models/gateway_service_model.rb', line 30 def get_url @url end |
#model_from_dictionary(gateway_service_model) ⇒ Object
Creates a model instance from a hash (dictionary)
24 25 26 27 28 |
# File 'lib/wingify/models/gateway_service_model.rb', line 24 def model_from_dictionary(gateway_service_model) @url = gateway_service_model[:url] @port = gateway_service_model[:port] self end |