kaui 0.6.3 → 0.6.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.
- checksums.yaml +4 -4
 - data/Gemfile.lock +4 -4
 - data/app/controllers/kaui/custom_fields_controller.rb +29 -0
 - data/app/controllers/kaui/invoices_controller.rb +23 -1
 - data/app/controllers/kaui/payments_controller.rb +30 -0
 - data/app/controllers/kaui/refunds_controller.rb +28 -0
 - data/app/controllers/kaui/tags_controller.rb +30 -0
 - data/app/helpers/kaui/killbill_helper.rb +39 -3
 - data/app/views/kaui/custom_fields/index.html.erb +26 -0
 - data/app/views/kaui/invoices/index.html.erb +29 -0
 - data/app/views/kaui/layouts/kaui_application.html.erb +3 -0
 - data/app/views/kaui/payments/index.html.erb +28 -0
 - data/app/views/kaui/refunds/index.html.erb +29 -0
 - data/app/views/kaui/tags/index.html.erb +26 -0
 - data/config/routes.rb +18 -0
 - data/kaui.gemspec +1 -1
 - data/lib/kaui/version.rb +1 -1
 - metadata +9 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: ba4fb2216cb334d7ab4a8d047d3f7de1b503dce3
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: d1f1480db2b8e86dc9267b53d903c0ed36ff1396
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: f6bbb3c8147031ec93a807ab7addc82aaf067149f760011712cd83ba3baaf225f45bb88c580fc03cff8211fff4b760c91de9096aea9f7dd34e202aa045b9ef60
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 1393e6d4019ddf5784891bb8e735d217a39098643d189925d505a69a8b6f5ffbec4b16e8464ec7545a804ff0ed4b5ef1b1e9e80a8d493caf13febb0212dcb13f
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    | 
         @@ -1,12 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            PATH
         
     | 
| 
       2 
2 
     | 
    
         
             
              remote: .
         
     | 
| 
       3 
3 
     | 
    
         
             
              specs:
         
     | 
