tillbell 0.8.0 → 0.8.1

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: 5e48af929e57af662aa986988dad244c74992aedd713752cc294f543dc38a79f
4
- data.tar.gz: 5ab9aa177391f2751ac182e8b83fa8f9451bdc9897b9b4a14e6d120aadbd3ae1
3
+ metadata.gz: e585ef82d69052271d06bdd1c7f28eccfbe964008197b5bcb63c8bcff1246102
4
+ data.tar.gz: d9791b80923a7670984d47f874e9a0db2962fcb86d5b69532cca2700edf54e3a
5
5
  SHA512:
6
- metadata.gz: 779b1e2584e9ed3ffc2a3590c182311ef61aacc076f5622e175418c8527becc79972d78cb4b7171f3623c839331c940fdfd0d150c8450c924a3106523163e98c
7
- data.tar.gz: '03690b505f174b11c90a0737168823334dcc9d2f3c7d9b09d5543d79d73909f70b39e1ec35b825939af80918f304a979f89061b74c797e79f5f4b5eefe75864d'
6
+ metadata.gz: 58dd7a5beacc67e777c18948ddaeaece8ed77264333c5cac4327cf159cadb9262fca453c4fac2fa12820540007db61ef34bf2c7731311d8c76902fe7495db1cd
7
+ data.tar.gz: ce72b2ee28cb7fb91d232beeda1e7cd0b0cfe535f73c79bcdb3df647849b771181d7c5ab0622ea1c9ad346a0432cd8dd90210a60cf88b865c830acd8f3c25027
data/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ All notable changes to this project are documented in this file. The format foll
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.8.1] - 2026-11-25
10
+
11
+ ### Fixed
12
+
13
+ - A purchase no longer fails with a 500 when Google answers 409 `concurrentUpdate` to the
14
+ acknowledge because another call is already updating the purchase: it is synced again a
15
+ minute later, which acknowledges it if it is still pending.
16
+
9
17
  ## [0.8.0] - 2026-11-24
10
18
 
11
19
  ### Upgrading
@@ -48,9 +48,16 @@ module Tillbell
48
48
  end
49
49
 
50
50
  # Acknowledges a subscription purchase. Google refunds purchases that are not
51
- # acknowledged within three days.
51
+ # acknowledged within three days. Google answers 409 (+concurrentUpdate+) when the purchase
52
+ # is already being updated, typically by another acknowledge of the same purchase. Nothing
53
+ # proves that call succeeds, so the purchase is synced again shortly: the sync only
54
+ # acknowledges a purchase that is still pending.
52
55
  def acknowledge(product_id, purchase_token)
53
56
  service.acknowledge_purchase_subscription(package_name, product_id, purchase_token)
57
+ rescue Google::Apis::ClientError => error
58
+ raise unless error.status_code == 409
59
+
60
+ SyncJob.set(wait: 1.minute).perform_later(purchase_token)
54
61
  end
55
62
 
56
63
  # Stops the renewal of a subscription. The customer keeps access until the end of
@@ -1,3 +1,3 @@
1
1
  module Tillbell
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tillbell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - pmakerhq