client

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIDomain  = "api.ramp.com"
	APIPath    = "developer"
	APIVersion = "v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*uhttp.BaseHttpClient
	TokenSource oauth2.TokenSource
}

func New

func New(ctx context.Context, tokenSource oauth2.TokenSource) (*Client, error)

func (*Client) ListUsers

func (c *Client) ListUsers(ctx context.Context, pagination string) (*UsersResponse, *v2.RateLimitDescription, error)

type Page

type Page struct {
	Next string `json:"next"`
}

type Role

type Role struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Token

type Token struct {
	AccessToken string
}

func (Token) Token

func (c Token) Token() (*oauth2.Token, error)

type User

type User struct {
	ID        string `json:"id"`
	Email     string `json:"email"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Role      string `json:"role"`
	Status    string `json:"status"`
}

type UsersList

type UsersList struct {
	Page  Page    `json:"page"`
	Users []*User `json:"data"`
}

type UsersResponse

type UsersResponse struct {
	Users      []*User
	Pagination string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL