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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9258e29e863797fbc0b0fd1b9bb284aa96bb5c62ae3bda82975569ca300aa283
4
- data.tar.gz: 832f2ea2e2ad204d5430ff67159a54d1add7b611556d59647193f70eb06536a7
3
+ metadata.gz: 240430322af11563071426063863ad91715374c9387ea9f3e24cf660ccf01646
4
+ data.tar.gz: d912d0aa4e7aa20e9a522bcb22fec5fa1ef45f4cd65798ad80b6cbf618219782
5
5
  SHA512:
6
- metadata.gz: c5a19a1b90bc8241474c5e9b98013384b4c326db89ffc0ecaafe1519f78b112451e1a598ab42a03c7e1eeaa45b3ed829bb4ad940888526245be2bcc895cada3a
7
- data.tar.gz: 83c2d120131cd432a07877215cf90dc824abb60e0d28feda878e103705ab762c5f8036ad9f5997978509d3621088eb8f37802e77cd27ad773b649ff98f7a1f9c
6
+ metadata.gz: 8670b0a85a40d67ce290aecd6b2262ba6930066b5882a7b8d2f7c9ec9b9ef439771b69450583664b8854e8c5cee4812f28b5142011322c421ce21013ad5bad40
7
+ data.tar.gz: 670708f812eba4d952470ba2af889b50bb0f4b5b319c68cb97118ba2be4546f2d840651a0457fa63b9cda3e29c6c7f2b6215462f58241cb37c4f4c98465fba08
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sendly (3.19.1)
4
+ sendly (3.20.0)
5
5
  faraday (~> 2.0)
6
6
  faraday-retry (~> 2.0)
7
7
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sendly
4
- VERSION = "3.19.1"
4
+ VERSION = "3.20.0"
5
5
  end
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.19.1
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-09 00:00:00.000000000 Z
11
+ date: 2026-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday