Class: Telnyx::Resources::EmailDomains
- Inherits:
-
Object
- Object
- Telnyx::Resources::EmailDomains
- Defined in:
- lib/telnyx/resources/email_domains.rb,
lib/telnyx/resources/email_domains/webhooks.rb,
sig/telnyx/resources/email_domains.rbs,
sig/telnyx/resources/email_domains/webhooks.rbs
Defined Under Namespace
Classes: Webhooks
Instance Attribute Summary collapse
-
#webhooks ⇒ Telnyx::Resources::EmailDomains::Webhooks
readonly
Per-domain webhook endpoints with event subscriptions.
Instance Method Summary collapse
-
#create(domain:, dmarc_policy: nil, inbound_enabled: nil, tracking: nil, request_options: {}) ⇒ Telnyx::Models::EmailDomainResponse
Some parameter documentations has been truncated, see Models::EmailDomainCreateParams for more details.
-
#delete(id, force: nil, request_options: {}) ⇒ Telnyx::Models::EmailDomainResponse
Delete an email domain.
-
#initialize(client:) ⇒ EmailDomains
constructor
private
A new instance of EmailDomains.
-
#list(filter_domain: nil, filter_profile_id: nil, filter_status: nil, filter_type: nil, filter_usable_for_inbound: nil, filter_usable_for_sending: nil, page_after: nil, page_before: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::EmailDomain>
Shared (
type: shared) Telnyx-managed domains are included/readable for every account, in addition to the account's own custom domains. -
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::EmailDomainResponse
Shared (
type: shared) Telnyx-managed domains are included/readable for every account, in addition to the account's own custom domains. -
#retrieve_dns_records(domain_id, request_options: {}) ⇒ Telnyx::Models::EmailDomainRetrieveDNSRecordsResponse
List DNS records for an email domain.
-
#retrieve_health(id, request_options: {}) ⇒ Telnyx::Models::EmailDomainRetrieveHealthResponse
Returns a summary of domain health including verification status and usability.
-
#update(id, dmarc_policy: nil, inbound_enabled: nil, tracking: nil, request_options: {}) ⇒ Telnyx::Models::EmailDomainResponse
Some parameter documentations has been truncated, see Models::EmailDomainUpdateParams for more details.
-
#verify(domain_id, request_options: {}) ⇒ Telnyx::Models::EmailDomainResponse
Verify DNS records for an email domain.
Constructor Details
#initialize(client:) ⇒ EmailDomains
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of EmailDomains.
239 240 241 242 |
# File 'lib/telnyx/resources/email_domains.rb', line 239 def initialize(client:) @client = client @webhooks = Telnyx::Resources::EmailDomains::Webhooks.new(client: client) end |
Instance Attribute Details
#webhooks ⇒ Telnyx::Resources::EmailDomains::Webhooks (readonly)
Per-domain webhook endpoints with event subscriptions
8 9 10 |
# File 'lib/telnyx/resources/email_domains.rb', line 8 def webhooks @webhooks end |
Instance Method Details
#create(domain:, dmarc_policy: nil, inbound_enabled: nil, tracking: nil, request_options: {}) ⇒ Telnyx::Models::EmailDomainResponse
Some parameter documentations has been truncated, see Models::EmailDomainCreateParams for more details.
Create an email domain
re
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/telnyx/resources/email_domains.rb', line 31 def create(params) parsed, = Telnyx::EmailDomainCreateParams.dump_request(params) @client.request( method: :post, path: "email_domains", body: parsed, model: Telnyx::EmailDomainResponse, options: ) end |
#delete(id, force: nil, request_options: {}) ⇒ Telnyx::Models::EmailDomainResponse
Delete an email domain
164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/telnyx/resources/email_domains.rb', line 164 def delete(id, params = {}) parsed, = Telnyx::EmailDomainDeleteParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :delete, path: ["email_domains/%1$s", id], query: query, model: Telnyx::EmailDomainResponse, options: ) end |
#list(filter_domain: nil, filter_profile_id: nil, filter_status: nil, filter_type: nil, filter_usable_for_inbound: nil, filter_usable_for_sending: nil, page_after: nil, page_before: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::EmailDomain>
Shared (type: shared) Telnyx-managed domains are included/readable for every
account, in addition to the account's own custom domains.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/telnyx/resources/email_domains.rb', line 127 def list(params = {}) parsed, = Telnyx::EmailDomainListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "email_domains", query: query.transform_keys( filter_domain: "filter[domain]", filter_profile_id: "filter[profile_id]", filter_status: "filter[status]", filter_type: "filter[type]", filter_usable_for_inbound: "filter[usable_for_inbound]", filter_usable_for_sending: "filter[usable_for_sending]", page_after: "page[after]", page_before: "page[before]", page_number: "page[number]", page_size: "page[size]" ), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::EmailDomain, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::EmailDomainResponse
Shared (type: shared) Telnyx-managed domains are included/readable for every
account, in addition to the account's own custom domains.
54 55 56 57 58 59 60 61 |
# File 'lib/telnyx/resources/email_domains.rb', line 54 def retrieve(id, params = {}) @client.request( method: :get, path: ["email_domains/%1$s", id], model: Telnyx::EmailDomainResponse, options: params[:request_options] ) end |
#retrieve_dns_records(domain_id, request_options: {}) ⇒ Telnyx::Models::EmailDomainRetrieveDNSRecordsResponse
List DNS records for an email domain
187 188 189 190 191 192 193 194 |
# File 'lib/telnyx/resources/email_domains.rb', line 187 def retrieve_dns_records(domain_id, params = {}) @client.request( method: :get, path: ["email_domains/%1$s/dns_records", domain_id], model: Telnyx::Models::EmailDomainRetrieveDNSRecordsResponse, options: params[:request_options] ) end |
#retrieve_health(id, request_options: {}) ⇒ Telnyx::Models::EmailDomainRetrieveHealthResponse
Returns a summary of domain health including verification status and usability.
207 208 209 210 211 212 213 214 |
# File 'lib/telnyx/resources/email_domains.rb', line 207 def retrieve_health(id, params = {}) @client.request( method: :get, path: ["email_domains/%1$s/health", id], model: Telnyx::Models::EmailDomainRetrieveHealthResponse, options: params[:request_options] ) end |
#update(id, dmarc_policy: nil, inbound_enabled: nil, tracking: nil, request_options: {}) ⇒ Telnyx::Models::EmailDomainResponse
Some parameter documentations has been truncated, see Models::EmailDomainUpdateParams for more details.
Update an email domain
re
84 85 86 87 88 89 90 91 92 93 |
# File 'lib/telnyx/resources/email_domains.rb', line 84 def update(id, params = {}) parsed, = Telnyx::EmailDomainUpdateParams.dump_request(params) @client.request( method: :patch, path: ["email_domains/%1$s", id], body: parsed, model: Telnyx::EmailDomainResponse, options: ) end |
#verify(domain_id, request_options: {}) ⇒ Telnyx::Models::EmailDomainResponse
Verify DNS records for an email domain
227 228 229 230 231 232 233 234 |
# File 'lib/telnyx/resources/email_domains.rb', line 227 def verify(domain_id, params = {}) @client.request( method: :post, path: ["email_domains/%1$s/verify", domain_id], model: Telnyx::EmailDomainResponse, options: params[:request_options] ) end |