aws-sdk-appmonetization 1.0.0

AWS SDK for AWS App Monetization
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateBillingPortalSession`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`app_id(impl Into<String>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::app_id) / [`set_app_id(Option<String>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::set_app_id):<br>required: **true**<br>The ID of the app the portal is for.<br>
    ///   - [`user_id(impl Into<String>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::user_id) / [`set_user_id(Option<String>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::set_user_id):<br>required: **true**<br>The ID of the end user the portal is for. Do not include personally identifiable or otherwise sensitive data in this value.<br>
    ///   - [`return_url(impl Into<String>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::return_url) / [`set_return_url(Option<String>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::set_return_url):<br>required: **true**<br>A URL in your app. A plan checkout started from the portal doesn't redirect here: after payment, the buyer returns to the portal's My subscription page. Bound into the session and reused for every checkout the buyer launches from the portal.<br>
    ///   - [`refresh_url(impl Into<String>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::refresh_url) / [`set_refresh_url(Option<String>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::set_refresh_url):<br>required: **true**<br>A URL in your app. A plan checkout started from the portal doesn't redirect here: if the buyer cancels, they return to the portal's plans page. Bound into the session alongside returnUrl.<br>
    ///   - [`session_duration_seconds(i32)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::session_duration_seconds) / [`set_session_duration_seconds(Option<i32>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::set_session_duration_seconds):<br>required: **false**<br>The lifetime of the hosted session, in seconds, counted from this call. Omit to use the service default. It does not set how long billingPortalUrl works; see expiresAt.<br>
    ///   - [`client_token(impl Into<String>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::set_client_token):<br>required: **false**<br>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.<br>
    ///   - [`scope(RequestScope)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::scope) / [`set_scope(Option<RequestScope>)`](crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::set_scope):<br>required: **true**<br>Required. The environment: live or sandbox.<br>
    /// - On success, responds with [`CreateBillingPortalSessionOutput`](crate::operation::create_billing_portal_session::CreateBillingPortalSessionOutput) with field(s):
    ///   - [`billing_portal_url(String)`](crate::operation::create_billing_portal_session::CreateBillingPortalSessionOutput::billing_portal_url): The URL of the billing portal page to redirect the end user's browser to. The URL carries a short-lived session token or a single-use link in its fragment. The link works once, until expiresAt or the end of the session if sooner.
    ///   - [`session_token(Option<String>)`](crate::operation::create_billing_portal_session::CreateBillingPortalSessionOutput::session_token): The billing portal session token carried in the fragment of billingPortalUrl. Absent when billingPortalUrl carries a single-use link instead.
    ///   - [`expires_at(DateTime)`](crate::operation::create_billing_portal_session::CreateBillingPortalSessionOutput::expires_at): The time when the single-use link in `billingPortalUrl` expires, 10 minutes after it was created. After this time the URL no longer works and you must create a new session.
    ///   - [`manage_token(Option<String>)`](crate::operation::create_billing_portal_session::CreateBillingPortalSessionOutput::manage_token): A short-lived token that authorizes updates to the buyer profile from the billing portal. Returned only with sessionToken.
    /// - On failure, responds with [`SdkError<CreateBillingPortalSessionError>`](crate::operation::create_billing_portal_session::CreateBillingPortalSessionError)
    pub fn create_billing_portal_session(
        &self,
    ) -> crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder {
        crate::operation::create_billing_portal_session::builders::CreateBillingPortalSessionFluentBuilder::new(self.handle.clone())
    }
}