spatialflow 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spatialflow/__init__.py +91 -0
- spatialflow/_generated/.github/workflows/python.yml +31 -0
- spatialflow/_generated/.gitignore +66 -0
- spatialflow/_generated/.gitlab-ci.yml +31 -0
- spatialflow/_generated/.openapi-generator/FILES +390 -0
- spatialflow/_generated/.openapi-generator/VERSION +1 -0
- spatialflow/_generated/.openapi-generator-ignore +23 -0
- spatialflow/_generated/.spec-hash +1 -0
- spatialflow/_generated/.travis.yml +17 -0
- spatialflow/_generated/README.md +537 -0
- spatialflow/_generated/__init__.py +1 -0
- spatialflow/_generated/docs/APIUsageStats.md +32 -0
- spatialflow/_generated/docs/AccountApi.md +1751 -0
- spatialflow/_generated/docs/ActionDeliverySuccessMetrics.md +32 -0
- spatialflow/_generated/docs/ActionResponse.md +32 -0
- spatialflow/_generated/docs/ActionRetryConfigSchema.md +32 -0
- spatialflow/_generated/docs/ActivitySummary.md +30 -0
- spatialflow/_generated/docs/AdminApi.md +1787 -0
- spatialflow/_generated/docs/ApiKeyCreateRequest.md +31 -0
- spatialflow/_generated/docs/ApiKeyCreateResponse.md +31 -0
- spatialflow/_generated/docs/ApiKeyResponse.md +38 -0
- spatialflow/_generated/docs/ApiKeyUpdateRequest.md +33 -0
- spatialflow/_generated/docs/AsyncUploadGeofencesResponse.md +33 -0
- spatialflow/_generated/docs/AuthTypeEnum.md +17 -0
- spatialflow/_generated/docs/AuthenticationApi.md +1289 -0
- spatialflow/_generated/docs/BatchLocationUpdateIn.md +30 -0
- spatialflow/_generated/docs/BillingApi.md +925 -0
- spatialflow/_generated/docs/BulkGeofenceRequest.md +29 -0
- spatialflow/_generated/docs/ChangePasswordSchema.md +30 -0
- spatialflow/_generated/docs/CheckoutSessionRequest.md +32 -0
- spatialflow/_generated/docs/CheckoutSessionResponse.md +31 -0
- spatialflow/_generated/docs/CircuitBreakerSchema.md +33 -0
- spatialflow/_generated/docs/ConfigFieldDefinitionRequest.md +41 -0
- spatialflow/_generated/docs/ConfigFieldDefinitionResponse.md +43 -0
- spatialflow/_generated/docs/ConfirmPasswordResetSchema.md +31 -0
- spatialflow/_generated/docs/CreateFromTemplateIn.md +30 -0
- spatialflow/_generated/docs/CreateGeofenceRequest.md +36 -0
- spatialflow/_generated/docs/CreateIntegrationSchema.md +33 -0
- spatialflow/_generated/docs/CreateUserSchema.md +35 -0
- spatialflow/_generated/docs/CreateWebhookRequest.md +43 -0
- spatialflow/_generated/docs/DashboardComparisonMetrics.md +32 -0
- spatialflow/_generated/docs/DashboardMetricsResponse.md +36 -0
- spatialflow/_generated/docs/DefaultApi.md +585 -0
- spatialflow/_generated/docs/DeleteFileResponse.md +30 -0
- spatialflow/_generated/docs/DeliveryStatusEnum.md +15 -0
- spatialflow/_generated/docs/DeviceIn.md +32 -0
- spatialflow/_generated/docs/DeviceOut.md +37 -0
- spatialflow/_generated/docs/DevicesApi.md +1213 -0
- spatialflow/_generated/docs/E2ETestApi.md +271 -0
- spatialflow/_generated/docs/EmailApi.md +541 -0
- spatialflow/_generated/docs/EmailHealthResponse.md +31 -0
- spatialflow/_generated/docs/EmailQueueStats.md +34 -0
- spatialflow/_generated/docs/EmailStats.md +31 -0
- spatialflow/_generated/docs/EmailStatusResponse.md +36 -0
- spatialflow/_generated/docs/ErrorResponse.md +32 -0
- spatialflow/_generated/docs/ExecutionOut.md +38 -0
- spatialflow/_generated/docs/ExportIntegrationSchema.md +35 -0
- spatialflow/_generated/docs/FileListResponse.md +31 -0
- spatialflow/_generated/docs/ForgotPasswordSchema.md +29 -0
- spatialflow/_generated/docs/GPXPlaybackOut.md +42 -0
- spatialflow/_generated/docs/GPXRouteOut.md +40 -0
- spatialflow/_generated/docs/GPXSimulatorApi.md +883 -0
- spatialflow/_generated/docs/GeoJSONPoint.md +31 -0
- spatialflow/_generated/docs/GeofenceListResponse.md +31 -0
- spatialflow/_generated/docs/GeofenceResponse.md +43 -0
- spatialflow/_generated/docs/GeofenceStats.md +30 -0
- spatialflow/_generated/docs/GeofenceTestResult.md +33 -0
- spatialflow/_generated/docs/GeofencesApi.md +1524 -0
- spatialflow/_generated/docs/HealthCheckResponse.md +31 -0
- spatialflow/_generated/docs/HealthResponse.md +32 -0
- spatialflow/_generated/docs/ImportIntegrationSchema.md +32 -0
- spatialflow/_generated/docs/ImportResultSchema.md +33 -0
- spatialflow/_generated/docs/IntegrationDetailSchema.md +44 -0
- spatialflow/_generated/docs/IntegrationResponseSchema.md +42 -0
- spatialflow/_generated/docs/IntegrationStatsSchema.md +36 -0
- spatialflow/_generated/docs/IntegrationTypeListResponse.md +34 -0
- spatialflow/_generated/docs/IntegrationTypeRequest.md +40 -0
- spatialflow/_generated/docs/IntegrationTypeResponse.md +45 -0
- spatialflow/_generated/docs/IntegrationsApi.md +2008 -0
- spatialflow/_generated/docs/InvoiceLineItem.md +33 -0
- spatialflow/_generated/docs/InvoiceListResponse.md +31 -0
- spatialflow/_generated/docs/InvoiceResponse.md +40 -0
- spatialflow/_generated/docs/LocationBatchIn.md +31 -0
- spatialflow/_generated/docs/LocationImportResponse.md +41 -0
- spatialflow/_generated/docs/LocationIngestResponse.md +35 -0
- spatialflow/_generated/docs/LocationPointIn.md +38 -0
- spatialflow/_generated/docs/LocationUpdateIn.md +36 -0
- spatialflow/_generated/docs/LocationUpdateOut.md +32 -0
- spatialflow/_generated/docs/LoginResponse.md +33 -0
- spatialflow/_generated/docs/LoginSchema.md +30 -0
- spatialflow/_generated/docs/MemberActionResponse.md +33 -0
- spatialflow/_generated/docs/MemberSummary.md +36 -0
- spatialflow/_generated/docs/MethodEnum.md +17 -0
- spatialflow/_generated/docs/OAuthAuthorizeResponse.md +29 -0
- spatialflow/_generated/docs/OAuthCallbackQuery.md +32 -0
- spatialflow/_generated/docs/OAuthLinkResponse.md +31 -0
- spatialflow/_generated/docs/OAuthProvidersResponse.md +29 -0
- spatialflow/_generated/docs/OnboardingProgressResponse.md +37 -0
- spatialflow/_generated/docs/PaymentMethodResponse.md +37 -0
- spatialflow/_generated/docs/PingResponse.md +31 -0
- spatialflow/_generated/docs/PlanChangePreviewResponse.md +35 -0
- spatialflow/_generated/docs/PlanFeatures.md +36 -0
- spatialflow/_generated/docs/PlanLimits.md +34 -0
- spatialflow/_generated/docs/PlanResponse.md +37 -0
- spatialflow/_generated/docs/PortalSessionRequest.md +30 -0
- spatialflow/_generated/docs/PortalSessionResponse.md +30 -0
- spatialflow/_generated/docs/PresignedUrlRequest.md +31 -0
- spatialflow/_generated/docs/PresignedUrlResponse.md +35 -0
- spatialflow/_generated/docs/PrivacyErasureRequest.md +35 -0
- spatialflow/_generated/docs/PrivacyErasureResponse.md +36 -0
- spatialflow/_generated/docs/PublicApi.md +389 -0
- spatialflow/_generated/docs/PublicLocationIngestApi.md +249 -0
- spatialflow/_generated/docs/RateLimitResponse.md +32 -0
- spatialflow/_generated/docs/RecentActivity.md +31 -0
- spatialflow/_generated/docs/RefreshTokenSchema.md +29 -0
- spatialflow/_generated/docs/RegisterSchema.md +37 -0
- spatialflow/_generated/docs/ResendVerificationSchema.md +29 -0
- spatialflow/_generated/docs/ResetPasswordSchema.md +31 -0
- spatialflow/_generated/docs/RetryPolicyResponseSchema.md +32 -0
- spatialflow/_generated/docs/RetryPolicySchema.md +35 -0
- spatialflow/_generated/docs/RetryStrategyEnum.md +14 -0
- spatialflow/_generated/docs/SeedDataResponseSchema.md +31 -0
- spatialflow/_generated/docs/SendEmailRequest.md +33 -0
- spatialflow/_generated/docs/SetupIntentResponse.md +30 -0
- spatialflow/_generated/docs/SignupRequest.md +40 -0
- spatialflow/_generated/docs/StartPlaybackRequest.md +30 -0
- spatialflow/_generated/docs/StorageApi.md +494 -0
- spatialflow/_generated/docs/SubscriptionActionResponse.md +32 -0
- spatialflow/_generated/docs/SubscriptionResponse.md +36 -0
- spatialflow/_generated/docs/SubscriptionsApi.md +677 -0
- spatialflow/_generated/docs/SuccessResponse.md +31 -0
- spatialflow/_generated/docs/SystemApi.md +137 -0
- spatialflow/_generated/docs/TemplateOut.md +35 -0
- spatialflow/_generated/docs/TestEventRequest.md +29 -0
- spatialflow/_generated/docs/TestIntegrationResponseSchema.md +31 -0
- spatialflow/_generated/docs/TestPointRequest.md +34 -0
- spatialflow/_generated/docs/TestPointResponse.md +33 -0
- spatialflow/_generated/docs/TestWebhookRequest.md +32 -0
- spatialflow/_generated/docs/TestWorkflowIn.md +29 -0
- spatialflow/_generated/docs/TileMetadata.md +36 -0
- spatialflow/_generated/docs/TilesApi.md +462 -0
- spatialflow/_generated/docs/UnsubscribeRequest.md +29 -0
- spatialflow/_generated/docs/UnsubscribeResponse.md +31 -0
- spatialflow/_generated/docs/UpdateGeofenceRequest.md +37 -0
- spatialflow/_generated/docs/UpdateIntegrationSchema.md +33 -0
- spatialflow/_generated/docs/UpdateMemberRoleRequest.md +30 -0
- spatialflow/_generated/docs/UpdateOnboardingProgressRequest.md +30 -0
- spatialflow/_generated/docs/UpdateProfileRequest.md +45 -0
- spatialflow/_generated/docs/UpdateUserWorkspaceRequest.md +31 -0
- spatialflow/_generated/docs/UpdateWebhookRequest.md +43 -0
- spatialflow/_generated/docs/UploadGeofencesRequest.md +31 -0
- spatialflow/_generated/docs/UploadJobStatus.md +42 -0
- spatialflow/_generated/docs/UsageMetrics.md +33 -0
- spatialflow/_generated/docs/UsageResponse.md +36 -0
- spatialflow/_generated/docs/UsageStats.md +32 -0
- spatialflow/_generated/docs/UserActionResponse.md +35 -0
- spatialflow/_generated/docs/UserApprovalRequest.md +30 -0
- spatialflow/_generated/docs/UserInviteRequest.md +33 -0
- spatialflow/_generated/docs/UserInviteResponse.md +36 -0
- spatialflow/_generated/docs/UserListResponse.md +34 -0
- spatialflow/_generated/docs/UserProfileResponse.md +55 -0
- spatialflow/_generated/docs/UserRejectionRequest.md +30 -0
- spatialflow/_generated/docs/UserResponse.md +44 -0
- spatialflow/_generated/docs/UserSummary.md +41 -0
- spatialflow/_generated/docs/UserUsageResponse.md +38 -0
- spatialflow/_generated/docs/UserWorkspaceResponse.md +34 -0
- spatialflow/_generated/docs/WebhookDeliveryDetailResponse.md +49 -0
- spatialflow/_generated/docs/WebhookDeliveryListResponse.md +31 -0
- spatialflow/_generated/docs/WebhookDeliveryResponse.md +46 -0
- spatialflow/_generated/docs/WebhookListResponse.md +31 -0
- spatialflow/_generated/docs/WebhookMetricsResponse.md +31 -0
- spatialflow/_generated/docs/WebhookResponse.md +50 -0
- spatialflow/_generated/docs/WebhookTestResponse.md +36 -0
- spatialflow/_generated/docs/WebhooksApi.md +1384 -0
- spatialflow/_generated/docs/WorkflowImportSchema.md +30 -0
- spatialflow/_generated/docs/WorkflowIn.md +32 -0
- spatialflow/_generated/docs/WorkflowListOut.md +39 -0
- spatialflow/_generated/docs/WorkflowListResponse.md +32 -0
- spatialflow/_generated/docs/WorkflowOut.md +42 -0
- spatialflow/_generated/docs/WorkflowRetryPolicyUpdateSchema.md +32 -0
- spatialflow/_generated/docs/WorkflowStepRetrySchema.md +33 -0
- spatialflow/_generated/docs/WorkflowUpdate.md +33 -0
- spatialflow/_generated/docs/WorkflowsApi.md +2599 -0
- spatialflow/_generated/docs/WorkspaceDeleteResponse.md +33 -0
- spatialflow/_generated/docs/WorkspaceDetail.md +37 -0
- spatialflow/_generated/docs/WorkspaceDetailResponse.md +41 -0
- spatialflow/_generated/docs/WorkspaceIn.md +34 -0
- spatialflow/_generated/docs/WorkspaceListItem.md +39 -0
- spatialflow/_generated/docs/WorkspaceListResponse.md +34 -0
- spatialflow/_generated/docs/WorkspaceMembersResponse.md +35 -0
- spatialflow/_generated/docs/WorkspaceOut.md +38 -0
- spatialflow/_generated/docs/WorkspaceSummary.md +32 -0
- spatialflow/_generated/docs/WorkspaceUpdateRequest.md +34 -0
- spatialflow/_generated/docs/WorkspaceUpdateResponse.md +33 -0
- spatialflow/_generated/docs/WorkspacesApi.md +241 -0
- spatialflow/_generated/git_push.sh +57 -0
- spatialflow/_generated/pyproject.toml +91 -0
- spatialflow/_generated/requirements.txt +6 -0
- spatialflow/_generated/setup.cfg +2 -0
- spatialflow/_generated/setup.py +51 -0
- spatialflow/_generated/spatialflow_generated/__init__.py +216 -0
- spatialflow/_generated/spatialflow_generated/api/__init__.py +24 -0
- spatialflow/_generated/spatialflow_generated/api/account_api.py +5675 -0
- spatialflow/_generated/spatialflow_generated/api/admin_api.py +6173 -0
- spatialflow/_generated/spatialflow_generated/api/authentication_api.py +4753 -0
- spatialflow/_generated/spatialflow_generated/api/billing_api.py +3151 -0
- spatialflow/_generated/spatialflow_generated/api/default_api.py +2157 -0
- spatialflow/_generated/spatialflow_generated/api/devices_api.py +3965 -0
- spatialflow/_generated/spatialflow_generated/api/e2_e_test_api.py +1049 -0
- spatialflow/_generated/spatialflow_generated/api/email_api.py +1879 -0
- spatialflow/_generated/spatialflow_generated/api/geofences_api.py +4899 -0
- spatialflow/_generated/spatialflow_generated/api/gpx_simulator_api.py +2824 -0
- spatialflow/_generated/spatialflow_generated/api/integrations_api.py +6952 -0
- spatialflow/_generated/spatialflow_generated/api/public_api.py +1506 -0
- spatialflow/_generated/spatialflow_generated/api/public_location_ingest_api.py +845 -0
- spatialflow/_generated/spatialflow_generated/api/storage_api.py +1642 -0
- spatialflow/_generated/spatialflow_generated/api/subscriptions_api.py +2356 -0
- spatialflow/_generated/spatialflow_generated/api/system_api.py +529 -0
- spatialflow/_generated/spatialflow_generated/api/tiles_api.py +1626 -0
- spatialflow/_generated/spatialflow_generated/api/webhooks_api.py +4579 -0
- spatialflow/_generated/spatialflow_generated/api/workflows_api.py +8334 -0
- spatialflow/_generated/spatialflow_generated/api/workspaces_api.py +813 -0
- spatialflow/_generated/spatialflow_generated/api_client.py +800 -0
- spatialflow/_generated/spatialflow_generated/api_response.py +21 -0
- spatialflow/_generated/spatialflow_generated/configuration.py +599 -0
- spatialflow/_generated/spatialflow_generated/exceptions.py +199 -0
- spatialflow/_generated/spatialflow_generated/models/__init__.py +180 -0
- spatialflow/_generated/spatialflow_generated/models/action_delivery_success_metrics.py +96 -0
- spatialflow/_generated/spatialflow_generated/models/action_response.py +96 -0
- spatialflow/_generated/spatialflow_generated/models/action_retry_config_schema.py +114 -0
- spatialflow/_generated/spatialflow_generated/models/activity_summary.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/api_key_create_request.py +95 -0
- spatialflow/_generated/spatialflow_generated/models/api_key_create_response.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/api_key_response.py +109 -0
- spatialflow/_generated/spatialflow_generated/models/api_key_update_request.py +114 -0
- spatialflow/_generated/spatialflow_generated/models/api_usage_stats.py +98 -0
- spatialflow/_generated/spatialflow_generated/models/async_upload_geofences_response.py +93 -0
- spatialflow/_generated/spatialflow_generated/models/auth_type_enum.py +39 -0
- spatialflow/_generated/spatialflow_generated/models/batch_location_update_in.py +97 -0
- spatialflow/_generated/spatialflow_generated/models/bulk_geofence_request.py +95 -0
- spatialflow/_generated/spatialflow_generated/models/change_password_schema.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/checkout_session_request.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/checkout_session_response.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/circuit_breaker_schema.py +94 -0
- spatialflow/_generated/spatialflow_generated/models/config_field_definition_request.py +134 -0
- spatialflow/_generated/spatialflow_generated/models/config_field_definition_response.py +138 -0
- spatialflow/_generated/spatialflow_generated/models/confirm_password_reset_schema.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/create_from_template_in.py +94 -0
- spatialflow/_generated/spatialflow_generated/models/create_geofence_request.py +125 -0
- spatialflow/_generated/spatialflow_generated/models/create_integration_schema.py +106 -0
- spatialflow/_generated/spatialflow_generated/models/create_user_schema.py +99 -0
- spatialflow/_generated/spatialflow_generated/models/create_webhook_request.py +136 -0
- spatialflow/_generated/spatialflow_generated/models/dashboard_comparison_metrics.py +96 -0
- spatialflow/_generated/spatialflow_generated/models/dashboard_metrics_response.py +108 -0
- spatialflow/_generated/spatialflow_generated/models/delete_file_response.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/delivery_status_enum.py +38 -0
- spatialflow/_generated/spatialflow_generated/models/device_in.py +98 -0
- spatialflow/_generated/spatialflow_generated/models/device_out.py +114 -0
- spatialflow/_generated/spatialflow_generated/models/email_health_response.py +92 -0
- spatialflow/_generated/spatialflow_generated/models/email_queue_stats.py +97 -0
- spatialflow/_generated/spatialflow_generated/models/email_stats.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/email_status_response.py +112 -0
- spatialflow/_generated/spatialflow_generated/models/error_response.py +101 -0
- spatialflow/_generated/spatialflow_generated/models/execution_out.py +126 -0
- spatialflow/_generated/spatialflow_generated/models/export_integration_schema.py +97 -0
- spatialflow/_generated/spatialflow_generated/models/file_list_response.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/forgot_password_schema.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/geo_json_point.py +97 -0
- spatialflow/_generated/spatialflow_generated/models/geofence_list_response.py +97 -0
- spatialflow/_generated/spatialflow_generated/models/geofence_response.py +139 -0
- spatialflow/_generated/spatialflow_generated/models/geofence_stats.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/geofence_test_result.py +98 -0
- spatialflow/_generated/spatialflow_generated/models/gpx_playback_out.py +128 -0
- spatialflow/_generated/spatialflow_generated/models/gpx_route_out.py +119 -0
- spatialflow/_generated/spatialflow_generated/models/health_check_response.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/health_response.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/import_integration_schema.py +100 -0
- spatialflow/_generated/spatialflow_generated/models/import_result_schema.py +103 -0
- spatialflow/_generated/spatialflow_generated/models/integration_detail_schema.py +125 -0
- spatialflow/_generated/spatialflow_generated/models/integration_response_schema.py +123 -0
- spatialflow/_generated/spatialflow_generated/models/integration_stats_schema.py +116 -0
- spatialflow/_generated/spatialflow_generated/models/integration_type_list_response.py +103 -0
- spatialflow/_generated/spatialflow_generated/models/integration_type_request.py +117 -0
- spatialflow/_generated/spatialflow_generated/models/integration_type_response.py +128 -0
- spatialflow/_generated/spatialflow_generated/models/invoice_line_item.py +93 -0
- spatialflow/_generated/spatialflow_generated/models/invoice_list_response.py +97 -0
- spatialflow/_generated/spatialflow_generated/models/invoice_response.py +120 -0
- spatialflow/_generated/spatialflow_generated/models/location_batch_in.py +102 -0
- spatialflow/_generated/spatialflow_generated/models/location_import_response.py +120 -0
- spatialflow/_generated/spatialflow_generated/models/location_ingest_response.py +117 -0
- spatialflow/_generated/spatialflow_generated/models/location_point_in.py +129 -0
- spatialflow/_generated/spatialflow_generated/models/location_update_in.py +132 -0
- spatialflow/_generated/spatialflow_generated/models/location_update_out.py +93 -0
- spatialflow/_generated/spatialflow_generated/models/login_response.py +95 -0
- spatialflow/_generated/spatialflow_generated/models/login_schema.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/member_action_response.py +98 -0
- spatialflow/_generated/spatialflow_generated/models/member_summary.py +114 -0
- spatialflow/_generated/spatialflow_generated/models/method_enum.py +39 -0
- spatialflow/_generated/spatialflow_generated/models/o_auth_authorize_response.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/o_auth_callback_query.py +103 -0
- spatialflow/_generated/spatialflow_generated/models/o_auth_link_response.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/o_auth_providers_response.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/onboarding_progress_response.py +112 -0
- spatialflow/_generated/spatialflow_generated/models/payment_method_response.py +116 -0
- spatialflow/_generated/spatialflow_generated/models/ping_response.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/plan_change_preview_response.py +104 -0
- spatialflow/_generated/spatialflow_generated/models/plan_features.py +109 -0
- spatialflow/_generated/spatialflow_generated/models/plan_limits.py +95 -0
- spatialflow/_generated/spatialflow_generated/models/plan_response.py +114 -0
- spatialflow/_generated/spatialflow_generated/models/portal_session_request.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/portal_session_response.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/presigned_url_request.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/presigned_url_response.py +99 -0
- spatialflow/_generated/spatialflow_generated/models/privacy_erasure_request.py +118 -0
- spatialflow/_generated/spatialflow_generated/models/privacy_erasure_response.py +110 -0
- spatialflow/_generated/spatialflow_generated/models/rate_limit_response.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/recent_activity.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/refresh_token_schema.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/register_schema.py +133 -0
- spatialflow/_generated/spatialflow_generated/models/resend_verification_schema.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/reset_password_schema.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/retry_policy_response_schema.py +95 -0
- spatialflow/_generated/spatialflow_generated/models/retry_policy_schema.py +99 -0
- spatialflow/_generated/spatialflow_generated/models/retry_strategy_enum.py +38 -0
- spatialflow/_generated/spatialflow_generated/models/seed_data_response_schema.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/send_email_request.py +100 -0
- spatialflow/_generated/spatialflow_generated/models/setup_intent_response.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/signup_request.py +164 -0
- spatialflow/_generated/spatialflow_generated/models/start_playback_request.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/subscription_action_response.py +100 -0
- spatialflow/_generated/spatialflow_generated/models/subscription_response.py +113 -0
- spatialflow/_generated/spatialflow_generated/models/success_response.py +94 -0
- spatialflow/_generated/spatialflow_generated/models/template_out.py +104 -0
- spatialflow/_generated/spatialflow_generated/models/test_event_request.py +92 -0
- spatialflow/_generated/spatialflow_generated/models/test_integration_response_schema.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/test_point_request.py +125 -0
- spatialflow/_generated/spatialflow_generated/models/test_point_response.py +101 -0
- spatialflow/_generated/spatialflow_generated/models/test_webhook_request.py +106 -0
- spatialflow/_generated/spatialflow_generated/models/test_workflow_in.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/tile_metadata.py +99 -0
- spatialflow/_generated/spatialflow_generated/models/unsubscribe_request.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/unsubscribe_response.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/update_geofence_request.py +142 -0
- spatialflow/_generated/spatialflow_generated/models/update_integration_schema.py +121 -0
- spatialflow/_generated/spatialflow_generated/models/update_member_role_request.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/update_onboarding_progress_request.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/update_profile_request.py +208 -0
- spatialflow/_generated/spatialflow_generated/models/update_user_workspace_request.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/update_webhook_request.py +186 -0
- spatialflow/_generated/spatialflow_generated/models/upload_geofences_request.py +95 -0
- spatialflow/_generated/spatialflow_generated/models/upload_job_status.py +137 -0
- spatialflow/_generated/spatialflow_generated/models/usage_metrics.py +93 -0
- spatialflow/_generated/spatialflow_generated/models/usage_response.py +105 -0
- spatialflow/_generated/spatialflow_generated/models/usage_stats.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/user_action_response.py +119 -0
- spatialflow/_generated/spatialflow_generated/models/user_approval_request.py +92 -0
- spatialflow/_generated/spatialflow_generated/models/user_invite_request.py +110 -0
- spatialflow/_generated/spatialflow_generated/models/user_invite_response.py +99 -0
- spatialflow/_generated/spatialflow_generated/models/user_list_response.py +110 -0
- spatialflow/_generated/spatialflow_generated/models/user_profile_response.py +158 -0
- spatialflow/_generated/spatialflow_generated/models/user_rejection_request.py +87 -0
- spatialflow/_generated/spatialflow_generated/models/user_response.py +142 -0
- spatialflow/_generated/spatialflow_generated/models/user_summary.py +140 -0
- spatialflow/_generated/spatialflow_generated/models/user_usage_response.py +152 -0
- spatialflow/_generated/spatialflow_generated/models/user_workspace_response.py +110 -0
- spatialflow/_generated/spatialflow_generated/models/webhook_delivery_detail_response.py +182 -0
- spatialflow/_generated/spatialflow_generated/models/webhook_delivery_list_response.py +97 -0
- spatialflow/_generated/spatialflow_generated/models/webhook_delivery_response.py +161 -0
- spatialflow/_generated/spatialflow_generated/models/webhook_list_response.py +97 -0
- spatialflow/_generated/spatialflow_generated/models/webhook_metrics_response.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/webhook_response.py +148 -0
- spatialflow/_generated/spatialflow_generated/models/webhook_test_response.py +114 -0
- spatialflow/_generated/spatialflow_generated/models/workflow_import_schema.py +89 -0
- spatialflow/_generated/spatialflow_generated/models/workflow_in.py +98 -0
- spatialflow/_generated/spatialflow_generated/models/workflow_list_out.py +118 -0
- spatialflow/_generated/spatialflow_generated/models/workflow_list_response.py +101 -0
- spatialflow/_generated/spatialflow_generated/models/workflow_out.py +129 -0
- spatialflow/_generated/spatialflow_generated/models/workflow_retry_policy_update_schema.py +109 -0
- spatialflow/_generated/spatialflow_generated/models/workflow_step_retry_schema.py +103 -0
- spatialflow/_generated/spatialflow_generated/models/workflow_update.py +120 -0
- spatialflow/_generated/spatialflow_generated/models/workspace_delete_response.py +93 -0
- spatialflow/_generated/spatialflow_generated/models/workspace_detail.py +116 -0
- spatialflow/_generated/spatialflow_generated/models/workspace_detail_response.py +143 -0
- spatialflow/_generated/spatialflow_generated/models/workspace_in.py +122 -0
- spatialflow/_generated/spatialflow_generated/models/workspace_list_item.py +130 -0
- spatialflow/_generated/spatialflow_generated/models/workspace_list_response.py +103 -0
- spatialflow/_generated/spatialflow_generated/models/workspace_members_response.py +109 -0
- spatialflow/_generated/spatialflow_generated/models/workspace_out.py +132 -0
- spatialflow/_generated/spatialflow_generated/models/workspace_summary.py +91 -0
- spatialflow/_generated/spatialflow_generated/models/workspace_update_request.py +120 -0
- spatialflow/_generated/spatialflow_generated/models/workspace_update_response.py +93 -0
- spatialflow/_generated/spatialflow_generated/py.typed +0 -0
- spatialflow/_generated/spatialflow_generated/rest.py +215 -0
- spatialflow/_generated/test-requirements.txt +6 -0
- spatialflow/_generated/tox.ini +9 -0
- spatialflow/client.py +137 -0
- spatialflow/exceptions.py +234 -0
- spatialflow/jobs.py +204 -0
- spatialflow/pagination.py +142 -0
- spatialflow/uploads.py +166 -0
- spatialflow/webhooks.py +126 -0
- spatialflow-0.1.0.dist-info/METADATA +249 -0
- spatialflow-0.1.0.dist-info/RECORD +404 -0
- spatialflow-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,2356 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SpatialFlow API
|
|
5
|
+
|
|
6
|
+
Real-time geospatial automation platform API. ## Authentication **API Key:** Include `X-API-Key` header **JWT Token:** Include `Authorization: Bearer <token>` header ## Rate Limits - Per API Key: 200 rps sustained, 1,000 rps burst - Per Organization: 1,000 rps aggregate ## Webhook Verification Outbound webhooks include HMAC-SHA256 signatures in `X-SF-Signature` header. ## Support - Documentation: https://docs.spatialflow.io - GitHub: https://github.com/spatialflow/spatialflow - Email: support@spatialflow.io
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from typing import List
|
|
20
|
+
from ..models.checkout_session_request import CheckoutSessionRequest
|
|
21
|
+
from ..models.checkout_session_response import CheckoutSessionResponse
|
|
22
|
+
from ..models.health_response import HealthResponse
|
|
23
|
+
from ..models.plan_response import PlanResponse
|
|
24
|
+
from ..models.portal_session_request import PortalSessionRequest
|
|
25
|
+
from ..models.portal_session_response import PortalSessionResponse
|
|
26
|
+
from ..models.subscription_action_response import SubscriptionActionResponse
|
|
27
|
+
from ..models.subscription_response import SubscriptionResponse
|
|
28
|
+
from ..models.usage_response import UsageResponse
|
|
29
|
+
|
|
30
|
+
from ..api_client import ApiClient, RequestSerialized
|
|
31
|
+
from ..api_response import ApiResponse
|
|
32
|
+
from ..rest import RESTResponseType
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class SubscriptionsApi:
|
|
36
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
37
|
+
Ref: https://openapi-generator.tech
|
|
38
|
+
|
|
39
|
+
Do not edit the class manually.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, api_client=None) -> None:
|
|
43
|
+
if api_client is None:
|
|
44
|
+
api_client = ApiClient.get_default()
|
|
45
|
+
self.api_client = api_client
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@validate_call
|
|
49
|
+
async def apps_subscriptions_api_cancel_subscription(
|
|
50
|
+
self,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> SubscriptionActionResponse:
|
|
64
|
+
"""Cancel Subscription
|
|
65
|
+
|
|
66
|
+
Cancel the current user's subscription at period end.
|
|
67
|
+
|
|
68
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
69
|
+
number provided, it will be total request
|
|
70
|
+
timeout. It can also be a pair (tuple) of
|
|
71
|
+
(connection, read) timeouts.
|
|
72
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
73
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
74
|
+
request; this effectively ignores the
|
|
75
|
+
authentication in the spec for a single request.
|
|
76
|
+
:type _request_auth: dict, optional
|
|
77
|
+
:param _content_type: force content-type for the request.
|
|
78
|
+
:type _content_type: str, Optional
|
|
79
|
+
:param _headers: set to override the headers for a single
|
|
80
|
+
request; this effectively ignores the headers
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _headers: dict, optional
|
|
83
|
+
:param _host_index: set to override the host_index for a single
|
|
84
|
+
request; this effectively ignores the host_index
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _host_index: int, optional
|
|
87
|
+
:return: Returns the result object.
|
|
88
|
+
""" # noqa: E501
|
|
89
|
+
|
|
90
|
+
_param = self._apps_subscriptions_api_cancel_subscription_serialize(
|
|
91
|
+
_request_auth=_request_auth,
|
|
92
|
+
_content_type=_content_type,
|
|
93
|
+
_headers=_headers,
|
|
94
|
+
_host_index=_host_index
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
98
|
+
'200': "SubscriptionActionResponse",
|
|
99
|
+
'400': "Dict[str, object]",
|
|
100
|
+
'404': "Dict[str, object]",
|
|
101
|
+
'429': "Dict[str, object]",
|
|
102
|
+
'500': "Dict[str, object]",
|
|
103
|
+
}
|
|
104
|
+
response_data = await self.api_client.call_api(
|
|
105
|
+
*_param,
|
|
106
|
+
_request_timeout=_request_timeout
|
|
107
|
+
)
|
|
108
|
+
await response_data.read()
|
|
109
|
+
return self.api_client.response_deserialize(
|
|
110
|
+
response_data=response_data,
|
|
111
|
+
response_types_map=_response_types_map,
|
|
112
|
+
).data
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@validate_call
|
|
116
|
+
async def apps_subscriptions_api_cancel_subscription_with_http_info(
|
|
117
|
+
self,
|
|
118
|
+
_request_timeout: Union[
|
|
119
|
+
None,
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Tuple[
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
124
|
+
]
|
|
125
|
+
] = None,
|
|
126
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_content_type: Optional[StrictStr] = None,
|
|
128
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
130
|
+
) -> ApiResponse[SubscriptionActionResponse]:
|
|
131
|
+
"""Cancel Subscription
|
|
132
|
+
|
|
133
|
+
Cancel the current user's subscription at period end.
|
|
134
|
+
|
|
135
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
136
|
+
number provided, it will be total request
|
|
137
|
+
timeout. It can also be a pair (tuple) of
|
|
138
|
+
(connection, read) timeouts.
|
|
139
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
140
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
141
|
+
request; this effectively ignores the
|
|
142
|
+
authentication in the spec for a single request.
|
|
143
|
+
:type _request_auth: dict, optional
|
|
144
|
+
:param _content_type: force content-type for the request.
|
|
145
|
+
:type _content_type: str, Optional
|
|
146
|
+
:param _headers: set to override the headers for a single
|
|
147
|
+
request; this effectively ignores the headers
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _headers: dict, optional
|
|
150
|
+
:param _host_index: set to override the host_index for a single
|
|
151
|
+
request; this effectively ignores the host_index
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _host_index: int, optional
|
|
154
|
+
:return: Returns the result object.
|
|
155
|
+
""" # noqa: E501
|
|
156
|
+
|
|
157
|
+
_param = self._apps_subscriptions_api_cancel_subscription_serialize(
|
|
158
|
+
_request_auth=_request_auth,
|
|
159
|
+
_content_type=_content_type,
|
|
160
|
+
_headers=_headers,
|
|
161
|
+
_host_index=_host_index
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
165
|
+
'200': "SubscriptionActionResponse",
|
|
166
|
+
'400': "Dict[str, object]",
|
|
167
|
+
'404': "Dict[str, object]",
|
|
168
|
+
'429': "Dict[str, object]",
|
|
169
|
+
'500': "Dict[str, object]",
|
|
170
|
+
}
|
|
171
|
+
response_data = await self.api_client.call_api(
|
|
172
|
+
*_param,
|
|
173
|
+
_request_timeout=_request_timeout
|
|
174
|
+
)
|
|
175
|
+
await response_data.read()
|
|
176
|
+
return self.api_client.response_deserialize(
|
|
177
|
+
response_data=response_data,
|
|
178
|
+
response_types_map=_response_types_map,
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
@validate_call
|
|
183
|
+
async def apps_subscriptions_api_cancel_subscription_without_preload_content(
|
|
184
|
+
self,
|
|
185
|
+
_request_timeout: Union[
|
|
186
|
+
None,
|
|
187
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
188
|
+
Tuple[
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
191
|
+
]
|
|
192
|
+
] = None,
|
|
193
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
194
|
+
_content_type: Optional[StrictStr] = None,
|
|
195
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
196
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
197
|
+
) -> RESTResponseType:
|
|
198
|
+
"""Cancel Subscription
|
|
199
|
+
|
|
200
|
+
Cancel the current user's subscription at period end.
|
|
201
|
+
|
|
202
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
203
|
+
number provided, it will be total request
|
|
204
|
+
timeout. It can also be a pair (tuple) of
|
|
205
|
+
(connection, read) timeouts.
|
|
206
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
207
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
208
|
+
request; this effectively ignores the
|
|
209
|
+
authentication in the spec for a single request.
|
|
210
|
+
:type _request_auth: dict, optional
|
|
211
|
+
:param _content_type: force content-type for the request.
|
|
212
|
+
:type _content_type: str, Optional
|
|
213
|
+
:param _headers: set to override the headers for a single
|
|
214
|
+
request; this effectively ignores the headers
|
|
215
|
+
in the spec for a single request.
|
|
216
|
+
:type _headers: dict, optional
|
|
217
|
+
:param _host_index: set to override the host_index for a single
|
|
218
|
+
request; this effectively ignores the host_index
|
|
219
|
+
in the spec for a single request.
|
|
220
|
+
:type _host_index: int, optional
|
|
221
|
+
:return: Returns the result object.
|
|
222
|
+
""" # noqa: E501
|
|
223
|
+
|
|
224
|
+
_param = self._apps_subscriptions_api_cancel_subscription_serialize(
|
|
225
|
+
_request_auth=_request_auth,
|
|
226
|
+
_content_type=_content_type,
|
|
227
|
+
_headers=_headers,
|
|
228
|
+
_host_index=_host_index
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
232
|
+
'200': "SubscriptionActionResponse",
|
|
233
|
+
'400': "Dict[str, object]",
|
|
234
|
+
'404': "Dict[str, object]",
|
|
235
|
+
'429': "Dict[str, object]",
|
|
236
|
+
'500': "Dict[str, object]",
|
|
237
|
+
}
|
|
238
|
+
response_data = await self.api_client.call_api(
|
|
239
|
+
*_param,
|
|
240
|
+
_request_timeout=_request_timeout
|
|
241
|
+
)
|
|
242
|
+
return response_data.response
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
def _apps_subscriptions_api_cancel_subscription_serialize(
|
|
246
|
+
self,
|
|
247
|
+
_request_auth,
|
|
248
|
+
_content_type,
|
|
249
|
+
_headers,
|
|
250
|
+
_host_index,
|
|
251
|
+
) -> RequestSerialized:
|
|
252
|
+
|
|
253
|
+
_host = None
|
|
254
|
+
|
|
255
|
+
_collection_formats: Dict[str, str] = {
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
_path_params: Dict[str, str] = {}
|
|
259
|
+
_query_params: List[Tuple[str, str]] = []
|
|
260
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
261
|
+
_form_params: List[Tuple[str, str]] = []
|
|
262
|
+
_files: Dict[
|
|
263
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
264
|
+
] = {}
|
|
265
|
+
_body_params: Optional[bytes] = None
|
|
266
|
+
|
|
267
|
+
# process the path parameters
|
|
268
|
+
# process the query parameters
|
|
269
|
+
# process the header parameters
|
|
270
|
+
# process the form parameters
|
|
271
|
+
# process the body parameter
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
# set the HTTP header `Accept`
|
|
275
|
+
if 'Accept' not in _header_params:
|
|
276
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
277
|
+
[
|
|
278
|
+
'application/json'
|
|
279
|
+
]
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
# authentication setting
|
|
284
|
+
_auth_settings: List[str] = [
|
|
285
|
+
'JWTBearer'
|
|
286
|
+
]
|
|
287
|
+
|
|
288
|
+
return self.api_client.param_serialize(
|
|
289
|
+
method='PUT',
|
|
290
|
+
resource_path='/api/v1/subscriptions/cancel',
|
|
291
|
+
path_params=_path_params,
|
|
292
|
+
query_params=_query_params,
|
|
293
|
+
header_params=_header_params,
|
|
294
|
+
body=_body_params,
|
|
295
|
+
post_params=_form_params,
|
|
296
|
+
files=_files,
|
|
297
|
+
auth_settings=_auth_settings,
|
|
298
|
+
collection_formats=_collection_formats,
|
|
299
|
+
_host=_host,
|
|
300
|
+
_request_auth=_request_auth
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
@validate_call
|
|
307
|
+
async def apps_subscriptions_api_create_checkout_session(
|
|
308
|
+
self,
|
|
309
|
+
checkout_session_request: CheckoutSessionRequest,
|
|
310
|
+
_request_timeout: Union[
|
|
311
|
+
None,
|
|
312
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
313
|
+
Tuple[
|
|
314
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
315
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
316
|
+
]
|
|
317
|
+
] = None,
|
|
318
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
319
|
+
_content_type: Optional[StrictStr] = None,
|
|
320
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
321
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
322
|
+
) -> CheckoutSessionResponse:
|
|
323
|
+
"""Create Checkout Session
|
|
324
|
+
|
|
325
|
+
Create a Stripe checkout session for subscription purchase.
|
|
326
|
+
|
|
327
|
+
:param checkout_session_request: (required)
|
|
328
|
+
:type checkout_session_request: CheckoutSessionRequest
|
|
329
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
330
|
+
number provided, it will be total request
|
|
331
|
+
timeout. It can also be a pair (tuple) of
|
|
332
|
+
(connection, read) timeouts.
|
|
333
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
334
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
335
|
+
request; this effectively ignores the
|
|
336
|
+
authentication in the spec for a single request.
|
|
337
|
+
:type _request_auth: dict, optional
|
|
338
|
+
:param _content_type: force content-type for the request.
|
|
339
|
+
:type _content_type: str, Optional
|
|
340
|
+
:param _headers: set to override the headers for a single
|
|
341
|
+
request; this effectively ignores the headers
|
|
342
|
+
in the spec for a single request.
|
|
343
|
+
:type _headers: dict, optional
|
|
344
|
+
:param _host_index: set to override the host_index for a single
|
|
345
|
+
request; this effectively ignores the host_index
|
|
346
|
+
in the spec for a single request.
|
|
347
|
+
:type _host_index: int, optional
|
|
348
|
+
:return: Returns the result object.
|
|
349
|
+
""" # noqa: E501
|
|
350
|
+
|
|
351
|
+
_param = self._apps_subscriptions_api_create_checkout_session_serialize(
|
|
352
|
+
checkout_session_request=checkout_session_request,
|
|
353
|
+
_request_auth=_request_auth,
|
|
354
|
+
_content_type=_content_type,
|
|
355
|
+
_headers=_headers,
|
|
356
|
+
_host_index=_host_index
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
360
|
+
'200': "CheckoutSessionResponse",
|
|
361
|
+
'400': "Dict[str, object]",
|
|
362
|
+
'429': "Dict[str, object]",
|
|
363
|
+
'500': "Dict[str, object]",
|
|
364
|
+
}
|
|
365
|
+
response_data = await self.api_client.call_api(
|
|
366
|
+
*_param,
|
|
367
|
+
_request_timeout=_request_timeout
|
|
368
|
+
)
|
|
369
|
+
await response_data.read()
|
|
370
|
+
return self.api_client.response_deserialize(
|
|
371
|
+
response_data=response_data,
|
|
372
|
+
response_types_map=_response_types_map,
|
|
373
|
+
).data
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
@validate_call
|
|
377
|
+
async def apps_subscriptions_api_create_checkout_session_with_http_info(
|
|
378
|
+
self,
|
|
379
|
+
checkout_session_request: CheckoutSessionRequest,
|
|
380
|
+
_request_timeout: Union[
|
|
381
|
+
None,
|
|
382
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
383
|
+
Tuple[
|
|
384
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
385
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
386
|
+
]
|
|
387
|
+
] = None,
|
|
388
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
389
|
+
_content_type: Optional[StrictStr] = None,
|
|
390
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
391
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
392
|
+
) -> ApiResponse[CheckoutSessionResponse]:
|
|
393
|
+
"""Create Checkout Session
|
|
394
|
+
|
|
395
|
+
Create a Stripe checkout session for subscription purchase.
|
|
396
|
+
|
|
397
|
+
:param checkout_session_request: (required)
|
|
398
|
+
:type checkout_session_request: CheckoutSessionRequest
|
|
399
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
400
|
+
number provided, it will be total request
|
|
401
|
+
timeout. It can also be a pair (tuple) of
|
|
402
|
+
(connection, read) timeouts.
|
|
403
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
404
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
405
|
+
request; this effectively ignores the
|
|
406
|
+
authentication in the spec for a single request.
|
|
407
|
+
:type _request_auth: dict, optional
|
|
408
|
+
:param _content_type: force content-type for the request.
|
|
409
|
+
:type _content_type: str, Optional
|
|
410
|
+
:param _headers: set to override the headers for a single
|
|
411
|
+
request; this effectively ignores the headers
|
|
412
|
+
in the spec for a single request.
|
|
413
|
+
:type _headers: dict, optional
|
|
414
|
+
:param _host_index: set to override the host_index for a single
|
|
415
|
+
request; this effectively ignores the host_index
|
|
416
|
+
in the spec for a single request.
|
|
417
|
+
:type _host_index: int, optional
|
|
418
|
+
:return: Returns the result object.
|
|
419
|
+
""" # noqa: E501
|
|
420
|
+
|
|
421
|
+
_param = self._apps_subscriptions_api_create_checkout_session_serialize(
|
|
422
|
+
checkout_session_request=checkout_session_request,
|
|
423
|
+
_request_auth=_request_auth,
|
|
424
|
+
_content_type=_content_type,
|
|
425
|
+
_headers=_headers,
|
|
426
|
+
_host_index=_host_index
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
430
|
+
'200': "CheckoutSessionResponse",
|
|
431
|
+
'400': "Dict[str, object]",
|
|
432
|
+
'429': "Dict[str, object]",
|
|
433
|
+
'500': "Dict[str, object]",
|
|
434
|
+
}
|
|
435
|
+
response_data = await self.api_client.call_api(
|
|
436
|
+
*_param,
|
|
437
|
+
_request_timeout=_request_timeout
|
|
438
|
+
)
|
|
439
|
+
await response_data.read()
|
|
440
|
+
return self.api_client.response_deserialize(
|
|
441
|
+
response_data=response_data,
|
|
442
|
+
response_types_map=_response_types_map,
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
@validate_call
|
|
447
|
+
async def apps_subscriptions_api_create_checkout_session_without_preload_content(
|
|
448
|
+
self,
|
|
449
|
+
checkout_session_request: CheckoutSessionRequest,
|
|
450
|
+
_request_timeout: Union[
|
|
451
|
+
None,
|
|
452
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
453
|
+
Tuple[
|
|
454
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
455
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
456
|
+
]
|
|
457
|
+
] = None,
|
|
458
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
459
|
+
_content_type: Optional[StrictStr] = None,
|
|
460
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
461
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
462
|
+
) -> RESTResponseType:
|
|
463
|
+
"""Create Checkout Session
|
|
464
|
+
|
|
465
|
+
Create a Stripe checkout session for subscription purchase.
|
|
466
|
+
|
|
467
|
+
:param checkout_session_request: (required)
|
|
468
|
+
:type checkout_session_request: CheckoutSessionRequest
|
|
469
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
470
|
+
number provided, it will be total request
|
|
471
|
+
timeout. It can also be a pair (tuple) of
|
|
472
|
+
(connection, read) timeouts.
|
|
473
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
474
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
475
|
+
request; this effectively ignores the
|
|
476
|
+
authentication in the spec for a single request.
|
|
477
|
+
:type _request_auth: dict, optional
|
|
478
|
+
:param _content_type: force content-type for the request.
|
|
479
|
+
:type _content_type: str, Optional
|
|
480
|
+
:param _headers: set to override the headers for a single
|
|
481
|
+
request; this effectively ignores the headers
|
|
482
|
+
in the spec for a single request.
|
|
483
|
+
:type _headers: dict, optional
|
|
484
|
+
:param _host_index: set to override the host_index for a single
|
|
485
|
+
request; this effectively ignores the host_index
|
|
486
|
+
in the spec for a single request.
|
|
487
|
+
:type _host_index: int, optional
|
|
488
|
+
:return: Returns the result object.
|
|
489
|
+
""" # noqa: E501
|
|
490
|
+
|
|
491
|
+
_param = self._apps_subscriptions_api_create_checkout_session_serialize(
|
|
492
|
+
checkout_session_request=checkout_session_request,
|
|
493
|
+
_request_auth=_request_auth,
|
|
494
|
+
_content_type=_content_type,
|
|
495
|
+
_headers=_headers,
|
|
496
|
+
_host_index=_host_index
|
|
497
|
+
)
|
|
498
|
+
|
|
499
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
500
|
+
'200': "CheckoutSessionResponse",
|
|
501
|
+
'400': "Dict[str, object]",
|
|
502
|
+
'429': "Dict[str, object]",
|
|
503
|
+
'500': "Dict[str, object]",
|
|
504
|
+
}
|
|
505
|
+
response_data = await self.api_client.call_api(
|
|
506
|
+
*_param,
|
|
507
|
+
_request_timeout=_request_timeout
|
|
508
|
+
)
|
|
509
|
+
return response_data.response
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
def _apps_subscriptions_api_create_checkout_session_serialize(
|
|
513
|
+
self,
|
|
514
|
+
checkout_session_request,
|
|
515
|
+
_request_auth,
|
|
516
|
+
_content_type,
|
|
517
|
+
_headers,
|
|
518
|
+
_host_index,
|
|
519
|
+
) -> RequestSerialized:
|
|
520
|
+
|
|
521
|
+
_host = None
|
|
522
|
+
|
|
523
|
+
_collection_formats: Dict[str, str] = {
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
_path_params: Dict[str, str] = {}
|
|
527
|
+
_query_params: List[Tuple[str, str]] = []
|
|
528
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
529
|
+
_form_params: List[Tuple[str, str]] = []
|
|
530
|
+
_files: Dict[
|
|
531
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
532
|
+
] = {}
|
|
533
|
+
_body_params: Optional[bytes] = None
|
|
534
|
+
|
|
535
|
+
# process the path parameters
|
|
536
|
+
# process the query parameters
|
|
537
|
+
# process the header parameters
|
|
538
|
+
# process the form parameters
|
|
539
|
+
# process the body parameter
|
|
540
|
+
if checkout_session_request is not None:
|
|
541
|
+
_body_params = checkout_session_request
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
# set the HTTP header `Accept`
|
|
545
|
+
if 'Accept' not in _header_params:
|
|
546
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
547
|
+
[
|
|
548
|
+
'application/json'
|
|
549
|
+
]
|
|
550
|
+
)
|
|
551
|
+
|
|
552
|
+
# set the HTTP header `Content-Type`
|
|
553
|
+
if _content_type:
|
|
554
|
+
_header_params['Content-Type'] = _content_type
|
|
555
|
+
else:
|
|
556
|
+
_default_content_type = (
|
|
557
|
+
self.api_client.select_header_content_type(
|
|
558
|
+
[
|
|
559
|
+
'application/json'
|
|
560
|
+
]
|
|
561
|
+
)
|
|
562
|
+
)
|
|
563
|
+
if _default_content_type is not None:
|
|
564
|
+
_header_params['Content-Type'] = _default_content_type
|
|
565
|
+
|
|
566
|
+
# authentication setting
|
|
567
|
+
_auth_settings: List[str] = [
|
|
568
|
+
'JWTBearer'
|
|
569
|
+
]
|
|
570
|
+
|
|
571
|
+
return self.api_client.param_serialize(
|
|
572
|
+
method='POST',
|
|
573
|
+
resource_path='/api/v1/subscriptions/create-checkout-session',
|
|
574
|
+
path_params=_path_params,
|
|
575
|
+
query_params=_query_params,
|
|
576
|
+
header_params=_header_params,
|
|
577
|
+
body=_body_params,
|
|
578
|
+
post_params=_form_params,
|
|
579
|
+
files=_files,
|
|
580
|
+
auth_settings=_auth_settings,
|
|
581
|
+
collection_formats=_collection_formats,
|
|
582
|
+
_host=_host,
|
|
583
|
+
_request_auth=_request_auth
|
|
584
|
+
)
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
@validate_call
|
|
590
|
+
async def apps_subscriptions_api_create_portal_session(
|
|
591
|
+
self,
|
|
592
|
+
portal_session_request: PortalSessionRequest,
|
|
593
|
+
_request_timeout: Union[
|
|
594
|
+
None,
|
|
595
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
596
|
+
Tuple[
|
|
597
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
598
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
599
|
+
]
|
|
600
|
+
] = None,
|
|
601
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
602
|
+
_content_type: Optional[StrictStr] = None,
|
|
603
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
604
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
605
|
+
) -> PortalSessionResponse:
|
|
606
|
+
"""Create Portal Session
|
|
607
|
+
|
|
608
|
+
Create a Stripe customer portal session for subscription management.
|
|
609
|
+
|
|
610
|
+
:param portal_session_request: (required)
|
|
611
|
+
:type portal_session_request: PortalSessionRequest
|
|
612
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
613
|
+
number provided, it will be total request
|
|
614
|
+
timeout. It can also be a pair (tuple) of
|
|
615
|
+
(connection, read) timeouts.
|
|
616
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
617
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
618
|
+
request; this effectively ignores the
|
|
619
|
+
authentication in the spec for a single request.
|
|
620
|
+
:type _request_auth: dict, optional
|
|
621
|
+
:param _content_type: force content-type for the request.
|
|
622
|
+
:type _content_type: str, Optional
|
|
623
|
+
:param _headers: set to override the headers for a single
|
|
624
|
+
request; this effectively ignores the headers
|
|
625
|
+
in the spec for a single request.
|
|
626
|
+
:type _headers: dict, optional
|
|
627
|
+
:param _host_index: set to override the host_index for a single
|
|
628
|
+
request; this effectively ignores the host_index
|
|
629
|
+
in the spec for a single request.
|
|
630
|
+
:type _host_index: int, optional
|
|
631
|
+
:return: Returns the result object.
|
|
632
|
+
""" # noqa: E501
|
|
633
|
+
|
|
634
|
+
_param = self._apps_subscriptions_api_create_portal_session_serialize(
|
|
635
|
+
portal_session_request=portal_session_request,
|
|
636
|
+
_request_auth=_request_auth,
|
|
637
|
+
_content_type=_content_type,
|
|
638
|
+
_headers=_headers,
|
|
639
|
+
_host_index=_host_index
|
|
640
|
+
)
|
|
641
|
+
|
|
642
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
643
|
+
'200': "PortalSessionResponse",
|
|
644
|
+
'400': "Dict[str, object]",
|
|
645
|
+
'429': "Dict[str, object]",
|
|
646
|
+
'500': "Dict[str, object]",
|
|
647
|
+
}
|
|
648
|
+
response_data = await self.api_client.call_api(
|
|
649
|
+
*_param,
|
|
650
|
+
_request_timeout=_request_timeout
|
|
651
|
+
)
|
|
652
|
+
await response_data.read()
|
|
653
|
+
return self.api_client.response_deserialize(
|
|
654
|
+
response_data=response_data,
|
|
655
|
+
response_types_map=_response_types_map,
|
|
656
|
+
).data
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
@validate_call
|
|
660
|
+
async def apps_subscriptions_api_create_portal_session_with_http_info(
|
|
661
|
+
self,
|
|
662
|
+
portal_session_request: PortalSessionRequest,
|
|
663
|
+
_request_timeout: Union[
|
|
664
|
+
None,
|
|
665
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
666
|
+
Tuple[
|
|
667
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
668
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
669
|
+
]
|
|
670
|
+
] = None,
|
|
671
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
672
|
+
_content_type: Optional[StrictStr] = None,
|
|
673
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
674
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
675
|
+
) -> ApiResponse[PortalSessionResponse]:
|
|
676
|
+
"""Create Portal Session
|
|
677
|
+
|
|
678
|
+
Create a Stripe customer portal session for subscription management.
|
|
679
|
+
|
|
680
|
+
:param portal_session_request: (required)
|
|
681
|
+
:type portal_session_request: PortalSessionRequest
|
|
682
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
683
|
+
number provided, it will be total request
|
|
684
|
+
timeout. It can also be a pair (tuple) of
|
|
685
|
+
(connection, read) timeouts.
|
|
686
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
687
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
688
|
+
request; this effectively ignores the
|
|
689
|
+
authentication in the spec for a single request.
|
|
690
|
+
:type _request_auth: dict, optional
|
|
691
|
+
:param _content_type: force content-type for the request.
|
|
692
|
+
:type _content_type: str, Optional
|
|
693
|
+
:param _headers: set to override the headers for a single
|
|
694
|
+
request; this effectively ignores the headers
|
|
695
|
+
in the spec for a single request.
|
|
696
|
+
:type _headers: dict, optional
|
|
697
|
+
:param _host_index: set to override the host_index for a single
|
|
698
|
+
request; this effectively ignores the host_index
|
|
699
|
+
in the spec for a single request.
|
|
700
|
+
:type _host_index: int, optional
|
|
701
|
+
:return: Returns the result object.
|
|
702
|
+
""" # noqa: E501
|
|
703
|
+
|
|
704
|
+
_param = self._apps_subscriptions_api_create_portal_session_serialize(
|
|
705
|
+
portal_session_request=portal_session_request,
|
|
706
|
+
_request_auth=_request_auth,
|
|
707
|
+
_content_type=_content_type,
|
|
708
|
+
_headers=_headers,
|
|
709
|
+
_host_index=_host_index
|
|
710
|
+
)
|
|
711
|
+
|
|
712
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
713
|
+
'200': "PortalSessionResponse",
|
|
714
|
+
'400': "Dict[str, object]",
|
|
715
|
+
'429': "Dict[str, object]",
|
|
716
|
+
'500': "Dict[str, object]",
|
|
717
|
+
}
|
|
718
|
+
response_data = await self.api_client.call_api(
|
|
719
|
+
*_param,
|
|
720
|
+
_request_timeout=_request_timeout
|
|
721
|
+
)
|
|
722
|
+
await response_data.read()
|
|
723
|
+
return self.api_client.response_deserialize(
|
|
724
|
+
response_data=response_data,
|
|
725
|
+
response_types_map=_response_types_map,
|
|
726
|
+
)
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
@validate_call
|
|
730
|
+
async def apps_subscriptions_api_create_portal_session_without_preload_content(
|
|
731
|
+
self,
|
|
732
|
+
portal_session_request: PortalSessionRequest,
|
|
733
|
+
_request_timeout: Union[
|
|
734
|
+
None,
|
|
735
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
736
|
+
Tuple[
|
|
737
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
738
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
739
|
+
]
|
|
740
|
+
] = None,
|
|
741
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
742
|
+
_content_type: Optional[StrictStr] = None,
|
|
743
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
744
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
745
|
+
) -> RESTResponseType:
|
|
746
|
+
"""Create Portal Session
|
|
747
|
+
|
|
748
|
+
Create a Stripe customer portal session for subscription management.
|
|
749
|
+
|
|
750
|
+
:param portal_session_request: (required)
|
|
751
|
+
:type portal_session_request: PortalSessionRequest
|
|
752
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
753
|
+
number provided, it will be total request
|
|
754
|
+
timeout. It can also be a pair (tuple) of
|
|
755
|
+
(connection, read) timeouts.
|
|
756
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
757
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
758
|
+
request; this effectively ignores the
|
|
759
|
+
authentication in the spec for a single request.
|
|
760
|
+
:type _request_auth: dict, optional
|
|
761
|
+
:param _content_type: force content-type for the request.
|
|
762
|
+
:type _content_type: str, Optional
|
|
763
|
+
:param _headers: set to override the headers for a single
|
|
764
|
+
request; this effectively ignores the headers
|
|
765
|
+
in the spec for a single request.
|
|
766
|
+
:type _headers: dict, optional
|
|
767
|
+
:param _host_index: set to override the host_index for a single
|
|
768
|
+
request; this effectively ignores the host_index
|
|
769
|
+
in the spec for a single request.
|
|
770
|
+
:type _host_index: int, optional
|
|
771
|
+
:return: Returns the result object.
|
|
772
|
+
""" # noqa: E501
|
|
773
|
+
|
|
774
|
+
_param = self._apps_subscriptions_api_create_portal_session_serialize(
|
|
775
|
+
portal_session_request=portal_session_request,
|
|
776
|
+
_request_auth=_request_auth,
|
|
777
|
+
_content_type=_content_type,
|
|
778
|
+
_headers=_headers,
|
|
779
|
+
_host_index=_host_index
|
|
780
|
+
)
|
|
781
|
+
|
|
782
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
783
|
+
'200': "PortalSessionResponse",
|
|
784
|
+
'400': "Dict[str, object]",
|
|
785
|
+
'429': "Dict[str, object]",
|
|
786
|
+
'500': "Dict[str, object]",
|
|
787
|
+
}
|
|
788
|
+
response_data = await self.api_client.call_api(
|
|
789
|
+
*_param,
|
|
790
|
+
_request_timeout=_request_timeout
|
|
791
|
+
)
|
|
792
|
+
return response_data.response
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
def _apps_subscriptions_api_create_portal_session_serialize(
|
|
796
|
+
self,
|
|
797
|
+
portal_session_request,
|
|
798
|
+
_request_auth,
|
|
799
|
+
_content_type,
|
|
800
|
+
_headers,
|
|
801
|
+
_host_index,
|
|
802
|
+
) -> RequestSerialized:
|
|
803
|
+
|
|
804
|
+
_host = None
|
|
805
|
+
|
|
806
|
+
_collection_formats: Dict[str, str] = {
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
_path_params: Dict[str, str] = {}
|
|
810
|
+
_query_params: List[Tuple[str, str]] = []
|
|
811
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
812
|
+
_form_params: List[Tuple[str, str]] = []
|
|
813
|
+
_files: Dict[
|
|
814
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
815
|
+
] = {}
|
|
816
|
+
_body_params: Optional[bytes] = None
|
|
817
|
+
|
|
818
|
+
# process the path parameters
|
|
819
|
+
# process the query parameters
|
|
820
|
+
# process the header parameters
|
|
821
|
+
# process the form parameters
|
|
822
|
+
# process the body parameter
|
|
823
|
+
if portal_session_request is not None:
|
|
824
|
+
_body_params = portal_session_request
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
# set the HTTP header `Accept`
|
|
828
|
+
if 'Accept' not in _header_params:
|
|
829
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
830
|
+
[
|
|
831
|
+
'application/json'
|
|
832
|
+
]
|
|
833
|
+
)
|
|
834
|
+
|
|
835
|
+
# set the HTTP header `Content-Type`
|
|
836
|
+
if _content_type:
|
|
837
|
+
_header_params['Content-Type'] = _content_type
|
|
838
|
+
else:
|
|
839
|
+
_default_content_type = (
|
|
840
|
+
self.api_client.select_header_content_type(
|
|
841
|
+
[
|
|
842
|
+
'application/json'
|
|
843
|
+
]
|
|
844
|
+
)
|
|
845
|
+
)
|
|
846
|
+
if _default_content_type is not None:
|
|
847
|
+
_header_params['Content-Type'] = _default_content_type
|
|
848
|
+
|
|
849
|
+
# authentication setting
|
|
850
|
+
_auth_settings: List[str] = [
|
|
851
|
+
'JWTBearer'
|
|
852
|
+
]
|
|
853
|
+
|
|
854
|
+
return self.api_client.param_serialize(
|
|
855
|
+
method='POST',
|
|
856
|
+
resource_path='/api/v1/subscriptions/create-portal-session',
|
|
857
|
+
path_params=_path_params,
|
|
858
|
+
query_params=_query_params,
|
|
859
|
+
header_params=_header_params,
|
|
860
|
+
body=_body_params,
|
|
861
|
+
post_params=_form_params,
|
|
862
|
+
files=_files,
|
|
863
|
+
auth_settings=_auth_settings,
|
|
864
|
+
collection_formats=_collection_formats,
|
|
865
|
+
_host=_host,
|
|
866
|
+
_request_auth=_request_auth
|
|
867
|
+
)
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
@validate_call
|
|
873
|
+
async def apps_subscriptions_api_get_current_subscription(
|
|
874
|
+
self,
|
|
875
|
+
_request_timeout: Union[
|
|
876
|
+
None,
|
|
877
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
878
|
+
Tuple[
|
|
879
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
880
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
881
|
+
]
|
|
882
|
+
] = None,
|
|
883
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
884
|
+
_content_type: Optional[StrictStr] = None,
|
|
885
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
886
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
887
|
+
) -> SubscriptionResponse:
|
|
888
|
+
"""Get Current Subscription
|
|
889
|
+
|
|
890
|
+
Get current user's subscription details.
|
|
891
|
+
|
|
892
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
893
|
+
number provided, it will be total request
|
|
894
|
+
timeout. It can also be a pair (tuple) of
|
|
895
|
+
(connection, read) timeouts.
|
|
896
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
897
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
898
|
+
request; this effectively ignores the
|
|
899
|
+
authentication in the spec for a single request.
|
|
900
|
+
:type _request_auth: dict, optional
|
|
901
|
+
:param _content_type: force content-type for the request.
|
|
902
|
+
:type _content_type: str, Optional
|
|
903
|
+
:param _headers: set to override the headers for a single
|
|
904
|
+
request; this effectively ignores the headers
|
|
905
|
+
in the spec for a single request.
|
|
906
|
+
:type _headers: dict, optional
|
|
907
|
+
:param _host_index: set to override the host_index for a single
|
|
908
|
+
request; this effectively ignores the host_index
|
|
909
|
+
in the spec for a single request.
|
|
910
|
+
:type _host_index: int, optional
|
|
911
|
+
:return: Returns the result object.
|
|
912
|
+
""" # noqa: E501
|
|
913
|
+
|
|
914
|
+
_param = self._apps_subscriptions_api_get_current_subscription_serialize(
|
|
915
|
+
_request_auth=_request_auth,
|
|
916
|
+
_content_type=_content_type,
|
|
917
|
+
_headers=_headers,
|
|
918
|
+
_host_index=_host_index
|
|
919
|
+
)
|
|
920
|
+
|
|
921
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
922
|
+
'200': "SubscriptionResponse",
|
|
923
|
+
'500': "Dict[str, object]",
|
|
924
|
+
}
|
|
925
|
+
response_data = await self.api_client.call_api(
|
|
926
|
+
*_param,
|
|
927
|
+
_request_timeout=_request_timeout
|
|
928
|
+
)
|
|
929
|
+
await response_data.read()
|
|
930
|
+
return self.api_client.response_deserialize(
|
|
931
|
+
response_data=response_data,
|
|
932
|
+
response_types_map=_response_types_map,
|
|
933
|
+
).data
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
@validate_call
|
|
937
|
+
async def apps_subscriptions_api_get_current_subscription_with_http_info(
|
|
938
|
+
self,
|
|
939
|
+
_request_timeout: Union[
|
|
940
|
+
None,
|
|
941
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
942
|
+
Tuple[
|
|
943
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
944
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
945
|
+
]
|
|
946
|
+
] = None,
|
|
947
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
948
|
+
_content_type: Optional[StrictStr] = None,
|
|
949
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
950
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
951
|
+
) -> ApiResponse[SubscriptionResponse]:
|
|
952
|
+
"""Get Current Subscription
|
|
953
|
+
|
|
954
|
+
Get current user's subscription details.
|
|
955
|
+
|
|
956
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
957
|
+
number provided, it will be total request
|
|
958
|
+
timeout. It can also be a pair (tuple) of
|
|
959
|
+
(connection, read) timeouts.
|
|
960
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
961
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
962
|
+
request; this effectively ignores the
|
|
963
|
+
authentication in the spec for a single request.
|
|
964
|
+
:type _request_auth: dict, optional
|
|
965
|
+
:param _content_type: force content-type for the request.
|
|
966
|
+
:type _content_type: str, Optional
|
|
967
|
+
:param _headers: set to override the headers for a single
|
|
968
|
+
request; this effectively ignores the headers
|
|
969
|
+
in the spec for a single request.
|
|
970
|
+
:type _headers: dict, optional
|
|
971
|
+
:param _host_index: set to override the host_index for a single
|
|
972
|
+
request; this effectively ignores the host_index
|
|
973
|
+
in the spec for a single request.
|
|
974
|
+
:type _host_index: int, optional
|
|
975
|
+
:return: Returns the result object.
|
|
976
|
+
""" # noqa: E501
|
|
977
|
+
|
|
978
|
+
_param = self._apps_subscriptions_api_get_current_subscription_serialize(
|
|
979
|
+
_request_auth=_request_auth,
|
|
980
|
+
_content_type=_content_type,
|
|
981
|
+
_headers=_headers,
|
|
982
|
+
_host_index=_host_index
|
|
983
|
+
)
|
|
984
|
+
|
|
985
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
986
|
+
'200': "SubscriptionResponse",
|
|
987
|
+
'500': "Dict[str, object]",
|
|
988
|
+
}
|
|
989
|
+
response_data = await self.api_client.call_api(
|
|
990
|
+
*_param,
|
|
991
|
+
_request_timeout=_request_timeout
|
|
992
|
+
)
|
|
993
|
+
await response_data.read()
|
|
994
|
+
return self.api_client.response_deserialize(
|
|
995
|
+
response_data=response_data,
|
|
996
|
+
response_types_map=_response_types_map,
|
|
997
|
+
)
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
@validate_call
|
|
1001
|
+
async def apps_subscriptions_api_get_current_subscription_without_preload_content(
|
|
1002
|
+
self,
|
|
1003
|
+
_request_timeout: Union[
|
|
1004
|
+
None,
|
|
1005
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1006
|
+
Tuple[
|
|
1007
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1008
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1009
|
+
]
|
|
1010
|
+
] = None,
|
|
1011
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1012
|
+
_content_type: Optional[StrictStr] = None,
|
|
1013
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1014
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1015
|
+
) -> RESTResponseType:
|
|
1016
|
+
"""Get Current Subscription
|
|
1017
|
+
|
|
1018
|
+
Get current user's subscription details.
|
|
1019
|
+
|
|
1020
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1021
|
+
number provided, it will be total request
|
|
1022
|
+
timeout. It can also be a pair (tuple) of
|
|
1023
|
+
(connection, read) timeouts.
|
|
1024
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1025
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1026
|
+
request; this effectively ignores the
|
|
1027
|
+
authentication in the spec for a single request.
|
|
1028
|
+
:type _request_auth: dict, optional
|
|
1029
|
+
:param _content_type: force content-type for the request.
|
|
1030
|
+
:type _content_type: str, Optional
|
|
1031
|
+
:param _headers: set to override the headers for a single
|
|
1032
|
+
request; this effectively ignores the headers
|
|
1033
|
+
in the spec for a single request.
|
|
1034
|
+
:type _headers: dict, optional
|
|
1035
|
+
:param _host_index: set to override the host_index for a single
|
|
1036
|
+
request; this effectively ignores the host_index
|
|
1037
|
+
in the spec for a single request.
|
|
1038
|
+
:type _host_index: int, optional
|
|
1039
|
+
:return: Returns the result object.
|
|
1040
|
+
""" # noqa: E501
|
|
1041
|
+
|
|
1042
|
+
_param = self._apps_subscriptions_api_get_current_subscription_serialize(
|
|
1043
|
+
_request_auth=_request_auth,
|
|
1044
|
+
_content_type=_content_type,
|
|
1045
|
+
_headers=_headers,
|
|
1046
|
+
_host_index=_host_index
|
|
1047
|
+
)
|
|
1048
|
+
|
|
1049
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1050
|
+
'200': "SubscriptionResponse",
|
|
1051
|
+
'500': "Dict[str, object]",
|
|
1052
|
+
}
|
|
1053
|
+
response_data = await self.api_client.call_api(
|
|
1054
|
+
*_param,
|
|
1055
|
+
_request_timeout=_request_timeout
|
|
1056
|
+
)
|
|
1057
|
+
return response_data.response
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
def _apps_subscriptions_api_get_current_subscription_serialize(
|
|
1061
|
+
self,
|
|
1062
|
+
_request_auth,
|
|
1063
|
+
_content_type,
|
|
1064
|
+
_headers,
|
|
1065
|
+
_host_index,
|
|
1066
|
+
) -> RequestSerialized:
|
|
1067
|
+
|
|
1068
|
+
_host = None
|
|
1069
|
+
|
|
1070
|
+
_collection_formats: Dict[str, str] = {
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
_path_params: Dict[str, str] = {}
|
|
1074
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1075
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1076
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1077
|
+
_files: Dict[
|
|
1078
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1079
|
+
] = {}
|
|
1080
|
+
_body_params: Optional[bytes] = None
|
|
1081
|
+
|
|
1082
|
+
# process the path parameters
|
|
1083
|
+
# process the query parameters
|
|
1084
|
+
# process the header parameters
|
|
1085
|
+
# process the form parameters
|
|
1086
|
+
# process the body parameter
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
# set the HTTP header `Accept`
|
|
1090
|
+
if 'Accept' not in _header_params:
|
|
1091
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1092
|
+
[
|
|
1093
|
+
'application/json'
|
|
1094
|
+
]
|
|
1095
|
+
)
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
# authentication setting
|
|
1099
|
+
_auth_settings: List[str] = [
|
|
1100
|
+
'JWTBearer'
|
|
1101
|
+
]
|
|
1102
|
+
|
|
1103
|
+
return self.api_client.param_serialize(
|
|
1104
|
+
method='GET',
|
|
1105
|
+
resource_path='/api/v1/subscriptions/current',
|
|
1106
|
+
path_params=_path_params,
|
|
1107
|
+
query_params=_query_params,
|
|
1108
|
+
header_params=_header_params,
|
|
1109
|
+
body=_body_params,
|
|
1110
|
+
post_params=_form_params,
|
|
1111
|
+
files=_files,
|
|
1112
|
+
auth_settings=_auth_settings,
|
|
1113
|
+
collection_formats=_collection_formats,
|
|
1114
|
+
_host=_host,
|
|
1115
|
+
_request_auth=_request_auth
|
|
1116
|
+
)
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
@validate_call
|
|
1122
|
+
async def apps_subscriptions_api_get_subscription_plans(
|
|
1123
|
+
self,
|
|
1124
|
+
_request_timeout: Union[
|
|
1125
|
+
None,
|
|
1126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1127
|
+
Tuple[
|
|
1128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1130
|
+
]
|
|
1131
|
+
] = None,
|
|
1132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1133
|
+
_content_type: Optional[StrictStr] = None,
|
|
1134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1136
|
+
) -> List[PlanResponse]:
|
|
1137
|
+
"""Get Subscription Plans
|
|
1138
|
+
|
|
1139
|
+
Get all available subscription plans.
|
|
1140
|
+
|
|
1141
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1142
|
+
number provided, it will be total request
|
|
1143
|
+
timeout. It can also be a pair (tuple) of
|
|
1144
|
+
(connection, read) timeouts.
|
|
1145
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1146
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1147
|
+
request; this effectively ignores the
|
|
1148
|
+
authentication in the spec for a single request.
|
|
1149
|
+
:type _request_auth: dict, optional
|
|
1150
|
+
:param _content_type: force content-type for the request.
|
|
1151
|
+
:type _content_type: str, Optional
|
|
1152
|
+
:param _headers: set to override the headers for a single
|
|
1153
|
+
request; this effectively ignores the headers
|
|
1154
|
+
in the spec for a single request.
|
|
1155
|
+
:type _headers: dict, optional
|
|
1156
|
+
:param _host_index: set to override the host_index for a single
|
|
1157
|
+
request; this effectively ignores the host_index
|
|
1158
|
+
in the spec for a single request.
|
|
1159
|
+
:type _host_index: int, optional
|
|
1160
|
+
:return: Returns the result object.
|
|
1161
|
+
""" # noqa: E501
|
|
1162
|
+
|
|
1163
|
+
_param = self._apps_subscriptions_api_get_subscription_plans_serialize(
|
|
1164
|
+
_request_auth=_request_auth,
|
|
1165
|
+
_content_type=_content_type,
|
|
1166
|
+
_headers=_headers,
|
|
1167
|
+
_host_index=_host_index
|
|
1168
|
+
)
|
|
1169
|
+
|
|
1170
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1171
|
+
'200': "List[PlanResponse]",
|
|
1172
|
+
'500': "Dict[str, object]",
|
|
1173
|
+
}
|
|
1174
|
+
response_data = await self.api_client.call_api(
|
|
1175
|
+
*_param,
|
|
1176
|
+
_request_timeout=_request_timeout
|
|
1177
|
+
)
|
|
1178
|
+
await response_data.read()
|
|
1179
|
+
return self.api_client.response_deserialize(
|
|
1180
|
+
response_data=response_data,
|
|
1181
|
+
response_types_map=_response_types_map,
|
|
1182
|
+
).data
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
@validate_call
|
|
1186
|
+
async def apps_subscriptions_api_get_subscription_plans_with_http_info(
|
|
1187
|
+
self,
|
|
1188
|
+
_request_timeout: Union[
|
|
1189
|
+
None,
|
|
1190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1191
|
+
Tuple[
|
|
1192
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1193
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1194
|
+
]
|
|
1195
|
+
] = None,
|
|
1196
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1197
|
+
_content_type: Optional[StrictStr] = None,
|
|
1198
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1199
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1200
|
+
) -> ApiResponse[List[PlanResponse]]:
|
|
1201
|
+
"""Get Subscription Plans
|
|
1202
|
+
|
|
1203
|
+
Get all available subscription plans.
|
|
1204
|
+
|
|
1205
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1206
|
+
number provided, it will be total request
|
|
1207
|
+
timeout. It can also be a pair (tuple) of
|
|
1208
|
+
(connection, read) timeouts.
|
|
1209
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1210
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1211
|
+
request; this effectively ignores the
|
|
1212
|
+
authentication in the spec for a single request.
|
|
1213
|
+
:type _request_auth: dict, optional
|
|
1214
|
+
:param _content_type: force content-type for the request.
|
|
1215
|
+
:type _content_type: str, Optional
|
|
1216
|
+
:param _headers: set to override the headers for a single
|
|
1217
|
+
request; this effectively ignores the headers
|
|
1218
|
+
in the spec for a single request.
|
|
1219
|
+
:type _headers: dict, optional
|
|
1220
|
+
:param _host_index: set to override the host_index for a single
|
|
1221
|
+
request; this effectively ignores the host_index
|
|
1222
|
+
in the spec for a single request.
|
|
1223
|
+
:type _host_index: int, optional
|
|
1224
|
+
:return: Returns the result object.
|
|
1225
|
+
""" # noqa: E501
|
|
1226
|
+
|
|
1227
|
+
_param = self._apps_subscriptions_api_get_subscription_plans_serialize(
|
|
1228
|
+
_request_auth=_request_auth,
|
|
1229
|
+
_content_type=_content_type,
|
|
1230
|
+
_headers=_headers,
|
|
1231
|
+
_host_index=_host_index
|
|
1232
|
+
)
|
|
1233
|
+
|
|
1234
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1235
|
+
'200': "List[PlanResponse]",
|
|
1236
|
+
'500': "Dict[str, object]",
|
|
1237
|
+
}
|
|
1238
|
+
response_data = await self.api_client.call_api(
|
|
1239
|
+
*_param,
|
|
1240
|
+
_request_timeout=_request_timeout
|
|
1241
|
+
)
|
|
1242
|
+
await response_data.read()
|
|
1243
|
+
return self.api_client.response_deserialize(
|
|
1244
|
+
response_data=response_data,
|
|
1245
|
+
response_types_map=_response_types_map,
|
|
1246
|
+
)
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
@validate_call
|
|
1250
|
+
async def apps_subscriptions_api_get_subscription_plans_without_preload_content(
|
|
1251
|
+
self,
|
|
1252
|
+
_request_timeout: Union[
|
|
1253
|
+
None,
|
|
1254
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1255
|
+
Tuple[
|
|
1256
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1257
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1258
|
+
]
|
|
1259
|
+
] = None,
|
|
1260
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1261
|
+
_content_type: Optional[StrictStr] = None,
|
|
1262
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1263
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1264
|
+
) -> RESTResponseType:
|
|
1265
|
+
"""Get Subscription Plans
|
|
1266
|
+
|
|
1267
|
+
Get all available subscription plans.
|
|
1268
|
+
|
|
1269
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1270
|
+
number provided, it will be total request
|
|
1271
|
+
timeout. It can also be a pair (tuple) of
|
|
1272
|
+
(connection, read) timeouts.
|
|
1273
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1274
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1275
|
+
request; this effectively ignores the
|
|
1276
|
+
authentication in the spec for a single request.
|
|
1277
|
+
:type _request_auth: dict, optional
|
|
1278
|
+
:param _content_type: force content-type for the request.
|
|
1279
|
+
:type _content_type: str, Optional
|
|
1280
|
+
:param _headers: set to override the headers for a single
|
|
1281
|
+
request; this effectively ignores the headers
|
|
1282
|
+
in the spec for a single request.
|
|
1283
|
+
:type _headers: dict, optional
|
|
1284
|
+
:param _host_index: set to override the host_index for a single
|
|
1285
|
+
request; this effectively ignores the host_index
|
|
1286
|
+
in the spec for a single request.
|
|
1287
|
+
:type _host_index: int, optional
|
|
1288
|
+
:return: Returns the result object.
|
|
1289
|
+
""" # noqa: E501
|
|
1290
|
+
|
|
1291
|
+
_param = self._apps_subscriptions_api_get_subscription_plans_serialize(
|
|
1292
|
+
_request_auth=_request_auth,
|
|
1293
|
+
_content_type=_content_type,
|
|
1294
|
+
_headers=_headers,
|
|
1295
|
+
_host_index=_host_index
|
|
1296
|
+
)
|
|
1297
|
+
|
|
1298
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1299
|
+
'200': "List[PlanResponse]",
|
|
1300
|
+
'500': "Dict[str, object]",
|
|
1301
|
+
}
|
|
1302
|
+
response_data = await self.api_client.call_api(
|
|
1303
|
+
*_param,
|
|
1304
|
+
_request_timeout=_request_timeout
|
|
1305
|
+
)
|
|
1306
|
+
return response_data.response
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
def _apps_subscriptions_api_get_subscription_plans_serialize(
|
|
1310
|
+
self,
|
|
1311
|
+
_request_auth,
|
|
1312
|
+
_content_type,
|
|
1313
|
+
_headers,
|
|
1314
|
+
_host_index,
|
|
1315
|
+
) -> RequestSerialized:
|
|
1316
|
+
|
|
1317
|
+
_host = None
|
|
1318
|
+
|
|
1319
|
+
_collection_formats: Dict[str, str] = {
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
_path_params: Dict[str, str] = {}
|
|
1323
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1324
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1325
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1326
|
+
_files: Dict[
|
|
1327
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1328
|
+
] = {}
|
|
1329
|
+
_body_params: Optional[bytes] = None
|
|
1330
|
+
|
|
1331
|
+
# process the path parameters
|
|
1332
|
+
# process the query parameters
|
|
1333
|
+
# process the header parameters
|
|
1334
|
+
# process the form parameters
|
|
1335
|
+
# process the body parameter
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
# set the HTTP header `Accept`
|
|
1339
|
+
if 'Accept' not in _header_params:
|
|
1340
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1341
|
+
[
|
|
1342
|
+
'application/json'
|
|
1343
|
+
]
|
|
1344
|
+
)
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
# authentication setting
|
|
1348
|
+
_auth_settings: List[str] = [
|
|
1349
|
+
]
|
|
1350
|
+
|
|
1351
|
+
return self.api_client.param_serialize(
|
|
1352
|
+
method='GET',
|
|
1353
|
+
resource_path='/api/v1/subscriptions/plans',
|
|
1354
|
+
path_params=_path_params,
|
|
1355
|
+
query_params=_query_params,
|
|
1356
|
+
header_params=_header_params,
|
|
1357
|
+
body=_body_params,
|
|
1358
|
+
post_params=_form_params,
|
|
1359
|
+
files=_files,
|
|
1360
|
+
auth_settings=_auth_settings,
|
|
1361
|
+
collection_formats=_collection_formats,
|
|
1362
|
+
_host=_host,
|
|
1363
|
+
_request_auth=_request_auth
|
|
1364
|
+
)
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
@validate_call
|
|
1370
|
+
async def apps_subscriptions_api_get_usage_metrics(
|
|
1371
|
+
self,
|
|
1372
|
+
_request_timeout: Union[
|
|
1373
|
+
None,
|
|
1374
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1375
|
+
Tuple[
|
|
1376
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1377
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1378
|
+
]
|
|
1379
|
+
] = None,
|
|
1380
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1381
|
+
_content_type: Optional[StrictStr] = None,
|
|
1382
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1383
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1384
|
+
) -> UsageResponse:
|
|
1385
|
+
"""Get Usage Metrics
|
|
1386
|
+
|
|
1387
|
+
Get detailed usage metrics for the current billing period.
|
|
1388
|
+
|
|
1389
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1390
|
+
number provided, it will be total request
|
|
1391
|
+
timeout. It can also be a pair (tuple) of
|
|
1392
|
+
(connection, read) timeouts.
|
|
1393
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1394
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1395
|
+
request; this effectively ignores the
|
|
1396
|
+
authentication in the spec for a single request.
|
|
1397
|
+
:type _request_auth: dict, optional
|
|
1398
|
+
:param _content_type: force content-type for the request.
|
|
1399
|
+
:type _content_type: str, Optional
|
|
1400
|
+
:param _headers: set to override the headers for a single
|
|
1401
|
+
request; this effectively ignores the headers
|
|
1402
|
+
in the spec for a single request.
|
|
1403
|
+
:type _headers: dict, optional
|
|
1404
|
+
:param _host_index: set to override the host_index for a single
|
|
1405
|
+
request; this effectively ignores the host_index
|
|
1406
|
+
in the spec for a single request.
|
|
1407
|
+
:type _host_index: int, optional
|
|
1408
|
+
:return: Returns the result object.
|
|
1409
|
+
""" # noqa: E501
|
|
1410
|
+
|
|
1411
|
+
_param = self._apps_subscriptions_api_get_usage_metrics_serialize(
|
|
1412
|
+
_request_auth=_request_auth,
|
|
1413
|
+
_content_type=_content_type,
|
|
1414
|
+
_headers=_headers,
|
|
1415
|
+
_host_index=_host_index
|
|
1416
|
+
)
|
|
1417
|
+
|
|
1418
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1419
|
+
'200': "UsageResponse",
|
|
1420
|
+
'500': "Dict[str, object]",
|
|
1421
|
+
}
|
|
1422
|
+
response_data = await self.api_client.call_api(
|
|
1423
|
+
*_param,
|
|
1424
|
+
_request_timeout=_request_timeout
|
|
1425
|
+
)
|
|
1426
|
+
await response_data.read()
|
|
1427
|
+
return self.api_client.response_deserialize(
|
|
1428
|
+
response_data=response_data,
|
|
1429
|
+
response_types_map=_response_types_map,
|
|
1430
|
+
).data
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
@validate_call
|
|
1434
|
+
async def apps_subscriptions_api_get_usage_metrics_with_http_info(
|
|
1435
|
+
self,
|
|
1436
|
+
_request_timeout: Union[
|
|
1437
|
+
None,
|
|
1438
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1439
|
+
Tuple[
|
|
1440
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1441
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1442
|
+
]
|
|
1443
|
+
] = None,
|
|
1444
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1445
|
+
_content_type: Optional[StrictStr] = None,
|
|
1446
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1447
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1448
|
+
) -> ApiResponse[UsageResponse]:
|
|
1449
|
+
"""Get Usage Metrics
|
|
1450
|
+
|
|
1451
|
+
Get detailed usage metrics for the current billing period.
|
|
1452
|
+
|
|
1453
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1454
|
+
number provided, it will be total request
|
|
1455
|
+
timeout. It can also be a pair (tuple) of
|
|
1456
|
+
(connection, read) timeouts.
|
|
1457
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1458
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1459
|
+
request; this effectively ignores the
|
|
1460
|
+
authentication in the spec for a single request.
|
|
1461
|
+
:type _request_auth: dict, optional
|
|
1462
|
+
:param _content_type: force content-type for the request.
|
|
1463
|
+
:type _content_type: str, Optional
|
|
1464
|
+
:param _headers: set to override the headers for a single
|
|
1465
|
+
request; this effectively ignores the headers
|
|
1466
|
+
in the spec for a single request.
|
|
1467
|
+
:type _headers: dict, optional
|
|
1468
|
+
:param _host_index: set to override the host_index for a single
|
|
1469
|
+
request; this effectively ignores the host_index
|
|
1470
|
+
in the spec for a single request.
|
|
1471
|
+
:type _host_index: int, optional
|
|
1472
|
+
:return: Returns the result object.
|
|
1473
|
+
""" # noqa: E501
|
|
1474
|
+
|
|
1475
|
+
_param = self._apps_subscriptions_api_get_usage_metrics_serialize(
|
|
1476
|
+
_request_auth=_request_auth,
|
|
1477
|
+
_content_type=_content_type,
|
|
1478
|
+
_headers=_headers,
|
|
1479
|
+
_host_index=_host_index
|
|
1480
|
+
)
|
|
1481
|
+
|
|
1482
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1483
|
+
'200': "UsageResponse",
|
|
1484
|
+
'500': "Dict[str, object]",
|
|
1485
|
+
}
|
|
1486
|
+
response_data = await self.api_client.call_api(
|
|
1487
|
+
*_param,
|
|
1488
|
+
_request_timeout=_request_timeout
|
|
1489
|
+
)
|
|
1490
|
+
await response_data.read()
|
|
1491
|
+
return self.api_client.response_deserialize(
|
|
1492
|
+
response_data=response_data,
|
|
1493
|
+
response_types_map=_response_types_map,
|
|
1494
|
+
)
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
@validate_call
|
|
1498
|
+
async def apps_subscriptions_api_get_usage_metrics_without_preload_content(
|
|
1499
|
+
self,
|
|
1500
|
+
_request_timeout: Union[
|
|
1501
|
+
None,
|
|
1502
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1503
|
+
Tuple[
|
|
1504
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1505
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1506
|
+
]
|
|
1507
|
+
] = None,
|
|
1508
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1509
|
+
_content_type: Optional[StrictStr] = None,
|
|
1510
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1511
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1512
|
+
) -> RESTResponseType:
|
|
1513
|
+
"""Get Usage Metrics
|
|
1514
|
+
|
|
1515
|
+
Get detailed usage metrics for the current billing period.
|
|
1516
|
+
|
|
1517
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1518
|
+
number provided, it will be total request
|
|
1519
|
+
timeout. It can also be a pair (tuple) of
|
|
1520
|
+
(connection, read) timeouts.
|
|
1521
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1522
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1523
|
+
request; this effectively ignores the
|
|
1524
|
+
authentication in the spec for a single request.
|
|
1525
|
+
:type _request_auth: dict, optional
|
|
1526
|
+
:param _content_type: force content-type for the request.
|
|
1527
|
+
:type _content_type: str, Optional
|
|
1528
|
+
:param _headers: set to override the headers for a single
|
|
1529
|
+
request; this effectively ignores the headers
|
|
1530
|
+
in the spec for a single request.
|
|
1531
|
+
:type _headers: dict, optional
|
|
1532
|
+
:param _host_index: set to override the host_index for a single
|
|
1533
|
+
request; this effectively ignores the host_index
|
|
1534
|
+
in the spec for a single request.
|
|
1535
|
+
:type _host_index: int, optional
|
|
1536
|
+
:return: Returns the result object.
|
|
1537
|
+
""" # noqa: E501
|
|
1538
|
+
|
|
1539
|
+
_param = self._apps_subscriptions_api_get_usage_metrics_serialize(
|
|
1540
|
+
_request_auth=_request_auth,
|
|
1541
|
+
_content_type=_content_type,
|
|
1542
|
+
_headers=_headers,
|
|
1543
|
+
_host_index=_host_index
|
|
1544
|
+
)
|
|
1545
|
+
|
|
1546
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1547
|
+
'200': "UsageResponse",
|
|
1548
|
+
'500': "Dict[str, object]",
|
|
1549
|
+
}
|
|
1550
|
+
response_data = await self.api_client.call_api(
|
|
1551
|
+
*_param,
|
|
1552
|
+
_request_timeout=_request_timeout
|
|
1553
|
+
)
|
|
1554
|
+
return response_data.response
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
def _apps_subscriptions_api_get_usage_metrics_serialize(
|
|
1558
|
+
self,
|
|
1559
|
+
_request_auth,
|
|
1560
|
+
_content_type,
|
|
1561
|
+
_headers,
|
|
1562
|
+
_host_index,
|
|
1563
|
+
) -> RequestSerialized:
|
|
1564
|
+
|
|
1565
|
+
_host = None
|
|
1566
|
+
|
|
1567
|
+
_collection_formats: Dict[str, str] = {
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
_path_params: Dict[str, str] = {}
|
|
1571
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1572
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1573
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1574
|
+
_files: Dict[
|
|
1575
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1576
|
+
] = {}
|
|
1577
|
+
_body_params: Optional[bytes] = None
|
|
1578
|
+
|
|
1579
|
+
# process the path parameters
|
|
1580
|
+
# process the query parameters
|
|
1581
|
+
# process the header parameters
|
|
1582
|
+
# process the form parameters
|
|
1583
|
+
# process the body parameter
|
|
1584
|
+
|
|
1585
|
+
|
|
1586
|
+
# set the HTTP header `Accept`
|
|
1587
|
+
if 'Accept' not in _header_params:
|
|
1588
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1589
|
+
[
|
|
1590
|
+
'application/json'
|
|
1591
|
+
]
|
|
1592
|
+
)
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
# authentication setting
|
|
1596
|
+
_auth_settings: List[str] = [
|
|
1597
|
+
'JWTBearer'
|
|
1598
|
+
]
|
|
1599
|
+
|
|
1600
|
+
return self.api_client.param_serialize(
|
|
1601
|
+
method='GET',
|
|
1602
|
+
resource_path='/api/v1/subscriptions/usage',
|
|
1603
|
+
path_params=_path_params,
|
|
1604
|
+
query_params=_query_params,
|
|
1605
|
+
header_params=_header_params,
|
|
1606
|
+
body=_body_params,
|
|
1607
|
+
post_params=_form_params,
|
|
1608
|
+
files=_files,
|
|
1609
|
+
auth_settings=_auth_settings,
|
|
1610
|
+
collection_formats=_collection_formats,
|
|
1611
|
+
_host=_host,
|
|
1612
|
+
_request_auth=_request_auth
|
|
1613
|
+
)
|
|
1614
|
+
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
|
|
1618
|
+
@validate_call
|
|
1619
|
+
async def apps_subscriptions_api_handle_stripe_webhook(
|
|
1620
|
+
self,
|
|
1621
|
+
_request_timeout: Union[
|
|
1622
|
+
None,
|
|
1623
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1624
|
+
Tuple[
|
|
1625
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1626
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1627
|
+
]
|
|
1628
|
+
] = None,
|
|
1629
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1630
|
+
_content_type: Optional[StrictStr] = None,
|
|
1631
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1632
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1633
|
+
) -> None:
|
|
1634
|
+
"""Handle Stripe Webhook
|
|
1635
|
+
|
|
1636
|
+
Handle Stripe webhook events. Note: This endpoint doesn't use standard Django Ninja response handling because it needs to work with raw request body for signature verification.
|
|
1637
|
+
|
|
1638
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1639
|
+
number provided, it will be total request
|
|
1640
|
+
timeout. It can also be a pair (tuple) of
|
|
1641
|
+
(connection, read) timeouts.
|
|
1642
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1643
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1644
|
+
request; this effectively ignores the
|
|
1645
|
+
authentication in the spec for a single request.
|
|
1646
|
+
:type _request_auth: dict, optional
|
|
1647
|
+
:param _content_type: force content-type for the request.
|
|
1648
|
+
:type _content_type: str, Optional
|
|
1649
|
+
:param _headers: set to override the headers for a single
|
|
1650
|
+
request; this effectively ignores the headers
|
|
1651
|
+
in the spec for a single request.
|
|
1652
|
+
:type _headers: dict, optional
|
|
1653
|
+
:param _host_index: set to override the host_index for a single
|
|
1654
|
+
request; this effectively ignores the host_index
|
|
1655
|
+
in the spec for a single request.
|
|
1656
|
+
:type _host_index: int, optional
|
|
1657
|
+
:return: Returns the result object.
|
|
1658
|
+
""" # noqa: E501
|
|
1659
|
+
|
|
1660
|
+
_param = self._apps_subscriptions_api_handle_stripe_webhook_serialize(
|
|
1661
|
+
_request_auth=_request_auth,
|
|
1662
|
+
_content_type=_content_type,
|
|
1663
|
+
_headers=_headers,
|
|
1664
|
+
_host_index=_host_index
|
|
1665
|
+
)
|
|
1666
|
+
|
|
1667
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1668
|
+
'200': None,
|
|
1669
|
+
}
|
|
1670
|
+
response_data = await self.api_client.call_api(
|
|
1671
|
+
*_param,
|
|
1672
|
+
_request_timeout=_request_timeout
|
|
1673
|
+
)
|
|
1674
|
+
await response_data.read()
|
|
1675
|
+
return self.api_client.response_deserialize(
|
|
1676
|
+
response_data=response_data,
|
|
1677
|
+
response_types_map=_response_types_map,
|
|
1678
|
+
).data
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
@validate_call
|
|
1682
|
+
async def apps_subscriptions_api_handle_stripe_webhook_with_http_info(
|
|
1683
|
+
self,
|
|
1684
|
+
_request_timeout: Union[
|
|
1685
|
+
None,
|
|
1686
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1687
|
+
Tuple[
|
|
1688
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1689
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1690
|
+
]
|
|
1691
|
+
] = None,
|
|
1692
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1693
|
+
_content_type: Optional[StrictStr] = None,
|
|
1694
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1695
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1696
|
+
) -> ApiResponse[None]:
|
|
1697
|
+
"""Handle Stripe Webhook
|
|
1698
|
+
|
|
1699
|
+
Handle Stripe webhook events. Note: This endpoint doesn't use standard Django Ninja response handling because it needs to work with raw request body for signature verification.
|
|
1700
|
+
|
|
1701
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1702
|
+
number provided, it will be total request
|
|
1703
|
+
timeout. It can also be a pair (tuple) of
|
|
1704
|
+
(connection, read) timeouts.
|
|
1705
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1706
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1707
|
+
request; this effectively ignores the
|
|
1708
|
+
authentication in the spec for a single request.
|
|
1709
|
+
:type _request_auth: dict, optional
|
|
1710
|
+
:param _content_type: force content-type for the request.
|
|
1711
|
+
:type _content_type: str, Optional
|
|
1712
|
+
:param _headers: set to override the headers for a single
|
|
1713
|
+
request; this effectively ignores the headers
|
|
1714
|
+
in the spec for a single request.
|
|
1715
|
+
:type _headers: dict, optional
|
|
1716
|
+
:param _host_index: set to override the host_index for a single
|
|
1717
|
+
request; this effectively ignores the host_index
|
|
1718
|
+
in the spec for a single request.
|
|
1719
|
+
:type _host_index: int, optional
|
|
1720
|
+
:return: Returns the result object.
|
|
1721
|
+
""" # noqa: E501
|
|
1722
|
+
|
|
1723
|
+
_param = self._apps_subscriptions_api_handle_stripe_webhook_serialize(
|
|
1724
|
+
_request_auth=_request_auth,
|
|
1725
|
+
_content_type=_content_type,
|
|
1726
|
+
_headers=_headers,
|
|
1727
|
+
_host_index=_host_index
|
|
1728
|
+
)
|
|
1729
|
+
|
|
1730
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1731
|
+
'200': None,
|
|
1732
|
+
}
|
|
1733
|
+
response_data = await self.api_client.call_api(
|
|
1734
|
+
*_param,
|
|
1735
|
+
_request_timeout=_request_timeout
|
|
1736
|
+
)
|
|
1737
|
+
await response_data.read()
|
|
1738
|
+
return self.api_client.response_deserialize(
|
|
1739
|
+
response_data=response_data,
|
|
1740
|
+
response_types_map=_response_types_map,
|
|
1741
|
+
)
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
@validate_call
|
|
1745
|
+
async def apps_subscriptions_api_handle_stripe_webhook_without_preload_content(
|
|
1746
|
+
self,
|
|
1747
|
+
_request_timeout: Union[
|
|
1748
|
+
None,
|
|
1749
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1750
|
+
Tuple[
|
|
1751
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1752
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1753
|
+
]
|
|
1754
|
+
] = None,
|
|
1755
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1756
|
+
_content_type: Optional[StrictStr] = None,
|
|
1757
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1758
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1759
|
+
) -> RESTResponseType:
|
|
1760
|
+
"""Handle Stripe Webhook
|
|
1761
|
+
|
|
1762
|
+
Handle Stripe webhook events. Note: This endpoint doesn't use standard Django Ninja response handling because it needs to work with raw request body for signature verification.
|
|
1763
|
+
|
|
1764
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1765
|
+
number provided, it will be total request
|
|
1766
|
+
timeout. It can also be a pair (tuple) of
|
|
1767
|
+
(connection, read) timeouts.
|
|
1768
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1769
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1770
|
+
request; this effectively ignores the
|
|
1771
|
+
authentication in the spec for a single request.
|
|
1772
|
+
:type _request_auth: dict, optional
|
|
1773
|
+
:param _content_type: force content-type for the request.
|
|
1774
|
+
:type _content_type: str, Optional
|
|
1775
|
+
:param _headers: set to override the headers for a single
|
|
1776
|
+
request; this effectively ignores the headers
|
|
1777
|
+
in the spec for a single request.
|
|
1778
|
+
:type _headers: dict, optional
|
|
1779
|
+
:param _host_index: set to override the host_index for a single
|
|
1780
|
+
request; this effectively ignores the host_index
|
|
1781
|
+
in the spec for a single request.
|
|
1782
|
+
:type _host_index: int, optional
|
|
1783
|
+
:return: Returns the result object.
|
|
1784
|
+
""" # noqa: E501
|
|
1785
|
+
|
|
1786
|
+
_param = self._apps_subscriptions_api_handle_stripe_webhook_serialize(
|
|
1787
|
+
_request_auth=_request_auth,
|
|
1788
|
+
_content_type=_content_type,
|
|
1789
|
+
_headers=_headers,
|
|
1790
|
+
_host_index=_host_index
|
|
1791
|
+
)
|
|
1792
|
+
|
|
1793
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1794
|
+
'200': None,
|
|
1795
|
+
}
|
|
1796
|
+
response_data = await self.api_client.call_api(
|
|
1797
|
+
*_param,
|
|
1798
|
+
_request_timeout=_request_timeout
|
|
1799
|
+
)
|
|
1800
|
+
return response_data.response
|
|
1801
|
+
|
|
1802
|
+
|
|
1803
|
+
def _apps_subscriptions_api_handle_stripe_webhook_serialize(
|
|
1804
|
+
self,
|
|
1805
|
+
_request_auth,
|
|
1806
|
+
_content_type,
|
|
1807
|
+
_headers,
|
|
1808
|
+
_host_index,
|
|
1809
|
+
) -> RequestSerialized:
|
|
1810
|
+
|
|
1811
|
+
_host = None
|
|
1812
|
+
|
|
1813
|
+
_collection_formats: Dict[str, str] = {
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
_path_params: Dict[str, str] = {}
|
|
1817
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1818
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1819
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1820
|
+
_files: Dict[
|
|
1821
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1822
|
+
] = {}
|
|
1823
|
+
_body_params: Optional[bytes] = None
|
|
1824
|
+
|
|
1825
|
+
# process the path parameters
|
|
1826
|
+
# process the query parameters
|
|
1827
|
+
# process the header parameters
|
|
1828
|
+
# process the form parameters
|
|
1829
|
+
# process the body parameter
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
|
|
1834
|
+
# authentication setting
|
|
1835
|
+
_auth_settings: List[str] = [
|
|
1836
|
+
]
|
|
1837
|
+
|
|
1838
|
+
return self.api_client.param_serialize(
|
|
1839
|
+
method='POST',
|
|
1840
|
+
resource_path='/api/v1/subscriptions/stripe-webhook',
|
|
1841
|
+
path_params=_path_params,
|
|
1842
|
+
query_params=_query_params,
|
|
1843
|
+
header_params=_header_params,
|
|
1844
|
+
body=_body_params,
|
|
1845
|
+
post_params=_form_params,
|
|
1846
|
+
files=_files,
|
|
1847
|
+
auth_settings=_auth_settings,
|
|
1848
|
+
collection_formats=_collection_formats,
|
|
1849
|
+
_host=_host,
|
|
1850
|
+
_request_auth=_request_auth
|
|
1851
|
+
)
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
@validate_call
|
|
1857
|
+
async def apps_subscriptions_api_health_check(
|
|
1858
|
+
self,
|
|
1859
|
+
_request_timeout: Union[
|
|
1860
|
+
None,
|
|
1861
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1862
|
+
Tuple[
|
|
1863
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1864
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1865
|
+
]
|
|
1866
|
+
] = None,
|
|
1867
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1868
|
+
_content_type: Optional[StrictStr] = None,
|
|
1869
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1870
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1871
|
+
) -> HealthResponse:
|
|
1872
|
+
"""Health Check
|
|
1873
|
+
|
|
1874
|
+
Health check endpoint for subscription service.
|
|
1875
|
+
|
|
1876
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1877
|
+
number provided, it will be total request
|
|
1878
|
+
timeout. It can also be a pair (tuple) of
|
|
1879
|
+
(connection, read) timeouts.
|
|
1880
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1881
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1882
|
+
request; this effectively ignores the
|
|
1883
|
+
authentication in the spec for a single request.
|
|
1884
|
+
:type _request_auth: dict, optional
|
|
1885
|
+
:param _content_type: force content-type for the request.
|
|
1886
|
+
:type _content_type: str, Optional
|
|
1887
|
+
:param _headers: set to override the headers for a single
|
|
1888
|
+
request; this effectively ignores the headers
|
|
1889
|
+
in the spec for a single request.
|
|
1890
|
+
:type _headers: dict, optional
|
|
1891
|
+
:param _host_index: set to override the host_index for a single
|
|
1892
|
+
request; this effectively ignores the host_index
|
|
1893
|
+
in the spec for a single request.
|
|
1894
|
+
:type _host_index: int, optional
|
|
1895
|
+
:return: Returns the result object.
|
|
1896
|
+
""" # noqa: E501
|
|
1897
|
+
|
|
1898
|
+
_param = self._apps_subscriptions_api_health_check_serialize(
|
|
1899
|
+
_request_auth=_request_auth,
|
|
1900
|
+
_content_type=_content_type,
|
|
1901
|
+
_headers=_headers,
|
|
1902
|
+
_host_index=_host_index
|
|
1903
|
+
)
|
|
1904
|
+
|
|
1905
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1906
|
+
'200': "HealthResponse",
|
|
1907
|
+
}
|
|
1908
|
+
response_data = await self.api_client.call_api(
|
|
1909
|
+
*_param,
|
|
1910
|
+
_request_timeout=_request_timeout
|
|
1911
|
+
)
|
|
1912
|
+
await response_data.read()
|
|
1913
|
+
return self.api_client.response_deserialize(
|
|
1914
|
+
response_data=response_data,
|
|
1915
|
+
response_types_map=_response_types_map,
|
|
1916
|
+
).data
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
@validate_call
|
|
1920
|
+
async def apps_subscriptions_api_health_check_with_http_info(
|
|
1921
|
+
self,
|
|
1922
|
+
_request_timeout: Union[
|
|
1923
|
+
None,
|
|
1924
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1925
|
+
Tuple[
|
|
1926
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1927
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1928
|
+
]
|
|
1929
|
+
] = None,
|
|
1930
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1931
|
+
_content_type: Optional[StrictStr] = None,
|
|
1932
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1933
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1934
|
+
) -> ApiResponse[HealthResponse]:
|
|
1935
|
+
"""Health Check
|
|
1936
|
+
|
|
1937
|
+
Health check endpoint for subscription service.
|
|
1938
|
+
|
|
1939
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1940
|
+
number provided, it will be total request
|
|
1941
|
+
timeout. It can also be a pair (tuple) of
|
|
1942
|
+
(connection, read) timeouts.
|
|
1943
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1944
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1945
|
+
request; this effectively ignores the
|
|
1946
|
+
authentication in the spec for a single request.
|
|
1947
|
+
:type _request_auth: dict, optional
|
|
1948
|
+
:param _content_type: force content-type for the request.
|
|
1949
|
+
:type _content_type: str, Optional
|
|
1950
|
+
:param _headers: set to override the headers for a single
|
|
1951
|
+
request; this effectively ignores the headers
|
|
1952
|
+
in the spec for a single request.
|
|
1953
|
+
:type _headers: dict, optional
|
|
1954
|
+
:param _host_index: set to override the host_index for a single
|
|
1955
|
+
request; this effectively ignores the host_index
|
|
1956
|
+
in the spec for a single request.
|
|
1957
|
+
:type _host_index: int, optional
|
|
1958
|
+
:return: Returns the result object.
|
|
1959
|
+
""" # noqa: E501
|
|
1960
|
+
|
|
1961
|
+
_param = self._apps_subscriptions_api_health_check_serialize(
|
|
1962
|
+
_request_auth=_request_auth,
|
|
1963
|
+
_content_type=_content_type,
|
|
1964
|
+
_headers=_headers,
|
|
1965
|
+
_host_index=_host_index
|
|
1966
|
+
)
|
|
1967
|
+
|
|
1968
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1969
|
+
'200': "HealthResponse",
|
|
1970
|
+
}
|
|
1971
|
+
response_data = await self.api_client.call_api(
|
|
1972
|
+
*_param,
|
|
1973
|
+
_request_timeout=_request_timeout
|
|
1974
|
+
)
|
|
1975
|
+
await response_data.read()
|
|
1976
|
+
return self.api_client.response_deserialize(
|
|
1977
|
+
response_data=response_data,
|
|
1978
|
+
response_types_map=_response_types_map,
|
|
1979
|
+
)
|
|
1980
|
+
|
|
1981
|
+
|
|
1982
|
+
@validate_call
|
|
1983
|
+
async def apps_subscriptions_api_health_check_without_preload_content(
|
|
1984
|
+
self,
|
|
1985
|
+
_request_timeout: Union[
|
|
1986
|
+
None,
|
|
1987
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1988
|
+
Tuple[
|
|
1989
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1990
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1991
|
+
]
|
|
1992
|
+
] = None,
|
|
1993
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1994
|
+
_content_type: Optional[StrictStr] = None,
|
|
1995
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1996
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1997
|
+
) -> RESTResponseType:
|
|
1998
|
+
"""Health Check
|
|
1999
|
+
|
|
2000
|
+
Health check endpoint for subscription service.
|
|
2001
|
+
|
|
2002
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2003
|
+
number provided, it will be total request
|
|
2004
|
+
timeout. It can also be a pair (tuple) of
|
|
2005
|
+
(connection, read) timeouts.
|
|
2006
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2007
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2008
|
+
request; this effectively ignores the
|
|
2009
|
+
authentication in the spec for a single request.
|
|
2010
|
+
:type _request_auth: dict, optional
|
|
2011
|
+
:param _content_type: force content-type for the request.
|
|
2012
|
+
:type _content_type: str, Optional
|
|
2013
|
+
:param _headers: set to override the headers for a single
|
|
2014
|
+
request; this effectively ignores the headers
|
|
2015
|
+
in the spec for a single request.
|
|
2016
|
+
:type _headers: dict, optional
|
|
2017
|
+
:param _host_index: set to override the host_index for a single
|
|
2018
|
+
request; this effectively ignores the host_index
|
|
2019
|
+
in the spec for a single request.
|
|
2020
|
+
:type _host_index: int, optional
|
|
2021
|
+
:return: Returns the result object.
|
|
2022
|
+
""" # noqa: E501
|
|
2023
|
+
|
|
2024
|
+
_param = self._apps_subscriptions_api_health_check_serialize(
|
|
2025
|
+
_request_auth=_request_auth,
|
|
2026
|
+
_content_type=_content_type,
|
|
2027
|
+
_headers=_headers,
|
|
2028
|
+
_host_index=_host_index
|
|
2029
|
+
)
|
|
2030
|
+
|
|
2031
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2032
|
+
'200': "HealthResponse",
|
|
2033
|
+
}
|
|
2034
|
+
response_data = await self.api_client.call_api(
|
|
2035
|
+
*_param,
|
|
2036
|
+
_request_timeout=_request_timeout
|
|
2037
|
+
)
|
|
2038
|
+
return response_data.response
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
def _apps_subscriptions_api_health_check_serialize(
|
|
2042
|
+
self,
|
|
2043
|
+
_request_auth,
|
|
2044
|
+
_content_type,
|
|
2045
|
+
_headers,
|
|
2046
|
+
_host_index,
|
|
2047
|
+
) -> RequestSerialized:
|
|
2048
|
+
|
|
2049
|
+
_host = None
|
|
2050
|
+
|
|
2051
|
+
_collection_formats: Dict[str, str] = {
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
_path_params: Dict[str, str] = {}
|
|
2055
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2056
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2057
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2058
|
+
_files: Dict[
|
|
2059
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2060
|
+
] = {}
|
|
2061
|
+
_body_params: Optional[bytes] = None
|
|
2062
|
+
|
|
2063
|
+
# process the path parameters
|
|
2064
|
+
# process the query parameters
|
|
2065
|
+
# process the header parameters
|
|
2066
|
+
# process the form parameters
|
|
2067
|
+
# process the body parameter
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
# set the HTTP header `Accept`
|
|
2071
|
+
if 'Accept' not in _header_params:
|
|
2072
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2073
|
+
[
|
|
2074
|
+
'application/json'
|
|
2075
|
+
]
|
|
2076
|
+
)
|
|
2077
|
+
|
|
2078
|
+
|
|
2079
|
+
# authentication setting
|
|
2080
|
+
_auth_settings: List[str] = [
|
|
2081
|
+
]
|
|
2082
|
+
|
|
2083
|
+
return self.api_client.param_serialize(
|
|
2084
|
+
method='GET',
|
|
2085
|
+
resource_path='/api/v1/subscriptions/health',
|
|
2086
|
+
path_params=_path_params,
|
|
2087
|
+
query_params=_query_params,
|
|
2088
|
+
header_params=_header_params,
|
|
2089
|
+
body=_body_params,
|
|
2090
|
+
post_params=_form_params,
|
|
2091
|
+
files=_files,
|
|
2092
|
+
auth_settings=_auth_settings,
|
|
2093
|
+
collection_formats=_collection_formats,
|
|
2094
|
+
_host=_host,
|
|
2095
|
+
_request_auth=_request_auth
|
|
2096
|
+
)
|
|
2097
|
+
|
|
2098
|
+
|
|
2099
|
+
|
|
2100
|
+
|
|
2101
|
+
@validate_call
|
|
2102
|
+
async def apps_subscriptions_api_reactivate_subscription(
|
|
2103
|
+
self,
|
|
2104
|
+
_request_timeout: Union[
|
|
2105
|
+
None,
|
|
2106
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2107
|
+
Tuple[
|
|
2108
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2109
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2110
|
+
]
|
|
2111
|
+
] = None,
|
|
2112
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2113
|
+
_content_type: Optional[StrictStr] = None,
|
|
2114
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2115
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2116
|
+
) -> SubscriptionActionResponse:
|
|
2117
|
+
"""Reactivate Subscription
|
|
2118
|
+
|
|
2119
|
+
Reactivate a cancelled subscription before period end.
|
|
2120
|
+
|
|
2121
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2122
|
+
number provided, it will be total request
|
|
2123
|
+
timeout. It can also be a pair (tuple) of
|
|
2124
|
+
(connection, read) timeouts.
|
|
2125
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2126
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2127
|
+
request; this effectively ignores the
|
|
2128
|
+
authentication in the spec for a single request.
|
|
2129
|
+
:type _request_auth: dict, optional
|
|
2130
|
+
:param _content_type: force content-type for the request.
|
|
2131
|
+
:type _content_type: str, Optional
|
|
2132
|
+
:param _headers: set to override the headers for a single
|
|
2133
|
+
request; this effectively ignores the headers
|
|
2134
|
+
in the spec for a single request.
|
|
2135
|
+
:type _headers: dict, optional
|
|
2136
|
+
:param _host_index: set to override the host_index for a single
|
|
2137
|
+
request; this effectively ignores the host_index
|
|
2138
|
+
in the spec for a single request.
|
|
2139
|
+
:type _host_index: int, optional
|
|
2140
|
+
:return: Returns the result object.
|
|
2141
|
+
""" # noqa: E501
|
|
2142
|
+
|
|
2143
|
+
_param = self._apps_subscriptions_api_reactivate_subscription_serialize(
|
|
2144
|
+
_request_auth=_request_auth,
|
|
2145
|
+
_content_type=_content_type,
|
|
2146
|
+
_headers=_headers,
|
|
2147
|
+
_host_index=_host_index
|
|
2148
|
+
)
|
|
2149
|
+
|
|
2150
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2151
|
+
'200': "SubscriptionActionResponse",
|
|
2152
|
+
'400': "Dict[str, object]",
|
|
2153
|
+
'404': "Dict[str, object]",
|
|
2154
|
+
'429': "Dict[str, object]",
|
|
2155
|
+
'500': "Dict[str, object]",
|
|
2156
|
+
}
|
|
2157
|
+
response_data = await self.api_client.call_api(
|
|
2158
|
+
*_param,
|
|
2159
|
+
_request_timeout=_request_timeout
|
|
2160
|
+
)
|
|
2161
|
+
await response_data.read()
|
|
2162
|
+
return self.api_client.response_deserialize(
|
|
2163
|
+
response_data=response_data,
|
|
2164
|
+
response_types_map=_response_types_map,
|
|
2165
|
+
).data
|
|
2166
|
+
|
|
2167
|
+
|
|
2168
|
+
@validate_call
|
|
2169
|
+
async def apps_subscriptions_api_reactivate_subscription_with_http_info(
|
|
2170
|
+
self,
|
|
2171
|
+
_request_timeout: Union[
|
|
2172
|
+
None,
|
|
2173
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2174
|
+
Tuple[
|
|
2175
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2176
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2177
|
+
]
|
|
2178
|
+
] = None,
|
|
2179
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2180
|
+
_content_type: Optional[StrictStr] = None,
|
|
2181
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2182
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2183
|
+
) -> ApiResponse[SubscriptionActionResponse]:
|
|
2184
|
+
"""Reactivate Subscription
|
|
2185
|
+
|
|
2186
|
+
Reactivate a cancelled subscription before period end.
|
|
2187
|
+
|
|
2188
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2189
|
+
number provided, it will be total request
|
|
2190
|
+
timeout. It can also be a pair (tuple) of
|
|
2191
|
+
(connection, read) timeouts.
|
|
2192
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2193
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2194
|
+
request; this effectively ignores the
|
|
2195
|
+
authentication in the spec for a single request.
|
|
2196
|
+
:type _request_auth: dict, optional
|
|
2197
|
+
:param _content_type: force content-type for the request.
|
|
2198
|
+
:type _content_type: str, Optional
|
|
2199
|
+
:param _headers: set to override the headers for a single
|
|
2200
|
+
request; this effectively ignores the headers
|
|
2201
|
+
in the spec for a single request.
|
|
2202
|
+
:type _headers: dict, optional
|
|
2203
|
+
:param _host_index: set to override the host_index for a single
|
|
2204
|
+
request; this effectively ignores the host_index
|
|
2205
|
+
in the spec for a single request.
|
|
2206
|
+
:type _host_index: int, optional
|
|
2207
|
+
:return: Returns the result object.
|
|
2208
|
+
""" # noqa: E501
|
|
2209
|
+
|
|
2210
|
+
_param = self._apps_subscriptions_api_reactivate_subscription_serialize(
|
|
2211
|
+
_request_auth=_request_auth,
|
|
2212
|
+
_content_type=_content_type,
|
|
2213
|
+
_headers=_headers,
|
|
2214
|
+
_host_index=_host_index
|
|
2215
|
+
)
|
|
2216
|
+
|
|
2217
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2218
|
+
'200': "SubscriptionActionResponse",
|
|
2219
|
+
'400': "Dict[str, object]",
|
|
2220
|
+
'404': "Dict[str, object]",
|
|
2221
|
+
'429': "Dict[str, object]",
|
|
2222
|
+
'500': "Dict[str, object]",
|
|
2223
|
+
}
|
|
2224
|
+
response_data = await self.api_client.call_api(
|
|
2225
|
+
*_param,
|
|
2226
|
+
_request_timeout=_request_timeout
|
|
2227
|
+
)
|
|
2228
|
+
await response_data.read()
|
|
2229
|
+
return self.api_client.response_deserialize(
|
|
2230
|
+
response_data=response_data,
|
|
2231
|
+
response_types_map=_response_types_map,
|
|
2232
|
+
)
|
|
2233
|
+
|
|
2234
|
+
|
|
2235
|
+
@validate_call
|
|
2236
|
+
async def apps_subscriptions_api_reactivate_subscription_without_preload_content(
|
|
2237
|
+
self,
|
|
2238
|
+
_request_timeout: Union[
|
|
2239
|
+
None,
|
|
2240
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2241
|
+
Tuple[
|
|
2242
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2243
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2244
|
+
]
|
|
2245
|
+
] = None,
|
|
2246
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2247
|
+
_content_type: Optional[StrictStr] = None,
|
|
2248
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2249
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2250
|
+
) -> RESTResponseType:
|
|
2251
|
+
"""Reactivate Subscription
|
|
2252
|
+
|
|
2253
|
+
Reactivate a cancelled subscription before period end.
|
|
2254
|
+
|
|
2255
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2256
|
+
number provided, it will be total request
|
|
2257
|
+
timeout. It can also be a pair (tuple) of
|
|
2258
|
+
(connection, read) timeouts.
|
|
2259
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2260
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2261
|
+
request; this effectively ignores the
|
|
2262
|
+
authentication in the spec for a single request.
|
|
2263
|
+
:type _request_auth: dict, optional
|
|
2264
|
+
:param _content_type: force content-type for the request.
|
|
2265
|
+
:type _content_type: str, Optional
|
|
2266
|
+
:param _headers: set to override the headers for a single
|
|
2267
|
+
request; this effectively ignores the headers
|
|
2268
|
+
in the spec for a single request.
|
|
2269
|
+
:type _headers: dict, optional
|
|
2270
|
+
:param _host_index: set to override the host_index for a single
|
|
2271
|
+
request; this effectively ignores the host_index
|
|
2272
|
+
in the spec for a single request.
|
|
2273
|
+
:type _host_index: int, optional
|
|
2274
|
+
:return: Returns the result object.
|
|
2275
|
+
""" # noqa: E501
|
|
2276
|
+
|
|
2277
|
+
_param = self._apps_subscriptions_api_reactivate_subscription_serialize(
|
|
2278
|
+
_request_auth=_request_auth,
|
|
2279
|
+
_content_type=_content_type,
|
|
2280
|
+
_headers=_headers,
|
|
2281
|
+
_host_index=_host_index
|
|
2282
|
+
)
|
|
2283
|
+
|
|
2284
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2285
|
+
'200': "SubscriptionActionResponse",
|
|
2286
|
+
'400': "Dict[str, object]",
|
|
2287
|
+
'404': "Dict[str, object]",
|
|
2288
|
+
'429': "Dict[str, object]",
|
|
2289
|
+
'500': "Dict[str, object]",
|
|
2290
|
+
}
|
|
2291
|
+
response_data = await self.api_client.call_api(
|
|
2292
|
+
*_param,
|
|
2293
|
+
_request_timeout=_request_timeout
|
|
2294
|
+
)
|
|
2295
|
+
return response_data.response
|
|
2296
|
+
|
|
2297
|
+
|
|
2298
|
+
def _apps_subscriptions_api_reactivate_subscription_serialize(
|
|
2299
|
+
self,
|
|
2300
|
+
_request_auth,
|
|
2301
|
+
_content_type,
|
|
2302
|
+
_headers,
|
|
2303
|
+
_host_index,
|
|
2304
|
+
) -> RequestSerialized:
|
|
2305
|
+
|
|
2306
|
+
_host = None
|
|
2307
|
+
|
|
2308
|
+
_collection_formats: Dict[str, str] = {
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
_path_params: Dict[str, str] = {}
|
|
2312
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2313
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2314
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2315
|
+
_files: Dict[
|
|
2316
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2317
|
+
] = {}
|
|
2318
|
+
_body_params: Optional[bytes] = None
|
|
2319
|
+
|
|
2320
|
+
# process the path parameters
|
|
2321
|
+
# process the query parameters
|
|
2322
|
+
# process the header parameters
|
|
2323
|
+
# process the form parameters
|
|
2324
|
+
# process the body parameter
|
|
2325
|
+
|
|
2326
|
+
|
|
2327
|
+
# set the HTTP header `Accept`
|
|
2328
|
+
if 'Accept' not in _header_params:
|
|
2329
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2330
|
+
[
|
|
2331
|
+
'application/json'
|
|
2332
|
+
]
|
|
2333
|
+
)
|
|
2334
|
+
|
|
2335
|
+
|
|
2336
|
+
# authentication setting
|
|
2337
|
+
_auth_settings: List[str] = [
|
|
2338
|
+
'JWTBearer'
|
|
2339
|
+
]
|
|
2340
|
+
|
|
2341
|
+
return self.api_client.param_serialize(
|
|
2342
|
+
method='PUT',
|
|
2343
|
+
resource_path='/api/v1/subscriptions/reactivate',
|
|
2344
|
+
path_params=_path_params,
|
|
2345
|
+
query_params=_query_params,
|
|
2346
|
+
header_params=_header_params,
|
|
2347
|
+
body=_body_params,
|
|
2348
|
+
post_params=_form_params,
|
|
2349
|
+
files=_files,
|
|
2350
|
+
auth_settings=_auth_settings,
|
|
2351
|
+
collection_formats=_collection_formats,
|
|
2352
|
+
_host=_host,
|
|
2353
|
+
_request_auth=_request_auth
|
|
2354
|
+
)
|
|
2355
|
+
|
|
2356
|
+
|