DigitalOceanPHP / Client

DigitalOcean API v2 client for PHP
MIT License
709 stars 205 forks source link

DomainRecord create method missing optional name attribute for NS records #265

Closed LewisSmallwood closed 3 years ago

LewisSmallwood commented 3 years ago

Hi there,

The content for the create() method of DomainRecord is missing the "name" attribute for records of type "NS".

Although not explicitly stated in the documentation provided by DO for this method, the API does accept the name attribute as optional.

It would be great to modify the API to allow this as an optional record, defaulting back to @ if not provided.

LewisSmallwood commented 3 years ago

Upon further investigation, and contrary to the documentation from DO, the name attribute is required.

Without it this error is thrown:

image

I have updated the PR accordingly.

GrahamCampbell commented 3 years ago

Thanks!