tremendous 3.7.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +29 -0
- package/dist/api.d.ts +1137 -133
- package/dist/api.js +694 -55
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +2 -2
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* API Endpoints
|
|
6
|
-
* Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and
|
|
6
|
+
* Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and its members within Tremendous, please see the Tremendous Organizational API.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: 2
|
|
9
9
|
* Contact: developers@tremendous.com
|
|
@@ -22,10 +22,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.RolesApi = exports.RolesApiFactory = exports.RolesApiFp = exports.RolesApiAxiosParamCreator = exports.RewardsApi = exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = void 0;
|
|
25
|
+
exports.ListConnectedOrganizations200ResponseConnectedOrganizationsInnerOrganizationStatusEnum = exports.ListConnectedOrganizationMembers200ResponseConnectedOrganizationMembersInnerMemberStatusEnum = exports.InvoiceStatusEnum = exports.GetMember200ResponseMemberEventsInnerTypeEnum = exports.GetMember200ResponseMemberStatusEnum = exports.GetFraudReview200ResponseFraudReviewRedemptionMethodEnum = exports.GetFraudReview200ResponseFraudReviewReasonsEnum = exports.GetFraudReview200ResponseFraudReviewRiskEnum = exports.GetFraudReview200ResponseFraudReviewStatusEnum = exports.FundingSourceTypeEnum = exports.FundingSourceStatusEnum = exports.FundingSourceUsagePermissionsEnum = exports.FundingSourceMethodEnum = exports.FraudRulesListItemRuleTypeEnum = exports.FraudRuleType = exports.FraudRuleRequestConfigPeriodEnum = exports.FraudRuleRequestConfigTypeEnum = exports.FraudReviewStatus = exports.FraudReviewRisk = exports.FraudReviewRedemptionMethod = exports.FraudReviewReason = exports.FraudReviewListItemReasonsEnum = exports.FraudReviewListItemStatusEnum = exports.FraudReviewRedemptionMethodEnum = exports.FraudReviewReasonsEnum = exports.FraudReviewRiskEnum = exports.FraudReviewStatusEnum = exports.FraudConfigRedeemedRewardsCountPeriodEnum = exports.FraudConfigRedeemedRewardsAmountPeriodEnum = exports.FraudConfigCountryTypeEnum = exports.DeliveryStatus = exports.DeliveryMethod = exports.DeliveryDetailsWithLinkStatusEnum = exports.DeliveryDetailsWithLinkMethodEnum = exports.DeliveryDetailsStatusEnum = exports.DeliveryDetailsMethodEnum = exports.CurrencyCodes = exports.CreateReportRequestFiltersDigitalRewardsStatusEnum = exports.CreateReportRequestFiltersDigitalRewardsOrderStatusEnum = exports.CreateReportRequestFiltersDigitalRewardsDeliveryMethodEnum = exports.CreateReportRequestFormatEnum = exports.CreateReportRequestReportTypeEnum = exports.CreateReport200ResponseReportStatusEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = exports.CreateOrder200ResponseOrderChannelEnum = exports.CreateOrder200ResponseOrderStatusEnum = exports.ConnectedOrganizationOrganizationStatusEnum = exports.ConnectedOrganizationMemberMemberStatusEnum = exports.Channel = void 0;
|
|
26
|
+
exports.SingleRewardOrderWithoutLinkOrderStatusEnum = exports.SingleRewardOrderWithLinkOrderChannelEnum = exports.SingleRewardOrderWithLinkOrderStatusEnum = exports.SingleRewardOrderRewardDeliveryMethodEnum = exports.RewardWithoutLinkDeliveryStatusEnum = exports.RewardWithoutLinkDeliveryMethodEnum = exports.RewardWithLinkDeliveryStatusEnum = exports.RewardWithLinkDeliveryMethodEnum = exports.RewardValueCurrencyCodeEnum = exports.ReviewRedeemedRewardsCountPeriodEnum = exports.ReviewRedeemedRewardsAmountPeriodEnum = exports.ReviewCountryTypeEnum = exports.ReportStatusEnum = exports.ProductCurrencyCodesEnum = exports.ProductCategoryEnum = exports.PayoutStatusEnum = exports.OrganizationStatusEnum = exports.OrderWithoutLinkChannelEnum = exports.OrderWithoutLinkStatusEnum = exports.OrderWithLinkChannelEnum = exports.OrderWithLinkStatusEnum = exports.OrderStatus = exports.OrderBaseChannelEnum = exports.OrderBaseStatusEnum = exports.OrderChannelEnum = exports.OrderStatusEnum = exports.MemberWithoutEventsStatusEnum = exports.MemberWithEventsStatusEnum = exports.MemberBaseStatusEnum = exports.MemberStatusEnum = exports.ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum = exports.ListRewards200ResponseRewardsInnerDeliveryStatusEnum = exports.ListRewards200ResponseRewardsInnerDeliveryMethodEnum = exports.ListProductsResponseProductsInnerImagesInnerTypeEnum = exports.ListProductsResponseProductsInnerCurrencyCodesEnum = exports.ListProductsResponseProductsInnerCategoryEnum = exports.ListOrganizations200ResponseOrganizationsInnerStatusEnum = exports.ListOrders200ResponseOrdersInnerChannelEnum = exports.ListOrders200ResponseOrdersInnerStatusEnum = exports.ListMembers200ResponseMembersInnerStatusEnum = exports.ListInvoices200ResponseInvoicesInnerStatusEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerStatusEnum = exports.ListFundingSources200ResponseFundingSourcesInnerUsagePermissionsEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = exports.ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum = exports.ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum = exports.ListFraudReviews200ResponseFraudReviewsInnerStatusEnum = void 0;
|
|
27
|
+
exports.MembersApi = exports.MembersApiFactory = exports.MembersApiFp = exports.MembersApiAxiosParamCreator = exports.InvoicesApi = exports.InvoicesApiFactory = exports.InvoicesApiFp = exports.InvoicesApiAxiosParamCreator = exports.FundingSourcesApi = exports.FundingSourcesApiFactory = exports.FundingSourcesApiFp = exports.FundingSourcesApiAxiosParamCreator = exports.UpdateFraudRuleListRuleTypeEnum = exports.FraudRuleRuleTypeEnum = exports.DeleteFraudRuleRuleTypeEnum = exports.FraudRulesApi = exports.FraudRulesApiFactory = exports.FraudRulesApiFp = exports.FraudRulesApiAxiosParamCreator = exports.ListFraudReviewsStatusEnum = exports.FraudReviewsApi = exports.FraudReviewsApiFactory = exports.FraudReviewsApiFp = exports.FraudReviewsApiAxiosParamCreator = exports.ForexApi = exports.ForexApiFactory = exports.ForexApiFp = exports.ForexApiAxiosParamCreator = exports.FieldsApi = exports.FieldsApiFactory = exports.FieldsApiFp = exports.FieldsApiAxiosParamCreator = exports.ConnectedOrganizationsApi = exports.ConnectedOrganizationsApiFactory = exports.ConnectedOrganizationsApiFp = exports.ConnectedOrganizationsApiAxiosParamCreator = exports.ConnectedOrganizationMembersApi = exports.ConnectedOrganizationMembersApiFactory = exports.ConnectedOrganizationMembersApiFp = exports.ConnectedOrganizationMembersApiAxiosParamCreator = exports.CampaignsApi = exports.CampaignsApiFactory = exports.CampaignsApiFp = exports.CampaignsApiAxiosParamCreator = exports.BalanceTransactionsApi = exports.BalanceTransactionsApiFactory = exports.BalanceTransactionsApiFp = exports.BalanceTransactionsApiAxiosParamCreator = exports.UpdateFraudRuleListRequestOperationEnum = exports.SingleRewardOrderWithoutLinkOrderChannelEnum = void 0;
|
|
28
|
+
exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.RolesApi = exports.RolesApiFactory = exports.RolesApiFp = exports.RolesApiAxiosParamCreator = exports.RewardsApi = exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = exports.ReportsApi = exports.ReportsApiFactory = exports.ReportsApiFp = exports.ReportsApiAxiosParamCreator = exports.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = exports.ProductsApiAxiosParamCreator = exports.OrganizationsApi = exports.OrganizationsApiFactory = exports.OrganizationsApiFp = exports.OrganizationsApiAxiosParamCreator = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = void 0;
|
|
29
29
|
const axios_1 = require("axios");
|
|
30
30
|
// Some imports not used depending on template conditions
|
|
31
31
|
// @ts-ignore
|
|
@@ -46,6 +46,15 @@ exports.Channel = {
|
|
|
46
46
|
Typeform: 'TYPEFORM',
|
|
47
47
|
SurveyMonkey: 'SURVEY MONKEY'
|
|
48
48
|
};
|
|
49
|
+
exports.ConnectedOrganizationMemberMemberStatusEnum = {
|
|
50
|
+
Registered: 'REGISTERED',
|
|
51
|
+
Invited: 'INVITED'
|
|
52
|
+
};
|
|
53
|
+
exports.ConnectedOrganizationOrganizationStatusEnum = {
|
|
54
|
+
Pending: 'PENDING',
|
|
55
|
+
Approved: 'APPROVED',
|
|
56
|
+
Rejected: 'REJECTED'
|
|
57
|
+
};
|
|
49
58
|
exports.CreateOrder200ResponseOrderStatusEnum = {
|
|
50
59
|
Canceled: 'CANCELED',
|
|
51
60
|
Cart: 'CART',
|
|
@@ -74,7 +83,7 @@ exports.CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = {
|
|
|
74
83
|
Succeeded: 'SUCCEEDED',
|
|
75
84
|
Pending: 'PENDING'
|
|
76
85
|
};
|
|
77
|
-
exports.
|
|
86
|
+
exports.CreateReport200ResponseReportStatusEnum = {
|
|
78
87
|
Created: 'CREATED',
|
|
79
88
|
Processing: 'PROCESSING',
|
|
80
89
|
ReadyForDownload: 'READY_FOR_DOWNLOAD',
|
|
@@ -261,7 +270,7 @@ exports.DeliveryMethod = {
|
|
|
261
270
|
Phone: 'PHONE'
|
|
262
271
|
};
|
|
263
272
|
/**
|
|
264
|
-
* Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link
|
|
273
|
+
* Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link active). * `PENDING` - Delivery is pending but not yet scheduled.
|
|
265
274
|
* @export
|
|
266
275
|
* @enum {string}
|
|
267
276
|
*/
|
|
@@ -316,6 +325,7 @@ exports.FraudReviewReasonsEnum = {
|
|
|
316
325
|
EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
|
|
317
326
|
PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
|
|
318
327
|
IpRelatedToABlockedReward: 'IP related to a blocked reward',
|
|
328
|
+
DeviceRelatedToABlockedReward: 'Device related to a blocked reward',
|
|
319
329
|
BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
|
|
320
330
|
FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
|
|
321
331
|
EmailRelatedToABlockedReward: 'Email related to a blocked reward',
|
|
@@ -351,6 +361,7 @@ exports.FraudReviewListItemReasonsEnum = {
|
|
|
351
361
|
EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
|
|
352
362
|
PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
|
|
353
363
|
IpRelatedToABlockedReward: 'IP related to a blocked reward',
|
|
364
|
+
DeviceRelatedToABlockedReward: 'Device related to a blocked reward',
|
|
354
365
|
BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
|
|
355
366
|
FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
|
|
356
367
|
EmailRelatedToABlockedReward: 'Email related to a blocked reward',
|
|
@@ -378,6 +389,7 @@ exports.FraudReviewReason = {
|
|
|
378
389
|
EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
|
|
379
390
|
PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
|
|
380
391
|
IpRelatedToABlockedReward: 'IP related to a blocked reward',
|
|
392
|
+
DeviceRelatedToABlockedReward: 'Device related to a blocked reward',
|
|
381
393
|
BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
|
|
382
394
|
FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
|
|
383
395
|
EmailRelatedToABlockedReward: 'Email related to a blocked reward',
|
|
@@ -467,6 +479,17 @@ exports.FundingSourceMethodEnum = {
|
|
|
467
479
|
CreditCard: 'credit_card',
|
|
468
480
|
Invoice: 'invoice'
|
|
469
481
|
};
|
|
482
|
+
exports.FundingSourceUsagePermissionsEnum = {
|
|
483
|
+
ApiOrders: 'api_orders',
|
|
484
|
+
DashboardOrders: 'dashboard_orders',
|
|
485
|
+
BalanceFunding: 'balance_funding'
|
|
486
|
+
};
|
|
487
|
+
exports.FundingSourceStatusEnum = {
|
|
488
|
+
Active: 'active',
|
|
489
|
+
Deleted: 'deleted',
|
|
490
|
+
PendingConfirmation: 'pending_confirmation',
|
|
491
|
+
Failed: 'failed'
|
|
492
|
+
};
|
|
470
493
|
exports.FundingSourceTypeEnum = {
|
|
471
494
|
Commercial: 'COMMERCIAL',
|
|
472
495
|
ProForma: 'PRO_FORMA',
|
|
@@ -497,6 +520,7 @@ exports.GetFraudReview200ResponseFraudReviewReasonsEnum = {
|
|
|
497
520
|
EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
|
|
498
521
|
PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
|
|
499
522
|
IpRelatedToABlockedReward: 'IP related to a blocked reward',
|
|
523
|
+
DeviceRelatedToABlockedReward: 'Device related to a blocked reward',
|
|
500
524
|
BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
|
|
501
525
|
FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
|
|
502
526
|
EmailRelatedToABlockedReward: 'Email related to a blocked reward',
|
|
@@ -526,6 +550,15 @@ exports.InvoiceStatusEnum = {
|
|
|
526
550
|
Open: 'OPEN',
|
|
527
551
|
MarkedAsPaid: 'MARKED_AS_PAID'
|
|
528
552
|
};
|
|
553
|
+
exports.ListConnectedOrganizationMembers200ResponseConnectedOrganizationMembersInnerMemberStatusEnum = {
|
|
554
|
+
Registered: 'REGISTERED',
|
|
555
|
+
Invited: 'INVITED'
|
|
556
|
+
};
|
|
557
|
+
exports.ListConnectedOrganizations200ResponseConnectedOrganizationsInnerOrganizationStatusEnum = {
|
|
558
|
+
Pending: 'PENDING',
|
|
559
|
+
Approved: 'APPROVED',
|
|
560
|
+
Rejected: 'REJECTED'
|
|
561
|
+
};
|
|
529
562
|
exports.ListFraudReviews200ResponseFraudReviewsInnerStatusEnum = {
|
|
530
563
|
Flagged: 'flagged',
|
|
531
564
|
Blocked: 'blocked',
|
|
@@ -546,6 +579,7 @@ exports.ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum = {
|
|
|
546
579
|
EmailOnATremendousFraudList: 'Email on a Tremendous fraud list',
|
|
547
580
|
PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list',
|
|
548
581
|
IpRelatedToABlockedReward: 'IP related to a blocked reward',
|
|
582
|
+
DeviceRelatedToABlockedReward: 'Device related to a blocked reward',
|
|
549
583
|
BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward',
|
|
550
584
|
FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward',
|
|
551
585
|
EmailRelatedToABlockedReward: 'Email related to a blocked reward',
|
|
@@ -572,6 +606,17 @@ exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = {
|
|
|
572
606
|
CreditCard: 'credit_card',
|
|
573
607
|
Invoice: 'invoice'
|
|
574
608
|
};
|
|
609
|
+
exports.ListFundingSources200ResponseFundingSourcesInnerUsagePermissionsEnum = {
|
|
610
|
+
ApiOrders: 'api_orders',
|
|
611
|
+
DashboardOrders: 'dashboard_orders',
|
|
612
|
+
BalanceFunding: 'balance_funding'
|
|
613
|
+
};
|
|
614
|
+
exports.ListFundingSources200ResponseFundingSourcesInnerStatusEnum = {
|
|
615
|
+
Active: 'active',
|
|
616
|
+
Deleted: 'deleted',
|
|
617
|
+
PendingConfirmation: 'pending_confirmation',
|
|
618
|
+
Failed: 'failed'
|
|
619
|
+
};
|
|
575
620
|
exports.ListFundingSources200ResponseFundingSourcesInnerTypeEnum = {
|
|
576
621
|
Commercial: 'COMMERCIAL',
|
|
577
622
|
ProForma: 'PRO_FORMA',
|
|
@@ -628,6 +673,7 @@ exports.ListOrganizations200ResponseOrganizationsInnerStatusEnum = {
|
|
|
628
673
|
exports.ListProductsResponseProductsInnerCategoryEnum = {
|
|
629
674
|
Ach: 'ach',
|
|
630
675
|
Charity: 'charity',
|
|
676
|
+
InstantDebitTransfer: 'instant_debit_transfer',
|
|
631
677
|
MerchantCard: 'merchant_card',
|
|
632
678
|
Paypal: 'paypal',
|
|
633
679
|
Venmo: 'venmo',
|
|
@@ -997,6 +1043,7 @@ exports.PayoutStatusEnum = {
|
|
|
997
1043
|
exports.ProductCategoryEnum = {
|
|
998
1044
|
Ach: 'ach',
|
|
999
1045
|
Charity: 'charity',
|
|
1046
|
+
InstantDebitTransfer: 'instant_debit_transfer',
|
|
1000
1047
|
MerchantCard: 'merchant_card',
|
|
1001
1048
|
Paypal: 'paypal',
|
|
1002
1049
|
Venmo: 'venmo',
|
|
@@ -1773,6 +1820,598 @@ class CampaignsApi extends base_1.BaseAPI {
|
|
|
1773
1820
|
}
|
|
1774
1821
|
}
|
|
1775
1822
|
exports.CampaignsApi = CampaignsApi;
|
|
1823
|
+
/**
|
|
1824
|
+
* ConnectedOrganizationMembersApi - axios parameter creator
|
|
1825
|
+
* @export
|
|
1826
|
+
*/
|
|
1827
|
+
const ConnectedOrganizationMembersApiAxiosParamCreator = function (configuration) {
|
|
1828
|
+
return {
|
|
1829
|
+
/**
|
|
1830
|
+
* Create a connected organization member.
|
|
1831
|
+
* @summary Create connected organization member
|
|
1832
|
+
* @param {CreateConnectedOrganizationMemberRequest} createConnectedOrganizationMemberRequest Connected organization member to create
|
|
1833
|
+
* @param {*} [options] Override http request option.
|
|
1834
|
+
* @throws {RequiredError}
|
|
1835
|
+
*/
|
|
1836
|
+
createConnectedOrganizationMember: (createConnectedOrganizationMemberRequest_1, ...args_1) => __awaiter(this, [createConnectedOrganizationMemberRequest_1, ...args_1], void 0, function* (createConnectedOrganizationMemberRequest, options = {}) {
|
|
1837
|
+
// verify required parameter 'createConnectedOrganizationMemberRequest' is not null or undefined
|
|
1838
|
+
(0, common_1.assertParamExists)('createConnectedOrganizationMember', 'createConnectedOrganizationMemberRequest', createConnectedOrganizationMemberRequest);
|
|
1839
|
+
const localVarPath = `/connected_organization_members`;
|
|
1840
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1841
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1842
|
+
let baseOptions;
|
|
1843
|
+
if (configuration) {
|
|
1844
|
+
baseOptions = configuration.baseOptions;
|
|
1845
|
+
}
|
|
1846
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1847
|
+
const localVarHeaderParameter = {};
|
|
1848
|
+
const localVarQueryParameter = {};
|
|
1849
|
+
// authentication BearerApiKey required
|
|
1850
|
+
// http bearer authentication required
|
|
1851
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1852
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1853
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1854
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1855
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1856
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createConnectedOrganizationMemberRequest, localVarRequestOptions, configuration);
|
|
1857
|
+
return {
|
|
1858
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1859
|
+
options: localVarRequestOptions,
|
|
1860
|
+
};
|
|
1861
|
+
}),
|
|
1862
|
+
/**
|
|
1863
|
+
* Create a connected organization member session.
|
|
1864
|
+
* @summary Create connected organization member session
|
|
1865
|
+
* @param {string} id ID of the connected organization member.
|
|
1866
|
+
* @param {CreateConnectedOrganizationMemberSessionRequest} createConnectedOrganizationMemberSessionRequest Connected organization member requiring the session
|
|
1867
|
+
* @param {*} [options] Override http request option.
|
|
1868
|
+
* @throws {RequiredError}
|
|
1869
|
+
*/
|
|
1870
|
+
createConnectedOrganizationMemberSession: (id_1, createConnectedOrganizationMemberSessionRequest_1, ...args_1) => __awaiter(this, [id_1, createConnectedOrganizationMemberSessionRequest_1, ...args_1], void 0, function* (id, createConnectedOrganizationMemberSessionRequest, options = {}) {
|
|
1871
|
+
// verify required parameter 'id' is not null or undefined
|
|
1872
|
+
(0, common_1.assertParamExists)('createConnectedOrganizationMemberSession', 'id', id);
|
|
1873
|
+
// verify required parameter 'createConnectedOrganizationMemberSessionRequest' is not null or undefined
|
|
1874
|
+
(0, common_1.assertParamExists)('createConnectedOrganizationMemberSession', 'createConnectedOrganizationMemberSessionRequest', createConnectedOrganizationMemberSessionRequest);
|
|
1875
|
+
const localVarPath = `/connected_organization_members/{id}/sessions`
|
|
1876
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1877
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1878
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1879
|
+
let baseOptions;
|
|
1880
|
+
if (configuration) {
|
|
1881
|
+
baseOptions = configuration.baseOptions;
|
|
1882
|
+
}
|
|
1883
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1884
|
+
const localVarHeaderParameter = {};
|
|
1885
|
+
const localVarQueryParameter = {};
|
|
1886
|
+
// authentication BearerApiKey required
|
|
1887
|
+
// http bearer authentication required
|
|
1888
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1889
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1890
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1891
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1892
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1893
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createConnectedOrganizationMemberSessionRequest, localVarRequestOptions, configuration);
|
|
1894
|
+
return {
|
|
1895
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1896
|
+
options: localVarRequestOptions,
|
|
1897
|
+
};
|
|
1898
|
+
}),
|
|
1899
|
+
/**
|
|
1900
|
+
* Retrieve the connected organization member, identified by the given `id` in the URL
|
|
1901
|
+
* @summary Retrieve a connected organization member
|
|
1902
|
+
* @param {string} id ID of the connected organization member that should be retrieved.
|
|
1903
|
+
* @param {*} [options] Override http request option.
|
|
1904
|
+
* @throws {RequiredError}
|
|
1905
|
+
*/
|
|
1906
|
+
getConnectedOrganizationMember: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
1907
|
+
// verify required parameter 'id' is not null or undefined
|
|
1908
|
+
(0, common_1.assertParamExists)('getConnectedOrganizationMember', 'id', id);
|
|
1909
|
+
const localVarPath = `/connected_organization_members/{id}`
|
|
1910
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1911
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1912
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1913
|
+
let baseOptions;
|
|
1914
|
+
if (configuration) {
|
|
1915
|
+
baseOptions = configuration.baseOptions;
|
|
1916
|
+
}
|
|
1917
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1918
|
+
const localVarHeaderParameter = {};
|
|
1919
|
+
const localVarQueryParameter = {};
|
|
1920
|
+
// authentication BearerApiKey required
|
|
1921
|
+
// http bearer authentication required
|
|
1922
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1923
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1924
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1925
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1926
|
+
return {
|
|
1927
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1928
|
+
options: localVarRequestOptions,
|
|
1929
|
+
};
|
|
1930
|
+
}),
|
|
1931
|
+
/**
|
|
1932
|
+
* Retrieve a list of connected organization members.
|
|
1933
|
+
* @summary List connected organization members
|
|
1934
|
+
* @param {string} connectedOrganizationId ID of the connected organization.
|
|
1935
|
+
* @param {number} [offset] Offsets the returned list by the given number of connected organizations.
|
|
1936
|
+
* @param {number} [limit] Limits the number of connected organizations listed. The maximum value is 100 and the default is 10.
|
|
1937
|
+
* @param {*} [options] Override http request option.
|
|
1938
|
+
* @throws {RequiredError}
|
|
1939
|
+
*/
|
|
1940
|
+
listConnectedOrganizationMembers: (connectedOrganizationId_1, offset_1, limit_1, ...args_1) => __awaiter(this, [connectedOrganizationId_1, offset_1, limit_1, ...args_1], void 0, function* (connectedOrganizationId, offset, limit, options = {}) {
|
|
1941
|
+
// verify required parameter 'connectedOrganizationId' is not null or undefined
|
|
1942
|
+
(0, common_1.assertParamExists)('listConnectedOrganizationMembers', 'connectedOrganizationId', connectedOrganizationId);
|
|
1943
|
+
const localVarPath = `/connected_organization_members`;
|
|
1944
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1945
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1946
|
+
let baseOptions;
|
|
1947
|
+
if (configuration) {
|
|
1948
|
+
baseOptions = configuration.baseOptions;
|
|
1949
|
+
}
|
|
1950
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1951
|
+
const localVarHeaderParameter = {};
|
|
1952
|
+
const localVarQueryParameter = {};
|
|
1953
|
+
// authentication BearerApiKey required
|
|
1954
|
+
// http bearer authentication required
|
|
1955
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1956
|
+
if (connectedOrganizationId !== undefined) {
|
|
1957
|
+
localVarQueryParameter['connected_organization_id'] = connectedOrganizationId;
|
|
1958
|
+
}
|
|
1959
|
+
if (offset !== undefined) {
|
|
1960
|
+
localVarQueryParameter['offset'] = offset;
|
|
1961
|
+
}
|
|
1962
|
+
if (limit !== undefined) {
|
|
1963
|
+
localVarQueryParameter['limit'] = limit;
|
|
1964
|
+
}
|
|
1965
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1966
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1967
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1968
|
+
return {
|
|
1969
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1970
|
+
options: localVarRequestOptions,
|
|
1971
|
+
};
|
|
1972
|
+
}),
|
|
1973
|
+
};
|
|
1974
|
+
};
|
|
1975
|
+
exports.ConnectedOrganizationMembersApiAxiosParamCreator = ConnectedOrganizationMembersApiAxiosParamCreator;
|
|
1976
|
+
/**
|
|
1977
|
+
* ConnectedOrganizationMembersApi - functional programming interface
|
|
1978
|
+
* @export
|
|
1979
|
+
*/
|
|
1980
|
+
const ConnectedOrganizationMembersApiFp = function (configuration) {
|
|
1981
|
+
const localVarAxiosParamCreator = (0, exports.ConnectedOrganizationMembersApiAxiosParamCreator)(configuration);
|
|
1982
|
+
return {
|
|
1983
|
+
/**
|
|
1984
|
+
* Create a connected organization member.
|
|
1985
|
+
* @summary Create connected organization member
|
|
1986
|
+
* @param {CreateConnectedOrganizationMemberRequest} createConnectedOrganizationMemberRequest Connected organization member to create
|
|
1987
|
+
* @param {*} [options] Override http request option.
|
|
1988
|
+
* @throws {RequiredError}
|
|
1989
|
+
*/
|
|
1990
|
+
createConnectedOrganizationMember(createConnectedOrganizationMemberRequest, options) {
|
|
1991
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1992
|
+
var _a, _b, _c;
|
|
1993
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createConnectedOrganizationMember(createConnectedOrganizationMemberRequest, options);
|
|
1994
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1995
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectedOrganizationMembersApi.createConnectedOrganizationMember']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1996
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1997
|
+
});
|
|
1998
|
+
},
|
|
1999
|
+
/**
|
|
2000
|
+
* Create a connected organization member session.
|
|
2001
|
+
* @summary Create connected organization member session
|
|
2002
|
+
* @param {string} id ID of the connected organization member.
|
|
2003
|
+
* @param {CreateConnectedOrganizationMemberSessionRequest} createConnectedOrganizationMemberSessionRequest Connected organization member requiring the session
|
|
2004
|
+
* @param {*} [options] Override http request option.
|
|
2005
|
+
* @throws {RequiredError}
|
|
2006
|
+
*/
|
|
2007
|
+
createConnectedOrganizationMemberSession(id, createConnectedOrganizationMemberSessionRequest, options) {
|
|
2008
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2009
|
+
var _a, _b, _c;
|
|
2010
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createConnectedOrganizationMemberSession(id, createConnectedOrganizationMemberSessionRequest, options);
|
|
2011
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2012
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectedOrganizationMembersApi.createConnectedOrganizationMemberSession']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2013
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2014
|
+
});
|
|
2015
|
+
},
|
|
2016
|
+
/**
|
|
2017
|
+
* Retrieve the connected organization member, identified by the given `id` in the URL
|
|
2018
|
+
* @summary Retrieve a connected organization member
|
|
2019
|
+
* @param {string} id ID of the connected organization member that should be retrieved.
|
|
2020
|
+
* @param {*} [options] Override http request option.
|
|
2021
|
+
* @throws {RequiredError}
|
|
2022
|
+
*/
|
|
2023
|
+
getConnectedOrganizationMember(id, options) {
|
|
2024
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2025
|
+
var _a, _b, _c;
|
|
2026
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getConnectedOrganizationMember(id, options);
|
|
2027
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2028
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectedOrganizationMembersApi.getConnectedOrganizationMember']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2029
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2030
|
+
});
|
|
2031
|
+
},
|
|
2032
|
+
/**
|
|
2033
|
+
* Retrieve a list of connected organization members.
|
|
2034
|
+
* @summary List connected organization members
|
|
2035
|
+
* @param {string} connectedOrganizationId ID of the connected organization.
|
|
2036
|
+
* @param {number} [offset] Offsets the returned list by the given number of connected organizations.
|
|
2037
|
+
* @param {number} [limit] Limits the number of connected organizations listed. The maximum value is 100 and the default is 10.
|
|
2038
|
+
* @param {*} [options] Override http request option.
|
|
2039
|
+
* @throws {RequiredError}
|
|
2040
|
+
*/
|
|
2041
|
+
listConnectedOrganizationMembers(connectedOrganizationId, offset, limit, options) {
|
|
2042
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2043
|
+
var _a, _b, _c;
|
|
2044
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listConnectedOrganizationMembers(connectedOrganizationId, offset, limit, options);
|
|
2045
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2046
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectedOrganizationMembersApi.listConnectedOrganizationMembers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2047
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2048
|
+
});
|
|
2049
|
+
},
|
|
2050
|
+
};
|
|
2051
|
+
};
|
|
2052
|
+
exports.ConnectedOrganizationMembersApiFp = ConnectedOrganizationMembersApiFp;
|
|
2053
|
+
/**
|
|
2054
|
+
* ConnectedOrganizationMembersApi - factory interface
|
|
2055
|
+
* @export
|
|
2056
|
+
*/
|
|
2057
|
+
const ConnectedOrganizationMembersApiFactory = function (configuration, basePath, axios) {
|
|
2058
|
+
const localVarFp = (0, exports.ConnectedOrganizationMembersApiFp)(configuration);
|
|
2059
|
+
return {
|
|
2060
|
+
/**
|
|
2061
|
+
* Create a connected organization member.
|
|
2062
|
+
* @summary Create connected organization member
|
|
2063
|
+
* @param {CreateConnectedOrganizationMemberRequest} createConnectedOrganizationMemberRequest Connected organization member to create
|
|
2064
|
+
* @param {*} [options] Override http request option.
|
|
2065
|
+
* @throws {RequiredError}
|
|
2066
|
+
*/
|
|
2067
|
+
createConnectedOrganizationMember(createConnectedOrganizationMemberRequest, options) {
|
|
2068
|
+
return localVarFp.createConnectedOrganizationMember(createConnectedOrganizationMemberRequest, options).then((request) => request(axios, basePath));
|
|
2069
|
+
},
|
|
2070
|
+
/**
|
|
2071
|
+
* Create a connected organization member session.
|
|
2072
|
+
* @summary Create connected organization member session
|
|
2073
|
+
* @param {string} id ID of the connected organization member.
|
|
2074
|
+
* @param {CreateConnectedOrganizationMemberSessionRequest} createConnectedOrganizationMemberSessionRequest Connected organization member requiring the session
|
|
2075
|
+
* @param {*} [options] Override http request option.
|
|
2076
|
+
* @throws {RequiredError}
|
|
2077
|
+
*/
|
|
2078
|
+
createConnectedOrganizationMemberSession(id, createConnectedOrganizationMemberSessionRequest, options) {
|
|
2079
|
+
return localVarFp.createConnectedOrganizationMemberSession(id, createConnectedOrganizationMemberSessionRequest, options).then((request) => request(axios, basePath));
|
|
2080
|
+
},
|
|
2081
|
+
/**
|
|
2082
|
+
* Retrieve the connected organization member, identified by the given `id` in the URL
|
|
2083
|
+
* @summary Retrieve a connected organization member
|
|
2084
|
+
* @param {string} id ID of the connected organization member that should be retrieved.
|
|
2085
|
+
* @param {*} [options] Override http request option.
|
|
2086
|
+
* @throws {RequiredError}
|
|
2087
|
+
*/
|
|
2088
|
+
getConnectedOrganizationMember(id, options) {
|
|
2089
|
+
return localVarFp.getConnectedOrganizationMember(id, options).then((request) => request(axios, basePath));
|
|
2090
|
+
},
|
|
2091
|
+
/**
|
|
2092
|
+
* Retrieve a list of connected organization members.
|
|
2093
|
+
* @summary List connected organization members
|
|
2094
|
+
* @param {string} connectedOrganizationId ID of the connected organization.
|
|
2095
|
+
* @param {number} [offset] Offsets the returned list by the given number of connected organizations.
|
|
2096
|
+
* @param {number} [limit] Limits the number of connected organizations listed. The maximum value is 100 and the default is 10.
|
|
2097
|
+
* @param {*} [options] Override http request option.
|
|
2098
|
+
* @throws {RequiredError}
|
|
2099
|
+
*/
|
|
2100
|
+
listConnectedOrganizationMembers(connectedOrganizationId, offset, limit, options) {
|
|
2101
|
+
return localVarFp.listConnectedOrganizationMembers(connectedOrganizationId, offset, limit, options).then((request) => request(axios, basePath));
|
|
2102
|
+
},
|
|
2103
|
+
};
|
|
2104
|
+
};
|
|
2105
|
+
exports.ConnectedOrganizationMembersApiFactory = ConnectedOrganizationMembersApiFactory;
|
|
2106
|
+
/**
|
|
2107
|
+
* ConnectedOrganizationMembersApi - object-oriented interface
|
|
2108
|
+
* @export
|
|
2109
|
+
* @class ConnectedOrganizationMembersApi
|
|
2110
|
+
* @extends {BaseAPI}
|
|
2111
|
+
*/
|
|
2112
|
+
class ConnectedOrganizationMembersApi extends base_1.BaseAPI {
|
|
2113
|
+
/**
|
|
2114
|
+
* Create a connected organization member.
|
|
2115
|
+
* @summary Create connected organization member
|
|
2116
|
+
* @param {CreateConnectedOrganizationMemberRequest} createConnectedOrganizationMemberRequest Connected organization member to create
|
|
2117
|
+
* @param {*} [options] Override http request option.
|
|
2118
|
+
* @throws {RequiredError}
|
|
2119
|
+
* @memberof ConnectedOrganizationMembersApi
|
|
2120
|
+
*/
|
|
2121
|
+
createConnectedOrganizationMember(createConnectedOrganizationMemberRequest, options) {
|
|
2122
|
+
return (0, exports.ConnectedOrganizationMembersApiFp)(this.configuration).createConnectedOrganizationMember(createConnectedOrganizationMemberRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2123
|
+
}
|
|
2124
|
+
/**
|
|
2125
|
+
* Create a connected organization member session.
|
|
2126
|
+
* @summary Create connected organization member session
|
|
2127
|
+
* @param {string} id ID of the connected organization member.
|
|
2128
|
+
* @param {CreateConnectedOrganizationMemberSessionRequest} createConnectedOrganizationMemberSessionRequest Connected organization member requiring the session
|
|
2129
|
+
* @param {*} [options] Override http request option.
|
|
2130
|
+
* @throws {RequiredError}
|
|
2131
|
+
* @memberof ConnectedOrganizationMembersApi
|
|
2132
|
+
*/
|
|
2133
|
+
createConnectedOrganizationMemberSession(id, createConnectedOrganizationMemberSessionRequest, options) {
|
|
2134
|
+
return (0, exports.ConnectedOrganizationMembersApiFp)(this.configuration).createConnectedOrganizationMemberSession(id, createConnectedOrganizationMemberSessionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2135
|
+
}
|
|
2136
|
+
/**
|
|
2137
|
+
* Retrieve the connected organization member, identified by the given `id` in the URL
|
|
2138
|
+
* @summary Retrieve a connected organization member
|
|
2139
|
+
* @param {string} id ID of the connected organization member that should be retrieved.
|
|
2140
|
+
* @param {*} [options] Override http request option.
|
|
2141
|
+
* @throws {RequiredError}
|
|
2142
|
+
* @memberof ConnectedOrganizationMembersApi
|
|
2143
|
+
*/
|
|
2144
|
+
getConnectedOrganizationMember(id, options) {
|
|
2145
|
+
return (0, exports.ConnectedOrganizationMembersApiFp)(this.configuration).getConnectedOrganizationMember(id, options).then((request) => request(this.axios, this.basePath));
|
|
2146
|
+
}
|
|
2147
|
+
/**
|
|
2148
|
+
* Retrieve a list of connected organization members.
|
|
2149
|
+
* @summary List connected organization members
|
|
2150
|
+
* @param {string} connectedOrganizationId ID of the connected organization.
|
|
2151
|
+
* @param {number} [offset] Offsets the returned list by the given number of connected organizations.
|
|
2152
|
+
* @param {number} [limit] Limits the number of connected organizations listed. The maximum value is 100 and the default is 10.
|
|
2153
|
+
* @param {*} [options] Override http request option.
|
|
2154
|
+
* @throws {RequiredError}
|
|
2155
|
+
* @memberof ConnectedOrganizationMembersApi
|
|
2156
|
+
*/
|
|
2157
|
+
listConnectedOrganizationMembers(connectedOrganizationId, offset, limit, options) {
|
|
2158
|
+
return (0, exports.ConnectedOrganizationMembersApiFp)(this.configuration).listConnectedOrganizationMembers(connectedOrganizationId, offset, limit, options).then((request) => request(this.axios, this.basePath));
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
exports.ConnectedOrganizationMembersApi = ConnectedOrganizationMembersApi;
|
|
2162
|
+
/**
|
|
2163
|
+
* ConnectedOrganizationsApi - axios parameter creator
|
|
2164
|
+
* @export
|
|
2165
|
+
*/
|
|
2166
|
+
const ConnectedOrganizationsApiAxiosParamCreator = function (configuration) {
|
|
2167
|
+
return {
|
|
2168
|
+
/**
|
|
2169
|
+
* Create a connected organization.
|
|
2170
|
+
* @summary Create connected organization
|
|
2171
|
+
* @param {CreateConnectedOrganizationRequest} createConnectedOrganizationRequest Connected organization to create
|
|
2172
|
+
* @param {*} [options] Override http request option.
|
|
2173
|
+
* @throws {RequiredError}
|
|
2174
|
+
*/
|
|
2175
|
+
createConnectedOrganization: (createConnectedOrganizationRequest_1, ...args_1) => __awaiter(this, [createConnectedOrganizationRequest_1, ...args_1], void 0, function* (createConnectedOrganizationRequest, options = {}) {
|
|
2176
|
+
// verify required parameter 'createConnectedOrganizationRequest' is not null or undefined
|
|
2177
|
+
(0, common_1.assertParamExists)('createConnectedOrganization', 'createConnectedOrganizationRequest', createConnectedOrganizationRequest);
|
|
2178
|
+
const localVarPath = `/connected_organizations`;
|
|
2179
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2180
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2181
|
+
let baseOptions;
|
|
2182
|
+
if (configuration) {
|
|
2183
|
+
baseOptions = configuration.baseOptions;
|
|
2184
|
+
}
|
|
2185
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2186
|
+
const localVarHeaderParameter = {};
|
|
2187
|
+
const localVarQueryParameter = {};
|
|
2188
|
+
// authentication BearerApiKey required
|
|
2189
|
+
// http bearer authentication required
|
|
2190
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2191
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2192
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2193
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2194
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2195
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createConnectedOrganizationRequest, localVarRequestOptions, configuration);
|
|
2196
|
+
return {
|
|
2197
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2198
|
+
options: localVarRequestOptions,
|
|
2199
|
+
};
|
|
2200
|
+
}),
|
|
2201
|
+
/**
|
|
2202
|
+
* Retrieve the connected organization, identified by the given `id` in the URL
|
|
2203
|
+
* @summary Retrieve a connected organization
|
|
2204
|
+
* @param {string} id ID of the connected organization that should be retrieved.
|
|
2205
|
+
* @param {*} [options] Override http request option.
|
|
2206
|
+
* @throws {RequiredError}
|
|
2207
|
+
*/
|
|
2208
|
+
getConnectedOrganization: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
2209
|
+
// verify required parameter 'id' is not null or undefined
|
|
2210
|
+
(0, common_1.assertParamExists)('getConnectedOrganization', 'id', id);
|
|
2211
|
+
const localVarPath = `/connected_organizations/{id}`
|
|
2212
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2213
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2214
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2215
|
+
let baseOptions;
|
|
2216
|
+
if (configuration) {
|
|
2217
|
+
baseOptions = configuration.baseOptions;
|
|
2218
|
+
}
|
|
2219
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2220
|
+
const localVarHeaderParameter = {};
|
|
2221
|
+
const localVarQueryParameter = {};
|
|
2222
|
+
// authentication BearerApiKey required
|
|
2223
|
+
// http bearer authentication required
|
|
2224
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2225
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2226
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2227
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2228
|
+
return {
|
|
2229
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2230
|
+
options: localVarRequestOptions,
|
|
2231
|
+
};
|
|
2232
|
+
}),
|
|
2233
|
+
/**
|
|
2234
|
+
* Retrieve a list of connected organizations.
|
|
2235
|
+
* @summary List connected organizations
|
|
2236
|
+
* @param {number} [offset] Offsets the returned list by the given number of connected organizations.
|
|
2237
|
+
* @param {number} [limit] Limits the number of connected organizations listed. The maximum value is 100 and the default is 10.
|
|
2238
|
+
* @param {*} [options] Override http request option.
|
|
2239
|
+
* @throws {RequiredError}
|
|
2240
|
+
*/
|
|
2241
|
+
listConnectedOrganizations: (offset_1, limit_1, ...args_1) => __awaiter(this, [offset_1, limit_1, ...args_1], void 0, function* (offset, limit, options = {}) {
|
|
2242
|
+
const localVarPath = `/connected_organizations`;
|
|
2243
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2244
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2245
|
+
let baseOptions;
|
|
2246
|
+
if (configuration) {
|
|
2247
|
+
baseOptions = configuration.baseOptions;
|
|
2248
|
+
}
|
|
2249
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2250
|
+
const localVarHeaderParameter = {};
|
|
2251
|
+
const localVarQueryParameter = {};
|
|
2252
|
+
// authentication BearerApiKey required
|
|
2253
|
+
// http bearer authentication required
|
|
2254
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2255
|
+
if (offset !== undefined) {
|
|
2256
|
+
localVarQueryParameter['offset'] = offset;
|
|
2257
|
+
}
|
|
2258
|
+
if (limit !== undefined) {
|
|
2259
|
+
localVarQueryParameter['limit'] = limit;
|
|
2260
|
+
}
|
|
2261
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2262
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2263
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2264
|
+
return {
|
|
2265
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2266
|
+
options: localVarRequestOptions,
|
|
2267
|
+
};
|
|
2268
|
+
}),
|
|
2269
|
+
};
|
|
2270
|
+
};
|
|
2271
|
+
exports.ConnectedOrganizationsApiAxiosParamCreator = ConnectedOrganizationsApiAxiosParamCreator;
|
|
2272
|
+
/**
|
|
2273
|
+
* ConnectedOrganizationsApi - functional programming interface
|
|
2274
|
+
* @export
|
|
2275
|
+
*/
|
|
2276
|
+
const ConnectedOrganizationsApiFp = function (configuration) {
|
|
2277
|
+
const localVarAxiosParamCreator = (0, exports.ConnectedOrganizationsApiAxiosParamCreator)(configuration);
|
|
2278
|
+
return {
|
|
2279
|
+
/**
|
|
2280
|
+
* Create a connected organization.
|
|
2281
|
+
* @summary Create connected organization
|
|
2282
|
+
* @param {CreateConnectedOrganizationRequest} createConnectedOrganizationRequest Connected organization to create
|
|
2283
|
+
* @param {*} [options] Override http request option.
|
|
2284
|
+
* @throws {RequiredError}
|
|
2285
|
+
*/
|
|
2286
|
+
createConnectedOrganization(createConnectedOrganizationRequest, options) {
|
|
2287
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2288
|
+
var _a, _b, _c;
|
|
2289
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createConnectedOrganization(createConnectedOrganizationRequest, options);
|
|
2290
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2291
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectedOrganizationsApi.createConnectedOrganization']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2292
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2293
|
+
});
|
|
2294
|
+
},
|
|
2295
|
+
/**
|
|
2296
|
+
* Retrieve the connected organization, identified by the given `id` in the URL
|
|
2297
|
+
* @summary Retrieve a connected organization
|
|
2298
|
+
* @param {string} id ID of the connected organization that should be retrieved.
|
|
2299
|
+
* @param {*} [options] Override http request option.
|
|
2300
|
+
* @throws {RequiredError}
|
|
2301
|
+
*/
|
|
2302
|
+
getConnectedOrganization(id, options) {
|
|
2303
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2304
|
+
var _a, _b, _c;
|
|
2305
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getConnectedOrganization(id, options);
|
|
2306
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2307
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectedOrganizationsApi.getConnectedOrganization']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2308
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2309
|
+
});
|
|
2310
|
+
},
|
|
2311
|
+
/**
|
|
2312
|
+
* Retrieve a list of connected organizations.
|
|
2313
|
+
* @summary List connected organizations
|
|
2314
|
+
* @param {number} [offset] Offsets the returned list by the given number of connected organizations.
|
|
2315
|
+
* @param {number} [limit] Limits the number of connected organizations listed. The maximum value is 100 and the default is 10.
|
|
2316
|
+
* @param {*} [options] Override http request option.
|
|
2317
|
+
* @throws {RequiredError}
|
|
2318
|
+
*/
|
|
2319
|
+
listConnectedOrganizations(offset, limit, options) {
|
|
2320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2321
|
+
var _a, _b, _c;
|
|
2322
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listConnectedOrganizations(offset, limit, options);
|
|
2323
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2324
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConnectedOrganizationsApi.listConnectedOrganizations']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2325
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2326
|
+
});
|
|
2327
|
+
},
|
|
2328
|
+
};
|
|
2329
|
+
};
|
|
2330
|
+
exports.ConnectedOrganizationsApiFp = ConnectedOrganizationsApiFp;
|
|
2331
|
+
/**
|
|
2332
|
+
* ConnectedOrganizationsApi - factory interface
|
|
2333
|
+
* @export
|
|
2334
|
+
*/
|
|
2335
|
+
const ConnectedOrganizationsApiFactory = function (configuration, basePath, axios) {
|
|
2336
|
+
const localVarFp = (0, exports.ConnectedOrganizationsApiFp)(configuration);
|
|
2337
|
+
return {
|
|
2338
|
+
/**
|
|
2339
|
+
* Create a connected organization.
|
|
2340
|
+
* @summary Create connected organization
|
|
2341
|
+
* @param {CreateConnectedOrganizationRequest} createConnectedOrganizationRequest Connected organization to create
|
|
2342
|
+
* @param {*} [options] Override http request option.
|
|
2343
|
+
* @throws {RequiredError}
|
|
2344
|
+
*/
|
|
2345
|
+
createConnectedOrganization(createConnectedOrganizationRequest, options) {
|
|
2346
|
+
return localVarFp.createConnectedOrganization(createConnectedOrganizationRequest, options).then((request) => request(axios, basePath));
|
|
2347
|
+
},
|
|
2348
|
+
/**
|
|
2349
|
+
* Retrieve the connected organization, identified by the given `id` in the URL
|
|
2350
|
+
* @summary Retrieve a connected organization
|
|
2351
|
+
* @param {string} id ID of the connected organization that should be retrieved.
|
|
2352
|
+
* @param {*} [options] Override http request option.
|
|
2353
|
+
* @throws {RequiredError}
|
|
2354
|
+
*/
|
|
2355
|
+
getConnectedOrganization(id, options) {
|
|
2356
|
+
return localVarFp.getConnectedOrganization(id, options).then((request) => request(axios, basePath));
|
|
2357
|
+
},
|
|
2358
|
+
/**
|
|
2359
|
+
* Retrieve a list of connected organizations.
|
|
2360
|
+
* @summary List connected organizations
|
|
2361
|
+
* @param {number} [offset] Offsets the returned list by the given number of connected organizations.
|
|
2362
|
+
* @param {number} [limit] Limits the number of connected organizations listed. The maximum value is 100 and the default is 10.
|
|
2363
|
+
* @param {*} [options] Override http request option.
|
|
2364
|
+
* @throws {RequiredError}
|
|
2365
|
+
*/
|
|
2366
|
+
listConnectedOrganizations(offset, limit, options) {
|
|
2367
|
+
return localVarFp.listConnectedOrganizations(offset, limit, options).then((request) => request(axios, basePath));
|
|
2368
|
+
},
|
|
2369
|
+
};
|
|
2370
|
+
};
|
|
2371
|
+
exports.ConnectedOrganizationsApiFactory = ConnectedOrganizationsApiFactory;
|
|
2372
|
+
/**
|
|
2373
|
+
* ConnectedOrganizationsApi - object-oriented interface
|
|
2374
|
+
* @export
|
|
2375
|
+
* @class ConnectedOrganizationsApi
|
|
2376
|
+
* @extends {BaseAPI}
|
|
2377
|
+
*/
|
|
2378
|
+
class ConnectedOrganizationsApi extends base_1.BaseAPI {
|
|
2379
|
+
/**
|
|
2380
|
+
* Create a connected organization.
|
|
2381
|
+
* @summary Create connected organization
|
|
2382
|
+
* @param {CreateConnectedOrganizationRequest} createConnectedOrganizationRequest Connected organization to create
|
|
2383
|
+
* @param {*} [options] Override http request option.
|
|
2384
|
+
* @throws {RequiredError}
|
|
2385
|
+
* @memberof ConnectedOrganizationsApi
|
|
2386
|
+
*/
|
|
2387
|
+
createConnectedOrganization(createConnectedOrganizationRequest, options) {
|
|
2388
|
+
return (0, exports.ConnectedOrganizationsApiFp)(this.configuration).createConnectedOrganization(createConnectedOrganizationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2389
|
+
}
|
|
2390
|
+
/**
|
|
2391
|
+
* Retrieve the connected organization, identified by the given `id` in the URL
|
|
2392
|
+
* @summary Retrieve a connected organization
|
|
2393
|
+
* @param {string} id ID of the connected organization that should be retrieved.
|
|
2394
|
+
* @param {*} [options] Override http request option.
|
|
2395
|
+
* @throws {RequiredError}
|
|
2396
|
+
* @memberof ConnectedOrganizationsApi
|
|
2397
|
+
*/
|
|
2398
|
+
getConnectedOrganization(id, options) {
|
|
2399
|
+
return (0, exports.ConnectedOrganizationsApiFp)(this.configuration).getConnectedOrganization(id, options).then((request) => request(this.axios, this.basePath));
|
|
2400
|
+
}
|
|
2401
|
+
/**
|
|
2402
|
+
* Retrieve a list of connected organizations.
|
|
2403
|
+
* @summary List connected organizations
|
|
2404
|
+
* @param {number} [offset] Offsets the returned list by the given number of connected organizations.
|
|
2405
|
+
* @param {number} [limit] Limits the number of connected organizations listed. The maximum value is 100 and the default is 10.
|
|
2406
|
+
* @param {*} [options] Override http request option.
|
|
2407
|
+
* @throws {RequiredError}
|
|
2408
|
+
* @memberof ConnectedOrganizationsApi
|
|
2409
|
+
*/
|
|
2410
|
+
listConnectedOrganizations(offset, limit, options) {
|
|
2411
|
+
return (0, exports.ConnectedOrganizationsApiFp)(this.configuration).listConnectedOrganizations(offset, limit, options).then((request) => request(this.axios, this.basePath));
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
exports.ConnectedOrganizationsApi = ConnectedOrganizationsApi;
|
|
1776
2415
|
/**
|
|
1777
2416
|
* FieldsApi - axios parameter creator
|
|
1778
2417
|
* @export
|
|
@@ -3614,7 +4253,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
3614
4253
|
};
|
|
3615
4254
|
}),
|
|
3616
4255
|
/**
|
|
3617
|
-
* Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous's balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body.
|
|
4256
|
+
* Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous's balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">meta</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Customizable reward delivery metadata, taking precedence over the related campaign settings.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">sender_name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The "sender name" used in the delivery. If it's an email reward, "via Tremendous" will be appended to the value. Please note that you cannot customize the sender email.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">subject_line</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The subject line used in the delivery.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">message</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The content of the message of the reward, shown in the email / SMS and on the landing page.</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://developers.tremendous.com/reference/list-funding-sources). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://developers.tremendous.com/docs/sandbox-environment). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same `external_id` are idempotent. Submitting an order with an already existing `external_id` will not create a new order. If the payload is the same as a previously issued order, our API will return a `201` response code, along with a representation of the already-existing order in the response body. If the `external_id` used is for an order with different parameters (e.g. amount, recipient), our API will return a `409` response code, indicating a conflicting resource.
|
|
3618
4257
|
* @summary Create order
|
|
3619
4258
|
* @param {CreateOrderRequest} createOrderRequest Order to create
|
|
3620
4259
|
* @param {*} [options] Override http request option.
|
|
@@ -3789,7 +4428,7 @@ const OrdersApiFp = function (configuration) {
|
|
|
3789
4428
|
});
|
|
3790
4429
|
},
|
|
3791
4430
|
/**
|
|
3792
|
-
* Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous's balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body.
|
|
4431
|
+
* Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous's balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">meta</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Customizable reward delivery metadata, taking precedence over the related campaign settings.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">sender_name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The "sender name" used in the delivery. If it's an email reward, "via Tremendous" will be appended to the value. Please note that you cannot customize the sender email.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">subject_line</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The subject line used in the delivery.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">message</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The content of the message of the reward, shown in the email / SMS and on the landing page.</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://developers.tremendous.com/reference/list-funding-sources). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://developers.tremendous.com/docs/sandbox-environment). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same `external_id` are idempotent. Submitting an order with an already existing `external_id` will not create a new order. If the payload is the same as a previously issued order, our API will return a `201` response code, along with a representation of the already-existing order in the response body. If the `external_id` used is for an order with different parameters (e.g. amount, recipient), our API will return a `409` response code, indicating a conflicting resource.
|
|
3793
4432
|
* @summary Create order
|
|
3794
4433
|
* @param {CreateOrderRequest} createOrderRequest Order to create
|
|
3795
4434
|
* @param {*} [options] Override http request option.
|
|
@@ -3878,7 +4517,7 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
3878
4517
|
return localVarFp.approveOrder(id, options).then((request) => request(axios, basePath));
|
|
3879
4518
|
},
|
|
3880
4519
|
/**
|
|
3881
|
-
* Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous's balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body.
|
|
4520
|
+
* Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous's balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">meta</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Customizable reward delivery metadata, taking precedence over the related campaign settings.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">sender_name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The "sender name" used in the delivery. If it's an email reward, "via Tremendous" will be appended to the value. Please note that you cannot customize the sender email.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">subject_line</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The subject line used in the delivery.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">message</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The content of the message of the reward, shown in the email / SMS and on the landing page.</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://developers.tremendous.com/reference/list-funding-sources). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://developers.tremendous.com/docs/sandbox-environment). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same `external_id` are idempotent. Submitting an order with an already existing `external_id` will not create a new order. If the payload is the same as a previously issued order, our API will return a `201` response code, along with a representation of the already-existing order in the response body. If the `external_id` used is for an order with different parameters (e.g. amount, recipient), our API will return a `409` response code, indicating a conflicting resource.
|
|
3882
4521
|
* @summary Create order
|
|
3883
4522
|
* @param {CreateOrderRequest} createOrderRequest Order to create
|
|
3884
4523
|
* @param {*} [options] Override http request option.
|
|
@@ -3944,7 +4583,7 @@ class OrdersApi extends base_1.BaseAPI {
|
|
|
3944
4583
|
return (0, exports.OrdersApiFp)(this.configuration).approveOrder(id, options).then((request) => request(this.axios, this.basePath));
|
|
3945
4584
|
}
|
|
3946
4585
|
/**
|
|
3947
|
-
* Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous's balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body.
|
|
4586
|
+
* Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous's balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">label</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Label of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">meta</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Customizable reward delivery metadata, taking precedence over the related campaign settings.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">sender_name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The "sender name" used in the delivery. If it's an email reward, "via Tremendous" will be appended to the value. Please note that you cannot customize the sender email.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">subject_line</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The subject line used in the delivery.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">message</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>The content of the message of the reward, shown in the email / SMS and on the landing page.</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://developers.tremendous.com/reference/list-funding-sources). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://developers.tremendous.com/docs/sandbox-environment). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same `external_id` are idempotent. Submitting an order with an already existing `external_id` will not create a new order. If the payload is the same as a previously issued order, our API will return a `201` response code, along with a representation of the already-existing order in the response body. If the `external_id` used is for an order with different parameters (e.g. amount, recipient), our API will return a `409` response code, indicating a conflicting resource.
|
|
3948
4587
|
* @summary Create order
|
|
3949
4588
|
* @param {CreateOrderRequest} createOrderRequest Order to create
|
|
3950
4589
|
* @param {*} [options] Override http request option.
|
|
@@ -4485,7 +5124,7 @@ exports.ProductsApi = ProductsApi;
|
|
|
4485
5124
|
const ReportsApiAxiosParamCreator = function (configuration) {
|
|
4486
5125
|
return {
|
|
4487
5126
|
/**
|
|
4488
|
-
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be
|
|
5127
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simultaneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
4489
5128
|
* @summary Create report
|
|
4490
5129
|
* @param {CreateReportRequest} createReportRequest Report to create
|
|
4491
5130
|
* @param {*} [options] Override http request option.
|
|
@@ -4560,7 +5199,7 @@ const ReportsApiFp = function (configuration) {
|
|
|
4560
5199
|
const localVarAxiosParamCreator = (0, exports.ReportsApiAxiosParamCreator)(configuration);
|
|
4561
5200
|
return {
|
|
4562
5201
|
/**
|
|
4563
|
-
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be
|
|
5202
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simultaneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
4564
5203
|
* @summary Create report
|
|
4565
5204
|
* @param {CreateReportRequest} createReportRequest Report to create
|
|
4566
5205
|
* @param {*} [options] Override http request option.
|
|
@@ -4602,7 +5241,7 @@ const ReportsApiFactory = function (configuration, basePath, axios) {
|
|
|
4602
5241
|
const localVarFp = (0, exports.ReportsApiFp)(configuration);
|
|
4603
5242
|
return {
|
|
4604
5243
|
/**
|
|
4605
|
-
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be
|
|
5244
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simultaneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
4606
5245
|
* @summary Create report
|
|
4607
5246
|
* @param {CreateReportRequest} createReportRequest Report to create
|
|
4608
5247
|
* @param {*} [options] Override http request option.
|
|
@@ -4632,7 +5271,7 @@ exports.ReportsApiFactory = ReportsApiFactory;
|
|
|
4632
5271
|
*/
|
|
4633
5272
|
class ReportsApi extends base_1.BaseAPI {
|
|
4634
5273
|
/**
|
|
4635
|
-
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be
|
|
5274
|
+
* Creating a report allows your organization to programmatically retrieve information that\'s available in our dashboard UI. This request creates a new report object with a unique ID, and kicks off an async report generation. To retrieve a completed report, either poll `/api/v2/reports/{id}` or listen for REPORTS webhook event. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">report_type</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Type of report for retrieval. <table> <thead> <tr> <th>Report type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>digital_rewards</code></td> <td>Report for Tremendous digital reward history</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">format</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Format the report will be generated in. <table> <thead> <tr> <th>Format</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>csv</code></td> <td>CSV format for report</td> </tr> </tbody> </table></p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">filters</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters to apply to the report. Corresponds to the filters provided in the dashboard</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">digital_rewards</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Filters object for a <code>report_type: digital_rewards</code> report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Amount of the rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Minimum amount of the rewards that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Maximum amount of the rewards that should be returned in the report</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous campaign that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Creation dates of rewards returned in the report</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">gte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Minimum date the reward was created</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">lte</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Maximum date the reward was created</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivered_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Delivery date for gifts that should be returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery_method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Delivery method for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the Tremendous order that this report should be limited to</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">order_status</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Order status for rewards returned in the report</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">status</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>Status for rewards returned in the report</p> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ## Rate limits Some reports may take a long time to generate and we limit the number of reports that can be simultaneously generated by an organization at a given time. If you exceed the rate limit, you\'ll receive a `429` response.
|
|
4636
5275
|
* @summary Create report
|
|
4637
5276
|
* @param {CreateReportRequest} createReportRequest Report to create
|
|
4638
5277
|
* @param {*} [options] Override http request option.
|
|
@@ -4662,16 +5301,16 @@ exports.ReportsApi = ReportsApi;
|
|
|
4662
5301
|
const RewardsApiAxiosParamCreator = function (configuration) {
|
|
4663
5302
|
return {
|
|
4664
5303
|
/**
|
|
4665
|
-
*
|
|
4666
|
-
* @summary
|
|
4667
|
-
* @param {string} id ID of the reward
|
|
5304
|
+
* Cancels a reward, identified by the given `id` in the URL. Only non-expired rewards with a delivery failure can be canceled.
|
|
5305
|
+
* @summary Cancel reward
|
|
5306
|
+
* @param {string} id ID of the reward that should be canceled
|
|
4668
5307
|
* @param {*} [options] Override http request option.
|
|
4669
5308
|
* @throws {RequiredError}
|
|
4670
5309
|
*/
|
|
4671
|
-
|
|
5310
|
+
cancelReward: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
4672
5311
|
// verify required parameter 'id' is not null or undefined
|
|
4673
|
-
(0, common_1.assertParamExists)('
|
|
4674
|
-
const localVarPath = `/rewards/{id}/
|
|
5312
|
+
(0, common_1.assertParamExists)('cancelReward', 'id', id);
|
|
5313
|
+
const localVarPath = `/rewards/{id}/cancel`
|
|
4675
5314
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4676
5315
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4677
5316
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -4694,16 +5333,16 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
4694
5333
|
};
|
|
4695
5334
|
}),
|
|
4696
5335
|
/**
|
|
4697
|
-
* Generate a
|
|
4698
|
-
* @summary Generate a reward
|
|
5336
|
+
* Generate a redemption link for the reward identified by the `id` in the URL
|
|
5337
|
+
* @summary Generate a reward URL
|
|
4699
5338
|
* @param {string} id ID of the reward
|
|
4700
5339
|
* @param {*} [options] Override http request option.
|
|
4701
5340
|
* @throws {RequiredError}
|
|
4702
5341
|
*/
|
|
4703
|
-
|
|
5342
|
+
generateRewardLink: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
4704
5343
|
// verify required parameter 'id' is not null or undefined
|
|
4705
|
-
(0, common_1.assertParamExists)('
|
|
4706
|
-
const localVarPath = `/rewards/{id}/
|
|
5344
|
+
(0, common_1.assertParamExists)('generateRewardLink', 'id', id);
|
|
5345
|
+
const localVarPath = `/rewards/{id}/generate_link`
|
|
4707
5346
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
4708
5347
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4709
5348
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -4835,34 +5474,34 @@ const RewardsApiFp = function (configuration) {
|
|
|
4835
5474
|
const localVarAxiosParamCreator = (0, exports.RewardsApiAxiosParamCreator)(configuration);
|
|
4836
5475
|
return {
|
|
4837
5476
|
/**
|
|
4838
|
-
*
|
|
4839
|
-
* @summary
|
|
4840
|
-
* @param {string} id ID of the reward
|
|
5477
|
+
* Cancels a reward, identified by the given `id` in the URL. Only non-expired rewards with a delivery failure can be canceled.
|
|
5478
|
+
* @summary Cancel reward
|
|
5479
|
+
* @param {string} id ID of the reward that should be canceled
|
|
4841
5480
|
* @param {*} [options] Override http request option.
|
|
4842
5481
|
* @throws {RequiredError}
|
|
4843
5482
|
*/
|
|
4844
|
-
|
|
5483
|
+
cancelReward(id, options) {
|
|
4845
5484
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4846
5485
|
var _a, _b, _c;
|
|
4847
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
5486
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelReward(id, options);
|
|
4848
5487
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4849
|
-
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.
|
|
5488
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.cancelReward']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4850
5489
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4851
5490
|
});
|
|
4852
5491
|
},
|
|
4853
5492
|
/**
|
|
4854
|
-
* Generate a
|
|
4855
|
-
* @summary Generate a reward
|
|
5493
|
+
* Generate a redemption link for the reward identified by the `id` in the URL
|
|
5494
|
+
* @summary Generate a reward URL
|
|
4856
5495
|
* @param {string} id ID of the reward
|
|
4857
5496
|
* @param {*} [options] Override http request option.
|
|
4858
5497
|
* @throws {RequiredError}
|
|
4859
5498
|
*/
|
|
4860
|
-
|
|
5499
|
+
generateRewardLink(id, options) {
|
|
4861
5500
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4862
5501
|
var _a, _b, _c;
|
|
4863
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.
|
|
5502
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.generateRewardLink(id, options);
|
|
4864
5503
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4865
|
-
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.
|
|
5504
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.generateRewardLink']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4866
5505
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4867
5506
|
});
|
|
4868
5507
|
},
|
|
@@ -4926,24 +5565,24 @@ const RewardsApiFactory = function (configuration, basePath, axios) {
|
|
|
4926
5565
|
const localVarFp = (0, exports.RewardsApiFp)(configuration);
|
|
4927
5566
|
return {
|
|
4928
5567
|
/**
|
|
4929
|
-
*
|
|
4930
|
-
* @summary
|
|
4931
|
-
* @param {string} id ID of the reward
|
|
5568
|
+
* Cancels a reward, identified by the given `id` in the URL. Only non-expired rewards with a delivery failure can be canceled.
|
|
5569
|
+
* @summary Cancel reward
|
|
5570
|
+
* @param {string} id ID of the reward that should be canceled
|
|
4932
5571
|
* @param {*} [options] Override http request option.
|
|
4933
5572
|
* @throws {RequiredError}
|
|
4934
5573
|
*/
|
|
4935
|
-
|
|
4936
|
-
return localVarFp.
|
|
5574
|
+
cancelReward(id, options) {
|
|
5575
|
+
return localVarFp.cancelReward(id, options).then((request) => request(axios, basePath));
|
|
4937
5576
|
},
|
|
4938
5577
|
/**
|
|
4939
|
-
* Generate a
|
|
4940
|
-
* @summary Generate a reward
|
|
5578
|
+
* Generate a redemption link for the reward identified by the `id` in the URL
|
|
5579
|
+
* @summary Generate a reward URL
|
|
4941
5580
|
* @param {string} id ID of the reward
|
|
4942
5581
|
* @param {*} [options] Override http request option.
|
|
4943
5582
|
* @throws {RequiredError}
|
|
4944
5583
|
*/
|
|
4945
|
-
|
|
4946
|
-
return localVarFp.
|
|
5584
|
+
generateRewardLink(id, options) {
|
|
5585
|
+
return localVarFp.generateRewardLink(id, options).then((request) => request(axios, basePath));
|
|
4947
5586
|
},
|
|
4948
5587
|
/**
|
|
4949
5588
|
* Retrieve the reward, identified by the given `id` in the URL
|
|
@@ -4987,26 +5626,26 @@ exports.RewardsApiFactory = RewardsApiFactory;
|
|
|
4987
5626
|
*/
|
|
4988
5627
|
class RewardsApi extends base_1.BaseAPI {
|
|
4989
5628
|
/**
|
|
4990
|
-
*
|
|
4991
|
-
* @summary
|
|
4992
|
-
* @param {string} id ID of the reward
|
|
5629
|
+
* Cancels a reward, identified by the given `id` in the URL. Only non-expired rewards with a delivery failure can be canceled.
|
|
5630
|
+
* @summary Cancel reward
|
|
5631
|
+
* @param {string} id ID of the reward that should be canceled
|
|
4993
5632
|
* @param {*} [options] Override http request option.
|
|
4994
5633
|
* @throws {RequiredError}
|
|
4995
5634
|
* @memberof RewardsApi
|
|
4996
5635
|
*/
|
|
4997
|
-
|
|
4998
|
-
return (0, exports.RewardsApiFp)(this.configuration).
|
|
5636
|
+
cancelReward(id, options) {
|
|
5637
|
+
return (0, exports.RewardsApiFp)(this.configuration).cancelReward(id, options).then((request) => request(this.axios, this.basePath));
|
|
4999
5638
|
}
|
|
5000
5639
|
/**
|
|
5001
|
-
* Generate a
|
|
5002
|
-
* @summary Generate a reward
|
|
5640
|
+
* Generate a redemption link for the reward identified by the `id` in the URL
|
|
5641
|
+
* @summary Generate a reward URL
|
|
5003
5642
|
* @param {string} id ID of the reward
|
|
5004
5643
|
* @param {*} [options] Override http request option.
|
|
5005
5644
|
* @throws {RequiredError}
|
|
5006
5645
|
* @memberof RewardsApi
|
|
5007
5646
|
*/
|
|
5008
|
-
|
|
5009
|
-
return (0, exports.RewardsApiFp)(this.configuration).
|
|
5647
|
+
generateRewardLink(id, options) {
|
|
5648
|
+
return (0, exports.RewardsApiFp)(this.configuration).generateRewardLink(id, options).then((request) => request(this.axios, this.basePath));
|
|
5010
5649
|
}
|
|
5011
5650
|
/**
|
|
5012
5651
|
* Retrieve the reward, identified by the given `id` in the URL
|