Subscriptions

This commit is contained in:
Hillel Coren 2021-03-30 12:04:29 +03:00
parent fefc1059b5
commit aa026cf5dd
1 changed files with 38 additions and 16 deletions

View File

@ -95,22 +95,44 @@ abstract class SubscriptionEntity extends Object
@BuiltValueField(wireName: 'promo_code') @BuiltValueField(wireName: 'promo_code')
String get promoCode; String get promoCode;
/* @BuiltValueField(wireName: 'promo_discount')
'promo_discount' => (float)$subscription->promo_discount, double get promoDiscount;
'is_amount_discount' => (bool)$subscription->is_amount_discount,
'allow_cancellation' => (bool)$subscription->allow_cancellation, @BuiltValueField(wireName: 'is_amount_discount')
'per_seat_enabled' => (bool)$subscription->per_set_enabled, bool get isAmountDiscount;
'min_seats_limit' => (int)$subscription->min_seats_limit,
'max_seats_limit' => (int)$subscription->max_seats_limit, @BuiltValueField(wireName: 'allow_cancellation')
'trial_enabled' => (bool)$subscription->trial_enabled, bool get allowCancellation;
'trial_duration' => (int)$subscription->trial_duration,
'allow_query_overrides' => (bool)$subscription->allow_query_overrides, @BuiltValueField(wireName: 'per_seat_enabled')
'allow_plan_changes' => (bool)$subscription->allow_plan_changes, bool get perSeatEnabled;
'plan_map' => (string)$subscription->plan_map,
'refund_period' => (int)$subscription->refund_period, @BuiltValueField(wireName: 'max_seats_limit')
'webhook_configuration' => $subscription->webhook_configuration ?: $std, int get maxSeatsLimit;
'purchase_page' => (string)route('client.subscription.purchase', $subscription->hashed_id),
*/ @BuiltValueField(wireName: 'trial_enabled')
bool get trialEnabled;
@BuiltValueField(wireName: 'trial_duration')
int get trialDuration;
@BuiltValueField(wireName: 'allow_query_overrides')
bool get allowQueryOverrides;
@BuiltValueField(wireName: 'allow_plan_changes')
bool get allowPlanChanges;
@BuiltValueField(wireName: 'plan_map')
String get planMap;
@BuiltValueField(wireName: 'refund_period')
int get refundPeriod;
@BuiltValueField(wireName: 'webhook_configuration')
BuiltMap<String, String> get webhookConfiguration;
@BuiltValueField(wireName: 'purchase_page')
String get purchasePage;
String get displayName => id; String get displayName => id;