0.0.25 • Published 5 months ago

onvo-client v0.0.25

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Onvo Client

Onvo Client es un cliente de HTTP orientado a objetos para Node.js escrito en Typescript para interactuar de forma fácil con la API de Onvo.

Installation

npm

npm install onvo-client

yarn

yarn add onvo-client

Usage

La librería está diseñada para ser usada en un entorno de servidor, no incluya esta librería en el frontend de su aplicación ya que expondría su clave secreta. La clave secreta deber ser guardada en una variable de entorno.

Create client and export it

@lib/onvo.ts

import { OnvoClient } from 'onvo-client'

export const onvo = new OnvoClient({ api_key: 'YOUR_SECRET_KEY' })

Use the client in your endpoints

@routes/onvo/customers.ts

import { onvo } from '../lib/onvo'

export const getCustomer = async (id) => {
  try {
    const customer = await onvo.customers.get(id)
    return customer
  } catch (error) {
    return error
  }
}

Resources

Todos los recursos disponibles en la API de Onvo están disponibles como métodos en el cliente excepto el recurso bajo el path shoppers. Entre ellos

  • customers
  • checkouts
  • payment-intents
  • payments-methods
  • products
  • prices
  • subscriptions
  • refunds
  • shipping-rates

Para más información sobre los métodos disponibles en cada recurso, puedes consultar la documentación oficial de Onvo.

0.0.21

7 months ago

0.0.22

7 months ago

0.0.23

7 months ago

0.0.24

6 months ago

0.0.25

5 months ago

0.0.20

11 months ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.1

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.15

1 year ago

0.0.9

1 year ago

0.0.16

1 year ago

0.0.8

1 year ago

0.0.17

1 year ago

0.0.18

12 months ago

0.0.19

12 months ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

1.0.0

1 year ago