partnermax 0.2.0 → 0.2.2
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/CHANGELOG.md +75 -47
- package/LICENSE +201 -201
- package/README.md +394 -370
- package/api-promise.js +1 -1
- package/client.d.mts +9 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -3
- package/client.d.ts.map +1 -1
- package/client.js +12 -2
- package/client.js.map +1 -1
- package/client.mjs +12 -2
- package/client.mjs.map +1 -1
- package/core/api-promise.js +1 -1
- package/core/api-promise.mjs +1 -1
- package/core/pagination.d.mts +57 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +57 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +108 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +102 -0
- package/core/pagination.mjs.map +1 -0
- package/error.js +1 -1
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/package.json +19 -15
- package/pagination.d.mts +3 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +3 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +3 -0
- package/pagination.mjs.map +1 -0
- package/resource.js +1 -1
- package/resources/dealers/dealers.d.mts +7 -71
- package/resources/dealers/dealers.d.mts.map +1 -1
- package/resources/dealers/dealers.d.ts +7 -71
- package/resources/dealers/dealers.d.ts.map +1 -1
- package/resources/dealers/dealers.js +3 -16
- package/resources/dealers/dealers.js.map +1 -1
- package/resources/dealers/dealers.mjs +2 -15
- package/resources/dealers/dealers.mjs.map +1 -1
- package/resources/dealers/index.d.mts +2 -2
- package/resources/dealers/index.d.mts.map +1 -1
- package/resources/dealers/index.d.ts +2 -2
- package/resources/dealers/index.d.ts.map +1 -1
- package/resources/dealers/index.js.map +1 -1
- package/resources/dealers/index.mjs.map +1 -1
- package/resources/dealers/nlt/index.d.mts +1 -1
- package/resources/dealers/nlt/index.d.mts.map +1 -1
- package/resources/dealers/nlt/index.d.ts +1 -1
- package/resources/dealers/nlt/index.d.ts.map +1 -1
- package/resources/dealers/nlt/nlt.d.mts +2 -2
- package/resources/dealers/nlt/nlt.d.mts.map +1 -1
- package/resources/dealers/nlt/nlt.d.ts +2 -2
- package/resources/dealers/nlt/nlt.d.ts.map +1 -1
- package/resources/dealers/nlt/nlt.js +1 -1
- package/resources/dealers/nlt/offers.d.mts +55 -78
- package/resources/dealers/nlt/offers.d.mts.map +1 -1
- package/resources/dealers/nlt/offers.d.ts +55 -78
- package/resources/dealers/nlt/offers.d.ts.map +1 -1
- package/resources/dealers/nlt/offers.js +9 -11
- package/resources/dealers/nlt/offers.js.map +1 -1
- package/resources/dealers/nlt/offers.mjs +9 -11
- package/resources/dealers/nlt/offers.mjs.map +1 -1
- package/resources/dealers/nlt-settings.d.mts +24 -64
- package/resources/dealers/nlt-settings.d.mts.map +1 -1
- package/resources/dealers/nlt-settings.d.ts +24 -64
- package/resources/dealers/nlt-settings.d.ts.map +1 -1
- package/resources/dealers/nlt-settings.js +4 -13
- package/resources/dealers/nlt-settings.js.map +1 -1
- package/resources/dealers/nlt-settings.mjs +4 -13
- package/resources/dealers/nlt-settings.mjs.map +1 -1
- package/resources/dealers/nlt.js +1 -1
- package/resources/dealers/vehicles/images.d.mts +3 -2
- package/resources/dealers/vehicles/images.d.mts.map +1 -1
- package/resources/dealers/vehicles/images.d.ts +3 -2
- package/resources/dealers/vehicles/images.d.ts.map +1 -1
- package/resources/dealers/vehicles/images.js +3 -2
- package/resources/dealers/vehicles/images.js.map +1 -1
- package/resources/dealers/vehicles/images.mjs +3 -2
- package/resources/dealers/vehicles/images.mjs.map +1 -1
- package/resources/dealers/vehicles/index.d.mts +1 -1
- package/resources/dealers/vehicles/index.d.mts.map +1 -1
- package/resources/dealers/vehicles/index.d.ts +1 -1
- package/resources/dealers/vehicles/index.d.ts.map +1 -1
- package/resources/dealers/vehicles/index.js.map +1 -1
- package/resources/dealers/vehicles/index.mjs.map +1 -1
- package/resources/dealers/vehicles/vehicles.d.mts +57 -70
- package/resources/dealers/vehicles/vehicles.d.mts.map +1 -1
- package/resources/dealers/vehicles/vehicles.d.ts +57 -70
- package/resources/dealers/vehicles/vehicles.d.ts.map +1 -1
- package/resources/dealers/vehicles/vehicles.js +19 -19
- package/resources/dealers/vehicles/vehicles.js.map +1 -1
- package/resources/dealers/vehicles/vehicles.mjs +18 -18
- package/resources/dealers/vehicles/vehicles.mjs.map +1 -1
- package/resources/dealers/vehicles.js +1 -1
- package/resources/dealers.js +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/keys.d.mts +7 -6
- package/resources/keys.d.mts.map +1 -1
- package/resources/keys.d.ts +7 -6
- package/resources/keys.d.ts.map +1 -1
- package/resources/keys.js +7 -6
- package/resources/keys.js.map +1 -1
- package/resources/keys.mjs +7 -6
- package/resources/keys.mjs.map +1 -1
- package/resources.js +1 -1
- package/src/api-promise.ts +2 -2
- package/src/client.ts +868 -841
- package/src/core/README.md +3 -3
- package/src/core/api-promise.ts +92 -92
- package/src/core/error.ts +130 -130
- package/src/core/pagination.ts +170 -0
- package/src/core/resource.ts +11 -11
- package/src/core/uploads.ts +2 -2
- package/src/error.ts +2 -2
- package/src/index.ts +23 -22
- package/src/internal/README.md +3 -3
- package/src/internal/builtin-types.ts +93 -93
- package/src/internal/detect-platform.ts +196 -196
- package/src/internal/errors.ts +33 -33
- package/src/internal/headers.ts +97 -97
- package/src/internal/parse.ts +56 -56
- package/src/internal/request-options.ts +91 -91
- package/src/internal/shim-types.ts +26 -26
- package/src/internal/shims.ts +107 -107
- package/src/internal/to-file.ts +154 -154
- package/src/internal/types.ts +93 -93
- package/src/internal/uploads.ts +187 -187
- package/src/internal/utils/base64.ts +40 -40
- package/src/internal/utils/bytes.ts +32 -32
- package/src/internal/utils/env.ts +18 -18
- package/src/internal/utils/log.ts +128 -128
- package/src/internal/utils/path.ts +88 -88
- package/src/internal/utils/query.ts +23 -23
- package/src/internal/utils/sleep.ts +3 -3
- package/src/internal/utils/uuid.ts +17 -17
- package/src/internal/utils/values.ts +105 -105
- package/src/internal/utils.ts +9 -9
- package/src/lib/.keep +4 -4
- package/src/pagination.ts +2 -0
- package/src/resource.ts +2 -2
- package/src/resources/dealers/dealers.ts +260 -348
- package/src/resources/dealers/index.ts +28 -28
- package/src/resources/dealers/nlt/index.ts +11 -11
- package/src/resources/dealers/nlt/nlt.ts +29 -29
- package/src/resources/dealers/nlt/offers.ts +403 -427
- package/src/resources/dealers/nlt-settings.ts +229 -269
- package/src/resources/dealers/nlt.ts +3 -3
- package/src/resources/dealers/vehicles/images.ts +154 -153
- package/src/resources/dealers/vehicles/index.ts +26 -25
- package/src/resources/dealers/vehicles/vehicles.ts +786 -796
- package/src/resources/dealers/vehicles.ts +3 -3
- package/src/resources/dealers.ts +3 -3
- package/src/resources/index.ts +11 -12
- package/src/resources/keys.ts +129 -128
- package/src/resources.ts +1 -1
- package/src/tsconfig.json +11 -11
- package/src/uploads.ts +2 -2
- package/src/version.ts +1 -1
- package/uploads.js +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,269 +1,229 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../core/api-promise';
|
|
5
|
-
import { buildHeaders } from '../../internal/headers';
|
|
6
|
-
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
-
import { path } from '../../internal/utils/path';
|
|
8
|
-
|
|
9
|
-
export class NltSettings extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Return current NLT economics for the dealer.
|
|
12
|
-
*/
|
|
13
|
-
retrieve(dealerID: string, options?: RequestOptions): APIPromise<NltSettings> {
|
|
14
|
-
return this._client.get(path`/v1/dealers/${dealerID}/nlt-settings`, options);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Set markup percent (0-10)
|
|
19
|
-
*
|
|
20
|
-
* Validation:
|
|
21
|
-
*
|
|
22
|
-
* - `agency_markup_percent` ∈ [0, 10] (Pydantic).
|
|
23
|
-
* - `down_payment_tiers.{low,medium,high}` each
|
|
24
|
-
* `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
|
|
25
|
-
* final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* -
|
|
32
|
-
*
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* One down-payment tier — percent of list price + flat EUR.
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* `
|
|
75
|
-
*
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
*
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
*
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
*
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Body param: Three down-payment scenarios (basso / medio / alto).
|
|
233
|
-
*
|
|
234
|
-
* No strict-ascending validation: the final EUR amount depends on the offer's list
|
|
235
|
-
* price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
|
|
236
|
-
* tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
|
|
237
|
-
* semantics (low/medium/high) are advisory — apimax/DealerMAX UI treats the 3
|
|
238
|
-
* positions as opaque slots ordered by intent.
|
|
239
|
-
*/
|
|
240
|
-
down_payment_tiers: DownPaymentTiers;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Body param
|
|
244
|
-
*/
|
|
245
|
-
currency?: 'EUR';
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Body param
|
|
249
|
-
*/
|
|
250
|
-
image_mode?: 'branded' | 'scenario_locked' | 'scenario_seasonal';
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Body param
|
|
254
|
-
*/
|
|
255
|
-
image_scenario_locked?: 'mediterraneo' | 'cortina' | 'milano' | 'showroom' | 'building' | null;
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Header param
|
|
259
|
-
*/
|
|
260
|
-
'Idempotency-Key'?: string;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
export declare namespace NltSettings {
|
|
264
|
-
export {
|
|
265
|
-
type DownPaymentTiers as DownPaymentTiers,
|
|
266
|
-
type NltSettings as NltSettings,
|
|
267
|
-
type NltSettingUpdateParams as NltSettingUpdateParams,
|
|
268
|
-
};
|
|
269
|
-
}
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class NltSettings extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Return current NLT economics for the dealer.
|
|
12
|
+
*/
|
|
13
|
+
retrieve(dealerID: string, options?: RequestOptions): APIPromise<NltSettings> {
|
|
14
|
+
return this._client.get(path`/v1/dealers/${dealerID}/nlt-settings`, options);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Set markup percent (0-10), three down-payment tiers, and image mode.
|
|
19
|
+
*
|
|
20
|
+
* Validation:
|
|
21
|
+
*
|
|
22
|
+
* - `agency_markup_percent` ∈ [0, 10] (Pydantic).
|
|
23
|
+
* - `down_payment_tiers.{low,medium,high}` each
|
|
24
|
+
* `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
|
|
25
|
+
* final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
|
|
26
|
+
*
|
|
27
|
+
* The stored economics are immediately used by DealerMAX's dealer-aware NLT
|
|
28
|
+
* calculator. There is NO `vat_treatment` field: VAT is per-offer, not per-dealer.
|
|
29
|
+
* The offer detail endpoint surfaces it per row instead.
|
|
30
|
+
*
|
|
31
|
+
* `Idempotency-Key` replay uses the shared endpoint helper; a re-applied identical
|
|
32
|
+
* PATCH is also a row-level no-op by construction.
|
|
33
|
+
*/
|
|
34
|
+
update(
|
|
35
|
+
dealerID: string,
|
|
36
|
+
params: NltSettingUpdateParams,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<NltSettings> {
|
|
39
|
+
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
40
|
+
return this._client.patch(path`/v1/dealers/${dealerID}/nlt-settings`, {
|
|
41
|
+
body,
|
|
42
|
+
...options,
|
|
43
|
+
headers: buildHeaders([
|
|
44
|
+
{ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
|
|
45
|
+
options?.headers,
|
|
46
|
+
]),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Three down-payment scenarios (basso / medio / alto).
|
|
53
|
+
*
|
|
54
|
+
* No strict-ascending validation: the final EUR amount depends on the offer's list
|
|
55
|
+
* price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
|
|
56
|
+
* tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
|
|
57
|
+
* semantics (low/medium/high) are advisory — DealerMAX UI treats the 3 positions
|
|
58
|
+
* as opaque slots ordered by intent.
|
|
59
|
+
*/
|
|
60
|
+
export interface DownPaymentTiers {
|
|
61
|
+
/**
|
|
62
|
+
* One down-payment tier — percent of list price + flat EUR.
|
|
63
|
+
*
|
|
64
|
+
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
65
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
66
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
67
|
+
*/
|
|
68
|
+
high: DownPaymentTiers.High;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* One down-payment tier — percent of list price + flat EUR.
|
|
72
|
+
*
|
|
73
|
+
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
74
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
75
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
76
|
+
*/
|
|
77
|
+
low: DownPaymentTiers.Low;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* One down-payment tier — percent of list price + flat EUR.
|
|
81
|
+
*
|
|
82
|
+
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
83
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
84
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
85
|
+
*/
|
|
86
|
+
medium: DownPaymentTiers.Medium;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export namespace DownPaymentTiers {
|
|
90
|
+
/**
|
|
91
|
+
* One down-payment tier — percent of list price + flat EUR.
|
|
92
|
+
*
|
|
93
|
+
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
94
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
95
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
96
|
+
*/
|
|
97
|
+
export interface High {
|
|
98
|
+
/**
|
|
99
|
+
* Flat EUR component added on top of the percentage (e.g. promo
|
|
100
|
+
* `0% + 500 EUR fissi`). Whole euros only.
|
|
101
|
+
*/
|
|
102
|
+
fixed_eur: number;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Percentage of the IVA-excluded list price applied as down payment for this tier.
|
|
106
|
+
* Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
|
|
107
|
+
*/
|
|
108
|
+
percent_of_list: number;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* One down-payment tier — percent of list price + flat EUR.
|
|
113
|
+
*
|
|
114
|
+
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
115
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
116
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
117
|
+
*/
|
|
118
|
+
export interface Low {
|
|
119
|
+
/**
|
|
120
|
+
* Flat EUR component added on top of the percentage (e.g. promo
|
|
121
|
+
* `0% + 500 EUR fissi`). Whole euros only.
|
|
122
|
+
*/
|
|
123
|
+
fixed_eur: number;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Percentage of the IVA-excluded list price applied as down payment for this tier.
|
|
127
|
+
* Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
|
|
128
|
+
*/
|
|
129
|
+
percent_of_list: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* One down-payment tier — percent of list price + flat EUR.
|
|
134
|
+
*
|
|
135
|
+
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
136
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
137
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
138
|
+
*/
|
|
139
|
+
export interface Medium {
|
|
140
|
+
/**
|
|
141
|
+
* Flat EUR component added on top of the percentage (e.g. promo
|
|
142
|
+
* `0% + 500 EUR fissi`). Whole euros only.
|
|
143
|
+
*/
|
|
144
|
+
fixed_eur: number;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Percentage of the IVA-excluded list price applied as down payment for this tier.
|
|
148
|
+
* Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
|
|
149
|
+
*/
|
|
150
|
+
percent_of_list: number;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Response model for GET / PATCH /v1/dealers/{id}/nlt-settings.
|
|
156
|
+
*
|
|
157
|
+
* Note: there is no `vat_treatment` field — VAT is a property of the offer, not of
|
|
158
|
+
* the dealer. The offer detail returns the VAT treatment per row instead.
|
|
159
|
+
*/
|
|
160
|
+
export interface NltSettings {
|
|
161
|
+
agency_markup_percent: number;
|
|
162
|
+
|
|
163
|
+
dealer_id: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Three down-payment scenarios (basso / medio / alto).
|
|
167
|
+
*
|
|
168
|
+
* No strict-ascending validation: the final EUR amount depends on the offer's list
|
|
169
|
+
* price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
|
|
170
|
+
* tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
|
|
171
|
+
* semantics (low/medium/high) are advisory — DealerMAX UI treats the 3 positions
|
|
172
|
+
* as opaque slots ordered by intent.
|
|
173
|
+
*/
|
|
174
|
+
down_payment_tiers: DownPaymentTiers;
|
|
175
|
+
|
|
176
|
+
effective_from: string;
|
|
177
|
+
|
|
178
|
+
currency?: 'EUR';
|
|
179
|
+
|
|
180
|
+
image_mode?: 'branded' | 'scenario_locked' | 'scenario_seasonal';
|
|
181
|
+
|
|
182
|
+
image_scenario_locked?: 'mediterraneo' | 'cortina' | 'milano' | 'showroom' | 'building' | null;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface NltSettingUpdateParams {
|
|
186
|
+
/**
|
|
187
|
+
* Body param
|
|
188
|
+
*/
|
|
189
|
+
agency_markup_percent: number;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Body param: Three down-payment scenarios (basso / medio / alto).
|
|
193
|
+
*
|
|
194
|
+
* No strict-ascending validation: the final EUR amount depends on the offer's list
|
|
195
|
+
* price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
|
|
196
|
+
* tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
|
|
197
|
+
* semantics (low/medium/high) are advisory — DealerMAX UI treats the 3 positions
|
|
198
|
+
* as opaque slots ordered by intent.
|
|
199
|
+
*/
|
|
200
|
+
down_payment_tiers: DownPaymentTiers;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Body param
|
|
204
|
+
*/
|
|
205
|
+
currency?: 'EUR';
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Body param
|
|
209
|
+
*/
|
|
210
|
+
image_mode?: 'branded' | 'scenario_locked' | 'scenario_seasonal';
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Body param
|
|
214
|
+
*/
|
|
215
|
+
image_scenario_locked?: 'mediterraneo' | 'cortina' | 'milano' | 'showroom' | 'building' | null;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Header param
|
|
219
|
+
*/
|
|
220
|
+
'Idempotency-Key'?: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export declare namespace NltSettings {
|
|
224
|
+
export {
|
|
225
|
+
type DownPaymentTiers as DownPaymentTiers,
|
|
226
|
+
type NltSettings as NltSettings,
|
|
227
|
+
type NltSettingUpdateParams as NltSettingUpdateParams,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export * from './nlt/index';
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export * from './nlt/index';
|