Class: Scalingo::Endpoint::Domains

Inherits:
Collection show all
Defined in:
lib/scalingo/endpoint/domains.rb

Instance Attribute Summary

Attributes included from Base

#api, #auth_api, #prefix

Instance Method Summary collapse

Methods inherited from Collection

#all, #collection_name, #each, #find, #find_by, #resource_class

Methods included from Scalingo::Endpoint

included

Methods included from ClassMethods

#resources

Methods included from Base

#initialize

Instance Method Details

#create(name, tlscert = nil, tlskey = nil) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/scalingo/endpoint/domains.rb', line 4

def create(name, tlscert = nil, tlskey = nil)
  if tlskey
    post(nil, domain: { name: name, tlscert: tlscert, tlskey: tlskey })
  else
    post(nil, domain: { name: name })
  end
end