Socket
Socket
Sign inDemoInstall

rajaonarison-alma-client

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rajaonarison-alma-client

Typescript client for Alma (using axios)


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@permettezmoideconstruire/alma-client

build status code style libraries status

See Documentation

Install

yarn add @permettezmoideconstruire/alma-client

Usage

import type { AxiosResponse } from 'axios'

import {
  getClient,
  createPayment,
  AlmaPaymentOrderPayload,
  AlmaPayment
} from '@permettezmoideconstruire/alma-client'

// This creates and configure
// dedicated Axios instance for Alma
const almaClient = getClient(
  process.env.ALMA_API_KEY,
  // Optional but typically useful to switch to sandbox API endpoint
  process.env.ALMA_API_ENDPOINT
)

// API types helpers for payloads
const paymentOrderPayload: AlmaPaymentOrderPayload = {
  payment: {
    billing_address: {
      country: 'France'
    },
    purchase_amount: 150000
  }
}

// Each call is curryfied : method(almaClient)(data / options)
const result: AxiosResponse<Payment> = await createPayment(almaClient)(paymentOrderCreation)

// API types for returns
const payment: Payment = result.data

FAQs

Package last updated on 11 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc