ovh/python-ovh

Queries on /domain/{Zone}/serviceInfos

kogelc opened this issue · 2 comments

Hello,

In my attempt to manage my domains with the Ovh API, I have found some problems.

When I use the Python Wrapper, the information that I receive for the expiration date are wrong.
Can you explain me why the expiration date is one day before the creation date ?

Python Wrapper

{
    "renewalType": "oneShot",
    "contactAdmin": "xxxxx",
    "expiration": "2014-04-08",
    "status": "ok",
    "contactBilling": "xxxxx",
    "engagedUpTo": null,
    "possibleRenewPeriod": [],
    "canDeleteAtExpiration": false,
    "contactTech": "xxxxx",
    "creation": "2014-04-09",
    "serviceId": 61023049,
    "renew": {
        "forced": true,
        "automatic": false,
        "manualPayment": false,
        "period": null,
        "deleteAtExpiration": false
    },
    "domain": "votre-mariage-ideal.com"
}

And I don't have this problem with the same code in PHP.

PHP Wrapper

(
    [renewalType] => automaticV2012
    [status] => ok
    [engagedUpTo] =>
    [possibleRenewPeriod] => Array
        (
            [0] => 12
            [1] => 24
            [2] => 36
            [3] => 48
            [4] => 60
            [5] => 72
            [6] => 84
        )

    [serviceId] => 61023050
    [contactBilling] => xxxxx
    [renew] => Array
        (
            [manualPayment] =>
            [period] => 12
            [forced] =>
            [automatic] => 1
            [deleteAtExpiration] =>
        )

    [domain] => votre-mariage-ideal.com
    [contactTech] => xxxxx
    [expiration] => 2018-04-08
    [contactAdmin] => xxxxx
    [creation] => 2014-04-09
    [canDeleteAtExpiration] =>
)

Thanks for your help
Best Regards

Hello @kogelc,
You are targeting two differents services with Python and PHP wrapper.
In your python script you have "serviceId": 61023049 whereas in PHP script you have [serviceId] => 61023050
You are probably targeting /domain/zone/{zoneName}/serviceInfos with your Python wrapper and /domain/{serviceName}/serviceInfos with PHP.

Concerning expiration lower than creation as your service never expires ("deleteAtExpiration": false) it does not matter.

Closing as issue is not related to python-ovh.
If you have troubles with API, please contact api@ml.ovh.net