Class: GatewayServiceModel

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#portObject

Returns the value of attribute port.



16
17
18
# File 'lib/wingify/models/gateway_service_model.rb', line 16

def port
  @port
end

#urlObject

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_portObject



34
35
36
# File 'lib/wingify/models/gateway_service_model.rb', line 34

def get_port
    @port
end

#get_urlObject



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