Mundipagg API
- In order to successfully build and run your SDK files, you are required to have the following setup in your system:
- Go (Visit https://golang.org/doc/install for more details on how to install Go)
- Java VM Version 8 or later
- Eclipse 4.6 (Neon) or later (http://www.eclipse.org/neon/)
- GoClipse setup within above installed Eclipse (Follow the instructions at this link to setup GoClipse)
- 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:
- Open eclipse in the Go language perspective and click on the
Import
option inFile
menu.
- Select
General -> Existing Projects into Workspace
option from the tree list.
- In
Select root directory
, provide path to the unzipped archive for the generated code. Once the path is set and the Project becomes visible underProjects
clickFinish
- The Go library will be imported and its files will be visible in the Project Explorer
The following section explains how to use the MundiapiLib library in a new project.
Create a new project in Eclipse by File
-> New
-> Go Project
Name the Project as Test
and click Finish
Create a new directory in the src
directory of this project
Name it test.com
Now create a new file inside src/test.com
Name it testsdk.go
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.
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
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.
Append the library path to this GOPATH
Once the path is appended, click on OK
Right click on the project name and click on Build Project
If the build is successful, right click on your Go file and click on Run As
-> Go Application
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.
- subscriptions_pkg
- orders_pkg
- plans_pkg
- invoices_pkg
- customers_pkg
- charges_pkg
- recipients_pkg
- tokens_pkg
- transactions_pkg
- transfers_pkg
Factory for the SUBSCRIPTIONS
interface can be accessed from the package subscriptions_pkg.
subscriptions := subscriptions_pkg.NewSUBSCRIPTIONS()
Creates a discount
func (me *SUBSCRIPTIONS_IMPL) CreateDiscount(
subscriptionId string,
body *models_pkg.SubscriptionsDiscountsRequest,
idempotencyKey *string)(*models_pkg.SubscriptionsDiscountsResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
body | Required |
Request for creating a discount |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsDiscountsRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.SubscriptionsDiscountsResponse
result,_ = subscriptions.CreateDiscount(subscriptionId, body, idempotencyKey)
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 |
Get Subscription Item
func (me *SUBSCRIPTIONS_IMPL) GetSubscriptionItem(
subscriptionId string,
itemId string)(*models_pkg.GetSubscriptionItemResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
itemId | Required |
Item id |
subscriptionId := "subscription_id"
itemId := "item_id"
var result *models_pkg.GetSubscriptionItemResponse
result,_ = subscriptions.GetSubscriptionItem(subscriptionId, itemId)
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 |
Updates a subscription item
func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionItem(
subscriptionId string,
itemId string,
body *models_pkg.SubscriptionsItemsRequest,
idempotencyKey *string)(*models_pkg.GetSubscriptionItemResponse,error)
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 |
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)
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 |
Deletes a usage
func (me *SUBSCRIPTIONS_IMPL) DeleteUsage(
subscriptionId string,
itemId string,
usageId string,
idempotencyKey *string)(*models_pkg.SubscriptionsItemsUsagesUsageIdResponse,error)
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 |
subscriptionId := "subscription_id"
itemId := "item_id"
usageId := "usage_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.SubscriptionsItemsUsagesUsageIdResponse
result,_ = subscriptions.DeleteUsage(subscriptionId, itemId, usageId, idempotencyKey)
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 |
Cancels a subscription
func (me *SUBSCRIPTIONS_IMPL) CancelSubscription(
subscriptionId string,
idempotencyKey *string,
body *models_pkg.SubscriptionsRequest)(*models_pkg.GetSubscriptionResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
idempotencyKey | Optional |
TODO: Add a parameter description |
body | Optional |
Request for cancelling a subscription |
subscriptionId := "subscription_id"
idempotencyKey := "idempotency-key"
var body *models_pkg.SubscriptionsRequest
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.CancelSubscription(subscriptionId, idempotencyKey, body)
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 |
Gets a subscription
func (me *SUBSCRIPTIONS_IMPL) GetSubscription(subscriptionId string)(*models_pkg.GetSubscriptionResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
subscriptionId := "subscription_id"
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.GetSubscription(subscriptionId)
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 |
Deletes a increment
func (me *SUBSCRIPTIONS_IMPL) DeleteIncrement(
subscriptionId string,
incrementId string,
idempotencyKey *string)(*models_pkg.SubscriptionsIncrementsResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
incrementId | Required |
Increment id |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
incrementId := "increment_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.SubscriptionsIncrementsResponse
result,_ = subscriptions.DeleteIncrement(subscriptionId, incrementId, idempotencyKey)
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 |
GetIncrementById
func (me *SUBSCRIPTIONS_IMPL) GetIncrementById(
subscriptionId string,
incrementId string)(*models_pkg.SubscriptionsIncrementsResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription Id |
incrementId | Required |
The increment Id |
subscriptionId := "subscription_id"
incrementId := "increment_id"
var result *models_pkg.SubscriptionsIncrementsResponse
result,_ = subscriptions.GetIncrementById(subscriptionId, incrementId)
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 |
GetSubscriptionCycleById
func (me *SUBSCRIPTIONS_IMPL) GetSubscriptionCycleById(
subscriptionId string,
cycleId string)(*models_pkg.SubscriptionsCyclesResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
cycleId | Required |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
cycleId := "cycleId"
var result *models_pkg.SubscriptionsCyclesResponse
result,_ = subscriptions.GetSubscriptionCycleById(subscriptionId, cycleId)
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 |
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)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
body | Required |
Request for updating the subscription start date |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsStartAtRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionStartAt(subscriptionId, body, idempotencyKey)
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 |
Updates the payment method from a subscription
func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionPaymentMethod(
subscriptionId string,
body *models_pkg.SubscriptionsPaymentMethodRequest,
idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
body | Required |
Request for updating the paymentmethod from a subscription |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsPaymentMethodRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionPaymentMethod(subscriptionId, body, idempotencyKey)
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 |
UpdateCurrentCycleStatus
func (me *SUBSCRIPTIONS_IMPL) UpdateCurrentCycleStatus(
subscriptionId string,
body *models_pkg.UpdateCurrentCycleStatusRequest,
idempotencyKey *string)(,error)
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 |
subscriptionId := "subscription_id"
var body *models_pkg.UpdateCurrentCycleStatusRequest
idempotencyKey := "idempotency-key"
var result
result,_ = subscriptions.UpdateCurrentCycleStatus(subscriptionId, body, idempotencyKey)
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 |
Creates a new subscription
func (me *SUBSCRIPTIONS_IMPL) CreateSubscription(
body *models_pkg.SubscriptionsRequest1,
idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a subscription |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body *models_pkg.SubscriptionsRequest1
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.CreateSubscription(body, idempotencyKey)
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 |
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)
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 |
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)
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 |
GetUsagesDetails
func (me *SUBSCRIPTIONS_IMPL) GetUsagesDetails(
subscriptionId string,
cycleId *string,
size *int64,
page *int64,
itemId *string,
group *string)(*models_pkg.GetUsagesDetailsResponse,error)
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 |
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)
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 |
RenewSubscription
func (me *SUBSCRIPTIONS_IMPL) RenewSubscription(
subscriptionId string,
idempotencyKey *string)(*models_pkg.SubscriptionsCyclesResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
TODO: Add a parameter description |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.SubscriptionsCyclesResponse
result,_ = subscriptions.RenewSubscription(subscriptionId, idempotencyKey)
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 |
GetSubscriptionCycles
func (me *SUBSCRIPTIONS_IMPL) GetSubscriptionCycles(
subscriptionId string,
page string,
size string)(*models_pkg.SubscriptionsCyclesResponse2,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
page | Required |
Page number |
size | Required |
Page size |
subscriptionId := "subscription_id"
page := "page"
size := "size"
var result *models_pkg.SubscriptionsCyclesResponse2
result,_ = subscriptions.GetSubscriptionCycles(subscriptionId, page, size)
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 |
Create Usage
func (me *SUBSCRIPTIONS_IMPL) CreateAnUsage(
subscriptionId string,
itemId string,
idempotencyKey *string)(*models_pkg.SubscriptionsItemsUsagesResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
itemId | Required |
Item id |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
itemId := "item_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.SubscriptionsItemsUsagesResponse
result,_ = subscriptions.CreateAnUsage(subscriptionId, itemId, idempotencyKey)
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 |
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)
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 |
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)
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 |
Deletes a discount
func (me *SUBSCRIPTIONS_IMPL) DeleteDiscount(
subscriptionId string,
discountId string,
idempotencyKey *string)(*models_pkg.SubscriptionsDiscountsResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
discountId | Required |
Discount Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
discountId := "discount_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.SubscriptionsDiscountsResponse
result,_ = subscriptions.DeleteDiscount(subscriptionId, discountId, idempotencyKey)
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 |
GetIncrements
func (me *SUBSCRIPTIONS_IMPL) GetIncrements(
subscriptionId string,
page *int64,
size *int64)(*models_pkg.ListIncrementsResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
page | Optional |
Page number |
size | Optional |
Page size |
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)
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 |
Creates a new Subscription item
func (me *SUBSCRIPTIONS_IMPL) CreateSubscriptionItem(
subscriptionId string,
body *models_pkg.SubscriptionsItemsRequest1,
idempotencyKey *string)(*models_pkg.GetSubscriptionItemResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
body | Required |
Request for creating a subscription item |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsItemsRequest1
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionItemResponse
result,_ = subscriptions.CreateSubscriptionItem(subscriptionId, body, idempotencyKey)
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 |
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)
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 |
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)
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 |
Updates the billing date from a subscription
func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionBillingDate(
subscriptionId string,
body *models_pkg.SubscriptionsBillingDateRequest,
idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
body | Required |
Request for updating the subscription billing date |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsBillingDateRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionBillingDate(subscriptionId, body, idempotencyKey)
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 |
UpdateLatestPeriodEndAt
func (me *SUBSCRIPTIONS_IMPL) UpdateLatestPeriodEndAt(
subscriptionId string,
body *models_pkg.SubscriptionsPeriodsLatestEndAtRequest,
idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)
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 |
subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsPeriodsLatestEndAtRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateLatestPeriodEndAt(subscriptionId, body, idempotencyKey)
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 |
UpdateSubscriptionAffiliationId
func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionAffiliationId(
subscriptionId string,
body *models_pkg.SubscriptionsGatewayAffiliationIdRequest,
idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)
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 |
subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsGatewayAffiliationIdRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionAffiliationId(subscriptionId, body, idempotencyKey)
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 |
Deletes a subscription item
func (me *SUBSCRIPTIONS_IMPL) DeleteSubscriptionItem(
subscriptionId string,
subscriptionItemId string,
idempotencyKey *string)(*models_pkg.GetSubscriptionItemResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
subscriptionItemId | Required |
Subscription item id |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
subscriptionItemId := "subscription_item_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionItemResponse
result,_ = subscriptions.DeleteSubscriptionItem(subscriptionId, subscriptionItemId, idempotencyKey)
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 |
Updates the credit card from a subscription
func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionCard(
subscriptionId string,
body *models_pkg.SubscriptionsCardRequest,
idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
body | Required |
Request for updating a card |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsCardRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionCard(subscriptionId, body, idempotencyKey)
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 |
Updates the metadata from a subscription
func (me *SUBSCRIPTIONS_IMPL) UpdateSubscriptionMetadata(
subscriptionId string,
body *models_pkg.SubscriptionsMetadataRequest,
idempotencyKey *string)(*models_pkg.GetSubscriptionResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
body | Required |
Request for updating the subscrption metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsMetadataRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionMetadata(subscriptionId, body, idempotencyKey)
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 |
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)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
body | Required |
TODO: Add a parameter description |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
var body *models_pkg.UpdateSubscriptionDueDaysRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionDueDays(subscriptionId, body, idempotencyKey)
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 |
GetDiscounts
func (me *SUBSCRIPTIONS_IMPL) GetDiscounts(
subscriptionId string,
page int64,
size int64)(*models_pkg.ListDiscountsResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
page | Required |
Page number |
size | Required |
Page size |
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)
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 |
Creates a increment
func (me *SUBSCRIPTIONS_IMPL) CreateIncrement(
subscriptionId string,
body *models_pkg.SubscriptionsIncrementsRequest,
idempotencyKey *string)(*models_pkg.SubscriptionsIncrementsResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription id |
body | Required |
Request for creating a increment |
idempotencyKey | Optional |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsIncrementsRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.SubscriptionsIncrementsResponse
result,_ = subscriptions.CreateIncrement(subscriptionId, body, idempotencyKey)
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 |
GetDiscountById
func (me *SUBSCRIPTIONS_IMPL) GetDiscountById(
subscriptionId string,
discountId string)(*models_pkg.SubscriptionsDiscountsResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription id |
discountId | Required |
TODO: Add a parameter description |
subscriptionId := "subscription_id"
discountId := "discountId"
var result *models_pkg.SubscriptionsDiscountsResponse
result,_ = subscriptions.GetDiscountById(subscriptionId, discountId)
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 |
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)
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 |
subscriptionId := "subscription_id"
var body *models_pkg.SubscriptionsMinimumPriceRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSubscriptionMiniumPrice(subscriptionId, body, idempotencyKey)
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 |
GetUsageReport
func (me *SUBSCRIPTIONS_IMPL) GetUsageReport(
subscriptionId string,
periodId string)(*models_pkg.GetUsageReportResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
The subscription Id |
periodId | Required |
The period Id |
subscriptionId := "subscription_id"
periodId := "period_id"
var result *models_pkg.GetUsageReportResponse
result,_ = subscriptions.GetUsageReport(subscriptionId, periodId)
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 |
UpdateSplitSubscription
func (me *SUBSCRIPTIONS_IMPL) UpdateSplitSubscription(
id string,
body *models_pkg.UpdateSubscriptionSplitRequest)(*models_pkg.GetSubscriptionResponse,error)
Parameter | Tags | Description |
---|---|---|
id | Required |
Subscription's id |
body | Required |
TODO: Add a parameter description |
id := "id"
var body *models_pkg.UpdateSubscriptionSplitRequest
var result *models_pkg.GetSubscriptionResponse
result,_ = subscriptions.UpdateSplitSubscription(id, body)
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 |
Factory for the ORDERS
interface can be accessed from the package orders_pkg.
orders := orders_pkg.NewORDERS()
UpdateOrderStatus
func (me *ORDERS_IMPL) UpdateOrderStatus(
id string,
body *models_pkg.UpdateOrderStatusRequest,
idempotencyKey *string)(*models_pkg.OrdersClosedResponse,error)
Parameter | Tags | Description |
---|---|---|
id | Required |
Order Id |
body | Required |
Update Order Model |
idempotencyKey | Optional |
TODO: Add a parameter description |
id := "id"
var body *models_pkg.UpdateOrderStatusRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.OrdersClosedResponse
result,_ = orders.UpdateOrderStatus(id, body, idempotencyKey)
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 |
DeleteAllOrderItems
func (me *ORDERS_IMPL) DeleteAllOrderItems(
orderId string,
idempotencyKey *string)(*models_pkg.OrdersItemsResponse,error)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
orderId := "orderId"
idempotencyKey := "idempotency-key"
var result *models_pkg.OrdersItemsResponse
result,_ = orders.DeleteAllOrderItems(orderId, idempotencyKey)
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 |
CreateOrderItem
func (me *ORDERS_IMPL) CreateOrderItem(
orderId string,
body *models_pkg.OrdersItemsRequest,
idempotencyKey *string)(*models_pkg.OrdersItemsResponse1,error)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order Id |
body | Required |
Order Item Model |
idempotencyKey | Optional |
TODO: Add a parameter description |
orderId := "orderId"
var body *models_pkg.OrdersItemsRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.OrdersItemsResponse1
result,_ = orders.CreateOrderItem(orderId, body, idempotencyKey)
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 |
Updates the metadata from an order
func (me *ORDERS_IMPL) UpdateOrderMetadata(
orderId string,
body *models_pkg.OrdersMetadataRequest,
idempotencyKey *string)(*models_pkg.OrdersMetadataResponse,error)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
The order id |
body | Required |
Request for updating the order metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
orderId := "order_id"
var body *models_pkg.OrdersMetadataRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.OrdersMetadataResponse
result,_ = orders.UpdateOrderMetadata(orderId, body, idempotencyKey)
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 |
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)
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 |
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)
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 |
Creates a new Order
func (me *ORDERS_IMPL) CreateOrder(
body *models_pkg.OrdersRequest,
idempotencyKey *string)(*models_pkg.OrdersResponse1,error)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating an order |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body *models_pkg.OrdersRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.OrdersResponse1
result,_ = orders.CreateOrder(body, idempotencyKey)
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 |
DeleteOrderItem
func (me *ORDERS_IMPL) DeleteOrderItem(
orderId string,
itemId string,
idempotencyKey *string)(*models_pkg.OrdersItemsResponse1,error)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order Id |
itemId | Required |
Item Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
orderId := "orderId"
itemId := "itemId"
idempotencyKey := "idempotency-key"
var result *models_pkg.OrdersItemsResponse1
result,_ = orders.DeleteOrderItem(orderId, itemId, idempotencyKey)
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 |
GetOrderItem
func (me *ORDERS_IMPL) GetOrderItem(
orderId string,
itemId string)(*models_pkg.OrdersItemsResponse1,error)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order Id |
itemId | Required |
Item Id |
orderId := "orderId"
itemId := "itemId"
var result *models_pkg.OrdersItemsResponse1
result,_ = orders.GetOrderItem(orderId, itemId)
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 |
UpdateOrderItem
func (me *ORDERS_IMPL) UpdateOrderItem(
orderId string,
itemId string,
body *models_pkg.OrdersItemsRequest1,
idempotencyKey *string)(*models_pkg.OrdersItemsResponse1,error)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order Id |
itemId | Required |
Item Id |
body | Required |
Item Model |
idempotencyKey | Optional |
TODO: Add a parameter description |
orderId := "orderId"
itemId := "itemId"
var body *models_pkg.OrdersItemsRequest1
idempotencyKey := "idempotency-key"
var result *models_pkg.OrdersItemsResponse1
result,_ = orders.UpdateOrderItem(orderId, itemId, body, idempotencyKey)
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 |
Gets an order
func (me *ORDERS_IMPL) GetOrder(orderId string)(*models_pkg.OrdersResponse1,error)
Parameter | Tags | Description |
---|---|---|
orderId | Required |
Order id |
orderId := "order_id"
var result *models_pkg.OrdersResponse1
result,_ = orders.GetOrder(orderId)
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 |
Factory for the PLANS
interface can be accessed from the package plans_pkg.
plans := plans_pkg.NewPLANS()
Updates a plan item
func (me *PLANS_IMPL) UpdatePlanItem(
planId string,
planItemId string,
body *models_pkg.PlansItemsRequest,
idempotencyKey *string)(*models_pkg.PlansItemsResponse,error)
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 |
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)
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 |
Removes an item from a plan
func (me *PLANS_IMPL) DeletePlanItem(
planId string,
planItemId string,
idempotencyKey *string)(*models_pkg.PlansItemsResponse,error)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
planItemId | Required |
Plan item id |
idempotencyKey | Optional |
TODO: Add a parameter description |
planId := "plan_id"
planItemId := "plan_item_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.PlansItemsResponse
result,_ = plans.DeletePlanItem(planId, planItemId, idempotencyKey)
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 |
Gets a plan item
func (me *PLANS_IMPL) GetPlanItem(
planId string,
planItemId string)(*models_pkg.PlansItemsResponse,error)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
planItemId | Required |
Plan item id |
planId := "plan_id"
planItemId := "plan_item_id"
var result *models_pkg.PlansItemsResponse
result,_ = plans.GetPlanItem(planId, planItemId)
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 |
Adds a new item to a plan
func (me *PLANS_IMPL) CreatePlanItem(
planId string,
body *models_pkg.PlansItemsRequest1,
idempotencyKey *string)(*models_pkg.PlansItemsResponse,error)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
body | Required |
Request for creating a plan item |
idempotencyKey | Optional |
TODO: Add a parameter description |
planId := "plan_id"
var body *models_pkg.PlansItemsRequest1
idempotencyKey := "idempotency-key"
var result *models_pkg.PlansItemsResponse
result,_ = plans.CreatePlanItem(planId, body, idempotencyKey)
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 |
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)
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 |
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)
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 |
Creates a new plan
func (me *PLANS_IMPL) CreatePlan(
body *models_pkg.PlansRequest,
idempotencyKey *string)(*models_pkg.PlansResponse1,error)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a plan |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body *models_pkg.PlansRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.PlansResponse1
result,_ = plans.CreatePlan(body, idempotencyKey)
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 |
Gets a plan
func (me *PLANS_IMPL) GetPlan(planId string)(*models_pkg.PlansResponse1,error)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
planId := "plan_id"
var result *models_pkg.PlansResponse1
result,_ = plans.GetPlan(planId)
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 |
Updates a plan
func (me *PLANS_IMPL) UpdatePlan(
planId string,
body *models_pkg.PlansRequest1,
idempotencyKey *string)(*models_pkg.PlansResponse1,error)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
body | Required |
Request for updating a plan |
idempotencyKey | Optional |
TODO: Add a parameter description |
planId := "plan_id"
var body *models_pkg.PlansRequest1
idempotencyKey := "idempotency-key"
var result *models_pkg.PlansResponse1
result,_ = plans.UpdatePlan(planId, body, idempotencyKey)
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 |
Deletes a plan
func (me *PLANS_IMPL) DeletePlan(
planId string,
idempotencyKey *string)(*models_pkg.PlansResponse1,error)
Parameter | Tags | Description |
---|---|---|
planId | Required |
Plan id |
idempotencyKey | Optional |
TODO: Add a parameter description |
planId := "plan_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.PlansResponse1
result,_ = plans.DeletePlan(planId, idempotencyKey)
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 |
Updates the metadata from a plan
func (me *PLANS_IMPL) UpdatePlanMetadata(
planId string,
body *models_pkg.PlansMetadataRequest,
idempotencyKey *string)(*models_pkg.PlansMetadataResponse,error)
Parameter | Tags | Description |
---|---|---|
planId | Required |
The plan id |
body | Required |
Request for updating the plan metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
planId := "plan_id"
var body *models_pkg.PlansMetadataRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.PlansMetadataResponse
result,_ = plans.UpdatePlanMetadata(planId, body, idempotencyKey)
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 |
Factory for the INVOICES
interface can be accessed from the package invoices_pkg.
invoices := invoices_pkg.NewINVOICES()
Create an Invoice
func (me *INVOICES_IMPL) CreateInvoice(
subscriptionId string,
cycleId string,
idempotencyKey *string,
body *models_pkg.SubscriptionsCyclesPayRequest)(*models_pkg.SubscriptionsCyclesPayResponse,error)
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 |
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)
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 |
GetPartialInvoice
func (me *INVOICES_IMPL) GetPartialInvoice(subscriptionId string)(*models_pkg.SubscriptionsPartialInvoiceResponse,error)
Parameter | Tags | Description |
---|---|---|
subscriptionId | Required |
Subscription Id |
subscriptionId := "subscription_id"
var result *models_pkg.SubscriptionsPartialInvoiceResponse
result,_ = invoices.GetPartialInvoice(subscriptionId)
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 |
Updates the status from an invoice
func (me *INVOICES_IMPL) UpdateInvoiceStatus(
invoiceId string,
body *models_pkg.UpdateCurrentCycleStatusRequest,
idempotencyKey *string)(*models_pkg.InvoicesStatusResponse,error)
Parameter | Tags | Description |
---|---|---|
invoiceId | Required |
Invoice Id |
body | Required |
Request for updating an invoice's status |
idempotencyKey | Optional |
TODO: Add a parameter description |
invoiceId := "invoice_id"
var body *models_pkg.UpdateCurrentCycleStatusRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.InvoicesStatusResponse
result,_ = invoices.UpdateInvoiceStatus(invoiceId, body, idempotencyKey)
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 |
Gets an invoice
func (me *INVOICES_IMPL) GetInvoice(invoiceId string)(*models_pkg.InvoicesResponse,error)
Parameter | Tags | Description |
---|---|---|
invoiceId | Required |
Invoice Id |
invoiceId := "invoice_id"
var result *models_pkg.InvoicesResponse
result,_ = invoices.GetInvoice(invoiceId)
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 |
Cancels an invoice
func (me *INVOICES_IMPL) CancelInvoice(
invoiceId string,
idempotencyKey *string)(*models_pkg.InvoicesResponse,error)
Parameter | Tags | Description |
---|---|---|
invoiceId | Required |
Invoice id |
idempotencyKey | Optional |
TODO: Add a parameter description |
invoiceId := "invoice_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.InvoicesResponse
result,_ = invoices.CancelInvoice(invoiceId, idempotencyKey)
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 |
Updates the metadata from an invoice
func (me *INVOICES_IMPL) UpdateInvoiceMetadata(
invoiceId string,
body *models_pkg.InvoicesMetadataRequest,
idempotencyKey *string)(*models_pkg.InvoicesMetadataResponse,error)
Parameter | Tags | Description |
---|---|---|
invoiceId | Required |
The invoice id |
body | Required |
Request for updating the invoice metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
invoiceId := "invoice_id"
var body *models_pkg.InvoicesMetadataRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.InvoicesMetadataResponse
result,_ = invoices.UpdateInvoiceMetadata(invoiceId, body, idempotencyKey)
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 |
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)
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 |
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)
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 |
Factory for the CUSTOMERS
interface can be accessed from the package customers_pkg.
customers := customers_pkg.NewCUSTOMERS()
Creates a access token for a customer
func (me *CUSTOMERS_IMPL) CreateAccessToken(
customerId string,
body *models_pkg.CustomersAccessTokensRequest,
idempotencyKey *string)(*models_pkg.CustomersAccessTokensResponse,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
body | Required |
Request for creating a access token |
idempotencyKey | Optional |
TODO: Add a parameter description |
customerId := "customer_id"
var body *models_pkg.CustomersAccessTokensRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.CustomersAccessTokensResponse
result,_ = customers.CreateAccessToken(customerId, body, idempotencyKey)
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 |
Get all access tokens from a customer
func (me *CUSTOMERS_IMPL) GetAccessTokens(
customerId string,
page *int64,
size *int64)(*models_pkg.CustomersAccessTokensResponse1,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
page | Optional |
Page number |
size | Optional |
Page size |
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)
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 |
Updates a customer
func (me *CUSTOMERS_IMPL) UpdateCustomer(
customerId string,
body *models_pkg.CustomersRequest,
idempotencyKey *string)(*models_pkg.CustomersResponse,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
body | Required |
Request for updating a customer |
idempotencyKey | Optional |
TODO: Add a parameter description |
customerId := "customer_id"
var body *models_pkg.CustomersRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.CustomersResponse
result,_ = customers.UpdateCustomer(customerId, body, idempotencyKey)
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 |
Get a customer
func (me *CUSTOMERS_IMPL) GetCustomer(customerId string)(*models_pkg.CustomersResponse,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
customerId := "customer_id"
var result *models_pkg.CustomersResponse
result,_ = customers.GetCustomer(customerId)
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 |
Delete a Customer's access tokens
func (me *CUSTOMERS_IMPL) DeleteAccessTokens(customerId string)(*models_pkg.CustomersAccessTokensResponse1,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
customerId := "customer_id"
var result *models_pkg.CustomersAccessTokensResponse1
result,_ = customers.DeleteAccessTokens(customerId)
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 |
Gets all adressess from a customer
func (me *CUSTOMERS_IMPL) GetAddresses(
customerId string,
page *int64,
size *int64)(*models_pkg.CustomersAddressesResponse,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
page | Optional |
Page number |
size | Optional |
Page size |
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)
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 |
Creates a new address for a customer
func (me *CUSTOMERS_IMPL) CreateAddress(
customerId string,
body *models_pkg.CustomersAddressesRequest,
idempotencyKey *string)(*models_pkg.CustomersAddressesResponse1,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
body | Required |
Request for creating an address |
idempotencyKey | Optional |
TODO: Add a parameter description |
customerId := "customer_id"
var body *models_pkg.CustomersAddressesRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.CustomersAddressesResponse1
result,_ = customers.CreateAddress(customerId, body, idempotencyKey)
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 |
Get a Customer's access token
func (me *CUSTOMERS_IMPL) GetAccessToken(
customerId string,
tokenId string)(*models_pkg.CustomersAccessTokensResponse,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
tokenId | Required |
Token Id |
customerId := "customer_id"
tokenId := "token_id"
var result *models_pkg.CustomersAccessTokensResponse
result,_ = customers.GetAccessToken(customerId, tokenId)
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 |
Delete a customer's access token
func (me *CUSTOMERS_IMPL) DeleteAccessToken(
customerId string,
tokenId string,
idempotencyKey *string)(*models_pkg.CustomersAccessTokensResponse,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
tokenId | Required |
Token Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
customerId := "customer_id"
tokenId := "token_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.CustomersAccessTokensResponse
result,_ = customers.DeleteAccessToken(customerId, tokenId, idempotencyKey)
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 |
Get a customer's address
func (me *CUSTOMERS_IMPL) GetAddress(
customerId string,
addressId string)(*models_pkg.CustomersAddressesResponse1,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
addressId | Required |
Address Id |
customerId := "customer_id"
addressId := "address_id"
var result *models_pkg.CustomersAddressesResponse1
result,_ = customers.GetAddress(customerId, addressId)
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 |
Updates an address
func (me *CUSTOMERS_IMPL) UpdateAddress(
customerId string,
addressId string,
body *models_pkg.CustomersAddressesRequest1,
idempotencyKey *string)(*models_pkg.CustomersAddressesResponse1,error)
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 |
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)
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 |
Delete a Customer's address
func (me *CUSTOMERS_IMPL) DeleteAddress(
customerId string,
addressId string,
idempotencyKey *string)(*models_pkg.CustomersAddressesResponse1,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
addressId | Required |
Address Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
customerId := "customer_id"
addressId := "address_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.CustomersAddressesResponse1
result,_ = customers.DeleteAddress(customerId, addressId, idempotencyKey)
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 |
Creates a new card for a customer
func (me *CUSTOMERS_IMPL) CreateCard(
customerId string,
body *models_pkg.CustomersCardsRequest,
idempotencyKey *string)(*models_pkg.CustomersCardsResponse,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
body | Required |
Request for creating a card |
idempotencyKey | Optional |
TODO: Add a parameter description |
customerId := "customer_id"
var body *models_pkg.CustomersCardsRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.CustomersCardsResponse
result,_ = customers.CreateCard(customerId, body, idempotencyKey)
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 |
Get all cards from a customer
func (me *CUSTOMERS_IMPL) GetCards(
customerId string,
page *int64,
size *int64)(*models_pkg.CustomersCardsResponse1,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
page | Optional |
Page number |
size | Optional |
Page size |
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)
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 |
Renew a card
func (me *CUSTOMERS_IMPL) RenewCard(
customerId string,
cardId string,
idempotencyKey *string)(*models_pkg.CustomersCardsRenewResponse,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
cardId | Required |
Card Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
customerId := "customer_id"
cardId := "card_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.CustomersCardsRenewResponse
result,_ = customers.RenewCard(customerId, cardId, idempotencyKey)
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 |
Creates a new customer
func (me *CUSTOMERS_IMPL) CreateCustomer(
body *models_pkg.CustomersRequest1,
idempotencyKey *string)(*models_pkg.CustomersResponse,error)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a customer |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body *models_pkg.CustomersRequest1
idempotencyKey := "idempotency-key"
var result *models_pkg.CustomersResponse
result,_ = customers.CreateCustomer(body, idempotencyKey)
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 |
Get all Customers
func (me *CUSTOMERS_IMPL) GetCustomers(
name *string,
document *string,
page *int64,
size *int64,
email *string,
code *string)(*models_pkg.CustomersResponse3,error)
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 |
Optional |
Customer's email | |
code | Optional |
Customer's code |
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)
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 |
Updates the metadata a customer
func (me *CUSTOMERS_IMPL) UpdateCustomerMetadata(
customerId string,
body *models_pkg.CustomersMetadataRequest,
idempotencyKey *string)(*models_pkg.CustomersMetadataResponse,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
The customer id |
body | Required |
Request for updating the customer metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
customerId := "customer_id"
var body *models_pkg.CustomersMetadataRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.CustomersMetadataResponse
result,_ = customers.UpdateCustomerMetadata(customerId, body, idempotencyKey)
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 |
Updates a card
func (me *CUSTOMERS_IMPL) UpdateCard(
customerId string,
cardId string,
body *models_pkg.CustomersCardsRequest1,
idempotencyKey *string)(*models_pkg.CustomersCardsResponse,error)
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 |
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)
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 |
Delete a customer's card
func (me *CUSTOMERS_IMPL) DeleteCard(
customerId string,
cardId string,
idempotencyKey *string)(*models_pkg.CustomersCardsResponse,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer Id |
cardId | Required |
Card Id |
idempotencyKey | Optional |
TODO: Add a parameter description |
customerId := "customer_id"
cardId := "card_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.CustomersCardsResponse
result,_ = customers.DeleteCard(customerId, cardId, idempotencyKey)
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 |
Get a customer's card
func (me *CUSTOMERS_IMPL) GetCard(
customerId string,
cardId string)(*models_pkg.CustomersCardsResponse,error)
Parameter | Tags | Description |
---|---|---|
customerId | Required |
Customer id |
cardId | Required |
Card id |
customerId := "customer_id"
cardId := "card_id"
var result *models_pkg.CustomersCardsResponse
result,_ = customers.GetCard(customerId, cardId)
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 |
Factory for the CHARGES
interface can be accessed from the package charges_pkg.
charges := charges_pkg.NewCHARGES()
Get a charge from its id
func (me *CHARGES_IMPL) GetCharge(chargeId string)(*models_pkg.ChargesResponse,error)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
chargeId := "charge_id"
var result *models_pkg.ChargesResponse
result,_ = charges.GetCharge(chargeId)
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 |
Cancel a charge
func (me *CHARGES_IMPL) CancelCharge(
chargeId string,
idempotencyKey *string,
body *models_pkg.ChargesRequest)(*models_pkg.ChargesResponse,error)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
idempotencyKey | Optional |
TODO: Add a parameter description |
body | Optional |
Request for cancelling a charge |
chargeId := "charge_id"
idempotencyKey := "idempotency-key"
var body *models_pkg.ChargesRequest
var result *models_pkg.ChargesResponse
result,_ = charges.CancelCharge(chargeId, idempotencyKey, body)
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 |
ConfirmPayment
func (me *CHARGES_IMPL) ConfirmPayment(
chargeId string,
idempotencyKey *string,
body *models_pkg.CreateConfirmPaymentRequest)(*models_pkg.ChargesConfirmPaymentResponse,error)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
TODO: Add a parameter description |
idempotencyKey | Optional |
TODO: Add a parameter description |
body | Optional |
Request for confirm payment |
chargeId := "charge_id"
idempotencyKey := "idempotency-key"
var body *models_pkg.CreateConfirmPaymentRequest
var result *models_pkg.ChargesConfirmPaymentResponse
result,_ = charges.ConfirmPayment(chargeId, idempotencyKey, body)
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 |
Updates the card from a charge
func (me *CHARGES_IMPL) UpdateChargeCard(
chargeId string,
body *models_pkg.ChargesCardRequest,
idempotencyKey *string)(*models_pkg.ChargesCardResponse,error)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
body | Required |
Request for updating a charge's card |
idempotencyKey | Optional |
TODO: Add a parameter description |
chargeId := "charge_id"
var body *models_pkg.ChargesCardRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.ChargesCardResponse
result,_ = charges.UpdateChargeCard(chargeId, body, idempotencyKey)
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 |
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)
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 |
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)
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 |
Retries a charge
func (me *CHARGES_IMPL) RetryCharge(
chargeId string,
idempotencyKey *string)(*models_pkg.ChargesRetryResponse,error)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
idempotencyKey | Optional |
TODO: Add a parameter description |
chargeId := "charge_id"
idempotencyKey := "idempotency-key"
var result *models_pkg.ChargesRetryResponse
result,_ = charges.RetryCharge(chargeId, idempotencyKey)
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 |
Updates a charge's payment method
func (me *CHARGES_IMPL) UpdateChargePaymentMethod(
chargeId string,
body *models_pkg.ChargesPaymentMethodRequest,
idempotencyKey *string)(*models_pkg.ChargesPaymentMethodResponse,error)
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 |
chargeId := "charge_id"
var body *models_pkg.ChargesPaymentMethodRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.ChargesPaymentMethodResponse
result,_ = charges.UpdateChargePaymentMethod(chargeId, body, idempotencyKey)
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 |
Updates the metadata from a charge
func (me *CHARGES_IMPL) UpdateChargeMetadata(
chargeId string,
body *models_pkg.ChargesMetadataRequest,
idempotencyKey *string)(*models_pkg.ChargesMetadataResponse,error)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
The charge id |
body | Required |
Request for updating the charge metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
chargeId := "charge_id"
var body *models_pkg.ChargesMetadataRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.ChargesMetadataResponse
result,_ = charges.UpdateChargeMetadata(chargeId, body, idempotencyKey)
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 |
Captures a charge
func (me *CHARGES_IMPL) CaptureCharge(
chargeId string,
idempotencyKey *string,
body *models_pkg.ChargesCaptureRequest)(*models_pkg.ChargesCaptureResponse,error)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge id |
idempotencyKey | Optional |
TODO: Add a parameter description |
body | Optional |
Request for capturing a charge |
chargeId := "charge_id"
idempotencyKey := "idempotency-key"
var body *models_pkg.ChargesCaptureRequest
var result *models_pkg.ChargesCaptureResponse
result,_ = charges.CaptureCharge(chargeId, idempotencyKey, body)
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 |
Updates the due date from a charge
func (me *CHARGES_IMPL) UpdateChargeDueDate(
chargeId string,
body *models_pkg.ChargesDueDateRequest,
idempotencyKey *string)(*models_pkg.ChargesDueDateResponse,error)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge Id |
body | Required |
Request for updating the due date |
idempotencyKey | Optional |
TODO: Add a parameter description |
chargeId := "charge_id"
var body *models_pkg.ChargesDueDateRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.ChargesDueDateResponse
result,_ = charges.UpdateChargeDueDate(chargeId, body, idempotencyKey)
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 |
Creates a new charge
func (me *CHARGES_IMPL) CreateCharge(
body *models_pkg.ChargesRequest1,
idempotencyKey *string)(*models_pkg.ChargesResponse,error)
Parameter | Tags | Description |
---|---|---|
body | Required |
Request for creating a charge |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body *models_pkg.ChargesRequest1
idempotencyKey := "idempotency-key"
var result *models_pkg.ChargesResponse
result,_ = charges.CreateCharge(body, idempotencyKey)
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 |
GetChargeTransactions
func (me *CHARGES_IMPL) GetChargeTransactions(
chargeId string,
page *int64,
size *int64)(*models_pkg.ChargesTransactionsResponse,error)
Parameter | Tags | Description |
---|---|---|
chargeId | Required |
Charge Id |
page | Optional |
Page number |
size | Optional |
Page size |
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)
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 |
GetChargesSummary
func (me *CHARGES_IMPL) GetChargesSummary(
status string,
createdSince *time.Time,
createdUntil *time.Time)(*models_pkg.GetChargesSummaryResponse,error)
Parameter | Tags | Description |
---|---|---|
status | Required |
TODO: Add a parameter description |
createdSince | Optional |
TODO: Add a parameter description |
createdUntil | Optional |
TODO: Add a parameter description |
status := "status"
createdSince := time.Now()
createdUntil := time.Now()
var result *models_pkg.GetChargesSummaryResponse
result,_ = charges.GetChargesSummary(status, createdSince, createdUntil)
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 |
Factory for the RECIPIENTS
interface can be accessed from the package recipients_pkg.
recipients := recipients_pkg.NewRECIPIENTS()
Updates recipient metadata
func (me *RECIPIENTS_IMPL) UpdateRecipientMetadata(
recipientId string,
body *models_pkg.RecipientsMetadataRequest,
idempotencyKey *string)(*models_pkg.RecipientsMetadataResponse,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
body | Required |
Metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
recipientId := "recipient_id"
var body *models_pkg.RecipientsMetadataRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.RecipientsMetadataResponse
result,_ = recipients.UpdateRecipientMetadata(recipientId, body, idempotencyKey)
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 |
UpdateRecipientTransferSettings
func (me *RECIPIENTS_IMPL) UpdateRecipientTransferSettings(
recipientId string,
body *models_pkg.UpdateTransferSettingsRequest,
idempotencyKey *string)(*models_pkg.RecipientsTransferSettingsResponse,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient Identificator |
body | Required |
TODO: Add a parameter description |
idempotencyKey | Optional |
TODO: Add a parameter description |
recipientId := "recipient_id"
var body *models_pkg.UpdateTransferSettingsRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.RecipientsTransferSettingsResponse
result,_ = recipients.UpdateRecipientTransferSettings(recipientId, body, idempotencyKey)
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 |
Gets an anticipation
func (me *RECIPIENTS_IMPL) GetAnticipation(
recipientId string,
anticipationId string)(*models_pkg.RecipientsAnticipationsResponse,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
anticipationId | Required |
Anticipation id |
recipientId := "recipient_id"
anticipationId := "anticipation_id"
var result *models_pkg.RecipientsAnticipationsResponse
result,_ = recipients.GetAnticipation(recipientId, anticipationId)
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 |
Retrieves paginated recipients information
func (me *RECIPIENTS_IMPL) GetRecipients(
page *int64,
size *int64)(*models_pkg.RecipientsResponse,error)
Parameter | Tags | Description |
---|---|---|
page | Optional |
Page number |
size | Optional |
Page size |
page,_ := strconv.ParseInt("15", 10, 8)
size,_ := strconv.ParseInt("15", 10, 8)
var result *models_pkg.RecipientsResponse
result,_ = recipients.GetRecipients(page, size)
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 |
Creates a new recipient
func (me *RECIPIENTS_IMPL) CreateRecipient(
body *models_pkg.RecipientsRequest,
idempotencyKey *string)(*models_pkg.RecipientsResponse1,error)
Parameter | Tags | Description |
---|---|---|
body | Required |
Recipient data |
idempotencyKey | Optional |
TODO: Add a parameter description |
var body *models_pkg.RecipientsRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.RecipientsResponse1
result,_ = recipients.CreateRecipient(body, idempotencyKey)
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 |
Get balance information for a recipient
func (me *RECIPIENTS_IMPL) GetBalance(recipientId string)(*models_pkg.RecipientsBalanceResponse,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
recipientId := "recipient_id"
var result *models_pkg.RecipientsBalanceResponse
result,_ = recipients.GetBalance(recipientId)
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 |
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)
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 |
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)
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 |
Creates an anticipation
func (me *RECIPIENTS_IMPL) CreateAnticipation(
recipientId string,
body *models_pkg.RecipientsAnticipationsRequest,
idempotencyKey *string)(*models_pkg.RecipientsAnticipationsResponse,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
body | Required |
Anticipation data |
idempotencyKey | Optional |
TODO: Add a parameter description |
recipientId := "recipient_id"
var body *models_pkg.RecipientsAnticipationsRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.RecipientsAnticipationsResponse
result,_ = recipients.CreateAnticipation(recipientId, body, idempotencyKey)
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 |
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)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
body | Required |
Bank account data |
idempotencyKey | Optional |
TODO: Add a parameter description |
recipientId := "recipient_id"
var body *models_pkg.RecipientsDefaultBankAccountRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.RecipientsDefaultBankAccountResponse
result,_ = recipients.UpdateRecipientDefaultBankAccount(recipientId, body, idempotencyKey)
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 |
Retrieves recipient information
func (me *RECIPIENTS_IMPL) GetRecipient(recipientId string)(*models_pkg.RecipientsResponse1,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipiend id |
recipientId := "recipient_id"
var result *models_pkg.RecipientsResponse1
result,_ = recipients.GetRecipient(recipientId)
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 |
Updates a recipient
func (me *RECIPIENTS_IMPL) UpdateRecipient(
recipientId string,
body *models_pkg.RecipientsRequest1,
idempotencyKey *string)(*models_pkg.RecipientsResponse1,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
body | Required |
Recipient data |
idempotencyKey | Optional |
TODO: Add a parameter description |
recipientId := "recipient_id"
var body *models_pkg.RecipientsRequest1
idempotencyKey := "idempotency-key"
var result *models_pkg.RecipientsResponse1
result,_ = recipients.UpdateRecipient(recipientId, body, idempotencyKey)
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 |
Gets a transfer
func (me *RECIPIENTS_IMPL) GetTransfer(
recipientId string,
transferId string)(*models_pkg.RecipientsTransfersResponse,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
transferId | Required |
Transfer id |
recipientId := "recipient_id"
transferId := "transfer_id"
var result *models_pkg.RecipientsTransfersResponse
result,_ = recipients.GetTransfer(recipientId, transferId)
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 |
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)
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 |
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)
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 |
Creates a transfer for a recipient
func (me *RECIPIENTS_IMPL) CreateTransfer(
recipientId string,
body *models_pkg.RecipientsTransfersRequest,
idempotencyKey *string)(*models_pkg.RecipientsTransfersResponse,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient Id |
body | Required |
Transfer data |
idempotencyKey | Optional |
TODO: Add a parameter description |
recipientId := "recipient_id"
var body *models_pkg.RecipientsTransfersRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.RecipientsTransfersResponse
result,_ = recipients.CreateTransfer(recipientId, body, idempotencyKey)
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 |
Gets the anticipation limits for a recipient
func (me *RECIPIENTS_IMPL) GetAnticipationLimits(
recipientId string,
timeframe string,
paymentDate *time.Time)(*models_pkg.RecipientsAnticipationLimitsResponse,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
timeframe | Required |
Timeframe |
paymentDate | Required |
Anticipation payment date |
recipientId := "recipient_id"
timeframe := "timeframe"
paymentDate := time.Now()
var result *models_pkg.RecipientsAnticipationLimitsResponse
result,_ = recipients.GetAnticipationLimits(recipientId, timeframe, paymentDate)
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 |
CreateWithdraw
func (me *RECIPIENTS_IMPL) CreateWithdraw(
recipientId string,
body *models_pkg.CreateWithdrawRequest)(*models_pkg.GetWithdrawResponse,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
TODO: Add a parameter description |
body | Required |
TODO: Add a parameter description |
recipientId := "recipient_id"
var body *models_pkg.CreateWithdrawRequest
var result *models_pkg.GetWithdrawResponse
result,_ = recipients.CreateWithdraw(recipientId, body)
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 |
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)
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 |
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)
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 |
GetWithdrawById
func (me *RECIPIENTS_IMPL) GetWithdrawById(
recipientId string,
withdrawalId string)(*models_pkg.GetWithdrawResponse,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
TODO: Add a parameter description |
withdrawalId | Required |
TODO: Add a parameter description |
recipientId := "recipient_id"
withdrawalId := "withdrawal_id"
var result *models_pkg.GetWithdrawResponse
result,_ = recipients.GetWithdrawById(recipientId, withdrawalId)
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 |
Updates recipient metadata
func (me *RECIPIENTS_IMPL) UpdateAutomaticAnticipationSettings(
recipientId string,
body *models_pkg.UpdateAutomaticAnticipationSettingsRequest,
idempotencyKey *string)(*models_pkg.RecipientsAutomaticAnticipationSettingsResponse,error)
Parameter | Tags | Description |
---|---|---|
recipientId | Required |
Recipient id |
body | Required |
Metadata |
idempotencyKey | Optional |
TODO: Add a parameter description |
recipientId := "recipient_id"
var body *models_pkg.UpdateAutomaticAnticipationSettingsRequest
idempotencyKey := "idempotency-key"
var result *models_pkg.RecipientsAutomaticAnticipationSettingsResponse
result,_ = recipients.UpdateAutomaticAnticipationSettings(recipientId, body, idempotencyKey)
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 |
Retrieves recipient information
func (me *RECIPIENTS_IMPL) GetRecipientByCode(code string)(*models_pkg.RecipientsCodeResponse,error)
Parameter | Tags | Description |
---|---|---|
code | Required |
Recipient code |
code := "code"
var result *models_pkg.RecipientsCodeResponse
result,_ = recipients.GetRecipientByCode(code)
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 |
Factory for the TOKENS
interface can be accessed from the package tokens_pkg.
tokens := tokens_pkg.NewTOKENS()
Tags:
Skips Authentication
CreateToken
func (me *TOKENS_IMPL) CreateToken(
publicKey string,
body *models_pkg.TokensRequest,
idempotencyKey *string,
appId *string)(*models_pkg.TokensResponse,error)
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 |
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)
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 |
Tags:
Skips Authentication
Gets a token from its id
func (me *TOKENS_IMPL) GetToken(
id string,
publicKey string,
appId *string)(*models_pkg.TokensResponse,error)
Parameter | Tags | Description |
---|---|---|
id | Required |
Token id |
publicKey | Required |
Public key |
appId | Optional |
TODO: Add a parameter description |
id := "id"
publicKey := "public_key"
appId := "appId"
var result *models_pkg.TokensResponse
result,_ = tokens.GetToken(id, publicKey, appId)
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 |
Factory for the TRANSACTIONS
interface can be accessed from the package transactions_pkg.
transactions := transactions_pkg.NewTRANSACTIONS()
GetTransaction
func (me *TRANSACTIONS_IMPL) GetTransaction(transactionId string)(*models_pkg.GetTransactionResponse,error)
Parameter | Tags | Description |
---|---|---|
transactionId | Required |
TODO: Add a parameter description |
transactionId := "transaction_id"
var result *models_pkg.GetTransactionResponse
result,_ = transactions.GetTransaction(transactionId)
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 |
Factory for the TRANSFERS
interface can be accessed from the package transfers_pkg.
transfers := transfers_pkg.NewTRANSFERS()
CreateTransfer
func (me *TRANSFERS_IMPL) PostCreateTransfer(body *models_pkg.CreateTransfer)(*models_pkg.GetTransfer,error)
Parameter | Tags | Description |
---|---|---|
body | Required |
TODO: Add a parameter description |
var body *models_pkg.CreateTransfer
var result *models_pkg.GetTransfer
result,_ = transfers.PostCreateTransfer(body)
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 |
GetTransferById
func (me *TRANSFERS_IMPL) GetTransferById(transferId string)(*models_pkg.GetTransfer,error)
Parameter | Tags | Description |
---|---|---|
transferId | Required |
TODO: Add a parameter description |
transferId := "transfer_id"
var result *models_pkg.GetTransfer
result,_ = transfers.GetTransferById(transferId)
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 |
Gets all transfers
func (me *TRANSFERS_IMPL) GetTransfers1()(*models_pkg.ListTransfers,error)
var result *models_pkg.ListTransfers
result,_ = transfers.GetTransfers1()
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 |