Skip to content

Commit 1bdd81f

Browse files
author
klaviyo-sdk
committed
version 12.0.1
1 parent a11c98d commit 1bdd81f

File tree

6 files changed

+21
-20
lines changed

6 files changed

+21
-20
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
NOTE: For more granular API-specific changes, please see our [API Changelog](https://developers.klaviyo.com/en/docs/changelog_)
99

10+
## [12.0.1] - revision 2024-10-15
11+
### Fixed
12+
- Updated "Uploading Image From File" section of README
13+
1014
## [12.0.0] - revision 2024-10-15
1115
### Changed
1216
- **Breaking:** Improved Retry Logic

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Klaviyo PHP SDK
22

3-
- SDK version: 12.0.0
3+
- SDK version: 12.0.1
44
- API Revision: 2024-10-15
55

66
## Helpful Resources
@@ -203,22 +203,19 @@ $klaviyo->Tags->getTagRelationshipsCampaigns('f4bc6670-1aa5-47df-827a-d30a7e5430
203203

204204
#### Uploading Image From File
205205

206-
When using `Images.uploadImageFromFile(file, name=name)`, `file`` can be either a file path string OR a bytearray.
207-
208-
NOTE: when file is a bytearray, you will need to use the optional `name` parameter to specify the file name, else name will default to `unnamed_image_from_python_sdk`
206+
When using `$klaviyo->Images->uploadImageFromFile($file, $name)`, `$file` can be either a file path string OR a `SplFileObject`.
209207

210208
*as a file path*
211-
```python
212-
filepath = '/path/to/image.png'
213-
klaviyo.Images.upload_image_from_file(file, name=name)
209+
```php
210+
$filepath = '/path/to/image.png';
211+
$klaviyo->Images->uploadImageFromFile($filepath);
214212
```
215213

216-
*as a bytearray*
217-
```python
218-
filepath = '/path/to/image.png'
219-
with open(filepath, 'rb') as f:
220-
file = f.read()
221-
klaviyo.Images.upload_image_from_file(file, name=name)
214+
*as a `SplFileObject`*
215+
```php
216+
$filepath = '/path/to/image.png';
217+
$file = new SplFileObject($filepath);
218+
$klaviyo->Images->uploadImageFromFile($file);
222219
```
223220

224221

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "klaviyo/api",
3-
"version": "12.0.0",
3+
"version": "12.0.1",
44
"description": "PHP SDK for Klaviyo's API.",
55
"keywords": [
66
"openapitools",

lib/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class Configuration
101101
*
102102
* @var string
103103
*/
104-
protected $userAgent = 'klaviyo-api-php/12.0.0';
104+
protected $userAgent = 'klaviyo-api-php/12.0.1';
105105

106106
/**
107107
* Debug switch (default set to false)
@@ -434,7 +434,7 @@ public static function toDebugReport()
434434
$report .= ' OS: ' . php_uname() . PHP_EOL;
435435
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
436436
$report .= ' The version of the OpenAPI document: 2024-10-15' . PHP_EOL;
437-
$report .= ' SDK Package Version: 12.0.0' . PHP_EOL;
437+
$report .= ' SDK Package Version: 12.0.1' . PHP_EOL;
438438
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
439439

440440
return $report;

lib/Model/FormSeriesRequestDTOResourceObjectAttributes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ public function getGroupBy()
514514
/**
515515
* Sets group_by
516516
*
517-
* @param string[]|null $group_by List of attributes to group the data by. Allowed group-bys are form_version_id, form_id. If not passed in, the data will be grouped by form_id. If a group by has prerequisites, they must be passed in together. The prerequisites for form_version_id is form_id
517+
* @param string[]|null $group_by List of attributes to group the data by. Allowed group-bys are form_id, form_version_id. If not passed in, the data will be grouped by form_id. If a group by has prerequisites, they must be passed in together. The prerequisites for form_version_id is form_id
518518
*
519519
* @return self
520520
*/
@@ -559,7 +559,7 @@ public function getFilter()
559559
/**
560560
* Sets filter
561561
*
562-
* @param string|null $filter API filter string used to filter the query. Allowed filters are form_version_id, form_id. Allowed operators are equals, any. Only one filter can be used per attribute, only AND can be used as a combination operator. Max of 100 messages per ANY filter.
562+
* @param string|null $filter API filter string used to filter the query. Allowed filters are form_id, form_version_id. Allowed operators are equals, any. Only one filter can be used per attribute, only AND can be used as a combination operator. Max of 100 messages per ANY filter.
563563
*
564564
* @return self
565565
*/

lib/Model/FormValuesRequestDTOResourceObjectAttributes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ public function getGroupBy()
437437
/**
438438
* Sets group_by
439439
*
440-
* @param string[]|null $group_by List of attributes to group the data by. Allowed group-bys are form_version_id, form_id. If not passed in, the data will be grouped by form_id. If a group by has prerequisites, they must be passed in together. The prerequisites for form_version_id is form_id
440+
* @param string[]|null $group_by List of attributes to group the data by. Allowed group-bys are form_id, form_version_id. If not passed in, the data will be grouped by form_id. If a group by has prerequisites, they must be passed in together. The prerequisites for form_version_id is form_id
441441
*
442442
* @return self
443443
*/
@@ -482,7 +482,7 @@ public function getFilter()
482482
/**
483483
* Sets filter
484484
*
485-
* @param string|null $filter API filter string used to filter the query. Allowed filters are form_version_id, form_id. Allowed operators are equals, any. Only one filter can be used per attribute, only AND can be used as a combination operator. Max of 100 messages per ANY filter.
485+
* @param string|null $filter API filter string used to filter the query. Allowed filters are form_id, form_version_id. Allowed operators are equals, any. Only one filter can be used per attribute, only AND can be used as a combination operator. Max of 100 messages per ANY filter.
486486
*
487487
* @return self
488488
*/

0 commit comments

Comments
 (0)