Skip to content

Commit de8f18b

Browse files
docs: improve examples
1 parent e478a4e commit de8f18b

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

tests/api_resources/test_subscriptions.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None:
650650
subscription_id="subscription_id",
651651
add=[
652652
{
653-
"start_date": parse_datetime("2019-12-27T18:11:19.117Z"),
653+
"start_date": "start_of_term",
654654
"allocation_price": {
655655
"amount": "10.00",
656656
"cadence": "monthly",
@@ -678,7 +678,7 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None:
678678
"discount_type": "amount",
679679
}
680680
],
681-
"end_date": parse_datetime("2019-12-27T18:11:19.117Z"),
681+
"end_date": "start_of_term",
682682
"external_price_id": "external_price_id",
683683
"filter": "my_property > 100 AND my_other_property = 'bar'",
684684
"fixed_fee_quantity_transitions": [
@@ -732,7 +732,7 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None:
732732
],
733733
add_adjustments=[
734734
{
735-
"start_date": parse_datetime("2019-12-27T18:11:19.117Z"),
735+
"start_date": "start_of_term",
736736
"adjustment": {
737737
"adjustment_type": "percentage_discount",
738738
"percentage_discount": 0,
@@ -751,7 +751,7 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None:
751751
"price_type": "usage",
752752
},
753753
"adjustment_id": "h74gfhdjvn7ujokd",
754-
"end_date": parse_datetime("2019-12-27T18:11:19.117Z"),
754+
"end_date": "start_of_term",
755755
}
756756
],
757757
allow_invoice_credit_or_void=True,
@@ -761,7 +761,7 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None:
761761
"price_interval_id": "sdfs6wdjvn7ujokd",
762762
"billing_cycle_day": 0,
763763
"can_defer_billing": True,
764-
"end_date": parse_datetime("2019-12-27T18:11:19.117Z"),
764+
"end_date": "start_of_term",
765765
"filter": "my_property > 100 AND my_other_property = 'bar'",
766766
"fixed_fee_quantity_transitions": [
767767
{
@@ -770,15 +770,15 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None:
770770
}
771771
],
772772
"metric_parameter_overrides": {"foo": "bar"},
773-
"start_date": parse_datetime("2019-12-27T18:11:19.117Z"),
773+
"start_date": "start_of_term",
774774
"usage_customer_ids": ["string"],
775775
}
776776
],
777777
edit_adjustments=[
778778
{
779779
"adjustment_interval_id": "sdfs6wdjvn7ujokd",
780-
"end_date": parse_datetime("2019-12-27T18:11:19.117Z"),
781-
"start_date": parse_datetime("2019-12-27T18:11:19.117Z"),
780+
"end_date": "start_of_term",
781+
"start_date": "start_of_term",
782782
}
783783
],
784784
)
@@ -2056,7 +2056,7 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO
20562056
subscription_id="subscription_id",
20572057
add=[
20582058
{
2059-
"start_date": parse_datetime("2019-12-27T18:11:19.117Z"),
2059+
"start_date": "start_of_term",
20602060
"allocation_price": {
20612061
"amount": "10.00",
20622062
"cadence": "monthly",
@@ -2084,7 +2084,7 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO
20842084
"discount_type": "amount",
20852085
}
20862086
],
2087-
"end_date": parse_datetime("2019-12-27T18:11:19.117Z"),
2087+
"end_date": "start_of_term",
20882088
"external_price_id": "external_price_id",
20892089
"filter": "my_property > 100 AND my_other_property = 'bar'",
20902090
"fixed_fee_quantity_transitions": [
@@ -2138,7 +2138,7 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO
21382138
],
21392139
add_adjustments=[
21402140
{
2141-
"start_date": parse_datetime("2019-12-27T18:11:19.117Z"),
2141+
"start_date": "start_of_term",
21422142
"adjustment": {
21432143
"adjustment_type": "percentage_discount",
21442144
"percentage_discount": 0,
@@ -2157,7 +2157,7 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO
21572157
"price_type": "usage",
21582158
},
21592159
"adjustment_id": "h74gfhdjvn7ujokd",
2160-
"end_date": parse_datetime("2019-12-27T18:11:19.117Z"),
2160+
"end_date": "start_of_term",
21612161
}
21622162
],
21632163
allow_invoice_credit_or_void=True,
@@ -2167,7 +2167,7 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO
21672167
"price_interval_id": "sdfs6wdjvn7ujokd",
21682168
"billing_cycle_day": 0,
21692169
"can_defer_billing": True,
2170-
"end_date": parse_datetime("2019-12-27T18:11:19.117Z"),
2170+
"end_date": "start_of_term",
21712171
"filter": "my_property > 100 AND my_other_property = 'bar'",
21722172
"fixed_fee_quantity_transitions": [
21732173
{
@@ -2176,15 +2176,15 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO
21762176
}
21772177
],
21782178
"metric_parameter_overrides": {"foo": "bar"},
2179-
"start_date": parse_datetime("2019-12-27T18:11:19.117Z"),
2179+
"start_date": "start_of_term",
21802180
"usage_customer_ids": ["string"],
21812181
}
21822182
],
21832183
edit_adjustments=[
21842184
{
21852185
"adjustment_interval_id": "sdfs6wdjvn7ujokd",
2186-
"end_date": parse_datetime("2019-12-27T18:11:19.117Z"),
2187-
"start_date": parse_datetime("2019-12-27T18:11:19.117Z"),
2186+
"end_date": "start_of_term",
2187+
"start_date": "start_of_term",
21882188
}
21892189
],
21902190
)

0 commit comments

Comments
 (0)