postman_mta 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea6b5ded9ae46bb47985d8515dc5505c9f404390
4
- data.tar.gz: 2e2c5fb5d4cdd325a76c1ea9fec9e6845541041e
3
+ metadata.gz: fab550588eda2e9d22a008b8acbd4004922fa042
4
+ data.tar.gz: 2b28cbeb65d3e81abaef24122bf1228b3b77e0ea
5
5
  SHA512:
6
- metadata.gz: 5f1e354098d5e04fcdaf472a07793e4d5ed27c06dfa4bce821eab08fd53bb47f741ffbb4c846fc01475a68569af185aa03a3392bfa97618a265a6e1158d873bd
7
- data.tar.gz: 874f5d95b00aa57941046bb7ad626ee87fbf4822eb3abc86d23c4ef76da19d2c832daec05d0ecfadd16a9c98619f1a4177426d727972faa35c3b39fc239474aa
6
+ metadata.gz: 5bb1c93d360b9dfbf0fdc2169ff5411747fd03e3e74e57eac9d08e3f60a56292ed86573ca9f4369259d8c2098cbaadff7336b503b5ef245828ec4b47137a1e66
7
+ data.tar.gz: 8b02e0f717d57da96b8ba2917aba388740a4d8186674ca541956f644c535e62a4046e0ed7a4f4d89051bca501972fe3531c6d1d53ea05655a1248181f7a7cef6
@@ -1,6 +1,6 @@
1
1
  module PostmanMta
2
2
  class ApplicationModel
3
- delegate :get, :post, :put, :patch, :delete, to: :connection
3
+ delegate :get, :post, :put, :patch, :delete, :response_body, :response_status, to: :connection
4
4
 
5
5
  protected
6
6
 
@@ -0,0 +1,7 @@
1
+ module PostmanMta
2
+ class Credential < ApplicationModel
3
+ def create(params = {})
4
+ post('/api/v1/credentials', body: params)
5
+ end
6
+ end
7
+ end
@@ -7,5 +7,9 @@ module PostmanMta
7
7
  def create(params = {})
8
8
  post('/api/v1/domains', body: params)
9
9
  end
10
+
11
+ def dns_setup(uuid)
12
+ put("/api/v1/domains/#{uuid}/dns_setup")
13
+ end
10
14
  end
11
15
  end
@@ -1,5 +1,7 @@
1
1
  module PostmanMta
2
2
  class ApiClient
3
+ attr_reader :response_body, :response_status
4
+
3
5
  [:get, :post, :put, :patch, :delete].each do |type|
4
6
  define_method type do |url, options = {}|
5
7
  perform_request(type.to_s.upcase, url, options)
@@ -12,7 +14,10 @@ module PostmanMta
12
14
  api_request = ::PostmanMta::ApiRequest.new(request_type, path, options)
13
15
  response = api_request.perform
14
16
 
15
- { json: response.parsed_response, status: response.code }
17
+ @response_body = response.parsed_response
18
+ @response_status = response.code
19
+
20
+ { json: response_body, status: response_status }
16
21
  end
17
22
  end
18
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostmanMta
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postman_mta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Malinovskiy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-02 00:00:00.000000000 Z
11
+ date: 2017-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -129,6 +129,7 @@ files:
129
129
  - app/models/postman_mta/application_model.rb
130
130
  - app/models/postman_mta/attachment.rb
131
131
  - app/models/postman_mta/conversation.rb
132
+ - app/models/postman_mta/credential.rb
132
133
  - app/models/postman_mta/domain.rb
133
134
  - app/models/postman_mta/label.rb
134
135
  - app/models/postman_mta/message.rb