#sneak-jackson_api

1 messages ยท Page 1 of 1 (latest)

vagrant tapirBOT
#

๐Ÿ‘‹ 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/1230153862975852544

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

dire mauveBOT
whole flare
quick zealot
#

I believe I tried this, so maybe I messed up structuring the query? Can you tell me if this is the correct way to structure the code:

#
const invoices = await stripe.invoices.search({
  query: 'number:XXXXXXXX-1234',
});
whole flare
#

That looks fine ๐Ÿค”
What happens if you do

  query: 'number:\'XXXXXXXX-1234\'',
});```
quick zealot
#

Having trouble with dropping this in because i was using string interpolation

#

{query: number:${invoiceNumber} }

#

I'll tee up a test case with the number hardcoded

whole flare
#

๐Ÿ‘

quick zealot
#

ok this works with the back slashes!

#

and the extra quotes

#

I'm very confused about this syntax

#

I think I'm starting to get it, it's an escapement of another set of quotes

whole flare
#

yeah for text values you'd need quotes

quick zealot
#

I'm surprised my string interpolation did not work

whole flare
#

without quotes, it assumes a numeric value

quick zealot
#

I guess I just include extra quotes?

#

Oh

#

Well that makes sense

#

Sorry that was not clear to me at first when building this query. Thanks for showing me that!

#

I think I can get my interpolation to work...

whole flare
#

All good! ๐Ÿ™‚ happy to help

dire mauveBOT