Gift Card
Programmatically send gift cards to emails.
-
Step 1: Install the Skyfire SDK
npm install @skyfire-xyz/skyfire-sdk
pip install skyfire-sdk
-
Step 2: Initialize the SDK
import { SkyfireClient } from '@skyfire-xyz/skyfire-sdk' const skyfire = new SkyfireClient({ apiKey: 'YOUR_API_KEY' })
import skyfire_sdk configuration = skyfire_sdk.Configuration( host = "https://api.skyfire.xyz" ) configuration.api_key['ApiKeyAuth'] = "YOUR_API_KEY"
-
Step 3: Call any of the Gift Card APIs supported by the SDK
// send a $5 amazon gift card async function sendGiftcard(giftCardInfo: GiftCardOrderRequest): Promise<any>{ let res = await skyfire.giftCard.giftCardOrder(giftCardInfo) // call giftCardOrderWithHttpInfo() to get response headers in response return res } const giftCardInfo = {recipientEmail: '[email protected]', note: 'Happy Birthday'} sendGiftcard(giftCardInfo)
# send a $5 amazon gift card with skyfire_sdk.ApiClient(configuration) as api_client: api_instance = skyfire_sdk.GiftCardApi(api_client) api_response = api_instance.gift_card_order( giftCardRequest= {'recipient_email': '[email protected]', 'note': 'Merry Christmas'}) # call gift_card_order_with_http_info() for response headers included in the response
Updated about 1 month ago