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.
pub use crate::operation::create_app_payment_registration::_create_app_payment_registration_input::CreateAppPaymentRegistrationInputBuilder;

pub use crate::operation::create_app_payment_registration::_create_app_payment_registration_output::CreateAppPaymentRegistrationOutputBuilder;

impl crate::operation::create_app_payment_registration::builders::CreateAppPaymentRegistrationInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::create_app_payment_registration::CreateAppPaymentRegistrationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_app_payment_registration::CreateAppPaymentRegistrationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_app_payment_registration();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateAppPaymentRegistration`.
///
/// Creates a hosted URL that an app owner uses to register payment and tax details.
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateAppPaymentRegistrationFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_app_payment_registration::builders::CreateAppPaymentRegistrationInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_app_payment_registration::CreateAppPaymentRegistrationOutput,
        crate::operation::create_app_payment_registration::CreateAppPaymentRegistrationError,
    > for CreateAppPaymentRegistrationFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_app_payment_registration::CreateAppPaymentRegistrationOutput,
            crate::operation::create_app_payment_registration::CreateAppPaymentRegistrationError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateAppPaymentRegistrationFluentBuilder {
    /// Creates a new `CreateAppPaymentRegistrationFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the CreateAppPaymentRegistration as a reference.
    pub fn as_input(&self) -> &crate::operation::create_app_payment_registration::builders::CreateAppPaymentRegistrationInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_app_payment_registration::CreateAppPaymentRegistrationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_app_payment_registration::CreateAppPaymentRegistrationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::create_app_payment_registration::CreateAppPaymentRegistration::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_app_payment_registration::CreateAppPaymentRegistration::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::create_app_payment_registration::CreateAppPaymentRegistrationOutput,
        crate::operation::create_app_payment_registration::CreateAppPaymentRegistrationError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// The ID of the app being registered for payment.
    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.app_id(input.into());
        self
    }
    /// The ID of the app being registered for payment.
    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_app_id(input);
        self
    }
    /// The ID of the app being registered for payment.
    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_app_id()
    }
    /// Your registered legal name.
    pub fn legal_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.legal_name(input.into());
        self
    }
    /// Your registered legal name.
    pub fn set_legal_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_legal_name(input);
        self
    }
    /// Your registered legal name.
    pub fn get_legal_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_legal_name()
    }
    /// Your business address.
    pub fn developer_address(mut self, input: crate::types::DeveloperAddress) -> Self {
        self.inner = self.inner.developer_address(input);
        self
    }
    /// Your business address.
    pub fn set_developer_address(mut self, input: ::std::option::Option<crate::types::DeveloperAddress>) -> Self {
        self.inner = self.inner.set_developer_address(input);
        self
    }
    /// Your business address.
    pub fn get_developer_address(&self) -> &::std::option::Option<crate::types::DeveloperAddress> {
        self.inner.get_developer_address()
    }
    /// Your tax registration number (for example, VAT, GST, or EIN).
    pub fn tax_registration_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.tax_registration_number(input.into());
        self
    }
    /// Your tax registration number (for example, VAT, GST, or EIN).
    pub fn set_tax_registration_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_tax_registration_number(input);
        self
    }
    /// Your tax registration number (for example, VAT, GST, or EIN).
    pub fn get_tax_registration_number(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_tax_registration_number()
    }
    /// Whether the seller is an individual or a registered business.
    pub fn business_type(mut self, input: crate::types::BusinessType) -> Self {
        self.inner = self.inner.business_type(input);
        self
    }
    /// Whether the seller is an individual or a registered business.
    pub fn set_business_type(mut self, input: ::std::option::Option<crate::types::BusinessType>) -> Self {
        self.inner = self.inner.set_business_type(input);
        self
    }
    /// Whether the seller is an individual or a registered business.
    pub fn get_business_type(&self) -> &::std::option::Option<crate::types::BusinessType> {
        self.inner.get_business_type()
    }
    /// Your primary contact email for this registration, distinct from supportEmail (the address shown to customers). If you omit it, AWS App Monetization uses supportEmail.
    pub fn email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.email(input.into());
        self
    }
    /// Your primary contact email for this registration, distinct from supportEmail (the address shown to customers). If you omit it, AWS App Monetization uses supportEmail.
    pub fn set_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_email(input);
        self
    }
    /// Your primary contact email for this registration, distinct from supportEmail (the address shown to customers). If you omit it, AWS App Monetization uses supportEmail.
    pub fn get_email(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_email()
    }
    /// Your support email address, displayed in the invoice footer.
    pub fn support_email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.support_email(input.into());
        self
    }
    /// Your support email address, displayed in the invoice footer.
    pub fn set_support_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_support_email(input);
        self
    }
    /// Your support email address, displayed in the invoice footer.
    pub fn get_support_email(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_support_email()
    }
    /// Customer-facing name (doing-business-as) shown to buyers on invoices, distinct from legalName.
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.display_name(input.into());
        self
    }
    /// Customer-facing name (doing-business-as) shown to buyers on invoices, distinct from legalName.
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_display_name(input);
        self
    }
    /// Customer-facing name (doing-business-as) shown to buyers on invoices, distinct from legalName.
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_display_name()
    }
    /// Customer-facing support phone number shown to buyers on invoices.
    pub fn support_phone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.support_phone(input.into());
        self
    }
    /// Customer-facing support phone number shown to buyers on invoices.
    pub fn set_support_phone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_support_phone(input);
        self
    }
    /// Customer-facing support phone number shown to buyers on invoices.
    pub fn get_support_phone(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_support_phone()
    }
    /// Logo printed on the seller's invoices: raw PNG or JPEG bytes, up to 100 KiB. The image type is detected from the bytes. Write-only: the logo is not returned by GetAppPaymentRegistration.
    pub fn invoice_logo(mut self, input: ::aws_smithy_types::Blob) -> Self {
        self.inner = self.inner.invoice_logo(input);
        self
    }
    /// Logo printed on the seller's invoices: raw PNG or JPEG bytes, up to 100 KiB. The image type is detected from the bytes. Write-only: the logo is not returned by GetAppPaymentRegistration.
    pub fn set_invoice_logo(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        self.inner = self.inner.set_invoice_logo(input);
        self
    }
    /// Logo printed on the seller's invoices: raw PNG or JPEG bytes, up to 100 KiB. The image type is detected from the bytes. Write-only: the logo is not returned by GetAppPaymentRegistration.
    pub fn get_invoice_logo(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
        self.inner.get_invoice_logo()
    }
    ///
    /// Appends an item to `taxRegistrations`.
    ///
    /// To override the contents of this collection use [`set_tax_registrations`](Self::set_tax_registrations).
    ///
    /// The jurisdictions where the seller is registered to collect tax.
    pub fn tax_registrations(mut self, input: crate::types::TaxRegistration) -> Self {
        self.inner = self.inner.tax_registrations(input);
        self
    }
    /// The jurisdictions where the seller is registered to collect tax.
    pub fn set_tax_registrations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TaxRegistration>>) -> Self {
        self.inner = self.inner.set_tax_registrations(input);
        self
    }
    /// The jurisdictions where the seller is registered to collect tax.
    pub fn get_tax_registrations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TaxRegistration>> {
        self.inner.get_tax_registrations()
    }
    /// The URL the seller's browser is redirected to after completing hosted registration.
    pub fn return_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.return_url(input.into());
        self
    }
    /// The URL the seller's browser is redirected to after completing hosted registration.
    pub fn set_return_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_return_url(input);
        self
    }
    /// The URL the seller's browser is redirected to after completing hosted registration.
    pub fn get_return_url(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_return_url()
    }
    /// The URL the seller's browser is redirected to if the hosted registration session expires.
    pub fn refresh_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.refresh_url(input.into());
        self
    }
    /// The URL the seller's browser is redirected to if the hosted registration session expires.
    pub fn set_refresh_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_refresh_url(input);
        self
    }
    /// The URL the seller's browser is redirected to if the hosted registration session expires.
    pub fn get_refresh_url(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_refresh_url()
    }
    /// A unique, case-sensitive identifier to ensure that the operation completes no more than one time.
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// A unique, case-sensitive identifier to ensure that the operation completes no more than one time.
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// A unique, case-sensitive identifier to ensure that the operation completes no more than one time.
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
    /// Required. The environment: live or sandbox.
    pub fn scope(mut self, input: crate::types::RequestScope) -> Self {
        self.inner = self.inner.scope(input);
        self
    }
    /// Required. The environment: live or sandbox.
    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::RequestScope>) -> Self {
        self.inner = self.inner.set_scope(input);
        self
    }
    /// Required. The environment: live or sandbox.
    pub fn get_scope(&self) -> &::std::option::Option<crate::types::RequestScope> {
        self.inner.get_scope()
    }
}