cats_core 1.4.29 → 1.4.30

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: cf68527d50707b488472a3aaa759722ce59d59ed171f75cb018a3bfe19421179
4
- data.tar.gz: 2183b2b605d8b73ee8c29c4a8cf6ca6438a72ad2569342fb8da615da9ebd05e7
3
+ metadata.gz: a4956ad89bea4861d95aaffc40534eab2b319009d2a10f2762e9b1ee6b68b60e
4
+ data.tar.gz: 6d5aaf08e18bb95e8fd09c0957bbfeb982df76c1061f1b001028f1e91a1ac8ff
5
5
  SHA512:
6
- metadata.gz: b15751ad2c5557da8aaed254e538ccf0d7bab769b3af085ce3a46c5e0bdbc975c09e8217f1694275976207d5b99d3455d8587bb419a49b85d7153d8718e4924b
7
- data.tar.gz: c4b5d706eb93c2c12e3d5517daec41360c4557e47edc1c6d25cac94bc090dbdba8e24082d5806db026c17f0e41da2f44696be45d61c21049bbf37762875e35af
6
+ metadata.gz: 88a42101e62d3a13b23a905bcc06852115797cd3a0e160ae7204510777cb494b03f108500f7e0c5201439695ac084d737f903c619a4e1fc9d0e926ceec7aa396
7
+ data.tar.gz: 7de9d35e696f2b2421cefa54da0e706b0826b3c63389eff498d4e0964f354cf61f7ae3eb4baba80f16b214b405615a2adcd3c2c19f1e97649a6fe4313c7b598f
@@ -80,6 +80,11 @@ module Cats
80
80
  end
81
81
 
82
82
  def stack
83
+ # check if all receipt transactions have been committed and change status
84
+ # of dispatch to stacked.
85
+ statuses = receipt_transactions.map(&:status).uniq
86
+ return unless statuses.length == 1 && statuses[0] == Transaction::COMMITTED
87
+
83
88
  self.dispatch_status = STACKED
84
89
  save!
85
90
  end
@@ -39,6 +39,7 @@ module Cats
39
39
  end
40
40
 
41
41
  authorization.transactions.each(&:commit)
42
+
42
43
  authorization.dispatch.stack
43
44
  authorization
44
45
  end
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.4.29'.freeze
3
+ VERSION = '1.4.30'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cats_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.29
4
+ version: 1.4.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-30 00:00:00.000000000 Z
11
+ date: 2022-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers