riboseinc / digicert

Ruby bindings for the Digicert Services API
https://www.digicert.com/services/v2/documentation
MIT License
8 stars 10 forks source link

Digicert::DuplicateCertificateFinder.find_by doesn't work as expected #137

Closed kwkwan closed 6 years ago

kwkwan commented 6 years ago
Digicert::DuplicateCertificateFinder.find_by(request_id: request_id)

Is supposed to return the certificate object. The API request and responses are correct, however nil is returned instead.

[URI] GET https://www.digicert.com/services/v2/order/certificate/123/duplicate
[Headers] {"content-type"=>["application/json"], "x-dc-devkey"=>["XXX"], "host"=>["www.digicert.com"]}
[Response] #<Net::HTTPOK 200 OK readbody=true>
[Response Body] {"certificates":[{"id":}, {...}]}

# => `nil`
ronaldtse commented 6 years ago

@abunashir could you help fix this? Thanks!

abunashir commented 6 years ago

Thanks, @kwkwan for reporting this one, looks like there were some changes on the date_created field and that's why the finder could not find the certificate. Please have a look on the attached PR for more details, thanks!

ronaldtse commented 6 years ago

Thanks @abunashir !