Skip to content

mundipagg/MundiApi-Go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Getting started

Mundipagg API

How to Build

  • In order to successfully build and run your SDK files, you are required to have the following setup in your system:
  • Ensure that GOPATH environment variable is set in the system variables. If not, set it to your workspace directory where you will be adding your Go projects.
  • The generated code uses unirest-go http library. Therefore, you will need internet access to resolve this dependency. If Go is properly installed and configured, run the following command to pull the dependency:
go get github.com/apimatic/unirest-go

This will install unirest-go in the GOPATH you specified in the system variables.

Now follow the steps mentioned below to build your SDK:

  1. Open eclipse in the Go language perspective and click on the Import option in File menu.

Importing SDK into Eclipse - Step 1

  1. Select General -> Existing Projects into Workspace option from the tree list.

Importing SDK into Eclipse - Step 2

  1. In Select root directory, provide path to the unzipped archive for the generated code. Once the path is set and the Project becomes visible under Projects click Finish

Importing SDK into Eclipse - Step 3

  1. The Go library will be imported and its files will be visible in the Project Explorer

Importing SDK into Eclipse - Step 4

How to Use

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

1. Add a new Test Project

Create a new project in Eclipse by File -> New -> Go Project

Add a new project in Eclipse

Name the Project as Test and click Finish

Create a new Maven Project - Step 1

Create a new directory in the src directory of this project

Create a new Maven Project - Step 2

Name it test.com

Create a new Maven Project - Step 3

Now create a new file inside src/test.com

Create a new Maven Project - Step 4

Name it testsdk.go

Create a new Maven Project - Step 5

In this Go file, you can start adding code to initialize the client library. Sample code to initialize the client library and using its methods is given in the subsequent sections.

2. Configure the Test Project

You need to import your generated library in this project in order to make use of its functions. In order to import the library, you can add its path in the GOPATH for this project. Follow the below steps:

Right click on the project name and click on Properties

Adding dependency to the client library - Step 1

Choose Go Compiler from the side menu. Check Use project specific settings and uncheck Use same value as the GOPATH environment variable.. By default, the GOPATH value from the environment variables will be visible in Eclipse GOPATH. Do not remove this as this points to the unirest dependency.

Adding dependency to the client library - Step 2

Append the library path to this GOPATH

Adding dependency to the client library - Step 3

Once the path is appended, click on OK

3. Build the Test Project

Right click on the project name and click on Build Project

Build Project

4. Run the Test Project

If the build is successful, right click on your Go file and click on Run As -> Go Application

Run Project

Initialization

Authentication

In order to setup authentication of the API client, you need the following information.

Parameter Description
serviceRefererName TODO: add a description
basicAuthUserName The username to use with basic authentication
basicAuthPassword The password to use with basic authentication

To configure these for your generated code, open the file "Configuration.go" and edit it's contents.

Class Reference

List of Controllers

Class: subscriptions_pkg

Get instance

Factory for the SUBSCRIPTIONS interface can be accessed from the package subscriptions_pkg.

subscriptions := subscriptions_pkg.NewSUBSCRIPTIONS()

Method: CreateDiscount

Creates a discount

func (me *SUBSCRIPTIONS_IMPL) CreateDiscount(
            subscriptionId string,
            body *models_pkg.SubscriptionsDiscountsRequest,
            idempotencyKey *string)(*models_pkg.SubscriptionsDiscountsResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
body Required Request for creating a discount
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsDiscountsRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.SubscriptionsDiscountsResponse
result,_ = subscriptions.CreateDiscount(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetSubscriptionItem

Get Subscription Item

func (me *SUBSCRIPTIONS_IMPL) GetSubscriptionItem(
            subscriptionId string,
            itemId string)(*models_pkg.GetSubscriptionItemResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
itemId Required Item id

Example Usage

subscriptionId := "subscription_id"
itemId := "item_id"

var result *models_pkg.GetSubscriptionItemResponse
result,_ = subscriptions.GetSubscriptionItem(subscriptionId, itemId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateSubscriptionItem

Updates a subscription item

func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionItem(
            subscriptionId string,
            itemId string,
            body *models_pkg.SubscriptionsItemsRequest,
            idempotencyKey *string)(*models_pkg.GetSubscriptionItemResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
itemId Required Item id
body Required Request for updating a subscription item
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
itemId := "item_id"
var body *models_pkg.SubscriptionsItemsRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionItemResponse
result,_ = subscriptions.UpdateSubscriptionItem(subscriptionId, itemId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeleteUsage

Deletes a usage

func (me *SUBSCRIPTIONS_IMPL) DeleteUsage(
            subscriptionId string,
            itemId string,
            usageId string,
            idempotencyKey *string)(*models_pkg.SubscriptionsItemsUsagesUsageIdResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
itemId Required The subscription item id
usageId Required The usage id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
itemId := "item_id"
usageId := "usage_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.SubscriptionsItemsUsagesUsageIdResponse
result,_ = subscriptions.DeleteUsage(subscriptionId, itemId, usageId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CancelSubscription

Cancels a subscription

func (me *SUBSCRIPTIONS_IMPL) CancelSubscription(
            subscriptionId string,
            idempotencyKey *string,
            body *models_pkg.SubscriptionsRequest)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
idempotencyKey Optional TODO: Add a parameter description
body Optional Request for cancelling a subscription

Example Usage

subscriptionId := "subscription_id"
idempotencyKey := "idempotency-key"
var body *models_pkg.SubscriptionsRequest

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.CancelSubscription(subscriptionId, idempotencyKey, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetSubscription

Gets a subscription

func (me *SUBSCRIPTIONS_IMPL) GetSubscription(subscriptionId string)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id

Example Usage

subscriptionId := "subscription_id"

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.GetSubscription(subscriptionId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeleteIncrement

Deletes a increment

func (me *SUBSCRIPTIONS_IMPL) DeleteIncrement(
            subscriptionId string,
            incrementId string,
            idempotencyKey *string)(*models_pkg.SubscriptionsIncrementsResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
incrementId Required Increment id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
incrementId := "increment_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.SubscriptionsIncrementsResponse
result,_ = subscriptions.DeleteIncrement(subscriptionId, incrementId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetIncrementById

GetIncrementById

func (me *SUBSCRIPTIONS_IMPL) GetIncrementById(
            subscriptionId string,
            incrementId string)(*models_pkg.SubscriptionsIncrementsResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription Id
incrementId Required The increment Id

Example Usage

subscriptionId := "subscription_id"
incrementId := "increment_id"

var result *models_pkg.SubscriptionsIncrementsResponse
result,_ = subscriptions.GetIncrementById(subscriptionId, incrementId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetSubscriptionCycleById

GetSubscriptionCycleById

func (me *SUBSCRIPTIONS_IMPL) GetSubscriptionCycleById(
            subscriptionId string,
            cycleId string)(*models_pkg.SubscriptionsCyclesResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
cycleId Required TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
cycleId := "cycleId"

var result *models_pkg.SubscriptionsCyclesResponse
result,_ = subscriptions.GetSubscriptionCycleById(subscriptionId, cycleId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateSubscriptionStartAt

Updates the start at date from a subscription

func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionStartAt(
            subscriptionId string,
            body *models_pkg.SubscriptionsStartAtRequest,
            idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
body Required Request for updating the subscription start date
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsStartAtRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionStartAt(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateSubscriptionPaymentMethod

Updates the payment method from a subscription

func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionPaymentMethod(
            subscriptionId string,
            body *models_pkg.SubscriptionsPaymentMethodRequest,
            idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
body Required Request for updating the paymentmethod from a subscription
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsPaymentMethodRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionPaymentMethod(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateCurrentCycleStatus

UpdateCurrentCycleStatus

func (me *SUBSCRIPTIONS_IMPL) UpdateCurrentCycleStatus(
            subscriptionId string,
            body *models_pkg.UpdateCurrentCycleStatusRequest,
            idempotencyKey *string)(,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
body Required Request for updating the end date of the subscription current status
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.UpdateCurrentCycleStatusRequest
idempotencyKey := "idempotency-key"

var result 
result,_ = subscriptions.UpdateCurrentCycleStatus(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateSubscription

Creates a new subscription

func (me *SUBSCRIPTIONS_IMPL) CreateSubscription(
            body *models_pkg.SubscriptionsRequest1,
            idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
body Required Request for creating a subscription
idempotencyKey Optional TODO: Add a parameter description

Example Usage

var body *models_pkg.SubscriptionsRequest1
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.CreateSubscription(body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetSubscriptions

Gets all subscriptions

func (me *SUBSCRIPTIONS_IMPL) GetSubscriptions(
            page *int64,
            size *int64,
            code *string,
            billingType *string,
            customerId *string,
            planId *string,
            cardId *string,
            status *string,
            nextBillingSince *time.Time,
            nextBillingUntil *time.Time,
            createdSince *time.Time,
            createdUntil *time.Time)(*models_pkg.SubscriptionsResponse3,error)

Parameters

Parameter Tags Description
page Optional Page number
size Optional Page size
code Optional Filter for subscription's code
billingType Optional Filter for subscription's billing type
customerId Optional Filter for subscription's customer id
planId Optional Filter for subscription's plan id
cardId Optional Filter for subscription's card id
status Optional Filter for subscription's status
nextBillingSince Optional Filter for subscription's next billing date start range
nextBillingUntil Optional Filter for subscription's next billing date end range
createdSince Optional Filter for subscription's creation date start range
createdUntil Optional Filter for subscriptions creation date end range

Example Usage

page,_ := strconv.ParseInt("87", 10, 8)
size,_ := strconv.ParseInt("87", 10, 8)
code := "code"
billingType := "billing_type"
customerId := "customer_id"
planId := "plan_id"
cardId := "card_id"
status := "status"
nextBillingSince := time.Now()
nextBillingUntil := time.Now()
createdSince := time.Now()
createdUntil := time.Now()

var result *models_pkg.SubscriptionsResponse3
result,_ = subscriptions.GetSubscriptions(page, size, code, billingType, customerId, planId, cardId, status, nextBillingSince, nextBillingUntil, createdSince, createdUntil)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetUsagesDetails

GetUsagesDetails

func (me *SUBSCRIPTIONS_IMPL) GetUsagesDetails(
            subscriptionId string,
            cycleId *string,
            size *int64,
            page *int64,
            itemId *string,
            group *string)(*models_pkg.GetUsagesDetailsResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Identifier
cycleId Optional Cycle id
size Optional Page size
page Optional Page number
itemId Optional Identificador do item
group Optional identificador da loja (account) de cada item

Example Usage

subscriptionId := "subscription_id"
cycleId := "cycle_id"
size,_ := strconv.ParseInt("87", 10, 8)
page,_ := strconv.ParseInt("87", 10, 8)
itemId := "item_id"
group := "group"

var result *models_pkg.GetUsagesDetailsResponse
result,_ = subscriptions.GetUsagesDetails(subscriptionId, cycleId, size, page, itemId, group)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: RenewSubscription

RenewSubscription

func (me *SUBSCRIPTIONS_IMPL) RenewSubscription(
            subscriptionId string,
            idempotencyKey *string)(*models_pkg.SubscriptionsCyclesResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required TODO: Add a parameter description
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.SubscriptionsCyclesResponse
result,_ = subscriptions.RenewSubscription(subscriptionId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetSubscriptionCycles

GetSubscriptionCycles

func (me *SUBSCRIPTIONS_IMPL) GetSubscriptionCycles(
            subscriptionId string,
            page string,
            size string)(*models_pkg.SubscriptionsCyclesResponse2,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
page Required Page number
size Required Page size

Example Usage

subscriptionId := "subscription_id"
page := "page"
size := "size"

var result *models_pkg.SubscriptionsCyclesResponse2
result,_ = subscriptions.GetSubscriptionCycles(subscriptionId, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateAnUsage

Create Usage

func (me *SUBSCRIPTIONS_IMPL) CreateAnUsage(
            subscriptionId string,
            itemId string,
            idempotencyKey *string)(*models_pkg.SubscriptionsItemsUsagesResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
itemId Required Item id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
itemId := "item_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.SubscriptionsItemsUsagesResponse
result,_ = subscriptions.CreateAnUsage(subscriptionId, itemId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetUsages

Lists all usages from a subscription item

func (me *SUBSCRIPTIONS_IMPL) GetUsages(
            subscriptionId string,
            itemId string,
            page *int64,
            size *int64,
            code *string,
            group *string,
            usedSince *time.Time,
            usedUntil *time.Time)(*models_pkg.SubscriptionsItemsUsagesResponse1,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
itemId Required The subscription item id
page Optional Page number
size Optional Page size
code Optional Identification code in the client system
group Optional Identification group in the client system
usedSince Optional TODO: Add a parameter description
usedUntil Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
itemId := "item_id"
page,_ := strconv.ParseInt("87", 10, 8)
size,_ := strconv.ParseInt("87", 10, 8)
code := "code"
group := "group"
usedSince := time.Now()
usedUntil := time.Now()

var result *models_pkg.SubscriptionsItemsUsagesResponse1
result,_ = subscriptions.GetUsages(subscriptionId, itemId, page, size, code, group, usedSince, usedUntil)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeleteDiscount

Deletes a discount

func (me *SUBSCRIPTIONS_IMPL) DeleteDiscount(
            subscriptionId string,
            discountId string,
            idempotencyKey *string)(*models_pkg.SubscriptionsDiscountsResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
discountId Required Discount Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
discountId := "discount_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.SubscriptionsDiscountsResponse
result,_ = subscriptions.DeleteDiscount(subscriptionId, discountId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetIncrements

GetIncrements

func (me *SUBSCRIPTIONS_IMPL) GetIncrements(
            subscriptionId string,
            page *int64,
            size *int64)(*models_pkg.ListIncrementsResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
page Optional Page number
size Optional Page size

Example Usage

subscriptionId := "subscription_id"
page,_ := strconv.ParseInt("87", 10, 8)
size,_ := strconv.ParseInt("87", 10, 8)

var result *models_pkg.ListIncrementsResponse
result,_ = subscriptions.GetIncrements(subscriptionId, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateSubscriptionItem

Creates a new Subscription item

func (me *SUBSCRIPTIONS_IMPL) CreateSubscriptionItem(
            subscriptionId string,
            body *models_pkg.SubscriptionsItemsRequest1,
            idempotencyKey *string)(*models_pkg.GetSubscriptionItemResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
body Required Request for creating a subscription item
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsItemsRequest1
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionItemResponse
result,_ = subscriptions.CreateSubscriptionItem(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetSubscriptionItems

Get Subscription Items

func (me *SUBSCRIPTIONS_IMPL) GetSubscriptionItems(
            subscriptionId string,
            page *int64,
            size *int64,
            name *string,
            code *string,
            status *string,
            description *string,
            createdSince *string,
            createdUntil *string)(*models_pkg.SubscriptionsItemsResponse3,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
page Optional Page number
size Optional Page size
name Optional The item name
code Optional Identification code in the client system
status Optional The item statis
description Optional The item description
createdSince Optional Filter for item's creation date start range
createdUntil Optional Filter for item's creation date end range

Example Usage

subscriptionId := "subscription_id"
page,_ := strconv.ParseInt("87", 10, 8)
size,_ := strconv.ParseInt("87", 10, 8)
name := "name"
code := "code"
status := "status"
description := "description"
createdSince := "created_since"
createdUntil := "created_until"

var result *models_pkg.SubscriptionsItemsResponse3
result,_ = subscriptions.GetSubscriptionItems(subscriptionId, page, size, name, code, status, description, createdSince, createdUntil)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateSubscriptionBillingDate

Updates the billing date from a subscription

func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionBillingDate(
            subscriptionId string,
            body *models_pkg.SubscriptionsBillingDateRequest,
            idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
body Required Request for updating the subscription billing date
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsBillingDateRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionBillingDate(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateLatestPeriodEndAt

UpdateLatestPeriodEndAt

func (me *SUBSCRIPTIONS_IMPL) UpdateLatestPeriodEndAt(
            subscriptionId string,
            body *models_pkg.SubscriptionsPeriodsLatestEndAtRequest,
            idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required TODO: Add a parameter description
body Required Request for updating the end date of the current signature cycle
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsPeriodsLatestEndAtRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateLatestPeriodEndAt(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateSubscriptionAffiliationId

UpdateSubscriptionAffiliationId

func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionAffiliationId(
            subscriptionId string,
            body *models_pkg.SubscriptionsGatewayAffiliationIdRequest,
            idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required TODO: Add a parameter description
body Required Request for updating a subscription affiliation id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsGatewayAffiliationIdRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionAffiliationId(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeleteSubscriptionItem

Deletes a subscription item

func (me *SUBSCRIPTIONS_IMPL) DeleteSubscriptionItem(
            subscriptionId string,
            subscriptionItemId string,
            idempotencyKey *string)(*models_pkg.GetSubscriptionItemResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
subscriptionItemId Required Subscription item id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
subscriptionItemId := "subscription_item_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionItemResponse
result,_ = subscriptions.DeleteSubscriptionItem(subscriptionId, subscriptionItemId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateSubscriptionCard

Updates the credit card from a subscription

func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionCard(
            subscriptionId string,
            body *models_pkg.SubscriptionsCardRequest,
            idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
body Required Request for updating a card
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsCardRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionCard(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateSubscriptionMetadata

Updates the metadata from a subscription

func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionMetadata(
            subscriptionId string,
            body *models_pkg.SubscriptionsMetadataRequest,
            idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
body Required Request for updating the subscrption metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsMetadataRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionMetadata(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateSubscriptionDueDays

Updates the boleto due days from a subscription

func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionDueDays(
            subscriptionId string,
            body *models_pkg.UpdateSubscriptionDueDaysRequest,
            idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
body Required TODO: Add a parameter description
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.UpdateSubscriptionDueDaysRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionDueDays(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetDiscounts

GetDiscounts

func (me *SUBSCRIPTIONS_IMPL) GetDiscounts(
            subscriptionId string,
            page int64,
            size int64)(*models_pkg.ListDiscountsResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
page Required Page number
size Required Page size

Example Usage

subscriptionId := "subscription_id"
page,_ := strconv.ParseInt("87", 10, 8)
size,_ := strconv.ParseInt("87", 10, 8)

var result *models_pkg.ListDiscountsResponse
result,_ = subscriptions.GetDiscounts(subscriptionId, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateIncrement

Creates a increment

func (me *SUBSCRIPTIONS_IMPL) CreateIncrement(
            subscriptionId string,
            body *models_pkg.SubscriptionsIncrementsRequest,
            idempotencyKey *string)(*models_pkg.SubscriptionsIncrementsResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription id
body Required Request for creating a increment
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsIncrementsRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.SubscriptionsIncrementsResponse
result,_ = subscriptions.CreateIncrement(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetDiscountById

GetDiscountById

func (me *SUBSCRIPTIONS_IMPL) GetDiscountById(
            subscriptionId string,
            discountId string)(*models_pkg.SubscriptionsDiscountsResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription id
discountId Required TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
discountId := "discountId"

var result *models_pkg.SubscriptionsDiscountsResponse
result,_ = subscriptions.GetDiscountById(subscriptionId, discountId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateSubscriptionMiniumPrice

Atualização do valor mínimo da assinatura

func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionMiniumPrice(
            subscriptionId string,
            body *models_pkg.SubscriptionsMinimumPriceRequest,
            idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
body Required Request da requisição com o valor mínimo que será configurado
idempotencyKey Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsMinimumPriceRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionMiniumPrice(subscriptionId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetUsageReport

GetUsageReport

func (me *SUBSCRIPTIONS_IMPL) GetUsageReport(
            subscriptionId string,
            periodId string)(*models_pkg.GetUsageReportResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required The subscription Id
periodId Required The period Id

Example Usage

subscriptionId := "subscription_id"
periodId := "period_id"

var result *models_pkg.GetUsageReportResponse
result,_ = subscriptions.GetUsageReport(subscriptionId, periodId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateSplitSubscription

UpdateSplitSubscription

func (me *SUBSCRIPTIONS_IMPL) UpdateSplitSubscription(
            id string,
            body *models_pkg.UpdateSubscriptionSplitRequest)(*models_pkg.GetSubscriptionResponse,error)

Parameters

Parameter Tags Description
id Required Subscription's id
body Required TODO: Add a parameter description

Example Usage

id := "id"
var body *models_pkg.UpdateSubscriptionSplitRequest

var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSplitSubscription(id, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: orders_pkg

Get instance

Factory for the ORDERS interface can be accessed from the package orders_pkg.

orders := orders_pkg.NewORDERS()

Method: UpdateOrderStatus

UpdateOrderStatus

func (me *ORDERS_IMPL) UpdateOrderStatus(
            id string,
            body *models_pkg.UpdateOrderStatusRequest,
            idempotencyKey *string)(*models_pkg.OrdersClosedResponse,error)

Parameters

Parameter Tags Description
id Required Order Id
body Required Update Order Model
idempotencyKey Optional TODO: Add a parameter description

Example Usage

id := "id"
var body *models_pkg.UpdateOrderStatusRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.OrdersClosedResponse
result,_ = orders.UpdateOrderStatus(id, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeleteAllOrderItems

DeleteAllOrderItems

func (me *ORDERS_IMPL) DeleteAllOrderItems(
            orderId string,
            idempotencyKey *string)(*models_pkg.OrdersItemsResponse,error)

Parameters

Parameter Tags Description
orderId Required Order Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

orderId := "orderId"
idempotencyKey := "idempotency-key"

var result *models_pkg.OrdersItemsResponse
result,_ = orders.DeleteAllOrderItems(orderId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateOrderItem

CreateOrderItem

func (me *ORDERS_IMPL) CreateOrderItem(
            orderId string,
            body *models_pkg.OrdersItemsRequest,
            idempotencyKey *string)(*models_pkg.OrdersItemsResponse1,error)

Parameters

Parameter Tags Description
orderId Required Order Id
body Required Order Item Model
idempotencyKey Optional TODO: Add a parameter description

Example Usage

orderId := "orderId"
var body *models_pkg.OrdersItemsRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.OrdersItemsResponse1
result,_ = orders.CreateOrderItem(orderId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateOrderMetadata

Updates the metadata from an order

func (me *ORDERS_IMPL) UpdateOrderMetadata(
            orderId string,
            body *models_pkg.OrdersMetadataRequest,
            idempotencyKey *string)(*models_pkg.OrdersMetadataResponse,error)

Parameters

Parameter Tags Description
orderId Required The order id
body Required Request for updating the order metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

orderId := "order_id"
var body *models_pkg.OrdersMetadataRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.OrdersMetadataResponse
result,_ = orders.UpdateOrderMetadata(orderId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetOrders

Gets all orders

func (me *ORDERS_IMPL) GetOrders(
            page *int64,
            size *int64,
            code *string,
            status *string,
            createdSince *time.Time,
            createdUntil *time.Time,
            customerId *string)(*models_pkg.OrdersResponse,error)

Parameters

Parameter Tags Description
page Optional Page number
size Optional Page size
code Optional Filter for order's code
status Optional Filter for order's status
createdSince Optional Filter for order's creation date start range
createdUntil Optional Filter for order's creation date end range
customerId Optional Filter for order's customer id

Example Usage

page,_ := strconv.ParseInt("179", 10, 8)
size,_ := strconv.ParseInt("179", 10, 8)
code := "code"
status := "status"
createdSince := time.Now()
createdUntil := time.Now()
customerId := "customer_id"

var result *models_pkg.OrdersResponse
result,_ = orders.GetOrders(page, size, code, status, createdSince, createdUntil, customerId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateOrder

Creates a new Order

func (me *ORDERS_IMPL) CreateOrder(
            body *models_pkg.OrdersRequest,
            idempotencyKey *string)(*models_pkg.OrdersResponse1,error)

Parameters

Parameter Tags Description
body Required Request for creating an order
idempotencyKey Optional TODO: Add a parameter description

Example Usage

var body *models_pkg.OrdersRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.OrdersResponse1
result,_ = orders.CreateOrder(body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeleteOrderItem

DeleteOrderItem

func (me *ORDERS_IMPL) DeleteOrderItem(
            orderId string,
            itemId string,
            idempotencyKey *string)(*models_pkg.OrdersItemsResponse1,error)

Parameters

Parameter Tags Description
orderId Required Order Id
itemId Required Item Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

orderId := "orderId"
itemId := "itemId"
idempotencyKey := "idempotency-key"

var result *models_pkg.OrdersItemsResponse1
result,_ = orders.DeleteOrderItem(orderId, itemId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetOrderItem

GetOrderItem

func (me *ORDERS_IMPL) GetOrderItem(
            orderId string,
            itemId string)(*models_pkg.OrdersItemsResponse1,error)

Parameters

Parameter Tags Description
orderId Required Order Id
itemId Required Item Id

Example Usage

orderId := "orderId"
itemId := "itemId"

var result *models_pkg.OrdersItemsResponse1
result,_ = orders.GetOrderItem(orderId, itemId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateOrderItem

UpdateOrderItem

func (me *ORDERS_IMPL) UpdateOrderItem(
            orderId string,
            itemId string,
            body *models_pkg.OrdersItemsRequest1,
            idempotencyKey *string)(*models_pkg.OrdersItemsResponse1,error)

Parameters

Parameter Tags Description
orderId Required Order Id
itemId Required Item Id
body Required Item Model
idempotencyKey Optional TODO: Add a parameter description

Example Usage

orderId := "orderId"
itemId := "itemId"
var body *models_pkg.OrdersItemsRequest1
idempotencyKey := "idempotency-key"

var result *models_pkg.OrdersItemsResponse1
result,_ = orders.UpdateOrderItem(orderId, itemId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetOrder

Gets an order

func (me *ORDERS_IMPL) GetOrder(orderId string)(*models_pkg.OrdersResponse1,error)

Parameters

Parameter Tags Description
orderId Required Order id

Example Usage

orderId := "order_id"

var result *models_pkg.OrdersResponse1
result,_ = orders.GetOrder(orderId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: plans_pkg

Get instance

Factory for the PLANS interface can be accessed from the package plans_pkg.

plans := plans_pkg.NewPLANS()

Method: UpdatePlanItem

Updates a plan item

func (me *PLANS_IMPL) UpdatePlanItem(
            planId string,
            planItemId string,
            body *models_pkg.PlansItemsRequest,
            idempotencyKey *string)(*models_pkg.PlansItemsResponse,error)

Parameters

Parameter Tags Description
planId Required Plan id
planItemId Required Plan item id
body Required Request for updating the plan item
idempotencyKey Optional TODO: Add a parameter description

Example Usage

planId := "plan_id"
planItemId := "plan_item_id"
var body *models_pkg.PlansItemsRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.PlansItemsResponse
result,_ = plans.UpdatePlanItem(planId, planItemId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeletePlanItem

Removes an item from a plan

func (me *PLANS_IMPL) DeletePlanItem(
            planId string,
            planItemId string,
            idempotencyKey *string)(*models_pkg.PlansItemsResponse,error)

Parameters

Parameter Tags Description
planId Required Plan id
planItemId Required Plan item id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

planId := "plan_id"
planItemId := "plan_item_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.PlansItemsResponse
result,_ = plans.DeletePlanItem(planId, planItemId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetPlanItem

Gets a plan item

func (me *PLANS_IMPL) GetPlanItem(
            planId string,
            planItemId string)(*models_pkg.PlansItemsResponse,error)

Parameters

Parameter Tags Description
planId Required Plan id
planItemId Required Plan item id

Example Usage

planId := "plan_id"
planItemId := "plan_item_id"

var result *models_pkg.PlansItemsResponse
result,_ = plans.GetPlanItem(planId, planItemId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreatePlanItem

Adds a new item to a plan

func (me *PLANS_IMPL) CreatePlanItem(
            planId string,
            body *models_pkg.PlansItemsRequest1,
            idempotencyKey *string)(*models_pkg.PlansItemsResponse,error)

Parameters

Parameter Tags Description
planId Required Plan id
body Required Request for creating a plan item
idempotencyKey Optional TODO: Add a parameter description

Example Usage

planId := "plan_id"
var body *models_pkg.PlansItemsRequest1
idempotencyKey := "idempotency-key"

var result *models_pkg.PlansItemsResponse
result,_ = plans.CreatePlanItem(planId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetPlans

Gets all plans

func (me *PLANS_IMPL) GetPlans(
            page *int64,
            size *int64,
            name *string,
            status *string,
            billingType *string,
            createdSince *time.Time,
            createdUntil *time.Time)(*models_pkg.PlansResponse,error)

Parameters

Parameter Tags Description
page Optional Page number
size Optional Page size
name Optional Filter for Plan's name
status Optional Filter for Plan's status
billingType Optional Filter for plan's billing type
createdSince Optional Filter for plan's creation date start range
createdUntil Optional Filter for plan's creation date end range

Example Usage

page,_ := strconv.ParseInt("179", 10, 8)
size,_ := strconv.ParseInt("179", 10, 8)
name := "name"
status := "status"
billingType := "billing_type"
createdSince := time.Now()
createdUntil := time.Now()

var result *models_pkg.PlansResponse
result,_ = plans.GetPlans(page, size, name, status, billingType, createdSince, createdUntil)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreatePlan

Creates a new plan

func (me *PLANS_IMPL) CreatePlan(
            body *models_pkg.PlansRequest,
            idempotencyKey *string)(*models_pkg.PlansResponse1,error)

Parameters

Parameter Tags Description
body Required Request for creating a plan
idempotencyKey Optional TODO: Add a parameter description

Example Usage

var body *models_pkg.PlansRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.PlansResponse1
result,_ = plans.CreatePlan(body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetPlan

Gets a plan

func (me *PLANS_IMPL) GetPlan(planId string)(*models_pkg.PlansResponse1,error)

Parameters

Parameter Tags Description
planId Required Plan id

Example Usage

planId := "plan_id"

var result *models_pkg.PlansResponse1
result,_ = plans.GetPlan(planId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdatePlan

Updates a plan

func (me *PLANS_IMPL) UpdatePlan(
            planId string,
            body *models_pkg.PlansRequest1,
            idempotencyKey *string)(*models_pkg.PlansResponse1,error)

Parameters

Parameter Tags Description
planId Required Plan id
body Required Request for updating a plan
idempotencyKey Optional TODO: Add a parameter description

Example Usage

planId := "plan_id"
var body *models_pkg.PlansRequest1
idempotencyKey := "idempotency-key"

var result *models_pkg.PlansResponse1
result,_ = plans.UpdatePlan(planId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeletePlan

Deletes a plan

func (me *PLANS_IMPL) DeletePlan(
            planId string,
            idempotencyKey *string)(*models_pkg.PlansResponse1,error)

Parameters

Parameter Tags Description
planId Required Plan id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

planId := "plan_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.PlansResponse1
result,_ = plans.DeletePlan(planId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdatePlanMetadata

Updates the metadata from a plan

func (me *PLANS_IMPL) UpdatePlanMetadata(
            planId string,
            body *models_pkg.PlansMetadataRequest,
            idempotencyKey *string)(*models_pkg.PlansMetadataResponse,error)

Parameters

Parameter Tags Description
planId Required The plan id
body Required Request for updating the plan metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

planId := "plan_id"
var body *models_pkg.PlansMetadataRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.PlansMetadataResponse
result,_ = plans.UpdatePlanMetadata(planId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: invoices_pkg

Get instance

Factory for the INVOICES interface can be accessed from the package invoices_pkg.

invoices := invoices_pkg.NewINVOICES()

Method: CreateInvoice

Create an Invoice

func (me *INVOICES_IMPL) CreateInvoice(
            subscriptionId string,
            cycleId string,
            idempotencyKey *string,
            body *models_pkg.SubscriptionsCyclesPayRequest)(*models_pkg.SubscriptionsCyclesPayResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id
cycleId Required Cycle Id
idempotencyKey Optional TODO: Add a parameter description
body Optional TODO: Add a parameter description

Example Usage

subscriptionId := "subscription_id"
cycleId := "cycle_id"
idempotencyKey := "idempotency-key"
var body *models_pkg.SubscriptionsCyclesPayRequest

var result *models_pkg.SubscriptionsCyclesPayResponse
result,_ = invoices.CreateInvoice(subscriptionId, cycleId, idempotencyKey, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetPartialInvoice

GetPartialInvoice

func (me *INVOICES_IMPL) GetPartialInvoice(subscriptionId string)(*models_pkg.SubscriptionsPartialInvoiceResponse,error)

Parameters

Parameter Tags Description
subscriptionId Required Subscription Id

Example Usage

subscriptionId := "subscription_id"

var result *models_pkg.SubscriptionsPartialInvoiceResponse
result,_ = invoices.GetPartialInvoice(subscriptionId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateInvoiceStatus

Updates the status from an invoice

func (me *INVOICES_IMPL) UpdateInvoiceStatus(
            invoiceId string,
            body *models_pkg.UpdateCurrentCycleStatusRequest,
            idempotencyKey *string)(*models_pkg.InvoicesStatusResponse,error)

Parameters

Parameter Tags Description
invoiceId Required Invoice Id
body Required Request for updating an invoice's status
idempotencyKey Optional TODO: Add a parameter description

Example Usage

invoiceId := "invoice_id"
var body *models_pkg.UpdateCurrentCycleStatusRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.InvoicesStatusResponse
result,_ = invoices.UpdateInvoiceStatus(invoiceId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetInvoice

Gets an invoice

func (me *INVOICES_IMPL) GetInvoice(invoiceId string)(*models_pkg.InvoicesResponse,error)

Parameters

Parameter Tags Description
invoiceId Required Invoice Id

Example Usage

invoiceId := "invoice_id"

var result *models_pkg.InvoicesResponse
result,_ = invoices.GetInvoice(invoiceId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CancelInvoice

Cancels an invoice

func (me *INVOICES_IMPL) CancelInvoice(
            invoiceId string,
            idempotencyKey *string)(*models_pkg.InvoicesResponse,error)

Parameters

Parameter Tags Description
invoiceId Required Invoice id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

invoiceId := "invoice_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.InvoicesResponse
result,_ = invoices.CancelInvoice(invoiceId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateInvoiceMetadata

Updates the metadata from an invoice

func (me *INVOICES_IMPL) UpdateInvoiceMetadata(
            invoiceId string,
            body *models_pkg.InvoicesMetadataRequest,
            idempotencyKey *string)(*models_pkg.InvoicesMetadataResponse,error)

Parameters

Parameter Tags Description
invoiceId Required The invoice id
body Required Request for updating the invoice metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

invoiceId := "invoice_id"
var body *models_pkg.InvoicesMetadataRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.InvoicesMetadataResponse
result,_ = invoices.UpdateInvoiceMetadata(invoiceId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetInvoices

Gets all invoices

func (me *INVOICES_IMPL) GetInvoices(
            page *int64,
            size *int64,
            code *string,
            customerId *string,
            subscriptionId *string,
            createdSince *time.Time,
            createdUntil *time.Time,
            status *string,
            dueSince *time.Time,
            dueUntil *time.Time,
            customerDocument *string)(*models_pkg.InvoicesResponse2,error)

Parameters

Parameter Tags Description
page Optional Page number
size Optional Page size
code Optional Filter for Invoice's code
customerId Optional Filter for Invoice's customer id
subscriptionId Optional Filter for Invoice's subscription id
createdSince Optional Filter for Invoice's creation date start range
createdUntil Optional Filter for Invoices creation date end range
status Optional Filter for Invoice's status
dueSince Optional Filter for Invoice's due date start range
dueUntil Optional Filter for Invoice's due date end range
customerDocument Optional Fillter for invoice's document

Example Usage

page,_ := strconv.ParseInt("179", 10, 8)
size,_ := strconv.ParseInt("179", 10, 8)
code := "code"
customerId := "customer_id"
subscriptionId := "subscription_id"
createdSince := time.Now()
createdUntil := time.Now()
status := "status"
dueSince := time.Now()
dueUntil := time.Now()
customerDocument := "customer_document"

var result *models_pkg.InvoicesResponse2
result,_ = invoices.GetInvoices(page, size, code, customerId, subscriptionId, createdSince, createdUntil, status, dueSince, dueUntil, customerDocument)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: customers_pkg

Get instance

Factory for the CUSTOMERS interface can be accessed from the package customers_pkg.

customers := customers_pkg.NewCUSTOMERS()

Method: CreateAccessToken

Creates a access token for a customer

func (me *CUSTOMERS_IMPL) CreateAccessToken(
            customerId string,
            body *models_pkg.CustomersAccessTokensRequest,
            idempotencyKey *string)(*models_pkg.CustomersAccessTokensResponse,error)

Parameters

Parameter Tags Description
customerId Required Customer Id
body Required Request for creating a access token
idempotencyKey Optional TODO: Add a parameter description

Example Usage

customerId := "customer_id"
var body *models_pkg.CustomersAccessTokensRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersAccessTokensResponse
result,_ = customers.CreateAccessToken(customerId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetAccessTokens

Get all access tokens from a customer

func (me *CUSTOMERS_IMPL) GetAccessTokens(
            customerId string,
            page *int64,
            size *int64)(*models_pkg.CustomersAccessTokensResponse1,error)

Parameters

Parameter Tags Description
customerId Required Customer Id
page Optional Page number
size Optional Page size

Example Usage

customerId := "customer_id"
page,_ := strconv.ParseInt("179", 10, 8)
size,_ := strconv.ParseInt("179", 10, 8)

var result *models_pkg.CustomersAccessTokensResponse1
result,_ = customers.GetAccessTokens(customerId, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateCustomer

Updates a customer

func (me *CUSTOMERS_IMPL) UpdateCustomer(
            customerId string,
            body *models_pkg.CustomersRequest,
            idempotencyKey *string)(*models_pkg.CustomersResponse,error)

Parameters

Parameter Tags Description
customerId Required Customer id
body Required Request for updating a customer
idempotencyKey Optional TODO: Add a parameter description

Example Usage

customerId := "customer_id"
var body *models_pkg.CustomersRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersResponse
result,_ = customers.UpdateCustomer(customerId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetCustomer

Get a customer

func (me *CUSTOMERS_IMPL) GetCustomer(customerId string)(*models_pkg.CustomersResponse,error)

Parameters

Parameter Tags Description
customerId Required Customer Id

Example Usage

customerId := "customer_id"

var result *models_pkg.CustomersResponse
result,_ = customers.GetCustomer(customerId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeleteAccessTokens

Delete a Customer's access tokens

func (me *CUSTOMERS_IMPL) DeleteAccessTokens(customerId string)(*models_pkg.CustomersAccessTokensResponse1,error)

Parameters

Parameter Tags Description
customerId Required Customer Id

Example Usage

customerId := "customer_id"

var result *models_pkg.CustomersAccessTokensResponse1
result,_ = customers.DeleteAccessTokens(customerId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetAddresses

Gets all adressess from a customer

func (me *CUSTOMERS_IMPL) GetAddresses(
            customerId string,
            page *int64,
            size *int64)(*models_pkg.CustomersAddressesResponse,error)

Parameters

Parameter Tags Description
customerId Required Customer id
page Optional Page number
size Optional Page size

Example Usage

customerId := "customer_id"
page,_ := strconv.ParseInt("179", 10, 8)
size,_ := strconv.ParseInt("179", 10, 8)

var result *models_pkg.CustomersAddressesResponse
result,_ = customers.GetAddresses(customerId, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateAddress

Creates a new address for a customer

func (me *CUSTOMERS_IMPL) CreateAddress(
            customerId string,
            body *models_pkg.CustomersAddressesRequest,
            idempotencyKey *string)(*models_pkg.CustomersAddressesResponse1,error)

Parameters

Parameter Tags Description
customerId Required Customer Id
body Required Request for creating an address
idempotencyKey Optional TODO: Add a parameter description

Example Usage

customerId := "customer_id"
var body *models_pkg.CustomersAddressesRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersAddressesResponse1
result,_ = customers.CreateAddress(customerId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetAccessToken

Get a Customer's access token

func (me *CUSTOMERS_IMPL) GetAccessToken(
            customerId string,
            tokenId string)(*models_pkg.CustomersAccessTokensResponse,error)

Parameters

Parameter Tags Description
customerId Required Customer Id
tokenId Required Token Id

Example Usage

customerId := "customer_id"
tokenId := "token_id"

var result *models_pkg.CustomersAccessTokensResponse
result,_ = customers.GetAccessToken(customerId, tokenId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeleteAccessToken

Delete a customer's access token

func (me *CUSTOMERS_IMPL) DeleteAccessToken(
            customerId string,
            tokenId string,
            idempotencyKey *string)(*models_pkg.CustomersAccessTokensResponse,error)

Parameters

Parameter Tags Description
customerId Required Customer Id
tokenId Required Token Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

customerId := "customer_id"
tokenId := "token_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersAccessTokensResponse
result,_ = customers.DeleteAccessToken(customerId, tokenId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetAddress

Get a customer's address

func (me *CUSTOMERS_IMPL) GetAddress(
            customerId string,
            addressId string)(*models_pkg.CustomersAddressesResponse1,error)

Parameters

Parameter Tags Description
customerId Required Customer id
addressId Required Address Id

Example Usage

customerId := "customer_id"
addressId := "address_id"

var result *models_pkg.CustomersAddressesResponse1
result,_ = customers.GetAddress(customerId, addressId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateAddress

Updates an address

func (me *CUSTOMERS_IMPL) UpdateAddress(
            customerId string,
            addressId string,
            body *models_pkg.CustomersAddressesRequest1,
            idempotencyKey *string)(*models_pkg.CustomersAddressesResponse1,error)

Parameters

Parameter Tags Description
customerId Required Customer Id
addressId Required Address Id
body Required Request for updating an address
idempotencyKey Optional TODO: Add a parameter description

Example Usage

customerId := "customer_id"
addressId := "address_id"
var body *models_pkg.CustomersAddressesRequest1
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersAddressesResponse1
result,_ = customers.UpdateAddress(customerId, addressId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeleteAddress

Delete a Customer's address

func (me *CUSTOMERS_IMPL) DeleteAddress(
            customerId string,
            addressId string,
            idempotencyKey *string)(*models_pkg.CustomersAddressesResponse1,error)

Parameters

Parameter Tags Description
customerId Required Customer Id
addressId Required Address Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

customerId := "customer_id"
addressId := "address_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersAddressesResponse1
result,_ = customers.DeleteAddress(customerId, addressId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateCard

Creates a new card for a customer

func (me *CUSTOMERS_IMPL) CreateCard(
            customerId string,
            body *models_pkg.CustomersCardsRequest,
            idempotencyKey *string)(*models_pkg.CustomersCardsResponse,error)

Parameters

Parameter Tags Description
customerId Required Customer id
body Required Request for creating a card
idempotencyKey Optional TODO: Add a parameter description

Example Usage

customerId := "customer_id"
var body *models_pkg.CustomersCardsRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersCardsResponse
result,_ = customers.CreateCard(customerId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetCards

Get all cards from a customer

func (me *CUSTOMERS_IMPL) GetCards(
            customerId string,
            page *int64,
            size *int64)(*models_pkg.CustomersCardsResponse1,error)

Parameters

Parameter Tags Description
customerId Required Customer Id
page Optional Page number
size Optional Page size

Example Usage

customerId := "customer_id"
page,_ := strconv.ParseInt("15", 10, 8)
size,_ := strconv.ParseInt("15", 10, 8)

var result *models_pkg.CustomersCardsResponse1
result,_ = customers.GetCards(customerId, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: RenewCard

Renew a card

func (me *CUSTOMERS_IMPL) RenewCard(
            customerId string,
            cardId string,
            idempotencyKey *string)(*models_pkg.CustomersCardsRenewResponse,error)

Parameters

Parameter Tags Description
customerId Required Customer id
cardId Required Card Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

customerId := "customer_id"
cardId := "card_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersCardsRenewResponse
result,_ = customers.RenewCard(customerId, cardId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateCustomer

Creates a new customer

func (me *CUSTOMERS_IMPL) CreateCustomer(
            body *models_pkg.CustomersRequest1,
            idempotencyKey *string)(*models_pkg.CustomersResponse,error)

Parameters

Parameter Tags Description
body Required Request for creating a customer
idempotencyKey Optional TODO: Add a parameter description

Example Usage

var body *models_pkg.CustomersRequest1
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersResponse
result,_ = customers.CreateCustomer(body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetCustomers

Get all Customers

func (me *CUSTOMERS_IMPL) GetCustomers(
            name *string,
            document *string,
            page *int64,
            size *int64,
            email *string,
            code *string)(*models_pkg.CustomersResponse3,error)

Parameters

Parameter Tags Description
name Optional Name of the Customer
document Optional Document of the Customer
page Optional DefaultValue Current page the the search
size Optional DefaultValue Quantity pages of the search
email Optional Customer's email
code Optional Customer's code

Example Usage

name := "name"
document := "document"
page,_ := strconv.ParseInt("1", 10, 8)
size,_ := strconv.ParseInt("10", 10, 8)
email := "email"
code := "Code"

var result *models_pkg.CustomersResponse3
result,_ = customers.GetCustomers(name, document, page, size, email, code)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateCustomerMetadata

Updates the metadata a customer

func (me *CUSTOMERS_IMPL) UpdateCustomerMetadata(
            customerId string,
            body *models_pkg.CustomersMetadataRequest,
            idempotencyKey *string)(*models_pkg.CustomersMetadataResponse,error)

Parameters

Parameter Tags Description
customerId Required The customer id
body Required Request for updating the customer metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

customerId := "customer_id"
var body *models_pkg.CustomersMetadataRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersMetadataResponse
result,_ = customers.UpdateCustomerMetadata(customerId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateCard

Updates a card

func (me *CUSTOMERS_IMPL) UpdateCard(
            customerId string,
            cardId string,
            body *models_pkg.CustomersCardsRequest1,
            idempotencyKey *string)(*models_pkg.CustomersCardsResponse,error)

Parameters

Parameter Tags Description
customerId Required Customer Id
cardId Required Card id
body Required Request for updating a card
idempotencyKey Optional TODO: Add a parameter description

Example Usage

customerId := "customer_id"
cardId := "card_id"
var body *models_pkg.CustomersCardsRequest1
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersCardsResponse
result,_ = customers.UpdateCard(customerId, cardId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: DeleteCard

Delete a customer's card

func (me *CUSTOMERS_IMPL) DeleteCard(
            customerId string,
            cardId string,
            idempotencyKey *string)(*models_pkg.CustomersCardsResponse,error)

Parameters

Parameter Tags Description
customerId Required Customer Id
cardId Required Card Id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

customerId := "customer_id"
cardId := "card_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.CustomersCardsResponse
result,_ = customers.DeleteCard(customerId, cardId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetCard

Get a customer's card

func (me *CUSTOMERS_IMPL) GetCard(
            customerId string,
            cardId string)(*models_pkg.CustomersCardsResponse,error)

Parameters

Parameter Tags Description
customerId Required Customer id
cardId Required Card id

Example Usage

customerId := "customer_id"
cardId := "card_id"

var result *models_pkg.CustomersCardsResponse
result,_ = customers.GetCard(customerId, cardId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: charges_pkg

Get instance

Factory for the CHARGES interface can be accessed from the package charges_pkg.

charges := charges_pkg.NewCHARGES()

Method: GetCharge

Get a charge from its id

func (me *CHARGES_IMPL) GetCharge(chargeId string)(*models_pkg.ChargesResponse,error)

Parameters

Parameter Tags Description
chargeId Required Charge id

Example Usage

chargeId := "charge_id"

var result *models_pkg.ChargesResponse
result,_ = charges.GetCharge(chargeId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CancelCharge

Cancel a charge

func (me *CHARGES_IMPL) CancelCharge(
            chargeId string,
            idempotencyKey *string,
            body *models_pkg.ChargesRequest)(*models_pkg.ChargesResponse,error)

Parameters

Parameter Tags Description
chargeId Required Charge id
idempotencyKey Optional TODO: Add a parameter description
body Optional Request for cancelling a charge

Example Usage

chargeId := "charge_id"
idempotencyKey := "idempotency-key"
var body *models_pkg.ChargesRequest

var result *models_pkg.ChargesResponse
result,_ = charges.CancelCharge(chargeId, idempotencyKey, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: ConfirmPayment

ConfirmPayment

func (me *CHARGES_IMPL) ConfirmPayment(
            chargeId string,
            idempotencyKey *string,
            body *models_pkg.CreateConfirmPaymentRequest)(*models_pkg.ChargesConfirmPaymentResponse,error)

Parameters

Parameter Tags Description
chargeId Required TODO: Add a parameter description
idempotencyKey Optional TODO: Add a parameter description
body Optional Request for confirm payment

Example Usage

chargeId := "charge_id"
idempotencyKey := "idempotency-key"
var body *models_pkg.CreateConfirmPaymentRequest

var result *models_pkg.ChargesConfirmPaymentResponse
result,_ = charges.ConfirmPayment(chargeId, idempotencyKey, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateChargeCard

Updates the card from a charge

func (me *CHARGES_IMPL) UpdateChargeCard(
            chargeId string,
            body *models_pkg.ChargesCardRequest,
            idempotencyKey *string)(*models_pkg.ChargesCardResponse,error)

Parameters

Parameter Tags Description
chargeId Required Charge id
body Required Request for updating a charge's card
idempotencyKey Optional TODO: Add a parameter description

Example Usage

chargeId := "charge_id"
var body *models_pkg.ChargesCardRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.ChargesCardResponse
result,_ = charges.UpdateChargeCard(chargeId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetCharges

Lists all charges

func (me *CHARGES_IMPL) GetCharges(
            page *int64,
            size *int64,
            code *string,
            status *string,
            paymentMethod *string,
            customerId *string,
            orderId *string,
            createdSince *time.Time,
            createdUntil *time.Time)(*models_pkg.ChargesResponse2,error)

Parameters

Parameter Tags Description
page Optional Page number
size Optional Page size
code Optional Filter for charge's code
status Optional Filter for charge's status
paymentMethod Optional Filter for charge's payment method
customerId Optional Filter for charge's customer id
orderId Optional Filter for charge's order id
createdSince Optional Filter for the beginning of the range for charge's creation
createdUntil Optional Filter for the end of the range for charge's creation

Example Usage

page,_ := strconv.ParseInt("15", 10, 8)
size,_ := strconv.ParseInt("15", 10, 8)
code := "code"
status := "status"
paymentMethod := "payment_method"
customerId := "customer_id"
orderId := "order_id"
createdSince := time.Now()
createdUntil := time.Now()

var result *models_pkg.ChargesResponse2
result,_ = charges.GetCharges(page, size, code, status, paymentMethod, customerId, orderId, createdSince, createdUntil)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: RetryCharge

Retries a charge

func (me *CHARGES_IMPL) RetryCharge(
            chargeId string,
            idempotencyKey *string)(*models_pkg.ChargesRetryResponse,error)

Parameters

Parameter Tags Description
chargeId Required Charge id
idempotencyKey Optional TODO: Add a parameter description

Example Usage

chargeId := "charge_id"
idempotencyKey := "idempotency-key"

var result *models_pkg.ChargesRetryResponse
result,_ = charges.RetryCharge(chargeId, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateChargePaymentMethod

Updates a charge's payment method

func (me *CHARGES_IMPL) UpdateChargePaymentMethod(
            chargeId string,
            body *models_pkg.ChargesPaymentMethodRequest,
            idempotencyKey *string)(*models_pkg.ChargesPaymentMethodResponse,error)

Parameters

Parameter Tags Description
chargeId Required Charge id
body Required Request for updating the payment method from a charge
idempotencyKey Optional TODO: Add a parameter description

Example Usage

chargeId := "charge_id"
var body *models_pkg.ChargesPaymentMethodRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.ChargesPaymentMethodResponse
result,_ = charges.UpdateChargePaymentMethod(chargeId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateChargeMetadata

Updates the metadata from a charge

func (me *CHARGES_IMPL) UpdateChargeMetadata(
            chargeId string,
            body *models_pkg.ChargesMetadataRequest,
            idempotencyKey *string)(*models_pkg.ChargesMetadataResponse,error)

Parameters

Parameter Tags Description
chargeId Required The charge id
body Required Request for updating the charge metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

chargeId := "charge_id"
var body *models_pkg.ChargesMetadataRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.ChargesMetadataResponse
result,_ = charges.UpdateChargeMetadata(chargeId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CaptureCharge

Captures a charge

func (me *CHARGES_IMPL) CaptureCharge(
            chargeId string,
            idempotencyKey *string,
            body *models_pkg.ChargesCaptureRequest)(*models_pkg.ChargesCaptureResponse,error)

Parameters

Parameter Tags Description
chargeId Required Charge id
idempotencyKey Optional TODO: Add a parameter description
body Optional Request for capturing a charge

Example Usage

chargeId := "charge_id"
idempotencyKey := "idempotency-key"
var body *models_pkg.ChargesCaptureRequest

var result *models_pkg.ChargesCaptureResponse
result,_ = charges.CaptureCharge(chargeId, idempotencyKey, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateChargeDueDate

Updates the due date from a charge

func (me *CHARGES_IMPL) UpdateChargeDueDate(
            chargeId string,
            body *models_pkg.ChargesDueDateRequest,
            idempotencyKey *string)(*models_pkg.ChargesDueDateResponse,error)

Parameters

Parameter Tags Description
chargeId Required Charge Id
body Required Request for updating the due date
idempotencyKey Optional TODO: Add a parameter description

Example Usage

chargeId := "charge_id"
var body *models_pkg.ChargesDueDateRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.ChargesDueDateResponse
result,_ = charges.UpdateChargeDueDate(chargeId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateCharge

Creates a new charge

func (me *CHARGES_IMPL) CreateCharge(
            body *models_pkg.ChargesRequest1,
            idempotencyKey *string)(*models_pkg.ChargesResponse,error)

Parameters

Parameter Tags Description
body Required Request for creating a charge
idempotencyKey Optional TODO: Add a parameter description

Example Usage

var body *models_pkg.ChargesRequest1
idempotencyKey := "idempotency-key"

var result *models_pkg.ChargesResponse
result,_ = charges.CreateCharge(body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetChargeTransactions

GetChargeTransactions

func (me *CHARGES_IMPL) GetChargeTransactions(
            chargeId string,
            page *int64,
            size *int64)(*models_pkg.ChargesTransactionsResponse,error)

Parameters

Parameter Tags Description
chargeId Required Charge Id
page Optional Page number
size Optional Page size

Example Usage

chargeId := "charge_id"
page,_ := strconv.ParseInt("15", 10, 8)
size,_ := strconv.ParseInt("15", 10, 8)

var result *models_pkg.ChargesTransactionsResponse
result,_ = charges.GetChargeTransactions(chargeId, page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetChargesSummary

GetChargesSummary

func (me *CHARGES_IMPL) GetChargesSummary(
            status string,
            createdSince *time.Time,
            createdUntil *time.Time)(*models_pkg.GetChargesSummaryResponse,error)

Parameters

Parameter Tags Description
status Required TODO: Add a parameter description
createdSince Optional TODO: Add a parameter description
createdUntil Optional TODO: Add a parameter description

Example Usage

status := "status"
createdSince := time.Now()
createdUntil := time.Now()

var result *models_pkg.GetChargesSummaryResponse
result,_ = charges.GetChargesSummary(status, createdSince, createdUntil)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: recipients_pkg

Get instance

Factory for the RECIPIENTS interface can be accessed from the package recipients_pkg.

recipients := recipients_pkg.NewRECIPIENTS()

Method: UpdateRecipientMetadata

Updates recipient metadata

func (me *RECIPIENTS_IMPL) UpdateRecipientMetadata(
            recipientId string,
            body *models_pkg.RecipientsMetadataRequest,
            idempotencyKey *string)(*models_pkg.RecipientsMetadataResponse,error)

Parameters

Parameter Tags Description
recipientId Required Recipient id
body Required Metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

recipientId := "recipient_id"
var body *models_pkg.RecipientsMetadataRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.RecipientsMetadataResponse
result,_ = recipients.UpdateRecipientMetadata(recipientId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateRecipientTransferSettings

UpdateRecipientTransferSettings

func (me *RECIPIENTS_IMPL) UpdateRecipientTransferSettings(
            recipientId string,
            body *models_pkg.UpdateTransferSettingsRequest,
            idempotencyKey *string)(*models_pkg.RecipientsTransferSettingsResponse,error)

Parameters

Parameter Tags Description
recipientId Required Recipient Identificator
body Required TODO: Add a parameter description
idempotencyKey Optional TODO: Add a parameter description

Example Usage

recipientId := "recipient_id"
var body *models_pkg.UpdateTransferSettingsRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.RecipientsTransferSettingsResponse
result,_ = recipients.UpdateRecipientTransferSettings(recipientId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetAnticipation

Gets an anticipation

func (me *RECIPIENTS_IMPL) GetAnticipation(
            recipientId string,
            anticipationId string)(*models_pkg.RecipientsAnticipationsResponse,error)

Parameters

Parameter Tags Description
recipientId Required Recipient id
anticipationId Required Anticipation id

Example Usage

recipientId := "recipient_id"
anticipationId := "anticipation_id"

var result *models_pkg.RecipientsAnticipationsResponse
result,_ = recipients.GetAnticipation(recipientId, anticipationId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetRecipients

Retrieves paginated recipients information

func (me *RECIPIENTS_IMPL) GetRecipients(
            page *int64,
            size *int64)(*models_pkg.RecipientsResponse,error)

Parameters

Parameter Tags Description
page Optional Page number
size Optional Page size

Example Usage

page,_ := strconv.ParseInt("15", 10, 8)
size,_ := strconv.ParseInt("15", 10, 8)

var result *models_pkg.RecipientsResponse
result,_ = recipients.GetRecipients(page, size)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateRecipient

Creates a new recipient

func (me *RECIPIENTS_IMPL) CreateRecipient(
            body *models_pkg.RecipientsRequest,
            idempotencyKey *string)(*models_pkg.RecipientsResponse1,error)

Parameters

Parameter Tags Description
body Required Recipient data
idempotencyKey Optional TODO: Add a parameter description

Example Usage

var body *models_pkg.RecipientsRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.RecipientsResponse1
result,_ = recipients.CreateRecipient(body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetBalance

Get balance information for a recipient

func (me *RECIPIENTS_IMPL) GetBalance(recipientId string)(*models_pkg.RecipientsBalanceResponse,error)

Parameters

Parameter Tags Description
recipientId Required Recipient id

Example Usage

recipientId := "recipient_id"

var result *models_pkg.RecipientsBalanceResponse
result,_ = recipients.GetBalance(recipientId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetAnticipations

Retrieves a paginated list of anticipations from a recipient

func (me *RECIPIENTS_IMPL) GetAnticipations(
            recipientId string,
            page *int64,
            size *int64,
            status *string,
            timeframe *string,
            paymentDateSince *time.Time,
            paymentDateUntil *time.Time,
            createdSince *time.Time,
            createdUntil *time.Time)(*models_pkg.RecipientsAnticipationsResponse1,error)

Parameters

Parameter Tags Description
recipientId Required Recipient id
page Optional Page number
size Optional Page size
status Optional Filter for anticipation status
timeframe Optional Filter for anticipation timeframe
paymentDateSince Optional Filter for start range for anticipation payment date
paymentDateUntil Optional Filter for end range for anticipation payment date
createdSince Optional Filter for start range for anticipation creation date
createdUntil Optional Filter for end range for anticipation creation date

Example Usage

recipientId := "recipient_id"
page,_ := strconv.ParseInt("15", 10, 8)
size,_ := strconv.ParseInt("15", 10, 8)
status := "status"
timeframe := "timeframe"
paymentDateSince := time.Now()
paymentDateUntil := time.Now()
createdSince := time.Now()
createdUntil := time.Now()

var result *models_pkg.RecipientsAnticipationsResponse1
result,_ = recipients.GetAnticipations(recipientId, page, size, status, timeframe, paymentDateSince, paymentDateUntil, createdSince, createdUntil)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateAnticipation

Creates an anticipation

func (me *RECIPIENTS_IMPL) CreateAnticipation(
            recipientId string,
            body *models_pkg.RecipientsAnticipationsRequest,
            idempotencyKey *string)(*models_pkg.RecipientsAnticipationsResponse,error)

Parameters

Parameter Tags Description
recipientId Required Recipient id
body Required Anticipation data
idempotencyKey Optional TODO: Add a parameter description

Example Usage

recipientId := "recipient_id"
var body *models_pkg.RecipientsAnticipationsRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.RecipientsAnticipationsResponse
result,_ = recipients.CreateAnticipation(recipientId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateRecipientDefaultBankAccount

Updates the default bank account from a recipient

func (me *RECIPIENTS_IMPL) UpdateRecipientDefaultBankAccount(
            recipientId string,
            body *models_pkg.RecipientsDefaultBankAccountRequest,
            idempotencyKey *string)(*models_pkg.RecipientsDefaultBankAccountResponse,error)

Parameters

Parameter Tags Description
recipientId Required Recipient id
body Required Bank account data
idempotencyKey Optional TODO: Add a parameter description

Example Usage

recipientId := "recipient_id"
var body *models_pkg.RecipientsDefaultBankAccountRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.RecipientsDefaultBankAccountResponse
result,_ = recipients.UpdateRecipientDefaultBankAccount(recipientId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetRecipient

Retrieves recipient information

func (me *RECIPIENTS_IMPL) GetRecipient(recipientId string)(*models_pkg.RecipientsResponse1,error)

Parameters

Parameter Tags Description
recipientId Required Recipiend id

Example Usage

recipientId := "recipient_id"

var result *models_pkg.RecipientsResponse1
result,_ = recipients.GetRecipient(recipientId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateRecipient

Updates a recipient

func (me *RECIPIENTS_IMPL) UpdateRecipient(
            recipientId string,
            body *models_pkg.RecipientsRequest1,
            idempotencyKey *string)(*models_pkg.RecipientsResponse1,error)

Parameters

Parameter Tags Description
recipientId Required Recipient id
body Required Recipient data
idempotencyKey Optional TODO: Add a parameter description

Example Usage

recipientId := "recipient_id"
var body *models_pkg.RecipientsRequest1
idempotencyKey := "idempotency-key"

var result *models_pkg.RecipientsResponse1
result,_ = recipients.UpdateRecipient(recipientId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetTransfer

Gets a transfer

func (me *RECIPIENTS_IMPL) GetTransfer(
            recipientId string,
            transferId string)(*models_pkg.RecipientsTransfersResponse,error)

Parameters

Parameter Tags Description
recipientId Required Recipient id
transferId Required Transfer id

Example Usage

recipientId := "recipient_id"
transferId := "transfer_id"

var result *models_pkg.RecipientsTransfersResponse
result,_ = recipients.GetTransfer(recipientId, transferId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetTransfers

Gets a paginated list of transfers for the recipient

func (me *RECIPIENTS_IMPL) GetTransfers(
            recipientId string,
            page *int64,
            size *int64,
            status *string,
            createdSince *time.Time,
            createdUntil *time.Time)(*models_pkg.RecipientsTransfersResponse1,error)

Parameters

Parameter Tags Description
recipientId Required Recipient id
page Optional Page number
size Optional Page size
status Optional Filter for transfer status
createdSince Optional Filter for start range of transfer creation date
createdUntil Optional Filter for end range of transfer creation date

Example Usage

recipientId := "recipient_id"
page,_ := strconv.ParseInt("15", 10, 8)
size,_ := strconv.ParseInt("15", 10, 8)
status := "status"
createdSince := time.Now()
createdUntil := time.Now()

var result *models_pkg.RecipientsTransfersResponse1
result,_ = recipients.GetTransfers(recipientId, page, size, status, createdSince, createdUntil)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateTransfer

Creates a transfer for a recipient

func (me *RECIPIENTS_IMPL) CreateTransfer(
            recipientId string,
            body *models_pkg.RecipientsTransfersRequest,
            idempotencyKey *string)(*models_pkg.RecipientsTransfersResponse,error)

Parameters

Parameter Tags Description
recipientId Required Recipient Id
body Required Transfer data
idempotencyKey Optional TODO: Add a parameter description

Example Usage

recipientId := "recipient_id"
var body *models_pkg.RecipientsTransfersRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.RecipientsTransfersResponse
result,_ = recipients.CreateTransfer(recipientId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetAnticipationLimits

Gets the anticipation limits for a recipient

func (me *RECIPIENTS_IMPL) GetAnticipationLimits(
            recipientId string,
            timeframe string,
            paymentDate *time.Time)(*models_pkg.RecipientsAnticipationLimitsResponse,error)

Parameters

Parameter Tags Description
recipientId Required Recipient id
timeframe Required Timeframe
paymentDate Required Anticipation payment date

Example Usage

recipientId := "recipient_id"
timeframe := "timeframe"
paymentDate := time.Now()

var result *models_pkg.RecipientsAnticipationLimitsResponse
result,_ = recipients.GetAnticipationLimits(recipientId, timeframe, paymentDate)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: CreateWithdraw

CreateWithdraw

func (me *RECIPIENTS_IMPL) CreateWithdraw(
            recipientId string,
            body *models_pkg.CreateWithdrawRequest)(*models_pkg.GetWithdrawResponse,error)

Parameters

Parameter Tags Description
recipientId Required TODO: Add a parameter description
body Required TODO: Add a parameter description

Example Usage

recipientId := "recipient_id"
var body *models_pkg.CreateWithdrawRequest

var result *models_pkg.GetWithdrawResponse
result,_ = recipients.CreateWithdraw(recipientId, body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetWithdrawals

Gets a paginated list of transfers for the recipient

func (me *RECIPIENTS_IMPL) GetWithdrawals(
            recipientId string,
            page *int64,
            size *int64,
            status *string,
            createdSince *time.Time,
            createdUntil *time.Time)(*models_pkg.ListWithdrawals,error)

Parameters

Parameter Tags Description
recipientId Required TODO: Add a parameter description
page Optional TODO: Add a parameter description
size Optional TODO: Add a parameter description
status Optional TODO: Add a parameter description
createdSince Optional TODO: Add a parameter description
createdUntil Optional TODO: Add a parameter description

Example Usage

recipientId := "recipient_id"
page,_ := strconv.ParseInt("15", 10, 8)
size,_ := strconv.ParseInt("15", 10, 8)
status := "status"
createdSince := time.Now()
createdUntil := time.Now()

var result *models_pkg.ListWithdrawals
result,_ = recipients.GetWithdrawals(recipientId, page, size, status, createdSince, createdUntil)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetWithdrawById

GetWithdrawById

func (me *RECIPIENTS_IMPL) GetWithdrawById(
            recipientId string,
            withdrawalId string)(*models_pkg.GetWithdrawResponse,error)

Parameters

Parameter Tags Description
recipientId Required TODO: Add a parameter description
withdrawalId Required TODO: Add a parameter description

Example Usage

recipientId := "recipient_id"
withdrawalId := "withdrawal_id"

var result *models_pkg.GetWithdrawResponse
result,_ = recipients.GetWithdrawById(recipientId, withdrawalId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: UpdateAutomaticAnticipationSettings

Updates recipient metadata

func (me *RECIPIENTS_IMPL) UpdateAutomaticAnticipationSettings(
            recipientId string,
            body *models_pkg.UpdateAutomaticAnticipationSettingsRequest,
            idempotencyKey *string)(*models_pkg.RecipientsAutomaticAnticipationSettingsResponse,error)

Parameters

Parameter Tags Description
recipientId Required Recipient id
body Required Metadata
idempotencyKey Optional TODO: Add a parameter description

Example Usage

recipientId := "recipient_id"
var body *models_pkg.UpdateAutomaticAnticipationSettingsRequest
idempotencyKey := "idempotency-key"

var result *models_pkg.RecipientsAutomaticAnticipationSettingsResponse
result,_ = recipients.UpdateAutomaticAnticipationSettings(recipientId, body, idempotencyKey)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetRecipientByCode

Retrieves recipient information

func (me *RECIPIENTS_IMPL) GetRecipientByCode(code string)(*models_pkg.RecipientsCodeResponse,error)

Parameters

Parameter Tags Description
code Required Recipient code

Example Usage

code := "code"

var result *models_pkg.RecipientsCodeResponse
result,_ = recipients.GetRecipientByCode(code)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: tokens_pkg

Get instance

Factory for the TOKENS interface can be accessed from the package tokens_pkg.

tokens := tokens_pkg.NewTOKENS()

Method: CreateToken

Tags: Skips Authentication

CreateToken

func (me *TOKENS_IMPL) CreateToken(
            publicKey string,
            body *models_pkg.TokensRequest,
            idempotencyKey *string,
            appId *string)(*models_pkg.TokensResponse,error)

Parameters

Parameter Tags Description
publicKey Required Public key
body Required Request for creating a token
idempotencyKey Optional TODO: Add a parameter description
appId Optional TODO: Add a parameter description

Example Usage

publicKey := "public_key"
var body *models_pkg.TokensRequest
idempotencyKey := "idempotency-key"
appId := "appId"

var result *models_pkg.TokensResponse
result,_ = tokens.CreateToken(publicKey, body, idempotencyKey, appId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetToken

Tags: Skips Authentication

Gets a token from its id

func (me *TOKENS_IMPL) GetToken(
            id string,
            publicKey string,
            appId *string)(*models_pkg.TokensResponse,error)

Parameters

Parameter Tags Description
id Required Token id
publicKey Required Public key
appId Optional TODO: Add a parameter description

Example Usage

id := "id"
publicKey := "public_key"
appId := "appId"

var result *models_pkg.TokensResponse
result,_ = tokens.GetToken(id, publicKey, appId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: transactions_pkg

Get instance

Factory for the TRANSACTIONS interface can be accessed from the package transactions_pkg.

transactions := transactions_pkg.NewTRANSACTIONS()

Method: GetTransaction

GetTransaction

func (me *TRANSACTIONS_IMPL) GetTransaction(transactionId string)(*models_pkg.GetTransactionResponse,error)

Parameters

Parameter Tags Description
transactionId Required TODO: Add a parameter description

Example Usage

transactionId := "transaction_id"

var result *models_pkg.GetTransactionResponse
result,_ = transactions.GetTransaction(transactionId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

Class: transfers_pkg

Get instance

Factory for the TRANSFERS interface can be accessed from the package transfers_pkg.

transfers := transfers_pkg.NewTRANSFERS()

Method: PostCreateTransfer

CreateTransfer

func (me *TRANSFERS_IMPL) PostCreateTransfer(body *models_pkg.CreateTransfer)(*models_pkg.GetTransfer,error)

Parameters

Parameter Tags Description
body Required TODO: Add a parameter description

Example Usage

var body *models_pkg.CreateTransfer

var result *models_pkg.GetTransfer
result,_ = transfers.PostCreateTransfer(body)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetTransferById

GetTransferById

func (me *TRANSFERS_IMPL) GetTransferById(transferId string)(*models_pkg.GetTransfer,error)

Parameters

Parameter Tags Description
transferId Required TODO: Add a parameter description

Example Usage

transferId := "transfer_id"

var result *models_pkg.GetTransfer
result,_ = transfers.GetTransferById(transferId)

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Method: GetTransfers1

Gets all transfers

func (me *TRANSFERS_IMPL) GetTransfers1()(*models_pkg.ListTransfers,error)

Example Usage

var result *models_pkg.ListTransfers
result,_ = transfers.GetTransfers1()

Errors

Error Code Error Description
400 Invalid request
401 Invalid API key
404 An informed resource was not found
412 Business validation error
422 Contract validation error
500 Internal server error

Back to List of Controllers

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages