killbill 1.0.15 → 1.0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/Jarfile +4 -2
  2. data/VERSION +1 -1
  3. data/lib/killbill.rb +69 -13
  4. data/lib/killbill/creator.rb +16 -2
  5. data/lib/killbill/enum.rb +72 -0
  6. data/lib/killbill/gen/account.rb +43 -0
  7. data/lib/killbill/gen/account_data.rb +39 -0
  8. data/lib/killbill/gen/account_email.rb +25 -0
  9. data/lib/killbill/gen/audit_log.rb +28 -0
  10. data/lib/killbill/gen/blocking_state.rb +32 -0
  11. data/lib/killbill/gen/call_context.rb +29 -0
  12. data/lib/killbill/gen/call_origin.rb +34 -0
  13. data/lib/killbill/gen/currency.rb +34 -0
  14. data/lib/killbill/gen/custom_field.rb +27 -0
  15. data/lib/killbill/gen/date_time_zone.rb +35 -0
  16. data/lib/killbill/gen/ext_bus_event.rb +25 -0
  17. data/lib/killbill/gen/ext_bus_event_type.rb +34 -0
  18. data/lib/killbill/gen/invoice.rb +39 -0
  19. data/lib/killbill/gen/invoice_item.rb +37 -0
  20. data/lib/killbill/gen/invoice_payment.rb +31 -0
  21. data/lib/killbill/gen/invoice_payment_type.rb +34 -0
  22. data/lib/killbill/gen/object_type.rb +34 -0
  23. data/lib/killbill/gen/payment.rb +36 -0
  24. data/lib/killbill/gen/payment_attempt.rb +27 -0
  25. data/lib/killbill/gen/payment_info_plugin.rb +28 -0
  26. data/lib/killbill/gen/payment_method_info_plugin.rb +24 -0
  27. data/lib/killbill/gen/payment_method_kv_info.rb +21 -0
  28. data/lib/killbill/gen/payment_method_plugin.rb +36 -0
  29. data/lib/killbill/gen/payment_plugin_status.rb +34 -0
  30. data/lib/killbill/gen/refund.rb +29 -0
  31. data/lib/killbill/gen/refund_info_plugin.rb +27 -0
  32. data/lib/killbill/gen/refund_plugin_status.rb +34 -0
  33. data/lib/killbill/gen/require_gen.rb +38 -0
  34. data/lib/killbill/gen/subscription.rb +44 -0
  35. data/lib/killbill/gen/subscription_bundle.rb +27 -0
  36. data/lib/killbill/gen/subscription_source_type.rb +34 -0
  37. data/lib/killbill/gen/subscription_state.rb +34 -0
  38. data/lib/killbill/gen/tag.rb +26 -0
  39. data/lib/killbill/gen/tag_definition.rb +27 -0
  40. data/lib/killbill/gen/tenant_context.rb +21 -0
  41. data/lib/killbill/gen/user_type.rb +34 -0
  42. data/lib/killbill/gen/uuid.rb +22 -0
  43. data/lib/killbill/http_servlet.rb +10 -3
  44. data/lib/killbill/jconverter.rb +540 -0
  45. data/lib/killbill/jkillbill_api.rb +137 -0
  46. data/lib/killbill/jnotification.rb +0 -1
  47. data/lib/killbill/jpayment.rb +7 -19
  48. data/lib/killbill/jplugin.rb +27 -16
  49. data/lib/killbill/killbill_api.rb +28 -0
  50. data/lib/killbill/killbill_logger.rb +31 -8
  51. data/lib/killbill/notification.rb +0 -1
  52. data/lib/killbill/payment.rb +0 -5
  53. data/lib/killbill/plugin.rb +4 -46
  54. data/spec/killbill/base_plugin_spec.rb +2 -1
  55. data/spec/killbill/{jresponse/jconverter_spec.rb → jconverter_spec.rb} +46 -90
  56. data/spec/killbill/jnotification_spec.rb +2 -1
  57. data/spec/killbill/jpayment_spec.rb +17 -16
  58. data/spec/killbill/killbill_integration_spec.rb +1 -1
  59. data/spec/killbill/killbillapi_spec.rb +49 -0
  60. data/spec/killbill/payment_test.rb +5 -5
  61. data/spec/killbill/rack_handler_spec.rb +1 -2
  62. data/spec/spec_helper.rb +3 -0
  63. data/tools/java2ruby.rb +440 -0
  64. metadata +48 -26
  65. data/lib/killbill/jresponse/jconverter.rb +0 -126
  66. data/lib/killbill/jresponse/jevent.rb +0 -58
  67. data/lib/killbill/jresponse/jpayment_method_response.rb +0 -148
  68. data/lib/killbill/jresponse/jpayment_method_response_internal.rb +0 -54
  69. data/lib/killbill/jresponse/jpayment_response.rb +0 -74
  70. data/lib/killbill/jresponse/jrefund_response.rb +0 -68
  71. data/lib/killbill/response/event.rb +0 -18
  72. data/lib/killbill/response/payment_method_response.rb +0 -50
  73. data/lib/killbill/response/payment_method_response_internal.rb +0 -20
  74. data/lib/killbill/response/payment_response.rb +0 -26
  75. data/lib/killbill/response/payment_status.rb +0 -10
  76. data/lib/killbill/response/refund_response.rb +0 -25
  77. data/spec/killbill/jresponse/jevent_spec.rb +0 -18
  78. data/spec/killbill/jresponse/jpayment_method_response_internal_spec.rb +0 -34
  79. data/spec/killbill/jresponse/jpayment_method_response_spec.rb +0 -53
  80. data/spec/killbill/jresponse/jpayment_response_spec.rb +0 -41
  81. 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