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": "[email protected]",
"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": "[email protected]",
"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. The ID of the merchant account to use for this request.
1 <= x <= 100Successful Response
A list of items returned for this request.
Show child attributes
The ID for the gift card.
The ID of the merchant account this buyer belongs to.
The service this gift card belongs to.
Show child attributes
The ID for the gift card service.
The ID of the definition for this service.
mock-gift-card, qwikcilver-gift-card The display name for the gift card service.
1 - 200Always gift-card-service.
"gift-card-service"The first 6 digits of the full gift card number.
The 3 digits after the bin of the full gift card number.
The last 4 digits for the gift card.
The date this gift card record was created at.
The date this gift card record was last updated at.
Always gift-card.
"gift-card"The date and time when this gift card expires. This is a full date/time and may be more accurate than the actual expiry date received by the gift card service.
"2013-07-16T19:23:00.000+00:00"
The buyer for which this gift card is stored.
Show child attributes
The ID of the merchant account this buyer belongs to.
The date this buyer was created at.
The date this buyer was last updated at.
Always buyer.
"buyer"The ID for the buyer.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
The display name for the buyer.
1 - 200"John Doe"
The merchant identifier for this buyer.
1 - 200"buyer-12345"
The billing name, address, email, and other fields for this buyer.
Show child attributes
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 phone number for the buyer which should be formatted according to the E164 number standard.
"+1234567890"
The billing address for the buyer.
Show child attributes
The city for the address.
1 - 100"San Jose"
The country for the address in ISO 3166 format.
"US"
The postal code or zip code for the address.
1 - 50"94560"
The state, county, or province for the address.
1 - 255"California"
The code of state, county, or province for the address in ISO 3166-2 format.
"US-CA"
The house number or name for the address. Not all payment services use this field but some do.
1 - 255"10"
The first line of the address.
1 - 255"Stafford Appartments"
The second line of the address.
1 - 255"29th Street"
The optional name of the company or organisation to add to the address.
1 - 255"Gr4vy"
The tax ID information associated with the billing details.
Show child attributes
The tax ID for the buyer.
1 - 50The kind of tax ID
ae.trn, au.abn, ar.dni, ar.cuil, ar.cuit, br.cnpj, br.cpf, ca.bn, ca.gst_hst, ca.pst_bc, ca.pst_mb, ca.pst_sk, ca.qst, ch.vat, cl.tin, co.itin, co.nit, es.cif, eu.vat, gb.vat, hk.br, id.nik, id.npwp, in.gst, in.pan, jp.cn, jp.rn, kr.brn, li.uid, mx.curp, mx.rfc, my.frp, my.itn, my.nric, my.sst, no.vat, nz.gst, pe.ruc, ph.tin, ru.inn, ru.kpp, sa.vat, sg.gst, sg.uen, th.id, th.vat, tw.vat, us.ein, za.vat, bo.ci, uy.rut, uy.ci The buyer account number
1 - 200The number of items for this page.
1 <= x <= 100The cursor pointing at the next page of items.
1 - 1000"ZXhhbXBsZTE"
The cursor pointing at the previous page of items.
1 - 1000"Xkjss7asS"
Was this page helpful?