Skip to content

nkezhaya/SquareUp

Repository files navigation

SquareUp

Square API Client for Elixir

Usage

iex> client = %SquareUp.Client{...}
iex> SquareUp.V2.Payments.list(client)
{:ok, %{}}

Configuring a hackney HTTP client connection pool

It is recommended to start a separate http connection pool for requests going to Square. Doing so requires changes in two locations:

# lib/application.ex

def start(_) do
  children = [
    ...
    :hackney_pool.child_spec(:my_pool, [max_connections: 10, timeout: 5000]),
    ...
  ]
end

# Creating your SquareUp.Client struct:

%SquareUp.Client{
  ...
  hackney_opts: [pool: :my_pool],
  ...
}

Installation

If available in Hex, the package can be installed by adding square_up to your list of dependencies in mix.exs:

def deps do
  [
    {:square_up, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/square_up.

About

HTTP client for Square APIs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages