billimatic-client 0.21.0 → 0.22.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
  SHA1:
3
- metadata.gz: 654daa7b2bdeef5a541b7ce3406435ff33437f99
4
- data.tar.gz: c0d2646762a1cbd0ac78cc7b55efd321e32c3379
3
+ metadata.gz: 09405a4ee4e875f15bb68693cdde3312a7e52ce0
4
+ data.tar.gz: 0096c77935fb3cc77b4e6bedd2bbccf965749cf7
5
5
  SHA512:
6
- metadata.gz: 3ac4773bec894dadc5c07048a363f33875a2f4bd0a40f3d20264a465a0b5e44f574a651bd3e89d05b9f6362c6c64549fbb72ab97b596eafece06ef847c7d58e9
7
- data.tar.gz: 72af10addd825ef563e8c6e963532ad48c51f0d33957105b28b0110179f9083711e9dbc592dae80d392629ac404cb5f9e8a9a72f9540baabdf68fb8cf050de73
6
+ metadata.gz: 5063188098eb65cf922203da057f4fc830f005e864914be77afb8ab68bca91bc74ae47121f9cd59b89775de9feb2ce5ce06657b3ca61d5c797296814c59b38c9
7
+ data.tar.gz: b6a30bd09d41f5d557ce9c157ae3d4711991b8a1490eb37bf4fec1f54469a0796d3d03b37ff670ab88eed8612a1eb93c98ea2a67aa81b4d3cb006ef4b64f8b66
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## v0.22.0
6
+ - Adds EmailTemplate entity.
7
+ - Adds EmailTemplate#list endpoint.
8
+
5
9
  ## v0.21.0
6
10
  - Adds ServiceItem#list endpoint.
7
11
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- billimatic-client (0.21.0)
4
+ billimatic-client (0.22.0)
5
5
  multi_json (~> 1.11)
6
6
  typhoeus (~> 0.8)
7
7
  virtus (~> 1.0.5)
data/README.md CHANGED
@@ -57,6 +57,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
57
57
  * [Companies API](https://myfreecomm.github.io/billimatic-api-docs/#empresas) as `client.companies`
58
58
  * [People API](https://myfreecomm.github.io/billimatic-api-docs/#pessoas) as `client.people`
59
59
  * [Service Items API](https://myfreecomm.github.io/billimatic-api-docs/#servicos) as `client.service_items`
60
+ * [Email Templates API](https://myfreecomm.github.io/billimatic-api-docs/#notificacoes) as `client.email_templates`
60
61
 
61
62
  ## Endpoints
62
63
 
@@ -725,6 +726,27 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
725
726
  </tr>
726
727
  </table>
727
728
 
729
+ #### [Email Templates](https://myfreecomm.github.io/billimatic-api-docs/#notificacoes)
730
+
731
+ <table>
732
+ <tr>
733
+ <th>HTTP method</th>
734
+ <th>Endpoint</th>
735
+ <th>Client method</th>
736
+ </tr>
737
+ <tr>
738
+ <td><code>GET</code></td>
739
+ <td>
740
+ <a href="https://myfreecomm.github.io/billimatic-api-docs/#lista-notificacoes" target="_blank">
741
+ /api/v1/organizations/:organization_id/email_templates/:id
742
+ </a>
743
+ </td>
744
+ <td>
745
+ <code>client.email_templates.list(organization_id: id)</code>
746
+ </td>
747
+ </tr>
748
+ </table>
749
+
728
750
  ## Url helpers
729
751
 
730
752
  Some url helpers are available:
data/lib/billimatic.rb CHANGED
@@ -29,6 +29,7 @@ require 'billimatic/entities/invoice_rule'
29
29
  require 'billimatic/entities/invoice_template'
30
30
  require 'billimatic/entities/subscription'
31
31
  require 'billimatic/entities/webhook'
32
+ require 'billimatic/entities/email_template'
32
33
 
33
34
  require 'billimatic/resources/base'
34
35
  require 'billimatic/resources/company'
@@ -42,6 +43,7 @@ require 'billimatic/resources/plan'
42
43
  require 'billimatic/resources/service_item'
43
44
  require 'billimatic/resources/subscription'
44
45
  require 'billimatic/resources/webhook'
46
+ require 'billimatic/resources/email_template'
45
47
 
46
48
  module Billimatic
47
49
  def self.configuration
@@ -58,5 +58,9 @@ module Billimatic
58
58
  def webhooks
59
59
  Resources::Webhook.new(http)
60
60
  end
61
+
62
+ def email_templates
63
+ Resources::EmailTemplate.new(http)
64
+ end
61
65
  end
62
66
  end
@@ -0,0 +1,22 @@
1
+ module Billimatic
2
+ module Entities
3
+ class EmailTemplate < Base
4
+ attribute :id, Integer
5
+ attribute :company_id, Integer
6
+ attribute :name, String
7
+ attribute :cc, String
8
+ attribute :from, String
9
+ attribute :body, String
10
+ attribute :subject, String
11
+ attribute :description, String
12
+ attribute :include_billet, Integer
13
+ attribute :include_nfse_pdf, Integer
14
+ attribute :include_nfse_xml, Integer
15
+ attribute :include_attachments, Integer
16
+ attribute :include_invoice_pdf, Integer
17
+ attribute :default_template, Integer
18
+ attribute :subscription_default_template, Integer
19
+ attribute :created_at, DateTime
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,9 @@
1
+ module Billimatic
2
+ module Resources
3
+ class EmailTemplate < Base
4
+ def list(organization_id:)
5
+ list_by_organization(organization_id)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Billimatic
2
- VERSION = '0.21.0'
2
+ VERSION = '0.22.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billimatic-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Tassinari de Oliveira
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2019-03-15 00:00:00.000000000 Z
15
+ date: 2019-04-10 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: typhoeus
@@ -231,6 +231,7 @@ files:
231
231
  - lib/billimatic/entities/company.rb
232
232
  - lib/billimatic/entities/contract.rb
233
233
  - lib/billimatic/entities/customer.rb
234
+ - lib/billimatic/entities/email_template.rb
234
235
  - lib/billimatic/entities/entity_service_item.rb
235
236
  - lib/billimatic/entities/invoice.rb
236
237
  - lib/billimatic/entities/invoice_rule.rb
@@ -252,6 +253,7 @@ files:
252
253
  - lib/billimatic/resources/base.rb
253
254
  - lib/billimatic/resources/company.rb
254
255
  - lib/billimatic/resources/contract.rb
256
+ - lib/billimatic/resources/email_template.rb
255
257
  - lib/billimatic/resources/hooks.rb
256
258
  - lib/billimatic/resources/invoice.rb
257
259
  - lib/billimatic/resources/invoice_rule.rb