using Gr4vy;
using Gr4vy.Models.Components;
using Gr4vy.Models.Requests;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
ListGiftCardsRequest req = new ListGiftCardsRequest() {};
ListGiftCardsResponse? res = await sdk.GiftCards.ListAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_account_id": "<string>",
"gift_card_service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gift_card_service_definition_id": "mock-gift-card",
"display_name": "<string>",
"type": "gift-card-service"
},
"bin": "<string>",
"sub_bin": "<string>",
"last4": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "gift-card",
"expiration_date": "2013-07-16T19:23:00.000+00:00",
"buyer": {
"merchant_account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"display_name": "John Doe",
"external_identifier": "buyer-12345",
"billing_details": {
"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"
},
"tax_id": {
"value": "<string>",
"kind": "ae.trn"
}
},
"account_number": "<string>"
}
}
],
"limit": 20,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": "Xkjss7asS"
}Browser all gift cards.
using Gr4vy;
using Gr4vy.Models.Components;
using Gr4vy.Models.Requests;
var sdk = new Gr4vySDK(
id: "example",
server: SDKConfig.Server.Sandbox,
bearerAuthSource: Auth.WithToken(privateKey),
merchantAccountId: "default"
);
ListGiftCardsRequest req = new ListGiftCardsRequest() {};
ListGiftCardsResponse? res = await sdk.GiftCards.ListAsync(req);
while(res != null)
{
// handle items
res = await res.Next!();
}{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_account_id": "<string>",
"gift_card_service": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gift_card_service_definition_id": "mock-gift-card",
"display_name": "<string>",
"type": "gift-card-service"
},
"bin": "<string>",
"sub_bin": "<string>",
"last4": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "gift-card",
"expiration_date": "2013-07-16T19:23:00.000+00:00",
"buyer": {
"merchant_account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"display_name": "John Doe",
"external_identifier": "buyer-12345",
"billing_details": {
"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"
},
"tax_id": {
"value": "<string>",
"kind": "ae.trn"
}
},
"account_number": "<string>"
}
}
],
"limit": 20,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": "Xkjss7asS"
}gift-cards.read 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"
1 <= x <= 100Successful Response
A list of items returned for this request.
Show child attributes
The number of items for this page.
1 <= x <= 10020
The cursor pointing at the next page of items.
1 - 1000"ZXhhbXBsZTE"
The cursor pointing at the previous page of items.
1 - 1000"Xkjss7asS"