Class: Ovh::Api::Api::SslGateway::Server
- Inherits:
-
Object
- Object
- Ovh::Api::Api::SslGateway::Server
- Defined in:
- lib/ovh-api/api/ssl_gateway/server.rb
Instance Method Summary collapse
- #create(service_name:, ssl_gateway_service_name_server_post_request:) ⇒ Object
- #delete(id:, service_name:) ⇒ Object
- #get(id:, service_name:) ⇒ Object
-
#initialize(connection) ⇒ Server
constructor
A new instance of Server.
- #list(service_name:) ⇒ Object
- #update(id:, service_name:, ssl_gateway_server:) ⇒ Object
Constructor Details
#initialize(connection) ⇒ Server
Returns a new instance of Server.
6 7 8 |
# File 'lib/ovh-api/api/ssl_gateway/server.rb', line 6 def initialize(connection) @connection = connection end |
Instance Method Details
#create(service_name:, ssl_gateway_service_name_server_post_request:) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ovh-api/api/ssl_gateway/server.rb', line 10 def create(service_name:, ssl_gateway_service_name_server_post_request:) raise ArgumentError, 'service_name is required' if service_name.nil? raise ArgumentError, 'ssl_gateway_service_name_server_post_request is required' if ssl_gateway_service_name_server_post_request.nil? @connection.call( :POST, '/sslGateway/{serviceName}/server' .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)), type: nil, auth: [], body: ssl_gateway_service_name_server_post_request ) end |
#delete(id:, service_name:) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ovh-api/api/ssl_gateway/server.rb', line 24 def delete(id:, service_name:) raise ArgumentError, 'id is required' if id.nil? raise ArgumentError, 'service_name is required' if service_name.nil? @connection.call( :DELETE, '/sslGateway/{serviceName}/server/{id}' .gsub('{id}', ERB::Util.url_encode(id.to_s)) .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)), type: nil, auth: [] ) end |
#get(id:, service_name:) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ovh-api/api/ssl_gateway/server.rb', line 38 def get(id:, service_name:) raise ArgumentError, 'id is required' if id.nil? raise ArgumentError, 'service_name is required' if service_name.nil? @connection.call( :GET, '/sslGateway/{serviceName}/server/{id}' .gsub('{id}', ERB::Util.url_encode(id.to_s)) .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)), type: nil, auth: [] ) end |
#list(service_name:) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/ovh-api/api/ssl_gateway/server.rb', line 52 def list(service_name:) raise ArgumentError, 'service_name is required' if service_name.nil? @connection.call( :GET, '/sslGateway/{serviceName}/server' .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)), type: nil, auth: [] ) end |
#update(id:, service_name:, ssl_gateway_server:) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/ovh-api/api/ssl_gateway/server.rb', line 64 def update(id:, service_name:, ssl_gateway_server:) raise ArgumentError, 'id is required' if id.nil? raise ArgumentError, 'service_name is required' if service_name.nil? raise ArgumentError, 'ssl_gateway_server is required' if ssl_gateway_server.nil? @connection.call( :PUT, '/sslGateway/{serviceName}/server/{id}' .gsub('{id}', ERB::Util.url_encode(id.to_s)) .gsub('{serviceName}', ERB::Util.url_encode(service_name.to_s)), type: nil, auth: [], body: ssl_gateway_server ) end |