Skip to content

atoncetti/lago_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LagoClient

Elixir client library to communicate with a Lago server.

Installation

The package can be installed by adding lago_client to your list of dependencies in mix.exs:

def deps do
  [
      {:lago_client, git: "https://github.com/atoncetti/lago_client.git", branch: "main"}
  ]
end

Regenerate

Use Example

Add to config/runtime.exs:

config :lago_client,
  app_name: :your-app-name,
  auth:
    System.get_env(
      "LAGO_API_KEY",
      "your-api-key"
    ),
  server:
    System.get_env(
      "LAGO_API_URL",
      "http://localhost:3000/api/v1" # or url to your lago instance
    )

To use the library:

alias LagoClient.Subscriptions
alias LagoClient.SubscriptionCreateInput
alias LagoClient.SubscriptionCreateInputSubscription

{:ok, subscription} = Subscriptions.create_subscription(%SubscriptionCreateInput{
  subscription: %SubscriptionCreateInputSubscription{
    external_id: "asdf1234",
    external_customer_id: "customer.12345",
    plan_code: "free"
  }
})

Issues

  • CustomerObjectExtended is of type allOf and is not properly built, manually add all fields from CustomerObject

About

Elixir client for Lago API

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages