mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Rename billing to payment throughout the codebase (#726)
* Rename billing to payment throughout the codebase This change updates terminology from "billing" to "payment" to better reflect that these are contributions/payments rather than bills. Changes include: - Rename BillingsController to PaymentsController - Rename billing_email to payment_email - Rename next_billing_date to next_payment_date - Rename create_billing_portal_session_url to create_payment_portal_session_url - Update routes from billing to payment - Update all 12 locale files with new terminology - Update views, helpers, and tests * Update app/views/subscriptions/upgrade.html.erb Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Juan José Mata <jjmata@jjmata.com> --------- Signed-off-by: Juan José Mata <jjmata@jjmata.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,7 @@ module Family::Subscribeable
|
||||
has_one :subscription, dependent: :destroy
|
||||
end
|
||||
|
||||
def billing_email
|
||||
def payment_email
|
||||
primary_admin = users.admin.order(:created_at).first || users.super_admin.order(:created_at).first
|
||||
|
||||
unless primary_admin.present?
|
||||
@@ -45,7 +45,7 @@ module Family::Subscribeable
|
||||
subscription.nil? && !self_hoster?
|
||||
end
|
||||
|
||||
def next_billing_date
|
||||
def next_payment_date
|
||||
subscription&.current_period_ends_at
|
||||
end
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ class Provider::Stripe
|
||||
CheckoutSessionResult.new(success?: false, subscription_id: nil)
|
||||
end
|
||||
|
||||
def create_billing_portal_session_url(customer_id:, return_url:)
|
||||
def create_payment_portal_session_url(customer_id:, return_url:)
|
||||
client.v1.billing_portal.sessions.create(
|
||||
customer: customer_id,
|
||||
return_url: return_url
|
||||
|
||||
Reference in New Issue
Block a user