killbill 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/Jarfile CHANGED
@@ -1,5 +1,5 @@
1
- jar 'com.ning.billing:killbill-api', '0.3.2'
2
- jar 'com.ning.billing.plugin:killbill-plugin-api-notification', '0.2.4'
3
- jar 'com.ning.billing.plugin:killbill-plugin-api-payment', '0.2.4'
4
- jar 'com.ning.billing:killbill-util:tests', '0.3.4'
1
+ jar 'com.ning.billing:killbill-api', '0.4.0'
2
+ jar 'com.ning.billing.plugin:killbill-plugin-api-notification', '0.3.0'
3
+ jar 'com.ning.billing.plugin:killbill-plugin-api-payment', '0.3.0'
4
+ jar 'com.ning.billing:killbill-util:tests', '0.3.6'
5
5
  jar 'javax.servlet:javax.servlet-api', '3.0.1'
data/NEWS ADDED
@@ -0,0 +1,2 @@
1
+ 1.4.0
2
+ Add search APIs
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.4.0
data/gen_config/api.conf CHANGED
@@ -23,6 +23,9 @@ com.ning.billing.osgi.api,
23
23
  com.ning.billing.osgi.api.config,
24
24
  com.ning.billing.payment,
25
25
  com.ning.billing.payment.api,
26
+ com.ning.billing.subscription,
27
+ com.ning.billing.subscription.api,
28
+ com.ning.billing.subscription.api.user,
26
29
  com.ning.billing.tenant,
27
30
  com.ning.billing.tenant.api,
28
31
  com.ning.billing.usage,
@@ -102,6 +102,26 @@ module Killbill
102
102
  end
103
103
  end
104
104
 
105
+ java_signature 'Java::java.util.List searchAccounts(Java::java.lang.String, Java::com.ning.billing.util.callcontext.TenantContext)'
106
+ def search_accounts(searchKey, context)
107
+
108
+ # conversion for searchKey [type = java.lang.String]
109
+ searchKey = searchKey.to_s unless searchKey.nil?
110
+
111
+ # conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
112
+ context = context.to_java unless context.nil?
113
+ res = @real_java_api.search_accounts(searchKey, context)
114
+ # conversion for res [type = java.util.List]
115
+ tmp = []
116
+ (res || []).each do |m|
117
+ # conversion for m [type = com.ning.billing.account.api.Account]
118
+ m = Killbill::Plugin::Model::Account.new.to_ruby(m) unless m.nil?
119
+ tmp << m
120
+ end
121
+ res = tmp
122
+ return res
123
+ end
124
+
105
125
  java_signature 'Java::java.util.List getAccounts(Java::com.ning.billing.util.callcontext.TenantContext)'
106
126
  def get_accounts(context)
107
127
 
@@ -429,6 +429,26 @@ module Killbill
429
429
  end
430
430
  end
431
431
 
432
+ java_signature 'Java::java.util.List searchPaymentMethods(Java::java.lang.String, Java::com.ning.billing.util.callcontext.TenantContext)'
433
+ def search_payment_methods(searchKey, context)
434
+
435
+ # conversion for searchKey [type = java.lang.String]
436
+ searchKey = searchKey.to_s unless searchKey.nil?
437
+
438
+ # conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
439
+ context = context.to_java unless context.nil?
440
+ res = @real_java_api.search_payment_methods(searchKey, context)
441
+ # conversion for res [type = java.util.List]
442
+ tmp = []
443
+ (res || []).each do |m|
444
+ # conversion for m [type = com.ning.billing.payment.api.PaymentMethod]
445
+ m = Killbill::Plugin::Model::PaymentMethod.new.to_ruby(m) unless m.nil?
446
+ tmp << m
447
+ end
448
+ res = tmp
449
+ return res
450
+ end
451
+
432
452
  java_signature 'Java::void deletedPaymentMethod(Java::com.ning.billing.account.api.Account, Java::java.util.UUID, Java::boolean, Java::com.ning.billing.util.callcontext.CallContext)'
433
453
  def deleted_payment_method(account, paymentMethodId, deleteDefaultPaymentMethodWithAutoPayOff, context)
434
454
 
@@ -32,12 +32,15 @@ module Killbill
32
32
 
33
33
  include com.ning.billing.payment.api.PaymentMethodPlugin
34
34
 
35
- attr_accessor :external_payment_method_id, :is_default_payment_method, :properties, :type, :cc_name, :cc_type, :cc_expiration_month, :cc_expiration_year, :cc_last4, :address1, :address2, :city, :state, :zip, :country
35
+ attr_accessor :kb_payment_method_id, :external_payment_method_id, :is_default_payment_method, :properties, :type, :cc_name, :cc_type, :cc_expiration_month, :cc_expiration_year, :cc_last4, :address1, :address2, :city, :state, :zip, :country
36
36
 
37
37
  def initialize()
38
38
  end
39
39
 
40
40
  def to_java()
41
+ # conversion for kb_payment_method_id [type = java.util.UUID]
42
+ @kb_payment_method_id = java.util.UUID.fromString(@kb_payment_method_id.to_s) unless @kb_payment_method_id.nil?
43
+
41
44
  # conversion for external_payment_method_id [type = java.lang.String]
42
45
  @external_payment_method_id = @external_payment_method_id.to_s unless @external_payment_method_id.nil?
43
46
 
@@ -92,6 +95,10 @@ module Killbill
92
95
  end
93
96
 
94
97
  def to_ruby(j_obj)
98
+ # conversion for kb_payment_method_id [type = java.util.UUID]
99
+ @kb_payment_method_id = j_obj.kb_payment_method_id
100
+ @kb_payment_method_id = @kb_payment_method_id.nil? ? nil : @kb_payment_method_id.to_s
101
+
95
102
  # conversion for external_payment_method_id [type = java.lang.String]
96
103
  @external_payment_method_id = j_obj.external_payment_method_id
97
104
 
@@ -323,6 +323,36 @@ module Killbill
323
323
  end
324
324
  end
325
325
 
326
+ java_signature 'Java::java.util.List searchPaymentMethods(Java::java.lang.String, Java::com.ning.billing.util.callcontext.TenantContext)'
327
+ def search_payment_methods(searchKey, context)
328
+
329
+ # conversion for searchKey [type = java.lang.String]
330
+
331
+ # conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
332
+ context = Killbill::Plugin::Model::TenantContext.new.to_ruby(context) unless context.nil?
333
+ begin
334
+ res = @delegate_plugin.search_payment_methods(searchKey, context)
335
+ # conversion for res [type = java.util.List]
336
+ tmp = java.util.ArrayList.new
337
+ (res || []).each do |m|
338
+ # conversion for m [type = com.ning.billing.payment.api.PaymentMethodPlugin]
339
+ m = m.to_java unless m.nil?
340
+ tmp.add(m)
341
+ end
342
+ res = tmp
343
+ return res
344
+ rescue Exception => e
345
+ message = "Failure in search_payment_methods: #{e}"
346
+ unless e.backtrace.nil?
347
+ message = "#{message}\n#{e.backtrace.join("\n")}"
348
+ end
349
+ logger.warn message
350
+ raise Java::com.ning.billing.payment.plugin.api.PaymentPluginApiException.new("search_payment_methods failure", e.message)
351
+ ensure
352
+ @delegate_plugin.after_request
353
+ end
354
+ end
355
+
326
356
  java_signature 'Java::void resetPaymentMethods(Java::java.util.UUID, Java::java.util.List)'
327
357
  def reset_payment_methods(kbAccountId, paymentMethods)
328
358
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,19 +9,19 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-18 00:00:00.000000000 Z
12
+ date: 2013-07-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
16
16
  version_requirements: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ~>
19
19
  - !ruby/object:Gem::Version
20
20
  version: 1.3.4
21
21
  none: false
22
22
  requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.3.4
27
27
  none: false
@@ -31,13 +31,13 @@ dependencies:
31
31
  name: tzinfo
32
32
  version_requirements: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - "~>"
34
+ - - ~>
35
35
  - !ruby/object:Gem::Version
36
36
  version: 0.3.37
37
37
  none: false
38
38
  requirement: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ~>
41
41
  - !ruby/object:Gem::Version
42
42
  version: 0.3.37
43
43
  none: false
@@ -47,13 +47,13 @@ dependencies:
47
47
  name: jbundler
48
48
  version_requirements: !ruby/object:Gem::Requirement
49
49
  requirements:
50
- - - "~>"
50
+ - - ~>
51
51
  - !ruby/object:Gem::Version
52
52
  version: 0.4.3
53
53
  none: false
54
54
  requirement: !ruby/object:Gem::Requirement
55
55
  requirements:
56
- - - "~>"
56
+ - - ~>
57
57
  - !ruby/object:Gem::Version
58
58
  version: 0.4.3
59
59
  none: false
@@ -63,13 +63,13 @@ dependencies:
63
63
  name: rack
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.5.2
69
69
  none: false
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ">="
72
+ - - '>='
73
73
  - !ruby/object:Gem::Version
74
74
  version: 1.5.2
75
75
  none: false
@@ -79,13 +79,13 @@ dependencies:
79
79
  name: rake
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - ">="
82
+ - - '>='
83
83
  - !ruby/object:Gem::Version
84
84
  version: 0.8.7
85
85
  none: false
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ">="
88
+ - - '>='
89
89
  - !ruby/object:Gem::Version
90
90
  version: 0.8.7
91
91
  none: false
@@ -95,13 +95,13 @@ dependencies:
95
95
  name: rspec
96
96
  version_requirements: !ruby/object:Gem::Requirement
97
97
  requirements:
98
- - - "~>"
98
+ - - ~>
99
99
  - !ruby/object:Gem::Version
100
100
  version: 2.12.0
101
101
  none: false
102
102
  requirement: !ruby/object:Gem::Requirement
103
103
  requirements:
104
- - - "~>"
104
+ - - ~>
105
105
  - !ruby/object:Gem::Version
106
106
  version: 2.12.0
107
107
  none: false
@@ -113,10 +113,11 @@ executables: []
113
113
  extensions: []
114
114
  extra_rdoc_files: []
115
115
  files:
116
- - ".gitignore"
117
- - ".travis.yml"
116
+ - .gitignore
117
+ - .travis.yml
118
118
  - Gemfile
119
119
  - Jarfile
120
+ - NEWS
120
121
  - README.md
121
122
  - Rakefile
122
123
  - VERSION
@@ -242,24 +243,23 @@ licenses:
242
243
  - Apache License (2.0)
243
244
  post_install_message:
244
245
  rdoc_options:
245
- - "--exclude"
246
- - "."
246
+ - --exclude
247
+ - .
247
248
  require_paths:
248
249
  - lib
249
250
  required_ruby_version: !ruby/object:Gem::Requirement
250
251
  requirements:
251
- - - ">="
252
+ - - '>='
252
253
  - !ruby/object:Gem::Version
253
254
  version: 1.9.3
254
255
  none: false
255
256
  required_rubygems_version: !ruby/object:Gem::Requirement
256
257
  requirements:
257
- - - ">="
258
+ - - '>='
258
259
  - !ruby/object:Gem::Version
259
260
  segments:
260
261
  - 0
261
- version: !binary |-
262
- MA==
262
+ version: '0'
263
263
  hash: 2
264
264
  none: false
265
265
  requirements: