-
Notifications
You must be signed in to change notification settings - Fork 432
Migration guide for v4
Kamil Pajdzik edited this page Jul 31, 2022
·
2 revisions
"
- Removed deprecated
AlipayAccount
,BitcoinReceiver
,BitcoinTransaction
,IssuerFraudRecord
,Recipient
,RecipientTransfer
, andThreeDSecure
classes. - Removed deprecated
Charge.update_dispute
andCharge.close_dispute
methods that were using legacy REST API endpoint. Prefer Dispute.modify and Dispute.close - Removed deprecated
Card.details
method andCardDetails
resource. The REST API endpoint is not longer supported. - Removed the deprecated
Source.source_transactions
method. PreferSubscriptionItem.list_source_transactions
# before source.source_transactions() # after Source.list_source_transactions(item.id)
- Removed the deprecated
SubscriptionItem.usage_record_summaries
method. PreferSubscriptionItem.list_usage_record_summaries
# before item.usage_record_summaries() # after SubscriptionItem.list_usage_record_summaries(item.id)
- Removed the deprecated
Charge.refund
method. Prefer Refund.create# before charge.refund() # after Refund.create(charge=charge.id)
- To be consistent with other resource methods,
ApplicationFee.refund
returns an instance ofApplicationFee
and doesn't mutate the instance ofApplicationFee
. To revert to old behavior:# before fee.refund() # after fee = fee.refund()
- To be consistent with other resource methods, the
Customer.delete_discount
no longer resets thediscount
property toNone
and returns the deleted discount instead. If you were relying on this behavior, reset the discount property manually:# before customer.delete_discount() # after customer.delete_discount() customer.discount = None
- The
LineItem
resource now inherits fromStripeObject
as it has no methods of it's own. - To be consistent with other resource methods, the
Subscription.delete_discount
returns an instance of deleted discount and doesn't mutate the instance ofSubscription
. To revert to old behavior:# before subscription.delete_discount() # after subscription = subscription.delete_discount()
- Update the CA certificate bundle.