ovh / python-ovh

Thin wrapper around OVH's APIs. Handles all the hard work including credential creation and requests signing.
https://pypi.org/project/ovh/
Other
297 stars 81 forks source link

Queries on /domain/{Zone}/serviceInfos #51

Closed kogelc closed 6 years ago

kogelc commented 7 years ago

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

trnsnt commented 7 years ago

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.

rbeuque74 commented 6 years ago

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