diff --git a/docs/apilog/CreateSaasUserParam.md b/docs/apilog/CreateSaasUserParam.md index 7cdf7e9..955573d 100644 --- a/docs/apilog/CreateSaasUserParam.md +++ b/docs/apilog/CreateSaasUserParam.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | E-mail | -**password** | **str** | Password | +**password** | **str** | Password | [optional] ## Example diff --git a/docs/apilog/SaasUser.md b/docs/apilog/SaasUser.md index 1ea34ce..111807b 100644 --- a/docs/apilog/SaasUser.md +++ b/docs/apilog/SaasUser.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | **email** | **str** | E-mail | -**attributes** | **Dict[str, object]** | Attribute information | [optional] +**attributes** | **Dict[str, object]** | Attribute information | ## Example diff --git a/docs/apilog/SaasUserApi.md b/docs/apilog/SaasUserApi.md index 9045eb0..dc0050d 100644 --- a/docs/apilog/SaasUserApi.md +++ b/docs/apilog/SaasUserApi.md @@ -266,7 +266,7 @@ Name | Type | Description | Notes Create SaaS User -Create SaaS User. +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. ### Example diff --git a/docs/apilog/StripeCustomer.md b/docs/apilog/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/apilog/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/apilog/TenantApi.md b/docs/apilog/TenantApi.md index 76d656d..595291e 100644 --- a/docs/apilog/TenantApi.md +++ b/docs/apilog/TenantApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting [**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe [**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer [**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details [**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant [**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants @@ -314,6 +315,84 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_tenant** > TenantDetail get_tenant(tenant_id) diff --git a/docs/auth/CreateSaasUserParam.md b/docs/auth/CreateSaasUserParam.md index 7cdf7e9..955573d 100644 --- a/docs/auth/CreateSaasUserParam.md +++ b/docs/auth/CreateSaasUserParam.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | E-mail | -**password** | **str** | Password | +**password** | **str** | Password | [optional] ## Example diff --git a/docs/auth/SaasUser.md b/docs/auth/SaasUser.md index 1ea34ce..111807b 100644 --- a/docs/auth/SaasUser.md +++ b/docs/auth/SaasUser.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | **email** | **str** | E-mail | -**attributes** | **Dict[str, object]** | Attribute information | [optional] +**attributes** | **Dict[str, object]** | Attribute information | ## Example diff --git a/docs/auth/SaasUserApi.md b/docs/auth/SaasUserApi.md index 9045eb0..dc0050d 100644 --- a/docs/auth/SaasUserApi.md +++ b/docs/auth/SaasUserApi.md @@ -266,7 +266,7 @@ Name | Type | Description | Notes Create SaaS User -Create SaaS User. +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. ### Example diff --git a/docs/auth/StripeCustomer.md b/docs/auth/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/auth/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/auth/TenantApi.md b/docs/auth/TenantApi.md index 76d656d..595291e 100644 --- a/docs/auth/TenantApi.md +++ b/docs/auth/TenantApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting [**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe [**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer [**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details [**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant [**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants @@ -314,6 +315,84 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_tenant** > TenantDetail get_tenant(tenant_id) diff --git a/docs/awsmarketplace/CreateSaasUserParam.md b/docs/awsmarketplace/CreateSaasUserParam.md index 7cdf7e9..955573d 100644 --- a/docs/awsmarketplace/CreateSaasUserParam.md +++ b/docs/awsmarketplace/CreateSaasUserParam.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | E-mail | -**password** | **str** | Password | +**password** | **str** | Password | [optional] ## Example diff --git a/docs/awsmarketplace/SaasUser.md b/docs/awsmarketplace/SaasUser.md index 1ea34ce..111807b 100644 --- a/docs/awsmarketplace/SaasUser.md +++ b/docs/awsmarketplace/SaasUser.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | **email** | **str** | E-mail | -**attributes** | **Dict[str, object]** | Attribute information | [optional] +**attributes** | **Dict[str, object]** | Attribute information | ## Example diff --git a/docs/awsmarketplace/SaasUserApi.md b/docs/awsmarketplace/SaasUserApi.md index 9045eb0..dc0050d 100644 --- a/docs/awsmarketplace/SaasUserApi.md +++ b/docs/awsmarketplace/SaasUserApi.md @@ -266,7 +266,7 @@ Name | Type | Description | Notes Create SaaS User -Create SaaS User. +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. ### Example diff --git a/docs/awsmarketplace/StripeCustomer.md b/docs/awsmarketplace/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/awsmarketplace/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/awsmarketplace/TenantApi.md b/docs/awsmarketplace/TenantApi.md index 76d656d..595291e 100644 --- a/docs/awsmarketplace/TenantApi.md +++ b/docs/awsmarketplace/TenantApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting [**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe [**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer [**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details [**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant [**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants @@ -314,6 +315,84 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_tenant** > TenantDetail get_tenant(tenant_id) diff --git a/docs/billing/CreateSaasUserParam.md b/docs/billing/CreateSaasUserParam.md index 7cdf7e9..955573d 100644 --- a/docs/billing/CreateSaasUserParam.md +++ b/docs/billing/CreateSaasUserParam.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | E-mail | -**password** | **str** | Password | +**password** | **str** | Password | [optional] ## Example diff --git a/docs/billing/SaasUser.md b/docs/billing/SaasUser.md index 1ea34ce..111807b 100644 --- a/docs/billing/SaasUser.md +++ b/docs/billing/SaasUser.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | **email** | **str** | E-mail | -**attributes** | **Dict[str, object]** | Attribute information | [optional] +**attributes** | **Dict[str, object]** | Attribute information | ## Example diff --git a/docs/billing/SaasUserApi.md b/docs/billing/SaasUserApi.md index 9045eb0..dc0050d 100644 --- a/docs/billing/SaasUserApi.md +++ b/docs/billing/SaasUserApi.md @@ -266,7 +266,7 @@ Name | Type | Description | Notes Create SaaS User -Create SaaS User. +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. ### Example diff --git a/docs/billing/StripeCustomer.md b/docs/billing/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/billing/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/billing/TenantApi.md b/docs/billing/TenantApi.md index 76d656d..595291e 100644 --- a/docs/billing/TenantApi.md +++ b/docs/billing/TenantApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting [**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe [**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer [**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details [**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant [**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants @@ -314,6 +315,84 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_tenant** > TenantDetail get_tenant(tenant_id) diff --git a/docs/communication/CreateSaasUserParam.md b/docs/communication/CreateSaasUserParam.md index 7cdf7e9..955573d 100644 --- a/docs/communication/CreateSaasUserParam.md +++ b/docs/communication/CreateSaasUserParam.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | E-mail | -**password** | **str** | Password | +**password** | **str** | Password | [optional] ## Example diff --git a/docs/communication/SaasUser.md b/docs/communication/SaasUser.md index 1ea34ce..111807b 100644 --- a/docs/communication/SaasUser.md +++ b/docs/communication/SaasUser.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | **email** | **str** | E-mail | -**attributes** | **Dict[str, object]** | Attribute information | [optional] +**attributes** | **Dict[str, object]** | Attribute information | ## Example diff --git a/docs/communication/SaasUserApi.md b/docs/communication/SaasUserApi.md index 9045eb0..dc0050d 100644 --- a/docs/communication/SaasUserApi.md +++ b/docs/communication/SaasUserApi.md @@ -266,7 +266,7 @@ Name | Type | Description | Notes Create SaaS User -Create SaaS User. +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. ### Example diff --git a/docs/communication/StripeCustomer.md b/docs/communication/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/communication/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/communication/TenantApi.md b/docs/communication/TenantApi.md index 76d656d..595291e 100644 --- a/docs/communication/TenantApi.md +++ b/docs/communication/TenantApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting [**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe [**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer [**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details [**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant [**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants @@ -314,6 +315,84 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_tenant** > TenantDetail get_tenant(tenant_id) diff --git a/docs/integration/CreateSaasUserParam.md b/docs/integration/CreateSaasUserParam.md index 7cdf7e9..955573d 100644 --- a/docs/integration/CreateSaasUserParam.md +++ b/docs/integration/CreateSaasUserParam.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | E-mail | -**password** | **str** | Password | +**password** | **str** | Password | [optional] ## Example diff --git a/docs/integration/SaasUser.md b/docs/integration/SaasUser.md index 1ea34ce..111807b 100644 --- a/docs/integration/SaasUser.md +++ b/docs/integration/SaasUser.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | **email** | **str** | E-mail | -**attributes** | **Dict[str, object]** | Attribute information | [optional] +**attributes** | **Dict[str, object]** | Attribute information | ## Example diff --git a/docs/integration/SaasUserApi.md b/docs/integration/SaasUserApi.md index 9045eb0..dc0050d 100644 --- a/docs/integration/SaasUserApi.md +++ b/docs/integration/SaasUserApi.md @@ -266,7 +266,7 @@ Name | Type | Description | Notes Create SaaS User -Create SaaS User. +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. ### Example diff --git a/docs/integration/StripeCustomer.md b/docs/integration/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/integration/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/integration/TenantApi.md b/docs/integration/TenantApi.md index 76d656d..595291e 100644 --- a/docs/integration/TenantApi.md +++ b/docs/integration/TenantApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting [**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe [**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer [**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details [**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant [**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants @@ -314,6 +315,84 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_tenant** > TenantDetail get_tenant(tenant_id) diff --git a/docs/pricing/CreateSaasUserParam.md b/docs/pricing/CreateSaasUserParam.md index 7cdf7e9..955573d 100644 --- a/docs/pricing/CreateSaasUserParam.md +++ b/docs/pricing/CreateSaasUserParam.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | E-mail | -**password** | **str** | Password | +**password** | **str** | Password | [optional] ## Example diff --git a/docs/pricing/SaasUser.md b/docs/pricing/SaasUser.md index 1ea34ce..111807b 100644 --- a/docs/pricing/SaasUser.md +++ b/docs/pricing/SaasUser.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | **email** | **str** | E-mail | -**attributes** | **Dict[str, object]** | Attribute information | [optional] +**attributes** | **Dict[str, object]** | Attribute information | ## Example diff --git a/docs/pricing/SaasUserApi.md b/docs/pricing/SaasUserApi.md index 9045eb0..dc0050d 100644 --- a/docs/pricing/SaasUserApi.md +++ b/docs/pricing/SaasUserApi.md @@ -266,7 +266,7 @@ Name | Type | Description | Notes Create SaaS User -Create SaaS User. +Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. ### Example diff --git a/docs/pricing/StripeCustomer.md b/docs/pricing/StripeCustomer.md new file mode 100644 index 0000000..4fce09f --- /dev/null +++ b/docs/pricing/StripeCustomer.md @@ -0,0 +1,29 @@ +# StripeCustomer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **str** | stripe Customer ID | +**subscription_schedule_id** | **str** | stripe Subscription Schedule ID | + +## Example + +```python +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer + +# TODO update the JSON string below +json = "{}" +# create an instance of StripeCustomer from a JSON string +stripe_customer_instance = StripeCustomer.from_json(json) +# print the JSON string representation of the object +print StripeCustomer.to_json() + +# convert the object into a dict +stripe_customer_dict = stripe_customer_instance.to_dict() +# create an instance of StripeCustomer from a dict +stripe_customer_form_dict = stripe_customer.from_dict(stripe_customer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/pricing/TenantApi.md b/docs/pricing/TenantApi.md index 76d656d..595291e 100644 --- a/docs/pricing/TenantApi.md +++ b/docs/pricing/TenantApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**create_tenant_and_pricing**](TenantApi.md#create_tenant_and_pricing) | **PATCH** /stripe/init | Stripe Initial Setting [**delete_stripe_tenant_and_pricing**](TenantApi.md#delete_stripe_tenant_and_pricing) | **DELETE** /stripe | Delete Customer and Product From Stripe [**delete_tenant**](TenantApi.md#delete_tenant) | **DELETE** /tenants/{tenant_id} | Delete Tenant +[**get_stripe_customer**](TenantApi.md#get_stripe_customer) | **GET** /tenants/{tenant_id}/stripe-customer | Get Stripe Customer [**get_tenant**](TenantApi.md#get_tenant) | **GET** /tenants/{tenant_id} | Get Tenant Details [**get_tenant_identity_providers**](TenantApi.md#get_tenant_identity_providers) | **GET** /tenants/{tenant_id}/identity-providers | Get identity provider per tenant [**get_tenants**](TenantApi.md#get_tenants) | **GET** /tenants | Get Tenants @@ -314,6 +315,84 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_stripe_customer** +> StripeCustomer get_stripe_customer(tenant_id) + +Get Stripe Customer + +Get the Stripe Customer information associated with the tenant, including their subscriptions. + +### Example + +* Bearer Authentication (Bearer): +```python +import time +import os +import saasus_sdk_python.src.auth +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer +from saasus_sdk_python.src.auth.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.saasus.io/v1/auth +# See configuration.py for a list of all supported configuration parameters. +configuration = saasus_sdk_python.src.auth.Configuration( + host = "https://api.saasus.io/v1/auth" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: Bearer +configuration = saasus_sdk_python.src.auth.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with saasus_sdk_python.src.auth.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = saasus_sdk_python.src.auth.TenantApi(api_client) + tenant_id = 'tenant_id_example' # str | Tenant ID + + try: + # Get Stripe Customer + api_response = api_instance.get_stripe_customer(tenant_id) + print("The response of TenantApi->get_stripe_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TenantApi->get_stripe_customer: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tenant_id** | **str**| Tenant ID | + +### Return type + +[**StripeCustomer**](StripeCustomer.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_tenant** > TenantDetail get_tenant(tenant_id) diff --git a/saasus_sdk_python/src/auth/__init__.py b/saasus_sdk_python/src/auth/__init__.py index 26de64b..68e853b 100644 --- a/saasus_sdk_python/src/auth/__init__.py +++ b/saasus_sdk_python/src/auth/__init__.py @@ -110,6 +110,7 @@ from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer from saasus_sdk_python.src.auth.models.tenant import Tenant from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail diff --git a/saasus_sdk_python/src/auth/api/saas_user_api.py b/saasus_sdk_python/src/auth/api/saas_user_api.py index 40d1516..9b192b6 100644 --- a/saasus_sdk_python/src/auth/api/saas_user_api.py +++ b/saasus_sdk_python/src/auth/api/saas_user_api.py @@ -511,7 +511,7 @@ def confirm_sign_up_with_aws_marketplace_with_http_info(self, confirm_sign_up_wi def create_saas_user(self, create_saas_user_param : Optional[CreateSaasUserParam] = None, **kwargs) -> SaasUser: # noqa: E501 """Create SaaS User # noqa: E501 - Create SaaS User. # noqa: E501 + Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -540,7 +540,7 @@ def create_saas_user(self, create_saas_user_param : Optional[CreateSaasUserParam def create_saas_user_with_http_info(self, create_saas_user_param : Optional[CreateSaasUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 """Create SaaS User # noqa: E501 - Create SaaS User. # noqa: E501 + Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/saasus_sdk_python/src/auth/api/tenant_api.py b/saasus_sdk_python/src/auth/api/tenant_api.py index f8cf167..7d06488 100644 --- a/saasus_sdk_python/src/auth/api/tenant_api.py +++ b/saasus_sdk_python/src/auth/api/tenant_api.py @@ -25,6 +25,7 @@ from saasus_sdk_python.src.auth.models.billing_info import BillingInfo from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer from saasus_sdk_python.src.auth.models.tenant import Tenant from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders @@ -594,6 +595,146 @@ def delete_tenant_with_http_info(self, tenant_id : Annotated[StrictStr, Field(.. collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + def get_stripe_customer(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> StripeCustomer: # noqa: E501 + """Get Stripe Customer # noqa: E501 + + Get the Stripe Customer information associated with the tenant, including their subscriptions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_customer(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: StripeCustomer + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_stripe_customer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_stripe_customer_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_stripe_customer_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Stripe Customer # noqa: E501 + + Get the Stripe Customer information associated with the tenant, including their subscriptions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_customer_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(StripeCustomer, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_stripe_customer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "StripeCustomer", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/stripe-customer', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def get_tenant(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> TenantDetail: # noqa: E501 """Get Tenant Details # noqa: E501 diff --git a/saasus_sdk_python/src/auth/models/__init__.py b/saasus_sdk_python/src/auth/models/__init__.py index dda4fe8..083e14d 100644 --- a/saasus_sdk_python/src/auth/models/__init__.py +++ b/saasus_sdk_python/src/auth/models/__init__.py @@ -80,6 +80,7 @@ from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer from saasus_sdk_python.src.auth.models.tenant import Tenant from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail diff --git a/saasus_sdk_python/src/auth/models/create_saas_user_param.py b/saasus_sdk_python/src/auth/models/create_saas_user_param.py index 8335762..406e216 100644 --- a/saasus_sdk_python/src/auth/models/create_saas_user_param.py +++ b/saasus_sdk_python/src/auth/models/create_saas_user_param.py @@ -18,7 +18,7 @@ import json - +from typing import Optional from pydantic import ConfigDict, BaseModel, Field, StrictStr class CreateSaasUserParam(BaseModel): @@ -26,7 +26,7 @@ class CreateSaasUserParam(BaseModel): CreateSaasUserParam """ email: StrictStr = Field(..., description="E-mail") - password: StrictStr = Field(..., description="Password") + password: Optional[StrictStr] = Field(None, description="Password") __properties = ["email", "password"] model_config = ConfigDict(populate_by_name=True, validate_assignment=True) diff --git a/saasus_sdk_python/src/auth/models/saas_user.py b/saasus_sdk_python/src/auth/models/saas_user.py index ab9f596..ecc36b7 100644 --- a/saasus_sdk_python/src/auth/models/saas_user.py +++ b/saasus_sdk_python/src/auth/models/saas_user.py @@ -18,7 +18,7 @@ import json -from typing import Any, Dict, Optional +from typing import Any, Dict from pydantic import ConfigDict, BaseModel, Field, StrictStr class SaasUser(BaseModel): @@ -27,7 +27,7 @@ class SaasUser(BaseModel): """ id: StrictStr = Field(...) email: StrictStr = Field(..., description="E-mail") - attributes: Optional[Dict[str, Any]] = Field(None, description="Attribute information ") + attributes: Dict[str, Any] = Field(..., description="Attribute information ") __properties = ["id", "email", "attributes"] model_config = ConfigDict(populate_by_name=True, validate_assignment=True) diff --git a/saasus_sdk_python/src/auth/models/stripe_customer.py b/saasus_sdk_python/src/auth/models/stripe_customer.py new file mode 100644 index 0000000..85f6f1c --- /dev/null +++ b/saasus_sdk_python/src/auth/models/stripe_customer.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + + +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class StripeCustomer(BaseModel): + """ + StripeCustomer + """ + customer_id: StrictStr = Field(..., description="stripe Customer ID") + subscription_schedule_id: StrictStr = Field(..., description="stripe Subscription Schedule ID") + __properties = ["customer_id", "subscription_schedule_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> StripeCustomer: + """Create an instance of StripeCustomer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> StripeCustomer: + """Create an instance of StripeCustomer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return StripeCustomer.parse_obj(obj) + + _obj = StripeCustomer.parse_obj({ + "customer_id": obj.get("customer_id"), + "subscription_schedule_id": obj.get("subscription_schedule_id") + }) + return _obj + + diff --git a/test/auth/__init__.py b/test/auth/__init__.py index 26de64b..68e853b 100644 --- a/test/auth/__init__.py +++ b/test/auth/__init__.py @@ -110,6 +110,7 @@ from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer from saasus_sdk_python.src.auth.models.tenant import Tenant from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail diff --git a/test/auth/api/saas_user_api.py b/test/auth/api/saas_user_api.py index 40d1516..9b192b6 100644 --- a/test/auth/api/saas_user_api.py +++ b/test/auth/api/saas_user_api.py @@ -511,7 +511,7 @@ def confirm_sign_up_with_aws_marketplace_with_http_info(self, confirm_sign_up_wi def create_saas_user(self, create_saas_user_param : Optional[CreateSaasUserParam] = None, **kwargs) -> SaasUser: # noqa: E501 """Create SaaS User # noqa: E501 - Create SaaS User. # noqa: E501 + Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -540,7 +540,7 @@ def create_saas_user(self, create_saas_user_param : Optional[CreateSaasUserParam def create_saas_user_with_http_info(self, create_saas_user_param : Optional[CreateSaasUserParam] = None, **kwargs) -> ApiResponse: # noqa: E501 """Create SaaS User # noqa: E501 - Create SaaS User. # noqa: E501 + Create SaaS User. If attributes is empty, a temporary password will be sent to the registered email. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/test/auth/api/tenant_api.py b/test/auth/api/tenant_api.py index f8cf167..7d06488 100644 --- a/test/auth/api/tenant_api.py +++ b/test/auth/api/tenant_api.py @@ -25,6 +25,7 @@ from saasus_sdk_python.src.auth.models.billing_info import BillingInfo from saasus_sdk_python.src.auth.models.plan_reservation import PlanReservation +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer from saasus_sdk_python.src.auth.models.tenant import Tenant from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail from saasus_sdk_python.src.auth.models.tenant_identity_providers import TenantIdentityProviders @@ -594,6 +595,146 @@ def delete_tenant_with_http_info(self, tenant_id : Annotated[StrictStr, Field(.. collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + def get_stripe_customer(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> StripeCustomer: # noqa: E501 + """Get Stripe Customer # noqa: E501 + + Get the Stripe Customer information associated with the tenant, including their subscriptions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_customer(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: StripeCustomer + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + raise ValueError("Error! Please call the get_stripe_customer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + return self.get_stripe_customer_with_http_info(tenant_id, **kwargs) # noqa: E501 + + @validate_arguments + def get_stripe_customer_with_http_info(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> ApiResponse: # noqa: E501 + """Get Stripe Customer # noqa: E501 + + Get the Stripe Customer information associated with the tenant, including their subscriptions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_stripe_customer_with_http_info(tenant_id, async_req=True) + >>> result = thread.get() + + :param tenant_id: Tenant ID (required) + :type tenant_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(StripeCustomer, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tenant_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_stripe_customer" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + if _params['tenant_id']: + _path_params['tenant_id'] = _params['tenant_id'] + + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['Bearer'] # noqa: E501 + + _response_types_map = { + '200': "StripeCustomer", + '500': "Error", + } + + return self.api_client.call_api( + '/tenants/{tenant_id}/stripe-customer', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def get_tenant(self, tenant_id : Annotated[StrictStr, Field(..., description="Tenant ID")], **kwargs) -> TenantDetail: # noqa: E501 """Get Tenant Details # noqa: E501 diff --git a/test/auth/models/__init__.py b/test/auth/models/__init__.py index dda4fe8..083e14d 100644 --- a/test/auth/models/__init__.py +++ b/test/auth/models/__init__.py @@ -80,6 +80,7 @@ from saasus_sdk_python.src.auth.models.sign_up_with_aws_marketplace_param import SignUpWithAwsMarketplaceParam from saasus_sdk_python.src.auth.models.single_tenant_settings import SingleTenantSettings from saasus_sdk_python.src.auth.models.software_token_secret_code import SoftwareTokenSecretCode +from saasus_sdk_python.src.auth.models.stripe_customer import StripeCustomer from saasus_sdk_python.src.auth.models.tenant import Tenant from saasus_sdk_python.src.auth.models.tenant_attributes import TenantAttributes from saasus_sdk_python.src.auth.models.tenant_detail import TenantDetail diff --git a/test/auth/models/create_saas_user_param.py b/test/auth/models/create_saas_user_param.py index 8335762..406e216 100644 --- a/test/auth/models/create_saas_user_param.py +++ b/test/auth/models/create_saas_user_param.py @@ -18,7 +18,7 @@ import json - +from typing import Optional from pydantic import ConfigDict, BaseModel, Field, StrictStr class CreateSaasUserParam(BaseModel): @@ -26,7 +26,7 @@ class CreateSaasUserParam(BaseModel): CreateSaasUserParam """ email: StrictStr = Field(..., description="E-mail") - password: StrictStr = Field(..., description="Password") + password: Optional[StrictStr] = Field(None, description="Password") __properties = ["email", "password"] model_config = ConfigDict(populate_by_name=True, validate_assignment=True) diff --git a/test/auth/models/saas_user.py b/test/auth/models/saas_user.py index ab9f596..ecc36b7 100644 --- a/test/auth/models/saas_user.py +++ b/test/auth/models/saas_user.py @@ -18,7 +18,7 @@ import json -from typing import Any, Dict, Optional +from typing import Any, Dict from pydantic import ConfigDict, BaseModel, Field, StrictStr class SaasUser(BaseModel): @@ -27,7 +27,7 @@ class SaasUser(BaseModel): """ id: StrictStr = Field(...) email: StrictStr = Field(..., description="E-mail") - attributes: Optional[Dict[str, Any]] = Field(None, description="Attribute information ") + attributes: Dict[str, Any] = Field(..., description="Attribute information ") __properties = ["id", "email", "attributes"] model_config = ConfigDict(populate_by_name=True, validate_assignment=True) diff --git a/test/auth/models/stripe_customer.py b/test/auth/models/stripe_customer.py new file mode 100644 index 0000000..85f6f1c --- /dev/null +++ b/test/auth/models/stripe_customer.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + SaaSus Auth API Schema + + Schema + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + + +from pydantic import ConfigDict, BaseModel, Field, StrictStr + +class StripeCustomer(BaseModel): + """ + StripeCustomer + """ + customer_id: StrictStr = Field(..., description="stripe Customer ID") + subscription_schedule_id: StrictStr = Field(..., description="stripe Subscription Schedule ID") + __properties = ["customer_id", "subscription_schedule_id"] + model_config = ConfigDict(populate_by_name=True, validate_assignment=True) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> StripeCustomer: + """Create an instance of StripeCustomer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> StripeCustomer: + """Create an instance of StripeCustomer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return StripeCustomer.parse_obj(obj) + + _obj = StripeCustomer.parse_obj({ + "customer_id": obj.get("customer_id"), + "subscription_schedule_id": obj.get("subscription_schedule_id") + }) + return _obj + +