#niller_code

1 messages Β· Page 1 of 1 (latest)

crystal lagoonBOT
#

πŸ‘‹ 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.

violet geyser
#

πŸ‘‹ Hi there! Let me take a look at this for you

crystal scaffold
#

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",
                },
            }
        )
violet geyser
#

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.

crystal scaffold
#

Here for example: req_31Fu48dH6JkiL8

violet geyser
#

Got it, thanks!

#

Taking a look at how this should work

#

But yeah, I see the customer has da-DK as their preferred locale

crystal scaffold
#

Yes, exactly. Thanks!

crystal lagoonBOT
violet geyser
#

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!

crystal scaffold
#

Okay thanks for your time

violet geyser
#

If you'd like, I can open a support ticket for you, and I can get back to you asynchronously with updates on this

crystal scaffold
#

Yes that would be very nice!

violet geyser
#

Alright. You'll receive a message where you just need to fill out the form to get a ticket πŸ‘