Categorygithub.com/nanocfw/pagarme-golang-sdk
modulepackage
0.0.0-20241007202016-d66366ba4bc1
Repository: https://github.com/nanocfw/pagarme-golang-sdk.git
Documentation: pkg.go.dev

# README

Getting Started with PagarmeApiSDK

Introduction

Pagarme API

Requirements

The SDK requires Go version 1.18 or above.

Building

Install Dependencies

Resolve all the SDK dependencies, using the go get command.

Installation

The following section explains how to use the pagarmeapisdk library in a new project.

1. Add SDK as a Dependency to the Application

  • Add the following lines to your application's go.mod file:
replace pagarmeapisdk => ".\\PagarmeApiSDK" // local path to the SDK

require pagarmeapisdk v0.0.0
  • Resolve the dependencies in the updated go.mod file, using the go get command.

Initialize the API Client

Note: Documentation for the client can be found here.

The following parameters are configurable for the API Client:

ParameterTypeDescription
serviceRefererNamestring
httpConfigurationhttps.HttpConfigurationConfigurable http client options.
basicAuthUserNamestringThe username to use with basic authentication
basicAuthPasswordstringThe password to use with basic authentication

The API client can be initialized as follows:

config := pagarmeapisdk.CreateConfiguration(
    pagarmeapisdk.WithServiceRefererName("ServiceRefererName"),
    pagarmeapisdk.WithBasicAuthUserName("BasicAuthUserName"),
    pagarmeapisdk.WithBasicAuthPassword("BasicAuthPassword"),
)
client := pagarmeapisdk.NewClient(config)

Authorization

This API uses Basic Authentication.

API Errors

Here is the list of errors that the API might throw.

HTTP Status CodeError DescriptionException Class
400Invalid requestErrorException
401Invalid API keyErrorException
404An informed resource was not foundErrorException
412Business validation errorErrorException
422Contract validation errorErrorException
500Internal server errorErrorException

List of APIs

Classes Documentation

# Packages

Package pagarmeapisdk This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
Package pagarmeapisdk This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
Package pagarmeapisdk This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Constructor for client.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
Available Environments.
Available Servers.