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

Responses::RequestValidation wrong format in Request#validations #4

Open
cmw0513 opened this issue Sep 21, 2017 · 0 comments
Open

Responses::RequestValidation wrong format in Request#validations #4

cmw0513 opened this issue Sep 21, 2017 · 0 comments

Comments

@cmw0513
Copy link

cmw0513 commented Sep 21, 2017

We are trying to use DNS dcv for our requests. In order to do this we need to use the request-response validation domains to get the dnsRecord and dnsCnameValue to use for our DNS record.

Using the test-api, I do
response = client.request.get(960000006) as this request has a domain to be validated by DNS.
But the method validations on the response uses each without key and value block parameters, so the RequestValidation objects are built using arrays instead of hashes.

response.validations.first
=> #<Xolphin::Api::Responses::RequestValidation:0x007ff5b970c220
 @data=["request", {"status"=>false, "statusDetail"=>0, "statusMessage"=>"waiting"}]>

and this causes the RequestValidation methods to not work as they expect @data to be a hash

response.validations.first.status
TypeError: no implicit conversion of String into Integer
from .../lib/xolphin/api/responses/request_validation.rb:10:in `[]'

It would be great if these methods would be usable from the request so we could easily get to the request_validation_domains for each of the request_validations to access the DNS values necessary for the records. (I notice they're not included in the getters in Api::Responses::RequestValidationDomain but that is a smaller issue)

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