mailblastr 2.0.0 → 3.0.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: da4eac6f929de305deb6c395655cb2658cc1ac3ee7410355846092ff6b61f66a
4
- data.tar.gz: 05bfee5848400946fef957671b8bf891916bda6b7847988c531f2d5995ecb58a
3
+ metadata.gz: e9210b14443861405563bc567facbbdbbc1f2a085ed6758d67ba9d1e070ef65a
4
+ data.tar.gz: faa999d54c513582c1e708b9b388e12a02d5df3b4ff1cc9102a6a22788e15541
5
5
  SHA512:
6
- metadata.gz: 1d3cd0f0741e9e55d2b6f24f34f33add0b192d305f5834fb4d481dbd70a0aacbdd8d05d516ba8797aa3201360d491a2a22bd6929a7ffdbd7b9ae57ae45ed4bbb
7
- data.tar.gz: 907b8ec4abe3920ba6e94c04587cfcb72f4692420f461504f391dd6c44bc75cda2e562df73fe05911c1b40fa1e79ea8b581c948c0f64dc1f4fabd86bec489c8b
6
+ metadata.gz: bb7228f34d402024c01ac0352d83a8a67b8f68f40720157fd635775fb19d5d3ae83d5f926bff9de4e4a7994fe8a9c48bbdeaa64c899ec2beae0a227a5c6ebc7b
7
+ data.tar.gz: b84a3d5deb93b3c34fa0bb1fa3e6a69137bdfc4bf21e47e3fa3864481e00a7fd6782d5e1baab60b6f4d2629fce749508aec0d025632450a44fa27969f1b70c57
data/README.md CHANGED
@@ -129,11 +129,11 @@ Mailblastr::Emails.send({
129
129
 
130
130
  ```ruby
131
131
  Mailblastr::Emails::Receiving.list
132
- Mailblastr::Emails::Receiving.addresses # per-address inbound stats
132
+ Mailblastr::Emails::Receiving.list_addresses # per-address inbound stats
133
133
  Mailblastr::Emails::Receiving.get(id)
134
134
  Mailblastr::Emails::Receiving.list_attachments(id)
135
135
  Mailblastr::Emails::Receiving.get_attachment(id, attachment_id) # => raw bytes (String)
136
- Mailblastr::Emails::Receiving.raw(id) # => original RFC822 message
136
+ Mailblastr::Emails::Receiving.get_raw(id) # => original RFC822 message
137
137
  Mailblastr::Emails::Receiving.forward(id, { from: "you@yourdomain.com", to: "team@you.com" })
138
138
  Mailblastr::Emails::Receiving.reply(id, { from: "you@yourdomain.com", html: "<p>Thanks!</p>" })
139
139
  Mailblastr::Emails::Receiving.delete(id)
@@ -182,7 +182,7 @@ Mailblastr::Contacts.batch({ audience_id: aud_id, contacts: [{ email: "a@b.com"
182
182
  Mailblastr::Contacts.import({ audience_id: aud_id, csv: "email,company\na@b.com,Acme" })
183
183
 
184
184
  # CSV too big to inline (5 MB / 10,000 rows)? Upload it directly, then import by key.
185
- slot = Mailblastr::Contacts.import_upload({ audience_id: aud_id, filename: "list.csv", size: bytes })
185
+ slot = Mailblastr::Contacts.create_import_upload({ audience_id: aud_id, filename: "list.csv", size: bytes })
186
186
  # PUT the file to slot["upload_url"], then:
187
187
  Mailblastr::Contacts.import({ audience_id: aud_id, storage_key: slot["storage_key"] })
188
188
 
@@ -330,10 +330,10 @@ warn "test delivery failed: #{result['error']}" unless result["ok"]
330
330
 
331
331
  ### Verifying deliveries
332
332
 
333
- `verify_signature` checks the Svix-style HMAC-SHA256 signature locally (no HTTP request). Pass the **exact raw request body** — re-serializing parsed JSON breaks the signature.
333
+ `verify` checks the Svix-style HMAC-SHA256 signature locally (no HTTP request). Pass the **exact raw request body** — re-serializing parsed JSON breaks the signature.
334
334
 
335
335
  ```ruby
336
- result = Mailblastr::Webhooks.verify_signature(
336
+ result = Mailblastr::Webhooks.verify(
337
337
  request.raw_post, # raw body string
338
338
  {
339
339
  "svix-id" => request.headers["svix-id"],
@@ -104,7 +104,7 @@ module Mailblastr
104
104
  #
105
105
  # Inline CSV text (capped at 5 MB and 10,000 rows):
106
106
  # Contacts.import({ audience_id: "aud_1", csv: "email\na@b.com" })
107
- # Or a file already uploaded via import_upload (no row cap — the
107
+ # Or a file already uploaded via create_import_upload (no row cap — the
108
108
  # overflow past your contact limit comes back as `limit_skipped`):
109
109
  # Contacts.import({ audience_id: "aud_1", storage_key: key })
110
110
  def import(params)
@@ -125,7 +125,7 @@ module Mailblastr
125
125
  # `storage_key` to Contacts.import.
126
126
  # POST /audiences/:id/contacts/import/upload — params: { filename:, size: }
127
127
  # The `upload_url` is a bearer credential — do not log it.
128
- def import_upload(params)
128
+ def create_import_upload(params)
129
129
  audience_id = Client.opt(params, :audience_id)
130
130
  Client.request(
131
131
  :post,
@@ -79,7 +79,7 @@ module Mailblastr
79
79
 
80
80
  # Per-address inbound stats (totals, replies, last received).
81
81
  # Not paginated. GET /emails/receiving/addresses
82
- def addresses
82
+ def list_addresses
83
83
  Client.request(:get, "/emails/receiving/addresses")
84
84
  end
85
85
 
@@ -111,7 +111,7 @@ module Mailblastr
111
111
 
112
112
  # Download the original RFC822/MIME message as raw bytes (binary String).
113
113
  # GET /emails/receiving/:id/raw
114
- def raw(email_id)
114
+ def get_raw(email_id)
115
115
  Client.request(:get, "/emails/receiving/#{Client.path_escape(email_id)}/raw", raw: true)
116
116
  end
117
117
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mailblastr
4
- VERSION = "2.0.0"
4
+ VERSION = "3.0.0"
5
5
  end
@@ -70,9 +70,9 @@ module Mailblastr
70
70
  #
71
71
  # Returns { valid: true } or { valid: false, reason: "..." }.
72
72
  #
73
- # result = Mailblastr::Webhooks.verify_signature(request.raw_post, request.headers.to_h, secret)
73
+ # result = Mailblastr::Webhooks.verify(request.raw_post, request.headers.to_h, secret)
74
74
  # head :unauthorized unless result[:valid]
75
- def verify_signature(payload, headers, secret, tolerance: 300)
75
+ def verify(payload, headers, secret, tolerance: 300)
76
76
  id = read_header(headers, "svix-id")
77
77
  timestamp = read_header(headers, "svix-timestamp")
78
78
  sig_header = read_header(headers, "svix-signature")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailblastr
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MailBlastr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-08 00:00:00.000000000 Z
11
+ date: 2026-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest