AbandonedCheckoutProtocolController.php
2 years ago
AbandonedCheckoutsController.php
3 years ago
AccountController.php
2 years ago
ActivationsController.php
3 years ago
AffiliationProductsController.php
2 years ago
AffiliationProtocolController.php
2 years ago
AffiliationRequestsController.php
2 years ago
AffiliationsController.php
2 years ago
AutoFeeProtocolController.php
5 months ago
AutoFeesController.php
5 months ago
BalanceTransactionsController.php
3 years ago
BatchesController.php
1 week ago
BrandController.php
4 months ago
BumpsController.php
5 days ago
BundleItemsController.php
5 days ago
CancellationActsController.php
3 years ago
CancellationReasonsController.php
3 years ago
ChargesController.php
2 years ago
CheckEmailController.php
11 months ago
CheckoutsController.php
5 months ago
ClicksController.php
2 years ago
CouponsController.php
4 years ago
CustomerController.php
1 month ago
CustomerNotificationProtocolController.php
2 years ago
CustomerPortalProtocolController.php
1 year ago
DisplayCurrencyController.php
1 year ago
DisputesController.php
9 months ago
DownloadsController.php
4 years ago
DraftCheckoutsController.php
2 years ago
ExportsController.php
2 years ago
FulfillmentsController.php
3 years ago
ImportRowsController.php
2 months ago
IncomingWebhooksController.php
2 months ago
IntegrationCatalogController.php
1 year ago
IntegrationProvidersController.php
4 years ago
IntegrationsController.php
2 months ago
InvoicesController.php
1 year ago
LicensesController.php
3 years ago
LineItemsController.php
1 year ago
LoginController.php
1 month ago
ManualPaymentMethodsController.php
3 years ago
MediasController.php
4 years ago
OrderController.php
1 year ago
OrderProtocolController.php
2 years ago
ParcelTemplateController.php
4 months ago
PaymentIntentsController.php
2 years ago
PaymentMethodsController.php
2 years ago
PayoutGroupsController.php
2 years ago
PayoutsController.php
2 years ago
PeriodsController.php
3 years ago
PluginInstallerController.php
1 week ago
PricesController.php
5 days ago
ProcessorController.php
3 years ago
ProductCollectionsController.php
5 days ago
ProductGroupsController.php
5 days ago
ProductMediaController.php
5 days ago
ProductsController.php
5 days ago
PromotionsController.php
4 years ago
ProvisionalAccountController.php
3 years ago
PurchasesController.php
4 years ago
ReferralItemsController.php
2 years ago
ReferralsController.php
2 years ago
RefundsController.php
4 years ago
RegisteredWebhookController.php
2 years ago
RestController.php
1 week ago
ReturnItemsController.php
2 years ago
ReturnReasonsController.php
2 years ago
ReturnRequestsController.php
2 years ago
ReviewProtocolController.php
5 months ago
ReviewsController.php
1 week ago
RuleSchemaController.php
5 months ago
SettingsController.php
5 days ago
ShippingMethodController.php
3 years ago
ShippingProfileController.php
3 years ago
ShippingProtocolController.php
3 years ago
ShippingRateController.php
3 years ago
ShippingZoneController.php
3 years ago
StatisticsController.php
2 years ago
SubscriptionProtocolController.php
2 years ago
SubscriptionsController.php
2 years ago
SwapsController.php
1 year ago
TaxOverrideController.php
2 years ago
TaxProtocolController.php
2 years ago
TaxRegistrationController.php
4 years ago
TaxZoneController.php
4 years ago
UploadsController.php
4 years ago
UpsellFunnelsController.php
2 years ago
UpsellsController.php
5 days ago
VariantOptionsController.php
5 days ago
VariantValuesController.php
5 days ago
VariantsController.php
5 days ago
VerificationCodeController.php
5 days ago
WebhookController.php
4 years ago
UpsellsController.php
49 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\Controllers\Rest; |
| 4 | |
| 5 | use SureCart\Concerns\RestrictsAnonymousReads; |
| 6 | use SureCart\Models\Upsell; |
| 7 | |
| 8 | /** |
| 9 | * Handle upsell requests through the REST API |
| 10 | */ |
| 11 | class UpsellsController extends RestController { |
| 12 | use RestrictsAnonymousReads; |
| 13 | |
| 14 | /** |
| 15 | * Class to make the requests. |
| 16 | * |
| 17 | * @var string |
| 18 | */ |
| 19 | protected $class = Upsell::class; |
| 20 | |
| 21 | /** |
| 22 | * Capability that unlocks unrestricted reads. |
| 23 | * |
| 24 | * @var string |
| 25 | */ |
| 26 | protected $edit_capability = 'edit_sc_prices'; |
| 27 | |
| 28 | /** |
| 29 | * Expands safe to forward for anonymous callers. |
| 30 | * |
| 31 | * @var array |
| 32 | */ |
| 33 | protected $anonymous_expands = []; |
| 34 | |
| 35 | /** |
| 36 | * Query filters forced for anonymous callers. |
| 37 | * |
| 38 | * @var array |
| 39 | */ |
| 40 | protected $anonymous_scope = [ 'archived' => false ]; |
| 41 | |
| 42 | /** |
| 43 | * Hide archived upsells on find for anonymous callers. |
| 44 | * |
| 45 | * @var boolean |
| 46 | */ |
| 47 | protected $anonymous_hides_archived = true; |
| 48 | } |
| 49 |