Skip to content

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

@cmw0513

Description

@cmw0513

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions