Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getReturns param returnCreationStartDate gives Object of class DateTime could not be converted to string #28

Open
Vickyvignesh-01 opened this issue Jan 11, 2025 · 0 comments

Comments

@Vickyvignesh-01
Copy link

Vickyvignesh-01 commented Jan 11, 2025

The getReturns() param returnCreationStartDate, returnCreationEndDate expects DateTime, if i give the datetime type like
2024-12-01T00:00:01Z (converted into Datetime type) it gives error as Object of class DateTime could not be converted to string below is the code
$returnCreationStartDateString = new \DateTime ('2024-12-10T00:00:01Z');
$returnCreationEndDateString = new \DateTime ('2024-12-10T23:00:01Z');

    $returnOrderId = null; 
    $customerOrderId = null; 
    $status = null; 
    $replacementInfo = null; 
    $returnType = null; 
    $returnCreationStartDate = $returnCreationStartDateString;
    $returnCreationEndDate = $returnCreationEndDateString;
    $returnLastModifiedStartDate = null; 
    $returnLastModifiedEndDate = null; 
    $limit = '200';

    $result = $returnsApi->getReturns($returnOrderId, $customerOrderId, $status, $replacementInfo, $returnType, $returnCreationStartDate, $returnCreationEndDate, $returnLastModifiedStartDate, $returnLastModifiedEndDate, $limit);
    
    how could i resolve this? @jlevers 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant