killbill 1.0.15 → 1.0.16
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -1,41 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'date'
|
3
|
-
|
4
|
-
require 'killbill/response/payment_status'
|
5
|
-
require 'killbill/response/payment_response'
|
6
|
-
|
7
|
-
require 'killbill/jresponse/jpayment_response'
|
8
|
-
|
9
|
-
|
10
|
-
describe Killbill::Plugin::JPaymentResponse do
|
11
|
-
|
12
|
-
it "should_test_jpayment_response" do
|
13
|
-
|
14
|
-
amount = 12352
|
15
|
-
created_date = DateTime.new
|
16
|
-
effective_date = DateTime.new
|
17
|
-
status = Killbill::Plugin::PaymentStatus::SUCCESS
|
18
|
-
gateway_error = "whatever"
|
19
|
-
gateway_error_code = nil
|
20
|
-
|
21
|
-
input = Killbill::Plugin::PaymentResponse.new(amount, created_date, effective_date, status, gateway_error, gateway_error_code)
|
22
|
-
output = Killbill::Plugin::JPaymentResponse.new(input)
|
23
|
-
output.get_amount.should be_an_instance_of java.math.BigDecimal
|
24
|
-
output.get_amount.to_s.should == '123.52';
|
25
|
-
|
26
|
-
output.get_created_date.should be_an_instance_of org.joda.time.DateTime
|
27
|
-
#output.get_created_date.get_millis == created_date.to_s;
|
28
|
-
|
29
|
-
output.get_effective_date.should be_an_instance_of org.joda.time.DateTime
|
30
|
-
#output.get_effective_date.to_s.should == effective_date.to_s;
|
31
|
-
|
32
|
-
output.get_status.should be_an_instance_of Java::com.ning.billing.payment.plugin.api.PaymentInfoPlugin::PaymentPluginStatus
|
33
|
-
output.get_status.to_s.should == "PROCESSED"
|
34
|
-
|
35
|
-
output.get_gateway_error.should be_an_instance_of java.lang.String
|
36
|
-
output.get_gateway_error.to_s.should == gateway_error
|
37
|
-
|
38
|
-
output.get_gateway_error_code.should be_nil
|
39
|
-
|
40
|
-
end
|
41
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'date'
|
3
|
-
|
4
|
-
require 'killbill/response/payment_status'
|
5
|
-
require 'killbill/response/refund_response'
|
6
|
-
|
7
|
-
require 'killbill/jresponse/jrefund_response'
|
8
|
-
|
9
|
-
|
10
|
-
describe Killbill::Plugin::JRefundResponse do
|
11
|
-
|
12
|
-
it "should_test_jrefund_response" do
|
13
|
-
|
14
|
-
amount = 12352
|
15
|
-
created_date = DateTime.new
|
16
|
-
effective_date = DateTime.new
|
17
|
-
status = Killbill::Plugin::PaymentStatus::SUCCESS
|
18
|
-
gateway_error = "whatever"
|
19
|
-
gateway_error_code = nil
|
20
|
-
|
21
|
-
input = Killbill::Plugin::RefundResponse.new(amount, created_date, effective_date, status, gateway_error, gateway_error_code)
|
22
|
-
output = Killbill::Plugin::JRefundResponse.new(input)
|
23
|
-
output.get_amount.should be_an_instance_of java.math.BigDecimal
|
24
|
-
output.get_amount.to_s.should == '123.52';
|
25
|
-
|
26
|
-
output.get_created_date.should be_an_instance_of org.joda.time.DateTime
|
27
|
-
#output.get_created_date.get_millis == created_date.to_s;
|
28
|
-
|
29
|
-
output.get_effective_date.should be_an_instance_of org.joda.time.DateTime
|
30
|
-
#output.get_effective_date.to_s.should == effective_date.to_s;
|
31
|
-
|
32
|
-
output.get_status.should be_an_instance_of Java::com.ning.billing.payment.plugin.api.RefundInfoPlugin::RefundPluginStatus
|
33
|
-
output.get_status.to_s.should == "PROCESSED"
|
34
|
-
|
35
|
-
output.get_gateway_error.should be_an_instance_of java.lang.String
|
36
|
-
output.get_gateway_error.to_s.should == gateway_error
|
37
|
-
|
38
|
-
output.get_gateway_error_code.should be_nil
|
39
|
-
|
40
|
-
end
|
41
|
-
end
|