sendly 3.19.1 → 3.21.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sendly/enterprise.rb +26 -2
- data/lib/sendly/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d1b90e6c2dd0c3db4caae6e8d8690757ca258b96f418a4fe379c8722e6bc8720
|
|
4
|
+
data.tar.gz: d41919bda9c4d404eb89d2872501a07f72886fc61c08b7cfd2a2f67e674e00e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 236e1fa1ecb684ec33f810e3891c01db11a94b974437e0748f403958da48bf21b6bcad94d5bdf54cb378a412ba128af288f2e14c62fbcc72f3e9695e8e253e2a
|
|
7
|
+
data.tar.gz: 06e34ec05e09bdb7dfa69c4820bdf0b89c4dde3c2ded24da81463655a94e8210256348fbc11be016cc2420e7cb9652ce2e0256caade6be9c4e21fd0f438ebf45
|
data/Gemfile.lock
CHANGED
data/lib/sendly/enterprise.rb
CHANGED
|
@@ -253,7 +253,7 @@ module Sendly
|
|
|
253
253
|
def set(url:)
|
|
254
254
|
raise ArgumentError, "Webhook URL is required" if url.nil? || url.empty?
|
|
255
255
|
|
|
256
|
-
@client.
|
|
256
|
+
@client.post("/enterprise/webhooks", { url: url })
|
|
257
257
|
end
|
|
258
258
|
|
|
259
259
|
def get
|
|
@@ -267,6 +267,10 @@ module Sendly
|
|
|
267
267
|
def test
|
|
268
268
|
@client.post("/enterprise/webhooks/test")
|
|
269
269
|
end
|
|
270
|
+
|
|
271
|
+
def rotate_secret
|
|
272
|
+
@client.post("/enterprise/webhooks/rotate-secret")
|
|
273
|
+
end
|
|
270
274
|
end
|
|
271
275
|
|
|
272
276
|
class EnterpriseAnalyticsSubResource
|
|
@@ -334,8 +338,27 @@ module Sendly
|
|
|
334
338
|
end
|
|
335
339
|
end
|
|
336
340
|
|
|
341
|
+
class EnterpriseCreditsSubResource
|
|
342
|
+
def initialize(client)
|
|
343
|
+
@client = client
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
def get
|
|
347
|
+
@client.get("/enterprise/credits")
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
def deposit(amount:, description: nil)
|
|
351
|
+
raise ArgumentError, "Amount must be a positive number" if !amount.is_a?(Integer) || amount <= 0
|
|
352
|
+
|
|
353
|
+
body = { amount: amount }
|
|
354
|
+
body[:description] = description if description
|
|
355
|
+
|
|
356
|
+
@client.post("/enterprise/credits/deposit", body)
|
|
357
|
+
end
|
|
358
|
+
end
|
|
359
|
+
|
|
337
360
|
class EnterpriseResource
|
|
338
|
-
attr_reader :workspaces, :webhooks, :analytics, :settings, :billing
|
|
361
|
+
attr_reader :workspaces, :webhooks, :analytics, :settings, :billing, :credits
|
|
339
362
|
|
|
340
363
|
def initialize(client)
|
|
341
364
|
@client = client
|
|
@@ -344,6 +367,7 @@ module Sendly
|
|
|
344
367
|
@analytics = EnterpriseAnalyticsSubResource.new(client)
|
|
345
368
|
@settings = EnterpriseSettingsSubResource.new(client)
|
|
346
369
|
@billing = EnterpriseBillingSubResource.new(client)
|
|
370
|
+
@credits = EnterpriseCreditsSubResource.new(client)
|
|
347
371
|
end
|
|
348
372
|
|
|
349
373
|
def get_account
|
data/lib/sendly/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sendly
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.21.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sendly
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|