| Method | HTTP request | Description |
|---|---|---|
| ListMerchantLocations | Get /merchants/{merchant_guid}/merchant_locations | List merchant locations |
| ListMerchants | Get /merchants | List merchants |
| ReadMerchant | Get /merchants/{merchant_guid} | Read merchant |
| ReadMerchantLocation | Get /merchants/{merchant_guid}/merchant_locations/{merchant_location_guid} | Read merchant location |
MerchantLocationsResponseBody ListMerchantLocations(ctx, merchantGUID, optional) List merchant locations
Returns a list of all the merchant locations associated with a merchant, including physical location, latitude, longitude, etc.
package main
import (
"context"
"fmt"
"github.com/mxenabled/atrium-go/v2"
"github.com/antihax/optional"
)
func main() {
client := atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID")
ctx := context.Background()
merchantGUID := "MCH-123" // string | The unique identifier for a `merchant`.
opts := &atrium.ListMerchantLocationsOpts{
Page: optional.NewInt32(1), // int32 | Specify current page.
RecordsPerPage: optional.NewInt32(12), // int32 | Specify records per page.
}
response, _, err := client.Merchants.ListMerchantLocations(ctx, merchantGUID, , opts)
if err != nil {
fmt.Printf("Error: %v\n", err)
} else {
fmt.Printf("Response: %s\n", response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| merchantGUID | string | The unique identifier for a `merchant`. | |
| optional | *ListMerchantLocationsOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ListMerchantLocationsOpts struct
| Name | Type | Description | Notes |
|---|
page | optional.Int32| Specify current page. | recordsPerPage | optional.Int32| Specify records per page. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MerchantsResponseBody ListMerchants(ctx, optional) List merchants
Returns a list of merchnants.
package main
import (
"context"
"fmt"
"github.com/mxenabled/atrium-go/v2"
"github.com/antihax/optional"
)
func main() {
client := atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID")
ctx := context.Background()
opts := &atrium.ListMerchantsOpts{
Page: optional.NewInt32(1), // int32 | Specify current page.
RecordsPerPage: optional.NewInt32(12), // int32 | Specify records per page.
}
response, _, err := client.Merchants.ListMerchants(ctx, opts)
if err != nil {
fmt.Printf("Error: %v\n", err)
} else {
fmt.Printf("Response: %s\n", response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| optional | *ListMerchantsOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ListMerchantsOpts struct
| Name | Type | Description | Notes |
|---|---|---|---|
| page | optional.Int32 | Specify current page. | |
| recordsPerPage | optional.Int32 | Specify records per page. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MerchantResponseBody ReadMerchant(ctx, merchantGUID) Read merchant
Returns information about a particular merchant, such as a logo, name, and website.
package main
import (
"context"
"fmt"
"github.com/mxenabled/atrium-go/v2"
)
func main() {
client := atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID")
ctx := context.Background()
merchantGUID := "MCH-123" // string | The unique identifier for a `merchant`.
response, _, err := client.Merchants.ReadMerchant(ctx, merchantGUID, )
if err != nil {
fmt.Printf("Error: %v\n", err)
} else {
fmt.Printf("Response: %s\n", response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| merchantGUID | string | The unique identifier for a `merchant`. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MerchantLocationResponseBody ReadMerchantLocation(ctx, merchantGUID, merchantLocationGUID) Read merchant location
Retuns a specific location associated with a merchant, including physical location, latitude, longitude, etc.
package main
import (
"context"
"fmt"
"github.com/mxenabled/atrium-go/v2"
)
func main() {
client := atrium.AtriumClient("YOUR_API_KEY", "YOUR_CLIENT_ID")
ctx := context.Background()
merchantGUID := "MCH-123" // string | The unique identifier for a `merchant`.
merchantLocationGUID := "MCL-123" // string | The unique identifier for a `merchant_location`.
response, _, err := client.Merchants.ReadMerchantLocation(ctx, merchantGUID, merchantLocationGUID)
if err != nil {
fmt.Printf("Error: %v\n", err)
} else {
fmt.Printf("Response: %s\n", response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| merchantGUID | string | The unique identifier for a `merchant`. | |
| merchantLocationGUID | string | The unique identifier for a `merchant_location`. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]