Skip to content

Commit

Permalink
utils fix for p_i, line_items and invoices
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeshmukh15 committed Aug 5, 2023
1 parent ee1f25d commit 3950bdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_all_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@
'hosted_invoice_url', # expect https://invoice.stripe.com/i/acct_14zvmQDcBSxinnbL/test...zcy0200wBekbjGw?s=ap
'invoice_pdf', # get https://invoice.stripe.com/i/acct_14zvmQDcBSxinnbL/test...DE102006vZ98t5I?s=ap
'payment_settings', # 'default_mandate' subfield unexpectedly present
'subscription_details'
},
'plans': set(),
'invoice_line_items': set()
Expand Down
3 changes: 3 additions & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,9 @@ def create_object(stream):
)
elif stream == 'invoices':
# Invoices requires the customer has an item associated with them
# Creating invoice record using olderversion because it generates invoice.lines data
# at the time of record creation itself
stripe_client.api_version = '2020-08-27'
item = client["{}_items".format(stream[:-1])].create(
amount=random.randint(1, 10000),
currency="usd",
Expand Down

0 comments on commit 3950bdc

Please sign in to comment.