Packages

Production-ready Elixir client for the GoCardless API.

Current section

Files

Jump to
Raw

mix.exs

defmodule GoCardlessClient.MixProject do
use Mix.Project
@version "2.0.0"
@source_url "https://github.com/iamkanishka/gocardless_client"
@description "Production-ready Elixir client for the GoCardless API."
def project do
[
app: :gocardless_client,
version: @version,
elixir: "~> 1.18",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
description: @description,
package: package(),
deps: deps(),
docs: docs(),
aliases: aliases(),
dialyzer: dialyzer(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test,
"coveralls.github": :test
],
name: "GoCardlessClient",
source_url: @source_url,
homepage_url: "https://developer.gocardless.com"
]
end
def application do
[
extra_applications: [:logger, :crypto],
mod: {GoCardlessClient.Application, []}
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
{:finch, "~> 0.19"},
{:jason, "~> 1.4"},
{:plug, "~> 1.15"},
{:telemetry, "~> 1.2"},
{:nimble_options, "~> 1.1"},
{:ex_doc, "~> 0.40", only: :dev, runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.18", only: :test},
{:bypass, "~> 2.1", only: :test},
{:mox, "~> 1.1", only: :test}
]
end
defp package do
[
name: "gocardless_client",
maintainers: ["iamkanishka"],
licenses: ["MIT"],
links: %{
"GitHub" => @source_url,
"GoCardless API Docs" => "https://developer.gocardless.com/api-reference/"
},
files: ~w(lib config mix.exs README.md CHANGELOG.md LICENSE .formatter.exs)
]
end
defp docs do
[
main: "readme",
source_ref: "v#{@version}",
source_url: @source_url,
extras: ["README.md", "CHANGELOG.md", "LICENSE"],
groups_for_modules: [
Core: [GoCardlessClient, GoCardlessClient.Client, GoCardlessClient.Config],
"HTTP Layer": [GoCardlessClient.HTTP.Client, GoCardlessClient.HTTP.RateLimiter],
"Billing Requests": [
GoCardlessClient.Resources.BankAuthorisations,
GoCardlessClient.Resources.BillingRequestFlows,
GoCardlessClient.Resources.BillingRequestTemplates,
GoCardlessClient.Resources.BillingRequestWithActions,
GoCardlessClient.Resources.BillingRequests,
GoCardlessClient.Resources.Institutions
],
"Core Resources": [
GoCardlessClient.Resources.Balances,
GoCardlessClient.Resources.BankAccountDetails,
GoCardlessClient.Resources.BankAccountHolderVerifications,
GoCardlessClient.Resources.BankDetailsLookups,
GoCardlessClient.Resources.Blocks,
GoCardlessClient.Resources.CreditorBankAccounts,
GoCardlessClient.Resources.Creditors,
GoCardlessClient.Resources.CurrencyExchangeRates,
GoCardlessClient.Resources.CustomerBankAccounts,
GoCardlessClient.Resources.CustomerNotifications,
GoCardlessClient.Resources.Customers,
GoCardlessClient.Resources.Events,
GoCardlessClient.Resources.Exports,
GoCardlessClient.Resources.FundsAvailabilities,
GoCardlessClient.Resources.InstalmentSchedules,
GoCardlessClient.Resources.Logos,
GoCardlessClient.Resources.MandateImportEntries,
GoCardlessClient.Resources.MandateImports,
GoCardlessClient.Resources.MandatePDFs,
GoCardlessClient.Resources.Mandates,
GoCardlessClient.Resources.NegativeBalanceLimits,
GoCardlessClient.Resources.OutboundPaymentImportEntries,
GoCardlessClient.Resources.OutboundPaymentImports,
GoCardlessClient.Resources.OutboundPayments,
GoCardlessClient.Resources.PayerAuthorisations,
GoCardlessClient.Resources.PayerThemes,
GoCardlessClient.Resources.PaymentAccountTransactions,
GoCardlessClient.Resources.PaymentAccounts,
GoCardlessClient.Resources.Payments,
GoCardlessClient.Resources.PayoutItems,
GoCardlessClient.Resources.Payouts,
GoCardlessClient.Resources.RedirectFlows,
GoCardlessClient.Resources.Refunds,
GoCardlessClient.Resources.ScenarioSimulators,
GoCardlessClient.Resources.SchemeIdentifiers,
GoCardlessClient.Resources.Subscriptions,
GoCardlessClient.Resources.TaxRates,
GoCardlessClient.Resources.TransferredMandates,
GoCardlessClient.Resources.VerificationDetails,
GoCardlessClient.Resources.Webhooks
],
Webhooks: [GoCardlessClient.Webhooks, GoCardlessClient.Webhooks.Plug],
OAuth2: [GoCardlessClient.OAuth],
"Request Signing": [GoCardlessClient.Signing],
Pagination: [GoCardlessClient.Paginator],
Errors: [
GoCardlessClient.APIError,
GoCardlessClient.FieldError,
GoCardlessClient.Error
]
]
]
end
defp dialyzer do
[
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
plt_add_apps: [:ex_unit],
flags: [:error_handling, :missing_return, :underspecs]
]
end
defp aliases do
[
setup: ["deps.get", "compile"],
quality: ["format --check-formatted", "credo --strict", "dialyzer"],
"test.all": ["test --cover"]
]
end
end