## 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
35 lines
2.1 KiB
Ruby
35 lines
2.1 KiB
Ruby
json.settings resource.settings
|
|
json.created_at resource.created_at
|
|
if resource.custom_attributes.present?
|
|
json.custom_attributes do
|
|
json.plan_name resource.custom_attributes['plan_name']
|
|
json.subscribed_quantity resource.custom_attributes['subscribed_quantity']
|
|
json.subscription_status resource.custom_attributes['subscription_status']
|
|
json.subscription_ends_on resource.custom_attributes['subscription_ends_on']
|
|
json.billing_currency resource.billing_currency if resource.respond_to?(:billing_currency) && Enterprise::Billing::Currencies.enabled?
|
|
json.website resource.custom_attributes['website'] if resource.custom_attributes['website'].present?
|
|
json.industry resource.custom_attributes['industry'] if resource.custom_attributes['industry'].present?
|
|
json.company_size resource.custom_attributes['company_size'] if resource.custom_attributes['company_size'].present?
|
|
json.timezone resource.custom_attributes['timezone'] if resource.custom_attributes['timezone'].present?
|
|
json.logo resource.custom_attributes['logo'] if resource.custom_attributes['logo'].present?
|
|
json.referral_source resource.custom_attributes['referral_source'] if resource.custom_attributes['referral_source'].present?
|
|
json.brand_info resource.custom_attributes['brand_info'] if resource.custom_attributes['brand_info'].present?
|
|
json.onboarding_step resource.onboarding_step if resource.onboarding_step.present?
|
|
if resource.custom_attributes['help_center_generation_id'].present?
|
|
json.help_center_generation_id resource.custom_attributes['help_center_generation_id']
|
|
end
|
|
json.marked_for_deletion_at resource.custom_attributes['marked_for_deletion_at'] if resource.custom_attributes['marked_for_deletion_at'].present?
|
|
if resource.custom_attributes['marked_for_deletion_reason'].present?
|
|
json.marked_for_deletion_reason resource.custom_attributes['marked_for_deletion_reason']
|
|
end
|
|
end
|
|
end
|
|
json.domain @account.domain
|
|
json.features @account.enabled_features
|
|
json.id @account.id
|
|
json.locale @account.locale
|
|
json.name @account.name
|
|
json.support_email @account.support_email
|
|
json.status @account.status
|
|
json.cache_keys @account.cache_keys
|