mailersend-ruby 0.1.4 → 0.1.9

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: ad81535cca4fa1b1049ae471786eb7cb0d749d0e6efd36a0687aba69c8bd38ac
4
- data.tar.gz: 14346f6667c6706b1b68c7c7c7b57a9a74d2e1068ef2bbe7bc32084220325492
3
+ metadata.gz: 0f11b89a182816197699f2c30fc072c86e6243dabfb7ea7089314f1b9c48fa5c
4
+ data.tar.gz: 6f70d52ec51ea4f7415bddf0401039ead13cbe7d951b5be6efb635059755c02d
5
5
  SHA512:
6
- metadata.gz: 7e2e57034edb64718b474e1b47a4d6f702097241c0a027df75978dfd81fd65f2a08048fc58c743b620e00b035a8df559e7ac5a6d9c1852c0d6839f7666197773
7
- data.tar.gz: 353c0c48594e3ac0380deda0c387f3af76680da4c7ee32d894b04f232c44a9ee2fe90da396860a5add2a3a61355180b6b4b2ccc7fd8e0cfe578524f558f95ab1
6
+ metadata.gz: 2f7997c489fd9d5fd1521cc0f087b7a2942daa9a082f38926238addae6a600d802637ba760a9e1ac292330940becddd97c15c2eb595dfc4a9fe1929f1554de81
7
+ data.tar.gz: ec6ad6558b98f87b89f6770bba4cd240c8023d888cb1c9b82117da9d6ce5f587e9fa7d1493a8ab078b89ea78de30cebda55fdb14d2316679401d60c992f4446b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  ## [Released]
2
2
 
3
+ ## [0.1.8] - 2021-06-15
4
+
5
+ - Fixed unused parameter
6
+
7
+ ## [0.1.7] - 2021-06-15
8
+
9
+ - Added required parameter for token creation
10
+ -
11
+ ## [0.1.6] - 2021-06-15
12
+
13
+ - Fixed small issues in Domains
14
+
15
+ ## [0.1.5] - 2021-06-15
16
+
17
+ - Fixed arguments error in Domains list
18
+
3
19
  ## [0.1.4] - 2021-06-15
4
20
 
5
21
  - Fixed Domains init
data/README.md CHANGED
@@ -129,7 +129,7 @@ ms_email.send
129
129
  require "mailersend-ruby"
130
130
 
131
131
  ms_tokens = Mailersend::Tokens.new
132
- ms_tokens.create(name: "Very nice token", scopes: %w[ email_full domains_read ])
132
+ ms_tokens.create(name: "Very nice token", scopes: %w[ email_full domains_read ], domain_id: "yourdomainid")
133
133
  ```
134
134
 
135
135
  ### Update a token
@@ -296,7 +296,7 @@ ms_domains.list
296
296
  require "mailersend-ruby"
297
297
 
298
298
  ms_domains = Mailersend::Domains.new
299
- ms_domains.list(domain_id: "idofdomain12412")
299
+ ms_domains.single(domain_id: "idofdomain12412")
300
300
  ```
301
301
 
302
302
  ### Delete a domain
@@ -381,7 +381,7 @@ ms_webhooks.list(domain_id: "xxx2241ll")
381
381
  require "mailersend-ruby"
382
382
 
383
383
  ms_webhooks = Mailersend::Webhooks.new
384
- ms_webhooks.list(webhook_id: "zzz2241ll")
384
+ ms_webhooks.single(webhook_id: "zzz2241ll")
385
385
  ```
386
386
 
387
387
  ### Create a webhook
@@ -17,7 +17,18 @@ module Mailersend
17
17
  @verified = verified
18
18
  end
19
19
 
20
- def list
20
+ def list(page: nil, limit: nil, verified: nil)
21
+ hash = {
22
+ "page" => page,
23
+ "limit" => limit,
24
+ "verified" => verified
25
+ }
26
+ response = client.http.get(URI::HTTPS.build(host: API_BASE_HOST, path: "/v1/domains",
27
+ query: URI.encode_www_form(hash.compact)))
28
+ puts response
29
+ end
30
+
31
+ def single(domain_id:, page: nil, limit: nil, verified: nil)
21
32
  hash = {
22
33
  "page" => page,
23
34
  "limit" => limit,
@@ -17,10 +17,11 @@ module Mailersend
17
17
  @status = {}
18
18
  end
19
19
 
20
- def create(name:, scopes:)
20
+ def create(name:, scopes:, domain_id:)
21
21
  json = {
22
22
  "name" => name,
23
- "scopes" => scopes
23
+ "scopes" => scopes,
24
+ "domain_id" => domain_id
24
25
  }
25
26
  response = client.http.post("#{API_URL}/token", json: json)
26
27
  puts response
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mailersend
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.9"
5
5
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency "bundler", "~> 2.2.15"
30
30
  spec.add_development_dependency "rake", "~> 13.0"
31
31
  spec.add_development_dependency "rubocop", "~> 1.7"
32
- spec.add_dependency "dotenv-rails", "~> 2.7"
32
+ spec.add_dependency "dotenv", "~> 2.7"
33
33
  spec.add_dependency "http", "~> 5.0"
34
34
  spec.add_dependency "json", "~> 2.5"
35
35
  spec.add_dependency "uri", "~> 0.10.1"
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: 0.1.4
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikola Milojević
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-15 00:00:00.000000000 Z
11
+ date: 2021-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.7'
55
55
  - !ruby/object:Gem::Dependency
56
- name: dotenv-rails
56
+ name: dotenv
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"