-
Change all used model classes namespace to 'SmartEmailing\v3\Models'
-
All model classes uses getters and setters instead of public properties (for example
SmartEmailing\v3\Request\Import\Contact
is nowSmartEmailing\v3\Models\Contact
) -
Change references to namespace
SmartEmailing\v3\Request
toSmartEmailing\v3\Endpoints
-
Rename
SmartEmailing\v3\Request\CustomFields\CustomField
toSmartEmailing\v3\Models\CustomFieldDefinition
-
Rename
SmartEmailing\v3\Request\Import\CustomField
toSmartEmailing\v3\Models\CustomFieldValue
-
Rename
SmartEmailing\v3\Request\Import\Contactlist
toSmartEmailing\v3\Models\ContactlistStatus
-
Rename
SmartEmailing\v3\Request\Import\Settings
toSmartEmailing\v3\Models\ImportContactsSettings
-
Endpoints
/api/v3/orders
($api->eshopOrders()
) and/api/v3/orders-bulk
($api->eshopOrdersBulk()
) are deprecated because SmartEmailing deprecated them in favour of/api/v3/import-orders
-
If you still want to use these deprecated endpoints change
SmartEmailing\v3\Request\Eshops\Model\Order
toSmartEmailing\v3\Models\OrderWithFeedItems
-
For
Search
requests usesetPage($page, $limit)
instead ofsetPage($page)->limit($limit)
-
For
Search
requests use gettersgetPage()
,getOffset()
andgetLimit()
instead of properties -
Array
CustomFieldDefinition->options
is no longer available. USe->options()
instead to get properHolder
object -
For custom field options use
CustomFieldOption
object -
CustomRequest
now returnsCustomResponse
with parsed data using->data()
-
All
Api
andEndpoint
methods now follows these conventions:something()
sends request immediately and returnsResponse
or data (Model
orModel[]
)somethingRequest()
returns request object that cen be modified and then send by calling$request->send()
get($id): ?Model
- returns Model class by idgetBySomething($something): ?Model
- returns Model class by idlist($page = null, $limit = null): array
- returnsModel[]
without filteringsearchRequest($page = null, $limit = null): Request
- returns searchRequest
that can be modified and then send by calling$request->send()
create($data): void
- sends request to create new itemcreateRequest($data): Request
- returns createRequest
that can be modified and then send by calling$request->send()
-
This convetions means for example that now:
$api->ping()->send()
is just$api->ping()
$api->import()
is$api->importRequest()
$api->customFields()->create()
returnModels\CustomFieldDefinition
$api->customFields()->exists()
is$api->customFields()->getByName()
- for simple list you can use
$api->customFields()->list()
$api->contactlists()->lists()
is$api->contactlists()->list()
and returnsModels\ContactList[]
$api->contactlists()->truncate($id)->send()
is$api->contactlists()->truncate($id)
$api->contactlists()->search()
is$api->contactlists()->searchRequest()