#niller_code
1 messages Β· Page 1 of 1 (latest)
π Welcome to your new thread!
β²οΈ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
β±οΈ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
π This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1422533854119591988
π Have more to share? Add more details, code, screenshots, videos, etc. below.
π Hi there! Let me take a look at this for you
Hi. Thanks.
Here is the preview generation code that is not cut short:
def preview_subscription_upgrade(
self,
customer_id: str,
subscription_id: str,
new_price_id: str,
new_quantity: int,
) -> stripe.Invoice:
subscription = self.stripe_client.subscriptions.retrieve(subscription_id)
subscription_item_id = subscription["items"]["data"][0]["id"]
return self.stripe_client.invoices.create_preview(
params={
"customer": customer_id,
"subscription": subscription_id,
"subscription_details": {
"items": [
{
"id": subscription_item_id,
"price": new_price_id,
"quantity": new_quantity,
}
],
"proration_date": int(time.time()),
"proration_behavior": "always_invoice",
},
}
)
Do you have an example response (e.g. req_xxx ID) that's not localised? Or a screenshot?
But the InvoiceLineItem description is something that you provide, and I would not expect to be localised somehow.
Got it, thanks!
Taking a look at how this should work
But yeah, I see the customer has da-DK as their preferred locale
Yes, exactly. Thanks!
Still looking! π
So it looks like this should work as expected (i.e. using the customer's preferred locale), however we don't currently have a Danish translation for this particular textβ¦
I'll pass this onto the relevant team internally, and see if we can get this fixed!
Okay thanks for your time
If you'd like, I can open a support ticket for you, and I can get back to you asynchronously with updates on this
Yes that would be very nice!
Alright. You'll receive a message where you just need to fill out the form to get a ticket π