diff --git a/README.md b/README.md index 97e1fe80..03ee8e15 100644 --- a/README.md +++ b/README.md @@ -1393,14 +1393,15 @@ Method naming conventions: ```JS { - address: 'alice@example.com', - did_you_mean: null, - is_valid: false, - parts: { - display_name: null, - domain: null, - local_part: null - } + "address": "foo@mailgun.net", + "is_disposable_address": false, + "is_role_address": false, + "reason": [ + "catch_all", + "unknown_provider" + ], + "result": "catch_all", + "risk": "medium" } ``` @@ -2097,4 +2098,3 @@ git pull Next, run ```npm run release```. After that, `cd ./dist` and then run ```npm login``` and ```npm publish``` to publish changes on npm. - diff --git a/test/validate.test.ts b/test/validate.test.ts index f90217f6..5c3a91a6 100644 --- a/test/validate.test.ts +++ b/test/validate.test.ts @@ -25,10 +25,15 @@ describe('ValidateClient', function () { describe('get', function () { it('validates a single email address', function () { const data: any = { - address: 'Alice ', - did_you_mean: null, - is_valid: false, - parts: { display_name: null, domain: null, local_part: null } + address: 'foo@mailgun.net', + is_disposable_address: false, + is_role_address: false, + reason: [ + 'catch_all', + 'unknown_provider' + ], + result: 'catch_all', + risk: 'medium' }; api.get('/v4/address/validate')