mailersend-ruby 1.4.0 → 1.5.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: 143a0364d9fc6022b8a7b7a246fa01ca47f6b19546334e1d54576bd3da3a774e
4
- data.tar.gz: ddf12b66f4809ff3e015129fd2e4e0f667a9777c485243f9bac5571d0c6e421b
3
+ metadata.gz: 119a856edc8f4a572776df083628ac9e91b03ad7d84c010d000f659dea7c5d02
4
+ data.tar.gz: e8c4db7ef5ee7753acdeef7fb2e6696c215b614dc0c84c4c78b1e8dbeeb4b069
5
5
  SHA512:
6
- metadata.gz: 96dd151f391c1f27c51420dd4429d2175b3feca2c8fa785761c8404c86ceb4297c89f7f183d54ece3a8d73e79f1ea7b1223f809df4a92cd3949d38244960b4e2
7
- data.tar.gz: d295d63460b934052cba1b99cd1ccbc82011499cde501f8a51ba110834c9d42606c6cbd9e1cd57c6e6a5b79e02dae338d901ecb6e92408378ef7e3efc03bd0c1
6
+ metadata.gz: ce60ac31b7af6e94b5b1ea51b9d7f4e0fa16b56bc870576b4ed49df45f93f032e6bcf68870d591ee84518dc248918086c5723e9bcf23b9b039d69276ebf6cbd5
7
+ data.tar.gz: da94cb3b0fa6c9e92037401bb0d0adf6e70a84d9a066266bdcdef0bc038d9c01eb8db42280fac757853bb9e50d55942cc23c159dab358d6c5df1acb5db29f906
@@ -8,7 +8,7 @@ jobs:
8
8
  steps:
9
9
  - uses: actions/checkout@v3
10
10
  - name: Set up Ruby
11
- uses: ruby/setup-ruby@v1.133.2
11
+ uses: ruby/setup-ruby@v1.148.0
12
12
  with:
13
13
  ruby-version: 3.0
14
14
  bundler-cache: true
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Released]
2
2
 
3
+ ## [1.5.0] - 2023-05-08
4
+
5
+ - API Quota
6
+ - Single eMail Verification
7
+
3
8
  ## [1.4.0] - 2023-01-17
4
9
 
5
10
  - Sender Identities
data/README.md CHANGED
@@ -74,6 +74,7 @@ MailerSend Ruby SDK
74
74
  - [Get a single template](#get-a-single-template)
75
75
  - [Delete template](#delete-template)
76
76
  - [Email Verification](#email-verification)
77
+ - [Verify an email](#verify-an-email)
77
78
  - [Get all email verification lists](#get-all-email-verification-lists)
78
79
  - [Get an email verification list](#get-an-email-verification-list)
79
80
  - [Create an email verification list](#create-an-email-verification-list)
@@ -106,6 +107,8 @@ MailerSend Ruby SDK
106
107
  - [Create an SMS webhook](#create-an-sms-webhook)
107
108
  - [Update an SMS webhook](#update-an-sms-webhook)
108
109
  - [Delete an SMS webhook](#delete-an-sms-webhook)
110
+ - [Other endpoints](#other-endpoints)
111
+ - [Get API quota](#get-api-quota)
109
112
  - [Support and Feedback](#support-and-feedback)
110
113
  - [License](#license)
111
114
 
@@ -770,6 +773,15 @@ ms_templates.delete(template_id: "id124")
770
773
 
771
774
  ## Email Verification
772
775
 
776
+ ### Verify an email
777
+
778
+ ```ruby
779
+ require "mailersend-ruby"
780
+
781
+ ms_email_verification = Mailersend::EmailVerification.new
782
+ ms_email_verification.verify_an_email(email: 'example@email.com')
783
+ ```
784
+
773
785
  ### Get all email verification lists
774
786
 
775
787
  ```ruby
@@ -1120,6 +1132,20 @@ ms_sms_webhooks = Mailersend::SMSWebhooks.new
1120
1132
  ms_sms_webhooks.delete_sms_webhook_route(sms_webhook_id: 'your-sms-webhook-id')
1121
1133
  ```
1122
1134
 
1135
+ ## Other endpoints
1136
+
1137
+ ### Get API quota
1138
+
1139
+ ```ruby
1140
+ require "mailersend-ruby"
1141
+
1142
+ # Intialize the API Quota class
1143
+ ms_api_quota = Mailersend::APIQuota.new
1144
+
1145
+ # Add parameters
1146
+ ms_api_quota.get_api_quota
1147
+ ```
1148
+
1123
1149
  # Support and Feedback
1124
1150
 
1125
1151
  In case you find any bugs, submit an issue directly here in GitHub.
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mailersend
4
+ # API Quota endpoint from MailerSend API
5
+ class APIQuota
6
+ attr_accessor :client
7
+
8
+ def initialize(client = Mailersend::Client.new)
9
+ @client = client
10
+ end
11
+
12
+ def get_api_quota(*)
13
+ client.http.get("#{API_URL}/api-quota")
14
+ end
15
+ end
16
+ end
@@ -15,6 +15,13 @@ module Mailersend
15
15
  @email_verification_id = email_verification_id
16
16
  end
17
17
 
18
+ def verify_an_email(email: nil)
19
+ hash = {
20
+ 'email' => email
21
+ }
22
+ client.http.post("#{API_URL}/email-verification/verify", json: hash.compact)
23
+ end
24
+
18
25
  def list(page: nil, limit: nil)
19
26
  hash = {
20
27
  'page' => page,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mailersend
4
- VERSION = '1.4.0'
4
+ VERSION = '1.5.0'
5
5
  end
data/lib/mailersend.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require_relative 'mailersend/client'
4
4
  require_relative 'mailersend/version'
5
5
  require_relative 'mailersend/activity/activity'
6
+ require_relative 'mailersend/api_quota/api_quota'
6
7
  require_relative 'mailersend/analytics/analytics'
7
8
  require_relative 'mailersend/bulk_email/bulk_email'
8
9
  require_relative 'mailersend/domains/domains'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailersend-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikola Milojević
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-17 00:00:00.000000000 Z
11
+ date: 2023-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -135,6 +135,7 @@ files:
135
135
  - lib/mailersend.rb
136
136
  - lib/mailersend/activity/activity.rb
137
137
  - lib/mailersend/analytics/analytics.rb
138
+ - lib/mailersend/api_quota/api_quota.rb
138
139
  - lib/mailersend/bulk_email/bulk_email.rb
139
140
  - lib/mailersend/client.rb
140
141
  - lib/mailersend/domains/domains.rb
@@ -183,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
184
  - !ruby/object:Gem::Version
184
185
  version: '0'
185
186
  requirements: []
186
- rubygems_version: 3.4.1
187
+ rubygems_version: 3.4.10
187
188
  signing_key:
188
189
  specification_version: 4
189
190
  summary: MailerSend's official Ruby SDK