View Source ExOAPI.Stripe.SDK.BillingPortal (exoapi_stripe v0.1.4)

Link to this section Summary

Functions

description: <p>Returns a list of configurations that describe the functionality of the customer portal.</p>

description: <p>Retrieves a configuration that describes the functionality of the customer portal.</p>

description: <p>Creates a configuration that describes the functionality and behavior of a PortalSession</p>

description: <p>Updates a configuration that describes the functionality of the customer portal.</p>

description: <p>Creates a session of the customer portal.</p>

Link to this section Types

Link to this type

get_billing_portal_configurations_configuration_opts()

View Source
@type get_billing_portal_configurations_configuration_opts() :: {:expand, String.t()}
Link to this type

get_billing_portal_configurations_opts()

View Source
@type get_billing_portal_configurations_opts() ::
  {:starting_after, String.t()}
  | {:limit, String.t()}
  | {:is_default, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
  | {:active, String.t()}

Link to this section Functions

Link to this function

get_billing_portal_configurations(client, opts \\ [])

View Source
@spec get_billing_portal_configurations(client :: ExOAPI.Client.t(), [
  get_billing_portal_configurations_opts()
]) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | %{
       url: String.t(),
       object: String.t() | :list,
       has_more: boolean(),
       data: [ExOAPI.Stripe.Schemas.BillingPortal_configuration.t()]
     }
   | map()}
  | {:error, any()}

description: <p>Returns a list of configurations that describe the functionality of the customer portal.</p>

Link to this function

get_billing_portal_configurations_configuration(client, configuration, opts \\ [])

View Source
@spec get_billing_portal_configurations_configuration(
  client :: ExOAPI.Client.t(),
  configuration :: String.t(),
  [get_billing_portal_configurations_configuration_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.BillingPortal_configuration.t()
   | map()}
  | {:error, any()}

description: <p>Retrieves a configuration that describes the functionality of the customer portal.</p>

Link to this function

post_billing_portal_configurations(client, body)

View Source
@spec post_billing_portal_configurations(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      metadata: map(),
      features: %{
        subscription_update: %{
          proration_behavior:
            String.t() | :always_invoice | :create_prorations | :none,
          products: String.t() | [%{product: String.t(), prices: [String.t()]}],
          enabled: boolean(),
          default_allowed_updates:
            String.t() | [String.t() | :price | :promotion_code | :quantity]
        },
        subscription_pause: %{enabled: boolean()},
        subscription_cancel: %{
          proration_behavior:
            String.t() | :always_invoice | :create_prorations | :none,
          mode: String.t() | :at_period_end | :immediately,
          enabled: boolean(),
          cancellation_reason: %{
            options:
              String.t()
              | [
                  String.t()
                  | :customer_service
                  | :low_quality
                  | :missing_features
                  | :other
                  | :switched_service
                  | :too_complex
                  | :too_expensive
                  | :unused
                ],
            enabled: boolean()
          }
        },
        payment_method_update: %{enabled: boolean()},
        invoice_history: %{enabled: boolean()},
        customer_update: %{
          enabled: boolean(),
          allowed_updates:
            String.t()
            | [String.t() | :address | :email | :phone | :shipping | :tax_id]
        }
      },
      expand: [String.t()],
      default_return_url: String.t(),
      business_profile: %{
        terms_of_service_url: String.t(),
        privacy_policy_url: String.t(),
        headline: String.t()
      }
    }
    | map()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.BillingPortal_configuration.t()
   | map()}
  | {:error, any()}

description: <p>Creates a configuration that describes the functionality and behavior of a PortalSession</p>

Link to this function

post_billing_portal_configurations_configuration(client, body, configuration)

View Source
@spec post_billing_portal_configurations_configuration(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      metadata: String.t() | map(),
      features: %{
        subscription_update: %{
          proration_behavior:
            String.t() | :always_invoice | :create_prorations | :none,
          products: String.t() | [%{product: String.t(), prices: [String.t()]}],
          enabled: boolean(),
          default_allowed_updates:
            String.t() | [String.t() | :price | :promotion_code | :quantity]
        },
        subscription_pause: %{enabled: boolean()},
        subscription_cancel: %{
          proration_behavior:
            String.t() | :always_invoice | :create_prorations | :none,
          mode: String.t() | :at_period_end | :immediately,
          enabled: boolean(),
          cancellation_reason: %{
            options:
              String.t()
              | [
                  String.t()
                  | :customer_service
                  | :low_quality
                  | :missing_features
                  | :other
                  | :switched_service
                  | :too_complex
                  | :too_expensive
                  | :unused
                ],
            enabled: boolean()
          }
        },
        payment_method_update: %{enabled: boolean()},
        invoice_history: %{enabled: boolean()},
        customer_update: %{
          enabled: boolean(),
          allowed_updates:
            String.t()
            | [String.t() | :address | :email | :phone | :shipping | :tax_id]
        }
      },
      expand: [String.t()],
      default_return_url: String.t(),
      business_profile: %{
        terms_of_service_url: String.t(),
        privacy_policy_url: String.t(),
        headline: String.t()
      },
      active: boolean()
    }
    | map(),
  configuration :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.BillingPortal_configuration.t()
   | map()}
  | {:error, any()}

description: <p>Updates a configuration that describes the functionality of the customer portal.</p>

Link to this function

post_billing_portal_sessions(client, body)

View Source
@spec post_billing_portal_sessions(
  client :: ExOAPI.Client.t(),
  body ::
    %{
      return_url: String.t(),
      on_behalf_of: String.t(),
      locale:
        String.t()
        | :auto
        | :bg
        | :cs
        | :da
        | :de
        | :el
        | :en
        | :"en-AU"
        | :"en-CA"
        | :"en-GB"
        | :"en-IE"
        | :"en-IN"
        | :"en-NZ"
        | :"en-SG"
        | :es
        | :"es-419"
        | :et
        | :fi
        | :fil
        | :fr
        | :"fr-CA"
        | :hr
        | :hu
        | :id
        | :it
        | :ja
        | :ko
        | :lt
        | :lv
        | :ms
        | :mt
        | :nb
        | :nl
        | :pl
        | :pt
        | :"pt-BR"
        | :ro
        | :ru
        | :sk
        | :sl
        | :sv
        | :th
        | :tr
        | :vi
        | :zh
        | :"zh-HK"
        | :"zh-TW",
      expand: [String.t()],
      customer: String.t(),
      configuration: String.t()
    }
    | map()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.BillingPortal_session.t()
   | map()}
  | {:error, any()}

description: <p>Creates a session of the customer portal.</p>