File tree Expand file tree Collapse file tree
lago_python_client/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class SubscriptionResponse(BaseResponseModel):
4545 current_billing_period_started_at : Optional [str ]
4646 current_billing_period_ending_at : Optional [str ]
4747 on_termination_credit_note : Optional [str ]
48+ on_termination_invoice : Optional [str ]
4849
4950
5051class SubscriptionsResponse (BaseResponseModel ):
Original file line number Diff line number Diff line change 1212 "billing_time" : " anniversary" ,
1313 "terminated_at" : null ,
1414 "on_termination_credit_note" : " skip" ,
15+ "on_termination_invoice" : " skip" ,
1516 "subscription_at" : " 2022-04-29T08:59:51Z" ,
1617 "previous_plan_code" : null ,
1718 "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):
140140 assert response .plan_code == "eartha lynch"
141141
142142
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 ):
144144 client = Client (api_key = "886fe239-927d-4072-ab72-6dd345e8dd0d" )
145145 identifier = "sub_id"
146146
147147 httpx_mock .add_response (
148148 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" ,
150152 content = mock_response (),
151153 )
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+ )
153157
154158 assert response .external_customer_id == "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
155159 assert response .status == "active"
156160 assert response .plan_code == "eartha lynch"
157161 assert response .on_termination_credit_note == "skip"
162+ assert response .on_termination_invoice == "skip"
158163
159164
160165def test_valid_destroy_pending_subscription_request (httpx_mock : HTTPXMock ):
You can’t perform that action at this time.
0 commit comments