View Source Glific.Partners.Saas (Glific v5.1.6)

Saas is the DB table that holds the various parameters we need to run the service.

Link to this section Summary

Functions

Standard changeset pattern we use for all datat types

Partner API credentials for Guphsup

SaaS organization id to store BQ data under the context of the SaaS org credentials (specifically global stats data)

SaaS Phone to create admin accounts

SaaS primary email for the service and notifications

SaaS stripe ids for billing purpose, convert the string keys to atoms

SaaS tax rates for adding tax to subscription and invoices, convert the string keys to atoms

Link to this section Types

@type t() :: %Glific.Partners.Saas{
  __meta__: Ecto.Schema.Metadata.t(),
  email: String.t() | nil,
  id: non_neg_integer() | nil,
  inserted_at: :utc_datetime | nil,
  isv_credentials: map() | nil,
  name: String.t() | nil,
  organization:
    Glific.Partners.Organization.t() | Ecto.Association.NotLoaded.t() | nil,
  organization_id: non_neg_integer() | nil,
  phone: String.t() | nil,
  stripe_ids: term(),
  tax_rates: term(),
  updated_at: :utc_datetime | nil
}

Link to this section Functions

@spec changeset(t(), map()) :: Ecto.Changeset.t()

Standard changeset pattern we use for all datat types

Link to this function

isv_credentials(name \\ "Tides")

View Source
@spec isv_credentials(String.t()) :: map()

Partner API credentials for Guphsup

Link to this function

organization_id(name \\ "Tides")

View Source
@spec organization_id(String.t()) :: non_neg_integer()

SaaS organization id to store BQ data under the context of the SaaS org credentials (specifically global stats data)

@spec phone(String.t()) :: String.t()

SaaS Phone to create admin accounts

Link to this function

primary_email(name \\ "Tides")

View Source
@spec primary_email(String.t()) :: map()

SaaS primary email for the service and notifications

Link to this function

stripe_ids(name \\ "Tides")

View Source
@spec stripe_ids(String.t()) :: map()

SaaS stripe ids for billing purpose, convert the string keys to atoms

Link to this function

tax_rates(name \\ "Tides")

View Source
@spec tax_rates(String.t()) :: list()

SaaS tax rates for adding tax to subscription and invoices, convert the string keys to atoms