Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

price:country fails #217

Open
sammachin opened this issue Mar 17, 2020 · 2 comments
Open

price:country fails #217

sammachin opened this issue Mar 17, 2020 · 2 comments
Assignees
Labels

Comments

@sammachin
Copy link
Contributor

Steps to reproduce

nexmo price:country US

Expected behavior

Returns a Price for SMS to the US

Actual behavior

Got a 404

It seems somewhere in history the pricing API was updated to support multiple types, sms sms-transit and voice, although nexmo-node seems to have been updated this command in the CLI hasn't. Its still a useful command as price:sms and price:voice require a phone number this allows searching by ISO country code eg US, GB etc.

Nexmo CLI v0.3.14

@AlexLakatos AlexLakatos self-assigned this Mar 17, 2020
@AlexLakatos
Copy link
Contributor

Thanks for filing this, I'll look into it.

@efiShtain
Copy link

efiShtain commented Oct 20, 2020

@AlexLakatos
Appears that there is a missing parameter in request.js line 41, the call to getPricing from nexmo

  priceCountry(country_code) {
    this.client.instance().number.getPricing(country_code, this.response.priceCountry.bind(this.response));
  }

the call is passing 2 parameters where as

 get(type, country, callback) {
    return this.options.rest.get(
      Pricing.PATH.replace("{endpoint}", "get-pricing").replace("{type}", type),
      { country },
      callback
    );
  }

in the nexmo-code repo is expecting 3 parameters (type is missing)
If you can elaborate that I'll open a pull request and fix it (type should be sms I guess)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants