Skip to content

feat(api): manual updates #575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,13 @@

```python
from orb.types import (
AddCreditLedgerEntryRequest,
AddCreditTopUpRequest,
AddSubscriptionAdjustmentParams,
AddSubscriptionPriceParams,
AmountDiscount,
BillingCycleRelativeDate,
CreateCustomerAlertRequest,
Discount,
InvoiceLevelDiscount,
PaginationMetadata,
PercentageDiscount,
RemoveSubscriptionAdjustmentParams,
RemoveSubscriptionPriceParams,
ReplaceSubscriptionAdjustmentParams,
ReplaceSubscriptionPriceParams,
TrialDiscount,
UpdatePriceRequestParams,
UsageDiscount,
)
```
Expand Down
62 changes: 32 additions & 30 deletions src/orb/resources/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,8 @@
from ..types.subscription_fetch_schedule_response import SubscriptionFetchScheduleResponse
from ..types.subscription_price_intervals_response import SubscriptionPriceIntervalsResponse
from ..types.subscription_schedule_plan_change_response import SubscriptionSchedulePlanChangeResponse
from ..types.shared_params.add_subscription_price_params import AddSubscriptionPriceParams
from ..types.subscription_unschedule_cancellation_response import SubscriptionUnscheduleCancellationResponse
from ..types.shared_params.remove_subscription_price_params import RemoveSubscriptionPriceParams
from ..types.shared_params.replace_subscription_price_params import ReplaceSubscriptionPriceParams
from ..types.subscription_update_fixed_fee_quantity_response import SubscriptionUpdateFixedFeeQuantityResponse
from ..types.shared_params.add_subscription_adjustment_params import AddSubscriptionAdjustmentParams
from ..types.shared_params.remove_subscription_adjustment_params import RemoveSubscriptionAdjustmentParams
from ..types.shared_params.replace_subscription_adjustment_params import ReplaceSubscriptionAdjustmentParams
from ..types.subscription_unschedule_pending_plan_changes_response import (
SubscriptionUnschedulePendingPlanChangesResponse,
)
Expand Down Expand Up @@ -85,8 +79,8 @@ def with_streaming_response(self) -> SubscriptionsWithStreamingResponse:
def create(
self,
*,
add_adjustments: Optional[Iterable[AddSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
add_prices: Optional[Iterable[AddSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
add_adjustments: Optional[Iterable[subscription_create_params.AddAdjustment]] | NotGiven = NOT_GIVEN,
add_prices: Optional[Iterable[subscription_create_params.AddPrice]] | NotGiven = NOT_GIVEN,
align_billing_with_subscription_start_date: bool | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
aws_region: Optional[str] | NotGiven = NOT_GIVEN,
Expand All @@ -110,10 +104,10 @@ def create(
plan_id: Optional[str] | NotGiven = NOT_GIVEN,
plan_version_number: Optional[int] | NotGiven = NOT_GIVEN,
price_overrides: Optional[Iterable[object]] | NotGiven = NOT_GIVEN,
remove_adjustments: Optional[Iterable[RemoveSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
remove_prices: Optional[Iterable[RemoveSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
replace_adjustments: Optional[Iterable[ReplaceSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
replace_prices: Optional[Iterable[ReplaceSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
remove_adjustments: Optional[Iterable[subscription_create_params.RemoveAdjustment]] | NotGiven = NOT_GIVEN,
remove_prices: Optional[Iterable[subscription_create_params.RemovePrice]] | NotGiven = NOT_GIVEN,
replace_adjustments: Optional[Iterable[subscription_create_params.ReplaceAdjustment]] | NotGiven = NOT_GIVEN,
replace_prices: Optional[Iterable[subscription_create_params.ReplacePrice]] | NotGiven = NOT_GIVEN,
start_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
trial_duration_days: Optional[int] | NotGiven = NOT_GIVEN,
usage_customer_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1365,8 +1359,9 @@ def schedule_plan_change(
subscription_id: str,
*,
change_option: Literal["requested_date", "end_of_subscription_term", "immediate"],
add_adjustments: Optional[Iterable[AddSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
add_prices: Optional[Iterable[AddSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
add_adjustments: Optional[Iterable[subscription_schedule_plan_change_params.AddAdjustment]]
| NotGiven = NOT_GIVEN,
add_prices: Optional[Iterable[subscription_schedule_plan_change_params.AddPrice]] | NotGiven = NOT_GIVEN,
align_billing_with_plan_change_date: Optional[bool] | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
billing_cycle_alignment: Optional[Literal["unchanged", "plan_change_date", "start_of_month"]]
Expand All @@ -1388,10 +1383,13 @@ def schedule_plan_change(
plan_id: Optional[str] | NotGiven = NOT_GIVEN,
plan_version_number: Optional[int] | NotGiven = NOT_GIVEN,
price_overrides: Optional[Iterable[object]] | NotGiven = NOT_GIVEN,
remove_adjustments: Optional[Iterable[RemoveSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
remove_prices: Optional[Iterable[RemoveSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
replace_adjustments: Optional[Iterable[ReplaceSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
replace_prices: Optional[Iterable[ReplaceSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
remove_adjustments: Optional[Iterable[subscription_schedule_plan_change_params.RemoveAdjustment]]
| NotGiven = NOT_GIVEN,
remove_prices: Optional[Iterable[subscription_schedule_plan_change_params.RemovePrice]] | NotGiven = NOT_GIVEN,
replace_adjustments: Optional[Iterable[subscription_schedule_plan_change_params.ReplaceAdjustment]]
| NotGiven = NOT_GIVEN,
replace_prices: Optional[Iterable[subscription_schedule_plan_change_params.ReplacePrice]]
| NotGiven = NOT_GIVEN,
trial_duration_days: Optional[int] | NotGiven = NOT_GIVEN,
usage_customer_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -2095,8 +2093,8 @@ def with_streaming_response(self) -> AsyncSubscriptionsWithStreamingResponse:
async def create(
self,
*,
add_adjustments: Optional[Iterable[AddSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
add_prices: Optional[Iterable[AddSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
add_adjustments: Optional[Iterable[subscription_create_params.AddAdjustment]] | NotGiven = NOT_GIVEN,
add_prices: Optional[Iterable[subscription_create_params.AddPrice]] | NotGiven = NOT_GIVEN,
align_billing_with_subscription_start_date: bool | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
aws_region: Optional[str] | NotGiven = NOT_GIVEN,
Expand All @@ -2120,10 +2118,10 @@ async def create(
plan_id: Optional[str] | NotGiven = NOT_GIVEN,
plan_version_number: Optional[int] | NotGiven = NOT_GIVEN,
price_overrides: Optional[Iterable[object]] | NotGiven = NOT_GIVEN,
remove_adjustments: Optional[Iterable[RemoveSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
remove_prices: Optional[Iterable[RemoveSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
replace_adjustments: Optional[Iterable[ReplaceSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
replace_prices: Optional[Iterable[ReplaceSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
remove_adjustments: Optional[Iterable[subscription_create_params.RemoveAdjustment]] | NotGiven = NOT_GIVEN,
remove_prices: Optional[Iterable[subscription_create_params.RemovePrice]] | NotGiven = NOT_GIVEN,
replace_adjustments: Optional[Iterable[subscription_create_params.ReplaceAdjustment]] | NotGiven = NOT_GIVEN,
replace_prices: Optional[Iterable[subscription_create_params.ReplacePrice]] | NotGiven = NOT_GIVEN,
start_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
trial_duration_days: Optional[int] | NotGiven = NOT_GIVEN,
usage_customer_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -3375,8 +3373,9 @@ async def schedule_plan_change(
subscription_id: str,
*,
change_option: Literal["requested_date", "end_of_subscription_term", "immediate"],
add_adjustments: Optional[Iterable[AddSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
add_prices: Optional[Iterable[AddSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
add_adjustments: Optional[Iterable[subscription_schedule_plan_change_params.AddAdjustment]]
| NotGiven = NOT_GIVEN,
add_prices: Optional[Iterable[subscription_schedule_plan_change_params.AddPrice]] | NotGiven = NOT_GIVEN,
align_billing_with_plan_change_date: Optional[bool] | NotGiven = NOT_GIVEN,
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
billing_cycle_alignment: Optional[Literal["unchanged", "plan_change_date", "start_of_month"]]
Expand All @@ -3398,10 +3397,13 @@ async def schedule_plan_change(
plan_id: Optional[str] | NotGiven = NOT_GIVEN,
plan_version_number: Optional[int] | NotGiven = NOT_GIVEN,
price_overrides: Optional[Iterable[object]] | NotGiven = NOT_GIVEN,
remove_adjustments: Optional[Iterable[RemoveSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
remove_prices: Optional[Iterable[RemoveSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
replace_adjustments: Optional[Iterable[ReplaceSubscriptionAdjustmentParams]] | NotGiven = NOT_GIVEN,
replace_prices: Optional[Iterable[ReplaceSubscriptionPriceParams]] | NotGiven = NOT_GIVEN,
remove_adjustments: Optional[Iterable[subscription_schedule_plan_change_params.RemoveAdjustment]]
| NotGiven = NOT_GIVEN,
remove_prices: Optional[Iterable[subscription_schedule_plan_change_params.RemovePrice]] | NotGiven = NOT_GIVEN,
replace_adjustments: Optional[Iterable[subscription_schedule_plan_change_params.ReplaceAdjustment]]
| NotGiven = NOT_GIVEN,
replace_prices: Optional[Iterable[subscription_schedule_plan_change_params.ReplacePrice]]
| NotGiven = NOT_GIVEN,
trial_duration_days: Optional[int] | NotGiven = NOT_GIVEN,
usage_customer_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down
10 changes: 0 additions & 10 deletions src/orb/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,7 @@
PaginationMetadata as PaginationMetadata,
PercentageDiscount as PercentageDiscount,
InvoiceLevelDiscount as InvoiceLevelDiscount,
AddCreditTopUpRequest as AddCreditTopUpRequest,
BillingCycleRelativeDate as BillingCycleRelativeDate,
UpdatePriceRequestParams as UpdatePriceRequestParams,
AddSubscriptionPriceParams as AddSubscriptionPriceParams,
CreateCustomerAlertRequest as CreateCustomerAlertRequest,
AddCreditLedgerEntryRequest as AddCreditLedgerEntryRequest,
RemoveSubscriptionPriceParams as RemoveSubscriptionPriceParams,
ReplaceSubscriptionPriceParams as ReplaceSubscriptionPriceParams,
AddSubscriptionAdjustmentParams as AddSubscriptionAdjustmentParams,
RemoveSubscriptionAdjustmentParams as RemoveSubscriptionAdjustmentParams,
ReplaceSubscriptionAdjustmentParams as ReplaceSubscriptionAdjustmentParams,
)
from .invoice import Invoice as Invoice
from .customer import Customer as Customer
Expand Down
14 changes: 0 additions & 14 deletions src/orb/types/shared/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,4 @@
from .pagination_metadata import PaginationMetadata as PaginationMetadata
from .percentage_discount import PercentageDiscount as PercentageDiscount
from .invoice_level_discount import InvoiceLevelDiscount as InvoiceLevelDiscount
from .add_credit_top_up_request import AddCreditTopUpRequest as AddCreditTopUpRequest
from .billing_cycle_relative_date import BillingCycleRelativeDate as BillingCycleRelativeDate
from .update_price_request_params import UpdatePriceRequestParams as UpdatePriceRequestParams
from .add_subscription_price_params import AddSubscriptionPriceParams as AddSubscriptionPriceParams
from .create_customer_alert_request import CreateCustomerAlertRequest as CreateCustomerAlertRequest
from .add_credit_ledger_entry_request import AddCreditLedgerEntryRequest as AddCreditLedgerEntryRequest
from .remove_subscription_price_params import RemoveSubscriptionPriceParams as RemoveSubscriptionPriceParams
from .replace_subscription_price_params import ReplaceSubscriptionPriceParams as ReplaceSubscriptionPriceParams
from .add_subscription_adjustment_params import AddSubscriptionAdjustmentParams as AddSubscriptionAdjustmentParams
from .remove_subscription_adjustment_params import (
RemoveSubscriptionAdjustmentParams as RemoveSubscriptionAdjustmentParams,
)
from .replace_subscription_adjustment_params import (
ReplaceSubscriptionAdjustmentParams as ReplaceSubscriptionAdjustmentParams,
)
Loading