Skip to content

Commit 91afb1e

Browse files
committed
Bump version to 0.53.0
1 parent 3f3af5c commit 91afb1e

File tree

4 files changed

+19
-10
lines changed

4 files changed

+19
-10
lines changed

src/viam/app/billing_client.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from viam import logging
66
from viam.proto.app.billing import (
77
BillingServiceStub,
8+
CreateInvoiceAndChargeImmediatelyRequest,
9+
CreateInvoiceAndChargeImmediatelyResponse,
810
GetCurrentMonthUsageRequest,
911
GetCurrentMonthUsageResponse,
1012
GetInvoicePdfRequest,
@@ -13,8 +15,6 @@
1315
GetInvoicesSummaryResponse,
1416
GetOrgBillingInformationRequest,
1517
GetOrgBillingInformationResponse,
16-
CreateInvoiceAndChargeImmediatelyRequest,
17-
CreateInvoiceAndChargeImmediatelyResponse,
1818
)
1919

2020
LOGGER = logging.getLogger(__name__)
@@ -144,7 +144,9 @@ async def get_org_billing_information(self, org_id: str, timeout: Optional[float
144144
request = GetOrgBillingInformationRequest(org_id=org_id)
145145
return await self._billing_client.GetOrgBillingInformation(request, metadata=self._metadata, timeout=timeout)
146146

147-
async def create_invoice_and_charge_immediately(self, org_id_to_charge: str, amount: float, description: Optional[str] = None, org_id_for_branding: Optional[str] = None) -> None:
147+
async def create_invoice_and_charge_immediately(
148+
self, org_id_to_charge: str, amount: float, description: Optional[str] = None, org_id_for_branding: Optional[str] = None
149+
) -> None:
148150
"""Create a flat fee invoice and charge the organization on the spot. The caller must be an owner of the organization being charged.
149151
This function blocks until payment is confirmed, but will time out after 2 minutes if there is no confirmation.
150152
@@ -158,5 +160,9 @@ async def create_invoice_and_charge_immediately(self, org_id_to_charge: str, amo
158160
description (str): a short description of the charge to display on the invoice PDF (must be 100 characters or less)
159161
org_id_for_branding (str): the organization whose branding to use in the invoice confirmation email
160162
"""
161-
request = CreateInvoiceAndChargeImmediatelyRequest(org_id_to_charge=org_id_to_charge, amount=amount, description=description, org_id_for_branding=org_id_for_branding)
162-
_: CreateInvoiceAndChargeImmediatelyResponse = await self._billing_client.CreateInvoiceAndChargeImmediately(request, metadata=self._metadata)
163+
request = CreateInvoiceAndChargeImmediatelyRequest(
164+
org_id_to_charge=org_id_to_charge, amount=amount, description=description, org_id_for_branding=org_id_for_branding
165+
)
166+
_: CreateInvoiceAndChargeImmediatelyResponse = await self._billing_client.CreateInvoiceAndChargeImmediately(
167+
request, metadata=self._metadata
168+
)

src/viam/version_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.52.0"
1+
__version__ = "0.53.0"
22

33
API_VERSION = "v0.1.470"
44
SDK_VERSION = __version__

tests/mocks/services.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@
183183
UploadModuleFileResponse,
184184
)
185185
from viam.proto.app.billing import (
186+
CreateInvoiceAndChargeImmediatelyRequest,
187+
CreateInvoiceAndChargeImmediatelyResponse,
186188
GetCurrentMonthUsageRequest,
187189
GetCurrentMonthUsageResponse,
188190
GetInvoicePdfRequest,
@@ -191,8 +193,6 @@
191193
GetInvoicesSummaryResponse,
192194
GetOrgBillingInformationRequest,
193195
GetOrgBillingInformationResponse,
194-
CreateInvoiceAndChargeImmediatelyRequest,
195-
CreateInvoiceAndChargeImmediatelyResponse,
196196
UnimplementedBillingServiceBase,
197197
)
198198
from viam.proto.app.data import (
@@ -1299,7 +1299,9 @@ async def GetOrgBillingInformation(self, stream: Stream[GetOrgBillingInformation
12991299
self.org_id = request.org_id
13001300
await stream.send_message(self.billing_info)
13011301

1302-
async def CreateInvoiceAndChargeImmediately(self, stream: Stream[CreateInvoiceAndChargeImmediatelyRequest, CreateInvoiceAndChargeImmediatelyResponse]) -> None:
1302+
async def CreateInvoiceAndChargeImmediately(
1303+
self, stream: Stream[CreateInvoiceAndChargeImmediatelyRequest, CreateInvoiceAndChargeImmediatelyResponse]
1304+
) -> None:
13031305
request = await stream.recv_message()
13041306
assert request is not None
13051307
self.org_id_to_charge = request.org_id_to_charge
@@ -1308,6 +1310,7 @@ async def CreateInvoiceAndChargeImmediately(self, stream: Stream[CreateInvoiceAn
13081310
self.org_id_for_branding = request.org_id_for_branding
13091311
await stream.send_message(CreateInvoiceAndChargeImmediatelyResponse())
13101312

1313+
13111314
class MockApp(UnimplementedAppServiceBase):
13121315
def __init__(
13131316
self,

tests/test_billing_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
from viam.app.billing_client import BillingClient
66
from viam.proto.app.billing import (
7+
CreateInvoiceAndChargeImmediatelyResponse,
78
GetCurrentMonthUsageResponse,
89
GetInvoicesSummaryResponse,
910
GetOrgBillingInformationResponse,
1011
InvoiceSummary,
11-
CreateInvoiceAndChargeImmediatelyResponse,
1212
)
1313

1414
from .mocks.services import MockBilling

0 commit comments

Comments
 (0)