| 
       4 
     | 
    
         
            -
                kaui (0.6. 
     | 
| 
      
 4 
     | 
    
         
            +
                kaui (0.6.4)
         
     | 
| 
       5 
5 
     | 
    
         
             
                  cancan (~> 1.6.10)
         
     | 
| 
       6 
6 
     | 
    
         
             
                  d3_rails (~> 3.2.8)
         
     | 
| 
       7 
7 
     | 
    
         
             
                  devise (~> 3.0.2)
         
     | 
| 
       8 
8 
     | 
    
         
             
                  jquery-rails (~> 3.0.4)
         
     | 
| 
       9 
     | 
    
         
            -
                  killbill-client (~> 0.5. 
     | 
| 
      
 9 
     | 
    
         
            +
                  killbill-client (~> 0.5.9)
         
     | 
| 
       10 
10 
     | 
    
         
             
                  money-rails (~> 0.8.1)
         
     | 
| 
       11 
11 
     | 
    
         
             
                  rails (~> 3.2.14)
         
     | 
| 
       12 
12 
     | 
    
         
             
                  rest-client (~> 1.6.7)
         
     | 
| 
         @@ -60,7 +60,7 @@ GEM 
     | 
|
| 
       60 
60 
     | 
    
         
             
                  railties (>= 3.0, < 5.0)
         
     | 
| 
       61 
61 
     | 
    
         
             
                  thor (>= 0.14, < 2.0)
         
     | 
| 
       62 
62 
     | 
    
         
             
                json (1.8.1)
         
     | 
| 
       63 
     | 
    
         
            -
                killbill-client (0.5. 
     | 
| 
      
 63 
     | 
    
         
            +
                killbill-client (0.5.9)
         
     | 
| 
       64 
64 
     | 
    
         
             
                  json (~> 1.8.0)
         
     | 
| 
       65 
65 
     | 
    
         
             
                mail (2.5.4)
         
     | 
| 
       66 
66 
     | 
    
         
             
                  mime-types (~> 1.16)
         
     | 
| 
         @@ -72,7 +72,7 @@ GEM 
     | 
|
| 
       72 
72 
     | 
    
         
             
                  activesupport (>= 3.0)
         
     | 
| 
       73 
73 
     | 
    
         
             
                  money (~> 5.1.0)
         
     | 
| 
       74 
74 
     | 
    
         
             
                  railties (>= 3.0)
         
     | 
| 
       75 
     | 
    
         
            -
                multi_json (1.8. 
     | 
| 
      
 75 
     | 
    
         
            +
                multi_json (1.8.4)
         
     | 
| 
       76 
76 
     | 
    
         
             
                mysql2 (0.3.13)
         
     | 
| 
       77 
77 
     | 
    
         
             
                orm_adapter (0.5.0)
         
     | 
| 
       78 
78 
     | 
    
         
             
                polyglot (0.3.3)
         
     | 
| 
         @@ -0,0 +1,29 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            class Kaui::CustomFieldsController < Kaui::EngineController
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              def index
         
     | 
| 
      
 4 
     | 
    
         
            +
              end
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              def pagination
         
     | 
| 
      
 7 
     | 
    
         
            +
                json = { :sEcho => params[:sEcho], :iTotalRecords => 0, :iTotalDisplayRecords => 0, :aaData => [] }
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                search_key = params[:sSearch]
         
     | 
| 
      
 10 
     | 
    
         
            +
                if search_key.present?
         
     | 
| 
      
 11 
     | 
    
         
            +
                  custom_fields = Kaui::KillbillHelper::search_custom_fields(search_key, params[:iDisplayStart] || 0, params[:iDisplayLength] || 10, options_for_klient)
         
     | 
| 
      
 12 
     | 
    
         
            +
                else
         
     | 
| 
      
 13 
     | 
    
         
            +
                  custom_fields = Kaui::KillbillHelper::get_custom_fields(params[:iDisplayStart] || 0, params[:iDisplayLength] || 10, options_for_klient)
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
      
 15 
     | 
    
         
            +
                json[:iTotalDisplayRecords] = custom_fields.pagination_total_nb_records
         
     | 
| 
      
 16 
     | 
    
         
            +
                json[:iTotalRecords] = custom_fields.pagination_max_nb_records
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                custom_fields.each do |custom_field|
         
     | 
| 
      
 19 
     | 
    
         
            +
                  json[:aaData] << [
         
     | 
| 
      
 20 
     | 
    
         
            +
                                     custom_field.name,
         
     | 
| 
      
 21 
     | 
    
         
            +
                                     custom_field.value
         
     | 
| 
      
 22 
     | 
    
         
            +
                                   ]
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                respond_to do |format|
         
     | 
| 
      
 26 
     | 
    
         
            +
                  format.json { render :json => json }
         
     | 
| 
      
 27 
     | 
    
         
            +
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
              end
         
     | 
| 
      
 29 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -5,6 +5,28 @@ class Kaui::InvoicesController < Kaui::EngineController 
     | 
|
| 
       5 
5 
     | 
    
         
             
                end
         
     | 
| 
       6 
6 
     | 
    
         
             
              end
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
      
 8 
     | 
    
         
            +
              def pagination
         
     | 
| 
      
 9 
     | 
    
         
            +
                json = { :sEcho => params[:sEcho], :iTotalRecords => 0, :iTotalDisplayRecords => 0, :aaData => [] }
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                invoices = Kaui::KillbillHelper::get_invoices(params[:iDisplayStart] || 0, params[:iDisplayLength] || 10, options_for_klient)
         
     | 
| 
      
 12 
     | 
    
         
            +
                json[:iTotalDisplayRecords] = invoices.pagination_total_nb_records
         
     | 
| 
      
 13 
     | 
    
         
            +
                json[:iTotalRecords] = invoices.pagination_max_nb_records
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                invoices.each do |invoice|
         
     | 
| 
      
 16 
     | 
    
         
            +
                  json[:aaData] << [
         
     | 
| 
      
 17 
     | 
    
         
            +
                                     view_context.link_to(invoice.invoice_id, view_context.url_for(:controller => :invoices, :action => :show, :id => invoice.invoice_id)),
         
     | 
| 
      
 18 
     | 
    
         
            +
                                     invoice.invoice_number,
         
     | 
| 
      
 19 
     | 
    
         
            +
                                     view_context.format_date(invoice.invoice_date),
         
     | 
| 
      
 20 
     | 
    
         
            +
                                     view_context.humanized_money_with_symbol(Kaui::Base.to_money(invoice.amount, invoice.currency)),
         
     | 
| 
      
 21 
     | 
    
         
            +
                                     view_context.humanized_money_with_symbol(Kaui::Base.to_money(invoice.balance, invoice.currency))
         
     | 
| 
      
 22 
     | 
    
         
            +
                                   ]
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                respond_to do |format|
         
     | 
| 
      
 26 
     | 
    
         
            +
                  format.json { render :json => json }
         
     | 
| 
      
 27 
     | 
    
         
            +
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
              end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
       8 
30 
     | 
    
         
             
              def show
         
     | 
| 
       9 
31 
     | 
    
         
             
                invoice_id_or_number = params[:id]
         
     | 
| 
       10 
32 
     | 
    
         
             
                if invoice_id_or_number.present?
         
     | 
| 
         @@ -13,7 +35,7 @@ class Kaui::InvoicesController < Kaui::EngineController 
     | 
|
| 
       13 
35 
     | 
    
         
             
                    if @invoice.present?
         
     | 
| 
       14 
36 
     | 
    
         
             
                      @invoice_id = @invoice.invoice_id
         
     | 
| 
       15 
37 
     | 
    
         
             
                      @account = Kaui::KillbillHelper.get_account(@invoice.account_id, false, false, options_for_klient)
         
     | 
| 
       16 
     | 
    
         
            -
                      @payments = Kaui::KillbillHelper. 
     | 
| 
      
 38 
     | 
    
         
            +
                      @payments = Kaui::KillbillHelper.get_payments_for_invoice(@invoice_id, options_for_klient)
         
     | 
| 
       17 
39 
     | 
    
         
             
                      @payment_methods = {}
         
     | 
| 
       18 
40 
     | 
    
         
             
                      @payments.each do |payment|
         
     | 
| 
       19 
41 
     | 
    
         
             
                        # The payment method may have been deleted
         
     | 
| 
         @@ -1,5 +1,35 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            class Kaui::PaymentsController < Kaui::EngineController
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
              def index
         
     | 
| 
      
 4 
     | 
    
         
            +
              end
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              def pagination
         
     | 
| 
      
 7 
     | 
    
         
            +
                json = { :sEcho => params[:sEcho], :iTotalRecords => 0, :iTotalDisplayRecords => 0, :aaData => [] }
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                search_key = params[:sSearch]
         
     | 
| 
      
 10 
     | 
    
         
            +
                if search_key.present?
         
     | 
| 
      
 11 
     | 
    
         
            +
                  payments = Kaui::KillbillHelper::search_payments(search_key, params[:iDisplayStart] || 0, params[:iDisplayLength] || 10, options_for_klient)
         
     | 
| 
      
 12 
     | 
    
         
            +
                else
         
     | 
| 
      
 13 
     | 
    
         
            +
                  payments = Kaui::KillbillHelper::get_payments(params[:iDisplayStart] || 0, params[:iDisplayLength] || 10, options_for_klient)
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
      
 15 
     | 
    
         
            +
                json[:iTotalDisplayRecords] = payments.pagination_total_nb_records
         
     | 
| 
      
 16 
     | 
    
         
            +
                json[:iTotalRecords] = payments.pagination_max_nb_records
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                payments.each do |payment|
         
     | 
| 
      
 19 
     | 
    
         
            +
                  json[:aaData] << [
         
     | 
| 
      
 20 
     | 
    
         
            +
                                     view_context.link_to(payment.account_id, view_context.url_for(:controller => :accounts, :action => :show, :id => payment.account_id)),
         
     | 
| 
      
 21 
     | 
    
         
            +
                                     payment.payment_number,
         
     | 
| 
      
 22 
     | 
    
         
            +
                                     view_context.format_date(payment.effective_date),
         
     | 
| 
      
 23 
     | 
    
         
            +
                                     view_context.humanized_money_with_symbol(Kaui::Base.to_money(payment.amount, payment.currency)),
         
     | 
| 
      
 24 
     | 
    
         
            +
                                     payment.status
         
     | 
| 
      
 25 
     | 
    
         
            +
                                   ]
         
     | 
| 
      
 26 
     | 
    
         
            +
                end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                respond_to do |format|
         
     | 
| 
      
 29 
     | 
    
         
            +
                  format.json { render :json => json }
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
              end
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
       3 
33 
     | 
    
         
             
              def new
         
     | 
| 
       4 
34 
     | 
    
         
             
                @account_id = params[:account_id]
         
     | 
| 
       5 
35 
     | 
    
         
             
                @invoice_id = params[:invoice_id]
         
     | 
| 
         @@ -1,10 +1,38 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            class Kaui::RefundsController < Kaui::EngineController
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
       2 
3 
     | 
    
         
             
              def index
         
     | 
| 
       3 
4 
     | 
    
         
             
                if params[:refund_id].present?
         
     | 
| 
       4 
5 
     | 
    
         
             
                  redirect_to kaui_engine.refund_path(params[:refund_id])
         
     | 
| 
       5 
6 
     | 
    
         
             
                end
         
     | 
| 
       6 
7 
     | 
    
         
             
              end
         
     | 
| 
       7 
8 
     | 
    
         | 
| 
      
 9 
     | 
    
         
            +
              def pagination
         
     | 
| 
      
 10 
     | 
    
         
            +
                json = { :sEcho => params[:sEcho], :iTotalRecords => 0, :iTotalDisplayRecords => 0, :aaData => [] }
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                search_key = params[:sSearch]
         
     | 
| 
      
 13 
     | 
    
         
            +
                if search_key.present?
         
     | 
| 
      
 14 
     | 
    
         
            +
                  refunds = Kaui::KillbillHelper::search_refunds(search_key, params[:iDisplayStart] || 0, params[:iDisplayLength] || 10, options_for_klient)
         
     | 
| 
      
 15 
     | 
    
         
            +
                else
         
     | 
| 
      
 16 
     | 
    
         
            +
                  refunds = Kaui::KillbillHelper::get_refunds(params[:iDisplayStart] || 0, params[:iDisplayLength] || 10, options_for_klient)
         
     | 
| 
      
 17 
     | 
    
         
            +
                end
         
     | 
| 
      
 18 
     | 
    
         
            +
                json[:iTotalDisplayRecords] = refunds.pagination_total_nb_records
         
     | 
| 
      
 19 
     | 
    
         
            +
                json[:iTotalRecords] = refunds.pagination_max_nb_records
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                refunds.each do |refund|
         
     | 
| 
      
 22 
     | 
    
         
            +
                  json[:aaData] << [
         
     | 
| 
      
 23 
     | 
    
         
            +
                                     view_context.link_to(refund.refund_id, view_context.url_for(:controller => :refunds, :action => :show, :id => refund.refund_id)),
         
     | 
| 
      
 24 
     | 
    
         
            +
                                     view_context.format_date(refund.effective_date),
         
     | 
| 
      
 25 
     | 
    
         
            +
                                     view_context.humanized_money_with_symbol(Kaui::Base.to_money(refund.amount, refund.currency)),
         
     | 
| 
      
 26 
     | 
    
         
            +
                                     refund.adjusted,
         
     | 
| 
      
 27 
     | 
    
         
            +
                                     refund.status
         
     | 
| 
      
 28 
     | 
    
         
            +
                                   ]
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                respond_to do |format|
         
     | 
| 
      
 32 
     | 
    
         
            +
                  format.json { render :json => json }
         
     | 
| 
      
 33 
     | 
    
         
            +
                end
         
     | 
| 
      
 34 
     | 
    
         
            +
              end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
       8 
36 
     | 
    
         
             
              def show
         
     | 
| 
       9 
37 
     | 
    
         
             
                if params[:id].present?
         
     | 
| 
       10 
38 
     | 
    
         
             
                  begin
         
     | 
| 
         @@ -0,0 +1,30 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            class Kaui::TagsController < Kaui::EngineController
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              def index
         
     | 
| 
      
 4 
     | 
    
         
            +
              end
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              def pagination
         
     | 
| 
      
 7 
     | 
    
         
            +
                json = { :sEcho => params[:sEcho], :iTotalRecords => 0, :iTotalDisplayRecords => 0, :aaData => [] }
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                search_key = params[:sSearch]
         
     | 
| 
      
 10 
     | 
    
         
            +
                if search_key.present?
         
     | 
| 
      
 11 
     | 
    
         
            +
                  tags = Kaui::KillbillHelper::search_tags(search_key, params[:iDisplayStart] || 0, params[:iDisplayLength] || 10, options_for_klient)
         
     | 
| 
      
 12 
     | 
    
         
            +
                else
         
     | 
| 
      
 13 
     | 
    
         
            +
                  tags = Kaui::KillbillHelper::get_tags(params[:iDisplayStart] || 0, params[:iDisplayLength] || 10, options_for_klient)
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
      
 15 
     | 
    
         
            +
                json[:iTotalDisplayRecords] = tags.pagination_total_nb_records
         
     | 
| 
      
 16 
     | 
    
         
            +
                json[:iTotalRecords] = tags.pagination_max_nb_records
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                tags.each do |tag|
         
     | 
| 
      
 19 
     | 
    
         
            +
                  json[:aaData] << [
         
     | 
| 
      
 20 
     | 
    
         
            +
                                     tag.tag_id,
         
     | 
| 
      
 21 
     | 
    
         
            +
                                     tag.object_type,
         
     | 
| 
      
 22 
     | 
    
         
            +
                                     tag.tag_definition_name,
         
     | 
| 
      
 23 
     | 
    
         
            +
                                   ]
         
     | 
| 
      
 24 
     | 
    
         
            +
                end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                respond_to do |format|
         
     | 
| 
      
 27 
     | 
    
         
            +
                  format.json { render :json => json }
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
              end
         
     | 
| 
      
 30 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -225,6 +225,10 @@ module Kaui 
     | 
|
| 
       225 
225 
     | 
    
         | 
| 
       226 
226 
     | 
    
         
             
                ############## INVOICE ##############
         
     | 
| 
       227 
227 
     | 
    
         | 
| 
      
 228 
     | 
    
         
            +
                def self.get_invoices(offset, limit, options = {})
         
     | 
| 
      
 229 
     | 
    
         
            +
                  KillBillClient::Model::Invoice.find_in_batches offset, limit, options
         
     | 
| 
      
 230 
     | 
    
         
            +
                end
         
     | 
| 
      
 231 
     | 
    
         
            +
             
     | 
| 
       228 
232 
     | 
    
         
             
                def self.get_invoice(id_or_number, with_items = true, audit = "NONE", options = {})
         
     | 
| 
       229 
233 
     | 
    
         
             
                  KillBillClient::Model::Invoice.find_by_id_or_number id_or_number, with_items, audit, options
         
     | 
| 
       230 
234 
     | 
    
         
             
                end
         
     | 
| 
         @@ -244,7 +248,7 @@ module Kaui 
     | 
|
| 
       244 
248 
     | 
    
         
             
                def self.new_invoice_item(invoice_item)
         
     | 
| 
       245 
249 
     | 
    
         
             
                  item = KillBillClient::Model::InvoiceItem.new
         
     | 
| 
       246 
250 
     | 
    
         
             
                  invoice_item.each do |attribute, value|
         
     | 
| 
       247 
     | 
    
         
            -
                    item.methods.include?("#{attribute}=".to_sym) ? 
     | 
| 
      
 251 
     | 
    
         
            +
                    item.methods.include?("#{attribute}=".to_sym) ?
         
     | 
| 
       248 
252 
     | 
    
         
             
                    item.send("#{attribute}=".to_sym, value) : next
         
     | 
| 
       249 
253 
     | 
    
         
             
                  end
         
     | 
| 
       250 
254 
     | 
    
         
             
                  item
         
     | 
| 
         @@ -309,12 +313,20 @@ module Kaui 
     | 
|
| 
       309 
313 
     | 
    
         | 
| 
       310 
314 
     | 
    
         
             
                ############## PAYMENT ##############
         
     | 
| 
       311 
315 
     | 
    
         | 
| 
      
 316 
     | 
    
         
            +
                def self.get_payments(offset, limit, options = {})
         
     | 
| 
      
 317 
     | 
    
         
            +
                  KillBillClient::Model::Payment.find_in_batches offset, limit, options
         
     | 
| 
      
 318 
     | 
    
         
            +
                end
         
     | 
| 
      
 319 
     | 
    
         
            +
             
     | 
| 
      
 320 
     | 
    
         
            +
                def self.search_payments(search_key, offset, limit, options = {})
         
     | 
| 
      
 321 
     | 
    
         
            +
                  KillBillClient::Model::Payment.find_in_batches_by_search_key search_key, offset, limit, options
         
     | 
| 
      
 322 
     | 
    
         
            +
                end
         
     | 
| 
      
 323 
     | 
    
         
            +
             
     | 
| 
       312 
324 
     | 
    
         
             
                def self.get_payment(payment_id, options = {})
         
     | 
| 
       313 
325 
     | 
    
         
             
                  data = call_killbill :get, "/1.0/kb/payments/#{payment_id}", options
         
     | 
| 
       314 
326 
     | 
    
         
             
                  process_response(data, :single) { |json| Kaui::Payment.new(json) }
         
     | 
| 
       315 
327 
     | 
    
         
             
                end
         
     | 
| 
       316 
328 
     | 
    
         | 
| 
       317 
     | 
    
         
            -
                def self. 
     | 
| 
      
 329 
     | 
    
         
            +
                def self.get_payments_for_invoice(invoice_id, options = {})
         
     | 
| 
       318 
330 
     | 
    
         
             
                  data = call_killbill :get, "/1.0/kb/invoices/#{invoice_id}/payments", options
         
     | 
| 
       319 
331 
     | 
    
         
             
                  response_data = process_response(data, :multiple) { |json| Kaui::Payment.new(json) }
         
     | 
| 
       320 
332 
     | 
    
         
             
                  return response_data
         
     | 
| 
         @@ -375,6 +387,14 @@ module Kaui 
     | 
|
| 
       375 
387 
     | 
    
         | 
| 
       376 
388 
     | 
    
         
             
                ############## REFUND ##############
         
     | 
| 
       377 
389 
     | 
    
         | 
| 
      
 390 
     | 
    
         
            +
                def self.get_refunds(offset, limit, options = {})
         
     | 
| 
      
 391 
     | 
    
         
            +
                  KillBillClient::Model::Refund.find_in_batches offset, limit, options
         
     | 
| 
      
 392 
     | 
    
         
            +
                end
         
     | 
| 
      
 393 
     | 
    
         
            +
             
     | 
| 
      
 394 
     | 
    
         
            +
                def self.search_refunds(search_key, offset, limit, options = {})
         
     | 
| 
      
 395 
     | 
    
         
            +
                  KillBillClient::Model::Refund.find_in_batches_by_search_key search_key, offset, limit, options
         
     | 
| 
      
 396 
     | 
    
         
            +
                end
         
     | 
| 
      
 397 
     | 
    
         
            +
             
     | 
| 
       378 
398 
     | 
    
         
             
                def self.get_refund(refund_id, options = {})
         
     | 
| 
       379 
399 
     | 
    
         
             
                  KillBillClient::Model::Refund.find_by_id refund_id, options
         
     | 
| 
       380 
400 
     | 
    
         
             
                end
         
     | 
| 
         @@ -431,7 +451,7 @@ module Kaui 
     | 
|
| 
       431 
451 
     | 
    
         
             
                  new_credit.invoice_id = credit['invoice_id']
         
     | 
| 
       432 
452 
     | 
    
         
             
                  new_credit.effective_date = credit['effective_date']
         
     | 
| 
       433 
453 
     | 
    
         
             
                  new_credit.account_id = credit['account_id']
         
     | 
| 
       434 
     | 
    
         
            -
             
     | 
| 
      
 454 
     | 
    
         
            +
             
     | 
| 
       435 
455 
     | 
    
         
             
                  new_credit.create(extract_created_by(current_user),
         
     | 
| 
       436 
456 
     | 
    
         
             
                                    extract_reason_code(reason),
         
     | 
| 
       437 
457 
     | 
    
         
             
                                    comment,
         
     | 
| 
         @@ -440,6 +460,14 @@ module Kaui 
     | 
|
| 
       440 
460 
     | 
    
         | 
| 
       441 
461 
     | 
    
         
             
                ############## TAG ##############
         
     | 
| 
       442 
462 
     | 
    
         | 
| 
      
 463 
     | 
    
         
            +
                def self.get_tags(offset, limit, options = {})
         
     | 
| 
      
 464 
     | 
    
         
            +
                  KillBillClient::Model::Tag.find_in_batches offset, limit, options
         
     | 
| 
      
 465 
     | 
    
         
            +
                end
         
     | 
| 
      
 466 
     | 
    
         
            +
             
     | 
| 
      
 467 
     | 
    
         
            +
                def self.search_tags(search_key, offset, limit, options = {})
         
     | 
| 
      
 468 
     | 
    
         
            +
                  KillBillClient::Model::Tag.find_in_batches_by_search_key search_key, offset, limit, options
         
     | 
| 
      
 469 
     | 
    
         
            +
                end
         
     | 
| 
      
 470 
     | 
    
         
            +
             
     | 
| 
       443 
471 
     | 
    
         
             
                def self.get_tag_definitions(options = {})
         
     | 
| 
       444 
472 
     | 
    
         
             
                  data = call_killbill :get, "/1.0/kb/tagDefinitions", options
         
     | 
| 
       445 
473 
     | 
    
         
             
                  process_response(data, :multiple) { |json| Kaui::TagDefinition.new(json) }
         
     | 
| 
         @@ -499,6 +527,14 @@ module Kaui 
     | 
|
| 
       499 
527 
     | 
    
         | 
| 
       500 
528 
     | 
    
         
             
                ############## CUSTOM FIELDS ##############
         
     | 
| 
       501 
529 
     | 
    
         | 
| 
      
 530 
     | 
    
         
            +
                def self.get_custom_fields(offset, limit, options = {})
         
     | 
| 
      
 531 
     | 
    
         
            +
                  KillBillClient::Model::CustomField.find_in_batches offset, limit, options
         
     | 
| 
      
 532 
     | 
    
         
            +
                end
         
     | 
| 
      
 533 
     | 
    
         
            +
             
     | 
| 
      
 534 
     | 
    
         
            +
                def self.search_custom_fields(search_key, offset, limit, options = {})
         
     | 
| 
      
 535 
     | 
    
         
            +
                  KillBillClient::Model::CustomField.find_in_batches_by_search_key search_key, offset, limit, options
         
     | 
| 
      
 536 
     | 
    
         
            +
                end
         
     | 
| 
      
 537 
     | 
    
         
            +
             
     | 
| 
       502 
538 
     | 
    
         
             
                def self.get_custom_fields_for_account(account_id, options = {})
         
     | 
| 
       503 
539 
     | 
    
         
             
                  data = call_killbill :get, "/1.0/kb/accounts/#{account_id}/customFields", options
         
     | 
| 
       504 
540 
     | 
    
         
             
                  process_response(data, :multiple) { |json| Kaui::CustomField.new(json) }
         
     | 
| 
         @@ -0,0 +1,26 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <table id="custom_fields-table" class="table table-condensed">
         
     | 
| 
      
 2 
     | 
    
         
            +
              <thead>
         
     | 
| 
      
 3 
     | 
    
         
            +
                <tr>
         
     | 
| 
      
 4 
     | 
    
         
            +
                  <th>Tag ID</th>
         
     | 
| 
      
 5 
     | 
    
         
            +
                  <th>Object type</th>
         
     | 
| 
      
 6 
     | 
    
         
            +
                  <th>Tag definition name</th>
         
     | 
| 
      
 7 
     | 
    
         
            +
                </tr>
         
     | 
| 
      
 8 
     | 
    
         
            +
              </thead>
         
     | 
| 
      
 9 
     | 
    
         
            +
              <tbody>
         
     | 
| 
      
 10 
     | 
    
         
            +
                <tr>
         
     | 
| 
      
 11 
     | 
    
         
            +
                  <td colspan="1" class="dataTables_empty">Loading data from server</td>
         
     | 
| 
      
 12 
     | 
    
         
            +
                </tr>
         
     | 
| 
      
 13 
     | 
    
         
            +
              </tbody>
         
     | 
| 
      
 14 
     | 
    
         
            +
            </table>
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            <%= javascript_tag do %>
         
     | 
| 
      
 17 
     | 
    
         
            +
            $(document).ready(function() {
         
     | 
| 
      
 18 
     | 
    
         
            +
              $('#custom_fields-table').dataTable({
         
     | 
| 
      
 19 
     | 
    
         
            +
                "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
         
     | 
| 
      
 20 
     | 
    
         
            +
                "sPaginationType": "bootstrap",
         
     | 
| 
      
 21 
     | 
    
         
            +
                "bProcessing": true,
         
     | 
| 
      
 22 
     | 
    
         
            +
                "bServerSide": true,
         
     | 
| 
      
 23 
     | 
    
         
            +
                "sAjaxSource": "<%= custom_fields_pagination_path :format => :json %>"
         
     | 
| 
      
 24 
     | 
    
         
            +
              });
         
     | 
| 
      
 25 
     | 
    
         
            +
            });
         
     | 
| 
      
 26 
     | 
    
         
            +
            <% end %>
         
     | 
| 
         @@ -12,3 +12,32 @@ 
     | 
|
| 
       12 
12 
     | 
    
         
             
                </div>
         
     | 
| 
       13 
13 
     | 
    
         
             
              </fieldset>
         
     | 
| 
       14 
14 
     | 
    
         
             
            <% end %>
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            <table id="invoices-table" class="table table-condensed">
         
     | 
| 
      
 17 
     | 
    
         
            +
              <thead>
         
     | 
| 
      
 18 
     | 
    
         
            +
                <tr>
         
     | 
| 
      
 19 
     | 
    
         
            +
                  <th>Invoice ID</th>
         
     | 
| 
      
 20 
     | 
    
         
            +
                  <th>Invoice number</th>
         
     | 
| 
      
 21 
     | 
    
         
            +
                  <th>Date</th>
         
     | 
| 
      
 22 
     | 
    
         
            +
                  <th>Amount</th>
         
     | 
| 
      
 23 
     | 
    
         
            +
                  <th>Balance</th>
         
     | 
| 
      
 24 
     | 
    
         
            +
                </tr>
         
     | 
| 
      
 25 
     | 
    
         
            +
              </thead>
         
     | 
| 
      
 26 
     | 
    
         
            +
              <tbody>
         
     | 
| 
      
 27 
     | 
    
         
            +
                <tr>
         
     | 
| 
      
 28 
     | 
    
         
            +
                  <td colspan="1" class="dataTables_empty">Loading data from server</td>
         
     | 
| 
      
 29 
     | 
    
         
            +
                </tr>
         
     | 
| 
      
 30 
     | 
    
         
            +
              </tbody>
         
     | 
| 
      
 31 
     | 
    
         
            +
            </table>
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            <%= javascript_tag do %>
         
     | 
| 
      
 34 
     | 
    
         
            +
            $(document).ready(function() {
         
     | 
| 
      
 35 
     | 
    
         
            +
              $('#invoices-table').dataTable({
         
     | 
| 
      
 36 
     | 
    
         
            +
                "sDom": "<'row-fluid'<'span6'l><'span6'>r>t<'row-fluid'<'span6'i><'span6'p>>",
         
     | 
| 
      
 37 
     | 
    
         
            +
                "sPaginationType": "bootstrap",
         
     | 
| 
      
 38 
     | 
    
         
            +
                "bProcessing": true,
         
     | 
| 
      
 39 
     | 
    
         
            +
                "bServerSide": true,
         
     | 
| 
      
 40 
     | 
    
         
            +
                "sAjaxSource": "<%= invoices_pagination_path :format => :json %>"
         
     | 
| 
      
 41 
     | 
    
         
            +
              });
         
     | 
| 
      
 42 
     | 
    
         
            +
            });
         
     | 
| 
      
 43 
     | 
    
         
            +
            <% end %>
         
     | 
| 
         @@ -13,10 +13,13 @@ 
     | 
|
| 
       13 
13 
     | 
    
         
             
                      <ul class="nav">
         
     | 
| 
       14 
14 
     | 
    
         
             
                        <li <%= "class='active'" if params[:controller] == 'accounts' %>><%= link_to "Accounts", kaui_engine.accounts_path %></li>
         
     | 
| 
       15 
15 
     | 
    
         
             
                        <li <%= "class='active'" if params[:controller] == 'bundles' %>><%= link_to "Bundles", kaui_engine.bundles_path %></li>
         
     | 
| 
      
 16 
     | 
    
         
            +
                        <li <%= "class='active'" if params[:controller] == 'payments' %>><%= link_to "Payments", kaui_engine.payments_path %></li>
         
     | 
| 
       16 
17 
     | 
    
         
             
                        <li <%= "class='active'" if params[:controller] == 'payment_methods' %>><%= link_to "Payment methods", kaui_engine.payment_methods_path %></li>
         
     | 
| 
       17 
18 
     | 
    
         
             
                        <li <%= "class='active'" if params[:controller] == 'invoices' %>><%= link_to "Invoices", kaui_engine.invoices_path %></li>
         
     | 
| 
       18 
19 
     | 
    
         
             
                        <li <%= "class='active'" if params[:controller] == 'refunds' %>><%= link_to "Refunds", kaui_engine.refunds_path %></li>
         
     | 
| 
       19 
20 
     | 
    
         
             
                        <li <%= "class='active'" if params[:controller] == 'tag_definitions' %>><%= link_to "Tag definitions", kaui_engine.tag_definitions_path %></li>
         
     | 
| 
      
 21 
     | 
    
         
            +
                        <li <%= "class='active'" if params[:controller] == 'tags' %>><%= link_to "Tags", kaui_engine.tags_path %></li>
         
     | 
| 
      
 22 
     | 
    
         
            +
                        <li <%= "class='active'" if params[:controller] == 'custom_fields' %>><%= link_to "Custom Fields", kaui_engine.custom_fields_path %></li>
         
     | 
| 
       20 
23 
     | 
    
         
             
                        <li <%= "class='active'" if params[:controller] == 'analytics' %>><%= link_to "Analytics", kaui_engine.analytics_path %></li>
         
     | 
| 
       21 
24 
     | 
    
         
             
                      </ul>
         
     | 
| 
       22 
25 
     | 
    
         
             
                      <ul class="nav pull-right">
         
     | 
| 
         @@ -0,0 +1,28 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <table id="payments-table" class="table table-condensed">
         
     | 
| 
      
 2 
     | 
    
         
            +
              <thead>
         
     | 
| 
      
 3 
     | 
    
         
            +
                <tr>
         
     | 
| 
      
 4 
     | 
    
         
            +
                  <th>Account ID</th>
         
     | 
| 
      
 5 
     | 
    
         
            +
                  <th>Payment number</th>
         
     | 
| 
      
 6 
     | 
    
         
            +
                  <th>Date</th>
         
     | 
| 
      
 7 
     | 
    
         
            +
                  <th>Amount</th>
         
     | 
| 
      
 8 
     | 
    
         
            +
                  <th>Status</th>
         
     | 
| 
      
 9 
     | 
    
         
            +
                </tr>
         
     | 
| 
      
 10 
     | 
    
         
            +
              </thead>
         
     | 
| 
      
 11 
     | 
    
         
            +
              <tbody>
         
     | 
| 
      
 12 
     | 
    
         
            +
                <tr>
         
     | 
| 
      
 13 
     | 
    
         
            +
                  <td colspan="1" class="dataTables_empty">Loading data from server</td>
         
     | 
| 
      
 14 
     | 
    
         
            +
                </tr>
         
     | 
| 
      
 15 
     | 
    
         
            +
              </tbody>
         
     | 
| 
      
 16 
     | 
    
         
            +
            </table>
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            <%= javascript_tag do %>
         
     | 
| 
      
 19 
     | 
    
         
            +
            $(document).ready(function() {
         
     | 
| 
      
 20 
     | 
    
         
            +
              $('#payments-table').dataTable({
         
     | 
| 
      
 21 
     | 
    
         
            +
                "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
         
     | 
| 
      
 22 
     | 
    
         
            +
                "sPaginationType": "bootstrap",
         
     | 
| 
      
 23 
     | 
    
         
            +
                "bProcessing": true,
         
     | 
| 
      
 24 
     | 
    
         
            +
                "bServerSide": true,
         
     | 
| 
      
 25 
     | 
    
         
            +
                "sAjaxSource": "<%= payments_pagination_path :format => :json %>"
         
     | 
| 
      
 26 
     | 
    
         
            +
              });
         
     | 
| 
      
 27 
     | 
    
         
            +
            });
         
     | 
| 
      
 28 
     | 
    
         
            +
            <% end %>
         
     | 
| 
         @@ -12,3 +12,32 @@ 
     | 
|
| 
       12 
12 
     | 
    
         
             
                </div>
         
     | 
| 
       13 
13 
     | 
    
         
             
              </fieldset>
         
     | 
| 
       14 
14 
     | 
    
         
             
            <% end %>
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            <table id="refunds-table" class="table table-condensed">
         
     | 
| 
      
 17 
     | 
    
         
            +
              <thead>
         
     | 
| 
      
 18 
     | 
    
         
            +
                <tr>
         
     | 
| 
      
 19 
     | 
    
         
            +
                  <th>Refund ID</th>
         
     | 
| 
      
 20 
     | 
    
         
            +
                  <th>Date</th>
         
     | 
| 
      
 21 
     | 
    
         
            +
                  <th>Amount</th>
         
     | 
| 
      
 22 
     | 
    
         
            +
                  <th>Adjusted?</th>
         
     | 
| 
      
 23 
     | 
    
         
            +
                  <th>Status</th>
         
     | 
| 
      
 24 
     | 
    
         
            +
                </tr>
         
     | 
| 
      
 25 
     | 
    
         
            +
              </thead>
         
     | 
| 
      
 26 
     | 
    
         
            +
              <tbody>
         
     | 
| 
      
 27 
     | 
    
         
            +
                <tr>
         
     | 
| 
      
 28 
     | 
    
         
            +
                  <td colspan="1" class="dataTables_empty">Loading data from server</td>
         
     | 
| 
      
 29 
     | 
    
         
            +
                </tr>
         
     | 
| 
      
 30 
     | 
    
         
            +
              </tbody>
         
     | 
| 
      
 31 
     | 
    
         
            +
            </table>
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            <%= javascript_tag do %>
         
     | 
| 
      
 34 
     | 
    
         
            +
            $(document).ready(function() {
         
     | 
| 
      
 35 
     | 
    
         
            +
              $('#refunds-table').dataTable({
         
     | 
| 
      
 36 
     | 
    
         
            +
                "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
         
     | 
| 
      
 37 
     | 
    
         
            +
                "sPaginationType": "bootstrap",
         
     | 
| 
      
 38 
     | 
    
         
            +
                "bProcessing": true,
         
     | 
| 
      
 39 
     | 
    
         
            +
                "bServerSide": true,
         
     | 
| 
      
 40 
     | 
    
         
            +
                "sAjaxSource": "<%= refunds_pagination_path :format => :json %>"
         
     | 
| 
      
 41 
     | 
    
         
            +
              });
         
     | 
| 
      
 42 
     | 
    
         
            +
            });
         
     | 
| 
      
 43 
     | 
    
         
            +
            <% end %>
         
     | 
| 
         @@ -0,0 +1,26 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <table id="tags-table" class="table table-condensed">
         
     | 
| 
      
 2 
     | 
    
         
            +
              <thead>
         
     | 
| 
      
 3 
     | 
    
         
            +
                <tr>
         
     | 
| 
      
 4 
     | 
    
         
            +
                  <th>Tag ID</th>
         
     | 
| 
      
 5 
     | 
    
         
            +
                  <th>Object type</th>
         
     | 
| 
      
 6 
     | 
    
         
            +
                  <th>Tag definition name</th>
         
     | 
| 
      
 7 
     | 
    
         
            +
                </tr>
         
     | 
| 
      
 8 
     | 
    
         
            +
              </thead>
         
     | 
| 
      
 9 
     | 
    
         
            +
              <tbody>
         
     | 
| 
      
 10 
     | 
    
         
            +
                <tr>
         
     | 
| 
      
 11 
     | 
    
         
            +
                  <td colspan="1" class="dataTables_empty">Loading data from server</td>
         
     | 
| 
      
 12 
     | 
    
         
            +
                </tr>
         
     | 
| 
      
 13 
     | 
    
         
            +
              </tbody>
         
     | 
| 
      
 14 
     | 
    
         
            +
            </table>
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            <%= javascript_tag do %>
         
     | 
| 
      
 17 
     | 
    
         
            +
            $(document).ready(function() {
         
     | 
| 
      
 18 
     | 
    
         
            +
              $('#tags-table').dataTable({
         
     | 
| 
      
 19 
     | 
    
         
            +
                "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
         
     | 
| 
      
 20 
     | 
    
         
            +
                "sPaginationType": "bootstrap",
         
     | 
| 
      
 21 
     | 
    
         
            +
                "bProcessing": true,
         
     | 
| 
      
 22 
     | 
    
         
            +
                "bServerSide": true,
         
     | 
| 
      
 23 
     | 
    
         
            +
                "sAjaxSource": "<%= tags_pagination_path :format => :json %>"
         
     | 
| 
      
 24 
     | 
    
         
            +
              });
         
     | 
| 
      
 25 
     | 
    
         
            +
            });
         
     | 
| 
      
 26 
     | 
    
         
            +
            <% end %>
         
     | 
    
        data/config/routes.rb
    CHANGED
    
    | 
         @@ -43,6 +43,9 @@ Kaui::Engine.routes.draw do 
     | 
|
| 
       43 
43 
     | 
    
         | 
| 
       44 
44 
     | 
    
         
             
              resources :external_payments, :only => [ :create, :new ]
         
     | 
| 
       45 
45 
     | 
    
         | 
| 
      
 46 
     | 
    
         
            +
              scope "/payments" do
         
     | 
| 
      
 47 
     | 
    
         
            +
                match "/pagination" => "payments#pagination", :via => :get, :as => "payments_pagination"
         
     | 
| 
      
 48 
     | 
    
         
            +
              end
         
     | 
| 
       46 
49 
     | 
    
         
             
              resources :payments, :only => [ :create, :new, :index, :show ]
         
     | 
| 
       47 
50 
     | 
    
         | 
| 
       48 
51 
     | 
    
         
             
              scope "/payment_methods" do
         
     | 
| 
         @@ -50,8 +53,14 @@ Kaui::Engine.routes.draw do 
     | 
|
| 
       50 
53 
     | 
    
         
             
              end
         
     | 
| 
       51 
54 
     | 
    
         
             
              resources :payment_methods, :only => [ :index, :show, :destroy ]
         
     | 
| 
       52 
55 
     | 
    
         | 
| 
      
 56 
     | 
    
         
            +
              scope "/refunds" do
         
     | 
| 
      
 57 
     | 
    
         
            +
                match "/pagination" => "refunds#pagination", :via => :get, :as => "refunds_pagination"
         
     | 
| 
      
 58 
     | 
    
         
            +
              end
         
     | 
| 
       53 
59 
     | 
    
         
             
              resources :refunds, :only => [ :index, :show, :create, :new ]
         
     | 
| 
       54 
60 
     | 
    
         | 
| 
      
 61 
     | 
    
         
            +
              scope "/invoices" do
         
     | 
| 
      
 62 
     | 
    
         
            +
                match "/pagination" => "invoices#pagination", :via => :get, :as => "invoices_pagination"
         
     | 
| 
      
 63 
     | 
    
         
            +
              end
         
     | 
| 
       55 
64 
     | 
    
         
             
              resources :invoices, :only => [ :index, :show ] do
         
     | 
| 
       56 
65 
     | 
    
         
             
                member do
         
     | 
| 
       57 
66 
     | 
    
         
             
                  get :show_html
         
     | 
| 
         @@ -94,4 +103,13 @@ Kaui::Engine.routes.draw do 
     | 
|
| 
       94 
103 
     | 
    
         
             
                match "/edit" => "bundle_tags#update", :via => :post, :as => "update_bundle_tags"
         
     | 
| 
       95 
104 
     | 
    
         
             
              end
         
     | 
| 
       96 
105 
     | 
    
         | 
| 
      
 106 
     | 
    
         
            +
              scope "/tags" do
         
     | 
| 
      
 107 
     | 
    
         
            +
                match "/pagination" => "tags#pagination", :via => :get, :as => "tags_pagination"
         
     | 
| 
      
 108 
     | 
    
         
            +
              end
         
     | 
| 
      
 109 
     | 
    
         
            +
              resources :tags, :only => [ :create, :new, :index, :show ]
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
              scope "/custom_fields" do
         
     | 
| 
      
 112 
     | 
    
         
            +
                match "/pagination" => "custom_fields#pagination", :via => :get, :as => "custom_fields_pagination"
         
     | 
| 
      
 113 
     | 
    
         
            +
              end
         
     | 
| 
      
 114 
     | 
    
         
            +
              resources :custom_fields, :only => [ :create, :new, :index, :show ]
         
     | 
| 
       97 
115 
     | 
    
         
             
            end
         
     | 
    
        data/kaui.gemspec
    CHANGED
    
    | 
         @@ -27,7 +27,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       27 
27 
     | 
    
         
             
              s.add_dependency 'rest-client', '~> 1.6.7'
         
     | 
| 
       28 
28 
     | 
    
         
             
              s.add_dependency 'money-rails', '~> 0.8.1'
         
     | 
| 
       29 
29 
     | 
    
         
             
              s.add_dependency 'd3_rails', '~> 3.2.8'
         
     | 
| 
       30 
     | 
    
         
            -
              s.add_dependency 'killbill-client', '~> 0.5. 
     | 
| 
      
 30 
     | 
    
         
            +
              s.add_dependency 'killbill-client', '~> 0.5.9'
         
     | 
| 
       31 
31 
     | 
    
         
             
              s.add_dependency 'devise', '~> 3.0.2'
         
     | 
| 
       32 
32 
     | 
    
         
             
              s.add_dependency 'cancan', '~> 1.6.10'
         
     | 
| 
       33 
33 
     | 
    
         | 
    
        data/lib/kaui/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: kaui
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.6. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.6.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Killbill core team
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014-01- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-01-21 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -86,14 +86,14 @@ dependencies: 
     | 
|
| 
       86 
86 
     | 
    
         
             
                requirements:
         
     | 
| 
       87 
87 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       88 
88 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       89 
     | 
    
         
            -
                    version: 0.5. 
     | 
| 
      
 89 
     | 
    
         
            +
                    version: 0.5.9
         
     | 
| 
       90 
90 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       91 
91 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       92 
92 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       93 
93 
     | 
    
         
             
                requirements:
         
     | 
| 
       94 
94 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       95 
95 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       96 
     | 
    
         
            -
                    version: 0.5. 
     | 
| 
      
 96 
     | 
    
         
            +
                    version: 0.5.9
         
     | 
| 
       97 
97 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       98 
98 
     | 
    
         
             
              name: devise
         
     | 
| 
       99 
99 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -179,6 +179,7 @@ files: 
     | 
|
| 
       179 
179 
     | 
    
         
             
            - app/controllers/kaui/chargebacks_controller.rb
         
     | 
| 
       180 
180 
     | 
    
         
             
            - app/controllers/kaui/charges_controller.rb
         
     | 
| 
       181 
181 
     | 
    
         
             
            - app/controllers/kaui/credits_controller.rb
         
     | 
| 
      
 182 
     | 
    
         
            +
            - app/controllers/kaui/custom_fields_controller.rb
         
     | 
| 
       182 
183 
     | 
    
         
             
            - app/controllers/kaui/engine_controller.rb
         
     | 
| 
       183 
184 
     | 
    
         
             
            - app/controllers/kaui/home_controller.rb
         
     | 
| 
       184 
185 
     | 
    
         
             
            - app/controllers/kaui/invoice_items_controller.rb
         
     | 
| 
         @@ -189,6 +190,7 @@ files: 
     | 
|
| 
       189 
190 
     | 
    
         
             
            - app/controllers/kaui/sessions_controller.rb
         
     | 
| 
       190 
191 
     | 
    
         
             
            - app/controllers/kaui/subscriptions_controller.rb
         
     | 
| 
       191 
192 
     | 
    
         
             
            - app/controllers/kaui/tag_definitions_controller.rb
         
     | 
| 
      
 193 
     | 
    
         
            +
            - app/controllers/kaui/tags_controller.rb
         
     | 
| 
       192 
194 
     | 
    
         
             
            - app/helpers/kaui/application_helper.rb
         
     | 
| 
       193 
195 
     | 
    
         
             
            - app/helpers/kaui/date_helper.rb
         
     | 
| 
       194 
196 
     | 
    
         
             
            - app/helpers/kaui/home_helper.rb
         
     | 
| 
         @@ -257,6 +259,7 @@ files: 
     | 
|
| 
       257 
259 
     | 
    
         
             
            - app/views/kaui/credits/index.html.erb
         
     | 
| 
       258 
260 
     | 
    
         
             
            - app/views/kaui/credits/new.html.erb
         
     | 
| 
       259 
261 
     | 
    
         
             
            - app/views/kaui/credits/show.html.erb
         
     | 
| 
      
 262 
     | 
    
         
            +
            - app/views/kaui/custom_fields/index.html.erb
         
     | 
| 
       260 
263 
     | 
    
         
             
            - app/views/kaui/home/index.html.erb
         
     | 
| 
       261 
264 
     | 
    
         
             
            - app/views/kaui/invoice_items/edit.html.erb
         
     | 
| 
       262 
265 
     | 
    
         
             
            - app/views/kaui/invoice_items/index.html.erb
         
     | 
| 
         @@ -270,6 +273,7 @@ files: 
     | 
|
| 
       270 
273 
     | 
    
         
             
            - app/views/kaui/payment_methods/new.html.erb
         
     | 
| 
       271 
274 
     | 
    
         
             
            - app/views/kaui/payment_methods/show.html.erb
         
     | 
| 
       272 
275 
     | 
    
         
             
            - app/views/kaui/payments/_payments_table.html.erb
         
     | 
| 
      
 276 
     | 
    
         
            +
            - app/views/kaui/payments/index.html.erb
         
     | 
| 
       273 
277 
     | 
    
         
             
            - app/views/kaui/payments/new.html.erb
         
     | 
| 
       274 
278 
     | 
    
         
             
            - app/views/kaui/refunds/_refunds_table.html.erb
         
     | 
| 
       275 
279 
     | 
    
         
             
            - app/views/kaui/refunds/index.html.erb
         
     | 
| 
         @@ -287,6 +291,7 @@ files: 
     | 
|
| 
       287 
291 
     | 
    
         
             
            - app/views/kaui/tag_definitions/new.html.erb
         
     | 
| 
       288 
292 
     | 
    
         
             
            - app/views/kaui/tag_definitions/show.html.erb
         
     | 
| 
       289 
293 
     | 
    
         
             
            - app/views/kaui/tags/_tags_table.html.erb
         
     | 
| 
      
 294 
     | 
    
         
            +
            - app/views/kaui/tags/index.html.erb
         
     | 
| 
       290 
295 
     | 
    
         
             
            - bin/kaui
         
     | 
| 
       291 
296 
     | 
    
         
             
            - config/initializers/devise.rb
         
     | 
| 
       292 
297 
     | 
    
         
             
            - config/initializers/kilbill-client-init.rb
         
     |