mailersend-ruby 2.0.3 → 3.0.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.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/main.yml +6 -6
  3. data/.github/workflows/publish_gem.yml +4 -4
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +1 -1
  6. data/CHANGELOG.md +4 -0
  7. data/Gemfile +7 -3
  8. data/README.md +10 -1
  9. data/fixtures/activity/activity_get_activity.yml +61 -0
  10. data/fixtures/api_quota/api_quota_get.yml +51 -0
  11. data/fixtures/bulk_email/bulk_email_send.yml +54 -0
  12. data/fixtures/bulk_email/bulk_email_status.yml +53 -0
  13. data/fixtures/domains/domains_add.yml +55 -0
  14. data/fixtures/domains/domains_delete.yml +47 -0
  15. data/fixtures/domains/domains_dns.yml +52 -0
  16. data/fixtures/domains/domains_list.yml +63 -0
  17. data/fixtures/domains/domains_recipients.yml +51 -0
  18. data/fixtures/domains/domains_settings.yml +55 -0
  19. data/fixtures/domains/domains_single.yml +53 -0
  20. data/fixtures/domains/domains_verify.yml +51 -0
  21. data/fixtures/email/email_send.yml +56 -0
  22. data/fixtures/inbound_routing/inbound_routing_delete.yml +47 -0
  23. data/fixtures/inbound_routing/inbound_routing_list.yml +53 -0
  24. data/fixtures/inbound_routing/inbound_routing_single.yml +51 -0
  25. data/fixtures/messages/messages_list_messages.yml +51 -0
  26. data/fixtures/messages/messages_single_message.yml +54 -0
  27. data/fixtures/recipients/recipients_delete.yml +47 -0
  28. data/fixtures/recipients/recipients_list.yml +51 -0
  29. data/fixtures/recipients/recipients_single.yml +51 -0
  30. data/fixtures/scheduled_messages/scheduled_messages_delete.yml +34 -0
  31. data/fixtures/scheduled_messages/scheduled_messages_get_list.yml +53 -0
  32. data/fixtures/scheduled_messages/scheduled_messages_get_single.yml +34 -0
  33. data/fixtures/sms_activity/sms_activity_list.yml +51 -0
  34. data/fixtures/sms_inbounds/sms_inbounds_add_sms_inbound_route.yml +53 -0
  35. data/fixtures/sms_inbounds/sms_inbounds_delete_sms_inbound_route.yml +47 -0
  36. data/fixtures/sms_inbounds/sms_inbounds_get_sms_inbound_route.yml +51 -0
  37. data/fixtures/sms_inbounds/sms_inbounds_list_sms_inbounds.yml +53 -0
  38. data/fixtures/sms_inbounds/sms_inbounds_update_sms_inbound_route.yml +53 -0
  39. data/fixtures/sms_messages/sms_messages_list_sms_messages.yml +56 -0
  40. data/fixtures/sms_number/sms_number_delete.yml +26 -0
  41. data/fixtures/sms_number/sms_number_get.yml +51 -0
  42. data/fixtures/sms_number/sms_number_list.yml +53 -0
  43. data/fixtures/sms_number/sms_number_update.yml +53 -0
  44. data/fixtures/sms_recipient/sms_recipient_get.yml +51 -0
  45. data/fixtures/sms_recipient/sms_recipient_list.yml +51 -0
  46. data/fixtures/sms_recipient/sms_recipient_update.yml +53 -0
  47. data/fixtures/sms_webhooks/sms_webhooks_add_sms_webhook_route.yml +53 -0
  48. data/fixtures/sms_webhooks/sms_webhooks_delete_sms_webhook_route.yml +47 -0
  49. data/fixtures/sms_webhooks/sms_webhooks_get_sms_webhook_route.yml +51 -0
  50. data/fixtures/sms_webhooks/sms_webhooks_list_sms_webhooks.yml +53 -0
  51. data/fixtures/sms_webhooks/sms_webhooks_update_sms_webhook_route.yml +53 -0
  52. data/fixtures/suppressions/suppressions_add_to_blocklist.yml +53 -0
  53. data/fixtures/suppressions/suppressions_add_to_hard_bounces.yml +53 -0
  54. data/fixtures/suppressions/suppressions_add_to_spam_complaints.yml +53 -0
  55. data/fixtures/suppressions/suppressions_add_to_unsubscribers.yml +53 -0
  56. data/fixtures/suppressions/suppressions_delete_from_blocklist.yml +53 -0
  57. data/fixtures/suppressions/suppressions_delete_from_hard_bounces.yml +53 -0
  58. data/fixtures/suppressions/suppressions_delete_from_spam_complaints.yml +53 -0
  59. data/fixtures/suppressions/suppressions_delete_from_unsubscribers.yml +53 -0
  60. data/fixtures/suppressions/suppressions_get_from_blocklist.yml +51 -0
  61. data/fixtures/suppressions/suppressions_get_hard_bounces.yml +51 -0
  62. data/fixtures/suppressions/suppressions_get_spam_complaints.yml +51 -0
  63. data/fixtures/suppressions/suppressions_get_unsubscribes.yml +51 -0
  64. data/fixtures/templates/templates_delete.yml +51 -0
  65. data/fixtures/templates/templates_list.yml +51 -0
  66. data/fixtures/templates/templates_single.yml +51 -0
  67. data/fixtures/tokens/tokens_create.yml +54 -0
  68. data/fixtures/tokens/tokens_delete.yml +51 -0
  69. data/fixtures/tokens/tokens_update.yml +54 -0
  70. data/fixtures/webhooks/webhooks_create.yml +56 -0
  71. data/fixtures/webhooks/webhooks_delete.yml +47 -0
  72. data/fixtures/webhooks/webhooks_list.yml +55 -0
  73. data/fixtures/webhooks/webhooks_single.yml +53 -0
  74. data/lib/mailersend/scheduled_messages/scheduled_messages.rb +1 -1
  75. data/lib/mailersend/version.rb +1 -1
  76. data/mailersend-ruby.gemspec +4 -4
  77. data/spec/activity_rspec.rb +26 -0
  78. data/spec/api_quota_rspec.rb +29 -0
  79. data/spec/bulk_email_rspec.rb +44 -0
  80. data/spec/domains_rspec.rb +94 -0
  81. data/spec/email_rspec.rb +29 -0
  82. data/spec/inbound_routing_rspec.rb +44 -0
  83. data/spec/messages_rspec.rb +36 -0
  84. data/spec/recipients_rspec.rb +44 -0
  85. data/spec/scheduled_messages_rspec.rb +44 -0
  86. data/spec/sms_activity_rspec.rb +26 -0
  87. data/spec/sms_inbounds_rspec.rb +77 -0
  88. data/spec/sms_messages_rspec.rb +26 -0
  89. data/spec/sms_number_rspec.rb +54 -0
  90. data/spec/sms_recipient_rspec.rb +46 -0
  91. data/spec/sms_webhooks_rspec.rb +74 -0
  92. data/spec/spec_helper.rb +102 -0
  93. data/spec/suppressions_rspec.rb +124 -0
  94. data/spec/templates_rspec.rb +44 -0
  95. data/spec/tokens_rspec.rb +44 -0
  96. data/spec/webhooks_rspec.rb +60 -0
  97. metadata +96 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3cae329f1c5df61d2f6eb7df72d3e90c5bd590b609ef2636a2ea925e150434ee
4
- data.tar.gz: a3b494e7242753dbe19ccdf92642b8122c390166a01b22c12ffbb74bf96c1347
3
+ metadata.gz: 2b79fd2dc6326bb15c06bcd988858e91239d8c35684ad79160290c08cb06b07b
4
+ data.tar.gz: '08da96f4ce97ecd4b674f6961a297367111f5c4d0805725b055b6450b6c5873b'
5
5
  SHA512:
6
- metadata.gz: 20dfc3baabccb681fb84d80470861c549d94fe997886cb31b96125814c120b135b37bc498b7aea4711e512d209e1d25e71311a97a3f81b8ad44cd4bb3d9c6920
7
- data.tar.gz: 2c0d1c55ac65dd91738f31eb8929c27fd419705e20afcd0ef0c4087b7f6e8a02bd417aef58416f1ef290fef75ba6eda0c6b129d980ee08f691bbaaa321fce480
6
+ metadata.gz: e92fddde28243b568adb088f304737edef07068a2983db5869f17bdfa60463698d721c0f828b8a8fb5ba255a886ed865fd357d284db3a864f347ddc72f503030
7
+ data.tar.gz: 8499c4de45e9e4979434bc340df82936b347f3328736b0bbfecc67d6eeab728de53e8f8194a0581abe633fea5f25be6850e641bae9282eeb3cd419d5ee9f5554
@@ -9,15 +9,15 @@ jobs:
9
9
  - uses: actions/checkout@v4
10
10
 
11
11
  - name: Set up Ruby
12
- uses: actions/setup-ruby@v1
12
+ uses: ruby/setup-ruby@v1
13
13
  with:
14
- ruby-version: 3.0
14
+ ruby-version: 3.1
15
15
 
16
16
  - name: Install Bundler
17
- run: gem install bundler -v 2.4.22
17
+ run: gem install bundler -v 2.5.23
18
18
 
19
19
  - name: Install dependencies
20
- run: bundle _2.4.22_ install
20
+ run: bundle _2.5.23_ install
21
21
 
22
- - name: Run the default task
23
- run: bundle exec rake
22
+ - name: Run tests
23
+ run: export MAILERSEND_API_TOKEN=dummy_token && bundle exec rspec spec/*_rspec.rb
@@ -12,15 +12,15 @@ jobs:
12
12
  - uses: actions/checkout@v4
13
13
 
14
14
  - name: Set up Ruby
15
- uses: actions/setup-ruby@v1
15
+ uses: ruby/setup-ruby@v1
16
16
  with:
17
- ruby-version: 3.0
17
+ ruby-version: 3.1
18
18
 
19
19
  - name: Install Bundler
20
- run: gem install bundler -v 2.4.22
20
+ run: gem install bundler -v 2.5.23
21
21
 
22
22
  - name: Install dependencies
23
- run: bundle _2.4.22_ install
23
+ run: bundle _2.5.23_ install
24
24
 
25
25
  - name: Release Gem
26
26
  if: contains(github.ref, 'refs/tags/v')
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.5
2
+ TargetRubyVersion: 3.1
3
3
  SuggestExtensions: false
4
4
  NewCops: enable
5
5
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Released]
2
2
 
3
+ ## [3.0.0] - 2024-12-20
4
+ - *BREAKING CHANGE* - Updated the minimal required Ruby version from 2.5 to 3.1
5
+ - Adding tests
6
+
3
7
  ## [2.0.3] - 2024-06-24
4
8
 
5
9
  - Advanced personalization is now personalization
data/Gemfile CHANGED
@@ -4,7 +4,11 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :development do
7
- gem 'bundler', '~> 2.4.22'
8
- gem 'rake', '~> 13.0'
9
- gem 'rubocop', '~> 1.7'
7
+ gem 'bundler', '~> 2.5'
8
+ gem 'rake', '~> 13.2'
9
+ gem 'rspec'
10
+ gem 'rubocop', '~> 1.69'
11
+ gem 'simplecov'
12
+ gem 'vcr'
13
+ gem 'webmock'
10
14
  end
data/README.md CHANGED
@@ -679,7 +679,7 @@ require "mailersend-ruby"
679
679
  ms_client = Mailersend::Client.new('your_mailersend_token')
680
680
 
681
681
  ms_scheduled_messages = Mailersend::ScheduledMessages.new(ms_client)
682
- ms_scheduled_messages.get_signle(message_id: 'mess11454')
682
+ ms_scheduled_messages.get_single(message_id: 'mess11454')
683
683
  ```
684
684
 
685
685
  ### Delete a scheduled message
@@ -1316,6 +1316,15 @@ ms_api_quota = Mailersend::APIQuota.new(ms_client)
1316
1316
  # Add parameters
1317
1317
  ms_api_quota.get_api_quota
1318
1318
  ```
1319
+ # Testing
1320
+
1321
+ ```bash
1322
+ bundle i
1323
+ bundle exec rspec spec/*_rspec.rb
1324
+ ```
1325
+
1326
+ To run tests you would need to install gems using bundle and then run rspec via bundle to run all tests.
1327
+ The fixtures for the test have been recorded using vcr and are available in the ./fixtures directory.
1319
1328
 
1320
1329
  # Support and Feedback
1321
1330
 
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.mailersend.com/v1/activity/jpzkmgq7e5vl059v?date_from=1734115200&date_to=1734633600&limit=10&page=1
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerSend-client-ruby/3.0.0
14
+ Accept:
15
+ - application/json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.mailersend.com
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Fri, 20 Dec 2024 00:41:01 GMT
27
+ Content-Type:
28
+ - application/json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - close
33
+ Cache-Control:
34
+ - no-cache, private
35
+ X-Apiquota-Remaining:
36
+ - "-1"
37
+ X-Apiquota-Reset:
38
+ - '2024-12-21T00:00:00Z'
39
+ Strict-Transport-Security:
40
+ - max-age=31536000; includeSubDomains
41
+ Cf-Cache-Status:
42
+ - DYNAMIC
43
+ Server:
44
+ - cloudflare
45
+ Cf-Ray:
46
+ - 8f4b95952ed96c85-ZAG
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"data":[{"id":"676184f57c14148b126fb1a4","created_at":"2024-12-17T14:04:37.000000Z","updated_at":"2024-12-17T14:04:37.000000Z","type":"opened","email":{"id":"67618461e93d11b5cf7cb145","from":"sender@test-sdk.com","subject":"Test
50
+ Email","text":"This is a test email.","html":"<p>This is a test email.<\/p>","template_id":"","status":"delivered","tags":null,"created_at":"2024-12-17T14:02:09.000000Z","updated_at":"2024-12-17T14:04:39.000000Z","headers":null,"recipient":{"id":"6655e19fc7f63cea62ee560e","email":"test@mailerlite.com","created_at":"2024-05-28T13:52:31.000000Z","updated_at":"2024-05-28T13:52:31.000000Z","deleted_at":""}}},{"id":"676184f373db909f7ed68017","created_at":"2024-12-17T14:04:21.000000Z","updated_at":"2024-12-17T14:04:21.000000Z","type":"delivered","email":{"id":"676184e45958d4b8b0874611","from":"sender@test-sdk.com","subject":"Test
51
+ Email","text":"This is a test email.","html":"<p>This is a test email.<\/p>","template_id":"","status":"delivered","tags":null,"created_at":"2024-12-17T14:04:20.000000Z","updated_at":"2024-12-17T14:04:35.000000Z","headers":null,"recipient":{"id":"6655e19fc7f63cea62ee560e","email":"test@mailerlite.com","created_at":"2024-05-28T13:52:31.000000Z","updated_at":"2024-05-28T13:52:31.000000Z","deleted_at":""}}},{"id":"676184e41bc317ef8c474c1d","created_at":"2024-12-17T14:04:20.000000Z","updated_at":"2024-12-17T14:04:20.000000Z","type":"queued","email":{"id":"676184e45958d4b8b0874611","from":"sender@test-sdk.com","subject":"Test
52
+ Email","text":"This is a test email.","html":"<p>This is a test email.<\/p>","template_id":"","status":"delivered","tags":null,"created_at":"2024-12-17T14:04:20.000000Z","updated_at":"2024-12-17T14:04:35.000000Z","headers":null,"recipient":{"id":"6655e19fc7f63cea62ee560e","email":"test@mailerlite.com","created_at":"2024-05-28T13:52:31.000000Z","updated_at":"2024-05-28T13:52:31.000000Z","deleted_at":""}}},{"id":"676184e4026a72403d9dd102","created_at":"2024-12-17T14:04:20.000000Z","updated_at":"2024-12-17T14:04:20.000000Z","type":"sent","email":{"id":"676184e45958d4b8b0874611","from":"sender@test-sdk.com","subject":"Test
53
+ Email","text":"This is a test email.","html":"<p>This is a test email.<\/p>","template_id":"","status":"delivered","tags":null,"created_at":"2024-12-17T14:04:20.000000Z","updated_at":"2024-12-17T14:04:35.000000Z","headers":null,"recipient":{"id":"6655e19fc7f63cea62ee560e","email":"test@mailerlite.com","created_at":"2024-05-28T13:52:31.000000Z","updated_at":"2024-05-28T13:52:31.000000Z","deleted_at":""}}},{"id":"676184a9582046c3f3b447e9","created_at":"2024-12-17T14:03:15.000000Z","updated_at":"2024-12-17T14:03:15.000000Z","type":"delivered","email":{"id":"676184a19845543426e8c5f6","from":"sender@test-sdk.com","subject":"Test
54
+ Email","text":"This is a test email.","html":"<p>This is a test email.<\/p>","template_id":"","status":"delivered","tags":null,"created_at":"2024-12-17T14:03:13.000000Z","updated_at":"2024-12-17T14:03:21.000000Z","headers":null,"recipient":{"id":"6655e19fc7f63cea62ee560e","email":"test@mailerlite.com","created_at":"2024-05-28T13:52:31.000000Z","updated_at":"2024-05-28T13:52:31.000000Z","deleted_at":""}}},{"id":"676184a15b42b19771531b14","created_at":"2024-12-17T14:03:13.000000Z","updated_at":"2024-12-17T14:03:13.000000Z","type":"queued","email":{"id":"676184a19845543426e8c5f6","from":"sender@test-sdk.com","subject":"Test
55
+ Email","text":"This is a test email.","html":"<p>This is a test email.<\/p>","template_id":"","status":"delivered","tags":null,"created_at":"2024-12-17T14:03:13.000000Z","updated_at":"2024-12-17T14:03:21.000000Z","headers":null,"recipient":{"id":"6655e19fc7f63cea62ee560e","email":"test@mailerlite.com","created_at":"2024-05-28T13:52:31.000000Z","updated_at":"2024-05-28T13:52:31.000000Z","deleted_at":""}}},{"id":"676184a1f5a4c03213756a37","created_at":"2024-12-17T14:03:13.000000Z","updated_at":"2024-12-17T14:03:13.000000Z","type":"sent","email":{"id":"676184a19845543426e8c5f6","from":"sender@test-sdk.com","subject":"Test
56
+ Email","text":"This is a test email.","html":"<p>This is a test email.<\/p>","template_id":"","status":"delivered","tags":null,"created_at":"2024-12-17T14:03:13.000000Z","updated_at":"2024-12-17T14:03:21.000000Z","headers":null,"recipient":{"id":"6655e19fc7f63cea62ee560e","email":"test@mailerlite.com","created_at":"2024-05-28T13:52:31.000000Z","updated_at":"2024-05-28T13:52:31.000000Z","deleted_at":""}}},{"id":"67618471493abcc5d2cac3dd","created_at":"2024-12-17T14:02:15.000000Z","updated_at":"2024-12-17T14:02:15.000000Z","type":"delivered","email":{"id":"67618461e93d11b5cf7cb145","from":"sender@test-sdk.com","subject":"Test
57
+ Email","text":"This is a test email.","html":"<p>This is a test email.<\/p>","template_id":"","status":"delivered","tags":null,"created_at":"2024-12-17T14:02:09.000000Z","updated_at":"2024-12-17T14:04:39.000000Z","headers":null,"recipient":{"id":"6655e19fc7f63cea62ee560e","email":"test@mailerlite.com","created_at":"2024-05-28T13:52:31.000000Z","updated_at":"2024-05-28T13:52:31.000000Z","deleted_at":""}}},{"id":"67618461f05f2e941f424eb0","created_at":"2024-12-17T14:02:09.000000Z","updated_at":"2024-12-17T14:02:09.000000Z","type":"queued","email":{"id":"67618461e93d11b5cf7cb145","from":"sender@test-sdk.com","subject":"Test
58
+ Email","text":"This is a test email.","html":"<p>This is a test email.<\/p>","template_id":"","status":"delivered","tags":null,"created_at":"2024-12-17T14:02:09.000000Z","updated_at":"2024-12-17T14:04:39.000000Z","headers":null,"recipient":{"id":"6655e19fc7f63cea62ee560e","email":"test@mailerlite.com","created_at":"2024-05-28T13:52:31.000000Z","updated_at":"2024-05-28T13:52:31.000000Z","deleted_at":""}}},{"id":"676184615e8b002ef2153dc0","created_at":"2024-12-17T14:02:09.000000Z","updated_at":"2024-12-17T14:02:09.000000Z","type":"sent","email":{"id":"67618461e93d11b5cf7cb145","from":"sender@test-sdk.com","subject":"Test
59
+ Email","text":"This is a test email.","html":"<p>This is a test email.<\/p>","template_id":"","status":"delivered","tags":null,"created_at":"2024-12-17T14:02:09.000000Z","updated_at":"2024-12-17T14:04:39.000000Z","headers":null,"recipient":{"id":"6655e19fc7f63cea62ee560e","email":"test@mailerlite.com","created_at":"2024-05-28T13:52:31.000000Z","updated_at":"2024-05-28T13:52:31.000000Z","deleted_at":""}}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/jpzkmgq7e5vl059v?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/activity\/jpzkmgq7e5vl059v?page=2"},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/activity\/jpzkmgq7e5vl059v","per_page":10,"to":10}}'
60
+ recorded_at: Fri, 20 Dec 2024 00:41:01 GMT
61
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.mailersend.com/v1/api-quota
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerSend-client-ruby/2.0.3
14
+ Accept:
15
+ - application/json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.mailersend.com
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Tue, 17 Dec 2024 02:21:16 GMT
27
+ Content-Type:
28
+ - application/json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - close
33
+ Cache-Control:
34
+ - no-cache, private
35
+ X-Apiquota-Remaining:
36
+ - "-1"
37
+ X-Apiquota-Reset:
38
+ - '2024-12-18T00:00:00Z'
39
+ Strict-Transport-Security:
40
+ - max-age=31536000; includeSubDomains
41
+ Cf-Cache-Status:
42
+ - DYNAMIC
43
+ Server:
44
+ - cloudflare
45
+ Cf-Ray:
46
+ - 8f33704e3e93ec26-ZAG
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"quota":-1,"remaining":-1,"reset":"2024-12-18T00:00:00Z"}'
50
+ recorded_at: Tue, 17 Dec 2024 02:21:15 GMT
51
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.mailersend.com/v1/bulk-email
6
+ body:
7
+ encoding: UTF-8
8
+ string: '[{"from":"sender@test-sdk.com","to":["test@mailerlite.com"],"subject":"Test
9
+ Bulk Email","text":"This is a test bulk email."}]'
10
+ headers:
11
+ Authorization:
12
+ - "<AUTH>"
13
+ User-Agent:
14
+ - MailerSend-client-ruby/2.0.3
15
+ Accept:
16
+ - application/json
17
+ Connection:
18
+ - close
19
+ Content-Type:
20
+ - application/json; charset=utf-8
21
+ Host:
22
+ - api.mailersend.com
23
+ response:
24
+ status:
25
+ code: 202
26
+ message: Accepted
27
+ headers:
28
+ Date:
29
+ - Tue, 17 Dec 2024 13:48:48 GMT
30
+ Content-Type:
31
+ - application/json
32
+ Transfer-Encoding:
33
+ - chunked
34
+ Connection:
35
+ - close
36
+ Cache-Control:
37
+ - no-cache, private
38
+ X-Apiquota-Remaining:
39
+ - "-1"
40
+ X-Apiquota-Reset:
41
+ - '2024-12-18T00:00:00Z'
42
+ Strict-Transport-Security:
43
+ - max-age=31536000; includeSubDomains
44
+ Cf-Cache-Status:
45
+ - DYNAMIC
46
+ Server:
47
+ - cloudflare
48
+ Cf-Ray:
49
+ - 8f375f73dbfb5b5b-VIE
50
+ body:
51
+ encoding: UTF-8
52
+ string: '{"message":"The bulk email is being processed.","bulk_email_id":"67618140bf85c862710f2c5a"}'
53
+ recorded_at: Tue, 17 Dec 2024 13:48:48 GMT
54
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.mailersend.com/v1/bulk-email/67618140bf85c862710f2c5a
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerSend-client-ruby/2.0.3
14
+ Accept:
15
+ - application/json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.mailersend.com
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Tue, 17 Dec 2024 13:50:02 GMT
27
+ Content-Type:
28
+ - application/json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - close
33
+ Cache-Control:
34
+ - no-cache, private
35
+ X-Apiquota-Remaining:
36
+ - "-1"
37
+ X-Apiquota-Reset:
38
+ - '2024-12-18T00:00:00Z'
39
+ Strict-Transport-Security:
40
+ - max-age=31536000; includeSubDomains
41
+ Cf-Cache-Status:
42
+ - DYNAMIC
43
+ Server:
44
+ - cloudflare
45
+ Cf-Ray:
46
+ - 8f37613bfc9f5b8a-VIE
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"data":{"id":"67618140bf85c862710f2c5a","state":"completed","total_recipients_count":1,"suppressed_recipients_count":0,"suppressed_recipients":null,"validation_errors_count":1,"validation_errors":{"message.0":{"from.email":["The
50
+ from.email field is required. #MS42209"],"to.0.email":["The to.0.email field
51
+ is required. #MS42209"]}},"messages_id":null,"created_at":"2024-12-17T13:48:48.000000Z","updated_at":"2024-12-17T13:48:49.000000Z"}}'
52
+ recorded_at: Tue, 17 Dec 2024 13:50:02 GMT
53
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,55 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.mailersend.com/v1/domains
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"ourdomain.com"}'
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerSend-client-ruby/2.0.3
14
+ Accept:
15
+ - application/json
16
+ Connection:
17
+ - close
18
+ Content-Type:
19
+ - application/json; charset=utf-8
20
+ Host:
21
+ - api.mailersend.com
22
+ response:
23
+ status:
24
+ code: 201
25
+ message: Created
26
+ headers:
27
+ Date:
28
+ - Tue, 17 Dec 2024 01:53:24 GMT
29
+ Content-Type:
30
+ - application/json
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - close
35
+ Cache-Control:
36
+ - no-cache, private
37
+ X-Apiquota-Remaining:
38
+ - "-1"
39
+ X-Apiquota-Reset:
40
+ - '2024-12-18T00:00:00Z'
41
+ Strict-Transport-Security:
42
+ - max-age=31536000; includeSubDomains
43
+ Cf-Cache-Status:
44
+ - DYNAMIC
45
+ Server:
46
+ - cloudflare
47
+ Cf-Ray:
48
+ - 8f33477cbd15ec22-ZAG
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"data":{"id":"zkq340ezdqkgd796","name":"ourdomain.com","dkim":null,"spf":null,"mx":null,"tracking":null,"is_verified":false,"is_dns_active":false,"is_trial_domain":false,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_unsubscribe":false,"track_unsubscribe_html":"<p>Click
52
+ here to <a href=\"{$unsubscribe}\">unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click
53
+ here to unsubscribe: {$unsubscribe}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"can":{"manage":true},"totals":[],"is_dkim_txt":null,"show_dkim_info":true,"is_being_verified":false}}'
54
+ recorded_at: Tue, 17 Dec 2024 01:53:24 GMT
55
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.mailersend.com/v1/domains/zkq340ezdqkgd796
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerSend-client-ruby/2.0.3
14
+ Accept:
15
+ - application/json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.mailersend.com
20
+ response:
21
+ status:
22
+ code: 204
23
+ message: No Content
24
+ headers:
25
+ Date:
26
+ - Tue, 17 Dec 2024 01:57:16 GMT
27
+ Connection:
28
+ - close
29
+ Cache-Control:
30
+ - no-cache, private
31
+ X-Apiquota-Remaining:
32
+ - "-1"
33
+ X-Apiquota-Reset:
34
+ - '2024-12-18T00:00:00Z'
35
+ Strict-Transport-Security:
36
+ - max-age=31536000; includeSubDomains
37
+ Cf-Cache-Status:
38
+ - DYNAMIC
39
+ Server:
40
+ - cloudflare
41
+ Cf-Ray:
42
+ - 8f334d2439c3ec26-ZAG
43
+ body:
44
+ encoding: ASCII-8BIT
45
+ string: ''
46
+ recorded_at: Tue, 17 Dec 2024 01:57:16 GMT
47
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.mailersend.com/v1/domains/jpzkmgq7e5vl059v/dns-records
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerSend-client-ruby/2.0.3
14
+ Accept:
15
+ - application/json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.mailersend.com
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Tue, 17 Dec 2024 02:04:57 GMT
27
+ Content-Type:
28
+ - application/json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - close
33
+ Cache-Control:
34
+ - no-cache, private
35
+ X-Apiquota-Remaining:
36
+ - "-1"
37
+ X-Apiquota-Reset:
38
+ - '2024-12-18T00:00:00Z'
39
+ Strict-Transport-Security:
40
+ - max-age=31536000; includeSubDomains
41
+ Cf-Cache-Status:
42
+ - DYNAMIC
43
+ Server:
44
+ - cloudflare
45
+ Cf-Ray:
46
+ - 8f335866d941ec28-ZAG
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"data":{"id":"jpzkmgq7e5vl059v","spf":{"hostname":"test-sdk.com","type":"TXT","value":"v=spf1
50
+ include:_spf.mailersend.net ~all"},"dkim":{"hostname":"mlsend2._domainkey.test-sdk.com","type":"CNAME","value":"mlsend2._domainkey.mailersend.net"},"return_path":{"hostname":"mta.test-sdk.com","type":"CNAME","value":"mailersend.net"},"custom_tracking":{"hostname":"email.test-sdk.com","type":"CNAME","value":"links.mailersend.net"},"inbound_routing":{"hostname":"test-sdk.com","type":"MX","value":"inbound.mailersend.net","priority":"10"}}}'
51
+ recorded_at: Tue, 17 Dec 2024 02:04:56 GMT
52
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,63 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.mailersend.com/v1/domains
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerSend-client-ruby/2.0.3
14
+ Accept:
15
+ - application/json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.mailersend.com
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Tue, 17 Dec 2024 01:56:16 GMT
27
+ Content-Type:
28
+ - application/json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - close
33
+ Cache-Control:
34
+ - no-cache, private
35
+ X-Apiquota-Remaining:
36
+ - "-1"
37
+ X-Apiquota-Reset:
38
+ - '2024-12-18T00:00:00Z'
39
+ Strict-Transport-Security:
40
+ - max-age=31536000; includeSubDomains
41
+ Cf-Cache-Status:
42
+ - DYNAMIC
43
+ Server:
44
+ - cloudflare
45
+ Cf-Ray:
46
+ - 8f334bae2957ec24-ZAG
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"data":[{"id":"zkq340ezdqkgd796","name":"ourdomain.com","dkim":false,"spf":false,"tracking":false,"is_verified":false,"is_cname_verified":false,"is_dns_active":false,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":0,"queued":0,"sent":0,"rejected":0,"delivered":0},"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_unsubscribe":false,"track_unsubscribe_html":"<p>Click
50
+ here to <a href=\"{$unsubscribe}\">unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click
51
+ here to unsubscribe: {$unsubscribe}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2024-12-17T01:53:24.000000Z","updated_at":"2024-12-17T01:53:26.000000Z"},{"id":"z3m5jgrdk7z4dpyo","name":"somethingelse.com","dkim":false,"spf":false,"tracking":false,"is_verified":false,"is_cname_verified":false,"is_dns_active":false,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":0,"queued":0,"sent":0,"rejected":0,"delivered":0},"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_unsubscribe":false,"track_unsubscribe_html":"<p>Click
52
+ here to <a href=\"{$unsubscribe}\">unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click
53
+ here to unsubscribe: {$unsubscribe}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2023-07-04T06:57:06.000000Z","updated_at":"2023-07-04T06:57:08.000000Z","totals":{"sent":0,"delivered":0,"hard_bounced":0,"soft_bounced":0}},{"id":"0p7kx4x6v1249yjr","name":"somedomain.com","dkim":false,"spf":false,"tracking":false,"is_verified":false,"is_cname_verified":false,"is_dns_active":false,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":0,"queued":0,"sent":0,"rejected":0,"delivered":0},"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_unsubscribe":false,"track_unsubscribe_html":"<p>Click
54
+ here to <a href=\"{$unsubscribe}\">unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click
55
+ here to unsubscribe: {$unsubscribe}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2023-07-04T06:51:35.000000Z","updated_at":"2023-07-04T06:51:37.000000Z","totals":{"sent":0,"delivered":0,"hard_bounced":0,"soft_bounced":0}},{"id":"3yxj6lj1r05ldo2r","name":"thedomain.com","dkim":false,"spf":false,"tracking":false,"is_verified":false,"is_cname_verified":false,"is_dns_active":false,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":0,"queued":0,"sent":0,"rejected":0,"delivered":0},"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":true,"track_opens":true,"track_unsubscribe":true,"track_unsubscribe_html":"<p>Stisni
56
+ ovde <a href=''{$unsubscribe}''>unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Stisni
57
+ ovde to unsubscribe: {$unsubscribe}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"email","return_path_subdomain":"rpsubdomain","inbound_routing_enabled":false,"inbound_routing_subdomain":"irsubdomain","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2023-05-24T14:19:12.000000Z","updated_at":"2023-08-14T14:15:20.000000Z","totals":{"sent":0,"delivered":0,"hard_bounced":0,"soft_bounced":0}},{"id":"jpzkmgq7e5vl059v","name":"test-sdk.com","dkim":false,"spf":false,"tracking":false,"is_verified":true,"is_cname_verified":false,"is_dns_active":false,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":120,"queued":0,"sent":0,"rejected":5,"delivered":115},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_unsubscribe":false,"track_unsubscribe_html":"<p>Click
58
+ here to <a href=\"{{unsubscribe}}\">unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click
59
+ here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2022-04-20T11:36:15.000000Z","updated_at":"2024-09-02T10:02:27.000000Z","totals":{"sent":0,"delivered":115,"hard_bounced":0,"soft_bounced":5}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"&laquo;
60
+ Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","active":true},{"url":null,"label":"Next
61
+ &raquo;","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":25,"to":5,"total":5}}'
62
+ recorded_at: Tue, 17 Dec 2024 01:56:16 GMT
63
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.mailersend.com/v1/domains/3yxj6lj1r05ldo2r/recipients
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - "<AUTH>"
12
+ User-Agent:
13
+ - MailerSend-client-ruby/2.0.3
14
+ Accept:
15
+ - application/json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.mailersend.com
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Tue, 17 Dec 2024 01:59:16 GMT
27
+ Content-Type:
28
+ - application/json
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - close
33
+ Cache-Control:
34
+ - no-cache, private
35
+ X-Apiquota-Remaining:
36
+ - "-1"
37
+ X-Apiquota-Reset:
38
+ - '2024-12-18T00:00:00Z'
39
+ Strict-Transport-Security:
40
+ - max-age=31536000; includeSubDomains
41
+ Cf-Cache-Status:
42
+ - DYNAMIC
43
+ Server:
44
+ - cloudflare
45
+ Cf-Ray:
46
+ - 8f335018ca97ec1a-ZAG
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/3yxj6lj1r05ldo2r\/recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/3yxj6lj1r05ldo2r\/recipients","per_page":25,"to":null}}'
50
+ recorded_at: Tue, 17 Dec 2024 01:59:16 GMT
51
+ recorded_with: VCR 6.3.1