class SimpleSpark::Endpoints::InboundDomains
Provides access to the /inbound-domains endpoint See: developers.sparkpost.com/api/#/reference/inbound-domains
Attributes
Public Class Methods
# File lib/simple_spark/endpoints/inbound_domains.rb, line 8 def initialize(client) @client = client end
Public Instance Methods
Create an inbound domain @param domain_name [String] the domain name to create @note See: developers.sparkpost.com/api/#/reference/inbound-domains/create-and-list
# File lib/simple_spark/endpoints/inbound_domains.rb, line 22 def create(domain_name) @client.call(method: :post, path: 'inbound-domains', body_values: { domain: domain_name }) end
Delete an inbound domain @param domain_name [String] the domain name to delete @note See: developers.sparkpost.com/api/#/reference/inbound-domains/retrieve-and-delete
# File lib/simple_spark/endpoints/inbound_domains.rb, line 38 def delete(domain_name) domain_name = @client.url_encode(domain_name) @client.call(method: :delete, path: "inbound-domains/#{domain_name}") end
Lists your inbound domains @return [Array] a list of Inbound Domain hash objects @note See: developers.sparkpost.com/api/#/reference/inbound-domains/create-and-list
# File lib/simple_spark/endpoints/inbound_domains.rb, line 15 def list @client.call(method: :get, path: 'inbound-domains') end
Retrieve an inbound domain @param domain_name [String] the domain name to retrieve @return [Hash] an Inbound Domain hash object @note See: developers.sparkpost.com/api/#/reference/inbound-domains/retrieve-and-delete
# File lib/simple_spark/endpoints/inbound_domains.rb, line 30 def retrieve(domain_name) domain_name = @client.url_encode(domain_name) @client.call(method: :get, path: "inbound-domains/#{domain_name}") end