@@ -160,6 +160,32 @@ const responseSchema = {
160
160
'maximum' : 999 ,
161
161
'description' : 'Optional maximum number of installments without tax'
162
162
} ,
163
+ 'discount_option' : {
164
+ 'type' : 'object' ,
165
+ 'required' : [ 'value' ] ,
166
+ 'additionalProperties' : false ,
167
+ 'properties' : {
168
+ 'label' : {
169
+ 'type' : 'string' ,
170
+ 'maxLength' : 50 ,
171
+ 'description' : 'Name of payment method that handle the discount'
172
+ } ,
173
+ 'type' : {
174
+ 'type' : 'string' ,
175
+ 'enum' : [ 'percentage' , 'fixed' ] ,
176
+ 'default' : 'percentage' ,
177
+ 'description' : 'Discount type'
178
+ } ,
179
+ 'value' : {
180
+ 'type' : 'number' ,
181
+ 'multipleOf' : 0.0001 ,
182
+ 'minimum' : - 99999999 ,
183
+ 'maximum' : 99999999 ,
184
+ 'description' : 'Discount value, percentage or fixed'
185
+ }
186
+ } ,
187
+ 'description' : 'Default discount option by payment method'
188
+ } ,
163
189
'payment_gateways' : {
164
190
'type' : 'array' ,
165
191
'maxItems' : 30 ,
@@ -244,6 +270,33 @@ const responseSchema = {
244
270
} ,
245
271
'description' : 'Payment method object'
246
272
} ,
273
+ 'discount' : {
274
+ 'type' : 'object' ,
275
+ 'required' : [ 'value' ] ,
276
+ 'additionalProperties' : false ,
277
+ 'properties' : {
278
+ 'apply_at' : {
279
+ 'type' : 'string' ,
280
+ 'enum' : [ 'total' , 'subtotal' , 'freight' ] ,
281
+ 'default' : 'subtotal' ,
282
+ 'description' : 'In which value the discount will be applied at checkout'
283
+ } ,
284
+ 'type' : {
285
+ 'type' : 'string' ,
286
+ 'enum' : [ 'percentage' , 'fixed' ] ,
287
+ 'default' : 'percentage' ,
288
+ 'description' : 'Discount type'
289
+ } ,
290
+ 'value' : {
291
+ 'type' : 'number' ,
292
+ 'multipleOf' : 0.0001 ,
293
+ 'minimum' : - 99999999 ,
294
+ 'maximum' : 99999999 ,
295
+ 'description' : 'Discount value, percentage or fixed'
296
+ }
297
+ } ,
298
+ 'description' : 'Discount to be applied by payment method'
299
+ } ,
247
300
'card_companies' : {
248
301
'type' : 'array' ,
249
302
'maxItems' : 30 ,
0 commit comments