#MD-filter-auth
1 messages ยท Page 1 of 1 (latest)
Hello ๐
You can actually filter them while you're calling the list API
https://stripe.com/docs/api/issuing/authorizations/list
however, you won't be able to filter it based on the merchant unfortunately
ok thankyou
I tried to do stripe.issuing.Authorization.created.gt(1000) and it didn't work...
error: type object 'Authorization' has no attribute 'created'
you'd want to pass it as a parameter inside list(...)
what language are you using?
python
so in python created is a dictionary and then you'd pass gt as a key and set the value
I'm not super skilled in python but It should be something like
created=[gt=1000] or something similar
what's the error?
SyntaxError: expression cannot contain assignment
it should be created= a dictionary I think
I did: response = stripe.issuing.Authorization.list(created=gt["1000"])
I got this error: TypeError: 'builtin_function_or_method' object is not subscriptable
hmmm sorry about that, let me ask a colleague to see if they know the correct syntax for this
ok thankyou
that doesn't seem like python syntax it's coming up as red
ugh that's what I figured ๐ฆ
๐ the syntax hanzo gave you is real python
Can you clarify what the issue is and what exact error you get?
I did response = stripe.issuing.Authorization.list(created=["gte": <10000>]) and got '(' was not closed
it also says '[' wasn't closed
as you can see though it is closed
sure but that's not what my colleague told you to do
you're using square brackets [ ] and they said curly brackets { }
also < > shouldn't be here, it was just an example ๐
oops sorry
response = stripe.issuing.Authorization.list(created={"gte": 10000>})
I archived your other thread too since this is another question about python
Please ask here if you have a follow up question
@ripe merlin are you still having issues?
it's working now thankyou very much. I was just testing it
i have one more issue
I don't seem to be getting the has_more attribute
I'll paste here the request i sent
just print(response.has_more) and you'll see it
you're just misunderstanding python mostly really
Oh you're right that's weird. It wasn't anywhere in the file and i couldn't find it in the authorisation docs
why don't I see it in the response text?
because of the way you wrote your code mostly with your loop, you're already looking at each Authorization in the data array, not what is at the "list" level