kaui 0.1.3 → 0.1.4
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/app/controllers/kaui/account_emails_controller.rb +2 -2
- data/app/controllers/kaui/account_tags_controller.rb +1 -1
- data/app/controllers/kaui/account_timelines_controller.rb +1 -1
- data/app/controllers/kaui/accounts_controller.rb +2 -2
- data/app/controllers/kaui/bundle_tags_controller.rb +1 -1
- data/app/controllers/kaui/bundles_controller.rb +2 -2
- data/app/controllers/kaui/chargebacks_controller.rb +1 -1
- data/app/controllers/kaui/charges_controller.rb +1 -1
- data/app/controllers/kaui/credits_controller.rb +1 -1
- data/app/controllers/kaui/external_payments_controller.rb +1 -1
- data/app/controllers/kaui/invoice_items_controller.rb +2 -2
- data/app/controllers/kaui/invoices_controller.rb +1 -1
- data/app/controllers/kaui/payments_controller.rb +1 -1
- data/app/controllers/kaui/refunds_controller.rb +2 -2
- data/app/controllers/kaui/subscriptions_controller.rb +2 -2
- data/app/helpers/kaui/killbill_helper.rb +2 -0
- data/app/views/kaui/account_emails/_account_emails_table.html.erb +1 -1
- data/app/views/kaui/account_emails/edit.html.erb +1 -1
- data/app/views/kaui/account_emails/show.html.erb +4 -3
- data/app/views/kaui/account_tags/_account_tags_table.html.erb +1 -1
- data/app/views/kaui/account_timelines/show.html.erb +2 -0
- data/app/views/kaui/tag_definitions/index.html.erb +1 -1
- data/app/views/kaui/tag_definitions/show.html.erb +2 -2
- data/lib/kaui/version.rb +1 -1
- data/test/dummy/log/development.log +111 -0
- data/test/dummy/log/test.log +2102 -0
- metadata +1 -3
- data/test/dummy/tmp/pids/server.pid +0 -1
@@ -30,7 +30,7 @@ module Kaui
|
|
30
30
|
|
31
31
|
respond_to do |format|
|
32
32
|
if @account_email.save
|
33
|
-
format.html { redirect_to account_email_path(@account_email), :notice => 'Account email was successfully created.' }
|
33
|
+
format.html { redirect_to kaui_engine.account_email_path(@account_email), :notice => 'Account email was successfully created.' }
|
34
34
|
format.json { render :json => @account_email, :status => :created, :location => @account_email }
|
35
35
|
else
|
36
36
|
format.html { render :action => "new" }
|
@@ -46,7 +46,7 @@ module Kaui
|
|
46
46
|
@account_email.destroy
|
47
47
|
|
48
48
|
respond_to do |format|
|
49
|
-
format.html { redirect_to account_email_path(params[:id]) }
|
49
|
+
format.html { redirect_to kaui_engine.account_email_path(params[:id]) }
|
50
50
|
format.json { head :no_content }
|
51
51
|
end
|
52
52
|
end
|
@@ -42,7 +42,7 @@ class Kaui::AccountTagsController < Kaui::EngineController
|
|
42
42
|
Kaui::KillbillHelper::remove_tags_for_account(params[:account_id], tags_to_remove)
|
43
43
|
Kaui::KillbillHelper::add_tags_for_account(params[:account_id], tags_to_add)
|
44
44
|
|
45
|
-
redirect_to
|
45
|
+
redirect_to kaui_engine.account_path(params[:account_id])
|
46
46
|
end
|
47
47
|
|
48
48
|
end
|
@@ -4,7 +4,7 @@ require 'json'
|
|
4
4
|
class Kaui::AccountsController < Kaui::EngineController
|
5
5
|
def index
|
6
6
|
if params[:account_id].present?
|
7
|
-
redirect_to account_path(params[:account_id])
|
7
|
+
redirect_to kaui_engine.account_path(params[:account_id])
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
@@ -108,7 +108,7 @@ class Kaui::AccountsController < Kaui::EngineController
|
|
108
108
|
|
109
109
|
if success
|
110
110
|
flash[:info] = "Payment method created"
|
111
|
-
redirect_to account_timeline_path(@account.account_id)
|
111
|
+
redirect_to kaui_engine.account_timeline_path(@account.account_id)
|
112
112
|
return
|
113
113
|
else
|
114
114
|
flash[:error] = "Error while adding payment method"
|
@@ -22,7 +22,7 @@ class Kaui::BundleTagsController < Kaui::EngineController
|
|
22
22
|
tags = params[:tags]
|
23
23
|
|
24
24
|
Kaui::KillbillHelper::set_tags_for_bundle(bundle.bundle_id, tags)
|
25
|
-
redirect_to
|
25
|
+
redirect_to kaui_engine.bundle_home_path.call(bundle.external_key)
|
26
26
|
end
|
27
27
|
|
28
28
|
end
|
@@ -2,7 +2,7 @@ class Kaui::BundlesController < Kaui::EngineController
|
|
2
2
|
|
3
3
|
def index
|
4
4
|
if params[:bundle_id].present?
|
5
|
-
redirect_to bundle_path(params[:bundle_id])
|
5
|
+
redirect_to kaui_engine.bundle_path(params[:bundle_id])
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
@@ -53,7 +53,7 @@ class Kaui::BundlesController < Kaui::EngineController
|
|
53
53
|
success = Kaui::KillbillHelper::transfer_bundle(bundle_id, @new_account.account_id)
|
54
54
|
if success
|
55
55
|
flash[:info] = "Bundle transfered successfully"
|
56
|
-
redirect_to
|
56
|
+
redirect_to kaui_engine.account_home_path.call(@new_account.external_key)
|
57
57
|
return
|
58
58
|
else
|
59
59
|
flash[:error] = "Error transfering bundle"
|
@@ -42,6 +42,6 @@ class Kaui::ChargebacksController < Kaui::EngineController
|
|
42
42
|
else
|
43
43
|
flash[:error] = "No chargeback to process"
|
44
44
|
end
|
45
|
-
redirect_to account_timeline_path(:id => params[:account_id])
|
45
|
+
redirect_to kaui_engine.account_timeline_path(:id => params[:account_id])
|
46
46
|
end
|
47
47
|
end
|
@@ -26,7 +26,7 @@ class Kaui::ChargesController < Kaui::EngineController
|
|
26
26
|
else
|
27
27
|
flash[:error] = "No charge to process"
|
28
28
|
end
|
29
|
-
redirect_to account_timeline_path(:id => charge.account_id)
|
29
|
+
redirect_to kaui_engine.account_timeline_path(:id => charge.account_id)
|
30
30
|
end
|
31
31
|
|
32
32
|
end
|
@@ -16,6 +16,6 @@ class Kaui::ExternalPaymentsController < Kaui::EngineController
|
|
16
16
|
if success
|
17
17
|
flash[:info] = "External Payment created"
|
18
18
|
end
|
19
|
-
redirect_to account_timeline_path(external_payment.account_id)
|
19
|
+
redirect_to kaui_engine.account_timeline_path(external_payment.account_id)
|
20
20
|
end
|
21
21
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class Kaui::InvoiceItemsController < Kaui::EngineController
|
2
2
|
def index
|
3
3
|
if params[:invoice_item_id].present? and params[:invoice_id].present?
|
4
|
-
redirect_to invoice_item_path(params[:invoice_item_id], :invoice_id => params[:invoice_id])
|
4
|
+
redirect_to kaui_engine.invoice_item_path(params[:invoice_item_id], :invoice_id => params[:invoice_id])
|
5
5
|
end
|
6
6
|
end
|
7
7
|
|
@@ -18,7 +18,7 @@ class Kaui::InvoiceItemsController < Kaui::EngineController
|
|
18
18
|
success = Kaui::KillbillHelper.adjust_invoice(@invoice_item, current_user, params[:reason], params[:comment])
|
19
19
|
if success
|
20
20
|
flash[:notice] = "Adjustment item created"
|
21
|
-
redirect_to invoice_path(@invoice_item.invoice_id)
|
21
|
+
redirect_to kaui_engine.invoice_path(@invoice_item.invoice_id)
|
22
22
|
else
|
23
23
|
flash[:error] = "Unable to create adjustment item"
|
24
24
|
render :action => "edit"
|
@@ -20,7 +20,7 @@ class Kaui::PaymentsController < Kaui::EngineController
|
|
20
20
|
else
|
21
21
|
flash[:error] = "No payment to process"
|
22
22
|
end
|
23
|
-
redirect_to account_timeline_path(:id => payment.account_id)
|
23
|
+
redirect_to kaui_engine.account_timeline_path(:id => payment.account_id)
|
24
24
|
end
|
25
25
|
|
26
26
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class Kaui::RefundsController < Kaui::EngineController
|
2
2
|
def index
|
3
3
|
if params[:refund_id].present?
|
4
|
-
redirect_to refund_path(params[:refund_id])
|
4
|
+
redirect_to kaui_engine.refund_path(params[:refund_id])
|
5
5
|
end
|
6
6
|
end
|
7
7
|
|
@@ -52,7 +52,7 @@ class Kaui::RefundsController < Kaui::EngineController
|
|
52
52
|
else
|
53
53
|
flash[:error] = "No refund to process"
|
54
54
|
end
|
55
|
-
redirect_to account_timeline_path(:id => params[:account_id])
|
55
|
+
redirect_to kaui_engine.account_timeline_path(:id => params[:account_id])
|
56
56
|
end
|
57
57
|
|
58
58
|
end
|
@@ -3,7 +3,7 @@ require 'kaui/product'
|
|
3
3
|
class Kaui::SubscriptionsController < Kaui::EngineController
|
4
4
|
def index
|
5
5
|
if params[:subscription_id].present?
|
6
|
-
redirect_to subscription_path(params[:subscription_id])
|
6
|
+
redirect_to kaui_engine.subscription_path(params[:subscription_id])
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
@@ -110,7 +110,7 @@ class Kaui::SubscriptionsController < Kaui::EngineController
|
|
110
110
|
# TODO: need to use entered start_date (or current date if none entered)
|
111
111
|
|
112
112
|
Kaui::KillbillHelper::update_subscription(subscription, requested_date, current_user)
|
113
|
-
redirect_to
|
113
|
+
redirect_to kaui_engine.bundle_home_path.call(bundle.bundle_id)
|
114
114
|
else
|
115
115
|
flash[:error] = "No subscription given"
|
116
116
|
redirect_to :back
|
@@ -213,6 +213,8 @@ module Kaui
|
|
213
213
|
def self.create_subscription(subscription, current_user = nil, reason = nil, comment = nil)
|
214
214
|
begin
|
215
215
|
subscription_data = Kaui::Subscription.camelize(subscription.to_hash)
|
216
|
+
# We don't want to pass events
|
217
|
+
subscription_data.delete(:events)
|
216
218
|
data = call_killbill :post,
|
217
219
|
"/1.0/kb/subscriptions",
|
218
220
|
ActiveSupport::JSON.encode(subscription_data, :root => false),
|
@@ -11,9 +11,9 @@
|
|
11
11
|
<tbody>
|
12
12
|
<% @account_emails.each do |account_email| %>
|
13
13
|
<tr>
|
14
|
-
<td><%= link_to account_email.account_id, account_path(account_email.account_id) %></td>
|
14
|
+
<td><%= link_to account_email.account_id, kaui_engine.account_path(account_email.account_id) %></td>
|
15
15
|
<td><%= account_email.email %></td>
|
16
|
-
<td><%= link_to 'Destroy', account_email_path(account_email.account_id, :email => account_email.email), :confirm => 'Are you sure?', :method => :delete %></td>
|
16
|
+
<td><%= link_to 'Destroy', kaui_engine.account_email_path(account_email.account_id, :email => account_email.email), :confirm => 'Are you sure?', :method => :delete %></td>
|
17
17
|
</tr>
|
18
18
|
<% end %>
|
19
19
|
</tbody>
|
@@ -21,4 +21,5 @@
|
|
21
21
|
|
22
22
|
<br />
|
23
23
|
|
24
|
-
<%= link_to 'New
|
24
|
+
<%= link_to 'New account email', kaui_engine.new_account_email_path(:account_id => @account_id), :class => 'btn btn-primary' %>
|
25
|
+
<%= link_to 'Back to account', kaui_engine.account_path(@account_id), :class => 'btn' %>
|
@@ -266,6 +266,8 @@
|
|
266
266
|
<% @timeline.bundles.each do |bundle| %>
|
267
267
|
<% bundle.subscriptions.each do |sub| %>
|
268
268
|
<% sub.events.each do |event| %>
|
269
|
+
<!-- SKIP UNCANCEL SINCE MATCHING CANCEL EVENT IS NOT RETURNED AS IT WAS INVALIDED -->
|
270
|
+
<% next if event.event_type == 'UNCANCEL' %>
|
269
271
|
<tr title="<%= @bundle_names[bundle.external_key] %>">
|
270
272
|
<td>
|
271
273
|
<% if event.requested_date.present? %>
|
@@ -8,5 +8,5 @@
|
|
8
8
|
<dd><%= @tag_definition.description %> </dd>
|
9
9
|
</dl>
|
10
10
|
|
11
|
-
<!-- <%= link_to 'Edit', edit_tag_definition_path(@tag_definition), :class => 'btn btn-primary' %> -->
|
12
|
-
<%= link_to 'Back', tag_definitions_path, :class => 'btn' %>
|
11
|
+
<!-- <%= link_to 'Edit', kaui_engine.edit_tag_definition_path(@tag_definition), :class => 'btn btn-primary' %> -->
|
12
|
+
<%= link_to 'Back', kaui_engine.tag_definitions_path, :class => 'btn' %>
|
data/lib/kaui/version.rb
CHANGED
@@ -53351,3 +53351,114 @@ Served asset /jquery_ujs.js - 304 Not Modified (0ms)
|
|
53351
53351
|
|
53352
53352
|
Started GET "/assets/jquery.dataTables.v1.9.3.min.js?body=1" for 127.0.0.1 at Fri Aug 17 19:37:19 -0700 2012
|
53353
53353
|
Served asset /jquery.dataTables.v1.9.3.min.js - 304 Not Modified (0ms)
|
53354
|
+
|
53355
|
+
|
53356
|
+
Started GET "/kaui/accounts" for 127.0.0.1 at Fri Aug 17 20:00:15 -0700 2012
|
53357
|
+
Processing by Kaui::AccountsController#index as HTML
|
53358
|
+
Rendered /Users/pierre/open-source/ning/killbill-admin-ui/app/views/kaui/accounts/index.html.erb within layouts/application (302.0ms)
|
53359
|
+
Completed 200 OK in 340ms (Views: 335.0ms | ActiveRecord: 0.0ms)
|
53360
|
+
|
53361
|
+
|
53362
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at Fri Aug 17 20:00:15 -0700 2012
|
53363
|
+
Served asset /application.css - 304 Not Modified (0ms)
|
53364
|
+
|
53365
|
+
|
53366
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:15 -0700 2012
|
53367
|
+
Served asset /jquery.js - 304 Not Modified (0ms)
|
53368
|
+
|
53369
|
+
|
53370
|
+
Started GET "/assets/bootstrap.v2.0.4.min.css?body=1" for 127.0.0.1 at Fri Aug 17 20:00:15 -0700 2012
|
53371
|
+
Served asset /bootstrap.v2.0.4.min.css - 304 Not Modified (1ms)
|
53372
|
+
|
53373
|
+
|
53374
|
+
Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:15 -0700 2012
|
53375
|
+
Served asset /jquery_ujs.js - 304 Not Modified (0ms)
|
53376
|
+
|
53377
|
+
|
53378
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:15 -0700 2012
|
53379
|
+
Served asset /application.js - 304 Not Modified (2ms)
|
53380
|
+
|
53381
|
+
|
53382
|
+
Started GET "/assets/bootstrap.v2.0.4.min.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:15 -0700 2012
|
53383
|
+
Served asset /bootstrap.v2.0.4.min.js - 304 Not Modified (2ms)
|
53384
|
+
|
53385
|
+
|
53386
|
+
Started GET "/assets/jquery.dataTables.v1.9.3.min.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:15 -0700 2012
|
53387
|
+
Served asset /jquery.dataTables.v1.9.3.min.js - 304 Not Modified (1ms)
|
53388
|
+
|
53389
|
+
|
53390
|
+
Started GET "/kaui/refunds" for 127.0.0.1 at Fri Aug 17 20:00:18 -0700 2012
|
53391
|
+
Processing by Kaui::RefundsController#index as HTML
|
53392
|
+
Rendered /Users/pierre/open-source/ning/killbill-admin-ui/app/views/kaui/refunds/index.html.erb within layouts/application (7.0ms)
|
53393
|
+
Completed 200 OK in 74ms (Views: 69.0ms | ActiveRecord: 0.0ms)
|
53394
|
+
|
53395
|
+
|
53396
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at Fri Aug 17 20:00:18 -0700 2012
|
53397
|
+
Served asset /application.css - 304 Not Modified (0ms)
|
53398
|
+
|
53399
|
+
|
53400
|
+
Started GET "/assets/bootstrap.v2.0.4.min.css?body=1" for 127.0.0.1 at Fri Aug 17 20:00:18 -0700 2012
|
53401
|
+
Served asset /bootstrap.v2.0.4.min.css - 304 Not Modified (2ms)
|
53402
|
+
|
53403
|
+
|
53404
|
+
Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:18 -0700 2012
|
53405
|
+
Served asset /jquery_ujs.js - 304 Not Modified (1ms)
|
53406
|
+
|
53407
|
+
|
53408
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:18 -0700 2012
|
53409
|
+
Served asset /application.js - 304 Not Modified (1ms)
|
53410
|
+
|
53411
|
+
|
53412
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:18 -0700 2012
|
53413
|
+
Served asset /jquery.js - 304 Not Modified (1ms)
|
53414
|
+
|
53415
|
+
|
53416
|
+
Started GET "/assets/bootstrap.v2.0.4.min.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:18 -0700 2012
|
53417
|
+
Served asset /bootstrap.v2.0.4.min.js - 304 Not Modified (1ms)
|
53418
|
+
|
53419
|
+
|
53420
|
+
Started GET "/assets/jquery.dataTables.v1.9.3.min.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:18 -0700 2012
|
53421
|
+
Served asset /jquery.dataTables.v1.9.3.min.js - 304 Not Modified (1ms)
|
53422
|
+
|
53423
|
+
|
53424
|
+
Started GET "/kaui/refunds?utf8=%E2%9C%93&refund_id=a85108be-4132-4384-b15e-9a650dc3a4ef&button=" for 127.0.0.1 at Fri Aug 17 20:00:26 -0700 2012
|
53425
|
+
Processing by Kaui::RefundsController#index as HTML
|
53426
|
+
Parameters: {"utf8"=>"✓", "refund_id"=>"a85108be-4132-4384-b15e-9a650dc3a4ef", "button"=>""}
|
53427
|
+
Redirected to http://127.0.0.1:3000/kaui/refunds/a85108be-4132-4384-b15e-9a650dc3a4ef
|
53428
|
+
Completed 302 Found in 11ms (ActiveRecord: 0.0ms)
|
53429
|
+
|
53430
|
+
|
53431
|
+
Started GET "/kaui/refunds/a85108be-4132-4384-b15e-9a650dc3a4ef" for 127.0.0.1 at Fri Aug 17 20:00:26 -0700 2012
|
53432
|
+
Processing by Kaui::RefundsController#show as HTML
|
53433
|
+
Parameters: {"id"=>"a85108be-4132-4384-b15e-9a650dc3a4ef"}
|
53434
|
+
Performing get request to http://z20046c.ningops.com:8080/1.0/kb/refunds/a85108be-4132-4384-b15e-9a650dc3a4ef
|
53435
|
+
Rendered /Users/pierre/open-source/ning/killbill-admin-ui/app/views/kaui/refunds/show.html.erb within layouts/application (13.0ms)
|
53436
|
+
Completed 200 OK in 174ms (Views: 45.0ms | ActiveRecord: 0.0ms)
|
53437
|
+
|
53438
|
+
|
53439
|
+
Started GET "/assets/bootstrap.v2.0.4.min.css?body=1" for 127.0.0.1 at Fri Aug 17 20:00:26 -0700 2012
|
53440
|
+
Served asset /bootstrap.v2.0.4.min.css - 304 Not Modified (0ms)
|
53441
|
+
|
53442
|
+
|
53443
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at Fri Aug 17 20:00:26 -0700 2012
|
53444
|
+
Served asset /application.css - 304 Not Modified (0ms)
|
53445
|
+
|
53446
|
+
|
53447
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:26 -0700 2012
|
53448
|
+
Served asset /jquery.js - 304 Not Modified (0ms)
|
53449
|
+
|
53450
|
+
|
53451
|
+
Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:26 -0700 2012
|
53452
|
+
Served asset /jquery_ujs.js - 304 Not Modified (1ms)
|
53453
|
+
|
53454
|
+
|
53455
|
+
Started GET "/assets/bootstrap.v2.0.4.min.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:26 -0700 2012
|
53456
|
+
Served asset /bootstrap.v2.0.4.min.js - 304 Not Modified (0ms)
|
53457
|
+
|
53458
|
+
|
53459
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:26 -0700 2012
|
53460
|
+
Served asset /application.js - 304 Not Modified (0ms)
|
53461
|
+
|
53462
|
+
|
53463
|
+
Started GET "/assets/jquery.dataTables.v1.9.3.min.js?body=1" for 127.0.0.1 at Fri Aug 17 20:00:26 -0700 2012
|
53464
|
+
Served asset /jquery.dataTables.v1.9.3.min.js - 304 Not Modified (1ms)
|