class PlatformAPI::Domain

Domains define what web routes should be routed to an app on Heroku.

Public Class Methods

new(client) click to toggle source
# File lib/platform-api/client.rb, line 1680
def initialize(client)
  @client = client
end

Public Instance Methods

create(app_id_or_app_name, body = {}) click to toggle source

Create a new domain.

@param app_id_or_app_name: unique identifier of app or unique name of app @param body: the object to pass as the request payload

# File lib/platform-api/client.rb, line 1696
def create(app_id_or_app_name, body = {})
  @client.domain.create(app_id_or_app_name, body)
end
create_deprecated(app_id_or_app_name, body = {}) click to toggle source

Create a new domain. Deprecated in favor of this same endpoint, but with a new required attribute of `sni_endpoint`. During the transitional phase sni_endpoint can be omitted entirely (current behavior), can be a valid id, or can be null which will skip auto-association.

@param app_id_or_app_name: unique identifier of app or unique name of app @param body: the object to pass as the request payload

# File lib/platform-api/client.rb, line 1688
def create_deprecated(app_id_or_app_name, body = {})
  @client.domain.create_deprecated(app_id_or_app_name, body)
end
delete(app_id_or_app_name, domain_id_or_domain_hostname) click to toggle source

Delete an existing domain

@param app_id_or_app_name: unique identifier of app or unique name of app @param domain_id_or_domain_hostname: unique identifier of this domain or full hostname

# File lib/platform-api/client.rb, line 1713
def delete(app_id_or_app_name, domain_id_or_domain_hostname)
  @client.domain.delete(app_id_or_app_name, domain_id_or_domain_hostname)
end
info(app_id_or_app_name, domain_id_or_domain_hostname) click to toggle source

Info for existing domain.

@param app_id_or_app_name: unique identifier of app or unique name of app @param domain_id_or_domain_hostname: unique identifier of this domain or full hostname

# File lib/platform-api/client.rb, line 1721
def info(app_id_or_app_name, domain_id_or_domain_hostname)
  @client.domain.info(app_id_or_app_name, domain_id_or_domain_hostname)
end
list(app_id_or_app_name) click to toggle source

List existing domains.

@param app_id_or_app_name: unique identifier of app or unique name of app

# File lib/platform-api/client.rb, line 1728
def list(app_id_or_app_name)
  @client.domain.list(app_id_or_app_name)
end
update(app_id_or_app_name, domain_id_or_domain_hostname, body = {}) click to toggle source

Associate an SNI endpoint

@param app_id_or_app_name: unique identifier of app or unique name of app @param domain_id_or_domain_hostname: unique identifier of this domain or full hostname @param body: the object to pass as the request payload

# File lib/platform-api/client.rb, line 1705
def update(app_id_or_app_name, domain_id_or_domain_hostname, body = {})
  @client.domain.update(app_id_or_app_name, domain_id_or_domain_hostname, body)
end