killbill-invoice-test 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69342817536c8fa5f97ca6ad306b9647fd6d8e73
4
- data.tar.gz: c1237c86065acf28c511399965d5df9fc4dcad15
3
+ metadata.gz: 113cfbf53e802d9bfec1b966b9f5cca7dcf6fed7
4
+ data.tar.gz: 6068c9022e8d5db98475da37ca65b548e8738217
5
5
  SHA512:
6
- metadata.gz: 9c29537778615c408665592664596e29e1b27e07fd74767335667df5ac7aa19d74f6a00e232c298d8a6f2d5351e7ab153be4b48cd734eb14708c0441a2ec21cd
7
- data.tar.gz: d772ecb21c95d3f6acad82dfa7c22e187dc79048ae6a92d21b2276487d2c580722dbe03cb108ffff5ee543195a0bc141c37b9aaf17a4df38a0433ad1284641d1
6
+ metadata.gz: 31e1dbccafc37933ced4ce8b6a8690488e5ed1584c524718122b1aa215e59ff6ab67af8e9d132d2c2c650831a419125ccbf2ed2957640694ee8276c189d0ce78
7
+ data.tar.gz: aeea59c943a90ceea1f99bbd7c20e381432989e97a08b1aca516b39eb5cc31ed456336f5dc3de58be7d595083e869a1c6c17e394450b8022be045f081c07e76a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- killbill-invoice-test (0.1.0)
4
+ killbill-invoice-test (0.1.1)
5
5
  killbill (~> 7.0)
6
6
 
7
7
  GEM
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -4,7 +4,7 @@ module InvoiceTest
4
4
 
5
5
  # This implementation is idempotent, will apply tax on old invoices if needed
6
6
  # and automatically handle adjustments
7
- def get_additional_invoice_items(new_invoice, properties, context)
7
+ def get_additional_invoice_items(new_invoice, dry_run, properties, context)
8
8
  all_invoices = @kb_apis.invoice_user_api.get_invoices_by_account(new_invoice.account_id, context)
9
9
  # Workaround for https://github.com/killbill/killbill/issues/265
10
10
  all_invoices << new_invoice unless all_invoices.find { |inv| inv.id == new_invoice.id }
data/pom.xml CHANGED
@@ -27,7 +27,7 @@
27
27
  <groupId>org.kill-bill.billing.plugin.ruby</groupId>
28
28
  <artifactId>invoice-test-plugin</artifactId>
29
29
  <packaging>pom</packaging>
30
- <version>0.1.0</version>
30
+ <version>0.1.1</version>
31
31
  <name>invoice-test-plugin</name>
32
32
  <description></description>
33
33
  <scm>
@@ -33,7 +33,7 @@ describe InvoiceTest::InvoicePlugin do
33
33
  recurring_item = build_invoice_item(150, :RECURRING)
34
34
  invoice = build_invoice([fixed_item, recurring_item])
35
35
 
36
- new_items = @plugin.get_additional_invoice_items(invoice, @properties, @call_context)
36
+ new_items = @plugin.get_additional_invoice_items(invoice, false, @properties, @call_context)
37
37
  new_items.size.should == 2
38
38
 
39
39
  check_invoice_item(new_items[0], 7, fixed_item)
@@ -49,7 +49,7 @@ describe InvoiceTest::InvoicePlugin do
49
49
  fixed_adj_item = build_invoice_item(-100, :ITEM_ADJ, fixed_item.id)
50
50
  invoice = build_invoice([fixed_item, recurring_item, recurring_adj_item, fixed_adj_item])
51
51
 
52
- new_items = @plugin.get_additional_invoice_items(invoice, @properties, @call_context)
52
+ new_items = @plugin.get_additional_invoice_items(invoice, false, @properties, @call_context)
53
53
  new_items.size.should == 0
54
54
 
55
55
  check_idempotency(invoice, new_items)
@@ -61,7 +61,7 @@ describe InvoiceTest::InvoicePlugin do
61
61
  fixed_adj_item = build_invoice_item(-100, :ITEM_ADJ, fixed_item.id)
62
62
  invoice = build_invoice([fixed_item, recurring_item, fixed_adj_item])
63
63
 
64
- new_items = @plugin.get_additional_invoice_items(invoice, @properties, @call_context)
64
+ new_items = @plugin.get_additional_invoice_items(invoice, false, @properties, @call_context)
65
65
  new_items.size.should == 1
66
66
 
67
67
  check_invoice_item(new_items[0], 10.5, recurring_item)
@@ -75,7 +75,7 @@ describe InvoiceTest::InvoicePlugin do
75
75
  fixed_adj_item = build_invoice_item(-20, :ITEM_ADJ, fixed_item.id)
76
76
  invoice = build_invoice([fixed_item, tax_item, fixed_adj_item])
77
77
 
78
- new_items = @plugin.get_additional_invoice_items(invoice, @properties, @call_context)
78
+ new_items = @plugin.get_additional_invoice_items(invoice, false, @properties, @call_context)
79
79
  new_items.size.should == 1
80
80
 
81
81
  check_invoice_item(new_items[0], -1.4, tax_item, :ITEM_ADJ)
@@ -110,7 +110,7 @@ describe InvoiceTest::InvoicePlugin do
110
110
 
111
111
  def check_idempotency(original_invoice, new_items)
112
112
  invoice = build_invoice(original_invoice.invoice_items + new_items)
113
- additional_items = @plugin.get_additional_invoice_items(invoice, @properties, @call_context)
113
+ additional_items = @plugin.get_additional_invoice_items(invoice, false, @properties, @call_context)
114
114
  additional_items.size.should == 0
115
115
  end
116
116
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-invoice-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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: 2015-12-18 00:00:00.000000000 Z
11
+ date: 2016-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: killbill