sendly 3.19.1 → 3.20.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 +21 -1
- 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: 240430322af11563071426063863ad91715374c9387ea9f3e24cf660ccf01646
|
|
4
|
+
data.tar.gz: d912d0aa4e7aa20e9a522bcb22fec5fa1ef45f4cd65798ad80b6cbf618219782
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8670b0a85a40d67ce290aecd6b2262ba6930066b5882a7b8d2f7c9ec9b9ef439771b69450583664b8854e8c5cee4812f28b5142011322c421ce21013ad5bad40
|
|
7
|
+
data.tar.gz: 670708f812eba4d952470ba2af889b50bb0f4b5b319c68cb97118ba2be4546f2d840651a0457fa63b9cda3e29c6c7f2b6215462f58241cb37c4f4c98465fba08
|
data/Gemfile.lock
CHANGED
data/lib/sendly/enterprise.rb
CHANGED
|
@@ -334,8 +334,27 @@ module Sendly
|
|
|
334
334
|
end
|
|
335
335
|
end
|
|
336
336
|
|
|
337
|
+
class EnterpriseCreditsSubResource
|
|
338
|
+
def initialize(client)
|
|
339
|
+
@client = client
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
def get
|
|
343
|
+
@client.get("/enterprise/credits")
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
def deposit(amount:, description: nil)
|
|
347
|
+
raise ArgumentError, "Amount must be a positive number" if !amount.is_a?(Integer) || amount <= 0
|
|
348
|
+
|
|
349
|
+
body = { amount: amount }
|
|
350
|
+
body[:description] = description if description
|
|
351
|
+
|
|
352
|
+
@client.post("/enterprise/credits/deposit", body)
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
|
|
337
356
|
class EnterpriseResource
|
|
338
|
-
attr_reader :workspaces, :webhooks, :analytics, :settings, :billing
|
|
357
|
+
attr_reader :workspaces, :webhooks, :analytics, :settings, :billing, :credits
|
|
339
358
|
|
|
340
359
|
def initialize(client)
|
|
341
360
|
@client = client
|
|
@@ -344,6 +363,7 @@ module Sendly
|
|
|
344
363
|
@analytics = EnterpriseAnalyticsSubResource.new(client)
|
|
345
364
|
@settings = EnterpriseSettingsSubResource.new(client)
|
|
346
365
|
@billing = EnterpriseBillingSubResource.new(client)
|
|
366
|
+
@credits = EnterpriseCreditsSubResource.new(client)
|
|
347
367
|
end
|
|
348
368
|
|
|
349
369
|
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.20.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-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|