killbill-orbital 0.1.14 → 0.1.15

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
  SHA1:
3
- metadata.gz: 6826e979cc8f453a11b401239449d0c16d94274b
4
- data.tar.gz: 141b936ce2db1f420e34308a4c21d352838b1054
3
+ metadata.gz: c90683dbb5624318660b222ed49996d0d4711d0c
4
+ data.tar.gz: 040e8159d7062353b4cd4f14335995fdc86d2a0f
5
5
  SHA512:
6
- metadata.gz: 0ffbc8faaed4ec141e3a2e588a42f7efd3a23ed5c10c6a0e6dd4ab651afd177048f090fd32e4a199b94c397cf4c37ec874ab6f1d46d433fb55eec0224e8e99f8
7
- data.tar.gz: 8eacf5883acc7c3d039f1535e047fe47c6b8d1e71af74b2a1f2c92930db82fb9bc5f61e0aca2cfb5d9881de8bd6a1580e52913958cb44faafe218930d18aa27b
6
+ metadata.gz: 4e55832e76989ed676bbeddfec7b8a672986b658e897d4d2f39236cce1d9ca1505bd67eba6e3059b20db4b348996fb627b5a97b4dec1842f35be78ab48ea76ff
7
+ data.tar.gz: bd5c61ae437ec4faf9536ae94e708035fac9584fcfc91a72fa268576ebbc18d2fb487840520baca1594304a44494b864c44b3dd13e87c408bc3d9add93df1a80
@@ -6,6 +6,8 @@ module Killbill #:nodoc:
6
6
 
7
7
  has_one :orbital_transaction
8
8
 
9
+ scope :succeeded, -> { where(:success => true) }
10
+
9
11
  def self.from_response(api_call, kb_account_id, kb_payment_id, kb_payment_transaction_id, transaction_type, payment_processor_account_id, kb_tenant_id, response, extra_params = {}, model = ::Killbill::Orbital::OrbitalResponse)
10
12
  super(api_call,
11
13
  kb_account_id,
@@ -187,6 +189,16 @@ module Killbill #:nodoc:
187
189
 
188
190
  return where_clause
189
191
  end
192
+
193
+ SIMPLE_PAGINATION_THRESHOLD = 20000
194
+
195
+ def self.max_nb_records
196
+ if self.succeeded.limit(1).offset(SIMPLE_PAGINATION_THRESHOLD).nil?
197
+ self.succeeded.count
198
+ else
199
+ SIMPLE_PAGINATION_THRESHOLD + 1
200
+ end
201
+ end
190
202
  end
191
203
  end
192
204
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-orbital
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-19 00:00:00.000000000 Z
11
+ date: 2018-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement