mailersend-ruby 0.1.3 → 0.1.8

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: 6c4a626cf3c8fabd037995c39aede5705fa036e8099ec06656540962528e771a
4
- data.tar.gz: e34d9b66417d2cc1931359877347d11741de1b88f4c131648506406ed84faf0a
3
+ metadata.gz: 8fc9fe9dc6a60525078b8ac7f741895ba2a5ae1778862a796225744f83e1bfd4
4
+ data.tar.gz: 53a2ce3884dc737a9bb350e9fe0a98ca53868386da007399fdd4f6ec02f93846
5
5
  SHA512:
6
- metadata.gz: 81c9ec9c29dfd8e365c8e7ae612493adb1706dc7f50e0c1a9ade581830344a37c563bc3df1ab939eebebb53e5aac22692f43dbb95dced22ac258efe80e4d9729
7
- data.tar.gz: b6491f25066d26c34283e259b9f257206f6ac0b5036e0c9b60330ff6a5a7c5561cb9957b59147941a945d5ee73f804be5777314e46edc3b931b1c41c1a0b5741
6
+ metadata.gz: 580c6fc5712ae5904bc169b2d83f0756b9e84fa3a83179672c86580d4e47e89aba0bb80149869711608860cfc1ee6c9acf85abc191ffb20dc8c7f6ff3e2141d5
7
+ data.tar.gz: 36148bc92197efe044aa091297069b08c79747548778a3ae7032a11f16551fc6e3e23cf57b94e9cdabfa96daddb9d2c0ca8b2635fa807e7cfcc49a2e6f2dffc3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
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
+
19
+ ## [0.1.4] - 2021-06-15
20
+
21
+ - Fixed Domains init
22
+
23
+ ## [0.1.3] - 2021-06-14
24
+
25
+ - Updated gem description
26
+
3
27
  ## [0.1.2] - 2021-06-14
4
28
 
5
29
  - Fixed activity and tokens endpoints.
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
@@ -9,7 +9,7 @@ module Mailersend
9
9
  :limit,
10
10
  :verified
11
11
 
12
- def initialize(client = Mailersend.client.new)
12
+ def initialize(client = Mailersend::Client.new)
13
13
  @client = client
14
14
  @domain_id = domain_id
15
15
  @page = page
@@ -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.3"
4
+ VERSION = "0.1.8"
5
5
  end
@@ -28,6 +28,7 @@ Gem::Specification.new do |spec|
28
28
 
29
29
  spec.add_development_dependency "bundler", "~> 2.2.15"
30
30
  spec.add_development_dependency "rake", "~> 13.0"
31
+ spec.add_development_dependency "rspec"
31
32
  spec.add_development_dependency "rubocop", "~> 1.7"
32
33
  spec.add_dependency "dotenv-rails", "~> 2.7"
33
34
  spec.add_dependency "http", "~> 5.0"
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.3
4
+ version: 0.1.8
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-14 00:00:00.000000000 Z
11
+ date: 2021-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '13.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rubocop
43
57
  requirement: !ruby/object:Gem::Requirement