resend 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70596dffa29e9dcb7003a899e14efdbab47ba5358d2c4b38fb8e3b25d7a213b0
4
- data.tar.gz: c6bdbac869e0e0d87d23300f2e634f08d394ce8782711341c0a070afed5dd579
3
+ metadata.gz: 5d9f1a280f431982fb96f2aa2f9cba2396573269bdd460ffa6fb1df557010192
4
+ data.tar.gz: 9e12315d3ef20e78a372f167f154e62e896fe8daf83b8f7e911a1da2bd1aef12
5
5
  SHA512:
6
- metadata.gz: cf2f95914e24fc67fc1b46d544cfe019bff4fe883887a601821756903581ae186207584ec34be9b7f0ef38e5d835fabbb4e415c0f8453be10d2b0539146c80f7
7
- data.tar.gz: a7da2edfcb4782f9c2159b65000f578bbeecabaebd95e79062815be439932eb94aec1e7bffd0a8c1cd6af62cc54f990536d46d8ea84edc67ebf15b27eecf4271
6
+ metadata.gz: 32b0832968fbd41b4e83303e44fde5b25f8cd4a9d95a941eb21bd6cbb529b4d2c7d6e3d0f6cfec473cc49424104c492b59e32e699ee4f549d0ef086d3c1beb57
7
+ data.tar.gz: 2994a9386f5dc946822b6b59e20832234a31a2ad3d36e3b345c89042648bad47fa4afdc57b2e830bed0b81c9ca92d385860e920d6339747c58b41994cc4f72c9
@@ -25,7 +25,13 @@ module Resend
25
25
  Resend::Request.new(path, {}, "get").perform
26
26
  end
27
27
 
28
- # https://resend.com/docs/api-reference/contacts/delete-contact
28
+ #
29
+ # Remove a contact from an audience
30
+ #
31
+ # @param audience_id [String] the audience id
32
+ # @param contact_id [String] either the contact id or contact email
33
+ #
34
+ # see also: https://resend.com/docs/api-reference/contacts/delete-contact
29
35
  def remove(audience_id, contact_id)
30
36
  path = "audiences/#{audience_id}/contacts/#{contact_id}"
31
37
  Resend::Request.new(path, {}, "delete").perform
@@ -13,6 +13,12 @@ module Resend
13
13
  Resend::Request.new(path, params, "post").perform
14
14
  end
15
15
 
16
+ # https://resend.com/docs/api-reference/domains/update-domain
17
+ def update(params)
18
+ path = "domains/#{params[:id]}"
19
+ Resend::Request.new(path, params, "patch").perform
20
+ end
21
+
16
22
  # https://resend.com/docs/api-reference/domains/get-domain
17
23
  def get(domain_id = "")
18
24
  path = "domains/#{domain_id}"
@@ -8,7 +8,7 @@ module Resend
8
8
  # This class is responsible for making the appropriate HTTP calls
9
9
  # and raising the specific errors based on the response.
10
10
  class Request
11
- BASE_URL = "https://api.resend.com/"
11
+ BASE_URL = ENV["RESEND_BASE_URL"] || "https://api.resend.com/"
12
12
 
13
13
  attr_accessor :body, :verb
14
14
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Resend
4
- VERSION = "0.9.0"
4
+ VERSION = "0.11.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derich Pacheco
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-10 00:00:00.000000000 Z
11
+ date: 2024-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.19.1
19
+ version: 0.21.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.19.1
26
+ version: 0.21.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement