@xsolla/payment-client-core 0.2.12 → 0.2.13

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.
@@ -241,6 +241,9 @@ class PaymentMethodsService {
241
241
  this.apiRoute = 'remained_payment_methods';
242
242
  this.cache = new Map();
243
243
  }
244
+ async getAllMethods() {
245
+ return this.request();
246
+ }
244
247
  async getList(isSaveMethodMode) {
245
248
  const response = await this.request(isSaveMethodMode);
246
249
  if (this.isFixedPaymentMethod) {
@@ -6971,8 +6974,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
6971
6974
  args: [windowToken]
6972
6975
  }] }, { type: i0.NgZone }]; } });
6973
6976
 
6977
+ class CombinedPaymentMethodsService {
6978
+ constructor(paymentMethodsService, savedMethodsService) {
6979
+ this.paymentMethodsService = paymentMethodsService;
6980
+ this.savedMethodsService = savedMethodsService;
6981
+ }
6982
+ async getCombinedPaymentMethods() {
6983
+ const [paymentMethods, savedMethods] = await Promise.all([
6984
+ this.paymentMethodsService.getAllMethods(),
6985
+ this.savedMethodsService.getList(),
6986
+ ]);
6987
+ return {
6988
+ paymentMethods: {
6989
+ quick: paymentMethods.especial,
6990
+ remained: paymentMethods.remained,
6991
+ },
6992
+ savedMethods,
6993
+ };
6994
+ }
6995
+ }
6996
+ CombinedPaymentMethodsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CombinedPaymentMethodsService, deps: [{ token: PaymentMethodsService }, { token: SavedMethodsService }], target: i0.ɵɵFactoryTarget.Injectable });
6997
+ CombinedPaymentMethodsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CombinedPaymentMethodsService, providedIn: 'root' });
6998
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CombinedPaymentMethodsService, decorators: [{
6999
+ type: Injectable,
7000
+ args: [{
7001
+ providedIn: 'root',
7002
+ }]
7003
+ }], ctorParameters: function () { return [{ type: PaymentMethodsService }, { type: SavedMethodsService }]; } });
7004
+
6974
7005
  class CoreLibraryService {
6975
- constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService, paymentConfigService, paymentService, deviceFingerPrintService, financeDetailsService, legalService, statusService, nextActionService, creditCardService, creditCardStateService, formMessagesService, editSavedMethodsService, userBehaviourAnalyticsService, performanceService) {
7006
+ constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService, paymentConfigService, paymentService, deviceFingerPrintService, financeDetailsService, legalService, statusService, nextActionService, creditCardService, creditCardStateService, formMessagesService, editSavedMethodsService, userBehaviourAnalyticsService, performanceService, combinedPaymentMethodsService) {
6976
7007
  this.settingsService = settingsService;
6977
7008
  this.countryService = countryService;
6978
7009
  this.paymentMethodsService = paymentMethodsService;
@@ -6991,10 +7022,12 @@ class CoreLibraryService {
6991
7022
  this.editSavedMethodsService = editSavedMethodsService;
6992
7023
  this.userBehaviourAnalyticsService = userBehaviourAnalyticsService;
6993
7024
  this.performanceService = performanceService;
7025
+ this.combinedPaymentMethodsService = combinedPaymentMethodsService;
6994
7026
  this.paymentMethods = {
6995
7027
  getList: async (isSaveMethodMode) => this.paymentMethodsService.getList(isSaveMethodMode),
6996
7028
  getQuickMethods: async () => this.paymentMethodsService.getQuickMethods(),
6997
7029
  getSavedMethods: async () => this.savedMethodsService.getList(),
7030
+ getCombinedPaymentMethods: async () => this.combinedPaymentMethodsService.getCombinedPaymentMethods(),
6998
7031
  getUserBalance: async () => this.userBalanceService.getUserBalance(),
6999
7032
  deleteSavedMethod: async (id, type) => this.editSavedMethodsService.deleteSavedMethodRequest(id, type),
7000
7033
  };
@@ -7088,14 +7121,14 @@ class CoreLibraryService {
7088
7121
  return this.paymentService.formResponseValue;
7089
7122
  }
7090
7123
  }
7091
- CoreLibraryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, deps: [{ token: SettingsService }, { token: CountryService }, { token: PaymentMethodsService }, { token: SavedMethodsService }, { token: UserBalanceService }, { token: PaymentConfigService }, { token: PaymentService }, { token: DeviceFingerPrintService }, { token: FinanceDetailsService }, { token: LegalService }, { token: StatusService }, { token: NextActionService }, { token: CreditCardService }, { token: CreditCardStateService }, { token: FormMessagesService }, { token: EditSavedMethodsService }, { token: UserBehaviourAnalyticsService }, { token: PerformanceService }], target: i0.ɵɵFactoryTarget.Injectable });
7124
+ CoreLibraryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, deps: [{ token: SettingsService }, { token: CountryService }, { token: PaymentMethodsService }, { token: SavedMethodsService }, { token: UserBalanceService }, { token: PaymentConfigService }, { token: PaymentService }, { token: DeviceFingerPrintService }, { token: FinanceDetailsService }, { token: LegalService }, { token: StatusService }, { token: NextActionService }, { token: CreditCardService }, { token: CreditCardStateService }, { token: FormMessagesService }, { token: EditSavedMethodsService }, { token: UserBehaviourAnalyticsService }, { token: PerformanceService }, { token: CombinedPaymentMethodsService }], target: i0.ɵɵFactoryTarget.Injectable });
7092
7125
  CoreLibraryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, providedIn: 'root' });
7093
7126
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, decorators: [{
7094
7127
  type: Injectable,
7095
7128
  args: [{
7096
7129
  providedIn: 'root',
7097
7130
  }]
7098
- }], ctorParameters: function () { return [{ type: SettingsService }, { type: CountryService }, { type: PaymentMethodsService }, { type: SavedMethodsService }, { type: UserBalanceService }, { type: PaymentConfigService }, { type: PaymentService }, { type: DeviceFingerPrintService }, { type: FinanceDetailsService }, { type: LegalService }, { type: StatusService }, { type: NextActionService }, { type: CreditCardService }, { type: CreditCardStateService }, { type: FormMessagesService }, { type: EditSavedMethodsService }, { type: UserBehaviourAnalyticsService }, { type: PerformanceService }]; } });
7131
+ }], ctorParameters: function () { return [{ type: SettingsService }, { type: CountryService }, { type: PaymentMethodsService }, { type: SavedMethodsService }, { type: UserBalanceService }, { type: PaymentConfigService }, { type: PaymentService }, { type: DeviceFingerPrintService }, { type: FinanceDetailsService }, { type: LegalService }, { type: StatusService }, { type: NextActionService }, { type: CreditCardService }, { type: CreditCardStateService }, { type: FormMessagesService }, { type: EditSavedMethodsService }, { type: UserBehaviourAnalyticsService }, { type: PerformanceService }, { type: CombinedPaymentMethodsService }]; } });
7099
7132
 
7100
7133
  class HttpError extends AppError {
7101
7134
  constructor(error, req) {