billputer / go-namecheap

A Go library for using the Namecheap API
MIT License
49 stars 28 forks source link

DomainCheckResult for premium domains #8

Closed phpfs closed 6 years ago

phpfs commented 6 years ago

As described by Namecheap, a domain check may return special pricing for premium domains. https://www.namecheap.com/support/api/methods/domains/check.aspx

To implement this, we could add DomainCheckResult.IsPremiumName,.PremiumRegistrationPrice,.PremiumRenewalPrice,.PremiumRestorePrice,. PremiumTransferPrice,.IcannFee as returned by the API. (They are all just null for normal domains!)

type DomainCheckResult struct {
    Domain string
    Available bool
    IsPremiumName bool
    PremiumRegistrationPrice float32
    PremiumRenewalPrice float32
    PremiumRestorePrice float32
    PremiumTransferPrice float32
    IcannFee float32
}

I will take a look at implementing this when I have time :)

@billputer Thank you for go-namecheap!

phpfs commented 6 years ago

Solved with PR #9