using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.Buyers.ShippingDetails.UpdateAsync(
buyerId: "fe26475d-ec3e-4884-9553-f7356683f7f9",
shippingDetailsId: "bf8c36ad-02d9-4904-b0f9-a230b149e341",
shippingDetailsUpdate: new ShippingDetailsUpdate() {}
);
// handle response{
"first_name": "John",
"last_name": "Doe",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"id": "bf8c36ad-02d9-4904-b0f9-a230b149e341",
"buyer_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"type": "shipping-details"
}Update the shipping details associated to a specific buyer.
using Gr4vy;
using Gr4vy.Models.Components;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
var res = await sdk.Buyers.ShippingDetails.UpdateAsync(
buyerId: "fe26475d-ec3e-4884-9553-f7356683f7f9",
shippingDetailsId: "bf8c36ad-02d9-4904-b0f9-a230b149e341",
shippingDetailsUpdate: new ShippingDetailsUpdate() {}
);
// handle response{
"first_name": "John",
"last_name": "Doe",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "San Jose",
"country": "US",
"postal_code": "94560",
"state": "California",
"state_code": "US-CA",
"house_number_or_name": "10",
"line1": "Stafford Appartments",
"line2": "29th Street",
"organization": "Gr4vy"
},
"id": "bf8c36ad-02d9-4904-b0f9-a230b149e341",
"buyer_id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"type": "shipping-details"
}buyers.write scope.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the merchant account to use for this request.
"default"
The ID of the buyer to update shipping details for.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
The ID of the shipping details to update.
"bf8c36ad-02d9-4904-b0f9-a230b149e341"
The first name(s) or given name for the buyer.
1 - 255"John"
The last name, or family name, of the buyer.
1 - 255"Doe"
The email address for the buyer.
1 - 320"john@example.com"
The phone number for the buyer which should be formatted according to the E164 number standard.
^\+[1-9]\d{1,14}$"+1234567890"
The billing address for the buyer.
Show child attributes
Successful Response
The first name(s) or given name for the buyer.
1 - 255"John"
The last name, or family name, of the buyer.
1 - 255"Doe"
The email address for the buyer.
1 - 320"john@example.com"
The phone number for the buyer which should be formatted according to the E164 number standard.
^\+[1-9]\d{1,14}$"+1234567890"
The billing address for the buyer.
Show child attributes
The ID for the shipping details.
"bf8c36ad-02d9-4904-b0f9-a230b149e341"
The ID for the buyer.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
Always shipping-details.
"shipping-details""shipping-details"