killbill 7.0.6 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -6
- data/Gemfile.lock +13 -15
- data/Jarfile +10 -9
- data/Jarfile.lock +53 -50
- data/NEWS +0 -4
- data/README.md +13 -1
- data/generators/active_merchant/templates/spec/spec_helper.rb +5 -9
- data/killbill.gemspec +0 -1
- data/lib/killbill/gen/api/account.rb +26 -1
- data/lib/killbill/gen/api/dry_run_arguments.rb +4 -7
- data/lib/killbill/gen/api/entitlement.rb +7 -1
- data/lib/killbill/gen/api/entitlement_api.rb +42 -84
- data/lib/killbill/gen/api/immutable_account_data.rb +26 -1
- data/lib/killbill/gen/api/invoice_user_api.rb +52 -12
- data/lib/killbill/gen/api/killbill_nodes_api.rb +30 -13
- data/lib/killbill/gen/api/migration_plan.rb +19 -12
- data/lib/killbill/gen/api/osgi_killbill.rb +8 -1
- data/lib/killbill/gen/api/payment_api.rb +51 -0
- data/lib/killbill/gen/api/plan.rb +19 -12
- data/lib/killbill/gen/api/require_gen.rb +1 -0
- data/lib/killbill/gen/api/subscription.rb +7 -1
- data/lib/killbill/gen/api/subscription_api.rb +279 -164
- data/lib/killbill/gen/api/subscription_event.rb +1 -12
- data/lib/killbill/gen/api/subscription_usage_record.rb +8 -2
- data/lib/killbill/gen/api/usage_api_exception.rb +68 -0
- data/lib/killbill/gen/plugin-api/blocking_state_metadata.rb +137 -0
- data/lib/killbill/gen/plugin-api/entitlement_context.rb +26 -8
- data/lib/killbill/gen/plugin-api/prior_entitlement_result.rb +26 -8
- data/lib/killbill/gen/plugin-api/require_gen.rb +1 -0
- data/lib/killbill/helpers/active_merchant/active_record/models/response.rb +1 -0
- data/lib/killbill/helpers/active_merchant/payment_plugin.rb +1 -6
- data/lib/killbill/migration.rb +2 -13
- data/lib/killbill/version.rb +1 -1
- data/spec/killbill/helpers/payment_method_spec.rb +8 -8
- data/spec/killbill/helpers/response_spec.rb +4 -4
- data/spec/spec_helper.rb +1 -1
- metadata +102 -82
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: affd2724e04c271fa046588a33d8025f942ff1f5
|
4
|
+
data.tar.gz: 5069906730e69d6acbd771e51824fabcb4ac84ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49c3f44828e1f1a93667cc124e2be6cbad2c6f42a9acf99edcc0c1da69201e80ee4761af8733b39a22ccee7a61c426c801a2da559b4c0db03490faf1edf9bb8e
|
7
|
+
data.tar.gz: 383ea040eac1413d4a3dcbaeef81be3db53f5d16fb401e5eca2292854a2996875fa7a693904f750674eebf74bb1d1f2801e8f826d4cfdeeff41dd9146cf060ba
|
data/.travis.yml
CHANGED
@@ -6,14 +6,9 @@ cache:
|
|
6
6
|
directories:
|
7
7
|
- $HOME/.m2
|
8
8
|
|
9
|
-
services:
|
10
|
-
- mysql
|
11
|
-
- postgresql
|
12
|
-
|
13
9
|
before_script:
|
14
10
|
- bundle exec jbundle install
|
15
11
|
- mysql -uroot -e 'create database killbill_test;'
|
16
|
-
- psql -c 'create database killbill_test;' -U postgres
|
17
12
|
|
18
13
|
notifications:
|
19
14
|
email:
|
@@ -25,7 +20,6 @@ env:
|
|
25
20
|
matrix:
|
26
21
|
# Need MySQL 5.6 - see https://github.com/travis-ci/travis-ci/issues/1986
|
27
22
|
#- AR_ADAPTER='mariadb' AR_USERNAME='root' AR_PASSWORD='' AR_DATABASE='killbill_test'
|
28
|
-
- AR_ADAPTER='postgresql' AR_USERNAME='postgres' AR_DATABASE='killbill_test'
|
29
23
|
- AR_ADAPTER='sqlite3' AR_DATABASE='test.db'
|
30
24
|
|
31
25
|
rvm:
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
killbill (
|
4
|
+
killbill (8.0.0)
|
5
5
|
rack (>= 1.5.2)
|
6
6
|
sinatra (~> 1.3.4)
|
7
7
|
typhoeus (~> 0.6.9)
|
@@ -61,24 +61,23 @@ GEM
|
|
61
61
|
ffi (1.9.10-java)
|
62
62
|
i18n (0.7.0)
|
63
63
|
ice_nine (0.11.2)
|
64
|
-
jar-dependencies (0.3.
|
65
|
-
jbundler (0.9.
|
64
|
+
jar-dependencies (0.3.4)
|
65
|
+
jbundler (0.9.3)
|
66
66
|
bundler (~> 1.5)
|
67
|
-
jar-dependencies (~> 0.
|
68
|
-
maven-tools (~> 1.
|
69
|
-
ruby-maven (~> 3.3, >= 3.3.
|
67
|
+
jar-dependencies (~> 0.3)
|
68
|
+
maven-tools (~> 1.1)
|
69
|
+
ruby-maven (~> 3.3, >= 3.3.8)
|
70
70
|
jdbc-mariadb (1.1.9)
|
71
|
-
jdbc-postgres (9.4.1206)
|
72
71
|
jdbc-sqlite3 (3.8.11.2)
|
73
72
|
json (1.8.3-java)
|
74
|
-
maven-tools (1.
|
73
|
+
maven-tools (1.1.4)
|
75
74
|
virtus (~> 1.0)
|
76
|
-
minitest (5.
|
75
|
+
minitest (5.9.0)
|
77
76
|
monetize (1.1.0)
|
78
77
|
money (~> 6.5.0)
|
79
78
|
money (6.5.1)
|
80
79
|
i18n (>= 0.6.4, <= 0.7.0)
|
81
|
-
nokogiri (1.6.
|
80
|
+
nokogiri (1.6.8-java)
|
82
81
|
offsite_payments (2.1.0)
|
83
82
|
actionpack (>= 3.2.20, < 5.0.0)
|
84
83
|
active_utils (~> 3.0.0)
|
@@ -101,9 +100,9 @@ GEM
|
|
101
100
|
rspec-expectations (2.12.1)
|
102
101
|
diff-lcs (~> 1.1.3)
|
103
102
|
rspec-mocks (2.12.2)
|
104
|
-
ruby-maven (3.3.
|
105
|
-
ruby-maven-libs (~> 3.3.
|
106
|
-
ruby-maven-libs (3.3.
|
103
|
+
ruby-maven (3.3.11)
|
104
|
+
ruby-maven-libs (~> 3.3.9)
|
105
|
+
ruby-maven-libs (3.3.9)
|
107
106
|
sinatra (1.3.6)
|
108
107
|
rack (~> 1.4)
|
109
108
|
rack-protection (~> 1.3)
|
@@ -133,7 +132,6 @@ DEPENDENCIES
|
|
133
132
|
activerecord-jdbc-adapter (~> 1.3)
|
134
133
|
jbundler (~> 0.9.2)
|
135
134
|
jdbc-mariadb (~> 1.1.8)
|
136
|
-
jdbc-postgres (~> 9.4)
|
137
135
|
jdbc-sqlite3 (~> 3.7)
|
138
136
|
killbill!
|
139
137
|
monetize (~> 1.1.0)
|
@@ -145,4 +143,4 @@ DEPENDENCIES
|
|
145
143
|
thread_safe (~> 0.3.4)
|
146
144
|
|
147
145
|
BUNDLED WITH
|
148
|
-
1.
|
146
|
+
1.10.6
|
data/Jarfile
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
jar 'org.kill-bill.billing:killbill-api', '0.
|
2
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.
|
3
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-invoice', '0.
|
4
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.
|
5
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.
|
6
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-control', '0.
|
7
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-catalog', '0.
|
8
|
-
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-entitlement', '0.
|
9
|
-
jar 'org.kill-bill.billing:killbill-util:tests', '0.
|
1
|
+
jar 'org.kill-bill.billing:killbill-api', '0.34'
|
2
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.19'
|
3
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-invoice', '0.19'
|
4
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.19'
|
5
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.19'
|
6
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-control', '0.19'
|
7
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-catalog', '0.19'
|
8
|
+
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-entitlement', '0.19'
|
9
|
+
jar 'org.kill-bill.billing:killbill-util:tests', '0.17.0'
|
10
|
+
jar 'org.kill-bill.billing:killbill-util', '0.17.0'
|
10
11
|
jar 'org.mockito:mockito-all', '1.10.19'
|
11
12
|
jar 'javax.servlet:javax.servlet-api', '3.1.0'
|
data/Jarfile.lock
CHANGED
@@ -1,61 +1,64 @@
|
|
1
1
|
---
|
2
2
|
:runtime:
|
3
|
-
-
|
4
|
-
- org.
|
5
|
-
-
|
3
|
+
- org.kill-bill.billing:killbill-platform-base:jar:0.27
|
4
|
+
- org.javassist:javassist:jar:3.19.0-GA
|
5
|
+
- org.apache.shiro:shiro-core:jar:1.2.3
|
6
6
|
- joda-time:joda-time:jar:2.3
|
7
|
-
- org.
|
8
|
-
-
|
9
|
-
-
|
10
|
-
-
|
11
|
-
- org.kill-bill.commons:killbill-xmlloader:jar:0.11
|
12
|
-
- org.kill-bill.billing.plugin:killbill-plugin-api-entitlement:jar:0.18
|
13
|
-
- com.google.inject:guice:jar:3.0
|
7
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-control:jar:0.19
|
8
|
+
- net.sf.ehcache:ehcache:jar:2.9.1
|
9
|
+
- aopalliance:aopalliance:jar:1.0
|
10
|
+
- com.google.code.findbugs:annotations:jar:3.0.0
|
14
11
|
- org.osgi:org.osgi.core:jar:5.0.0
|
15
|
-
- org.
|
16
|
-
- com.
|
17
|
-
- org.
|
18
|
-
- org.kill-bill.billing.plugin:killbill-plugin-api-
|
19
|
-
- org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:jar:1.16
|
20
|
-
- com.h2database:h2:jar:1.4.186
|
21
|
-
- javax.activation:activation:jar:1.1
|
22
|
-
- org.skife.config:config-magic:jar:0.14
|
23
|
-
- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.4.3
|
24
|
-
- org.kill-bill.billing.plugin:killbill-plugin-api-control:jar:0.18
|
12
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-currency:jar:0.19
|
13
|
+
- com.zaxxer:HikariCP-java6:jar:2.3.7
|
14
|
+
- org.apache.shiro:shiro-guice:jar:1.2.3
|
15
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-catalog:jar:0.19
|
25
16
|
- org.apache.commons:commons-email:jar:1.2
|
26
|
-
- org.
|
17
|
+
- org.skife.config:config-magic:jar:0.14
|
27
18
|
- antlr:antlr:jar:2.7.7
|
28
|
-
-
|
29
|
-
- com.fasterxml.jackson.core:jackson-annotations:jar:2.4.3
|
19
|
+
- org.kill-bill.billing:killbill-platform-api:jar:0.27
|
30
20
|
- org.antlr:stringtemplate:jar:3.2.1
|
31
|
-
- org.
|
32
|
-
- javax.mail:mail:jar:1.4.1
|
33
|
-
- org.kill-bill.billing:killbill-platform-base:jar:0.15
|
34
|
-
- io.dropwizard.metrics:metrics-ehcache:jar:3.1.1
|
35
|
-
- org.slf4j:jcl-over-slf4j:jar:1.7.12
|
36
|
-
- org.jdbi:jdbi:jar:2.62
|
37
|
-
- org.kill-bill.billing:killbill-platform-api:jar:0.15
|
38
|
-
- org.kill-bill.billing:killbill-platform-osgi:jar:0.15
|
39
|
-
- org.apache.felix:org.apache.felix.framework:jar:4.4.1
|
21
|
+
- org.apache.shiro:shiro-ehcache:jar:1.2.3
|
40
22
|
- org.joda:joda-money:jar:0.9
|
41
|
-
- org.
|
42
|
-
-
|
43
|
-
-
|
44
|
-
-
|
45
|
-
- org.kill-bill.billing.plugin:killbill-plugin-api-payment:jar:0.18
|
23
|
+
- org.jdbi:jdbi:jar:2.62
|
24
|
+
- com.fasterxml.jackson.core:jackson-annotations:jar:2.4.3
|
25
|
+
- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.4.3
|
26
|
+
- com.google.inject:guice:jar:3.0
|
46
27
|
- com.fasterxml.jackson.core:jackson-databind:jar:2.4.3
|
47
|
-
-
|
48
|
-
- org.
|
49
|
-
- org.
|
50
|
-
-
|
51
|
-
- org.kill-bill.commons:killbill-
|
52
|
-
-
|
53
|
-
- org.
|
54
|
-
-
|
28
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-entitlement:jar:0.19
|
29
|
+
- org.apache.felix:org.apache.felix.framework:jar:4.4.1
|
30
|
+
- org.kill-bill.billing:killbill-api:jar:0.34
|
31
|
+
- com.samskivert:jmustache:jar:1.5
|
32
|
+
- org.kill-bill.commons:killbill-queue:jar:0.16
|
33
|
+
- com.h2database:h2:jar:1.4.186
|
34
|
+
- org.kill-bill.commons:killbill-jdbi:jar:0.16
|
35
|
+
- org.kill-bill.billing:killbill-platform-osgi-api:jar:0.27
|
36
|
+
- org.slf4j:jcl-over-slf4j:jar:1.7.21
|
37
|
+
- org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:jar:1.16
|
38
|
+
- org.kill-bill.commons:killbill-embeddeddb-common:jar:0.16
|
39
|
+
- org.kill-bill.billing:killbill-util:jar:0.17.0
|
55
40
|
- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.4.3
|
41
|
+
- org.kill-bill.billing:killbill-internal-api:jar:0.17.0
|
42
|
+
- org.kill-bill.commons:killbill-concurrent:jar:0.16
|
43
|
+
- com.fasterxml.jackson.core:jackson-core:jar:2.4.3
|
44
|
+
- com.google.guava:guava:jar:r09
|
45
|
+
- javax.mail:mail:jar:1.4.1
|
46
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-notification:jar:0.19
|
47
|
+
- javax.activation:activation:jar:1.1
|
48
|
+
- org.kill-bill.commons:killbill-xmlloader:jar:0.16
|
49
|
+
- io.dropwizard.metrics:metrics-core:jar:3.1.1
|
50
|
+
- org.kill-bill.billing:killbill-platform-osgi:jar:0.27
|
51
|
+
- org.kill-bill.commons:killbill-clock:jar:0.16
|
52
|
+
- org.weakref:jmxutils:jar:1.18
|
56
53
|
- com.google.inject.extensions:guice-multibindings:jar:3.0
|
57
|
-
-
|
58
|
-
- org.
|
59
|
-
-
|
60
|
-
-
|
61
|
-
-
|
54
|
+
- javax.inject:javax.inject:jar:1
|
55
|
+
- org.slf4j:slf4j-api:jar:1.7.21
|
56
|
+
- commons-beanutils:commons-beanutils:jar:1.8.3
|
57
|
+
- javax.servlet:javax.servlet-api:jar:3.1.0
|
58
|
+
- io.dropwizard.metrics:metrics-ehcache:jar:3.1.1
|
59
|
+
- org.kill-bill.commons:killbill-locker:jar:0.16
|
60
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-invoice:jar:0.19
|
61
|
+
- org.kill-bill.billing:killbill-util:jar:tests:0.17.0
|
62
|
+
- org.mockito:mockito-all:jar:1.10.19
|
63
|
+
- org.kill-bill.billing.plugin:killbill-plugin-api-payment:jar:0.19
|
64
|
+
- org.osgi:org.osgi.compendium:jar:5.0.0
|
data/NEWS
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,19 @@
|
|
1
1
|
[![Build Status](https://travis-ci.org/killbill/killbill-plugin-framework-ruby.png)](https://travis-ci.org/killbill/killbill-plugin-framework-ruby)
|
2
2
|
[![Code Climate](https://codeclimate.com/github/killbill/killbill-plugin-framework-ruby.png)](https://codeclimate.com/github/killbill/killbill-plugin-framework-ruby)
|
3
3
|
|
4
|
+
|
5
|
+
Kill Bill compatibility
|
6
|
+
-----------------------
|
7
|
+
|
8
|
+
| Plugin Framework version | Kill Bill version |
|
9
|
+
| -----------------------: | ----------------: |
|
10
|
+
| 7.x.y | 0.16.z |
|
11
|
+
| -----------------------: | ----------------: |
|
12
|
+
| 8.x.y | 0.18.z(and 0.17.x)|
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
4
17
|
killbill-plugin-framework-ruby
|
5
18
|
==============================
|
6
19
|
|
@@ -249,5 +262,4 @@ To change the database driver:
|
|
249
262
|
|
250
263
|
```bash
|
251
264
|
AR_ADAPTER=mariadb AR_USERNAME=root AR_PASSWORD=root AR_DATABASE=kbtest rake
|
252
|
-
AR_ADAPTER=postgresql AR_DATABASE=kbtest rake
|
253
265
|
```
|
@@ -12,15 +12,11 @@ RSpec.configure do |config|
|
|
12
12
|
config.formatter = 'documentation'
|
13
13
|
end
|
14
14
|
|
15
|
-
require
|
16
|
-
|
17
|
-
:adapter =>
|
18
|
-
:database =>
|
19
|
-
|
20
|
-
db_config[:username] = ENV['AR_USERNAME'] if ENV['AR_USERNAME']
|
21
|
-
db_config[:password] = ENV['AR_PASSWORD'] if ENV['AR_PASSWORD']
|
22
|
-
ActiveRecord::Base.establish_connection(db_config)
|
23
|
-
|
15
|
+
require 'active_record'
|
16
|
+
ActiveRecord::Base.establish_connection(
|
17
|
+
:adapter => 'sqlite3',
|
18
|
+
:database => 'test.db'
|
19
|
+
)
|
24
20
|
# For debugging
|
25
21
|
#ActiveRecord::Base.logger = Logger.new(STDOUT)
|
26
22
|
# Create the schema
|
data/killbill.gemspec
CHANGED
@@ -37,7 +37,6 @@ Gem::Specification.new do |s|
|
|
37
37
|
# See https://github.com/killbill/killbill-plugin-framework-ruby/issues/33
|
38
38
|
s.add_development_dependency 'activerecord-jdbc-adapter', '~> 1.3'
|
39
39
|
s.add_development_dependency 'jdbc-mariadb', '~> 1.1.8'
|
40
|
-
s.add_development_dependency 'jdbc-postgres', '~> 9.4'
|
41
40
|
end
|
42
41
|
s.add_development_dependency 'actionpack', '~> 4.1.0'
|
43
42
|
s.add_development_dependency 'actionview', '~> 4.1.0'
|
@@ -34,7 +34,7 @@ module Killbill
|
|
34
34
|
|
35
35
|
include org.killbill.billing.account.api.Account
|
36
36
|
|
37
|
-
attr_accessor :id, :created_date, :updated_date, :external_key, :currency, :time_zone, :name, :first_name_length, :email, :bill_cycle_day_local, :payment_method_id, :locale, :address1, :address2, :company_name, :city, :state_or_province, :postal_code, :country, :phone, :is_migrated, :is_notified_for_invoices
|
37
|
+
attr_accessor :id, :created_date, :updated_date, :external_key, :currency, :time_zone, :fixed_offset_time_zone, :reference_time, :name, :first_name_length, :email, :bill_cycle_day_local, :payment_method_id, :locale, :address1, :address2, :company_name, :city, :state_or_province, :postal_code, :country, :phone, :is_migrated, :is_notified_for_invoices
|
38
38
|
|
39
39
|
def initialize()
|
40
40
|
end
|
@@ -66,6 +66,17 @@ module Killbill
|
|
66
66
|
@time_zone = Java::org.joda.time.DateTimeZone.forID((@time_zone.respond_to?(:identifier) ? @time_zone.identifier : @time_zone.to_s))
|
67
67
|
end
|
68
68
|
|
69
|
+
# conversion for fixed_offset_time_zone [type = org.joda.time.DateTimeZone]
|
70
|
+
if !@fixed_offset_time_zone.nil?
|
71
|
+
@fixed_offset_time_zone = Java::org.joda.time.DateTimeZone.forID((@fixed_offset_time_zone.respond_to?(:identifier) ? @fixed_offset_time_zone.identifier : @fixed_offset_time_zone.to_s))
|
72
|
+
end
|
73
|
+
|
74
|
+
# conversion for reference_time [type = org.joda.time.DateTime]
|
75
|
+
if !@reference_time.nil?
|
76
|
+
@reference_time = (@reference_time.kind_of? Time) ? DateTime.parse(@reference_time.to_s) : @reference_time
|
77
|
+
@reference_time = Java::org.joda.time.DateTime.new(@reference_time.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
78
|
+
end
|
79
|
+
|
69
80
|
# conversion for name [type = java.lang.String]
|
70
81
|
@name = @name.to_s unless @name.nil?
|
71
82
|
|
@@ -150,6 +161,20 @@ module Killbill
|
|
150
161
|
@time_zone = TZInfo::Timezone.get(@time_zone.get_id)
|
151
162
|
end
|
152
163
|
|
164
|
+
# conversion for fixed_offset_time_zone [type = org.joda.time.DateTimeZone]
|
165
|
+
@fixed_offset_time_zone = j_obj.fixed_offset_time_zone
|
166
|
+
if !@fixed_offset_time_zone.nil?
|
167
|
+
@fixed_offset_time_zone = TZInfo::Timezone.get(@fixed_offset_time_zone.get_id)
|
168
|
+
end
|
169
|
+
|
170
|
+
# conversion for reference_time [type = org.joda.time.DateTime]
|
171
|
+
@reference_time = j_obj.reference_time
|
172
|
+
if !@reference_time.nil?
|
173
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3
|
174
|
+
str = fmt.print(@reference_time)
|
175
|
+
@reference_time = DateTime.iso8601(str)
|
176
|
+
end
|
177
|
+
|
153
178
|
# conversion for name [type = java.lang.String]
|
154
179
|
@name = j_obj.name
|
155
180
|
|
@@ -52,10 +52,9 @@ module Killbill
|
|
52
52
|
# conversion for subscription_id [type = java.util.UUID]
|
53
53
|
@subscription_id = java.util.UUID.fromString(@subscription_id.to_s) unless @subscription_id.nil?
|
54
54
|
|
55
|
-
# conversion for effective_date [type = org.joda.time.
|
55
|
+
# conversion for effective_date [type = org.joda.time.LocalDate]
|
56
56
|
if !@effective_date.nil?
|
57
|
-
@effective_date =
|
58
|
-
@effective_date = Java::org.joda.time.DateTime.new(@effective_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
57
|
+
@effective_date = Java::org.joda.time.LocalDate.parse(@effective_date.to_s)
|
59
58
|
end
|
60
59
|
|
61
60
|
# conversion for bundle_id [type = java.util.UUID]
|
@@ -92,12 +91,10 @@ module Killbill
|
|
92
91
|
@subscription_id = j_obj.subscription_id
|
93
92
|
@subscription_id = @subscription_id.nil? ? nil : @subscription_id.to_s
|
94
93
|
|
95
|
-
# conversion for effective_date [type = org.joda.time.
|
94
|
+
# conversion for effective_date [type = org.joda.time.LocalDate]
|
96
95
|
@effective_date = j_obj.effective_date
|
97
96
|
if !@effective_date.nil?
|
98
|
-
|
99
|
-
str = fmt.print(@effective_date)
|
100
|
-
@effective_date = DateTime.iso8601(str)
|
97
|
+
@effective_date = @effective_date.to_s
|
101
98
|
end
|
102
99
|
|
103
100
|
# conversion for bundle_id [type = java.util.UUID]
|
@@ -34,7 +34,7 @@ module Killbill
|
|
34
34
|
|
35
35
|
include org.killbill.billing.entitlement.api.Entitlement
|
36
36
|
|
37
|
-
attr_accessor :id, :created_date, :updated_date, :base_entitlement_id, :bundle_id, :account_id, :external_key, :state, :source_type, :effective_start_date, :effective_end_date, :last_active_product, :last_active_plan, :last_active_phase, :last_active_price_list, :last_active_product_category
|
37
|
+
attr_accessor :id, :created_date, :updated_date, :base_entitlement_id, :bundle_id, :account_id, :external_key, :state, :source_type, :effective_start_date, :effective_end_date, :last_active_product, :last_active_plan, :last_active_phase, :last_active_price_list, :last_active_product_category, :bill_cycle_day_local
|
38
38
|
|
39
39
|
def initialize()
|
40
40
|
end
|
@@ -97,6 +97,9 @@ module Killbill
|
|
97
97
|
|
98
98
|
# conversion for last_active_product_category [type = org.killbill.billing.catalog.api.ProductCategory]
|
99
99
|
@last_active_product_category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of( @last_active_product_category.to_s ) unless @last_active_product_category.nil?
|
100
|
+
|
101
|
+
# conversion for bill_cycle_day_local [type = java.lang.Integer]
|
102
|
+
@bill_cycle_day_local = @bill_cycle_day_local
|
100
103
|
self
|
101
104
|
end
|
102
105
|
|
@@ -175,6 +178,9 @@ module Killbill
|
|
175
178
|
# conversion for last_active_product_category [type = org.killbill.billing.catalog.api.ProductCategory]
|
176
179
|
@last_active_product_category = j_obj.last_active_product_category
|
177
180
|
@last_active_product_category = @last_active_product_category.to_s.to_sym unless @last_active_product_category.nil?
|
181
|
+
|
182
|
+
# conversion for bill_cycle_day_local [type = java.lang.Integer]
|
183
|
+
@bill_cycle_day_local = j_obj.bill_cycle_day_local
|
178
184
|
self
|
179
185
|
end
|
180
186
|
|
@@ -39,8 +39,8 @@ module Killbill
|
|
39
39
|
end
|
40
40
|
|
41
41
|
|
42
|
-
java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement createBaseEntitlement(Java::java.util.UUID, Java::org.killbill.billing.catalog.api.PlanPhaseSpecifier, Java::java.lang.String, Java::java.util.List, Java::org.joda.time.LocalDate, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
43
|
-
def create_base_entitlement(accountId, spec, externalKey, overrides,
|
42
|
+
java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement createBaseEntitlement(Java::java.util.UUID, Java::org.killbill.billing.catalog.api.PlanPhaseSpecifier, Java::java.lang.String, Java::java.util.List, Java::org.joda.time.LocalDate, Java::org.joda.time.LocalDate, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
43
|
+
def create_base_entitlement(accountId, spec, externalKey, overrides, entitlementEffectiveDate, billingEffectiveDate, isMigrated, properties, context)
|
44
44
|
|
45
45
|
# conversion for accountId [type = java.util.UUID]
|
46
46
|
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
@@ -60,11 +60,19 @@ module Killbill
|
|
60
60
|
end
|
61
61
|
overrides = tmp
|
62
62
|
|
63
|
-
# conversion for
|
64
|
-
if !
|
65
|
-
|
63
|
+
# conversion for entitlementEffectiveDate [type = org.joda.time.LocalDate]
|
64
|
+
if !entitlementEffectiveDate.nil?
|
65
|
+
entitlementEffectiveDate = Java::org.joda.time.LocalDate.parse(entitlementEffectiveDate.to_s)
|
66
66
|
end
|
67
67
|
|
68
|
+
# conversion for billingEffectiveDate [type = org.joda.time.LocalDate]
|
69
|
+
if !billingEffectiveDate.nil?
|
70
|
+
billingEffectiveDate = Java::org.joda.time.LocalDate.parse(billingEffectiveDate.to_s)
|
71
|
+
end
|
72
|
+
|
73
|
+
# conversion for isMigrated [type = boolean]
|
74
|
+
isMigrated = isMigrated.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(isMigrated)
|
75
|
+
|
68
76
|
# conversion for properties [type = java.lang.Iterable]
|
69
77
|
tmp = java.util.ArrayList.new
|
70
78
|
(properties || []).each do |m|
|
@@ -77,7 +85,7 @@ module Killbill
|
|
77
85
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
78
86
|
context = context.to_java unless context.nil?
|
79
87
|
begin
|
80
|
-
res = @real_java_api.create_base_entitlement(accountId, spec, externalKey, overrides,
|
88
|
+
res = @real_java_api.create_base_entitlement(accountId, spec, externalKey, overrides, entitlementEffectiveDate, billingEffectiveDate, isMigrated, properties, context)
|
81
89
|
# conversion for res [type = org.killbill.billing.entitlement.api.Entitlement]
|
82
90
|
res = Killbill::Plugin::Model::Entitlement.new.to_ruby(res) unless res.nil?
|
83
91
|
return res
|
@@ -86,8 +94,8 @@ module Killbill
|
|
86
94
|
end
|
87
95
|
end
|
88
96
|
|
89
|
-
java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement createBaseEntitlementWithAddOns(Java::java.util.UUID, Java::java.lang.String, Java::java.lang.Iterable, Java::org.joda.time.LocalDate, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
90
|
-
def create_base_entitlement_with_add_ons(accountId, externalKey, entitlementSpecifier,
|
97
|
+
java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement createBaseEntitlementWithAddOns(Java::java.util.UUID, Java::java.lang.String, Java::java.lang.Iterable, Java::org.joda.time.LocalDate, Java::org.joda.time.LocalDate, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
98
|
+
def create_base_entitlement_with_add_ons(accountId, externalKey, entitlementSpecifier, entitlementEffectiveDate, billingEffectiveDate, isMigrated, properties, context)
|
91
99
|
|
92
100
|
# conversion for accountId [type = java.util.UUID]
|
93
101
|
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
@@ -104,11 +112,19 @@ module Killbill
|
|
104
112
|
end
|
105
113
|
entitlementSpecifier = tmp
|
106
114
|
|
107
|
-
# conversion for
|
108
|
-
if !
|
109
|
-
|
115
|
+
# conversion for entitlementEffectiveDate [type = org.joda.time.LocalDate]
|
116
|
+
if !entitlementEffectiveDate.nil?
|
117
|
+
entitlementEffectiveDate = Java::org.joda.time.LocalDate.parse(entitlementEffectiveDate.to_s)
|
118
|
+
end
|
119
|
+
|
120
|
+
# conversion for billingEffectiveDate [type = org.joda.time.LocalDate]
|
121
|
+
if !billingEffectiveDate.nil?
|
122
|
+
billingEffectiveDate = Java::org.joda.time.LocalDate.parse(billingEffectiveDate.to_s)
|
110
123
|
end
|
111
124
|
|
125
|
+
# conversion for isMigrated [type = boolean]
|
126
|
+
isMigrated = isMigrated.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(isMigrated)
|
127
|
+
|
112
128
|
# conversion for properties [type = java.lang.Iterable]
|
113
129
|
tmp = java.util.ArrayList.new
|
114
130
|
(properties || []).each do |m|
|
@@ -121,7 +137,7 @@ module Killbill
|
|
121
137
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
122
138
|
context = context.to_java unless context.nil?
|
123
139
|
begin
|
124
|
-
res = @real_java_api.create_base_entitlement_with_add_ons(accountId, externalKey, entitlementSpecifier,
|
140
|
+
res = @real_java_api.create_base_entitlement_with_add_ons(accountId, externalKey, entitlementSpecifier, entitlementEffectiveDate, billingEffectiveDate, isMigrated, properties, context)
|
125
141
|
# conversion for res [type = org.killbill.billing.entitlement.api.Entitlement]
|
126
142
|
res = Killbill::Plugin::Model::Entitlement.new.to_ruby(res) unless res.nil?
|
127
143
|
return res
|
@@ -130,8 +146,8 @@ module Killbill
|
|
130
146
|
end
|
131
147
|
end
|
132
148
|
|
133
|
-
java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement addEntitlement(Java::java.util.UUID, Java::org.killbill.billing.catalog.api.PlanPhaseSpecifier, Java::java.util.List, Java::org.joda.time.LocalDate, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
134
|
-
def add_entitlement(bundleId, spec, overrides,
|
149
|
+
java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement addEntitlement(Java::java.util.UUID, Java::org.killbill.billing.catalog.api.PlanPhaseSpecifier, Java::java.util.List, Java::org.joda.time.LocalDate, Java::org.joda.time.LocalDate, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
150
|
+
def add_entitlement(bundleId, spec, overrides, entitlementEffectiveDate, billingEffectiveDate, isMigrated, properties, context)
|
135
151
|
|
136
152
|
# conversion for bundleId [type = java.util.UUID]
|
137
153
|
bundleId = java.util.UUID.fromString(bundleId.to_s) unless bundleId.nil?
|
@@ -148,11 +164,19 @@ module Killbill
|
|
148
164
|
end
|
149
165
|
overrides = tmp
|
150
166
|
|
151
|
-
# conversion for
|
152
|
-
if !
|
153
|
-
|
167
|
+
# conversion for entitlementEffectiveDate [type = org.joda.time.LocalDate]
|
168
|
+
if !entitlementEffectiveDate.nil?
|
169
|
+
entitlementEffectiveDate = Java::org.joda.time.LocalDate.parse(entitlementEffectiveDate.to_s)
|
170
|
+
end
|
171
|
+
|
172
|
+
# conversion for billingEffectiveDate [type = org.joda.time.LocalDate]
|
173
|
+
if !billingEffectiveDate.nil?
|
174
|
+
billingEffectiveDate = Java::org.joda.time.LocalDate.parse(billingEffectiveDate.to_s)
|
154
175
|
end
|
155
176
|
|
177
|
+
# conversion for isMigrated [type = boolean]
|
178
|
+
isMigrated = isMigrated.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(isMigrated)
|
179
|
+
|
156
180
|
# conversion for properties [type = java.lang.Iterable]
|
157
181
|
tmp = java.util.ArrayList.new
|
158
182
|
(properties || []).each do |m|
|
@@ -165,7 +189,7 @@ module Killbill
|
|
165
189
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
166
190
|
context = context.to_java unless context.nil?
|
167
191
|
begin
|
168
|
-
res = @real_java_api.add_entitlement(bundleId, spec, overrides,
|
192
|
+
res = @real_java_api.add_entitlement(bundleId, spec, overrides, entitlementEffectiveDate, billingEffectiveDate, isMigrated, properties, context)
|
169
193
|
# conversion for res [type = org.killbill.billing.entitlement.api.Entitlement]
|
170
194
|
res = Killbill::Plugin::Model::Entitlement.new.to_ruby(res) unless res.nil?
|
171
195
|
return res
|
@@ -256,72 +280,6 @@ module Killbill
|
|
256
280
|
@real_java_api.resume(bundleId, effectiveDate, properties, context)
|
257
281
|
end
|
258
282
|
|
259
|
-
java_signature 'Java::void setBlockingState(Java::java.util.UUID, Java::java.lang.String, Java::java.lang.String, Java::org.joda.time.LocalDate, Java::boolean, Java::boolean, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
260
|
-
def set_blocking_state(bundleId, stateName, serviceName, effectiveDate, blockBilling, blockEntitlement, blockChange, properties, context)
|
261
|
-
|
262
|
-
# conversion for bundleId [type = java.util.UUID]
|
263
|
-
bundleId = java.util.UUID.fromString(bundleId.to_s) unless bundleId.nil?
|
264
|
-
|
265
|
-
# conversion for stateName [type = java.lang.String]
|
266
|
-
stateName = stateName.to_s unless stateName.nil?
|
267
|
-
|
268
|
-
# conversion for serviceName [type = java.lang.String]
|
269
|
-
serviceName = serviceName.to_s unless serviceName.nil?
|
270
|
-
|
271
|
-
# conversion for effectiveDate [type = org.joda.time.LocalDate]
|
272
|
-
if !effectiveDate.nil?
|
273
|
-
effectiveDate = Java::org.joda.time.LocalDate.parse(effectiveDate.to_s)
|
274
|
-
end
|
275
|
-
|
276
|
-
# conversion for blockBilling [type = boolean]
|
277
|
-
blockBilling = blockBilling.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(blockBilling)
|
278
|
-
|
279
|
-
# conversion for blockEntitlement [type = boolean]
|
280
|
-
blockEntitlement = blockEntitlement.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(blockEntitlement)
|
281
|
-
|
282
|
-
# conversion for blockChange [type = boolean]
|
283
|
-
blockChange = blockChange.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(blockChange)
|
284
|
-
|
285
|
-
# conversion for properties [type = java.lang.Iterable]
|
286
|
-
tmp = java.util.ArrayList.new
|
287
|
-
(properties || []).each do |m|
|
288
|
-
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
289
|
-
m = m.to_java unless m.nil?
|
290
|
-
tmp.add(m)
|
291
|
-
end
|
292
|
-
properties = tmp
|
293
|
-
|
294
|
-
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
295
|
-
context = context.to_java unless context.nil?
|
296
|
-
@real_java_api.set_blocking_state(bundleId, stateName, serviceName, effectiveDate, blockBilling, blockEntitlement, blockChange, properties, context)
|
297
|
-
end
|
298
|
-
|
299
|
-
java_signature 'Java::java.lang.Iterable getBlockingStatesForServiceAndType(Java::java.util.UUID, Java::org.killbill.billing.entitlement.api.BlockingStateType, Java::java.lang.String, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
300
|
-
def get_blocking_states_for_service_and_type(blockableId, type, serviceName, context)
|
301
|
-
|
302
|
-
# conversion for blockableId [type = java.util.UUID]
|
303
|
-
blockableId = java.util.UUID.fromString(blockableId.to_s) unless blockableId.nil?
|
304
|
-
|
305
|
-
# conversion for type [type = org.killbill.billing.entitlement.api.BlockingStateType]
|
306
|
-
type = Java::org.killbill.billing.entitlement.api.BlockingStateType.value_of( type.to_s ) unless type.nil?
|
307
|
-
|
308
|
-
# conversion for serviceName [type = java.lang.String]
|
309
|
-
serviceName = serviceName.to_s unless serviceName.nil?
|
310
|
-
|
311
|
-
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
312
|
-
context = context.to_java unless context.nil?
|
313
|
-
res = @real_java_api.get_blocking_states_for_service_and_type(blockableId, type, serviceName, context)
|
314
|
-
# conversion for res [type = java.lang.Iterable]
|
315
|
-
tmp = []
|
316
|
-
(res.nil? ? [] : res.iterator).each do |m|
|
317
|
-
# conversion for m [type = org.killbill.billing.entitlement.api.BlockingState]
|
318
|
-
m = Killbill::Plugin::Model::BlockingState.new.to_ruby(m) unless m.nil?
|
319
|
-
tmp << m
|
320
|
-
end
|
321
|
-
res = tmp
|
322
|
-
return res
|
323
|
-
end
|
324
|
-
|
325
283
|
java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement getEntitlementForId(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
326
284
|
def get_entitlement_for_id(id, context)
|
327
285
|
|