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
On a Subscription, the default_invoice_memo should be an Option. It will use the Subscription's memo if that exists, otherwise use the Plan's memo if that exists, otherwise the server returns null.
This problem does not occur when Subscriptions include memos or when Plans include memos. When neither includes a memo, then the client will fail to deserialize the response, for example in the case of create_subscription it will fail to deserialize and error out, but the request works.
I did not have that plan, so I created it. That reproduced this issue. Since this issue is not related to adding cancel subscription to this SDK, I just added a memo on my Plan to avoid the issue in that PR.
The text was updated successfully, but these errors were encountered:
sjmiller609
changed the title
Billing memo should be Option
default_invoice_memo should be an Option
Aug 30, 2024
On a Subscription, the default_invoice_memo should be an Option. It will use the Subscription's memo if that exists, otherwise use the Plan's memo if that exists, otherwise the server returns null.
rust-orb-billing/src/client/subscriptions.rs
Line 140 in 87d6697
This problem does not occur when Subscriptions include memos or when Plans include memos. When neither includes a memo, then the client will fail to deserialize the response, for example in the case of create_subscription it will fail to deserialize and error out, but the request works.
rust-orb-billing/src/client/subscriptions.rs
Lines 267 to 279 in 87d6697
I noticed this while adding my test for cancel subscription because in the test file, it assumes the existence of a plan in Orb.
rust-orb-billing/tests/api.rs
Line 591 in 87d6697
I did not have that plan, so I created it. That reproduced this issue. Since this issue is not related to adding cancel subscription to this SDK, I just added a memo on my Plan to avoid the issue in that PR.
The text was updated successfully, but these errors were encountered: