phcdevworks_accounts_stripe 0.1.4 → 0.2.0

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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -20
  3. data/README.md +1 -28
  4. data/Rakefile +8 -8
  5. data/app/assets/config/phcdevworks_accounts_stripe_manifest.js +3 -3
  6. data/app/assets/javascripts/phcdevworks_accounts_stripe/admin/invoices.coffee +3 -0
  7. data/app/assets/stylesheets/phcdevworks_accounts_stripe/admin/customers.css +4 -4
  8. data/app/assets/stylesheets/phcdevworks_accounts_stripe/admin/invoices.scss +3 -0
  9. data/app/assets/stylesheets/phcdevworks_accounts_stripe/admin/plans.css +4 -4
  10. data/app/assets/stylesheets/phcdevworks_accounts_stripe/admin/subscriptions.css +4 -4
  11. data/app/assets/stylesheets/phcdevworks_accounts_stripe/application.css +15 -15
  12. data/app/assets/stylesheets/phcdevworks_accounts_stripe/user/invoices.css +4 -4
  13. data/app/assets/stylesheets/phcdevworks_accounts_stripe/user/plan.css +4 -4
  14. data/app/assets/stylesheets/phcdevworks_accounts_stripe/user/subscription.css +4 -4
  15. data/app/controllers/phcdevworks_accounts_stripe/admin/customers_controller.rb +17 -17
  16. data/app/controllers/phcdevworks_accounts_stripe/admin/invoices_controller.rb +17 -0
  17. data/app/controllers/phcdevworks_accounts_stripe/admin/products_controller.rb +16 -16
  18. data/app/controllers/phcdevworks_accounts_stripe/admin/subscriptions_controller.rb +16 -16
  19. data/app/controllers/phcdevworks_accounts_stripe/application_controller.rb +10 -10
  20. data/app/controllers/phcdevworks_accounts_stripe/user/invoices_controller.rb +19 -19
  21. data/app/controllers/phcdevworks_accounts_stripe/user/product_controller.rb +13 -13
  22. data/app/controllers/phcdevworks_accounts_stripe/user/subscription_controller.rb +18 -18
  23. data/app/helpers/phcdevworks_accounts_stripe/admin/customers_helper.rb +4 -4
  24. data/app/helpers/phcdevworks_accounts_stripe/admin/invoices_helper.rb +4 -0
  25. data/app/helpers/phcdevworks_accounts_stripe/admin/plans_helper.rb +4 -4
  26. data/app/helpers/phcdevworks_accounts_stripe/admin/subscriptions_helper.rb +4 -4
  27. data/app/helpers/phcdevworks_accounts_stripe/application_helper.rb +18 -18
  28. data/app/helpers/phcdevworks_accounts_stripe/user/invoices_helper.rb +4 -4
  29. data/app/helpers/phcdevworks_accounts_stripe/user/plan_helper.rb +4 -4
  30. data/app/helpers/phcdevworks_accounts_stripe/user/subscription_helper.rb +4 -4
  31. data/app/jobs/phcdevworks_accounts_stripe/application_job.rb +4 -4
  32. data/app/mailers/phcdevworks_accounts_stripe/application_mailer.rb +6 -6
  33. data/app/models/phcdevworks_accounts_stripe/application_record.rb +5 -5
  34. data/app/views/layouts/phcdevworks_accounts_stripe/application.html.erb +66 -66
  35. data/app/views/layouts/phcdevworks_accounts_stripe/components/backend/footer/_footer.html.erb +0 -0
  36. data/app/views/layouts/phcdevworks_accounts_stripe/components/backend/navigation/_top_menu.html.erb +0 -0
  37. data/app/views/layouts/phcdevworks_accounts_stripe/components/backend/sidebars/_side_menu.html.erb +67 -5
  38. data/app/views/phcdevworks_accounts_stripe/admin/customers/admin_customer_list.html.erb +66 -66
  39. data/app/views/phcdevworks_accounts_stripe/admin/invoices/admin_invoice_list.html.erb +89 -0
  40. data/app/views/phcdevworks_accounts_stripe/admin/products/admin_products_list.html.erb +68 -68
  41. data/app/views/phcdevworks_accounts_stripe/admin/subscriptions/admin_subscription_list.html.erb +75 -75
  42. data/app/views/phcdevworks_accounts_stripe/user/invoices/user_invoice_item.html.erb +0 -0
  43. data/app/views/phcdevworks_accounts_stripe/user/invoices/user_invoice_list.html.erb +88 -88
  44. data/app/views/phcdevworks_accounts_stripe/user/products/user_product_list.html.erb +66 -66
  45. data/app/views/phcdevworks_accounts_stripe/user/subscription/user_subscription_cancel.html.erb +66 -66
  46. data/app/views/phcdevworks_accounts_stripe/user/subscription/user_subscription_item.html.erb +70 -70
  47. data/config/initializers/stripe.rb +8 -8
  48. data/config/routes.rb +17 -16
  49. data/lib/phcdevworks_accounts_stripe/engine.rb +47 -47
  50. data/lib/phcdevworks_accounts_stripe/version.rb +3 -3
  51. data/lib/phcdevworks_accounts_stripe.rb +6 -6
  52. data/lib/tasks/phcdevworks_accounts_stripe_tasks.rake +4 -4
  53. metadata +34 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f88bc00a705c8a7942a705e7b767943726baeab45df82481e76ad202d9bfa86
4
- data.tar.gz: e006cfdc84752e2ceff0efd96ad2debdd7148596a3f5afd83ce9842dd0ab8030
3
+ metadata.gz: 3a346b3414cfeb2c87c47e4f6f8b436d485db7d230a6c6ef90219e346988618f
4
+ data.tar.gz: 8db8dd176e1d4c9cbc253a690c5ad8e7466897170f632a0056b90199e31cdcc0
5
5
  SHA512:
6
- metadata.gz: 1c9e069a4fcde09dcd0f115cc78c204d7c78e7f0799ede1a7e1bea30267c4a252352bbeded87619f8259c1714bdb673513810a3e8f0b7d5cd0333a646c0a5ea2
7
- data.tar.gz: 2d8397c3f55f3256519dadcf9624b339be62c351b5035e03dcfb17ef3a722f6a41133a4b7789c2e912665de9b7c0ea45c387e3eee75f4b304519d7a67973561b
6
+ metadata.gz: b5c2902f220303e0f785d1ad43ca10a9093b153f4325f5b78bf9664b1003a95589b562388cb15d960bdfecb7a206f60add2f8a7b97d9eb64273c5570ac54f633
7
+ data.tar.gz: 30d0d8a4e4c27fe37683fea8b9d9fb3b55f1722e96cd9e9b6ce3df8764e97dd9f0bc97dfa4b1ce27b94194a5cb574f1de6be7f68e2d28572978b59a0e4bb59c7
data/MIT-LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright 2021 BradPotts
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright 2021 BradPotts
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,28 +1 @@
1
- # PhcdevworksAccountsStripe
2
- Short description and motivation.
3
-
4
- ## Usage
5
- How to use my plugin.
6
-
7
- ## Installation
8
- Add this line to your application's Gemfile:
9
-
10
- ```ruby
11
- gem 'phcdevworks_accounts_stripe'
12
- ```
13
-
14
- And then execute:
15
- ```bash
16
- $ bundle
17
- ```
18
-
19
- Or install it yourself as:
20
- ```bash
21
- $ gem install phcdevworks_accounts_stripe
22
- ```
23
-
24
- ## Contributing
25
- Contribution directions go here.
26
-
27
- ## License
28
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
1
+ [![Gem Version](https://badge.fury.io/rb/phcdevworks_accounts_stripe.svg)](https://badge.fury.io/rb/phcdevworks_accounts_stripe)
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
- require "bundler/setup"
2
-
3
- APP_RAKEFILE = File.expand_path("spec/test_app/Rakefile", __dir__)
4
- load "rails/tasks/engine.rake"
5
-
6
- load "rails/tasks/statistics.rake"
7
-
8
- require "bundler/gem_tasks"
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("spec/test_app/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
@@ -1,3 +1,3 @@
1
- //= link_directory ../stylesheets/phcdevworks_accounts_stripe .scss
2
- //= link phcthemes_admin_panel_pack_coloradmin.css
3
- //= link phcthemes_admin_panel_pack_coloradmin.js
1
+ //= link_directory ../stylesheets/phcdevworks_accounts_stripe .scss
2
+ //= link phcthemes_admin_panel_pack_coloradmin.css
3
+ //= link phcthemes_admin_panel_pack_coloradmin.js
@@ -0,0 +1,3 @@
1
+ # Place all the behaviors and hooks related to the matching controller here.
2
+ # All this logic will automatically be available in application.js.
3
+ # You can use CoffeeScript in this file: http://coffeescript.org/
@@ -1,4 +1,4 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the admin/invoices controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: https://sass-lang.com/
@@ -1,4 +1,4 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -1,4 +1,4 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -1,15 +1,15 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -1,4 +1,4 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -1,4 +1,4 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -1,4 +1,4 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -1,17 +1,17 @@
1
- require_dependency "phcdevworks_accounts_stripe/application_controller"
2
-
3
- module PhcdevworksAccountsStripe
4
- class Admin::CustomersController < ApplicationController
5
-
6
- # Filters
7
- before_action :authenticate_user!
8
- include PhcdevworksCore::PhcdevworksPluginsHelper
9
- before_action :phcdevworks_accounts_admin_only
10
-
11
- # Customers - List
12
- def admin_customer_list
13
- @admin_customer_list = Stripe::Customer.list({limit: 100})
14
- end
15
-
16
- end
17
- end
1
+ require_dependency "phcdevworks_accounts_stripe/application_controller"
2
+
3
+ module PhcdevworksAccountsStripe
4
+ class Admin::CustomersController < ApplicationController
5
+
6
+ # Filters
7
+ before_action :authenticate_user!
8
+ include PhcdevworksCore::PhcdevworksPluginsHelper
9
+ before_action :phcdevworks_accounts_admin_only
10
+
11
+ # Customers - List
12
+ def admin_customer_list
13
+ @admin_customer_list = Stripe::Customer.list({limit: 100})
14
+ end
15
+
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ require_dependency "phcdevworks_accounts_stripe/application_controller"
2
+
3
+ module PhcdevworksAccountsStripe
4
+ class Admin::InvoicesController < ApplicationController
5
+
6
+ # Filters
7
+ before_action :authenticate_user!
8
+ include PhcdevworksCore::PhcdevworksPluginsHelper
9
+ before_action :phcdevworks_accounts_admin_only
10
+
11
+ # Customers - List
12
+ def admin_invoice_list
13
+ @admin_invoice_list = Stripe::Invoice.list({limit: 100})
14
+ end
15
+
16
+ end
17
+ end
@@ -1,16 +1,16 @@
1
- require_dependency "phcdevworks_accounts_stripe/application_controller"
2
-
3
- module PhcdevworksAccountsStripe
4
- class Admin::ProductsController < ApplicationController
5
-
6
- # Filters
7
- before_action :authenticate_user!
8
- include PhcdevworksCore::PhcdevworksPluginsHelper
9
- before_action :phcdevworks_accounts_admin_only
10
-
11
- def admin_products_list
12
- @admin_products_list = Stripe::Product.list
13
- end
14
-
15
- end
16
- end
1
+ require_dependency "phcdevworks_accounts_stripe/application_controller"
2
+
3
+ module PhcdevworksAccountsStripe
4
+ class Admin::ProductsController < ApplicationController
5
+
6
+ # Filters
7
+ before_action :authenticate_user!
8
+ include PhcdevworksCore::PhcdevworksPluginsHelper
9
+ before_action :phcdevworks_accounts_admin_only
10
+
11
+ def admin_products_list
12
+ @admin_products_list = Stripe::Product.list
13
+ end
14
+
15
+ end
16
+ end
@@ -1,16 +1,16 @@
1
- require_dependency "phcdevworks_accounts_stripe/application_controller"
2
-
3
- module PhcdevworksAccountsStripe
4
- class Admin::SubscriptionsController < ApplicationController
5
-
6
- # Filters
7
- before_action :authenticate_user!
8
- include PhcdevworksCore::PhcdevworksPluginsHelper
9
- before_action :phcdevworks_accounts_admin_only
10
-
11
- def admin_subscription_list
12
- @admin_subscription_list = Stripe::Subscription.list({limit: 100})
13
- end
14
-
15
- end
16
- end
1
+ require_dependency "phcdevworks_accounts_stripe/application_controller"
2
+
3
+ module PhcdevworksAccountsStripe
4
+ class Admin::SubscriptionsController < ApplicationController
5
+
6
+ # Filters
7
+ before_action :authenticate_user!
8
+ include PhcdevworksCore::PhcdevworksPluginsHelper
9
+ before_action :phcdevworks_accounts_admin_only
10
+
11
+ def admin_subscription_list
12
+ @admin_subscription_list = Stripe::Subscription.list({limit: 100})
13
+ end
14
+
15
+ end
16
+ end
@@ -1,10 +1,10 @@
1
- module PhcdevworksAccountsStripe
2
- class ApplicationController < ActionController::Base
3
-
4
- # Load Requried Helper Files
5
- helper PhcdevworksActiveMenus::Engine.helpers
6
- helper PhcdevworksNotifications::Engine.helpers
7
- helper PhcdevworksTitleseo::Engine.helpers
8
-
9
- end
10
- end
1
+ module PhcdevworksAccountsStripe
2
+ class ApplicationController < ActionController::Base
3
+
4
+ # Load Requried Helper Files
5
+ helper PhcdevworksActiveMenus::Engine.helpers
6
+ helper PhcdevworksNotifications::Engine.helpers
7
+ helper PhcdevworksTitleseo::Engine.helpers
8
+
9
+ end
10
+ end
@@ -1,19 +1,19 @@
1
- require_dependency "phcdevworks_accounts_stripe/application_controller"
2
-
3
- module PhcdevworksAccountsStripe
4
- class User::InvoicesController < ApplicationController
5
-
6
- # Security Filters
7
- before_action :authenticate_user!
8
-
9
- def user_invoice_list
10
- @user_invoice_list = Stripe::Invoice.list({customer: current_user.stripe_customer_id})
11
- end
12
-
13
- def user_invoice_item
14
-
15
-
16
- end
17
-
18
- end
19
- end
1
+ require_dependency "phcdevworks_accounts_stripe/application_controller"
2
+
3
+ module PhcdevworksAccountsStripe
4
+ class User::InvoicesController < ApplicationController
5
+
6
+ # Security Filters
7
+ before_action :authenticate_user!
8
+
9
+ def user_invoice_list
10
+ @user_invoice_list = Stripe::Invoice.list({customer: current_user.payments_customer_id})
11
+ end
12
+
13
+ def user_invoice_item
14
+
15
+
16
+ end
17
+
18
+ end
19
+ end
@@ -1,13 +1,13 @@
1
- require_dependency "phcdevworks_accounts_stripe/application_controller"
2
-
3
- module PhcdevworksAccountsStripe
4
- class User::ProductController < ApplicationController
5
-
6
- # Security Filters
7
- before_action :authenticate_user!
8
-
9
- def user_product_list
10
- end
11
-
12
- end
13
- end
1
+ require_dependency "phcdevworks_accounts_stripe/application_controller"
2
+
3
+ module PhcdevworksAccountsStripe
4
+ class User::ProductController < ApplicationController
5
+
6
+ # Security Filters
7
+ before_action :authenticate_user!
8
+
9
+ def user_product_list
10
+ end
11
+
12
+ end
13
+ end
@@ -1,18 +1,18 @@
1
- require_dependency "phcdevworks_accounts_stripe/application_controller"
2
-
3
- module PhcdevworksAccountsStripe
4
- class User::SubscriptionController < ApplicationController
5
-
6
- # Security Filters
7
- before_action :authenticate_user!
8
-
9
- def user_subscription_item
10
- @user_subscription_item = Stripe::Subscription.list({customer: current_user.stripe_customer_id})
11
-
12
- end
13
-
14
- def user_subscription_cancel
15
- end
16
-
17
- end
18
- end
1
+ require_dependency "phcdevworks_accounts_stripe/application_controller"
2
+
3
+ module PhcdevworksAccountsStripe
4
+ class User::SubscriptionController < ApplicationController
5
+
6
+ # Security Filters
7
+ before_action :authenticate_user!
8
+
9
+ def user_subscription_item
10
+ @user_subscription_item = Stripe::Subscription.list({customer: current_user.payments_customer_id})
11
+
12
+ end
13
+
14
+ def user_subscription_cancel
15
+ end
16
+
17
+ end
18
+ end
@@ -1,4 +1,4 @@
1
- module PhcdevworksAccountsStripe
2
- module Admin::CustomersHelper
3
- end
4
- end
1
+ module PhcdevworksAccountsStripe
2
+ module Admin::CustomersHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module PhcdevworksAccountsStripe
2
+ module Admin::InvoicesHelper
3
+ end
4
+ end
@@ -1,4 +1,4 @@
1
- module PhcdevworksAccountsStripe
2
- module Admin::PlansHelper
3
- end
4
- end
1
+ module PhcdevworksAccountsStripe
2
+ module Admin::PlansHelper
3
+ end
4
+ end
@@ -1,4 +1,4 @@
1
- module PhcdevworksAccountsStripe
2
- module Admin::SubscriptionsHelper
3
- end
4
- end
1
+ module PhcdevworksAccountsStripe
2
+ module Admin::SubscriptionsHelper
3
+ end
4
+ end
@@ -1,18 +1,18 @@
1
- module PhcdevworksAccountsStripe
2
- module ApplicationHelper
3
-
4
- # PHCAccountsStripe - Invoice Status
5
- def phcdev_invoice_status(status)
6
- colors = {
7
- 'draft' => 'badge badge-secondary',
8
- 'open' => 'badge-success',
9
- 'paid' => 'badge-green',
10
- 'uncollectible' => 'badge-danger',
11
- 'void' => 'badge-dark'
12
- }
13
- content_tag(:span, class: "badge #{colors[status]} badge-square") do
14
- end
15
- end
16
-
17
- end
18
- end
1
+ module PhcdevworksAccountsStripe
2
+ module ApplicationHelper
3
+
4
+ # PHCAccountsStripe - Invoice Status
5
+ def phcdev_invoice_status(status)
6
+ colors = {
7
+ 'draft' => 'badge badge-secondary',
8
+ 'open' => 'badge-success',
9
+ 'paid' => 'badge-green',
10
+ 'uncollectible' => 'badge-danger',
11
+ 'void' => 'badge-dark'
12
+ }
13
+ content_tag(:span, class: "badge #{colors[status]} badge-square") do
14
+ end
15
+ end
16
+
17
+ end
18
+ end
@@ -1,4 +1,4 @@
1
- module PhcdevworksAccountsStripe
2
- module User::InvoicesHelper
3
- end
4
- end
1
+ module PhcdevworksAccountsStripe
2
+ module User::InvoicesHelper
3
+ end
4
+ end
@@ -1,4 +1,4 @@
1
- module PhcdevworksAccountsStripe
2
- module User::PlanHelper
3
- end
4
- end
1
+ module PhcdevworksAccountsStripe
2
+ module User::PlanHelper
3
+ end
4
+ end
@@ -1,4 +1,4 @@
1
- module PhcdevworksAccountsStripe
2
- module User::SubscriptionHelper
3
- end
4
- end
1
+ module PhcdevworksAccountsStripe
2
+ module User::SubscriptionHelper
3
+ end
4
+ end
@@ -1,4 +1,4 @@
1
- module PhcdevworksAccountsStripe
2
- class ApplicationJob < ActiveJob::Base
3
- end
4
- end
1
+ module PhcdevworksAccountsStripe
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -1,6 +1,6 @@
1
- module PhcdevworksAccountsStripe
2
- class ApplicationMailer < ActionMailer::Base
3
- default from: 'from@example.com'
4
- layout 'mailer'
5
- end
6
- end
1
+ module PhcdevworksAccountsStripe
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'from@example.com'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -1,5 +1,5 @@
1
- module PhcdevworksAccountsStripe
2
- class ApplicationRecord < ActiveRecord::Base
3
- self.abstract_class = true
4
- end
5
- end
1
+ module PhcdevworksAccountsStripe
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end