@gofynd/fdk-client-javascript 1.5.1 → 1.6.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.
Files changed (64) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.js +293 -0
  4. package/sdk/application/Catalog/CatalogApplicationClient.js +408 -0
  5. package/sdk/application/Common/CommonApplicationClient.js +21 -0
  6. package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
  7. package/sdk/application/Configuration/ConfigurationApplicationClient.js +147 -0
  8. package/sdk/application/Content/ContentApplicationClient.js +226 -0
  9. package/sdk/application/FileStorage/FileStorageApplicationClient.js +43 -0
  10. package/sdk/application/Finance/FinanceApplicationClient.js +21 -0
  11. package/sdk/application/Lead/LeadApplicationClient.js +73 -0
  12. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -1
  13. package/sdk/application/Logistic/LogisticApplicationClient.js +192 -3
  14. package/sdk/application/Order/OrderApplicationClient.js +202 -0
  15. package/sdk/application/Payment/PaymentApplicationClient.js +454 -0
  16. package/sdk/application/Rewards/RewardsApplicationClient.js +68 -0
  17. package/sdk/application/Share/ShareApplicationClient.js +96 -0
  18. package/sdk/application/Theme/ThemeApplicationClient.js +64 -0
  19. package/sdk/application/User/UserApplicationClient.js +412 -0
  20. package/sdk/application/Webhook/WebhookApplicationClient.js +13 -0
  21. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -0
  22. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +75 -0
  23. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
  24. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
  25. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -0
  26. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +6 -0
  27. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +16 -3
  28. package/sdk/partner/Webhook/WebhookPartnerModel.js +5 -3
  29. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  30. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  31. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +46 -23
  32. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -23
  33. package/sdk/platform/Cart/CartPlatformModel.d.ts +59 -1
  34. package/sdk/platform/Cart/CartPlatformModel.js +31 -0
  35. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -12
  36. package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -81
  37. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -10
  38. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -12
  39. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -0
  40. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +82 -0
  41. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +10 -1
  42. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +12 -0
  43. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +129 -1
  44. package/sdk/platform/Payment/PaymentPlatformModel.js +94 -0
  45. package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
  46. package/sdk/platform/User/UserPlatformModel.js +2 -2
  47. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +58 -14
  48. package/sdk/platform/Webhook/WebhookPlatformModel.js +15 -14
  49. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  50. package/sdk/public/Catalog/CatalogPublicClient.js +138 -0
  51. package/sdk/public/Catalog/CatalogPublicModel.d.ts +155 -0
  52. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  53. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  54. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  55. package/sdk/public/Configuration/ConfigurationPublicClient.js +16 -0
  56. package/sdk/public/Content/ContentPublicClient.js +116 -0
  57. package/sdk/public/Partner/PartnerPublicClient.js +15 -0
  58. package/sdk/public/PublicClient.d.ts +2 -0
  59. package/sdk/public/PublicClient.js +4 -0
  60. package/sdk/public/Webhook/WebhookPublicClient.js +40 -0
  61. package/sdk/public/Webhook/WebhookPublicModel.d.ts +194 -46
  62. package/sdk/public/Webhook/WebhookPublicModel.js +51 -46
  63. package/sdk/public/index.d.ts +1 -0
  64. package/sdk/public/index.js +2 -0
@@ -1566,6 +1566,20 @@ const Joi = require("joi");
1566
1566
  * @property {boolean} [partial] - When adding multiple items check if all
1567
1567
  * added. True if only few are added.
1568
1568
  * @property {string} [message] - Message of add cart API response
1569
+ * @property {Object} [result] - Add to cart result data
1570
+ * @property {CartItemInfo[]} [items] - List of items that needs to be added in cart.
1571
+ */
1572
+
1573
+ /**
1574
+ * @typedef CartItemInfo
1575
+ * @property {number} [item_id] - Item id of the product that needs to be
1576
+ * added/updated/removed.
1577
+ * @property {string} [size] - Item size of the product that needs to be
1578
+ * added/updated/removed.
1579
+ * @property {number} [store_id] - Unique identifier of the store selected by
1580
+ * the user from which user want to buy a product.
1581
+ * @property {boolean} [success] - True if items are added/updated/removed successfully.
1582
+ * @property {string} [message] - Message for added/updated/removed item.
1569
1583
  */
1570
1584
 
1571
1585
  /**
@@ -1604,6 +1618,8 @@ const Joi = require("joi");
1604
1618
  * @property {boolean} [success] - True if all items are added successfully.
1605
1619
  * False if partially added or not added.
1606
1620
  * @property {CartDetailResult} [cart]
1621
+ * @property {Object} [result] - Contains article related result info
1622
+ * @property {CartItemInfo[]} [items] - List of items that needs to be updated in cart.
1607
1623
  * @property {string} [message] - Message of update cart API response
1608
1624
  */
1609
1625
 
@@ -4112,6 +4128,19 @@ class CartPlatformModel {
4112
4128
  cart: CartPlatformModel.CartDetailResult(),
4113
4129
  partial: Joi.boolean(),
4114
4130
  message: Joi.string().allow(""),
4131
+ result: Joi.object().pattern(/\S/, Joi.any()),
4132
+ items: Joi.array().items(CartPlatformModel.CartItemInfo()),
4133
+ });
4134
+ }
4135
+
4136
+ /** @returns {CartItemInfo} */
4137
+ static CartItemInfo() {
4138
+ return Joi.object({
4139
+ item_id: Joi.number(),
4140
+ size: Joi.string().allow(""),
4141
+ store_id: Joi.number(),
4142
+ success: Joi.boolean(),
4143
+ message: Joi.string().allow(""),
4115
4144
  });
4116
4145
  }
4117
4146
 
@@ -4156,6 +4185,8 @@ class CartPlatformModel {
4156
4185
  return Joi.object({
4157
4186
  success: Joi.boolean(),
4158
4187
  cart: CartPlatformModel.CartDetailResult(),
4188
+ result: Joi.object().pattern(/\S/, Joi.any()),
4189
+ items: Joi.array().items(CartPlatformModel.CartItemInfo()),
4159
4190
  message: Joi.string().allow(""),
4160
4191
  });
4161
4192
  }
@@ -153,18 +153,6 @@ declare class Content {
153
153
  * @description: Generate and add a new page to the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPage/).
154
154
  */
155
155
  createPage({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreatePageParam, { responseHeaders }?: object): Promise<ContentPlatformModel.PageSchema>;
156
- /**
157
- * @param {ContentPlatformApplicationValidator.CreatePagePreviewParam} arg
158
- * - Arg object
159
- *
160
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
161
- * @param {import("../PlatformAPIClient").Options} - Options
162
- * @returns {Promise<ContentPlatformModel.PageSchema>} - Success response
163
- * @name createPagePreview
164
- * @summary: Create page preview
165
- * @description: Generate and add a new page preview. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPagePreview/).
166
- */
167
- createPagePreview({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreatePagePreviewParam, { responseHeaders }?: object): Promise<ContentPlatformModel.PageSchema>;
168
156
  /**
169
157
  * @param {ContentPlatformApplicationValidator.CreateSEOMarkupSchemaParam} arg
170
158
  * - Arg object
@@ -1062,87 +1062,6 @@ class Content {
1062
1062
  return response;
1063
1063
  }
1064
1064
 
1065
- /**
1066
- * @param {ContentPlatformApplicationValidator.CreatePagePreviewParam} arg
1067
- * - Arg object
1068
- *
1069
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1070
- * @param {import("../PlatformAPIClient").Options} - Options
1071
- * @returns {Promise<ContentPlatformModel.PageSchema>} - Success response
1072
- * @name createPagePreview
1073
- * @summary: Create page preview
1074
- * @description: Generate and add a new page preview. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPagePreview/).
1075
- */
1076
- async createPagePreview(
1077
- { body, requestHeaders } = { requestHeaders: {} },
1078
- { responseHeaders } = { responseHeaders: false }
1079
- ) {
1080
- const {
1081
- error,
1082
- } = ContentPlatformApplicationValidator.createPagePreview().validate(
1083
- {
1084
- body,
1085
- },
1086
- { abortEarly: false, allowUnknown: true }
1087
- );
1088
- if (error) {
1089
- return Promise.reject(new FDKClientValidationError(error));
1090
- }
1091
-
1092
- // Showing warrnings if extra unknown parameters are found
1093
- const {
1094
- error: warrning,
1095
- } = ContentPlatformApplicationValidator.createPagePreview().validate(
1096
- {
1097
- body,
1098
- },
1099
- { abortEarly: false, allowUnknown: false }
1100
- );
1101
- if (warrning) {
1102
- Logger({
1103
- level: "WARN",
1104
- message: `Parameter Validation warrnings for platform > Content > createPagePreview \n ${warrning}`,
1105
- });
1106
- }
1107
-
1108
- const query_params = {};
1109
-
1110
- const response = await PlatformAPIClient.execute(
1111
- this.config,
1112
- "post",
1113
- `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pages/preview/`,
1114
- query_params,
1115
- body,
1116
- requestHeaders,
1117
- { responseHeaders }
1118
- );
1119
-
1120
- let responseData = response;
1121
- if (responseHeaders) {
1122
- responseData = response[0];
1123
- }
1124
-
1125
- const {
1126
- error: res_error,
1127
- } = ContentPlatformModel.PageSchema().validate(responseData, {
1128
- abortEarly: false,
1129
- allowUnknown: true,
1130
- });
1131
-
1132
- if (res_error) {
1133
- if (this.config.options.strictResponseCheck === true) {
1134
- return Promise.reject(new FDKResponseValidationError(res_error));
1135
- } else {
1136
- Logger({
1137
- level: "WARN",
1138
- message: `Response Validation Warnings for platform > Content > createPagePreview \n ${res_error}`,
1139
- });
1140
- }
1141
- }
1142
-
1143
- return response;
1144
- }
1145
-
1146
1065
  /**
1147
1066
  * @param {ContentPlatformApplicationValidator.CreateSEOMarkupSchemaParam} arg
1148
1067
  * - Arg object
@@ -54,10 +54,6 @@ export = ContentPlatformApplicationValidator;
54
54
  * @typedef CreatePageParam
55
55
  * @property {ContentPlatformModel.PagePayload} body
56
56
  */
57
- /**
58
- * @typedef CreatePagePreviewParam
59
- * @property {ContentPlatformModel.PagePayload} body
60
- */
61
57
  /**
62
58
  * @typedef CreateSEOMarkupSchemaParam
63
59
  * @property {ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody} body
@@ -474,8 +470,6 @@ declare class ContentPlatformApplicationValidator {
474
470
  static createNavigation(): CreateNavigationParam;
475
471
  /** @returns {CreatePageParam} */
476
472
  static createPage(): CreatePageParam;
477
- /** @returns {CreatePagePreviewParam} */
478
- static createPagePreview(): CreatePagePreviewParam;
479
473
  /** @returns {CreateSEOMarkupSchemaParam} */
480
474
  static createSEOMarkupSchema(): CreateSEOMarkupSchemaParam;
481
475
  /** @returns {DeleteAnnouncementParam} */
@@ -638,7 +632,7 @@ declare class ContentPlatformApplicationValidator {
638
632
  static updateSupportInformation(): UpdateSupportInformationParam;
639
633
  }
640
634
  declare namespace ContentPlatformApplicationValidator {
641
- export { AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, CreateAnnouncementParam, CreateAppCustomFieldDefinitionParam, CreateAppCustomObjectBySlugParam, CreateAppCustomObjectDefinitionParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreatePagePreviewParam, CreateSEOMarkupSchemaParam, DeleteAnnouncementParam, DeleteAppCustomFieldDefinitionBySlugParam, DeleteAppCustomObjectBySlugParam, DeleteAppCustomObjectDefinitionBySlugParam, DeleteBlogParam, DeleteDataLoaderParam, DeleteFaqParam, DeleteFaqCategoryParam, DeleteLandingPageParam, DeleteNavigationParam, DeletePageParam, DeletePathRedirectionRulesParam, DeleteSEOMarkupSchemaParam, EditDataLoaderParam, EditInjectableTagParam, EditSEOMarkupSchemaParam, ExportAppCustomObjectEntriesBySlugParam, GenerateSEOTitleParam, GetAnnouncementByIdParam, GetAnnouncementsListParam, GetAppCustomFieldDefinitionByResourceParam, GetAppCustomFieldDefinitionBySlugParam, GetAppCustomFieldDefinitionsParam, GetAppCustomFieldTypesParam, GetAppCustomFieldsByResourceSlugParam, GetAppCustomObjectBySlugParam, GetAppCustomObjectDefinitionBySlugParam, GetAppCustomObjectDefinitionsParam, GetAppCustomObjectsBySlugParam, GetAppJobsParam, GetAppResourcesParam, GetBlogBySlugParam, GetBlogsParam, GetDataLoadersParam, GetDataLoadersByServiceParam, GetDefaultNavigationsParam, GetDefaultSEOMarkupSchemaParam, GetFaqByIdOrSlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugOrIdParam, GetFaqsByCategoryIdOrSlugParam, GetInjectableTagsParam, GetLandingPagesParam, GetLegalInformationParam, GetNavigationBySlugParam, GetNavigationsParam, GetPageBySlugParam, GetPageMetaParam, GetPageSpecParam, GetPagesParam, GetPathRedirectionRuleParam, GetPathRedirectionRulesParam, GetSEOConfigurationParam, GetSEOMarkupSchemaParam, GetSEOMarkupSchemasParam, GetSupportInformationParam, ImportAppCustomObjectEntriesBySlugParam, RemoveInjectableTagParam, ResetDataLoaderParam, SampleAppCustomObjectBulkEntryBySlugParam, SelectDataLoaderParam, UpdateAnnouncementParam, UpdateAnnouncementScheduleParam, UpdateAppCustomFieldByResourceSlugParam, UpdateAppCustomFieldDefinitionBySlugParam, UpdateAppCustomObjectBySlugParam, UpdateAppCustomObjectDefinitionBySlugParam, UpdateBlogParam, UpdateFaqParam, UpdateFaqCategoryParam, UpdateInjectableTagParam, UpdateLandingPageParam, UpdateLegalInformationParam, UpdateNavigationParam, UpdatePageParam, UpdatePagePreviewParam, UpdatePathRedirectionRulesParam, UpdateSEOConfigurationParam, UpdateSupportInformationParam };
635
+ export { AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, CreateAnnouncementParam, CreateAppCustomFieldDefinitionParam, CreateAppCustomObjectBySlugParam, CreateAppCustomObjectDefinitionParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreateSEOMarkupSchemaParam, DeleteAnnouncementParam, DeleteAppCustomFieldDefinitionBySlugParam, DeleteAppCustomObjectBySlugParam, DeleteAppCustomObjectDefinitionBySlugParam, DeleteBlogParam, DeleteDataLoaderParam, DeleteFaqParam, DeleteFaqCategoryParam, DeleteLandingPageParam, DeleteNavigationParam, DeletePageParam, DeletePathRedirectionRulesParam, DeleteSEOMarkupSchemaParam, EditDataLoaderParam, EditInjectableTagParam, EditSEOMarkupSchemaParam, ExportAppCustomObjectEntriesBySlugParam, GenerateSEOTitleParam, GetAnnouncementByIdParam, GetAnnouncementsListParam, GetAppCustomFieldDefinitionByResourceParam, GetAppCustomFieldDefinitionBySlugParam, GetAppCustomFieldDefinitionsParam, GetAppCustomFieldTypesParam, GetAppCustomFieldsByResourceSlugParam, GetAppCustomObjectBySlugParam, GetAppCustomObjectDefinitionBySlugParam, GetAppCustomObjectDefinitionsParam, GetAppCustomObjectsBySlugParam, GetAppJobsParam, GetAppResourcesParam, GetBlogBySlugParam, GetBlogsParam, GetDataLoadersParam, GetDataLoadersByServiceParam, GetDefaultNavigationsParam, GetDefaultSEOMarkupSchemaParam, GetFaqByIdOrSlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugOrIdParam, GetFaqsByCategoryIdOrSlugParam, GetInjectableTagsParam, GetLandingPagesParam, GetLegalInformationParam, GetNavigationBySlugParam, GetNavigationsParam, GetPageBySlugParam, GetPageMetaParam, GetPageSpecParam, GetPagesParam, GetPathRedirectionRuleParam, GetPathRedirectionRulesParam, GetSEOConfigurationParam, GetSEOMarkupSchemaParam, GetSEOMarkupSchemasParam, GetSupportInformationParam, ImportAppCustomObjectEntriesBySlugParam, RemoveInjectableTagParam, ResetDataLoaderParam, SampleAppCustomObjectBulkEntryBySlugParam, SelectDataLoaderParam, UpdateAnnouncementParam, UpdateAnnouncementScheduleParam, UpdateAppCustomFieldByResourceSlugParam, UpdateAppCustomFieldDefinitionBySlugParam, UpdateAppCustomObjectBySlugParam, UpdateAppCustomObjectDefinitionBySlugParam, UpdateBlogParam, UpdateFaqParam, UpdateFaqCategoryParam, UpdateInjectableTagParam, UpdateLandingPageParam, UpdateLegalInformationParam, UpdateNavigationParam, UpdatePageParam, UpdatePagePreviewParam, UpdatePathRedirectionRulesParam, UpdateSEOConfigurationParam, UpdateSupportInformationParam };
642
636
  }
643
637
  type AddDataLoaderParam = {
644
638
  body: ContentPlatformModel.DataLoaderSchema;
@@ -685,9 +679,6 @@ type CreateNavigationParam = {
685
679
  type CreatePageParam = {
686
680
  body: ContentPlatformModel.PagePayload;
687
681
  };
688
- type CreatePagePreviewParam = {
689
- body: ContentPlatformModel.PagePayload;
690
- };
691
682
  type CreateSEOMarkupSchemaParam = {
692
683
  body: ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody;
693
684
  };
@@ -70,11 +70,6 @@ const ContentPlatformModel = require("./ContentPlatformModel");
70
70
  * @property {ContentPlatformModel.PagePayload} body
71
71
  */
72
72
 
73
- /**
74
- * @typedef CreatePagePreviewParam
75
- * @property {ContentPlatformModel.PagePayload} body
76
- */
77
-
78
73
  /**
79
74
  * @typedef CreateSEOMarkupSchemaParam
80
75
  * @property {ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody} body
@@ -639,13 +634,6 @@ class ContentPlatformApplicationValidator {
639
634
  }).required();
640
635
  }
641
636
 
642
- /** @returns {CreatePagePreviewParam} */
643
- static createPagePreview() {
644
- return Joi.object({
645
- body: ContentPlatformModel.PagePayload().required(),
646
- }).required();
647
- }
648
-
649
637
  /** @returns {CreateSEOMarkupSchemaParam} */
650
638
  static createSEOMarkupSchema() {
651
639
  return Joi.object({
@@ -603,6 +603,19 @@ declare class Payment {
603
603
  * @description: Allows users to update the details of a refund session associated with a specific global identifier (GID) and request ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updateRefundSession/).
604
604
  */
605
605
  updateRefundSession({ gid, requestId, body, requestHeaders }?: PaymentPlatformApplicationValidator.UpdateRefundSessionParam, { responseHeaders }?: object): Promise<PaymentPlatformModel.RefundSessionDetails>;
606
+ /**
607
+ * @param {PaymentPlatformApplicationValidator.ValidateCustomerAndCreditSummaryParam} arg
608
+ * - Arg object
609
+ *
610
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
611
+ * @param {import("../PlatformAPIClient").Options} - Options
612
+ * @returns {Promise<PaymentPlatformModel.ValidateCustomerCreditSchema>} -
613
+ * Success response
614
+ * @name validateCustomerAndCreditSummary
615
+ * @summary: Verify payment customer and show credit summary
616
+ * @description: Verify if the user is eligible for payment and also show credit summary if activated. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/validateCustomerAndCreditSummary/).
617
+ */
618
+ validateCustomerAndCreditSummary({ body, requestHeaders }?: PaymentPlatformApplicationValidator.ValidateCustomerAndCreditSummaryParam, { responseHeaders }?: object): Promise<PaymentPlatformModel.ValidateCustomerCreditSchema>;
606
619
  /**
607
620
  * @param {PaymentPlatformApplicationValidator.VerifyCustomerForPaymentParam} arg
608
621
  * - Arg object
@@ -4122,6 +4122,88 @@ class Payment {
4122
4122
  return response;
4123
4123
  }
4124
4124
 
4125
+ /**
4126
+ * @param {PaymentPlatformApplicationValidator.ValidateCustomerAndCreditSummaryParam} arg
4127
+ * - Arg object
4128
+ *
4129
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4130
+ * @param {import("../PlatformAPIClient").Options} - Options
4131
+ * @returns {Promise<PaymentPlatformModel.ValidateCustomerCreditSchema>} -
4132
+ * Success response
4133
+ * @name validateCustomerAndCreditSummary
4134
+ * @summary: Verify payment customer and show credit summary
4135
+ * @description: Verify if the user is eligible for payment and also show credit summary if activated. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/validateCustomerAndCreditSummary/).
4136
+ */
4137
+ async validateCustomerAndCreditSummary(
4138
+ { body, requestHeaders } = { requestHeaders: {} },
4139
+ { responseHeaders } = { responseHeaders: false }
4140
+ ) {
4141
+ const {
4142
+ error,
4143
+ } = PaymentPlatformApplicationValidator.validateCustomerAndCreditSummary().validate(
4144
+ {
4145
+ body,
4146
+ },
4147
+ { abortEarly: false, allowUnknown: true }
4148
+ );
4149
+ if (error) {
4150
+ return Promise.reject(new FDKClientValidationError(error));
4151
+ }
4152
+
4153
+ // Showing warrnings if extra unknown parameters are found
4154
+ const {
4155
+ error: warrning,
4156
+ } = PaymentPlatformApplicationValidator.validateCustomerAndCreditSummary().validate(
4157
+ {
4158
+ body,
4159
+ },
4160
+ { abortEarly: false, allowUnknown: false }
4161
+ );
4162
+ if (warrning) {
4163
+ Logger({
4164
+ level: "WARN",
4165
+ message: `Parameter Validation warrnings for platform > Payment > validateCustomerAndCreditSummary \n ${warrning}`,
4166
+ });
4167
+ }
4168
+
4169
+ const query_params = {};
4170
+
4171
+ const response = await PlatformAPIClient.execute(
4172
+ this.config,
4173
+ "post",
4174
+ `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/validate/customer-credits`,
4175
+ query_params,
4176
+ body,
4177
+ requestHeaders,
4178
+ { responseHeaders }
4179
+ );
4180
+
4181
+ let responseData = response;
4182
+ if (responseHeaders) {
4183
+ responseData = response[0];
4184
+ }
4185
+
4186
+ const {
4187
+ error: res_error,
4188
+ } = PaymentPlatformModel.ValidateCustomerCreditSchema().validate(
4189
+ responseData,
4190
+ { abortEarly: false, allowUnknown: true }
4191
+ );
4192
+
4193
+ if (res_error) {
4194
+ if (this.config.options.strictResponseCheck === true) {
4195
+ return Promise.reject(new FDKResponseValidationError(res_error));
4196
+ } else {
4197
+ Logger({
4198
+ level: "WARN",
4199
+ message: `Response Validation Warnings for platform > Payment > validateCustomerAndCreditSummary \n ${res_error}`,
4200
+ });
4201
+ }
4202
+ }
4203
+
4204
+ return response;
4205
+ }
4206
+
4125
4207
  /**
4126
4208
  * @param {PaymentPlatformApplicationValidator.VerifyCustomerForPaymentParam} arg
4127
4209
  * - Arg object
@@ -239,6 +239,10 @@ export = PaymentPlatformApplicationValidator;
239
239
  * session. This is generated by Fynd platform and is usually shipment_id.
240
240
  * @property {PaymentPlatformModel.RefundSessionCreation} body
241
241
  */
242
+ /**
243
+ * @typedef ValidateCustomerAndCreditSummaryParam
244
+ * @property {PaymentPlatformModel.CustomerValidationSchema} body
245
+ */
242
246
  /**
243
247
  * @typedef VerifyCustomerForPaymentParam
244
248
  * @property {PaymentPlatformModel.ValidateCustomerCreation} body
@@ -342,11 +346,13 @@ declare class PaymentPlatformApplicationValidator {
342
346
  static updatePaymentSession(): UpdatePaymentSessionParam;
343
347
  /** @returns {UpdateRefundSessionParam} */
344
348
  static updateRefundSession(): UpdateRefundSessionParam;
349
+ /** @returns {ValidateCustomerAndCreditSummaryParam} */
350
+ static validateCustomerAndCreditSummary(): ValidateCustomerAndCreditSummaryParam;
345
351
  /** @returns {VerifyCustomerForPaymentParam} */
346
352
  static verifyCustomerForPayment(): VerifyCustomerForPaymentParam;
347
353
  }
348
354
  declare namespace PaymentPlatformApplicationValidator {
349
- export { AddEdcDeviceParam, AddRefundBankAccountUsingOTPParam, CancelPaymentLinkParam, CheckAndUpdatePaymentStatusParam, ConfirmPaymentParam, CreateMerchantRefundPriorityParam, CreatePaymentLinkParam, CreatePaymentOrderParam, EdcAggregatorsAndModelListParam, EdcDeviceListParam, EdcDeviceStatsParam, GetBankAccountDetailsOpenAPIParam, GetBrandPaymentGatewayConfigParam, GetEdcDeviceParam, GetMerchantAggregatorAppVersionParam, GetMerchantAggregatorPaymentModeDetailsParam, GetMerchantPaymentOptionParam, GetMerchantRefundPriorityParam, GetPGConfigAggregatorsParam, GetPaymentCodeOptionParam, GetPaymentLinkParam, GetPaymentModeControlRoutesParam, GetPaymentModeCustomConfigParam, GetPaymentModeRoutesParam, GetPaymentSessionParam, GetPosPaymentModeRoutesParam, GetUserBeneficiariesParam, GetUserCODlimitRoutesParam, GetUserOrderBeneficiariesParam, InitialisePaymentParam, MerchantOnBoardingParam, OauthGetUrlParam, PatchMerchantAggregatorPaymentModeDetailsParam, PatchMerchantPaymentOptionParam, PatchMerchantPaymentOptionVersionParam, PaymentStatusBulkParam, PollingPaymentLinkParam, RepaymentDetailsParam, ResendOrCancelPaymentParam, ResendPaymentLinkParam, RevokeOauthTokenParam, SaveBrandPaymentGatewayConfigParam, SetMerchantModeControlRoutesParam, SetPaymentModeCustomConfigParam, SetUserCODlimitRoutesParam, UpdateEdcDeviceParam, UpdateMerchantRefundPriorityParam, UpdatePaymentSessionParam, UpdateRefundSessionParam, VerifyCustomerForPaymentParam };
355
+ export { AddEdcDeviceParam, AddRefundBankAccountUsingOTPParam, CancelPaymentLinkParam, CheckAndUpdatePaymentStatusParam, ConfirmPaymentParam, CreateMerchantRefundPriorityParam, CreatePaymentLinkParam, CreatePaymentOrderParam, EdcAggregatorsAndModelListParam, EdcDeviceListParam, EdcDeviceStatsParam, GetBankAccountDetailsOpenAPIParam, GetBrandPaymentGatewayConfigParam, GetEdcDeviceParam, GetMerchantAggregatorAppVersionParam, GetMerchantAggregatorPaymentModeDetailsParam, GetMerchantPaymentOptionParam, GetMerchantRefundPriorityParam, GetPGConfigAggregatorsParam, GetPaymentCodeOptionParam, GetPaymentLinkParam, GetPaymentModeControlRoutesParam, GetPaymentModeCustomConfigParam, GetPaymentModeRoutesParam, GetPaymentSessionParam, GetPosPaymentModeRoutesParam, GetUserBeneficiariesParam, GetUserCODlimitRoutesParam, GetUserOrderBeneficiariesParam, InitialisePaymentParam, MerchantOnBoardingParam, OauthGetUrlParam, PatchMerchantAggregatorPaymentModeDetailsParam, PatchMerchantPaymentOptionParam, PatchMerchantPaymentOptionVersionParam, PaymentStatusBulkParam, PollingPaymentLinkParam, RepaymentDetailsParam, ResendOrCancelPaymentParam, ResendPaymentLinkParam, RevokeOauthTokenParam, SaveBrandPaymentGatewayConfigParam, SetMerchantModeControlRoutesParam, SetPaymentModeCustomConfigParam, SetUserCODlimitRoutesParam, UpdateEdcDeviceParam, UpdateMerchantRefundPriorityParam, UpdatePaymentSessionParam, UpdateRefundSessionParam, ValidateCustomerAndCreditSummaryParam, VerifyCustomerForPaymentParam };
350
356
  }
351
357
  type AddEdcDeviceParam = {
352
358
  /**
@@ -647,6 +653,9 @@ type UpdateRefundSessionParam = {
647
653
  requestId: string;
648
654
  body: PaymentPlatformModel.RefundSessionCreation;
649
655
  };
656
+ type ValidateCustomerAndCreditSummaryParam = {
657
+ body: PaymentPlatformModel.CustomerValidationSchema;
658
+ };
650
659
  type VerifyCustomerForPaymentParam = {
651
660
  body: PaymentPlatformModel.ValidateCustomerCreation;
652
661
  };
@@ -291,6 +291,11 @@ const PaymentPlatformModel = require("./PaymentPlatformModel");
291
291
  * @property {PaymentPlatformModel.RefundSessionCreation} body
292
292
  */
293
293
 
294
+ /**
295
+ * @typedef ValidateCustomerAndCreditSummaryParam
296
+ * @property {PaymentPlatformModel.CustomerValidationSchema} body
297
+ */
298
+
294
299
  /**
295
300
  * @typedef VerifyCustomerForPaymentParam
296
301
  * @property {PaymentPlatformModel.ValidateCustomerCreation} body
@@ -671,6 +676,13 @@ class PaymentPlatformApplicationValidator {
671
676
  }).required();
672
677
  }
673
678
 
679
+ /** @returns {ValidateCustomerAndCreditSummaryParam} */
680
+ static validateCustomerAndCreditSummary() {
681
+ return Joi.object({
682
+ body: PaymentPlatformModel.CustomerValidationSchema().required(),
683
+ }).required();
684
+ }
685
+
674
686
  /** @returns {VerifyCustomerForPaymentParam} */
675
687
  static verifyCustomerForPayment() {
676
688
  return Joi.object({
@@ -893,6 +893,12 @@ export = PaymentPlatformModel;
893
893
  * @property {string} city - City name
894
894
  * @property {Object[]} [tags] - Optional address tag
895
895
  */
896
+ /**
897
+ * @typedef ReasonDetail
898
+ * @property {string} [code] - The code indicating the type of reason.
899
+ * @property {string} [description] - A detailed description of the payment
900
+ * reason or error.
901
+ */
896
902
  /**
897
903
  * @typedef PaymentSessionDetail
898
904
  * @property {string} payment_id - Unique transaction id generated by payment gateway
@@ -929,6 +935,7 @@ export = PaymentPlatformModel;
929
935
  * merchant account) by payment gateway.
930
936
  * @property {Object} [meta] - Extra meta data specific to extension
931
937
  * @property {string} status - Status of the payment
938
+ * @property {ReasonDetail} [reason]
932
939
  */
933
940
  /**
934
941
  * @typedef PaymentSessionCreation
@@ -1218,10 +1225,42 @@ export = PaymentPlatformModel;
1218
1225
  * @property {string} message
1219
1226
  * @property {PaymentModeCustomConfigSchema[]} items
1220
1227
  */
1228
+ /**
1229
+ * @typedef CustomerValidationSchema
1230
+ * @property {string} aggregator - Aggregator name of the payment gateway.
1231
+ * @property {number} transaction_amount - Payable amount
1232
+ * @property {string} [cart_id] - Unique identifier for the shopping cart.
1233
+ */
1234
+ /**
1235
+ * @typedef UserCreditSchema
1236
+ * @property {number} amount - The monetary value, which can represent available
1237
+ * balance, redeemed balance, or hold amount, depending on the context.
1238
+ * @property {string} currency - The currency code (e.g., INR, USD).
1239
+ * @property {string} [unique_id] - A unique identifier for the payment transaction.
1240
+ */
1241
+ /**
1242
+ * @typedef CreditAccountSummary
1243
+ * @property {string} account_id - Unique identifier associated with the
1244
+ * customer's account
1245
+ * @property {string} status - Current state of the account, indicating whether
1246
+ * it is ACTIVE, INACTIVE, or UNREGISTERED.
1247
+ * @property {UserCreditSchema} [redeemable_balance]
1248
+ * @property {UserCreditSchema} [available_balance]
1249
+ * @property {UserCreditSchema} [amount_on_hold]
1250
+ */
1251
+ /**
1252
+ * @typedef ValidateCustomerCreditSchema
1253
+ * @property {boolean} success - Successful or failure of API
1254
+ * @property {boolean} is_eligible - The customer is eligible to make a transaction or not
1255
+ * @property {boolean} [is_applied] - Credit is applied to the user's account or not
1256
+ * @property {string} message - Detailed message about the user credt eligibility.
1257
+ * @property {string} [cart_id] - Unique identifier for the shopping cart.
1258
+ * @property {CreditAccountSummary} [account]
1259
+ */
1221
1260
  declare class PaymentPlatformModel {
1222
1261
  }
1223
1262
  declare namespace PaymentPlatformModel {
1224
- export { PaymentGatewayConfigDetails, ErrorCodeDescription, PaymentGatewayConfig, PaymentGatewayConfigCreation, PaymentGatewayToBeReviewed, ErrorCodeAndDescription, HttpErrorDetails, IntentAppErrorList, ProductCODData, CODChargesLimitsDetails, PaymentModeLogo, IntentApp, PaymentModeList, RootPaymentMode, PaymentOptions, AggregatorRoute, PaymentDefaultSelection, PaymentFlow, PaymentOptionAndFlow, AdvanceObject, SplitObject, AdvancePaymentObject, PaymentModeRouteDetails, PaymentOptionsDetails, PayoutCustomer, PayoutMoreAttributes, PayoutAggregator, Payout, PayoutsDetails, PayoutBankDetails, PayoutCreation, PayoutDetails, UpdatePayoutDetails, UpdatePayoutCreation, DeletePayoutDetails, SubscriptionPaymentMethodDetails, DeleteSubscriptionPaymentMethodDetails, SubscriptionConfigDetails, SaveSubscriptionSetupIntentCreation, SaveSubscriptionSetupIntentDetails, RefundAccountDetails, NotFoundResourceError, BankDetailsForOTP, AddBeneficiaryDetailsOTPCreation, IfscCodeDetails, OrderBeneficiaryDetails, OrderBeneficiaryFetchResults, MultiTenderPaymentMeta, MultiTenderPaymentMethod, PaymentConfirmationCreation, PaymentConfirmationDetails, CODdata, CODLimitConfig, CODPaymentLimitConfig, GetUserBULimitResponseSchema, GetUserCODLimitDetails, SetCODForUserCreation, SetCODOptionDetails, EdcModelData, EdcAggregatorAndModelListDetails, StatisticsData, EdcDeviceStatsDetails, EdcAddCreation, EdcDevice, EdcDeviceAddDetails, EdcDeviceDetails, EdcUpdate, EdcDeviceUpdateDetails, Page, EdcDeviceListDetails, PaymentInitializationCreation, PaymentInitializationDetails, PaymentStatusUpdateCreation, PaymentStatusUpdateDetails, ResendOrCancelPaymentCreation, LinkStatus, ResendOrCancelPaymentDetails, PaymentStatusBulkHandlerCreation, PaymentObjectList, PaymentStatusObject, PaymentStatusBulkHandlerDetails, GetOauthUrlDetails, RevokeOAuthToken, RepaymentRequestDetails, RepaymentDetailsSerialiserPayAll, RepaymentDetails, MerchantOnBoardingCreation, MerchantOnBoardingDetails, ValidateCustomerCreation, ValidateCustomerDetails, GetPaymentLinkDetails, ErrorDescription, ErrorDetails, CreatePaymentLinkMeta, CreatePaymentLinkCreation, CreatePaymentLinkDetails, PollingPaymentLinkDetails, CancelOrResendPaymentLinkCreation, ResendPaymentLinkDetails, CancelPaymentLinkDetails, Code, PaymentCode, GetPaymentCode, GetPaymentCodeDetails, PlatformPaymentModeDetails, MerchnatPaymentModeCreation, OrderDetail, AddressDetail, PaymentSessionDetail, PaymentSessionCreation, PaymentSessionPutDetails, RefundSessionDetail, RefundSessionCreation, RefundSessionDetails, PaymentDetails, CartDetails, RefundDetails, PaymentSessionFetchDetails, RefundSourcesPriority, RefundPriorityDetails, RefundPriorityCreation, MerchantPaymentModeCreation, FromConfig, ToConfig, PlatformPaymentModeCopyConfigCreation, PaymentMethodsMetaOrder, PaymentOrderMethods, PaymentOrderCreation, PaymentOrderData, PaymentOrderDetails, AggregatorVersionItemSchema, AggregatorVersionDetails, AggregatorVersionRequestSchema, PatchAggregatorControl, PaymentModeCustomConfigSchema, PaymentCustomConfigDetailsSchema, PaymentCustomConfigCustomerSchema, PaymentCustomConfigModeSchema, PaymentCustomConfigDetailsRequestSchema, PaymentCustomConfigCustomerRequestSchema, PaymentCustomConfigRequestSchema, PaymentCustomConfigResponseSchema };
1263
+ export { PaymentGatewayConfigDetails, ErrorCodeDescription, PaymentGatewayConfig, PaymentGatewayConfigCreation, PaymentGatewayToBeReviewed, ErrorCodeAndDescription, HttpErrorDetails, IntentAppErrorList, ProductCODData, CODChargesLimitsDetails, PaymentModeLogo, IntentApp, PaymentModeList, RootPaymentMode, PaymentOptions, AggregatorRoute, PaymentDefaultSelection, PaymentFlow, PaymentOptionAndFlow, AdvanceObject, SplitObject, AdvancePaymentObject, PaymentModeRouteDetails, PaymentOptionsDetails, PayoutCustomer, PayoutMoreAttributes, PayoutAggregator, Payout, PayoutsDetails, PayoutBankDetails, PayoutCreation, PayoutDetails, UpdatePayoutDetails, UpdatePayoutCreation, DeletePayoutDetails, SubscriptionPaymentMethodDetails, DeleteSubscriptionPaymentMethodDetails, SubscriptionConfigDetails, SaveSubscriptionSetupIntentCreation, SaveSubscriptionSetupIntentDetails, RefundAccountDetails, NotFoundResourceError, BankDetailsForOTP, AddBeneficiaryDetailsOTPCreation, IfscCodeDetails, OrderBeneficiaryDetails, OrderBeneficiaryFetchResults, MultiTenderPaymentMeta, MultiTenderPaymentMethod, PaymentConfirmationCreation, PaymentConfirmationDetails, CODdata, CODLimitConfig, CODPaymentLimitConfig, GetUserBULimitResponseSchema, GetUserCODLimitDetails, SetCODForUserCreation, SetCODOptionDetails, EdcModelData, EdcAggregatorAndModelListDetails, StatisticsData, EdcDeviceStatsDetails, EdcAddCreation, EdcDevice, EdcDeviceAddDetails, EdcDeviceDetails, EdcUpdate, EdcDeviceUpdateDetails, Page, EdcDeviceListDetails, PaymentInitializationCreation, PaymentInitializationDetails, PaymentStatusUpdateCreation, PaymentStatusUpdateDetails, ResendOrCancelPaymentCreation, LinkStatus, ResendOrCancelPaymentDetails, PaymentStatusBulkHandlerCreation, PaymentObjectList, PaymentStatusObject, PaymentStatusBulkHandlerDetails, GetOauthUrlDetails, RevokeOAuthToken, RepaymentRequestDetails, RepaymentDetailsSerialiserPayAll, RepaymentDetails, MerchantOnBoardingCreation, MerchantOnBoardingDetails, ValidateCustomerCreation, ValidateCustomerDetails, GetPaymentLinkDetails, ErrorDescription, ErrorDetails, CreatePaymentLinkMeta, CreatePaymentLinkCreation, CreatePaymentLinkDetails, PollingPaymentLinkDetails, CancelOrResendPaymentLinkCreation, ResendPaymentLinkDetails, CancelPaymentLinkDetails, Code, PaymentCode, GetPaymentCode, GetPaymentCodeDetails, PlatformPaymentModeDetails, MerchnatPaymentModeCreation, OrderDetail, AddressDetail, ReasonDetail, PaymentSessionDetail, PaymentSessionCreation, PaymentSessionPutDetails, RefundSessionDetail, RefundSessionCreation, RefundSessionDetails, PaymentDetails, CartDetails, RefundDetails, PaymentSessionFetchDetails, RefundSourcesPriority, RefundPriorityDetails, RefundPriorityCreation, MerchantPaymentModeCreation, FromConfig, ToConfig, PlatformPaymentModeCopyConfigCreation, PaymentMethodsMetaOrder, PaymentOrderMethods, PaymentOrderCreation, PaymentOrderData, PaymentOrderDetails, AggregatorVersionItemSchema, AggregatorVersionDetails, AggregatorVersionRequestSchema, PatchAggregatorControl, PaymentModeCustomConfigSchema, PaymentCustomConfigDetailsSchema, PaymentCustomConfigCustomerSchema, PaymentCustomConfigModeSchema, PaymentCustomConfigDetailsRequestSchema, PaymentCustomConfigCustomerRequestSchema, PaymentCustomConfigRequestSchema, PaymentCustomConfigResponseSchema, CustomerValidationSchema, UserCreditSchema, CreditAccountSummary, ValidateCustomerCreditSchema };
1225
1264
  }
1226
1265
  /** @returns {PaymentGatewayConfigDetails} */
1227
1266
  declare function PaymentGatewayConfigDetails(): PaymentGatewayConfigDetails;
@@ -3611,6 +3650,19 @@ type AddressDetail = {
3611
3650
  */
3612
3651
  tags?: any[];
3613
3652
  };
3653
+ /** @returns {ReasonDetail} */
3654
+ declare function ReasonDetail(): ReasonDetail;
3655
+ type ReasonDetail = {
3656
+ /**
3657
+ * - The code indicating the type of reason.
3658
+ */
3659
+ code?: string;
3660
+ /**
3661
+ * - A detailed description of the payment
3662
+ * reason or error.
3663
+ */
3664
+ description?: string;
3665
+ };
3614
3666
  /** @returns {PaymentSessionDetail} */
3615
3667
  declare function PaymentSessionDetail(): PaymentSessionDetail;
3616
3668
  type PaymentSessionDetail = {
@@ -3714,6 +3766,7 @@ type PaymentSessionDetail = {
3714
3766
  * - Status of the payment
3715
3767
  */
3716
3768
  status: string;
3769
+ reason?: ReasonDetail;
3717
3770
  };
3718
3771
  /** @returns {PaymentSessionCreation} */
3719
3772
  declare function PaymentSessionCreation(): PaymentSessionCreation;
@@ -4450,3 +4503,78 @@ type PaymentCustomConfigResponseSchema = {
4450
4503
  message: string;
4451
4504
  items: PaymentModeCustomConfigSchema[];
4452
4505
  };
4506
+ /** @returns {CustomerValidationSchema} */
4507
+ declare function CustomerValidationSchema(): CustomerValidationSchema;
4508
+ type CustomerValidationSchema = {
4509
+ /**
4510
+ * - Aggregator name of the payment gateway.
4511
+ */
4512
+ aggregator: string;
4513
+ /**
4514
+ * - Payable amount
4515
+ */
4516
+ transaction_amount: number;
4517
+ /**
4518
+ * - Unique identifier for the shopping cart.
4519
+ */
4520
+ cart_id?: string;
4521
+ };
4522
+ /** @returns {UserCreditSchema} */
4523
+ declare function UserCreditSchema(): UserCreditSchema;
4524
+ type UserCreditSchema = {
4525
+ /**
4526
+ * - The monetary value, which can represent available
4527
+ * balance, redeemed balance, or hold amount, depending on the context.
4528
+ */
4529
+ amount: number;
4530
+ /**
4531
+ * - The currency code (e.g., INR, USD).
4532
+ */
4533
+ currency: string;
4534
+ /**
4535
+ * - A unique identifier for the payment transaction.
4536
+ */
4537
+ unique_id?: string;
4538
+ };
4539
+ /** @returns {CreditAccountSummary} */
4540
+ declare function CreditAccountSummary(): CreditAccountSummary;
4541
+ type CreditAccountSummary = {
4542
+ /**
4543
+ * - Unique identifier associated with the
4544
+ * customer's account
4545
+ */
4546
+ account_id: string;
4547
+ /**
4548
+ * - Current state of the account, indicating whether
4549
+ * it is ACTIVE, INACTIVE, or UNREGISTERED.
4550
+ */
4551
+ status: string;
4552
+ redeemable_balance?: UserCreditSchema;
4553
+ available_balance?: UserCreditSchema;
4554
+ amount_on_hold?: UserCreditSchema;
4555
+ };
4556
+ /** @returns {ValidateCustomerCreditSchema} */
4557
+ declare function ValidateCustomerCreditSchema(): ValidateCustomerCreditSchema;
4558
+ type ValidateCustomerCreditSchema = {
4559
+ /**
4560
+ * - Successful or failure of API
4561
+ */
4562
+ success: boolean;
4563
+ /**
4564
+ * - The customer is eligible to make a transaction or not
4565
+ */
4566
+ is_eligible: boolean;
4567
+ /**
4568
+ * - Credit is applied to the user's account or not
4569
+ */
4570
+ is_applied?: boolean;
4571
+ /**
4572
+ * - Detailed message about the user credt eligibility.
4573
+ */
4574
+ message: string;
4575
+ /**
4576
+ * - Unique identifier for the shopping cart.
4577
+ */
4578
+ cart_id?: string;
4579
+ account?: CreditAccountSummary;
4580
+ };