You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returns successfully but doesn't clear out the blocked_categories on the cardholder and returns a cardholder instance with the previous blocked_categories list still set.
and that successfully clears the list of blocked_categories—however, there is no mention of the need to make this distinction when calling stripe.issuing.Cardholder.modify or any other method in the Stripe API docs or this library's docs and setting a list to empty by setting its value to "" is not valid Python syntax.
complete any requested test KYB information to ensure the account is fully verified and approved
create a cardholder via:
stripe.issuing.Cardholder.create(
name="Jane Doe",
email="[email protected]",
status="active",
type="individual",
billing={
"name": "Jane Doe",
"address": {
"line1": "117 West St",
"line2": None,
"city": "New York",
"state": "NY",
"country": "US",
"postal_code": "10006",
},
},
spending_controls={'blocked_categories': ['floor_covering_stores']},
stripe_account="acct_...", # id of the account created above
)
attempt to update the cardholder via:
stripe.issuing.Cardholder.modify(
"ich_...", # id of the cardholder created abovespending_controls={'blocked_categories': []},
stripe_account="acct_...", # id of the account created above
)
Expected behavior
Setting a list to [] should set that list to empty. It is not intuitive or valid Python syntax to set a list to empty by setting its value to "".
Code snippets
See code snippets in the "Describe the bug" and "To Reproduce" sections
OS
macOS
Language version
Python 3.10.2
Library version
stripe-python v2.67.0
API version
2019-10-17
Additional context
No response
The text was updated successfully, but these errors were encountered:
Somewhat related issue, some users have requested setting objects like Metadata to None should result in transmitting the empty string to unset: #753 (comment)
Describe the bug
When trying to clear out the list of previously set blocked_categories on a cardholder, calling
returns successfully but doesn't clear out the blocked_categories on the cardholder and returns a cardholder instance with the previous blocked_categories list still set.
Instead, it is necessary to replace [] with "":
and that successfully clears the list of blocked_categories—however, there is no mention of the need to make this distinction when calling stripe.issuing.Cardholder.modify or any other method in the Stripe API docs or this library's docs and setting a list to empty by setting its value to "" is not valid Python syntax.
To Reproduce
Expected behavior
Setting a list to [] should set that list to empty. It is not intuitive or valid Python syntax to set a list to empty by setting its value to "".
Code snippets
See code snippets in the "Describe the bug" and "To Reproduce" sections
OS
macOS
Language version
Python 3.10.2
Library version
stripe-python v2.67.0
API version
2019-10-17
Additional context
No response
The text was updated successfully, but these errors were encountered: