@infrab4a/connect 4.0.0-beta.36 → 4.0.0-beta.38

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.
@@ -965,26 +965,28 @@ class Coupon extends BaseModel {
965
965
  static createCoupon(userId) {
966
966
  return this.toInstance({
967
967
  nickname: `${Date.now()}`,
968
- type: CouponTypes.ABSOLUTE,
969
968
  checkoutType: CheckoutTypes.ECOMMERCE,
970
- discount: 30,
969
+ discount: {
970
+ subscriber: {
971
+ type: CouponTypes.ABSOLUTE,
972
+ value: 10,
973
+ },
974
+ non_subscriber: {
975
+ type: CouponTypes.ABSOLUTE,
976
+ value: 10,
977
+ },
978
+ subscription: {
979
+ type: CouponTypes.ABSOLUTE,
980
+ value: 10,
981
+ },
982
+ },
971
983
  user: userId,
972
- useLimit: 1,
973
- useLimitPerUser: true,
974
984
  createdAt: new Date(Date.now()),
975
985
  beginAt: new Date(Date.now()),
976
986
  expiresIn: new Date(Date.now() + COUPON_EXPIRATION),
977
987
  });
978
988
  }
979
989
  }
980
- __decorate([
981
- Expose({ name: 'checkout_type' }),
982
- __metadata("design:type", Number)
983
- ], Coupon.prototype, "checkoutType", void 0);
984
- __decorate([
985
- Expose({ name: 'exclusivity_type' }),
986
- __metadata("design:type", Number)
987
- ], Coupon.prototype, "exclusivityType", void 0);
988
990
 
989
991
  class SubscriptionPlan extends BaseModel {
990
992
  static get identifiersFields() {