Class: SimpleSpark::Endpoints::SendingDomains
- Inherits:
-
Object
- Object
- SimpleSpark::Endpoints::SendingDomains
- Defined in:
- lib/simple_spark/endpoints/sending_domains.rb
Overview
Example sending domain { “domain”: “example1.com”, “tracking_domain”: “click.example1.com”, “status”: { “ownership_verified”: true, “spf_status”: “valid”, “abuse_at_status”: “valid”, “abuse_at_status”: “valid”, “dkim_status”: “valid”, “compliance_status”: “valid”, “postmaster_at_status”: “valid” } }
Provides access to the /sending-domains endpoint
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
-
#create(values) ⇒ Object
Create a sending domain.
-
#delete(domain_name) ⇒ Object
Delete a sending domain.
-
#initialize(client) ⇒ SendingDomains
constructor
A new instance of SendingDomains.
-
#list ⇒ Array
Lists your sending domains.
-
#retrieve(domain_name) ⇒ Hash
Retrieve a sending domain.
-
#update(domain_name, values) ⇒ Object
Update a Sending Domain by its domain name.
-
#verify(domain_name, values) ⇒ Object
Verify a Sending Domain by its domain name.
Constructor Details
#initialize(client) ⇒ SendingDomains
Returns a new instance of SendingDomains.
12 13 14 |
# File 'lib/simple_spark/endpoints/sending_domains.rb', line 12 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
10 11 12 |
# File 'lib/simple_spark/endpoints/sending_domains.rb', line 10 def client @client end |
Instance Method Details
#create(values) ⇒ Object
Create a sending domain
27 28 29 |
# File 'lib/simple_spark/endpoints/sending_domains.rb', line 27 def create(values) @client.call(method: :post, path: 'sending-domains', body_values: values) end |
#delete(domain_name) ⇒ Object
Delete a sending domain
68 69 70 71 |
# File 'lib/simple_spark/endpoints/sending_domains.rb', line 68 def delete(domain_name) domain_name = @client.url_encode(domain_name) @client.call(method: :delete, path: "sending-domains/#{domain_name}") end |
#list ⇒ Array
Lists your sending domains
19 20 21 |
# File 'lib/simple_spark/endpoints/sending_domains.rb', line 19 def list @client.call(method: :get, path: 'sending-domains') end |
#retrieve(domain_name) ⇒ Hash
Retrieve a sending domain
35 36 37 38 |
# File 'lib/simple_spark/endpoints/sending_domains.rb', line 35 def retrieve(domain_name) domain_name = @client.url_encode(domain_name) @client.call(method: :get, path: "sending-domains/#{domain_name}") end |
#update(domain_name, values) ⇒ Object
Update a Sending Domain by its domain name
45 46 47 48 |
# File 'lib/simple_spark/endpoints/sending_domains.rb', line 45 def update(domain_name, values) domain_name = @client.url_encode(domain_name) @client.call(method: :put, path: "sending-domains/#{domain_name}", body_values: values) end |
#verify(domain_name, values) ⇒ Object
Verify a Sending Domain by its domain name
60 61 62 63 |
# File 'lib/simple_spark/endpoints/sending_domains.rb', line 60 def verify(domain_name, values) domain_name = @client.url_encode(domain_name) @client.call(method: :post, path: "sending-domains/#{domain_name}/verify", body_values: values) end |