## Linear ticket - https://linear.app/chatwoot/issue/CW-7253/billing-brl-pix-new-users ## Description New accounts that sign up in Brazilian Portuguese are now billed in BRL instead of USD. Their Stripe customer is created with a Brazil address and Portuguese locale (so the Stripe portal offers Real prices and PIX), and the AI credit top-up flow shows packages priced in the account's billing currency. Currency support is config-driven, so adding another currency later is a configuration change rather than a code change. ## Type of change - [ ] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? - https://www.loom.com/share/c8d3d08c1b844ed6b820438d4209491a ## Screenshot <img width="904" height="440" alt="image" src="https://github.com/user-attachments/assets/6f19fad8-e6af-46ea-b99f-b0265bb9eeec" /> ## Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
46 lines
746 B
Ruby
46 lines
746 B
Ruby
class AccountPolicy < ApplicationPolicy
|
|
def show?
|
|
@account_user.administrator? || @account_user.agent?
|
|
end
|
|
|
|
def cache_keys?
|
|
@account_user.administrator? || @account_user.agent?
|
|
end
|
|
|
|
def limits?
|
|
@account_user.administrator? || @account_user.agent?
|
|
end
|
|
|
|
def update?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def update_active_at?
|
|
true
|
|
end
|
|
|
|
def subscription?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def select_billing_currency?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def checkout?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def toggle_deletion?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def topup_checkout?
|
|
@account_user.administrator?
|
|
end
|
|
|
|
def topup_options?
|
|
@account_user.administrator?
|
|
end
|
|
end
|