Skip to content
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
119 changes: 110 additions & 9 deletions api.md

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions meteroid/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@
AsyncAddOnsListPage,
AsyncBatchJobsListFailuresPage,
AsyncBatchJobsListPage,
AsyncBudgetsListPage,
AsyncCouponsListPage,
AsyncCreditNotesListPage,
AsyncCreditsGrantsListPage,
AsyncCreditsListCustomerCreditLedgerPage,
AsyncCustomersListPage,
AsyncCustomPropertiesListCustomPropertyDefinitionsPage,
AsyncFeaturesListPage,
Expand All @@ -58,8 +61,11 @@
AsyncWebhookEndpointsEndpointsListDeliveriesPage,
BatchJobsListFailuresPage,
BatchJobsListPage,
BudgetsListPage,
CouponsListPage,
CreditNotesListPage,
CreditsGrantsListPage,
CreditsListCustomerCreditLedgerPage,
CustomersListPage,
CustomPropertiesListCustomPropertyDefinitionsPage,
FeaturesListPage,
Expand All @@ -75,10 +81,17 @@
from .add_ons import AddOns, AsyncAddOns
from .add_ons_entitlements import AddOnsEntitlements, AsyncAddOnsEntitlements
from .batch_jobs import AsyncBatchJobs, BatchJobs
from .budgets import AsyncBudgets, Budgets
from .checkout_sessions import AsyncCheckoutSessions, CheckoutSessions
from .checks import AsyncChecks, Checks
from .connect import AsyncConnect, Connect
from .coupons import AsyncCoupons, Coupons
from .credit_notes import AsyncCreditNotes, CreditNotes
from .credit_units import AsyncCreditUnits, CreditUnits
from .credit_units_prices import AsyncCreditUnitsPrices, CreditUnitsPrices
from .credits import AsyncCredits, Credits
from .credits_grants import AsyncCreditsGrants, CreditsGrants
from .credits_wallets import AsyncCreditsWallets, CreditsWallets
from .custom_properties import AsyncCustomProperties, CustomProperties
from .customers import AsyncCustomers, Customers
from .entitlements import AsyncEntitlements, Entitlements
Expand All @@ -95,6 +108,13 @@
from .products_entitlements import AsyncProductsEntitlements, ProductsEntitlements
from .subscriptions import AsyncSubscriptions, Subscriptions
from .usage import AsyncUsage, Usage
from .usage_costs import AsyncUsageCosts, UsageCosts
from .usage_costs_customer import AsyncUsageCostsCustomer, UsageCostsCustomer
from .usage_costs_subscription import (
AsyncUsageCostsSubscription,
UsageCostsSubscription,
)
from .usage_customer import AsyncUsageCustomer, UsageCustomer
from .webhook_endpoints import AsyncWebhookEndpoints, WebhookEndpoints
from .webhook_endpoints_endpoints import (
AsyncWebhookEndpointsEndpoints,
Expand All @@ -109,14 +129,28 @@
"AddOnsEntitlements": "add_ons_entitlements",
"AsyncBatchJobs": "batch_jobs",
"BatchJobs": "batch_jobs",
"AsyncBudgets": "budgets",
"Budgets": "budgets",
"AsyncCheckoutSessions": "checkout_sessions",
"CheckoutSessions": "checkout_sessions",
"AsyncChecks": "checks",
"Checks": "checks",
"AsyncConnect": "connect",
"Connect": "connect",
"AsyncCoupons": "coupons",
"Coupons": "coupons",
"AsyncCreditNotes": "credit_notes",
"CreditNotes": "credit_notes",
"AsyncCreditUnits": "credit_units",
"CreditUnits": "credit_units",
"AsyncCreditUnitsPrices": "credit_units_prices",
"CreditUnitsPrices": "credit_units_prices",
"AsyncCredits": "credits",
"Credits": "credits",
"AsyncCreditsGrants": "credits_grants",
"CreditsGrants": "credits_grants",
"AsyncCreditsWallets": "credits_wallets",
"CreditsWallets": "credits_wallets",
"AsyncCustomProperties": "custom_properties",
"CustomProperties": "custom_properties",
"AsyncCustomers": "customers",
Expand Down Expand Up @@ -149,6 +183,14 @@
"Subscriptions": "subscriptions",
"AsyncUsage": "usage",
"Usage": "usage",
"AsyncUsageCustomer": "usage_customer",
"UsageCustomer": "usage_customer",
"AsyncUsageCosts": "usage_costs",
"UsageCosts": "usage_costs",
"AsyncUsageCostsCustomer": "usage_costs_customer",
"UsageCostsCustomer": "usage_costs_customer",
"AsyncUsageCostsSubscription": "usage_costs_subscription",
"UsageCostsSubscription": "usage_costs_subscription",
"AsyncWebhookEndpoints": "webhook_endpoints",
"WebhookEndpoints": "webhook_endpoints",
"AsyncWebhookEndpointsEndpoints": "webhook_endpoints_endpoints",
Expand All @@ -159,10 +201,16 @@
"BatchJobsListPage": "_pages",
"AsyncBatchJobsListFailuresPage": "_pages",
"BatchJobsListFailuresPage": "_pages",
"AsyncBudgetsListPage": "_pages",
"BudgetsListPage": "_pages",
"AsyncCouponsListPage": "_pages",
"CouponsListPage": "_pages",
"AsyncCreditNotesListPage": "_pages",
"CreditNotesListPage": "_pages",
"AsyncCreditsListCustomerCreditLedgerPage": "_pages",
"CreditsListCustomerCreditLedgerPage": "_pages",
"AsyncCreditsGrantsListPage": "_pages",
"CreditsGrantsListPage": "_pages",
"AsyncCustomPropertiesListCustomPropertyDefinitionsPage": "_pages",
"CustomPropertiesListCustomPropertyDefinitionsPage": "_pages",
"AsyncCustomersListPage": "_pages",
Expand Down Expand Up @@ -235,14 +283,28 @@ def __dir__() -> list[str]:
"AddOnsEntitlements",
"AsyncBatchJobs",
"BatchJobs",
"AsyncBudgets",
"Budgets",
"AsyncCheckoutSessions",
"CheckoutSessions",
"AsyncChecks",
"Checks",
"AsyncConnect",
"Connect",
"AsyncCoupons",
"Coupons",
"AsyncCreditNotes",
"CreditNotes",
"AsyncCreditUnits",
"CreditUnits",
"AsyncCreditUnitsPrices",
"CreditUnitsPrices",
"AsyncCredits",
"Credits",
"AsyncCreditsGrants",
"CreditsGrants",
"AsyncCreditsWallets",
"CreditsWallets",
"AsyncCustomProperties",
"CustomProperties",
"AsyncCustomers",
Expand Down Expand Up @@ -275,6 +337,14 @@ def __dir__() -> list[str]:
"Subscriptions",
"AsyncUsage",
"Usage",
"AsyncUsageCustomer",
"UsageCustomer",
"AsyncUsageCosts",
"UsageCosts",
"AsyncUsageCostsCustomer",
"UsageCostsCustomer",
"AsyncUsageCostsSubscription",
"UsageCostsSubscription",
"AsyncWebhookEndpoints",
"WebhookEndpoints",
"AsyncWebhookEndpointsEndpoints",
Expand All @@ -285,10 +355,16 @@ def __dir__() -> list[str]:
"BatchJobsListPage",
"AsyncBatchJobsListFailuresPage",
"BatchJobsListFailuresPage",
"AsyncBudgetsListPage",
"BudgetsListPage",
"AsyncCouponsListPage",
"CouponsListPage",
"AsyncCreditNotesListPage",
"CreditNotesListPage",
"AsyncCreditsListCustomerCreditLedgerPage",
"CreditsListCustomerCreditLedgerPage",
"AsyncCreditsGrantsListPage",
"CreditsGrantsListPage",
"AsyncCustomPropertiesListCustomPropertyDefinitionsPage",
"CustomPropertiesListCustomPropertyDefinitionsPage",
"AsyncCustomersListPage",
Expand Down
44 changes: 44 additions & 0 deletions meteroid/api/_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
BatchJobItemFailureResponse,
BatchJobListResponse,
BatchJobResponse,
Budget,
BudgetListResponse,
Coupon,
CouponListResponse,
CreditGrant,
CreditGrantListResponse,
CreditNote,
CreditNoteListResponse,
Customer,
Expand All @@ -22,6 +26,8 @@
FeatureListResponse,
Invoice,
InvoiceListResponse,
LedgerEntry,
LedgerListResponse,
MetricListResponse,
MetricSummary,
Plan,
Expand All @@ -46,10 +52,16 @@
"BatchJobsListPage",
"AsyncBatchJobsListFailuresPage",
"BatchJobsListFailuresPage",
"AsyncBudgetsListPage",
"BudgetsListPage",
"AsyncCouponsListPage",
"CouponsListPage",
"AsyncCreditNotesListPage",
"CreditNotesListPage",
"AsyncCreditsListCustomerCreditLedgerPage",
"CreditsListCustomerCreditLedgerPage",
"AsyncCreditsGrantsListPage",
"CreditsGrantsListPage",
"AsyncCustomPropertiesListCustomPropertyDefinitionsPage",
"CustomPropertiesListCustomPropertyDefinitionsPage",
"AsyncCustomersListPage",
Expand Down Expand Up @@ -109,6 +121,14 @@ class AsyncBatchJobsListFailuresPage(
"""A page of :class:`BatchJobItemFailureResponse`, and the :class:`BatchJobFailuresResponse` response of its request."""


class BudgetsListPage(SyncPage[Budget, BudgetListResponse], BudgetListResponse):
"""A page of :class:`Budget`, and the :class:`BudgetListResponse` response of its request."""


class AsyncBudgetsListPage(AsyncPage[Budget, BudgetListResponse], BudgetListResponse):
"""A page of :class:`Budget`, and the :class:`BudgetListResponse` response of its request."""


class CouponsListPage(SyncPage[Coupon, CouponListResponse], CouponListResponse):
"""A page of :class:`Coupon`, and the :class:`CouponListResponse` response of its request."""

Expand All @@ -129,6 +149,30 @@ class AsyncCreditNotesListPage(
"""A page of :class:`CreditNote`, and the :class:`CreditNoteListResponse` response of its request."""


class CreditsListCustomerCreditLedgerPage(
SyncPage[LedgerEntry, LedgerListResponse], LedgerListResponse
):
"""A page of :class:`LedgerEntry`, and the :class:`LedgerListResponse` response of its request."""


class AsyncCreditsListCustomerCreditLedgerPage(
AsyncPage[LedgerEntry, LedgerListResponse], LedgerListResponse
):
"""A page of :class:`LedgerEntry`, and the :class:`LedgerListResponse` response of its request."""


class CreditsGrantsListPage(
SyncPage[CreditGrant, CreditGrantListResponse], CreditGrantListResponse
):
"""A page of :class:`CreditGrant`, and the :class:`CreditGrantListResponse` response of its request."""


class AsyncCreditsGrantsListPage(
AsyncPage[CreditGrant, CreditGrantListResponse], CreditGrantListResponse
):
"""A page of :class:`CreditGrant`, and the :class:`CreditGrantListResponse` response of its request."""


class CustomPropertiesListCustomPropertyDefinitionsPage(
SyncPage[CustomPropertyDefinition, CustomPropertyDefinitionListResponse],
CustomPropertyDefinitionListResponse,
Expand Down
Loading
Loading