resend 0.11.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d9f1a280f431982fb96f2aa2f9cba2396573269bdd460ffa6fb1df557010192
4
- data.tar.gz: 9e12315d3ef20e78a372f167f154e62e896fe8daf83b8f7e911a1da2bd1aef12
3
+ metadata.gz: 88fd301936753cf4555887e51fb36c8831944a2b52408ba770d783049a50ef75
4
+ data.tar.gz: 6f686bcc1820cf21dc96c12bb19cee79ad25773231951bdfa133316f855e2581
5
5
  SHA512:
6
- metadata.gz: 32b0832968fbd41b4e83303e44fde5b25f8cd4a9d95a941eb21bd6cbb529b4d2c7d6e3d0f6cfec473cc49424104c492b59e32e699ee4f549d0ef086d3c1beb57
7
- data.tar.gz: 2994a9386f5dc946822b6b59e20832234a31a2ad3d36e3b345c89042648bad47fa4afdc57b2e830bed0b81c9ca92d385860e920d6339747c58b41994cc4f72c9
6
+ metadata.gz: 432c540a94ce5cacef32745881d63e0981b8e37d3a811cf0e1924faddc5f7a3e2e3563c8c31350b93be45d2028bc69c93915b029f5a4415cc06421e30094a894
7
+ data.tar.gz: 5e76491e91bf941a5c4846a55faf953d3f80a48293fd939e9f210349d04c0b67069460bfa6eca39b87ecd6d6ea452ff27fb14b2b836a95e84e2230da9ca898cc
data/lib/resend/emails.rb CHANGED
@@ -6,17 +6,33 @@ module Resend
6
6
  # Module responsible for wrapping email sending API
7
7
  module Emails
8
8
  class << self
9
- # send email functionality
10
- # https://resend.com/docs/api-reference/send-email
9
+ # Sends or schedules an email.
10
+ # see more: https://resend.com/docs/api-reference/send-email
11
11
  def send(params)
12
12
  path = "emails"
13
13
  Resend::Request.new(path, params, "post").perform
14
14
  end
15
15
 
16
+ # Retrieve a single email.
17
+ # see more: https://resend.com/docs/api-reference/emails/retrieve-email
16
18
  def get(email_id = "")
17
19
  path = "emails/#{email_id}"
18
20
  Resend::Request.new(path, {}, "get").perform
19
21
  end
22
+
23
+ # Update a scheduled email.
24
+ # see more: https://resend.com/docs/api-reference/emails/update-email
25
+ def update(params)
26
+ path = "emails/#{params[:email_id]}"
27
+ Resend::Request.new(path, params, "patch").perform
28
+ end
29
+
30
+ # Cancel a scheduled email.
31
+ # see more: https://resend.com/docs/api-reference/emails/cancel-email
32
+ def cancel(email_id = "")
33
+ path = "emails/#{email_id}/cancel"
34
+ Resend::Request.new(path, {}, "post").perform
35
+ end
20
36
  end
21
37
 
22
38
  # This method is kept here for backwards compatibility
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Resend
4
- VERSION = "0.11.0"
4
+ VERSION = "0.13.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.11.0
4
+ version: 0.13.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-03-06 00:00:00.000000000 Z
11
+ date: 2024-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty