OrderAffiliateCompanySettings extends OrderModel
Order Affiliate Company Setting Management
Table of Contents
Methods
| getCommissionTypes() | Returns all supported affiliate commission types in key/value pairs |
| getOrderFrequencies() | Returns all supported affiliate order frequencies in key/value pairs |
| getSetting() | Fetch a single setting by key name |
| getSettings() | Fetches all affiliate company settings |
| setSetting() | Sets the setting with the given key, overwriting any existing value with that key |
| setSettings() | Sets a group of settings with key/value pairs |
| unsetSetting() | Unsets a setting from the order affiliate company settings. |
| getRules() | Retrieves rules for adding a setting |
Methods
getCommissionTypes()
Returns all supported affiliate commission types in key/value pairs
public
getCommissionTypes() : array<string|int, mixed>
Return values
array<string|int, mixed> —A list of affiliate commission types
getOrderFrequencies()
Returns all supported affiliate order frequencies in key/value pairs
public
getOrderFrequencies() : array<string|int, mixed>
Return values
array<string|int, mixed> —A list of affiliate order frequencies
getSetting()
Fetch a single setting by key name
public
getSetting(int $company_id, string $key) : mixed
Parameters
- $company_id : int
-
The company ID
- $key : string
-
The key name of the setting to fetch
Return values
mixed —An stdObject containg the key and value, false if no such key exists
getSettings()
Fetches all affiliate company settings
public
getSettings(int $company_id) : mixed
Parameters
- $company_id : int
-
The company ID
Return values
mixed —An array of objects with key/value pairs of settings, false if no results found
setSetting()
Sets the setting with the given key, overwriting any existing value with that key
public
setSetting(int $company_id, string $key, string $value) : mixed
Parameters
- $company_id : int
-
The company ID
- $key : string
-
The setting identifier
- $value : string
-
The value to set for this setting
setSettings()
Sets a group of settings with key/value pairs
public
setSettings(int $company_id, array<string|int, mixed> $settings) : mixed
Parameters
- $company_id : int
-
The company ID
- $settings : array<string|int, mixed>
-
Settings to set as key/value pairs
Tags
unsetSetting()
Unsets a setting from the order affiliate company settings.
public
unsetSetting(int $company_id, string $key) : mixed
Parameters
- $company_id : int
-
The company ID
- $key : string
-
The setting to unset
getRules()
Retrieves rules for adding a setting
private
getRules() : array<string|int, mixed>
Return values
array<string|int, mixed> —The input validation rules