bzapper 0.12.0 → 0.13.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 998078a5f587bcde4ab77546e85feccdb12009697a8f97ade20469caae5979cd
4
- data.tar.gz: 780a11f95211ffefb8724d8eb53d87735e2bb2e973c159c347a1a91a5101d32b
3
+ metadata.gz: 13d0b6718949379d3a764faaf77d13171e968757442090fa66f87ad93ecf5363
4
+ data.tar.gz: c66b3dc08012d3d925303f62dbb79c934a46a5a16f8fc33de9d7514c2c7332f5
5
5
  SHA512:
6
- metadata.gz: 2f5020a7b89637785eb7e1e1271c0894371091fd75b8565fa7bbcee2f551e8cb3dcee86ded113c6f111221b1213efb446468262b487972f7d76f7e6101f679ac
7
- data.tar.gz: 301bc5a4cab89bcad5353cf1c254f9e1f54f639ec6c32abf126ee76624aab53f9f336185fb31b449f2a7981d00fde912984f994c8e20cf8be4c92e4a3734cfb6
6
+ metadata.gz: '09dff9e7a1caa6906746089c3b33e228280cb8662e74042e6c73e2ff6cb7fe4077321f03fd2100fba844696ea13b3d3828ffdfef2ebf0f20888e6f0fb6a8c4a1'
7
+ data.tar.gz: c20b0d40090ea71d6da210790c7d0eeb654f5ab700f1022a98efef66f1b280c790b6b05778b695c0427ca6b60400b90590b6e0924edda6e879fea29a17e6b4e8
data/README.md CHANGED
@@ -10,13 +10,13 @@ Zero dependências de runtime (só biblioteca padrão: `net/http`, `json`, `open
10
10
  ## Instalação
11
11
 
12
12
  ```bash
13
- gem install bzapper -v 0.12.0
13
+ gem install bzapper -v 0.13.0
14
14
  ```
15
15
 
16
16
  Ou no `Gemfile` — **fixe a versão exata** (cada release declara se muda a superfície pública):
17
17
 
18
18
  ```ruby
19
- gem "bzapper", "0.12.0"
19
+ gem "bzapper", "0.13.0"
20
20
  ```
21
21
 
22
22
  ## Hello world
@@ -68,6 +68,28 @@ module Bzapper
68
68
  request("GET", "/campaigns/estimate", query: query, timeout: timeout)
69
69
  end
70
70
 
71
+ # What Meta will charge for a template campaign (official rail). `GET /campaigns/meta-cost`
72
+ #
73
+ # From the template category (the one Meta bills, which follows reclassification) and Meta's
74
+ # Brazil rate card: the cost of `recipients` messages — charged by Meta on the customer's card;
75
+ # bZapper charges only the subscription — and how many days the number's daily new-contact limit
76
+ # requires.
77
+ #
78
+ # @param recipients [Integer] (query)
79
+ # @param template [String] (query)
80
+ # @param language [String, nil] (query)
81
+ # @param timeout [Numeric, nil] segundos por tentativa (padrão: o do cliente).
82
+ # @return [Hash, Array, nil] o JSON da resposta, inteiro (nil em 204).
83
+ # @raise [Bzapper::Error] resposta fora de 2xx ou falha de rede.
84
+ def estimate_campaign_meta_cost(recipients:, template:, language: nil, timeout: nil)
85
+ query = {
86
+ "recipients" => recipients,
87
+ "template" => template,
88
+ "language" => language
89
+ }
90
+ request("GET", "/campaigns/meta-cost", query: query, timeout: timeout)
91
+ end
92
+
71
93
  # Per-number campaign eligibility (connection and age). `GET /campaigns/eligibility`
72
94
  #
73
95
  # Same engine the dispatcher uses: which numbers can send campaigns now, the account's campaign
@@ -3,5 +3,5 @@
3
3
  module Bzapper
4
4
  # Versão da gem. O `scripts/release-sdks.sh` do monorepo bumpa a linha abaixo por regex
5
5
  # (ancorada no início da linha) e o `bzapper.gemspec` lê daqui — não mude o formato dela.
6
- VERSION = "0.12.0"
6
+ VERSION = "0.13.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bzapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Berni Software