@epilot/pricing-client 3.47.6 → 3.47.8
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/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +19 -4
- package/dist/openapi.d.ts +73 -190
- package/dist/openapi.json +500 -101
- package/package.json +2 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={914:function(e,r,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var a=i(t(240));r.default=a.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://pricing-api.sls.epilot.io"}],"paths":{"/v1/pricing:compute":{"post":{"operationId":"$calculatePricingDetails","requestBody":{"required":false,"content":{"application/json":{}}},"responses":{}}},"/v1/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/order/{id}":{"put":{"operationId":"putOrder","parameters":[{"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/cart:checkout":{"post":{"operationId":"$checkoutCart","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/catalog":{"post":{"operationId":"$searchCatalog","parameters":[{"in":"header","name":"X-Ivy-Org-ID"},{"in":"header","name":"Authorization"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/catalog":{"post":{"operationId":"$privateSearchCatalog","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/validate-promo-codes":{"post":{"operationId":"$validatePromoCodes","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/validate-availability/{id}":{"get":{"operationId":"$validateAvailabilityFile","parameters":[{"in":"path","name":"id","required":true},{"in":"header","name":"X-Epilot-Org-ID","required":true}],"responses":{}}},"/v1/public/historicMarketPrices":{"get":{"operationId":"$historicMarketPrices","parameters":[{"in":"query","name":"market","required":true},{"in":"query","name":"
|
|
1
|
+
(()=>{"use strict";var e={914:function(e,r,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var a=i(t(240));r.default=a.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://pricing-api.sls.epilot.io"}],"paths":{"/v1/pricing:compute":{"post":{"operationId":"$calculatePricingDetails","requestBody":{"required":false,"content":{"application/json":{}}},"responses":{}}},"/v1/order":{"post":{"operationId":"createOrder","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/order/{id}":{"put":{"operationId":"putOrder","parameters":[{"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/cart:checkout":{"post":{"operationId":"$checkoutCart","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/catalog":{"post":{"operationId":"$searchCatalog","parameters":[{"in":"header","name":"X-Ivy-Org-ID"},{"in":"header","name":"Authorization"}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/catalog":{"post":{"operationId":"$privateSearchCatalog","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/validate-promo-codes":{"post":{"operationId":"$validatePromoCodes","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/availability:check":{"post":{"operationId":"$availabilityCheck","parameters":[{"in":"header","name":"X-Ivy-Org-ID","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/validate-availability/{id}":{"get":{"operationId":"$validateAvailabilityFile","parameters":[{"in":"path","name":"id","required":true},{"in":"header","name":"X-Epilot-Org-ID","required":true}],"responses":{}}},"/v1/public/historicMarketPrices":{"get":{"operationId":"$historicMarketPrices","parameters":[{"in":"query","name":"market","required":true},{"in":"query","name":"bidding_zone","required":true},{"in":"query","name":"frequency","required":true},{"in":"query","name":"from","required":true},{"in":"query","name":"to","required":true}],"responses":{}}},"/v1/public/averageMarketPrice":{"get":{"operationId":"$averageMarketPrice","parameters":[{"in":"query","name":"market","required":true},{"in":"query","name":"bidding_zone","required":true},{"in":"query","name":"from","required":true},{"in":"query","name":"to","required":true}],"responses":{}}},"/v1/public/integration/{integrationId}/external-catalog":{"post":{"operationId":"$searchExternalCatalog","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/providers:search":{"post":{"operationId":"$searchProviders","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/streets:search":{"post":{"operationId":"$searchStreets","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/integration/{integrationId}/compute-price":{"post":{"operationId":"$computePrice","parameters":[{"in":"header","name":"X-Epilot-Org-ID","required":true},{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/integration/{integrationId}/credentials":{"get":{"operationId":"$getCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"responses":{}}},"/v1/integration/{integrationId}/credentials:save":{"put":{"operationId":"$saveCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/integration/{integrationId}/credentials:delete":{"delete":{"operationId":"$deleteCredentials","parameters":[{"in":"path","name":"integrationId","required":true}],"responses":{}}}},"components":{}}')}},r={},t=function t(i){var a=r[i];if(void 0!==a)return a.exports;var n=r[i]={exports:{}};return e[i].call(n.exports,n,n.exports,t),n.exports}(914),i=exports;for(var a in t)i[a]=t[a];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
|
|
@@ -173,17 +173,22 @@
|
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
175
|
"in": "query",
|
|
176
|
-
"name": "
|
|
176
|
+
"name": "bidding_zone",
|
|
177
177
|
"required": true
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
"in": "query",
|
|
181
|
-
"name": "
|
|
181
|
+
"name": "frequency",
|
|
182
182
|
"required": true
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
"in": "query",
|
|
186
|
-
"name": "
|
|
186
|
+
"name": "from",
|
|
187
|
+
"required": true
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"in": "query",
|
|
191
|
+
"name": "to",
|
|
187
192
|
"required": true
|
|
188
193
|
}
|
|
189
194
|
],
|
|
@@ -201,7 +206,17 @@
|
|
|
201
206
|
},
|
|
202
207
|
{
|
|
203
208
|
"in": "query",
|
|
204
|
-
"name": "
|
|
209
|
+
"name": "bidding_zone",
|
|
210
|
+
"required": true
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"in": "query",
|
|
214
|
+
"name": "from",
|
|
215
|
+
"required": true
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"in": "query",
|
|
219
|
+
"name": "to",
|
|
205
220
|
"required": true
|
|
206
221
|
}
|
|
207
222
|
],
|
package/dist/openapi.d.ts
CHANGED
|
@@ -725,37 +725,7 @@ declare namespace Components {
|
|
|
725
725
|
/**
|
|
726
726
|
* The coupons applicable to the price item
|
|
727
727
|
*/
|
|
728
|
-
_coupons?: (
|
|
729
|
-
* The coupon configuration
|
|
730
|
-
* example:
|
|
731
|
-
* {
|
|
732
|
-
* "_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
733
|
-
* "_schema": "coupon",
|
|
734
|
-
* "_org": "org_12345",
|
|
735
|
-
* "_created_at": "2024-01-15T10:00:00.000Z",
|
|
736
|
-
* "_updated_at": "2024-01-20T12:00:00.000Z",
|
|
737
|
-
* "_title": "Sample Coupon",
|
|
738
|
-
* "name": "Sample Coupon",
|
|
739
|
-
* "type": "fixed",
|
|
740
|
-
* "fixed_value": 555,
|
|
741
|
-
* "fixed_value_currency": "USD",
|
|
742
|
-
* "fixed_value_decimal": "5.55",
|
|
743
|
-
* "active": true,
|
|
744
|
-
* "prices": {
|
|
745
|
-
* "$relation": [
|
|
746
|
-
* {
|
|
747
|
-
* "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
|
|
748
|
-
* "_tags": [
|
|
749
|
-
* "discount",
|
|
750
|
-
* "special"
|
|
751
|
-
* ],
|
|
752
|
-
* "_schema": "price"
|
|
753
|
-
* }
|
|
754
|
-
* ]
|
|
755
|
-
* }
|
|
756
|
-
* }
|
|
757
|
-
*/
|
|
758
|
-
Coupon)[];
|
|
728
|
+
_coupons?: (CouponItem)[];
|
|
759
729
|
/**
|
|
760
730
|
* When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
|
|
761
731
|
*/
|
|
@@ -1101,37 +1071,7 @@ declare namespace Components {
|
|
|
1101
1071
|
/**
|
|
1102
1072
|
* The coupons applicable to the price item
|
|
1103
1073
|
*/
|
|
1104
|
-
_coupons?: (
|
|
1105
|
-
* The coupon configuration
|
|
1106
|
-
* example:
|
|
1107
|
-
* {
|
|
1108
|
-
* "_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
1109
|
-
* "_schema": "coupon",
|
|
1110
|
-
* "_org": "org_12345",
|
|
1111
|
-
* "_created_at": "2024-01-15T10:00:00.000Z",
|
|
1112
|
-
* "_updated_at": "2024-01-20T12:00:00.000Z",
|
|
1113
|
-
* "_title": "Sample Coupon",
|
|
1114
|
-
* "name": "Sample Coupon",
|
|
1115
|
-
* "type": "fixed",
|
|
1116
|
-
* "fixed_value": 555,
|
|
1117
|
-
* "fixed_value_currency": "USD",
|
|
1118
|
-
* "fixed_value_decimal": "5.55",
|
|
1119
|
-
* "active": true,
|
|
1120
|
-
* "prices": {
|
|
1121
|
-
* "$relation": [
|
|
1122
|
-
* {
|
|
1123
|
-
* "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
|
|
1124
|
-
* "_tags": [
|
|
1125
|
-
* "discount",
|
|
1126
|
-
* "special"
|
|
1127
|
-
* ],
|
|
1128
|
-
* "_schema": "price"
|
|
1129
|
-
* }
|
|
1130
|
-
* ]
|
|
1131
|
-
* }
|
|
1132
|
-
* }
|
|
1133
|
-
*/
|
|
1134
|
-
Coupon)[];
|
|
1074
|
+
_coupons?: (CouponItem)[];
|
|
1135
1075
|
}
|
|
1136
1076
|
export interface BasicAuthCredentials {
|
|
1137
1077
|
/**
|
|
@@ -1893,37 +1833,7 @@ declare namespace Components {
|
|
|
1893
1833
|
/**
|
|
1894
1834
|
* The coupons applicable to the price item
|
|
1895
1835
|
*/
|
|
1896
|
-
_coupons?: (
|
|
1897
|
-
* The coupon configuration
|
|
1898
|
-
* example:
|
|
1899
|
-
* {
|
|
1900
|
-
* "_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
1901
|
-
* "_schema": "coupon",
|
|
1902
|
-
* "_org": "org_12345",
|
|
1903
|
-
* "_created_at": "2024-01-15T10:00:00.000Z",
|
|
1904
|
-
* "_updated_at": "2024-01-20T12:00:00.000Z",
|
|
1905
|
-
* "_title": "Sample Coupon",
|
|
1906
|
-
* "name": "Sample Coupon",
|
|
1907
|
-
* "type": "fixed",
|
|
1908
|
-
* "fixed_value": 555,
|
|
1909
|
-
* "fixed_value_currency": "USD",
|
|
1910
|
-
* "fixed_value_decimal": "5.55",
|
|
1911
|
-
* "active": true,
|
|
1912
|
-
* "prices": {
|
|
1913
|
-
* "$relation": [
|
|
1914
|
-
* {
|
|
1915
|
-
* "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
|
|
1916
|
-
* "_tags": [
|
|
1917
|
-
* "discount",
|
|
1918
|
-
* "special"
|
|
1919
|
-
* ],
|
|
1920
|
-
* "_schema": "price"
|
|
1921
|
-
* }
|
|
1922
|
-
* ]
|
|
1923
|
-
* }
|
|
1924
|
-
* }
|
|
1925
|
-
*/
|
|
1926
|
-
Coupon)[];
|
|
1836
|
+
_coupons?: (CouponItem)[];
|
|
1927
1837
|
/**
|
|
1928
1838
|
* When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
|
|
1929
1839
|
*/
|
|
@@ -1961,7 +1871,7 @@ declare namespace Components {
|
|
|
1961
1871
|
/**
|
|
1962
1872
|
* The flag for prices that contain price components.
|
|
1963
1873
|
*/
|
|
1964
|
-
is_composite_price?:
|
|
1874
|
+
is_composite_price?: true;
|
|
1965
1875
|
/**
|
|
1966
1876
|
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
1967
1877
|
*/
|
|
@@ -2124,37 +2034,7 @@ declare namespace Components {
|
|
|
2124
2034
|
/**
|
|
2125
2035
|
* The coupons applicable to the price item
|
|
2126
2036
|
*/
|
|
2127
|
-
_coupons?: (
|
|
2128
|
-
* The coupon configuration
|
|
2129
|
-
* example:
|
|
2130
|
-
* {
|
|
2131
|
-
* "_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
2132
|
-
* "_schema": "coupon",
|
|
2133
|
-
* "_org": "org_12345",
|
|
2134
|
-
* "_created_at": "2024-01-15T10:00:00.000Z",
|
|
2135
|
-
* "_updated_at": "2024-01-20T12:00:00.000Z",
|
|
2136
|
-
* "_title": "Sample Coupon",
|
|
2137
|
-
* "name": "Sample Coupon",
|
|
2138
|
-
* "type": "fixed",
|
|
2139
|
-
* "fixed_value": 555,
|
|
2140
|
-
* "fixed_value_currency": "USD",
|
|
2141
|
-
* "fixed_value_decimal": "5.55",
|
|
2142
|
-
* "active": true,
|
|
2143
|
-
* "prices": {
|
|
2144
|
-
* "$relation": [
|
|
2145
|
-
* {
|
|
2146
|
-
* "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
|
|
2147
|
-
* "_tags": [
|
|
2148
|
-
* "discount",
|
|
2149
|
-
* "special"
|
|
2150
|
-
* ],
|
|
2151
|
-
* "_schema": "price"
|
|
2152
|
-
* }
|
|
2153
|
-
* ]
|
|
2154
|
-
* }
|
|
2155
|
-
* }
|
|
2156
|
-
*/
|
|
2157
|
-
Coupon)[];
|
|
2037
|
+
_coupons?: (CouponItem)[];
|
|
2158
2038
|
/**
|
|
2159
2039
|
* Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).
|
|
2160
2040
|
*/
|
|
@@ -2524,6 +2404,66 @@ declare namespace Components {
|
|
|
2524
2404
|
[name: string]: number;
|
|
2525
2405
|
};
|
|
2526
2406
|
}
|
|
2407
|
+
export interface CouponItem {
|
|
2408
|
+
_id?: EntityId /* uuid */;
|
|
2409
|
+
/**
|
|
2410
|
+
* The auto-generated title for the title
|
|
2411
|
+
*/
|
|
2412
|
+
_title?: string;
|
|
2413
|
+
/**
|
|
2414
|
+
* Organization Id the entity belongs to
|
|
2415
|
+
*/
|
|
2416
|
+
_org?: string;
|
|
2417
|
+
/**
|
|
2418
|
+
* The schema of the entity, for coupons it is always `coupon`
|
|
2419
|
+
*/
|
|
2420
|
+
_schema: "coupon";
|
|
2421
|
+
_tags?: string[];
|
|
2422
|
+
/**
|
|
2423
|
+
* The creation date for the opportunity
|
|
2424
|
+
*/
|
|
2425
|
+
_created_at?: string; // date-time
|
|
2426
|
+
/**
|
|
2427
|
+
* The date the coupon was last updated
|
|
2428
|
+
*/
|
|
2429
|
+
_updated_at?: string; // date-time
|
|
2430
|
+
name?: string | null;
|
|
2431
|
+
description?: string | null;
|
|
2432
|
+
type: "fixed" | "percentage";
|
|
2433
|
+
category: "discount" | "cashback";
|
|
2434
|
+
/**
|
|
2435
|
+
* Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.
|
|
2436
|
+
*/
|
|
2437
|
+
percentage_value?: string | null;
|
|
2438
|
+
/**
|
|
2439
|
+
* Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.
|
|
2440
|
+
*/
|
|
2441
|
+
fixed_value?: number;
|
|
2442
|
+
/**
|
|
2443
|
+
* Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.
|
|
2444
|
+
*/
|
|
2445
|
+
fixed_value_decimal?: string;
|
|
2446
|
+
/**
|
|
2447
|
+
* Use if type is set to fixed. Three-letter ISO currency code, in lowercase.
|
|
2448
|
+
*/
|
|
2449
|
+
fixed_value_currency?: /* Use if type is set to fixed. Three-letter ISO currency code, in lowercase. */ /**
|
|
2450
|
+
* Three-letter ISO currency code, in lowercase. Must be a supported currency.
|
|
2451
|
+
* ISO 4217 CURRENCY CODES as specified in the documentation: https://www.iso.org/iso-4217-currency-codes.html
|
|
2452
|
+
*
|
|
2453
|
+
* example:
|
|
2454
|
+
* EUR
|
|
2455
|
+
*/
|
|
2456
|
+
Currency;
|
|
2457
|
+
/**
|
|
2458
|
+
* The cashback period, for now it's limited to either 0 months or 12 months
|
|
2459
|
+
*/
|
|
2460
|
+
cashback_period?: "0" | "12";
|
|
2461
|
+
active?: boolean;
|
|
2462
|
+
/**
|
|
2463
|
+
* Whether the coupon requires a promo code to be applied
|
|
2464
|
+
*/
|
|
2465
|
+
requires_promo_code?: boolean;
|
|
2466
|
+
}
|
|
2527
2467
|
/**
|
|
2528
2468
|
* The coupon configuration
|
|
2529
2469
|
* example:
|
|
@@ -4168,37 +4108,7 @@ declare namespace Components {
|
|
|
4168
4108
|
/**
|
|
4169
4109
|
* The coupons applicable to the price item
|
|
4170
4110
|
*/
|
|
4171
|
-
_coupons?: (
|
|
4172
|
-
* The coupon configuration
|
|
4173
|
-
* example:
|
|
4174
|
-
* {
|
|
4175
|
-
* "_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
4176
|
-
* "_schema": "coupon",
|
|
4177
|
-
* "_org": "org_12345",
|
|
4178
|
-
* "_created_at": "2024-01-15T10:00:00.000Z",
|
|
4179
|
-
* "_updated_at": "2024-01-20T12:00:00.000Z",
|
|
4180
|
-
* "_title": "Sample Coupon",
|
|
4181
|
-
* "name": "Sample Coupon",
|
|
4182
|
-
* "type": "fixed",
|
|
4183
|
-
* "fixed_value": 555,
|
|
4184
|
-
* "fixed_value_currency": "USD",
|
|
4185
|
-
* "fixed_value_decimal": "5.55",
|
|
4186
|
-
* "active": true,
|
|
4187
|
-
* "prices": {
|
|
4188
|
-
* "$relation": [
|
|
4189
|
-
* {
|
|
4190
|
-
* "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
|
|
4191
|
-
* "_tags": [
|
|
4192
|
-
* "discount",
|
|
4193
|
-
* "special"
|
|
4194
|
-
* ],
|
|
4195
|
-
* "_schema": "price"
|
|
4196
|
-
* }
|
|
4197
|
-
* ]
|
|
4198
|
-
* }
|
|
4199
|
-
* }
|
|
4200
|
-
*/
|
|
4201
|
-
Coupon)[];
|
|
4111
|
+
_coupons?: (CouponItem)[];
|
|
4202
4112
|
/**
|
|
4203
4113
|
* When set to true on a `_price` displayed as OnRequest (`show_as_on_request: 'on_request'`) this flag means the price has been approved and can now be displayed to the customer. This flag is only valid for prices shown as 'on_request'.
|
|
4204
4114
|
*/
|
|
@@ -4246,7 +4156,7 @@ declare namespace Components {
|
|
|
4246
4156
|
/**
|
|
4247
4157
|
* The flag for prices that contain price components.
|
|
4248
4158
|
*/
|
|
4249
|
-
is_composite_price?:
|
|
4159
|
+
is_composite_price?: false;
|
|
4250
4160
|
/**
|
|
4251
4161
|
* An arbitrary string attached to the price item. Often useful for displaying to users. Defaults to product name.
|
|
4252
4162
|
*/
|
|
@@ -4409,37 +4319,7 @@ declare namespace Components {
|
|
|
4409
4319
|
/**
|
|
4410
4320
|
* The coupons applicable to the price item
|
|
4411
4321
|
*/
|
|
4412
|
-
_coupons?: (
|
|
4413
|
-
* The coupon configuration
|
|
4414
|
-
* example:
|
|
4415
|
-
* {
|
|
4416
|
-
* "_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
4417
|
-
* "_schema": "coupon",
|
|
4418
|
-
* "_org": "org_12345",
|
|
4419
|
-
* "_created_at": "2024-01-15T10:00:00.000Z",
|
|
4420
|
-
* "_updated_at": "2024-01-20T12:00:00.000Z",
|
|
4421
|
-
* "_title": "Sample Coupon",
|
|
4422
|
-
* "name": "Sample Coupon",
|
|
4423
|
-
* "type": "fixed",
|
|
4424
|
-
* "fixed_value": 555,
|
|
4425
|
-
* "fixed_value_currency": "USD",
|
|
4426
|
-
* "fixed_value_decimal": "5.55",
|
|
4427
|
-
* "active": true,
|
|
4428
|
-
* "prices": {
|
|
4429
|
-
* "$relation": [
|
|
4430
|
-
* {
|
|
4431
|
-
* "entity_id": "abc12345-def6-7890-gh12-ijklmnopqrst",
|
|
4432
|
-
* "_tags": [
|
|
4433
|
-
* "discount",
|
|
4434
|
-
* "special"
|
|
4435
|
-
* ],
|
|
4436
|
-
* "_schema": "price"
|
|
4437
|
-
* }
|
|
4438
|
-
* ]
|
|
4439
|
-
* }
|
|
4440
|
-
* }
|
|
4441
|
-
*/
|
|
4442
|
-
Coupon)[];
|
|
4322
|
+
_coupons?: (CouponItem)[];
|
|
4443
4323
|
/**
|
|
4444
4324
|
* One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
|
4445
4325
|
*/
|
|
@@ -4478,7 +4358,7 @@ declare namespace Components {
|
|
|
4478
4358
|
* - `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.
|
|
4479
4359
|
*
|
|
4480
4360
|
*/
|
|
4481
|
-
pricing_model
|
|
4361
|
+
pricing_model?: "per_unit" | "tiered_graduated" | "tiered_volume" | "tiered_flatfee" | "dynamic_tariff" | "external_getag";
|
|
4482
4362
|
/**
|
|
4483
4363
|
* The snapshot of the price linked to the price item.
|
|
4484
4364
|
* example:
|
|
@@ -4660,6 +4540,7 @@ declare namespace Components {
|
|
|
4660
4540
|
_tags?: string[];
|
|
4661
4541
|
};
|
|
4662
4542
|
}
|
|
4543
|
+
export type PriceItemUnion = /* Represents a price input to the pricing library. */ PriceItemDto | /* Represents a composite price input to the pricing library. */ CompositePriceItemDto;
|
|
4663
4544
|
/**
|
|
4664
4545
|
* Tracks a set of product prices, quantities, (discounts) and taxes.
|
|
4665
4546
|
*/
|
|
@@ -4681,7 +4562,7 @@ declare namespace Components {
|
|
|
4681
4562
|
/**
|
|
4682
4563
|
* A valid set of product prices, quantities, (discounts) and taxes from a client.
|
|
4683
4564
|
*/
|
|
4684
|
-
export type PriceItemsDto =
|
|
4565
|
+
export type PriceItemsDto = PriceItemUnion[];
|
|
4685
4566
|
export interface PriceTier {
|
|
4686
4567
|
up_to?: number | null;
|
|
4687
4568
|
flat_fee_amount?: number;
|
|
@@ -6387,6 +6268,7 @@ export type ComputedPriceBreakdown = Components.Schemas.ComputedPriceBreakdown;
|
|
|
6387
6268
|
export type ComputedPriceComponents = Components.Schemas.ComputedPriceComponents;
|
|
6388
6269
|
export type ConsumptionTypeGetAg = Components.Schemas.ConsumptionTypeGetAg;
|
|
6389
6270
|
export type Coupon = Components.Schemas.Coupon;
|
|
6271
|
+
export type CouponItem = Components.Schemas.CouponItem;
|
|
6390
6272
|
export type CouponWithoutPromoCodes = Components.Schemas.CouponWithoutPromoCodes;
|
|
6391
6273
|
export type Currency = Components.Schemas.Currency;
|
|
6392
6274
|
export type Customer = Components.Schemas.Customer;
|
|
@@ -6431,6 +6313,7 @@ export type PriceInputMapping = Components.Schemas.PriceInputMapping;
|
|
|
6431
6313
|
export type PriceInputMappings = Components.Schemas.PriceInputMappings;
|
|
6432
6314
|
export type PriceItem = Components.Schemas.PriceItem;
|
|
6433
6315
|
export type PriceItemDto = Components.Schemas.PriceItemDto;
|
|
6316
|
+
export type PriceItemUnion = Components.Schemas.PriceItemUnion;
|
|
6434
6317
|
export type PriceItems = Components.Schemas.PriceItems;
|
|
6435
6318
|
export type PriceItemsDto = Components.Schemas.PriceItemsDto;
|
|
6436
6319
|
export type PriceTier = Components.Schemas.PriceTier;
|
package/dist/openapi.json
CHANGED
|
@@ -159,6 +159,14 @@
|
|
|
159
159
|
"price_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b",
|
|
160
160
|
"quantity": 2
|
|
161
161
|
},
|
|
162
|
+
{
|
|
163
|
+
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
|
|
164
|
+
"price_id": "396cb5f3-ea0b-4629-99ca-303661de5a9b",
|
|
165
|
+
"quantity": 2,
|
|
166
|
+
"coupon_ids": [
|
|
167
|
+
"0f8c4852-23fa-4a64-a2f3-88702335f094"
|
|
168
|
+
]
|
|
169
|
+
},
|
|
162
170
|
{
|
|
163
171
|
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
|
|
164
172
|
"price_id": "2abe0c6f-63ef-417b-8c85-5546359382d9",
|
|
@@ -175,6 +183,263 @@
|
|
|
175
183
|
}
|
|
176
184
|
}
|
|
177
185
|
]
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
|
|
189
|
+
"price_id": "b59acf37-3cc0-456c-a712-1db0fc478d2d",
|
|
190
|
+
"quantity": 1,
|
|
191
|
+
"price_component_coupon_ids": {
|
|
192
|
+
"583fb57a-7549-4624-82d6-342d5e6542f7": [
|
|
193
|
+
"0f8c4852-23fa-4a64-a2f3-88702335f094"
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"price_mappings": [
|
|
197
|
+
{
|
|
198
|
+
"price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534",
|
|
199
|
+
"frequency_unit": "yearly",
|
|
200
|
+
"value": 10000,
|
|
201
|
+
"name": "Estimated consumption",
|
|
202
|
+
"metadata": {
|
|
203
|
+
"journey_title": "P&G",
|
|
204
|
+
"step_name": "Number Inputs"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"item_components": [
|
|
209
|
+
{
|
|
210
|
+
"pricing_model": "per_unit",
|
|
211
|
+
"quantity": 1,
|
|
212
|
+
"type": "recurring",
|
|
213
|
+
"billing_period": "monthly",
|
|
214
|
+
"price_id": "583fb57a-7549-4624-82d6-342d5e6542f7",
|
|
215
|
+
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
|
|
216
|
+
"_price": {
|
|
217
|
+
"pricing_model": "per_unit",
|
|
218
|
+
"unit_amount": 1500,
|
|
219
|
+
"unit_amount_currency": "EUR",
|
|
220
|
+
"unit_amount_decimal": "15",
|
|
221
|
+
"sales_tax": "standard",
|
|
222
|
+
"active": true,
|
|
223
|
+
"price_display_in_journeys": "show_price",
|
|
224
|
+
"type": "recurring",
|
|
225
|
+
"_title": "Base Price",
|
|
226
|
+
"tax": [
|
|
227
|
+
{
|
|
228
|
+
"_schema": "tax",
|
|
229
|
+
"active": true,
|
|
230
|
+
"description": "GST",
|
|
231
|
+
"rate": 19,
|
|
232
|
+
"region": "DE",
|
|
233
|
+
"type": "Custom",
|
|
234
|
+
"_id": "d792070e-328d-4d2c-8aba-5ac7b23ff621",
|
|
235
|
+
"_org": "739224",
|
|
236
|
+
"_created_at": "2024-12-18T14:14:53.340Z",
|
|
237
|
+
"_updated_at": "2025-02-11T11:07:49.660Z",
|
|
238
|
+
"_title": "GST",
|
|
239
|
+
"behavior": "inclusive"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"tax_behavior": "inclusive",
|
|
243
|
+
"billing_period": "monthly",
|
|
244
|
+
"billing_duration_unit": "months",
|
|
245
|
+
"notice_time_unit": "months",
|
|
246
|
+
"termination_time_unit": "months",
|
|
247
|
+
"renewal_duration_unit": "months",
|
|
248
|
+
"description": "Base Price",
|
|
249
|
+
"is_tax_inclusive": false,
|
|
250
|
+
"internal_description": "Base Price",
|
|
251
|
+
"variable_price": true
|
|
252
|
+
},
|
|
253
|
+
"taxes": [
|
|
254
|
+
{
|
|
255
|
+
"tax": {
|
|
256
|
+
"_schema": "tax",
|
|
257
|
+
"active": true,
|
|
258
|
+
"description": "GST",
|
|
259
|
+
"rate": 19,
|
|
260
|
+
"region": "DE",
|
|
261
|
+
"type": "Custom",
|
|
262
|
+
"_id": "d792070e-328d-4d2c-8aba-5ac7b23ff621",
|
|
263
|
+
"_org": "739224",
|
|
264
|
+
"_created_at": "2024-12-18T14:14:53.340Z",
|
|
265
|
+
"_updated_at": "2025-02-11T11:07:49.660Z",
|
|
266
|
+
"_title": "GST",
|
|
267
|
+
"behavior": "inclusive"
|
|
268
|
+
},
|
|
269
|
+
"amount": 285
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"unit_amount": 1000,
|
|
273
|
+
"unit_amount_decimal": "10",
|
|
274
|
+
"currency": "EUR",
|
|
275
|
+
"description": "Base Price",
|
|
276
|
+
"is_tax_inclusive": false
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"pricing_model": "per_unit",
|
|
280
|
+
"quantity": 1,
|
|
281
|
+
"type": "recurring",
|
|
282
|
+
"billing_period": "monthly",
|
|
283
|
+
"price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534",
|
|
284
|
+
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
|
|
285
|
+
"_price": {
|
|
286
|
+
"_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534",
|
|
287
|
+
"active": true,
|
|
288
|
+
"description": "Work Price",
|
|
289
|
+
"is_tax_inclusive": true,
|
|
290
|
+
"price_display_in_journeys": "show_price",
|
|
291
|
+
"pricing_model": "per_unit",
|
|
292
|
+
"type": "recurring",
|
|
293
|
+
"unit_amount": 10,
|
|
294
|
+
"unit_amount_currency": "EUR",
|
|
295
|
+
"unit_amount_decimal": "0.10",
|
|
296
|
+
"variable_price": true,
|
|
297
|
+
"billing_period": "monthly",
|
|
298
|
+
"internal_description": "Work Price",
|
|
299
|
+
"_title": "Work Price",
|
|
300
|
+
"unit": "kwh"
|
|
301
|
+
},
|
|
302
|
+
"taxes": [
|
|
303
|
+
{
|
|
304
|
+
"tax": {
|
|
305
|
+
"_schema": "tax",
|
|
306
|
+
"active": true,
|
|
307
|
+
"description": "19%",
|
|
308
|
+
"rate": 19,
|
|
309
|
+
"region": "DE",
|
|
310
|
+
"type": "VAT",
|
|
311
|
+
"_id": "bd488a36-cae5-4b18-9ca5-f5cbf6d9735b",
|
|
312
|
+
"_org": "739224",
|
|
313
|
+
"_created_at": "2025-01-15T12:04:52.431Z",
|
|
314
|
+
"_updated_at": "2025-01-15T12:04:52.431Z",
|
|
315
|
+
"_title": "19%"
|
|
316
|
+
},
|
|
317
|
+
"amount": 1331
|
|
318
|
+
}
|
|
319
|
+
],
|
|
320
|
+
"unit_amount": 8,
|
|
321
|
+
"unit_amount_decimal": "0.08",
|
|
322
|
+
"currency": "EUR",
|
|
323
|
+
"description": "Work Price",
|
|
324
|
+
"is_tax_inclusive": true
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"description": "Product Name",
|
|
330
|
+
"quantity": 1,
|
|
331
|
+
"is_composite_price": true,
|
|
332
|
+
"item_components": [
|
|
333
|
+
{
|
|
334
|
+
"quantity": 1,
|
|
335
|
+
"description": "Price Description",
|
|
336
|
+
"unit_amount": 10000,
|
|
337
|
+
"unit_amount_decimal": "100",
|
|
338
|
+
"unit_amount_currency": "EUR",
|
|
339
|
+
"pricing_model": "per_unit",
|
|
340
|
+
"taxes": [
|
|
341
|
+
{
|
|
342
|
+
"rate": "nontaxable",
|
|
343
|
+
"rateValue": 0,
|
|
344
|
+
"amount": 0
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"type": "one_time",
|
|
348
|
+
"is_tax_inclusive": true
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
"currency": "EUR"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"price_id": "b59acf37-3cc0-456c-a712-1db0fc478d2d",
|
|
355
|
+
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
|
|
356
|
+
"quantity": 1,
|
|
357
|
+
"description": "Power Test",
|
|
358
|
+
"is_composite_price": true,
|
|
359
|
+
"item_components": [
|
|
360
|
+
{
|
|
361
|
+
"price_id": "583fb57a-7549-4624-82d6-342d5e6542f7",
|
|
362
|
+
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
|
|
363
|
+
"quantity": 1,
|
|
364
|
+
"description": "Base Price",
|
|
365
|
+
"unit_amount": 1500,
|
|
366
|
+
"unit_amount_decimal": "15",
|
|
367
|
+
"unit_amount_currency": "EUR",
|
|
368
|
+
"pricing_model": "per_unit",
|
|
369
|
+
"type": "recurring",
|
|
370
|
+
"billing_period": "monthly",
|
|
371
|
+
"is_tax_inclusive": false,
|
|
372
|
+
"_coupons": [
|
|
373
|
+
{
|
|
374
|
+
"name": "My Custom Discount",
|
|
375
|
+
"type": "fixed",
|
|
376
|
+
"fixed_value": 500,
|
|
377
|
+
"fixed_value_currency": "EUR",
|
|
378
|
+
"fixed_value_decimal": "5",
|
|
379
|
+
"category": "discount",
|
|
380
|
+
"active": true,
|
|
381
|
+
"_schema": "coupon",
|
|
382
|
+
"requires_promo_code": false,
|
|
383
|
+
"_org": "739224",
|
|
384
|
+
"_created_at": "2025-02-24T10:01:24.537Z",
|
|
385
|
+
"_updated_at": "2025-02-24T10:01:24.537Z",
|
|
386
|
+
"percentage_value": "0",
|
|
387
|
+
"_title": "My Custom Discount"
|
|
388
|
+
}
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534",
|
|
393
|
+
"product_id": "c5695fb5-f02d-4e46-9fb2-a36dc4e9876f",
|
|
394
|
+
"quantity": 1,
|
|
395
|
+
"description": "Work Price",
|
|
396
|
+
"unit_amount": 10,
|
|
397
|
+
"unit_amount_decimal": "0.10123",
|
|
398
|
+
"unit_amount_currency": "EUR",
|
|
399
|
+
"pricing_model": "per_unit",
|
|
400
|
+
"taxes": [
|
|
401
|
+
{
|
|
402
|
+
"tax": {
|
|
403
|
+
"_schema": "tax",
|
|
404
|
+
"active": true,
|
|
405
|
+
"description": "19%",
|
|
406
|
+
"rate": 19,
|
|
407
|
+
"region": "DE",
|
|
408
|
+
"type": "VAT",
|
|
409
|
+
"_id": "bd488a36-cae5-4b18-9ca5-f5cbf6d9735b",
|
|
410
|
+
"_org": "739224",
|
|
411
|
+
"_created_at": "2025-01-15T12:04:52.431Z",
|
|
412
|
+
"_updated_at": "2025-01-15T12:04:52.431Z",
|
|
413
|
+
"_title": "19%"
|
|
414
|
+
},
|
|
415
|
+
"amount": 2
|
|
416
|
+
}
|
|
417
|
+
],
|
|
418
|
+
"type": "recurring",
|
|
419
|
+
"billing_period": "monthly",
|
|
420
|
+
"unit_amount_net": 8,
|
|
421
|
+
"unit_amount_gross": 10,
|
|
422
|
+
"amount_subtotal": 8,
|
|
423
|
+
"amount_total": 10,
|
|
424
|
+
"amount_tax": 2,
|
|
425
|
+
"is_tax_inclusive": true,
|
|
426
|
+
"unit_amount_net_decimal": "0.084033613445",
|
|
427
|
+
"unit_amount_gross_decimal": "0.1",
|
|
428
|
+
"amount_subtotal_decimal": "0.084033613445",
|
|
429
|
+
"amount_total_decimal": "0.1"
|
|
430
|
+
}
|
|
431
|
+
],
|
|
432
|
+
"price_mappings": [
|
|
433
|
+
{
|
|
434
|
+
"price_id": "583fb57a-7549-4624-82d6-342d5e6542f7",
|
|
435
|
+
"value": 1
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"price_id": "25c7dc77-ac80-480a-92c0-8c0e913b5534",
|
|
439
|
+
"value": 2000
|
|
440
|
+
}
|
|
441
|
+
],
|
|
442
|
+
"currency": "EUR"
|
|
178
443
|
}
|
|
179
444
|
]
|
|
180
445
|
}
|
|
@@ -4081,7 +4346,7 @@
|
|
|
4081
4346
|
"$ref": "#/components/schemas/MetaData"
|
|
4082
4347
|
},
|
|
4083
4348
|
"quantity": {
|
|
4084
|
-
"type": "
|
|
4349
|
+
"type": "number",
|
|
4085
4350
|
"description": "The quantity of products being purchased."
|
|
4086
4351
|
},
|
|
4087
4352
|
"product_id": {
|
|
@@ -4126,18 +4391,28 @@
|
|
|
4126
4391
|
}
|
|
4127
4392
|
}
|
|
4128
4393
|
},
|
|
4394
|
+
"PriceItemUnion": {
|
|
4395
|
+
"anyOf": [
|
|
4396
|
+
{
|
|
4397
|
+
"$ref": "#/components/schemas/PriceItemDto"
|
|
4398
|
+
},
|
|
4399
|
+
{
|
|
4400
|
+
"$ref": "#/components/schemas/CompositePriceItemDto"
|
|
4401
|
+
}
|
|
4402
|
+
],
|
|
4403
|
+
"discriminator": {
|
|
4404
|
+
"propertyName": "is_composite_price",
|
|
4405
|
+
"mapping": {
|
|
4406
|
+
"false": "#/components/schemas/PriceItemDto",
|
|
4407
|
+
"true": "#/components/schemas/CompositePriceItemDto"
|
|
4408
|
+
}
|
|
4409
|
+
}
|
|
4410
|
+
},
|
|
4129
4411
|
"PriceItemsDto": {
|
|
4130
4412
|
"description": "A valid set of product prices, quantities, (discounts) and taxes from a client.",
|
|
4131
4413
|
"type": "array",
|
|
4132
4414
|
"items": {
|
|
4133
|
-
"
|
|
4134
|
-
{
|
|
4135
|
-
"$ref": "#/components/schemas/PriceItemDto"
|
|
4136
|
-
},
|
|
4137
|
-
{
|
|
4138
|
-
"$ref": "#/components/schemas/CompositePriceItemDto"
|
|
4139
|
-
}
|
|
4140
|
-
]
|
|
4415
|
+
"$ref": "#/components/schemas/PriceItemUnion"
|
|
4141
4416
|
}
|
|
4142
4417
|
},
|
|
4143
4418
|
"BasePriceItemDto": {
|
|
@@ -4205,7 +4480,7 @@
|
|
|
4205
4480
|
"items": {
|
|
4206
4481
|
"oneOf": [
|
|
4207
4482
|
{
|
|
4208
|
-
"$ref": "#/components/schemas/
|
|
4483
|
+
"$ref": "#/components/schemas/CouponItem"
|
|
4209
4484
|
}
|
|
4210
4485
|
]
|
|
4211
4486
|
}
|
|
@@ -4213,113 +4488,128 @@
|
|
|
4213
4488
|
}
|
|
4214
4489
|
},
|
|
4215
4490
|
"PriceItemDto": {
|
|
4491
|
+
"description": "Represents a price input to the pricing library.",
|
|
4216
4492
|
"allOf": [
|
|
4217
4493
|
{
|
|
4218
4494
|
"$ref": "#/components/schemas/BasePriceItemDto"
|
|
4219
|
-
}
|
|
4220
|
-
],
|
|
4221
|
-
"description": "Represents a price input to the pricing library.",
|
|
4222
|
-
"type": "object",
|
|
4223
|
-
"properties": {
|
|
4224
|
-
"type": {
|
|
4225
|
-
"type": "string",
|
|
4226
|
-
"description": "One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.",
|
|
4227
|
-
"enum": [
|
|
4228
|
-
"one_time",
|
|
4229
|
-
"recurring"
|
|
4230
|
-
]
|
|
4231
|
-
},
|
|
4232
|
-
"billing_period": {
|
|
4233
|
-
"type": "string",
|
|
4234
|
-
"description": "The price billing period.",
|
|
4235
|
-
"enum": [
|
|
4236
|
-
"weekly",
|
|
4237
|
-
"monthly",
|
|
4238
|
-
"every_quarter",
|
|
4239
|
-
"every_6_months",
|
|
4240
|
-
"yearly"
|
|
4241
|
-
]
|
|
4242
|
-
},
|
|
4243
|
-
"unit_amount": {
|
|
4244
|
-
"type": "integer",
|
|
4245
|
-
"description": "The unit amount value"
|
|
4246
|
-
},
|
|
4247
|
-
"unit_amount_gross": {
|
|
4248
|
-
"type": "integer",
|
|
4249
|
-
"description": "The unit gross amount value."
|
|
4250
|
-
},
|
|
4251
|
-
"unit_amount_currency": {
|
|
4252
|
-
"$ref": "#/components/schemas/Currency"
|
|
4253
|
-
},
|
|
4254
|
-
"unit_amount_decimal": {
|
|
4255
|
-
"description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
|
|
4256
|
-
"type": "string"
|
|
4257
|
-
},
|
|
4258
|
-
"pricing_model": {
|
|
4259
|
-
"type": "string",
|
|
4260
|
-
"description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n",
|
|
4261
|
-
"enum": [
|
|
4262
|
-
"per_unit",
|
|
4263
|
-
"tiered_graduated",
|
|
4264
|
-
"tiered_volume",
|
|
4265
|
-
"tiered_flatfee",
|
|
4266
|
-
"dynamic_tariff",
|
|
4267
|
-
"external_getag"
|
|
4268
|
-
]
|
|
4269
4495
|
},
|
|
4270
|
-
|
|
4271
|
-
"
|
|
4272
|
-
"
|
|
4273
|
-
{
|
|
4274
|
-
"
|
|
4496
|
+
{
|
|
4497
|
+
"type": "object",
|
|
4498
|
+
"properties": {
|
|
4499
|
+
"type": {
|
|
4500
|
+
"type": "string",
|
|
4501
|
+
"description": "One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.",
|
|
4502
|
+
"enum": [
|
|
4503
|
+
"one_time",
|
|
4504
|
+
"recurring"
|
|
4505
|
+
]
|
|
4506
|
+
},
|
|
4507
|
+
"billing_period": {
|
|
4508
|
+
"type": "string",
|
|
4509
|
+
"description": "The price billing period.",
|
|
4510
|
+
"enum": [
|
|
4511
|
+
"weekly",
|
|
4512
|
+
"monthly",
|
|
4513
|
+
"every_quarter",
|
|
4514
|
+
"every_6_months",
|
|
4515
|
+
"yearly"
|
|
4516
|
+
]
|
|
4517
|
+
},
|
|
4518
|
+
"unit_amount": {
|
|
4519
|
+
"type": "integer",
|
|
4520
|
+
"description": "The unit amount value"
|
|
4521
|
+
},
|
|
4522
|
+
"unit_amount_gross": {
|
|
4523
|
+
"type": "integer",
|
|
4524
|
+
"description": "The unit gross amount value."
|
|
4525
|
+
},
|
|
4526
|
+
"unit_amount_currency": {
|
|
4527
|
+
"$ref": "#/components/schemas/Currency"
|
|
4528
|
+
},
|
|
4529
|
+
"unit_amount_decimal": {
|
|
4530
|
+
"description": "The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places.",
|
|
4531
|
+
"type": "string"
|
|
4532
|
+
},
|
|
4533
|
+
"is_composite_price": {
|
|
4534
|
+
"description": "The flag for prices that contain price components.",
|
|
4535
|
+
"type": "boolean",
|
|
4536
|
+
"enum": [
|
|
4537
|
+
false
|
|
4538
|
+
]
|
|
4539
|
+
},
|
|
4540
|
+
"pricing_model": {
|
|
4541
|
+
"type": "string",
|
|
4542
|
+
"description": "Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.\n- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity\n- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.\n- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `tiered_flatfee` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.\n- `dynamic_tariff` indicates that the price is dynamically dependend on the (quarter)-hourly spot market price.\n- `external_getag` indicates that the price is influenced by aquisition fees provided by GetAG.\n",
|
|
4543
|
+
"enum": [
|
|
4544
|
+
"per_unit",
|
|
4545
|
+
"tiered_graduated",
|
|
4546
|
+
"tiered_volume",
|
|
4547
|
+
"tiered_flatfee",
|
|
4548
|
+
"dynamic_tariff",
|
|
4549
|
+
"external_getag"
|
|
4550
|
+
]
|
|
4551
|
+
},
|
|
4552
|
+
"_price": {
|
|
4553
|
+
"description": "The snapshot of the price linked to the price item.",
|
|
4554
|
+
"allOf": [
|
|
4555
|
+
{
|
|
4556
|
+
"$ref": "#/components/schemas/Price"
|
|
4557
|
+
}
|
|
4558
|
+
]
|
|
4275
4559
|
}
|
|
4276
|
-
|
|
4560
|
+
}
|
|
4277
4561
|
}
|
|
4278
|
-
},
|
|
4279
|
-
"required": [
|
|
4280
|
-
"pricing_model"
|
|
4281
4562
|
]
|
|
4282
4563
|
},
|
|
4283
4564
|
"CompositePriceItemDto": {
|
|
4565
|
+
"description": "Represents a composite price input to the pricing library.",
|
|
4284
4566
|
"allOf": [
|
|
4285
4567
|
{
|
|
4286
4568
|
"$ref": "#/components/schemas/BasePriceItemDto"
|
|
4287
|
-
}
|
|
4288
|
-
],
|
|
4289
|
-
"description": "Represents a composite price input to the pricing library.",
|
|
4290
|
-
"type": "object",
|
|
4291
|
-
"properties": {
|
|
4292
|
-
"item_components": {
|
|
4293
|
-
"type": "array",
|
|
4294
|
-
"description": "Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).",
|
|
4295
|
-
"items": {
|
|
4296
|
-
"$ref": "#/components/schemas/PriceItemDto"
|
|
4297
|
-
}
|
|
4298
|
-
},
|
|
4299
|
-
"selected_price_component_ids": {
|
|
4300
|
-
"type": "array",
|
|
4301
|
-
"description": "The ids of the price components that should be selected for the price calculation.",
|
|
4302
|
-
"items": {
|
|
4303
|
-
"type": "string",
|
|
4304
|
-
"description": "The id of the price component"
|
|
4305
|
-
}
|
|
4306
4569
|
},
|
|
4307
|
-
|
|
4570
|
+
{
|
|
4308
4571
|
"type": "object",
|
|
4309
|
-
"
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4572
|
+
"properties": {
|
|
4573
|
+
"is_composite_price": {
|
|
4574
|
+
"description": "The flag for prices that contain price components.",
|
|
4575
|
+
"type": "boolean",
|
|
4576
|
+
"enum": [
|
|
4577
|
+
true
|
|
4578
|
+
]
|
|
4579
|
+
},
|
|
4580
|
+
"item_components": {
|
|
4581
|
+
"type": "array",
|
|
4582
|
+
"description": "Contains price item configurations, per price component, when the main price item is a [composite price](/api/pricing#tag/dynamic_price_schema).",
|
|
4583
|
+
"items": {
|
|
4584
|
+
"$ref": "#/components/schemas/PriceItemDto"
|
|
4585
|
+
}
|
|
4586
|
+
},
|
|
4587
|
+
"selected_price_component_ids": {
|
|
4588
|
+
"type": "array",
|
|
4589
|
+
"description": "The ids of the price components that should be selected for the price calculation.",
|
|
4590
|
+
"items": {
|
|
4591
|
+
"type": "string",
|
|
4592
|
+
"description": "The id of the price component"
|
|
4593
|
+
}
|
|
4594
|
+
},
|
|
4595
|
+
"price_component_coupon_ids": {
|
|
4596
|
+
"type": "object",
|
|
4597
|
+
"description": "The map of coupon ids applicable to the price components",
|
|
4598
|
+
"readOnly": true,
|
|
4599
|
+
"additionalProperties": {
|
|
4600
|
+
"type": "array",
|
|
4601
|
+
"items": {
|
|
4602
|
+
"type": "string",
|
|
4603
|
+
"description": "The id of the coupon"
|
|
4604
|
+
}
|
|
4605
|
+
}
|
|
4606
|
+
},
|
|
4607
|
+
"_price": {
|
|
4608
|
+
"$ref": "#/components/schemas/CompositePrice"
|
|
4316
4609
|
}
|
|
4317
4610
|
}
|
|
4318
|
-
},
|
|
4319
|
-
"_price": {
|
|
4320
|
-
"$ref": "#/components/schemas/CompositePrice"
|
|
4321
4611
|
}
|
|
4322
|
-
|
|
4612
|
+
]
|
|
4323
4613
|
},
|
|
4324
4614
|
"TaxAmountDto": {
|
|
4325
4615
|
"type": "object",
|
|
@@ -4778,7 +5068,7 @@
|
|
|
4778
5068
|
"items": {
|
|
4779
5069
|
"oneOf": [
|
|
4780
5070
|
{
|
|
4781
|
-
"$ref": "#/components/schemas/
|
|
5071
|
+
"$ref": "#/components/schemas/CouponItem"
|
|
4782
5072
|
}
|
|
4783
5073
|
]
|
|
4784
5074
|
}
|
|
@@ -5851,6 +6141,115 @@
|
|
|
5851
6141
|
}
|
|
5852
6142
|
}
|
|
5853
6143
|
},
|
|
6144
|
+
"CouponItem": {
|
|
6145
|
+
"type": "object",
|
|
6146
|
+
"required": [
|
|
6147
|
+
"type",
|
|
6148
|
+
"category",
|
|
6149
|
+
"_schema"
|
|
6150
|
+
],
|
|
6151
|
+
"properties": {
|
|
6152
|
+
"_id": {
|
|
6153
|
+
"$ref": "#/components/schemas/EntityId",
|
|
6154
|
+
"readOnly": true
|
|
6155
|
+
},
|
|
6156
|
+
"_title": {
|
|
6157
|
+
"type": "string",
|
|
6158
|
+
"description": "The auto-generated title for the title",
|
|
6159
|
+
"readOnly": true
|
|
6160
|
+
},
|
|
6161
|
+
"_org": {
|
|
6162
|
+
"type": "string",
|
|
6163
|
+
"description": "Organization Id the entity belongs to",
|
|
6164
|
+
"readOnly": true
|
|
6165
|
+
},
|
|
6166
|
+
"_schema": {
|
|
6167
|
+
"type": "string",
|
|
6168
|
+
"enum": [
|
|
6169
|
+
"coupon"
|
|
6170
|
+
],
|
|
6171
|
+
"readOnly": true,
|
|
6172
|
+
"description": "The schema of the entity, for coupons it is always `coupon`"
|
|
6173
|
+
},
|
|
6174
|
+
"_tags": {
|
|
6175
|
+
"type": "array",
|
|
6176
|
+
"items": {
|
|
6177
|
+
"type": "string"
|
|
6178
|
+
}
|
|
6179
|
+
},
|
|
6180
|
+
"_created_at": {
|
|
6181
|
+
"type": "string",
|
|
6182
|
+
"format": "date-time",
|
|
6183
|
+
"readOnly": true,
|
|
6184
|
+
"description": "The creation date for the opportunity"
|
|
6185
|
+
},
|
|
6186
|
+
"_updated_at": {
|
|
6187
|
+
"type": "string",
|
|
6188
|
+
"format": "date-time",
|
|
6189
|
+
"readOnly": true,
|
|
6190
|
+
"description": "The date the coupon was last updated"
|
|
6191
|
+
},
|
|
6192
|
+
"name": {
|
|
6193
|
+
"type": "string",
|
|
6194
|
+
"nullable": true
|
|
6195
|
+
},
|
|
6196
|
+
"description": {
|
|
6197
|
+
"type": "string",
|
|
6198
|
+
"nullable": true
|
|
6199
|
+
},
|
|
6200
|
+
"type": {
|
|
6201
|
+
"type": "string",
|
|
6202
|
+
"enum": [
|
|
6203
|
+
"fixed",
|
|
6204
|
+
"percentage"
|
|
6205
|
+
]
|
|
6206
|
+
},
|
|
6207
|
+
"category": {
|
|
6208
|
+
"type": "string",
|
|
6209
|
+
"enum": [
|
|
6210
|
+
"discount",
|
|
6211
|
+
"cashback"
|
|
6212
|
+
]
|
|
6213
|
+
},
|
|
6214
|
+
"percentage_value": {
|
|
6215
|
+
"type": "string",
|
|
6216
|
+
"description": "Use if type is set to percentage. The percentage to be discounted, represented as a whole integer.",
|
|
6217
|
+
"nullable": true
|
|
6218
|
+
},
|
|
6219
|
+
"fixed_value": {
|
|
6220
|
+
"description": "Use if type is set to fixed. The fixed amount in cents to be discounted, represented as a whole integer.",
|
|
6221
|
+
"type": "number"
|
|
6222
|
+
},
|
|
6223
|
+
"fixed_value_decimal": {
|
|
6224
|
+
"description": "Use if type is set to fixed. The unit amount in cents to be discounted, represented as a decimal string with at most 12 decimal places.",
|
|
6225
|
+
"type": "string"
|
|
6226
|
+
},
|
|
6227
|
+
"fixed_value_currency": {
|
|
6228
|
+
"description": "Use if type is set to fixed. Three-letter ISO currency code, in lowercase.",
|
|
6229
|
+
"oneOf": [
|
|
6230
|
+
{
|
|
6231
|
+
"$ref": "#/components/schemas/Currency"
|
|
6232
|
+
}
|
|
6233
|
+
]
|
|
6234
|
+
},
|
|
6235
|
+
"cashback_period": {
|
|
6236
|
+
"type": "string",
|
|
6237
|
+
"description": "The cashback period, for now it's limited to either 0 months or 12 months",
|
|
6238
|
+
"enum": [
|
|
6239
|
+
"0",
|
|
6240
|
+
"12"
|
|
6241
|
+
],
|
|
6242
|
+
"nullable": true
|
|
6243
|
+
},
|
|
6244
|
+
"active": {
|
|
6245
|
+
"type": "boolean"
|
|
6246
|
+
},
|
|
6247
|
+
"requires_promo_code": {
|
|
6248
|
+
"type": "boolean",
|
|
6249
|
+
"description": "Whether the coupon requires a promo code to be applied"
|
|
6250
|
+
}
|
|
6251
|
+
}
|
|
6252
|
+
},
|
|
5854
6253
|
"CouponWithoutPromoCodes": {
|
|
5855
6254
|
"allOf": [
|
|
5856
6255
|
{
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/pricing-client",
|
|
3
|
-
"version": "3.47.
|
|
3
|
+
"version": "3.47.8",
|
|
4
4
|
"description": "Client for epilot Pricing APIs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"author": "epilot GmbH",
|
|
8
8
|
"license": "MIT",
|
|
9
|
+
"private": false,
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
11
12
|
"url": "git+https://github.com/epilot-dev/sdk-js.git",
|