Sha256: bd8ab75f881dae2f90879f96ca8f0a8556e6fb63f82e3deaa0428ca3abd0293e

Contents?: true

Size: 1.12 KB

Versions: 81

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

require "resend/request"
require "resend/errors"

module Resend
  # domains api wrapper
  module Domains
    class << self
      # https://resend.com/docs/api-reference/domains/create-domain
      def create(params)
        path = "domains"
        Resend::Request.new(path, params, "post").perform
      end

      # https://resend.com/docs/api-reference/domains/get-domain
      def get(domain_id = "")
        path = "domains/#{domain_id}"
        Resend::Request.new(path, {}, "get").perform
      end

      # https://resend.com/docs/api-reference/api-keys/list-api-keys
      def list
        path = "domains"
        Resend::Request.new(path, {}, "get").perform
      end

      # https://resend.com/docs/api-reference/domains/delete-domain
      def remove(domain_id = "")
        path = "domains/#{domain_id}"
        Resend::Request.new(path, {}, "delete").perform
      end

      # https://resend.com/docs/api-reference/domains/verify-domain
      def verify(domain_id = "")
        path = "domains/#{domain_id}/verify"
        Resend::Request.new(path, {}, "post").perform
      end
    end
  end
end

Version data entries

81 entries across 81 versions & 2 rubygems

Version Path
harbr-0.1.72 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.71 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.70 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.69 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.68 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.67 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.66 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.65 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.64 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.63 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.62 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.61 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.60 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.59 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.58 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.57 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.56 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.55 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.54 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb
harbr-0.1.53 vendor/bundle/ruby/3.2.0/gems/resend-0.8.1/lib/resend/domains.rb