killbill 9.3.0 → 9.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +138 -0
  3. data/Gemfile.lock +1 -1
  4. data/Jarfile +10 -10
  5. data/Jarfile.lock +23 -23
  6. data/NEWS +9 -0
  7. data/lib/killbill.rb +1 -1
  8. data/lib/killbill/gen/api/account_user_api.rb +54 -0
  9. data/lib/killbill/gen/api/audit_log_with_history.rb +138 -0
  10. data/lib/killbill/gen/api/custom_field_user_api.rb +23 -0
  11. data/lib/killbill/gen/api/dry_run_arguments.rb +6 -25
  12. data/lib/killbill/gen/api/entitlement_api.rb +8 -26
  13. data/lib/killbill/gen/api/entitlement_specifier.rb +7 -1
  14. data/lib/killbill/gen/api/health_status.rb +78 -0
  15. data/lib/killbill/gen/api/healthcheck.rb +53 -0
  16. data/lib/killbill/gen/api/invoice_item.rb +13 -1
  17. data/lib/killbill/gen/api/invoice_item_formatter.rb +13 -1
  18. data/lib/killbill/gen/api/invoice_payment_api.rb +224 -30
  19. data/lib/killbill/gen/api/invoice_user_api.rb +145 -18
  20. data/lib/killbill/gen/api/osgi_killbill.rb +2 -2
  21. data/lib/killbill/gen/api/payment_api.rb +125 -0
  22. data/lib/killbill/gen/api/plugin_config.rb +19 -0
  23. data/lib/killbill/gen/api/require_gen.rb +4 -8
  24. data/lib/killbill/gen/api/security_api.rb +12 -8
  25. data/lib/killbill/gen/api/tag_user_api.rb +46 -0
  26. data/lib/killbill/gen/plugin-api/invoice_notification_metadata.rb +81 -0
  27. data/lib/killbill/gen/plugin-api/require_gen.rb +1 -0
  28. data/lib/killbill/helpers/active_merchant/active_record/models/response.rb +16 -5
  29. data/lib/killbill/version.rb +1 -1
  30. data/spec/killbill/helpers/response_spec.rb +7 -0
  31. data/spec/killbill/helpers/test_response.rb +4 -0
  32. metadata +9 -36
  33. data/.travis.yml +0 -51
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f792398bebc46bf5fc46925984d03c3796640d5b
4
- data.tar.gz: 4643f8197e2bcd4d57e5d5062e5cb031826ca189
3
+ metadata.gz: 31aa112d1ade62f882eede6cc5f0eb88077b6117
4
+ data.tar.gz: d43acb60672d1a35c71c43b1b6e3ebdfda8bbdaf
5
5
  SHA512:
6
- metadata.gz: d79e973bfbf6cd6f76617025ee4389c5dae15827d26588e5e9238a8734f6c5b45b300f00c7ff3f081eddcec416125095164d4c925335f2d9ca4d6baf199c4b00
7
- data.tar.gz: d1fc0f8636fa22ec975c9b8be4af48b5cacc3d017dcfc7c2c44f462f5fbd35b750a36dab71b28d8dee0042194c803e0a5795102d5b1c042371390eac96b5a5d2
6
+ metadata.gz: e5ba510b62be85d80ef9affd4200a9fb2132270ba355296de73f8bd41d797ebb7105a56f2b6d14008a0dde7569a9ab6f785c3308633be5615528092dbf4d7c06
7
+ data.tar.gz: 852c459d01880b8c8e5d294a408c1db0583f8936029b99bacb344157411a7a034791d5a73bb91093a9e690bb5ecdbaf7049d6d38ca9691f743be4e7eba55a0f2
@@ -0,0 +1,138 @@
1
+ defaults: &defaults
2
+ working_directory: ~/repo
3
+ environment:
4
+ JRUBY_OPTS: -J-Xmx1024M
5
+
6
+ version: 2
7
+ jobs:
8
+ build-jruby-1.7.26:
9
+ <<: *defaults
10
+ docker:
11
+ - image: killbill/kbbuild:0.5.0
12
+ steps:
13
+ - checkout
14
+ - restore_cache:
15
+ key: v4-dependencies-jruby-1.7.26-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
16
+ - run:
17
+ name: Install gem dependencies
18
+ command: |
19
+ bundle install --jobs=4 --retry=3 --path=vendor/bundle
20
+ bundle exec jbundle install
21
+ - save_cache:
22
+ paths:
23
+ - ~/.m2
24
+ - .bundle
25
+ - .jbundler
26
+ - vendor/bundle
27
+ key: v4-dependencies-jruby-1.7.26-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
28
+
29
+ test-mysql-jruby-1.7.26:
30
+ <<: *defaults
31
+ docker:
32
+ - image: killbill/kbbuild:0.5.0
33
+ - image: killbill/mariadb:0.19
34
+ environment:
35
+ - MYSQL_ROOT_PASSWORD=root
36
+ steps:
37
+ - checkout
38
+ - restore_cache:
39
+ key: v4-dependencies-jruby-1.7.26-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
40
+ - run:
41
+ name: Setup DDL
42
+ command: |
43
+ set +e
44
+ count=0
45
+ until mysqladmin ping -h 127.0.0.1 -u root --password=root --silent; do
46
+ if [[ "$count" == "25" ]]; then
47
+ exit 1
48
+ fi
49
+ (( count++ ))
50
+ printf '.'
51
+ sleep 5
52
+ done
53
+ set -e
54
+ mysql -h 127.0.0.1 -u root --password=root -e 'create database killbill_test;'
55
+ - run:
56
+ name: Run tests
57
+ command: |
58
+ mkdir /tmp/test-results
59
+ AR_ADAPTER='mariadb' AR_USERNAME='root' AR_PASSWORD='' AR_DATABASE='killbill_test' bundle exec rake test:spec | tee /tmp/test-results/test.txt 2>&1
60
+ AR_ADAPTER='mariadb' AR_USERNAME='root' AR_PASSWORD='' AR_DATABASE='killbill_test' bundle exec rake test:remote:spec | tee /tmp/test-results/remote-test.txt 2>&1
61
+ - store_test_results:
62
+ path: /tmp/test-results
63
+ - store_artifacts:
64
+ path: /tmp/test-results
65
+ destination: test-results
66
+
67
+ test-postgresql-jruby-1.7.26:
68
+ <<: *defaults
69
+ docker:
70
+ - image: killbill/kbbuild:0.5.0
71
+ - image: killbill/postgresql:0.19
72
+ environment:
73
+ - POSTGRES_PASSWORD=postgres
74
+ steps:
75
+ - checkout
76
+ - restore_cache:
77
+ key: v4-dependencies-jruby-1.7.26-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
78
+ - run:
79
+ name: Setup DDL
80
+ command: |
81
+ set +e
82
+ count=0
83
+ until $(psql -h 127.0.0.1 -U postgres -p 5432 -l > /dev/null); do
84
+ if [[ "$count" == "25" ]]; then
85
+ exit 1
86
+ fi
87
+ (( count++ ))
88
+ printf '.'
89
+ sleep 5
90
+ done
91
+ set -e
92
+ psql -h 127.0.0.1 -U postgres -p 5432 -c 'create database killbill_test;'
93
+ - run:
94
+ name: Run tests
95
+ command: |
96
+ mkdir /tmp/test-results
97
+ AR_ADAPTER='postgresql' AR_USERNAME='postgres' AR_DATABASE='killbill_test' bundle exec rake test:spec | tee /tmp/test-results/test.txt 2>&1
98
+ AR_ADAPTER='postgresql' AR_USERNAME='postgres' AR_DATABASE='killbill_test' bundle exec rake test:remote:spec | tee /tmp/test-results/remote-test.txt 2>&1
99
+ - store_test_results:
100
+ path: /tmp/test-results
101
+ - store_artifacts:
102
+ path: /tmp/test-results
103
+ destination: test-results
104
+
105
+ test-h2-jruby-1.7.26:
106
+ <<: *defaults
107
+ docker:
108
+ - image: killbill/kbbuild:0.5.0
109
+ steps:
110
+ - checkout
111
+ - restore_cache:
112
+ key: v4-dependencies-jruby-1.7.26-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
113
+ - run:
114
+ name: Run tests
115
+ command: |
116
+ mkdir /tmp/test-results
117
+ AR_ADAPTER='sqlite3' AR_DATABASE='test.db' bundle exec rake test:spec | tee /tmp/test-results/test.txt 2>&1
118
+ AR_ADAPTER='sqlite3' AR_DATABASE='test.db' bundle exec rake test:remote:spec | tee /tmp/test-results/remote-test.txt 2>&1
119
+ - store_test_results:
120
+ path: /tmp/test-results
121
+ - store_artifacts:
122
+ path: /tmp/test-results
123
+ destination: test-results
124
+
125
+ workflows:
126
+ version: 2
127
+ build-and-test:
128
+ jobs:
129
+ - build-jruby-1.7.26
130
+ #- test-mysql-jruby-1.7.26:
131
+ # requires:
132
+ # - build-jruby-1.7.26
133
+ - test-postgresql-jruby-1.7.26:
134
+ requires:
135
+ - build-jruby-1.7.26
136
+ - test-h2-jruby-1.7.26:
137
+ requires:
138
+ - build-jruby-1.7.26
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- killbill (9.3.0)
4
+ killbill (9.3.1)
5
5
  rack (>= 1.5.2)
6
6
  sinatra (~> 1.3.4)
7
7
  typhoeus (~> 0.6.9)
data/Jarfile CHANGED
@@ -1,12 +1,12 @@
1
- jar 'org.kill-bill.billing:killbill-api', '0.51.16'
2
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.24.7'
3
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-invoice', '0.24.7'
4
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.24.7'
5
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.24.7'
6
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-control', '0.24.7'
7
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-catalog', '0.24.7'
8
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-entitlement', '0.24.7'
9
- jar 'org.kill-bill.billing:killbill-util:tests', '0.19.10'
10
- jar 'org.kill-bill.billing:killbill-util', '0.19.10'
1
+ jar 'org.kill-bill.billing:killbill-api', '0.51.25'
2
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.24.8'
3
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-invoice', '0.24.8'
4
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.24.8'
5
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.24.8'
6
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-control', '0.24.8'
7
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-catalog', '0.24.8'
8
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-entitlement', '0.24.8'
9
+ jar 'org.kill-bill.billing:killbill-util:tests', '0.19.16'
10
+ jar 'org.kill-bill.billing:killbill-util', '0.19.16'
11
11
  jar 'org.mockito:mockito-all', '1.10.19'
12
12
  jar 'javax.servlet:javax.servlet-api', '3.1.0'
@@ -2,69 +2,69 @@
2
2
  :runtime:
3
3
  - com.zaxxer:HikariCP-java6:jar:2.3.13
4
4
  - net.jcip:jcip-annotations:jar:1.0
5
- - org.kill-bill.billing:killbill-util:jar:tests:0.19.10
6
- - org.kill-bill.billing:killbill-platform-api:jar:0.37.13
7
5
  - com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.6.7
8
6
  - org.skife.config:config-magic:jar:0.17
9
7
  - org.weakref:jmxutils:jar:1.19
8
+ - org.kill-bill.commons:killbill-locker:jar:0.21.13
10
9
  - aopalliance:aopalliance:jar:1.0
11
10
  - org.osgi:org.osgi.core:jar:5.0.0
12
11
  - com.ning:async-http-client:jar:1.9.40
13
- - org.kill-bill.billing:killbill-platform-base:jar:0.37.13
14
- - org.kill-bill.commons:killbill-embeddeddb-common:jar:0.21.10
15
- - org.kill-bill.commons:killbill-locker:jar:0.21.10
16
- - org.kill-bill.billing.plugin:killbill-plugin-api-catalog:jar:0.24.7
17
12
  - org.joda:joda-money:jar:0.9
18
13
  - org.ehcache.integrations.shiro:shiro-ehcache3:jar:1.0.0
19
- - org.kill-bill.billing:killbill-platform-osgi-api:jar:0.37.13
20
14
  - com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.6.7
15
+ - org.kill-bill.commons:killbill-embeddeddb-common:jar:0.21.13
21
16
  - com.fasterxml:classmate:jar:1.1.0
22
17
  - org.slf4j:jcl-over-slf4j:jar:1.7.25
18
+ - org.kill-bill.commons:killbill-queue:jar:0.21.13
19
+ - org.kill-bill.commons:killbill-xmlloader:jar:0.21.13
23
20
  - com.google.inject:guice:jar:3.0
24
21
  - io.netty:netty:jar:3.10.6.Final
22
+ - org.kill-bill.commons:killbill-jdbi:jar:0.21.13
25
23
  - org.apache.felix:org.apache.felix.framework:jar:4.4.1
26
24
  - org.ehcache:ehcache-clustered:jar:3.3.1
27
- - org.kill-bill.billing.plugin:killbill-plugin-api-notification:jar:0.24.7
28
25
  - com.google.code.findbugs:jsr305:jar:3.0.1
26
+ - org.kill-bill.billing:killbill-internal-api:jar:0.19.16
29
27
  - com.google.guava:guava:jar:20.0
30
28
  - com.samskivert:jmustache:jar:1.5
29
+ - org.kill-bill.billing:killbill-platform-base:jar:0.37.14
30
+ - org.kill-bill.billing.plugin:killbill-plugin-api-currency:jar:0.24.8
31
+ - org.kill-bill.billing.plugin:killbill-plugin-api-entitlement:jar:0.24.8
32
+ - org.kill-bill.billing:killbill-platform-osgi-api:jar:0.37.14
31
33
  - javax.cache:cache-api:jar:1.0.0
32
- - org.kill-bill.billing.plugin:killbill-plugin-api-invoice:jar:0.24.7
33
- - org.kill-bill.billing.plugin:killbill-plugin-api-payment:jar:0.24.7
34
- - org.kill-bill.commons:killbill-xmlloader:jar:0.21.10
35
34
  - org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:jar:1.16
36
35
  - com.fasterxml.jackson.core:jackson-annotations:jar:2.6.7
37
36
  - org.apache.shiro:shiro-core:jar:1.3.2
38
37
  - org.ow2.asm:asm:jar:5.0.3
39
38
  - com.fasterxml.jackson.core:jackson-databind:jar:2.6.7
40
- - org.kill-bill.commons:killbill-clock:jar:0.21.10
41
39
  - com.google.code.findbugs:annotations:jar:3.0.1u2
42
- - org.kill-bill.billing:killbill-internal-api:jar:0.19.10
43
- - org.kill-bill.billing:killbill-platform-lifecycle:jar:0.37.13
44
- - org.kill-bill.commons:killbill-queue:jar:0.21.10
45
- - org.kill-bill.billing.plugin:killbill-plugin-api-control:jar:0.24.7
46
- - org.kill-bill.commons:killbill-jdbi:jar:0.21.10
47
- - org.kill-bill.billing.plugin:killbill-plugin-api-entitlement:jar:0.24.7
40
+ - org.kill-bill.billing:killbill-api:jar:0.51.25
41
+ - org.kill-bill.billing.plugin:killbill-plugin-api-invoice:jar:0.24.8
42
+ - org.kill-bill.billing.plugin:killbill-plugin-api-notification:jar:0.24.8
43
+ - org.kill-bill.commons:killbill-concurrent:jar:0.21.13
44
+ - org.kill-bill.billing:killbill-util:jar:0.19.16
45
+ - org.kill-bill.billing:killbill-platform-osgi:jar:0.37.14
46
+ - org.kill-bill.billing.plugin:killbill-plugin-api-payment:jar:0.24.8
48
47
  - org.antlr:ST4:jar:4.0.8
49
48
  - org.apache.shiro:shiro-guice:jar:1.3.2
50
49
  - org.antlr:antlr-runtime:jar:3.5.2
51
50
  - org.ehcache:ehcache:jar:3.3.1
51
+ - org.kill-bill.billing:killbill-platform-api:jar:0.37.14
52
52
  - io.dropwizard.metrics:metrics-jcache:jar:3.2.2
53
53
  - com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.6.7
54
54
  - com.google.inject.extensions:guice-multibindings:jar:3.0
55
55
  - joda-time:joda-time:jar:2.9.9
56
56
  - javax.inject:javax.inject:jar:1
57
- - org.kill-bill.billing:killbill-api:jar:0.51.16
58
- - org.kill-bill.commons:killbill-concurrent:jar:0.21.10
57
+ - org.kill-bill.billing:killbill-util:jar:tests:0.19.16
59
58
  - com.h2database:h2:jar:1.4.194
60
59
  - commons-beanutils:commons-beanutils:jar:1.8.3
61
60
  - javax.servlet:javax.servlet-api:jar:3.1.0
62
61
  - com.fasterxml.jackson.core:jackson-core:jar:2.6.7
63
62
  - cglib:cglib:jar:3.1
64
63
  - io.dropwizard.metrics:metrics-core:jar:3.2.2
65
- - org.kill-bill.billing:killbill-platform-osgi:jar:0.37.13
66
- - org.kill-bill.billing.plugin:killbill-plugin-api-currency:jar:0.24.7
64
+ - org.kill-bill.billing:killbill-platform-lifecycle:jar:0.37.14
67
65
  - org.slf4j:slf4j-api:jar:1.7.25
68
- - org.kill-bill.billing:killbill-util:jar:0.19.10
69
66
  - org.mockito:mockito-all:jar:1.10.19
67
+ - org.kill-bill.billing.plugin:killbill-plugin-api-control:jar:0.24.8
70
68
  - org.osgi:org.osgi.compendium:jar:5.0.0
69
+ - org.kill-bill.billing.plugin:killbill-plugin-api-catalog:jar:0.24.8
70
+ - org.kill-bill.commons:killbill-clock:jar:0.21.13
data/NEWS CHANGED
@@ -1,3 +1,9 @@
1
+ 9.3.1
2
+ Update to Kill Bill 0.19.17 APIs
3
+
4
+ 9.3.0
5
+ Update to Kill Bill latest 0.19.x APIs
6
+
1
7
  9.2.2
2
8
  Release for Kill Bill 0.19.7
3
9
  ActiveMerchant: pass in extra_params to gateway api calls
@@ -8,6 +14,9 @@
8
14
  9.2.0
9
15
  Initial release for Kill Bill 0.19.x
10
16
 
17
+ 8.3.5
18
+ ActiveMerchant: add utility function to avoid persisting sensitive data (GDPR)
19
+
11
20
  8.3.4
12
21
  ActiveMerchant: pass in extra_params to gateway api calls
13
22
 
@@ -26,8 +26,8 @@ begin
26
26
  org.killbill.billing.currency.api.CurrencyConversionApi
27
27
  org.killbill.billing.entitlement.api.EntitlementApi
28
28
  org.killbill.billing.entitlement.api.SubscriptionApi
29
- org.killbill.billing.invoice.api.InvoicePaymentApi
30
29
  org.killbill.billing.invoice.api.InvoiceUserApi
30
+ org.killbill.billing.payment.api.InvoicePaymentApi
31
31
  org.killbill.billing.payment.api.PaymentApi
32
32
  org.killbill.billing.payment.api.PaymentGatewayApi
33
33
  org.killbill.billing.tenant.api.TenantUserApi
@@ -230,6 +230,60 @@ module Killbill
230
230
  raise Killbill::Plugin::Model::AccountApiException.new.to_ruby(e)
231
231
  end
232
232
  end
233
+
234
+ java_signature 'Java::java.util.List getAuditLogsWithHistoryForId(Java::java.util.UUID, Java::org.killbill.billing.util.api.AuditLevel, Java::org.killbill.billing.util.callcontext.TenantContext)'
235
+ def get_audit_logs_with_history_for_id(accountId, auditLevel, context)
236
+
237
+ # conversion for accountId [type = java.util.UUID]
238
+ accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
239
+
240
+ # conversion for auditLevel [type = org.killbill.billing.util.api.AuditLevel]
241
+ auditLevel = Java::org.killbill.billing.util.api.AuditLevel.value_of( auditLevel.to_s ) unless auditLevel.nil?
242
+
243
+ # conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
244
+ context = context.to_java unless context.nil?
245
+ begin
246
+ res = @real_java_api.get_audit_logs_with_history_for_id(accountId, auditLevel, context)
247
+ # conversion for res [type = java.util.List]
248
+ tmp = []
249
+ (res || []).each do |m|
250
+ # conversion for m [type = org.killbill.billing.util.audit.AuditLogWithHistory]
251
+ m = Killbill::Plugin::Model::AuditLogWithHistory.new.to_ruby(m) unless m.nil?
252
+ tmp << m
253
+ end
254
+ res = tmp
255
+ return res
256
+ rescue Java::org.killbill.billing.account.api.AccountApiException => e
257
+ raise Killbill::Plugin::Model::AccountApiException.new.to_ruby(e)
258
+ end
259
+ end
260
+
261
+ java_signature 'Java::java.util.List getEmailAuditLogsWithHistoryForId(Java::java.util.UUID, Java::org.killbill.billing.util.api.AuditLevel, Java::org.killbill.billing.util.callcontext.TenantContext)'
262
+ def get_email_audit_logs_with_history_for_id(accountEmailId, auditLevel, context)
263
+
264
+ # conversion for accountEmailId [type = java.util.UUID]
265
+ accountEmailId = java.util.UUID.fromString(accountEmailId.to_s) unless accountEmailId.nil?
266
+
267
+ # conversion for auditLevel [type = org.killbill.billing.util.api.AuditLevel]
268
+ auditLevel = Java::org.killbill.billing.util.api.AuditLevel.value_of( auditLevel.to_s ) unless auditLevel.nil?
269
+
270
+ # conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
271
+ context = context.to_java unless context.nil?
272
+ begin
273
+ res = @real_java_api.get_email_audit_logs_with_history_for_id(accountEmailId, auditLevel, context)
274
+ # conversion for res [type = java.util.List]
275
+ tmp = []
276
+ (res || []).each do |m|
277
+ # conversion for m [type = org.killbill.billing.util.audit.AuditLogWithHistory]
278
+ m = Killbill::Plugin::Model::AuditLogWithHistory.new.to_ruby(m) unless m.nil?
279
+ tmp << m
280
+ end
281
+ res = tmp
282
+ return res
283
+ rescue Java::org.killbill.billing.account.api.AccountApiException => e
284
+ raise Killbill::Plugin::Model::AccountApiException.new.to_ruby(e)
285
+ end
286
+ end
233
287
  end
234
288
  end
235
289
  end
@@ -0,0 +1,138 @@
1
+ #############################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # Copyright 2014 Groupon, Inc. #
5
+ # Copyright 2014 The Billing Project, LLC #
6
+ # #
7
+ # The Billing Project licenses this file to you under the Apache License, version 2.0 #
8
+ # (the "License"); you may not use this file except in compliance with the #
9
+ # License. You may obtain a copy of the License at: #
10
+ # #
11
+ # http://www.apache.org/licenses/LICENSE-2.0 #
12
+ # #
13
+ # Unless required by applicable law or agreed to in writing, software #
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
16
+ # License for the specific language governing permissions and limitations #
17
+ # under the License. #
18
+ # #
19
+ #############################################################################################
20
+
21
+
22
+ #
23
+ # DO NOT EDIT!!!
24
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
25
+ #
26
+
27
+
28
+ module Killbill
29
+ module Plugin
30
+ module Model
31
+
32
+ java_package 'org.killbill.billing.util.audit'
33
+ class AuditLogWithHistory
34
+
35
+ include org.killbill.billing.util.audit.AuditLogWithHistory
36
+
37
+ attr_accessor :audited_entity_id, :audited_object_type, :change_type, :user_name, :created_date, :reason_code, :user_token, :comment, :id, :updated_date, :entity
38
+
39
+ def initialize()
40
+ end
41
+
42
+ def to_java()
43
+ # conversion for audited_entity_id [type = java.util.UUID]
44
+ @audited_entity_id = java.util.UUID.fromString(@audited_entity_id.to_s) unless @audited_entity_id.nil?
45
+
46
+ # conversion for audited_object_type [type = org.killbill.billing.ObjectType]
47
+ @audited_object_type = Java::org.killbill.billing.ObjectType.value_of( @audited_object_type.to_s ) unless @audited_object_type.nil?
48
+
49
+ # conversion for change_type [type = org.killbill.billing.util.audit.ChangeType]
50
+ @change_type = Java::org.killbill.billing.util.audit.ChangeType.value_of( @change_type.to_s ) unless @change_type.nil?
51
+
52
+ # conversion for user_name [type = java.lang.String]
53
+ @user_name = @user_name.to_s unless @user_name.nil?
54
+
55
+ # conversion for created_date [type = org.joda.time.DateTime]
56
+ if !@created_date.nil?
57
+ @created_date = (@created_date.kind_of? Time) ? DateTime.parse(@created_date.to_s) : @created_date
58
+ @created_date = Java::org.joda.time.DateTime.new(@created_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
59
+ end
60
+
61
+ # conversion for reason_code [type = java.lang.String]
62
+ @reason_code = @reason_code.to_s unless @reason_code.nil?
63
+
64
+ # conversion for user_token [type = java.lang.String]
65
+ @user_token = @user_token.to_s unless @user_token.nil?
66
+
67
+ # conversion for comment [type = java.lang.String]
68
+ @comment = @comment.to_s unless @comment.nil?
69
+
70
+ # conversion for id [type = java.util.UUID]
71
+ @id = java.util.UUID.fromString(@id.to_s) unless @id.nil?
72
+
73
+ # conversion for updated_date [type = org.joda.time.DateTime]
74
+ if !@updated_date.nil?
75
+ @updated_date = (@updated_date.kind_of? Time) ? DateTime.parse(@updated_date.to_s) : @updated_date
76
+ @updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
77
+ end
78
+
79
+ # conversion for entity [type = org.killbill.billing.util.entity.Entity]
80
+ @entity = @entity.to_java unless @entity.nil?
81
+ self
82
+ end
83
+
84
+ def to_ruby(j_obj)
85
+ # conversion for audited_entity_id [type = java.util.UUID]
86
+ @audited_entity_id = j_obj.audited_entity_id
87
+ @audited_entity_id = @audited_entity_id.nil? ? nil : @audited_entity_id.to_s
88
+
89
+ # conversion for audited_object_type [type = org.killbill.billing.ObjectType]
90
+ @audited_object_type = j_obj.audited_object_type
91
+ @audited_object_type = @audited_object_type.to_s.to_sym unless @audited_object_type.nil?
92
+
93
+ # conversion for change_type [type = org.killbill.billing.util.audit.ChangeType]
94
+ @change_type = j_obj.change_type
95
+ @change_type = @change_type.to_s.to_sym unless @change_type.nil?
96
+
97
+ # conversion for user_name [type = java.lang.String]
98
+ @user_name = j_obj.user_name
99
+
100
+ # conversion for created_date [type = org.joda.time.DateTime]
101
+ @created_date = j_obj.created_date
102
+ if !@created_date.nil?
103
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3
104
+ str = fmt.print(@created_date)
105
+ @created_date = DateTime.iso8601(str)
106
+ end
107
+
108
+ # conversion for reason_code [type = java.lang.String]
109
+ @reason_code = j_obj.reason_code
110
+
111
+ # conversion for user_token [type = java.lang.String]
112
+ @user_token = j_obj.user_token
113
+
114
+ # conversion for comment [type = java.lang.String]
115
+ @comment = j_obj.comment
116
+
117
+ # conversion for id [type = java.util.UUID]
118
+ @id = j_obj.id
119
+ @id = @id.nil? ? nil : @id.to_s
120
+
121
+ # conversion for updated_date [type = org.joda.time.DateTime]
122
+ @updated_date = j_obj.updated_date
123
+ if !@updated_date.nil?
124
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3
125
+ str = fmt.print(@updated_date)
126
+ @updated_date = DateTime.iso8601(str)
127
+ end
128
+
129
+ # conversion for entity [type = org.killbill.billing.util.entity.Entity]
130
+ @entity = j_obj.entity
131
+ @entity = Killbill::Plugin::Model::Entity.new.to_ruby(@entity) unless @entity.nil?
132
+ self
133
+ end
134
+
135
+ end
136
+ end
137
+ end
138
+ end