wsp-ms-core 1.0.80 → 1.0.82

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/index.d.ts CHANGED
@@ -45,6 +45,7 @@ declare class DateTime extends ValueObject<string> {
45
45
  get second(): number;
46
46
  getMonthName(locale?: string): string;
47
47
  getWeekdayName(locale?: string): string;
48
+ getDayName(locale?: string): string;
48
49
  format(format: string): string;
49
50
  toPrimitives(): Record<string, unknown>;
50
51
  static create(input?: string | number): DateTime;
@@ -153,6 +154,13 @@ declare class PaymentGateway extends ValueObject<string> {
153
154
  private constructor();
154
155
  protected validate(value: string): void;
155
156
  isExternal(): boolean;
157
+ get isMercadoPago(): boolean;
158
+ get isHandy(): boolean;
159
+ get isWonaDebit(): boolean;
160
+ get isWonaCard(): boolean;
161
+ get isWonaCash(): boolean;
162
+ get isWonaTransfer(): boolean;
163
+ get isWonaMercadoPago(): boolean;
156
164
  toPrimitives(): Record<string, unknown>;
157
165
  static create(gateway: string): PaymentGateway;
158
166
  }
package/dist/index.js CHANGED
@@ -103,6 +103,9 @@ var _DateTime = class _DateTime extends ValueObject {
103
103
  getWeekdayName(locale = "en") {
104
104
  return this._dt.setLocale(locale).toFormat("cccc");
105
105
  }
106
+ getDayName(locale = "en") {
107
+ return this._dt.setLocale(locale).toFormat("EEEE");
108
+ }
106
109
  format(format) {
107
110
  if (!_DateTime.FORMATS.hasOwnProperty(format)) {
108
111
  throw new Error(`Invalid format: ${format}`);
@@ -291,6 +294,27 @@ var _PaymentGateway = class _PaymentGateway extends ValueObject {
291
294
  isExternal() {
292
295
  return _PaymentGateway.EXTERNALS.includes(this.value);
293
296
  }
297
+ get isMercadoPago() {
298
+ return this.equals(_PaymentGateway.MERCADOPAGO);
299
+ }
300
+ get isHandy() {
301
+ return this.equals(_PaymentGateway.HANDY);
302
+ }
303
+ get isWonaDebit() {
304
+ return this.equals(_PaymentGateway.WONA_DEBIT);
305
+ }
306
+ get isWonaCard() {
307
+ return this.equals(_PaymentGateway.WONA_CARD);
308
+ }
309
+ get isWonaCash() {
310
+ return this.equals(_PaymentGateway.WONA_CASH);
311
+ }
312
+ get isWonaTransfer() {
313
+ return this.equals(_PaymentGateway.WONA_TRANSFER);
314
+ }
315
+ get isWonaMercadoPago() {
316
+ return this.equals(_PaymentGateway.WONA_MERCADOPAGO);
317
+ }
294
318
  toPrimitives() {
295
319
  return { value: this.value };
296
320
  }