Skip to content

Commit 58b706e

Browse files
authored
Merge pull request #959 from HiEventsDev/develop
2 parents 6f4af16 + cfa416d commit 58b706e

File tree

84 files changed

+5182
-1991
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+5182
-1991
lines changed

backend/app/DomainObjects/Generated/EventSettingDomainObjectAbstract.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ abstract class EventSettingDomainObjectAbstract extends \HiEvents\DomainObjects\
6262
final public const ATTENDEE_DETAILS_COLLECTION_METHOD = 'attendee_details_collection_method';
6363
final public const SHOW_MARKETING_OPT_IN = 'show_marketing_opt_in';
6464
final public const HOMEPAGE_THEME_SETTINGS = 'homepage_theme_settings';
65+
final public const PASS_PLATFORM_FEE_TO_BUYER = 'pass_platform_fee_to_buyer';
6566

6667
protected int $id;
6768
protected int $event_id;
@@ -115,6 +116,7 @@ abstract class EventSettingDomainObjectAbstract extends \HiEvents\DomainObjects\
115116
protected string $attendee_details_collection_method = 'PER_TICKET';
116117
protected bool $show_marketing_opt_in = true;
117118
protected array|string|null $homepage_theme_settings = null;
119+
protected bool $pass_platform_fee_to_buyer = false;
118120

119121
public function toArray(): array
120122
{
@@ -171,6 +173,7 @@ public function toArray(): array
171173
'attendee_details_collection_method' => $this->attendee_details_collection_method ?? null,
172174
'show_marketing_opt_in' => $this->show_marketing_opt_in ?? null,
173175
'homepage_theme_settings' => $this->homepage_theme_settings ?? null,
176+
'pass_platform_fee_to_buyer' => $this->pass_platform_fee_to_buyer ?? null,
174177
];
175178
}
176179

@@ -746,4 +749,15 @@ public function getHomepageThemeSettings(): array|string|null
746749
{
747750
return $this->homepage_theme_settings;
748751
}
752+
753+
public function setPassPlatformFeeToBuyer(bool $pass_platform_fee_to_buyer): self
754+
{
755+
$this->pass_platform_fee_to_buyer = $pass_platform_fee_to_buyer;
756+
return $this;
757+
}
758+
759+
public function getPassPlatformFeeToBuyer(): bool
760+
{
761+
return $this->pass_platform_fee_to_buyer;
762+
}
749763
}

backend/app/DomainObjects/Generated/OrderItemDomainObjectAbstract.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ abstract class OrderItemDomainObjectAbstract extends \HiEvents\DomainObjects\Abs
2525
final public const TOTAL_SERVICE_FEE = 'total_service_fee';
2626
final public const TAXES_AND_FEES_ROLLUP = 'taxes_and_fees_rollup';
2727
final public const PRODUCT_TYPE = 'product_type';
28+
final public const BUNDLE_GROUP_ID = 'bundle_group_id';
29+
final public const IS_BUNDLE_PRIMARY = 'is_bundle_primary';
2830

2931
protected int $id;
3032
protected int $order_id;
@@ -41,6 +43,8 @@ abstract class OrderItemDomainObjectAbstract extends \HiEvents\DomainObjects\Abs
4143
protected ?float $total_service_fee = 0.0;
4244
protected array|string|null $taxes_and_fees_rollup = null;
4345
protected string $product_type = 'TICKET';
46+
protected ?string $bundle_group_id = null;
47+
protected bool $is_bundle_primary = false;
4448

4549
public function toArray(): array
4650
{
@@ -60,6 +64,8 @@ public function toArray(): array
6064
'total_service_fee' => $this->total_service_fee ?? null,
6165
'taxes_and_fees_rollup' => $this->taxes_and_fees_rollup ?? null,
6266
'product_type' => $this->product_type ?? null,
67+
'bundle_group_id' => $this->bundle_group_id ?? null,
68+
'is_bundle_primary' => $this->is_bundle_primary ?? null,
6369
];
6470
}
6571

@@ -227,4 +233,26 @@ public function getProductType(): string
227233
{
228234
return $this->product_type;
229235
}
236+
237+
public function setBundleGroupId(?string $bundle_group_id): self
238+
{
239+
$this->bundle_group_id = $bundle_group_id;
240+
return $this;
241+
}
242+
243+
public function getBundleGroupId(): ?string
244+
{
245+
return $this->bundle_group_id;
246+
}
247+
248+
public function setIsBundlePrimary(bool $is_bundle_primary): self
249+
{
250+
$this->is_bundle_primary = $is_bundle_primary;
251+
return $this;
252+
}
253+
254+
public function getIsBundlePrimary(): bool
255+
{
256+
return $this->is_bundle_primary;
257+
}
230258
}

backend/app/DomainObjects/Generated/OrganizerSettingDomainObjectAbstract.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ abstract class OrganizerSettingDomainObjectAbstract extends \HiEvents\DomainObje
2727
final public const LOCATION_DETAILS = 'location_details';
2828
final public const DEFAULT_ATTENDEE_DETAILS_COLLECTION_METHOD = 'default_attendee_details_collection_method';
2929
final public const DEFAULT_SHOW_MARKETING_OPT_IN = 'default_show_marketing_opt_in';
30+
final public const DEFAULT_PASS_PLATFORM_FEE_TO_BUYER = 'default_pass_platform_fee_to_buyer';
3031

3132
protected int $id;
3233
protected int $organizer_id;
@@ -45,6 +46,7 @@ abstract class OrganizerSettingDomainObjectAbstract extends \HiEvents\DomainObje
4546
protected array|string|null $location_details = null;
4647
protected string $default_attendee_details_collection_method = 'PER_TICKET';
4748
protected bool $default_show_marketing_opt_in = true;
49+
protected bool $default_pass_platform_fee_to_buyer = false;
4850

4951
public function toArray(): array
5052
{
@@ -66,6 +68,7 @@ public function toArray(): array
6668
'location_details' => $this->location_details ?? null,
6769
'default_attendee_details_collection_method' => $this->default_attendee_details_collection_method ?? null,
6870
'default_show_marketing_opt_in' => $this->default_show_marketing_opt_in ?? null,
71+
'default_pass_platform_fee_to_buyer' => $this->default_pass_platform_fee_to_buyer ?? null,
6972
];
7073
}
7174

@@ -256,4 +259,15 @@ public function getDefaultShowMarketingOptIn(): bool
256259
{
257260
return $this->default_show_marketing_opt_in;
258261
}
262+
263+
public function setDefaultPassPlatformFeeToBuyer(bool $default_pass_platform_fee_to_buyer): self
264+
{
265+
$this->default_pass_platform_fee_to_buyer = $default_pass_platform_fee_to_buyer;
266+
return $this;
267+
}
268+
269+
public function getDefaultPassPlatformFeeToBuyer(): bool
270+
{
271+
return $this->default_pass_platform_fee_to_buyer;
272+
}
259273
}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?php
2+
3+
namespace HiEvents\DomainObjects\Generated;
4+
5+
/**
6+
* THIS FILE IS AUTOGENERATED - DO NOT EDIT IT DIRECTLY.
7+
* @package HiEvents\DomainObjects\Generated
8+
*/
9+
abstract class ProductPriceTaxAndFeesDomainObjectAbstract extends \HiEvents\DomainObjects\AbstractDomainObject
10+
{
11+
final public const SINGULAR_NAME = 'product_price_tax_and_fees';
12+
final public const PLURAL_NAME = 'product_price_tax_and_fees';
13+
final public const ID = 'id';
14+
final public const PRODUCT_PRICE_ID = 'product_price_id';
15+
final public const TAX_AND_FEE_ID = 'tax_and_fee_id';
16+
final public const CREATED_AT = 'created_at';
17+
final public const UPDATED_AT = 'updated_at';
18+
final public const DELETED_AT = 'deleted_at';
19+
20+
protected int $id;
21+
protected int $product_price_id;
22+
protected int $tax_and_fee_id;
23+
protected ?string $created_at = null;
24+
protected ?string $updated_at = null;
25+
protected ?string $deleted_at = null;
26+
27+
public function toArray(): array
28+
{
29+
return [
30+
'id' => $this->id ?? null,
31+
'product_price_id' => $this->product_price_id ?? null,
32+
'tax_and_fee_id' => $this->tax_and_fee_id ?? null,
33+
'created_at' => $this->created_at ?? null,
34+
'updated_at' => $this->updated_at ?? null,
35+
'deleted_at' => $this->deleted_at ?? null,
36+
];
37+
}
38+
39+
public function setId(int $id): self
40+
{
41+
$this->id = $id;
42+
return $this;
43+
}
44+
45+
public function getId(): int
46+
{
47+
return $this->id;
48+
}
49+
50+
public function setProductPriceId(int $product_price_id): self
51+
{
52+
$this->product_price_id = $product_price_id;
53+
return $this;
54+
}
55+
56+
public function getProductPriceId(): int
57+
{
58+
return $this->product_price_id;
59+
}
60+
61+
public function setTaxAndFeeId(int $tax_and_fee_id): self
62+
{
63+
$this->tax_and_fee_id = $tax_and_fee_id;
64+
return $this;
65+
}
66+
67+
public function getTaxAndFeeId(): int
68+
{
69+
return $this->tax_and_fee_id;
70+
}
71+
72+
public function setCreatedAt(?string $created_at): self
73+
{
74+
$this->created_at = $created_at;
75+
return $this;
76+
}
77+
78+
public function getCreatedAt(): ?string
79+
{
80+
return $this->created_at;
81+
}
82+
83+
public function setUpdatedAt(?string $updated_at): self
84+
{
85+
$this->updated_at = $updated_at;
86+
return $this;
87+
}
88+
89+
public function getUpdatedAt(): ?string
90+
{
91+
return $this->updated_at;
92+
}
93+
94+
public function setDeletedAt(?string $deleted_at): self
95+
{
96+
$this->deleted_at = $deleted_at;
97+
return $this;
98+
}
99+
100+
public function getDeletedAt(): ?string
101+
{
102+
return $this->deleted_at;
103+
}
104+
}

backend/app/DomainObjects/Generated/UserDomainObjectAbstract.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ abstract class UserDomainObjectAbstract extends \HiEvents\DomainObjects\Abstract
2323
final public const PENDING_EMAIL = 'pending_email';
2424
final public const TIMEZONE = 'timezone';
2525
final public const LOCALE = 'locale';
26+
final public const MARKETING_OPTED_IN_AT = 'marketing_opted_in_at';
2627

2728
protected int $id;
2829
protected string $email;
@@ -37,6 +38,7 @@ abstract class UserDomainObjectAbstract extends \HiEvents\DomainObjects\Abstract
3738
protected ?string $pending_email = null;
3839
protected string $timezone;
3940
protected string $locale = 'en';
41+
protected ?string $marketing_opted_in_at = null;
4042

4143
public function toArray(): array
4244
{
@@ -54,6 +56,7 @@ public function toArray(): array
5456
'pending_email' => $this->pending_email ?? null,
5557
'timezone' => $this->timezone ?? null,
5658
'locale' => $this->locale ?? null,
59+
'marketing_opted_in_at' => $this->marketing_opted_in_at ?? null,
5760
];
5861
}
5962

@@ -199,4 +202,15 @@ public function getLocale(): string
199202
{
200203
return $this->locale;
201204
}
205+
206+
public function setMarketingOptedInAt(?string $marketing_opted_in_at): self
207+
{
208+
$this->marketing_opted_in_at = $marketing_opted_in_at;
209+
return $this;
210+
}
211+
212+
public function getMarketingOptedInAt(): ?string
213+
{
214+
return $this->marketing_opted_in_at;
215+
}
202216
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace HiEvents\DomainObjects;
4+
5+
class ProductPriceTaxAndFeesDomainObject extends Generated\ProductPriceTaxAndFeesDomainObjectAbstract
6+
{
7+
}

backend/app/Http/Actions/Accounts/CreateAccountAction.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public function __invoke(CreateAccountRequest $request): JsonResponse
5050
? $request->validated('locale')
5151
: $this->localeService->getLocaleOrDefault($request->getPreferredLanguage()),
5252
'invite_token' => $request->validated('invite_token'),
53+
'marketing_opt_in' => (bool) $request->validated('marketing_opt_in'),
5354
]));
5455
} catch (EmailAlreadyExists $e) {
5556
throw ValidationException::withMessages([

backend/app/Http/Actions/Users/UpdateMeAction.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function __invoke(UpdateMeRequest $request): JsonResponse
3636
'current_password' => $request->validated('current_password'),
3737
'timezone' => $request->validated('timezone'),
3838
'locale' => $request->validated('locale'),
39+
'marketing_opt_in' => $request->has('marketing_opt_in') ? (bool) $request->validated('marketing_opt_in') : null,
3940
]));
4041

4142
return $this->resourceResponse(UserResource::class, $user);

backend/app/Http/Request/Account/CreateAccountRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function rules(): array
2525
'currency_code' => [Rule::in(array_values($currencies))],
2626
'locale' => ['nullable', Rule::in(Locale::getSupportedLocales())],
2727
'invite_token' => ['nullable', 'string'],
28+
'marketing_opt_in' => 'boolean|nullable',
2829
];
2930
}
3031
}

backend/app/Http/Request/EventSettings/UpdateEventSettingsRequest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ public function rules(): array
8989
// Marketing settings
9090
'show_marketing_opt_in' => ['boolean'],
9191

92+
// Platform fee settings
93+
'pass_platform_fee_to_buyer' => ['boolean'],
94+
9295
// Homepage theme settings
9396
'homepage_theme_settings' => ['nullable', 'array'],
9497
'homepage_theme_settings.accent' => ['nullable', 'string', ...RulesHelper::HEX_COLOR],

0 commit comments

Comments
 (0)