File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
lago_python_client/models Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class SubscriptionResponse(BaseResponseModel):
45
45
current_billing_period_started_at : Optional [str ]
46
46
current_billing_period_ending_at : Optional [str ]
47
47
on_termination_credit_note : Optional [str ]
48
+ on_termination_invoice : Optional [str ]
48
49
49
50
50
51
class SubscriptionsResponse (BaseResponseModel ):
Original file line number Diff line number Diff line change 12
12
"billing_time" : " anniversary" ,
13
13
"terminated_at" : null ,
14
14
"on_termination_credit_note" : " skip" ,
15
+ "on_termination_invoice" : " skip" ,
15
16
"subscription_at" : " 2022-04-29T08:59:51Z" ,
16
17
"previous_plan_code" : null ,
17
18
"next_plan_code" : null ,
Original file line number Diff line number Diff line change @@ -140,21 +140,26 @@ def test_valid_destroy_subscription_request(httpx_mock: HTTPXMock):
140
140
assert response .plan_code == "eartha lynch"
141
141
142
142
143
- def test_valid_destroy_subscription_with_on_termination_credit_note_request (httpx_mock : HTTPXMock ):
143
+ def test_valid_destroy_subscription_with_on_termination_actions_request (httpx_mock : HTTPXMock ):
144
144
client = Client (api_key = "886fe239-927d-4072-ab72-6dd345e8dd0d" )
145
145
identifier = "sub_id"
146
146
147
147
httpx_mock .add_response (
148
148
method = "DELETE" ,
149
- url = "https://api.getlago.com/api/v1/subscriptions/" + identifier + "?on_termination_credit_note=skip" ,
149
+ url = "https://api.getlago.com/api/v1/subscriptions/"
150
+ + identifier
151
+ + "?on_termination_credit_note=skip&on_termination_invoice=skip" ,
150
152
content = mock_response (),
151
153
)
152
- response = client .subscriptions .destroy (identifier , {"on_termination_credit_note" : "skip" })
154
+ response = client .subscriptions .destroy (
155
+ identifier , {"on_termination_credit_note" : "skip" , "on_termination_invoice" : "skip" }
156
+ )
153
157
154
158
assert response .external_customer_id == "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
155
159
assert response .status == "active"
156
160
assert response .plan_code == "eartha lynch"
157
161
assert response .on_termination_credit_note == "skip"
162
+ assert response .on_termination_invoice == "skip"
158
163
159
164
160
165
def test_valid_destroy_pending_subscription_request (httpx_mock : HTTPXMock ):
You can’t perform that action at this time.
0 commit comments