killbill 1.0.15 → 1.0.16
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.
- data/Jarfile +4 -2
- data/VERSION +1 -1
- data/lib/killbill.rb +69 -13
- data/lib/killbill/creator.rb +16 -2
- data/lib/killbill/enum.rb +72 -0
- data/lib/killbill/gen/account.rb +43 -0
- data/lib/killbill/gen/account_data.rb +39 -0
- data/lib/killbill/gen/account_email.rb +25 -0
- data/lib/killbill/gen/audit_log.rb +28 -0
- data/lib/killbill/gen/blocking_state.rb +32 -0
- data/lib/killbill/gen/call_context.rb +29 -0
- data/lib/killbill/gen/call_origin.rb +34 -0
- data/lib/killbill/gen/currency.rb +34 -0
- data/lib/killbill/gen/custom_field.rb +27 -0
- data/lib/killbill/gen/date_time_zone.rb +35 -0
- data/lib/killbill/gen/ext_bus_event.rb +25 -0
- data/lib/killbill/gen/ext_bus_event_type.rb +34 -0
- data/lib/killbill/gen/invoice.rb +39 -0
- data/lib/killbill/gen/invoice_item.rb +37 -0
- data/lib/killbill/gen/invoice_payment.rb +31 -0
- data/lib/killbill/gen/invoice_payment_type.rb +34 -0
- data/lib/killbill/gen/object_type.rb +34 -0
- data/lib/killbill/gen/payment.rb +36 -0
- data/lib/killbill/gen/payment_attempt.rb +27 -0
- data/lib/killbill/gen/payment_info_plugin.rb +28 -0
- data/lib/killbill/gen/payment_method_info_plugin.rb +24 -0
- data/lib/killbill/gen/payment_method_kv_info.rb +21 -0
- data/lib/killbill/gen/payment_method_plugin.rb +36 -0
- data/lib/killbill/gen/payment_plugin_status.rb +34 -0
- data/lib/killbill/gen/refund.rb +29 -0
- data/lib/killbill/gen/refund_info_plugin.rb +27 -0
- data/lib/killbill/gen/refund_plugin_status.rb +34 -0
- data/lib/killbill/gen/require_gen.rb +38 -0
- data/lib/killbill/gen/subscription.rb +44 -0
- data/lib/killbill/gen/subscription_bundle.rb +27 -0
- data/lib/killbill/gen/subscription_source_type.rb +34 -0
- data/lib/killbill/gen/subscription_state.rb +34 -0
- data/lib/killbill/gen/tag.rb +26 -0
- data/lib/killbill/gen/tag_definition.rb +27 -0
- data/lib/killbill/gen/tenant_context.rb +21 -0
- data/lib/killbill/gen/user_type.rb +34 -0
- data/lib/killbill/gen/uuid.rb +22 -0
- data/lib/killbill/http_servlet.rb +10 -3
- data/lib/killbill/jconverter.rb +540 -0
- data/lib/killbill/jkillbill_api.rb +137 -0
- data/lib/killbill/jnotification.rb +0 -1
- data/lib/killbill/jpayment.rb +7 -19
- data/lib/killbill/jplugin.rb +27 -16
- data/lib/killbill/killbill_api.rb +28 -0
- data/lib/killbill/killbill_logger.rb +31 -8
- data/lib/killbill/notification.rb +0 -1
- data/lib/killbill/payment.rb +0 -5
- data/lib/killbill/plugin.rb +4 -46
- data/spec/killbill/base_plugin_spec.rb +2 -1
- data/spec/killbill/{jresponse/jconverter_spec.rb → jconverter_spec.rb} +46 -90
- data/spec/killbill/jnotification_spec.rb +2 -1
- data/spec/killbill/jpayment_spec.rb +17 -16
- data/spec/killbill/killbill_integration_spec.rb +1 -1
- data/spec/killbill/killbillapi_spec.rb +49 -0
- data/spec/killbill/payment_test.rb +5 -5
- data/spec/killbill/rack_handler_spec.rb +1 -2
- data/spec/spec_helper.rb +3 -0
- data/tools/java2ruby.rb +440 -0
- metadata +48 -26
- data/lib/killbill/jresponse/jconverter.rb +0 -126
- data/lib/killbill/jresponse/jevent.rb +0 -58
- data/lib/killbill/jresponse/jpayment_method_response.rb +0 -148
- data/lib/killbill/jresponse/jpayment_method_response_internal.rb +0 -54
- data/lib/killbill/jresponse/jpayment_response.rb +0 -74
- data/lib/killbill/jresponse/jrefund_response.rb +0 -68
- data/lib/killbill/response/event.rb +0 -18
- data/lib/killbill/response/payment_method_response.rb +0 -50
- data/lib/killbill/response/payment_method_response_internal.rb +0 -20
- data/lib/killbill/response/payment_response.rb +0 -26
- data/lib/killbill/response/payment_status.rb +0 -10
- data/lib/killbill/response/refund_response.rb +0 -25
- data/spec/killbill/jresponse/jevent_spec.rb +0 -18
- data/spec/killbill/jresponse/jpayment_method_response_internal_spec.rb +0 -34
- data/spec/killbill/jresponse/jpayment_method_response_spec.rb +0 -53
- data/spec/killbill/jresponse/jpayment_response_spec.rb +0 -41
- data/spec/killbill/jresponse/jrefund_response_spec.rb +0 -41
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class PaymentMethodKVInfo
|
10
|
+
|
11
|
+
attr_reader :is_updatable, :key, :value
|
12
|
+
|
13
|
+
def initialize(is_updatable, key, value)
|
14
|
+
@is_updatable = is_updatable
|
15
|
+
@key = key
|
16
|
+
@value = value
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class PaymentMethodPlugin
|
10
|
+
|
11
|
+
include com.ning.billing.payment.api.PaymentMethodPlugin
|
12
|
+
|
13
|
+
attr_reader :external_payment_method_id, :is_default_payment_method, :properties, :value_string, :type, :cc_name, :cc_type, :cc_expiration_month, :cc_expiration_year, :cc_last4, :address1, :address2, :city, :state, :zip, :country
|
14
|
+
|
15
|
+
def initialize(external_payment_method_id, is_default_payment_method, properties, value_string, type, cc_name, cc_type, cc_expiration_month, cc_expiration_year, cc_last4, address1, address2, city, state, zip, country)
|
16
|
+
@external_payment_method_id = external_payment_method_id
|
17
|
+
@is_default_payment_method = is_default_payment_method
|
18
|
+
@properties = properties
|
19
|
+
@value_string = value_string
|
20
|
+
@type = type
|
21
|
+
@cc_name = cc_name
|
22
|
+
@cc_type = cc_type
|
23
|
+
@cc_expiration_month = cc_expiration_month
|
24
|
+
@cc_expiration_year = cc_expiration_year
|
25
|
+
@cc_last4 = cc_last4
|
26
|
+
@address1 = address1
|
27
|
+
@address2 = address2
|
28
|
+
@city = city
|
29
|
+
@state = state
|
30
|
+
@zip = zip
|
31
|
+
@country = country
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class PaymentPluginStatus
|
10
|
+
|
11
|
+
@@admissible_values = [:UNDEFINED, :PROCESSED, :ERROR]
|
12
|
+
attr_reader :enum
|
13
|
+
|
14
|
+
def initialize(value)
|
15
|
+
raise ArgumentError.new("Enum PaymentPluginStatus does not have such value : #{value}") if ! PaymentPluginStatus.is_admissible_value?(value)
|
16
|
+
@enum = value
|
17
|
+
end
|
18
|
+
|
19
|
+
def ==(other)
|
20
|
+
return false if other.nil?
|
21
|
+
self.enum == other.enum
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.is_admissible_value?(value)
|
25
|
+
@@admissible_values.include?(value)
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.admissible_values
|
29
|
+
@@admissible_values
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class Refund
|
10
|
+
|
11
|
+
include com.ning.billing.payment.api.Refund
|
12
|
+
|
13
|
+
attr_reader :id, :created_date, :updated_date, :payment_id, :is_adjusted, :refund_amount, :currency, :effective_date, :plugin_detail
|
14
|
+
|
15
|
+
def initialize(id, created_date, updated_date, payment_id, is_adjusted, refund_amount, currency, effective_date, plugin_detail)
|
16
|
+
@id = id
|
17
|
+
@created_date = created_date
|
18
|
+
@updated_date = updated_date
|
19
|
+
@payment_id = payment_id
|
20
|
+
@is_adjusted = is_adjusted
|
21
|
+
@refund_amount = refund_amount
|
22
|
+
@currency = currency
|
23
|
+
@effective_date = effective_date
|
24
|
+
@plugin_detail = plugin_detail
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class RefundInfoPlugin
|
10
|
+
|
11
|
+
include com.ning.billing.payment.plugin.api.RefundInfoPlugin
|
12
|
+
|
13
|
+
attr_reader :amount, :created_date, :effective_date, :status, :gateway_error, :gateway_error_code, :reference_id
|
14
|
+
|
15
|
+
def initialize(amount, created_date, effective_date, status, gateway_error, gateway_error_code, reference_id)
|
16
|
+
@amount = amount
|
17
|
+
@created_date = created_date
|
18
|
+
@effective_date = effective_date
|
19
|
+
@status = status
|
20
|
+
@gateway_error = gateway_error
|
21
|
+
@gateway_error_code = gateway_error_code
|
22
|
+
@reference_id = reference_id
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class RefundPluginStatus
|
10
|
+
|
11
|
+
@@admissible_values = [:UNDEFINED, :PROCESSED, :ERROR]
|
12
|
+
attr_reader :enum
|
13
|
+
|
14
|
+
def initialize(value)
|
15
|
+
raise ArgumentError.new("Enum RefundPluginStatus does not have such value : #{value}") if ! RefundPluginStatus.is_admissible_value?(value)
|
16
|
+
@enum = value
|
17
|
+
end
|
18
|
+
|
19
|
+
def ==(other)
|
20
|
+
return false if other.nil?
|
21
|
+
self.enum == other.enum
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.is_admissible_value?(value)
|
25
|
+
@@admissible_values.include?(value)
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.admissible_values
|
29
|
+
@@admissible_values
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'killbill/gen/object_type'
|
2
|
+
require 'killbill/gen/account'
|
3
|
+
require 'killbill/gen/account_data'
|
4
|
+
require 'killbill/gen/account_email'
|
5
|
+
require 'killbill/gen/ext_bus_event'
|
6
|
+
require 'killbill/gen/ext_bus_event_type'
|
7
|
+
require 'killbill/gen/currency'
|
8
|
+
require 'killbill/gen/subscription'
|
9
|
+
require 'killbill/gen/subscription_bundle'
|
10
|
+
require 'killbill/gen/subscription_source_type'
|
11
|
+
require 'killbill/gen/subscription_state'
|
12
|
+
require 'killbill/gen/invoice'
|
13
|
+
require 'killbill/gen/invoice_item'
|
14
|
+
require 'killbill/gen/invoice_payment'
|
15
|
+
require 'killbill/gen/invoice_payment_type'
|
16
|
+
require 'killbill/gen/blocking_state'
|
17
|
+
require 'killbill/gen/payment'
|
18
|
+
require 'killbill/gen/payment_attempt'
|
19
|
+
require 'killbill/gen/payment_method_kv_info'
|
20
|
+
require 'killbill/gen/payment_method_plugin'
|
21
|
+
require 'killbill/gen/refund'
|
22
|
+
require 'killbill/gen/payment_info_plugin'
|
23
|
+
require 'killbill/gen/payment_method_info_plugin'
|
24
|
+
require 'killbill/gen/payment_plugin_status'
|
25
|
+
require 'killbill/gen/refund_info_plugin'
|
26
|
+
require 'killbill/gen/refund_plugin_status'
|
27
|
+
require 'killbill/gen/audit_log'
|
28
|
+
require 'killbill/gen/call_context'
|
29
|
+
require 'killbill/gen/call_origin'
|
30
|
+
require 'killbill/gen/user_type'
|
31
|
+
require 'killbill/gen/tenant_context'
|
32
|
+
require 'killbill/gen/custom_field'
|
33
|
+
require 'killbill/gen/tag'
|
34
|
+
require 'killbill/gen/tag_definition'
|
35
|
+
# STEPH TODO added by hand
|
36
|
+
#
|
37
|
+
require 'killbill/gen/uuid'
|
38
|
+
require 'killbill/gen/date_time_zone'
|
@@ -0,0 +1,44 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class Subscription
|
10
|
+
|
11
|
+
include com.ning.billing.entitlement.api.user.Subscription
|
12
|
+
|
13
|
+
attr_reader :id, :blocking_state, :created_date, :updated_date, :bundle_id, :state, :source_type, :start_date, :end_date, :future_end_date, :current_plan, :last_active_plan, :current_price_list, :current_phase, :last_active_product_name, :last_active_price_list_name, :last_active_category_name, :last_active_billing_period, :charged_through_date, :paid_through_date, :category, :pending_transition, :previous_transition, :all_transitions
|
14
|
+
|
15
|
+
def initialize(id, blocking_state, created_date, updated_date, bundle_id, state, source_type, start_date, end_date, future_end_date, current_plan, last_active_plan, current_price_list, current_phase, last_active_product_name, last_active_price_list_name, last_active_category_name, last_active_billing_period, charged_through_date, paid_through_date, category, pending_transition, previous_transition, all_transitions)
|
16
|
+
@id = id
|
17
|
+
@blocking_state = blocking_state
|
18
|
+
@created_date = created_date
|
19
|
+
@updated_date = updated_date
|
20
|
+
@bundle_id = bundle_id
|
21
|
+
@state = state
|
22
|
+
@source_type = source_type
|
23
|
+
@start_date = start_date
|
24
|
+
@end_date = end_date
|
25
|
+
@future_end_date = future_end_date
|
26
|
+
@current_plan = current_plan
|
27
|
+
@last_active_plan = last_active_plan
|
28
|
+
@current_price_list = current_price_list
|
29
|
+
@current_phase = current_phase
|
30
|
+
@last_active_product_name = last_active_product_name
|
31
|
+
@last_active_price_list_name = last_active_price_list_name
|
32
|
+
@last_active_category_name = last_active_category_name
|
33
|
+
@last_active_billing_period = last_active_billing_period
|
34
|
+
@charged_through_date = charged_through_date
|
35
|
+
@paid_through_date = paid_through_date
|
36
|
+
@category = category
|
37
|
+
@pending_transition = pending_transition
|
38
|
+
@previous_transition = previous_transition
|
39
|
+
@all_transitions = all_transitions
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class SubscriptionBundle
|
10
|
+
|
11
|
+
include com.ning.billing.entitlement.api.user.SubscriptionBundle
|
12
|
+
|
13
|
+
attr_reader :id, :created_date, :updated_date, :blocking_state, :account_id, :external_key, :overdue_state
|
14
|
+
|
15
|
+
def initialize(id, created_date, updated_date, blocking_state, account_id, external_key, overdue_state)
|
16
|
+
@id = id
|
17
|
+
@created_date = created_date
|
18
|
+
@updated_date = updated_date
|
19
|
+
@blocking_state = blocking_state
|
20
|
+
@account_id = account_id
|
21
|
+
@external_key = external_key
|
22
|
+
@overdue_state = overdue_state
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class SubscriptionSourceType
|
10
|
+
|
11
|
+
@@admissible_values = [:NATIVE, :MIGRATED, :TRANSFERED]
|
12
|
+
attr_reader :enum
|
13
|
+
|
14
|
+
def initialize(value)
|
15
|
+
raise ArgumentError.new("Enum SubscriptionSourceType does not have such value : #{value}") if ! SubscriptionSourceType.is_admissible_value?(value)
|
16
|
+
@enum = value
|
17
|
+
end
|
18
|
+
|
19
|
+
def ==(other)
|
20
|
+
return false if other.nil?
|
21
|
+
self.enum == other.enum
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.is_admissible_value?(value)
|
25
|
+
@@admissible_values.include?(value)
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.admissible_values
|
29
|
+
@@admissible_values
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class SubscriptionState
|
10
|
+
|
11
|
+
@@admissible_values = [:ACTIVE, :CANCELLED]
|
12
|
+
attr_reader :enum
|
13
|
+
|
14
|
+
def initialize(value)
|
15
|
+
raise ArgumentError.new("Enum SubscriptionState does not have such value : #{value}") if ! SubscriptionState.is_admissible_value?(value)
|
16
|
+
@enum = value
|
17
|
+
end
|
18
|
+
|
19
|
+
def ==(other)
|
20
|
+
return false if other.nil?
|
21
|
+
self.enum == other.enum
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.is_admissible_value?(value)
|
25
|
+
@@admissible_values.include?(value)
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.admissible_values
|
29
|
+
@@admissible_values
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class Tag
|
10
|
+
|
11
|
+
include com.ning.billing.util.tag.Tag
|
12
|
+
|
13
|
+
attr_reader :id, :created_date, :updated_date, :tag_definition_id, :object_type, :object_id
|
14
|
+
|
15
|
+
def initialize(id, created_date, updated_date, tag_definition_id, object_type, object_id)
|
16
|
+
@id = id
|
17
|
+
@created_date = created_date
|
18
|
+
@updated_date = updated_date
|
19
|
+
@tag_definition_id = tag_definition_id
|
20
|
+
@object_type = object_type
|
21
|
+
@object_id = object_id
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class TagDefinition
|
10
|
+
|
11
|
+
include com.ning.billing.util.tag.TagDefinition
|
12
|
+
|
13
|
+
attr_reader :id, :created_date, :updated_date, :name, :description, :is_control_tag, :applicable_object_types
|
14
|
+
|
15
|
+
def initialize(id, created_date, updated_date, name, description, is_control_tag, applicable_object_types)
|
16
|
+
@id = id
|
17
|
+
@created_date = created_date
|
18
|
+
@updated_date = updated_date
|
19
|
+
@name = name
|
20
|
+
@description = description
|
21
|
+
@is_control_tag = is_control_tag
|
22
|
+
@applicable_object_types = applicable_object_types
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Ruby classes automatically generated from java classes-- don't edit
|
4
|
+
#
|
5
|
+
module Killbill
|
6
|
+
module Plugin
|
7
|
+
module Model
|
8
|
+
|
9
|
+
class TenantContext
|
10
|
+
|
11
|
+
include com.ning.billing.util.callcontext.TenantContext
|
12
|
+
|
13
|
+
attr_reader :tenant_id
|
14
|
+
|
15
|
+
def initialize(tenant_id)
|
16
|
+
@tenant_id = tenant_id
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|