- Create - Add buyer shipping details
- List - List a buyer's shipping details
- Get - Get buyer shipping details
- Update - Update a buyer's shipping details
- Delete - Delete a buyer's shipping details
Associate shipping details to a buyer.
package main
import(
"context"
"os"
gr4vygo "github.com/gr4vy/gr4vy-go"
"github.com/gr4vy/gr4vy-go/models/components"
"log"
)
func main() {
ctx := context.Background()
s := gr4vygo.New(
gr4vygo.WithMerchantAccountID("default"),
gr4vygo.WithSecurity(os.Getenv("GR4VY_BEARER_AUTH")),
)
res, err := s.Buyers.ShippingDetails.Create(ctx, "fe26475d-ec3e-4884-9553-f7356683f7f9", components.ShippingDetailsCreate{})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
buyerID |
string |
✔️ | The ID of the buyer to add shipping details to. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
shippingDetailsCreate |
components.ShippingDetailsCreate | ✔️ | N/A | |
merchantAccountID |
*string |
➖ | The ID of the merchant account to use for this request. | |
opts |
[]operations.Option | ➖ | The options for this request. |
*components.ShippingDetails, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.Error400 | 400 | application/json |
| apierrors.Error401 | 401 | application/json |
| apierrors.Error403 | 403 | application/json |
| apierrors.Error404 | 404 | application/json |
| apierrors.Error405 | 405 | application/json |
| apierrors.Error409 | 409 | application/json |
| apierrors.HTTPValidationError | 422 | application/json |
| apierrors.Error425 | 425 | application/json |
| apierrors.Error429 | 429 | application/json |
| apierrors.Error500 | 500 | application/json |
| apierrors.Error502 | 502 | application/json |
| apierrors.Error504 | 504 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
List all the shipping details associated to a specific buyer.
package main
import(
"context"
"os"
gr4vygo "github.com/gr4vy/gr4vy-go"
"log"
)
func main() {
ctx := context.Background()
s := gr4vygo.New(
gr4vygo.WithMerchantAccountID("default"),
gr4vygo.WithSecurity(os.Getenv("GR4VY_BEARER_AUTH")),
)
res, err := s.Buyers.ShippingDetails.List(ctx, "fe26475d-ec3e-4884-9553-f7356683f7f9")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
buyerID |
string |
✔️ | The ID of the buyer to retrieve shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
merchantAccountID |
*string |
➖ | The ID of the merchant account to use for this request. | |
opts |
[]operations.Option | ➖ | The options for this request. |
*components.ShippingDetailsList, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.Error400 | 400 | application/json |
| apierrors.Error401 | 401 | application/json |
| apierrors.Error403 | 403 | application/json |
| apierrors.Error404 | 404 | application/json |
| apierrors.Error405 | 405 | application/json |
| apierrors.Error409 | 409 | application/json |
| apierrors.HTTPValidationError | 422 | application/json |
| apierrors.Error425 | 425 | application/json |
| apierrors.Error429 | 429 | application/json |
| apierrors.Error500 | 500 | application/json |
| apierrors.Error502 | 502 | application/json |
| apierrors.Error504 | 504 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Get a buyer's shipping details.
package main
import(
"context"
"os"
gr4vygo "github.com/gr4vy/gr4vy-go"
"log"
)
func main() {
ctx := context.Background()
s := gr4vygo.New(
gr4vygo.WithMerchantAccountID("default"),
gr4vygo.WithSecurity(os.Getenv("GR4VY_BEARER_AUTH")),
)
res, err := s.Buyers.ShippingDetails.Get(ctx, "fe26475d-ec3e-4884-9553-f7356683f7f9", "bf8c36ad-02d9-4904-b0f9-a230b149e341")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
buyerID |
string |
✔️ | The ID of the buyer to retrieve shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
shippingDetailsID |
string |
✔️ | The ID of the shipping details to retrieve. | bf8c36ad-02d9-4904-b0f9-a230b149e341 |
merchantAccountID |
*string |
➖ | The ID of the merchant account to use for this request. | |
opts |
[]operations.Option | ➖ | The options for this request. |
*components.ShippingDetails, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.Error400 | 400 | application/json |
| apierrors.Error401 | 401 | application/json |
| apierrors.Error403 | 403 | application/json |
| apierrors.Error404 | 404 | application/json |
| apierrors.Error405 | 405 | application/json |
| apierrors.Error409 | 409 | application/json |
| apierrors.HTTPValidationError | 422 | application/json |
| apierrors.Error425 | 425 | application/json |
| apierrors.Error429 | 429 | application/json |
| apierrors.Error500 | 500 | application/json |
| apierrors.Error502 | 502 | application/json |
| apierrors.Error504 | 504 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Update the shipping details associated to a specific buyer.
package main
import(
"context"
"os"
gr4vygo "github.com/gr4vy/gr4vy-go"
"github.com/gr4vy/gr4vy-go/models/components"
"log"
)
func main() {
ctx := context.Background()
s := gr4vygo.New(
gr4vygo.WithMerchantAccountID("default"),
gr4vygo.WithSecurity(os.Getenv("GR4VY_BEARER_AUTH")),
)
res, err := s.Buyers.ShippingDetails.Update(ctx, "fe26475d-ec3e-4884-9553-f7356683f7f9", "bf8c36ad-02d9-4904-b0f9-a230b149e341", components.ShippingDetailsUpdate{})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
buyerID |
string |
✔️ | The ID of the buyer to update shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
shippingDetailsID |
string |
✔️ | The ID of the shipping details to update. | bf8c36ad-02d9-4904-b0f9-a230b149e341 |
shippingDetailsUpdate |
components.ShippingDetailsUpdate | ✔️ | N/A | |
merchantAccountID |
*string |
➖ | The ID of the merchant account to use for this request. | |
opts |
[]operations.Option | ➖ | The options for this request. |
*components.ShippingDetails, error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.Error400 | 400 | application/json |
| apierrors.Error401 | 401 | application/json |
| apierrors.Error403 | 403 | application/json |
| apierrors.Error404 | 404 | application/json |
| apierrors.Error405 | 405 | application/json |
| apierrors.Error409 | 409 | application/json |
| apierrors.HTTPValidationError | 422 | application/json |
| apierrors.Error425 | 425 | application/json |
| apierrors.Error429 | 429 | application/json |
| apierrors.Error500 | 500 | application/json |
| apierrors.Error502 | 502 | application/json |
| apierrors.Error504 | 504 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |
Delete the shipping details associated to a specific buyer.
package main
import(
"context"
"os"
gr4vygo "github.com/gr4vy/gr4vy-go"
"log"
)
func main() {
ctx := context.Background()
s := gr4vygo.New(
gr4vygo.WithMerchantAccountID("default"),
gr4vygo.WithSecurity(os.Getenv("GR4VY_BEARER_AUTH")),
)
err := s.Buyers.ShippingDetails.Delete(ctx, "fe26475d-ec3e-4884-9553-f7356683f7f9", "bf8c36ad-02d9-4904-b0f9-a230b149e341")
if err != nil {
log.Fatal(err)
}
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
buyerID |
string |
✔️ | The ID of the buyer to delete shipping details for. | fe26475d-ec3e-4884-9553-f7356683f7f9 |
shippingDetailsID |
string |
✔️ | The ID of the shipping details to delete. | bf8c36ad-02d9-4904-b0f9-a230b149e341 |
merchantAccountID |
*string |
➖ | The ID of the merchant account to use for this request. | |
opts |
[]operations.Option | ➖ | The options for this request. |
error
| Error Type | Status Code | Content Type |
|---|---|---|
| apierrors.Error400 | 400 | application/json |
| apierrors.Error401 | 401 | application/json |
| apierrors.Error403 | 403 | application/json |
| apierrors.Error404 | 404 | application/json |
| apierrors.Error405 | 405 | application/json |
| apierrors.Error409 | 409 | application/json |
| apierrors.HTTPValidationError | 422 | application/json |
| apierrors.Error425 | 425 | application/json |
| apierrors.Error429 | 429 | application/json |
| apierrors.Error500 | 500 | application/json |
| apierrors.Error502 | 502 | application/json |
| apierrors.Error504 | 504 | application/json |
| apierrors.APIError | 4XX, 5XX | */* |