tremendous 3.6.0 → 3.7.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 +14 -0
- package/dist/api.d.ts +220 -31
- package/dist/api.js +24 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.7.0](https://github.com/tremendous-rewards/tremendous-node/compare/tremendous-v3.6.0...tremendous-v3.7.0) (2024-11-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add `discount` to `Order` payment details ([c74239d](https://github.com/tremendous-rewards/tremendous-node/commit/c74239df35ddedaae0277766dcd818f960b1429a))
|
|
9
|
+
* add `risk` property to fraud reviews ([c74239d](https://github.com/tremendous-rewards/tremendous-node/commit/c74239df35ddedaae0277766dcd818f960b1429a))
|
|
10
|
+
* include `order` property when possible on balance transactions endpoint ([#114](https://github.com/tremendous-rewards/tremendous-node/issues/114)) ([c74239d](https://github.com/tremendous-rewards/tremendous-node/commit/c74239df35ddedaae0277766dcd818f960b1429a))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* fix `POST /orders` "created" response schema ([#117](https://github.com/tremendous-rewards/tremendous-node/issues/117)) ([4cade2d](https://github.com/tremendous-rewards/tremendous-node/commit/4cade2dd9880ea902e21398210f9bcede6ba8092))
|
|
16
|
+
|
|
3
17
|
## [3.6.0](https://github.com/tremendous-rewards/tremendous-node/compare/tremendous-v3.5.1...tremendous-v3.6.0) (2024-11-04)
|
|
4
18
|
|
|
5
19
|
|
package/dist/api.d.ts
CHANGED
|
@@ -101,6 +101,74 @@ export interface BalanceTransaction {
|
|
|
101
101
|
* @memberof BalanceTransaction
|
|
102
102
|
*/
|
|
103
103
|
'description': string;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @type {BalanceTransactionOrder}
|
|
107
|
+
* @memberof BalanceTransaction
|
|
108
|
+
*/
|
|
109
|
+
'order'?: BalanceTransactionOrder;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Order details
|
|
113
|
+
* @export
|
|
114
|
+
* @interface BalanceTransactionOrder
|
|
115
|
+
*/
|
|
116
|
+
export interface BalanceTransactionOrder {
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @type {string}
|
|
120
|
+
* @memberof BalanceTransactionOrder
|
|
121
|
+
*/
|
|
122
|
+
'id'?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Reference for this order, supplied by the customer. When set, `external_id` makes order idempotent. All requests that use the same `external_id` after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a `201` response code. These responses **fail** to create any further orders. It also allows for retrieving by `external_id` instead of `id` only.
|
|
125
|
+
* @type {string}
|
|
126
|
+
* @memberof BalanceTransactionOrder
|
|
127
|
+
*/
|
|
128
|
+
'external_id'?: string | null;
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @type {BalanceTransactionOrderPayment}
|
|
132
|
+
* @memberof BalanceTransactionOrder
|
|
133
|
+
*/
|
|
134
|
+
'payment'?: BalanceTransactionOrderPayment;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
*
|
|
138
|
+
* @export
|
|
139
|
+
* @interface BalanceTransactionOrderPayment
|
|
140
|
+
*/
|
|
141
|
+
export interface BalanceTransactionOrderPayment {
|
|
142
|
+
/**
|
|
143
|
+
* Total price of the order before fees (in USD)
|
|
144
|
+
* @type {number}
|
|
145
|
+
* @memberof BalanceTransactionOrderPayment
|
|
146
|
+
*/
|
|
147
|
+
'subtotal': number;
|
|
148
|
+
/**
|
|
149
|
+
* Total price of the order including fees (in USD)
|
|
150
|
+
* @type {number}
|
|
151
|
+
* @memberof BalanceTransactionOrderPayment
|
|
152
|
+
*/
|
|
153
|
+
'total': number;
|
|
154
|
+
/**
|
|
155
|
+
* Fees for the order (in USD)
|
|
156
|
+
* @type {number}
|
|
157
|
+
* @memberof BalanceTransactionOrderPayment
|
|
158
|
+
*/
|
|
159
|
+
'fees': number;
|
|
160
|
+
/**
|
|
161
|
+
* Discount for the order (in USD)
|
|
162
|
+
* @type {number}
|
|
163
|
+
* @memberof BalanceTransactionOrderPayment
|
|
164
|
+
*/
|
|
165
|
+
'discount': number;
|
|
166
|
+
/**
|
|
167
|
+
*
|
|
168
|
+
* @type {PaymentDetailsRefund}
|
|
169
|
+
* @memberof BalanceTransactionOrderPayment
|
|
170
|
+
*/
|
|
171
|
+
'refund'?: PaymentDetailsRefund;
|
|
104
172
|
}
|
|
105
173
|
/**
|
|
106
174
|
*
|
|
@@ -560,19 +628,6 @@ export declare const CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum:
|
|
|
560
628
|
readonly Pending: "PENDING";
|
|
561
629
|
};
|
|
562
630
|
export type CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = typeof CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum[keyof typeof CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum];
|
|
563
|
-
/**
|
|
564
|
-
*
|
|
565
|
-
* @export
|
|
566
|
-
* @interface CreateOrder201Response
|
|
567
|
-
*/
|
|
568
|
-
export interface CreateOrder201Response {
|
|
569
|
-
/**
|
|
570
|
-
*
|
|
571
|
-
* @type {ListOrders200ResponseOrdersInner}
|
|
572
|
-
* @memberof CreateOrder201Response
|
|
573
|
-
*/
|
|
574
|
-
'order': ListOrders200ResponseOrdersInner;
|
|
575
|
-
}
|
|
576
631
|
/**
|
|
577
632
|
* @type CreateOrderRequest
|
|
578
633
|
* @export
|
|
@@ -1611,6 +1666,12 @@ export interface FraudReview {
|
|
|
1611
1666
|
* @memberof FraudReview
|
|
1612
1667
|
*/
|
|
1613
1668
|
'status'?: FraudReviewStatusEnum;
|
|
1669
|
+
/**
|
|
1670
|
+
* The fraud risk associated with the reward.
|
|
1671
|
+
* @type {string}
|
|
1672
|
+
* @memberof FraudReview
|
|
1673
|
+
*/
|
|
1674
|
+
'risk'?: FraudReviewRiskEnum;
|
|
1614
1675
|
/**
|
|
1615
1676
|
* The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward dollar limit` * `Over reward count limit` * `VPN detected` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `IP related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email`
|
|
1616
1677
|
* @type {Array<string>}
|
|
@@ -1672,6 +1733,12 @@ export declare const FraudReviewStatusEnum: {
|
|
|
1672
1733
|
readonly Released: "released";
|
|
1673
1734
|
};
|
|
1674
1735
|
export type FraudReviewStatusEnum = typeof FraudReviewStatusEnum[keyof typeof FraudReviewStatusEnum];
|
|
1736
|
+
export declare const FraudReviewRiskEnum: {
|
|
1737
|
+
readonly High: "high";
|
|
1738
|
+
readonly Medium: "medium";
|
|
1739
|
+
readonly Low: "low";
|
|
1740
|
+
};
|
|
1741
|
+
export type FraudReviewRiskEnum = typeof FraudReviewRiskEnum[keyof typeof FraudReviewRiskEnum];
|
|
1675
1742
|
export declare const FraudReviewReasonsEnum: {
|
|
1676
1743
|
readonly DisallowedIp: "Disallowed IP";
|
|
1677
1744
|
readonly DisallowedEmail: "Disallowed email";
|
|
@@ -1856,6 +1923,17 @@ export interface FraudReviewRelatedRewards {
|
|
|
1856
1923
|
*/
|
|
1857
1924
|
'aggregated_value'?: number;
|
|
1858
1925
|
}
|
|
1926
|
+
/**
|
|
1927
|
+
* The fraud risk associated with the reward.
|
|
1928
|
+
* @export
|
|
1929
|
+
* @enum {string}
|
|
1930
|
+
*/
|
|
1931
|
+
export declare const FraudReviewRisk: {
|
|
1932
|
+
readonly High: "high";
|
|
1933
|
+
readonly Medium: "medium";
|
|
1934
|
+
readonly Low: "low";
|
|
1935
|
+
};
|
|
1936
|
+
export type FraudReviewRisk = typeof FraudReviewRisk[keyof typeof FraudReviewRisk];
|
|
1859
1937
|
/**
|
|
1860
1938
|
* The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released.
|
|
1861
1939
|
* @export
|
|
@@ -2206,6 +2284,12 @@ export interface GetFraudReview200ResponseFraudReview {
|
|
|
2206
2284
|
* @memberof GetFraudReview200ResponseFraudReview
|
|
2207
2285
|
*/
|
|
2208
2286
|
'status'?: GetFraudReview200ResponseFraudReviewStatusEnum;
|
|
2287
|
+
/**
|
|
2288
|
+
* The fraud risk associated with the reward.
|
|
2289
|
+
* @type {string}
|
|
2290
|
+
* @memberof GetFraudReview200ResponseFraudReview
|
|
2291
|
+
*/
|
|
2292
|
+
'risk'?: GetFraudReview200ResponseFraudReviewRiskEnum;
|
|
2209
2293
|
/**
|
|
2210
2294
|
* The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward dollar limit` * `Over reward count limit` * `VPN detected` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `IP related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email`
|
|
2211
2295
|
* @type {Array<string>}
|
|
@@ -2267,6 +2351,12 @@ export declare const GetFraudReview200ResponseFraudReviewStatusEnum: {
|
|
|
2267
2351
|
readonly Released: "released";
|
|
2268
2352
|
};
|
|
2269
2353
|
export type GetFraudReview200ResponseFraudReviewStatusEnum = typeof GetFraudReview200ResponseFraudReviewStatusEnum[keyof typeof GetFraudReview200ResponseFraudReviewStatusEnum];
|
|
2354
|
+
export declare const GetFraudReview200ResponseFraudReviewRiskEnum: {
|
|
2355
|
+
readonly High: "high";
|
|
2356
|
+
readonly Medium: "medium";
|
|
2357
|
+
readonly Low: "low";
|
|
2358
|
+
};
|
|
2359
|
+
export type GetFraudReview200ResponseFraudReviewRiskEnum = typeof GetFraudReview200ResponseFraudReviewRiskEnum[keyof typeof GetFraudReview200ResponseFraudReviewRiskEnum];
|
|
2270
2360
|
export declare const GetFraudReview200ResponseFraudReviewReasonsEnum: {
|
|
2271
2361
|
readonly DisallowedIp: "Disallowed IP";
|
|
2272
2362
|
readonly DisallowedEmail: "Disallowed email";
|
|
@@ -2459,6 +2549,19 @@ export declare const GetMember200ResponseMemberEventsInnerTypeEnum: {
|
|
|
2459
2549
|
readonly LastLogin: "last_login";
|
|
2460
2550
|
};
|
|
2461
2551
|
export type GetMember200ResponseMemberEventsInnerTypeEnum = typeof GetMember200ResponseMemberEventsInnerTypeEnum[keyof typeof GetMember200ResponseMemberEventsInnerTypeEnum];
|
|
2552
|
+
/**
|
|
2553
|
+
*
|
|
2554
|
+
* @export
|
|
2555
|
+
* @interface GetOrder200Response
|
|
2556
|
+
*/
|
|
2557
|
+
export interface GetOrder200Response {
|
|
2558
|
+
/**
|
|
2559
|
+
*
|
|
2560
|
+
* @type {ListOrders200ResponseOrdersInner}
|
|
2561
|
+
* @memberof GetOrder200Response
|
|
2562
|
+
*/
|
|
2563
|
+
'order': ListOrders200ResponseOrdersInner;
|
|
2564
|
+
}
|
|
2462
2565
|
/**
|
|
2463
2566
|
*
|
|
2464
2567
|
* @export
|
|
@@ -2615,6 +2718,74 @@ export interface ListBalanceTransactions200ResponseTransactionsInner {
|
|
|
2615
2718
|
* @memberof ListBalanceTransactions200ResponseTransactionsInner
|
|
2616
2719
|
*/
|
|
2617
2720
|
'description': string;
|
|
2721
|
+
/**
|
|
2722
|
+
*
|
|
2723
|
+
* @type {ListBalanceTransactions200ResponseTransactionsInnerOrder}
|
|
2724
|
+
* @memberof ListBalanceTransactions200ResponseTransactionsInner
|
|
2725
|
+
*/
|
|
2726
|
+
'order'?: ListBalanceTransactions200ResponseTransactionsInnerOrder;
|
|
2727
|
+
}
|
|
2728
|
+
/**
|
|
2729
|
+
* Order details
|
|
2730
|
+
* @export
|
|
2731
|
+
* @interface ListBalanceTransactions200ResponseTransactionsInnerOrder
|
|
2732
|
+
*/
|
|
2733
|
+
export interface ListBalanceTransactions200ResponseTransactionsInnerOrder {
|
|
2734
|
+
/**
|
|
2735
|
+
*
|
|
2736
|
+
* @type {string}
|
|
2737
|
+
* @memberof ListBalanceTransactions200ResponseTransactionsInnerOrder
|
|
2738
|
+
*/
|
|
2739
|
+
'id'?: string;
|
|
2740
|
+
/**
|
|
2741
|
+
* Reference for this order, supplied by the customer. When set, `external_id` makes order idempotent. All requests that use the same `external_id` after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a `201` response code. These responses **fail** to create any further orders. It also allows for retrieving by `external_id` instead of `id` only.
|
|
2742
|
+
* @type {string}
|
|
2743
|
+
* @memberof ListBalanceTransactions200ResponseTransactionsInnerOrder
|
|
2744
|
+
*/
|
|
2745
|
+
'external_id'?: string | null;
|
|
2746
|
+
/**
|
|
2747
|
+
*
|
|
2748
|
+
* @type {ListBalanceTransactions200ResponseTransactionsInnerOrderPayment}
|
|
2749
|
+
* @memberof ListBalanceTransactions200ResponseTransactionsInnerOrder
|
|
2750
|
+
*/
|
|
2751
|
+
'payment'?: ListBalanceTransactions200ResponseTransactionsInnerOrderPayment;
|
|
2752
|
+
}
|
|
2753
|
+
/**
|
|
2754
|
+
*
|
|
2755
|
+
* @export
|
|
2756
|
+
* @interface ListBalanceTransactions200ResponseTransactionsInnerOrderPayment
|
|
2757
|
+
*/
|
|
2758
|
+
export interface ListBalanceTransactions200ResponseTransactionsInnerOrderPayment {
|
|
2759
|
+
/**
|
|
2760
|
+
* Total price of the order before fees (in USD)
|
|
2761
|
+
* @type {number}
|
|
2762
|
+
* @memberof ListBalanceTransactions200ResponseTransactionsInnerOrderPayment
|
|
2763
|
+
*/
|
|
2764
|
+
'subtotal': number;
|
|
2765
|
+
/**
|
|
2766
|
+
* Total price of the order including fees (in USD)
|
|
2767
|
+
* @type {number}
|
|
2768
|
+
* @memberof ListBalanceTransactions200ResponseTransactionsInnerOrderPayment
|
|
2769
|
+
*/
|
|
2770
|
+
'total': number;
|
|
2771
|
+
/**
|
|
2772
|
+
* Fees for the order (in USD)
|
|
2773
|
+
* @type {number}
|
|
2774
|
+
* @memberof ListBalanceTransactions200ResponseTransactionsInnerOrderPayment
|
|
2775
|
+
*/
|
|
2776
|
+
'fees': number;
|
|
2777
|
+
/**
|
|
2778
|
+
* Discount for the order (in USD)
|
|
2779
|
+
* @type {number}
|
|
2780
|
+
* @memberof ListBalanceTransactions200ResponseTransactionsInnerOrderPayment
|
|
2781
|
+
*/
|
|
2782
|
+
'discount': number;
|
|
2783
|
+
/**
|
|
2784
|
+
*
|
|
2785
|
+
* @type {ListOrders200ResponseOrdersInnerPaymentRefund}
|
|
2786
|
+
* @memberof ListBalanceTransactions200ResponseTransactionsInnerOrderPayment
|
|
2787
|
+
*/
|
|
2788
|
+
'refund'?: ListOrders200ResponseOrdersInnerPaymentRefund;
|
|
2618
2789
|
}
|
|
2619
2790
|
/**
|
|
2620
2791
|
*
|
|
@@ -3413,19 +3584,25 @@ export interface ListOrders200ResponseOrdersInnerPayment {
|
|
|
3413
3584
|
* @type {number}
|
|
3414
3585
|
* @memberof ListOrders200ResponseOrdersInnerPayment
|
|
3415
3586
|
*/
|
|
3416
|
-
'subtotal'
|
|
3587
|
+
'subtotal': number;
|
|
3417
3588
|
/**
|
|
3418
3589
|
* Total price of the order including fees (in USD)
|
|
3419
3590
|
* @type {number}
|
|
3420
3591
|
* @memberof ListOrders200ResponseOrdersInnerPayment
|
|
3421
3592
|
*/
|
|
3422
|
-
'total'
|
|
3593
|
+
'total': number;
|
|
3423
3594
|
/**
|
|
3424
3595
|
* Fees for the order (in USD)
|
|
3425
3596
|
* @type {number}
|
|
3426
3597
|
* @memberof ListOrders200ResponseOrdersInnerPayment
|
|
3427
3598
|
*/
|
|
3428
|
-
'fees'
|
|
3599
|
+
'fees': number;
|
|
3600
|
+
/**
|
|
3601
|
+
* Discount for the order (in USD)
|
|
3602
|
+
* @type {number}
|
|
3603
|
+
* @memberof ListOrders200ResponseOrdersInnerPayment
|
|
3604
|
+
*/
|
|
3605
|
+
'discount': number;
|
|
3429
3606
|
/**
|
|
3430
3607
|
*
|
|
3431
3608
|
* @type {ListOrders200ResponseOrdersInnerPaymentRefund}
|
|
@@ -4589,19 +4766,25 @@ export interface OrderBasePayment {
|
|
|
4589
4766
|
* @type {number}
|
|
4590
4767
|
* @memberof OrderBasePayment
|
|
4591
4768
|
*/
|
|
4592
|
-
'subtotal'
|
|
4769
|
+
'subtotal': number;
|
|
4593
4770
|
/**
|
|
4594
4771
|
* Total price of the order including fees (in USD)
|
|
4595
4772
|
* @type {number}
|
|
4596
4773
|
* @memberof OrderBasePayment
|
|
4597
4774
|
*/
|
|
4598
|
-
'total'
|
|
4775
|
+
'total': number;
|
|
4599
4776
|
/**
|
|
4600
4777
|
* Fees for the order (in USD)
|
|
4601
4778
|
* @type {number}
|
|
4602
4779
|
* @memberof OrderBasePayment
|
|
4603
4780
|
*/
|
|
4604
|
-
'fees'
|
|
4781
|
+
'fees': number;
|
|
4782
|
+
/**
|
|
4783
|
+
* Discount for the order (in USD)
|
|
4784
|
+
* @type {number}
|
|
4785
|
+
* @memberof OrderBasePayment
|
|
4786
|
+
*/
|
|
4787
|
+
'discount': number;
|
|
4605
4788
|
/**
|
|
4606
4789
|
*
|
|
4607
4790
|
* @type {PaymentDetailsRefund}
|
|
@@ -4971,19 +5154,25 @@ export interface PaymentDetails {
|
|
|
4971
5154
|
* @type {number}
|
|
4972
5155
|
* @memberof PaymentDetails
|
|
4973
5156
|
*/
|
|
4974
|
-
'subtotal'
|
|
5157
|
+
'subtotal': number;
|
|
4975
5158
|
/**
|
|
4976
5159
|
* Total price of the order including fees (in USD)
|
|
4977
5160
|
* @type {number}
|
|
4978
5161
|
* @memberof PaymentDetails
|
|
4979
5162
|
*/
|
|
4980
|
-
'total'
|
|
5163
|
+
'total': number;
|
|
4981
5164
|
/**
|
|
4982
5165
|
* Fees for the order (in USD)
|
|
4983
5166
|
* @type {number}
|
|
4984
5167
|
* @memberof PaymentDetails
|
|
4985
5168
|
*/
|
|
4986
|
-
'fees'
|
|
5169
|
+
'fees': number;
|
|
5170
|
+
/**
|
|
5171
|
+
* Discount for the order (in USD)
|
|
5172
|
+
* @type {number}
|
|
5173
|
+
* @memberof PaymentDetails
|
|
5174
|
+
*/
|
|
5175
|
+
'discount': number;
|
|
4987
5176
|
/**
|
|
4988
5177
|
*
|
|
4989
5178
|
* @type {PaymentDetailsRefund}
|
|
@@ -7922,7 +8111,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
7922
8111
|
* @param {*} [options] Override http request option.
|
|
7923
8112
|
* @throws {RequiredError}
|
|
7924
8113
|
*/
|
|
7925
|
-
approveOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
8114
|
+
approveOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetOrder200Response>>;
|
|
7926
8115
|
/**
|
|
7927
8116
|
* 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.
|
|
7928
8117
|
* @summary Create order
|
|
@@ -7938,7 +8127,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
7938
8127
|
* @param {*} [options] Override http request option.
|
|
7939
8128
|
* @throws {RequiredError}
|
|
7940
8129
|
*/
|
|
7941
|
-
getOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
8130
|
+
getOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetOrder200Response>>;
|
|
7942
8131
|
/**
|
|
7943
8132
|
* Retrieve a list of orders
|
|
7944
8133
|
* @summary List orders
|
|
@@ -7959,7 +8148,7 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
7959
8148
|
* @param {*} [options] Override http request option.
|
|
7960
8149
|
* @throws {RequiredError}
|
|
7961
8150
|
*/
|
|
7962
|
-
rejectOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<
|
|
8151
|
+
rejectOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetOrder200Response>>;
|
|
7963
8152
|
};
|
|
7964
8153
|
/**
|
|
7965
8154
|
* OrdersApi - factory interface
|
|
@@ -7973,7 +8162,7 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
|
|
|
7973
8162
|
* @param {*} [options] Override http request option.
|
|
7974
8163
|
* @throws {RequiredError}
|
|
7975
8164
|
*/
|
|
7976
|
-
approveOrder(id: string, options?: RawAxiosRequestConfig): AxiosPromise<
|
|
8165
|
+
approveOrder(id: string, options?: RawAxiosRequestConfig): AxiosPromise<GetOrder200Response>;
|
|
7977
8166
|
/**
|
|
7978
8167
|
* 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.
|
|
7979
8168
|
* @summary Create order
|
|
@@ -7989,7 +8178,7 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
|
|
|
7989
8178
|
* @param {*} [options] Override http request option.
|
|
7990
8179
|
* @throws {RequiredError}
|
|
7991
8180
|
*/
|
|
7992
|
-
getOrder(id: string, options?: RawAxiosRequestConfig): AxiosPromise<
|
|
8181
|
+
getOrder(id: string, options?: RawAxiosRequestConfig): AxiosPromise<GetOrder200Response>;
|
|
7993
8182
|
/**
|
|
7994
8183
|
* Retrieve a list of orders
|
|
7995
8184
|
* @summary List orders
|
|
@@ -8010,7 +8199,7 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
|
|
|
8010
8199
|
* @param {*} [options] Override http request option.
|
|
8011
8200
|
* @throws {RequiredError}
|
|
8012
8201
|
*/
|
|
8013
|
-
rejectOrder(id: string, options?: RawAxiosRequestConfig): AxiosPromise<
|
|
8202
|
+
rejectOrder(id: string, options?: RawAxiosRequestConfig): AxiosPromise<GetOrder200Response>;
|
|
8014
8203
|
};
|
|
8015
8204
|
/**
|
|
8016
8205
|
* OrdersApi - object-oriented interface
|
|
@@ -8027,7 +8216,7 @@ export declare class OrdersApi extends BaseAPI {
|
|
|
8027
8216
|
* @throws {RequiredError}
|
|
8028
8217
|
* @memberof OrdersApi
|
|
8029
8218
|
*/
|
|
8030
|
-
approveOrder(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<
|
|
8219
|
+
approveOrder(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetOrder200Response, any>>;
|
|
8031
8220
|
/**
|
|
8032
8221
|
* 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.
|
|
8033
8222
|
* @summary Create order
|
|
@@ -8045,7 +8234,7 @@ export declare class OrdersApi extends BaseAPI {
|
|
|
8045
8234
|
* @throws {RequiredError}
|
|
8046
8235
|
* @memberof OrdersApi
|
|
8047
8236
|
*/
|
|
8048
|
-
getOrder(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<
|
|
8237
|
+
getOrder(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetOrder200Response, any>>;
|
|
8049
8238
|
/**
|
|
8050
8239
|
* Retrieve a list of orders
|
|
8051
8240
|
* @summary List orders
|
|
@@ -8068,7 +8257,7 @@ export declare class OrdersApi extends BaseAPI {
|
|
|
8068
8257
|
* @throws {RequiredError}
|
|
8069
8258
|
* @memberof OrdersApi
|
|
8070
8259
|
*/
|
|
8071
|
-
rejectOrder(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<
|
|
8260
|
+
rejectOrder(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetOrder200Response, any>>;
|
|
8072
8261
|
}
|
|
8073
8262
|
/**
|
|
8074
8263
|
* OrganizationsApi - axios parameter creator
|
package/dist/api.js
CHANGED
|
@@ -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 = void 0;
|
|
25
|
+
exports.ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = exports.ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum = exports.ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum = exports.ListFraudReviews200ResponseFraudReviewsInnerStatusEnum = exports.InvoiceStatusEnum = exports.GetMember200ResponseMemberEventsInnerTypeEnum = exports.GetMember200ResponseMemberStatusEnum = exports.GetFraudReview200ResponseFraudReviewRedemptionMethodEnum = exports.GetFraudReview200ResponseFraudReviewReasonsEnum = exports.GetFraudReview200ResponseFraudReviewRiskEnum = exports.GetFraudReview200ResponseFraudReviewStatusEnum = exports.FundingSourceTypeEnum = 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.CreateReport201ResponseReportStatusEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = exports.CreateOrder200ResponseOrderChannelEnum = exports.CreateOrder200ResponseOrderStatusEnum = exports.Channel = void 0;
|
|
26
|
+
exports.CampaignsApiFp = exports.CampaignsApiAxiosParamCreator = exports.BalanceTransactionsApi = exports.BalanceTransactionsApiFactory = exports.BalanceTransactionsApiFp = exports.BalanceTransactionsApiAxiosParamCreator = exports.UpdateFraudRuleListRequestOperationEnum = exports.SingleRewardOrderWithoutLinkOrderChannelEnum = 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 = void 0;
|
|
27
|
+
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 = 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.CampaignsApi = exports.CampaignsApiFactory = 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 = void 0;
|
|
29
29
|
const axios_1 = require("axios");
|
|
30
30
|
// Some imports not used depending on template conditions
|
|
31
31
|
// @ts-ignore
|
|
@@ -296,6 +296,11 @@ exports.FraudReviewStatusEnum = {
|
|
|
296
296
|
Blocked: 'blocked',
|
|
297
297
|
Released: 'released'
|
|
298
298
|
};
|
|
299
|
+
exports.FraudReviewRiskEnum = {
|
|
300
|
+
High: 'high',
|
|
301
|
+
Medium: 'medium',
|
|
302
|
+
Low: 'low'
|
|
303
|
+
};
|
|
299
304
|
exports.FraudReviewReasonsEnum = {
|
|
300
305
|
DisallowedIp: 'Disallowed IP',
|
|
301
306
|
DisallowedEmail: 'Disallowed email',
|
|
@@ -393,6 +398,16 @@ exports.FraudReviewRedemptionMethod = {
|
|
|
393
398
|
Charity: 'charity',
|
|
394
399
|
Venmo: 'venmo'
|
|
395
400
|
};
|
|
401
|
+
/**
|
|
402
|
+
* The fraud risk associated with the reward.
|
|
403
|
+
* @export
|
|
404
|
+
* @enum {string}
|
|
405
|
+
*/
|
|
406
|
+
exports.FraudReviewRisk = {
|
|
407
|
+
High: 'high',
|
|
408
|
+
Medium: 'medium',
|
|
409
|
+
Low: 'low'
|
|
410
|
+
};
|
|
396
411
|
/**
|
|
397
412
|
* The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released.
|
|
398
413
|
* @export
|
|
@@ -462,6 +477,11 @@ exports.GetFraudReview200ResponseFraudReviewStatusEnum = {
|
|
|
462
477
|
Blocked: 'blocked',
|
|
463
478
|
Released: 'released'
|
|
464
479
|
};
|
|
480
|
+
exports.GetFraudReview200ResponseFraudReviewRiskEnum = {
|
|
481
|
+
High: 'high',
|
|
482
|
+
Medium: 'medium',
|
|
483
|
+
Low: 'low'
|
|
484
|
+
};
|
|
465
485
|
exports.GetFraudReview200ResponseFraudReviewReasonsEnum = {
|
|
466
486
|
DisallowedIp: 'Disallowed IP',
|
|
467
487
|
DisallowedEmail: 'Disallowed email',
|