Class: Nexmo::Pricing
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #get(country) ⇒ Object
-
#initialize(client, type: nil) ⇒ Pricing
constructor
A new instance of Pricing.
- #list ⇒ Object
- #prefix(prefix) ⇒ Object
Constructor Details
#initialize(client, type: nil) ⇒ Pricing
Returns a new instance of Pricing.
5 6 7 8 9 10 11 |
# File 'lib/nexmo/pricing.rb', line 5 def initialize(client, type: nil) raise ArgumentError if type.nil? @type = type super client end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
13 14 15 |
# File 'lib/nexmo/pricing.rb', line 13 def type @type end |
Instance Method Details
#get(country) ⇒ Object
15 16 17 |
# File 'lib/nexmo/pricing.rb', line 15 def get(country) request('/account/get-pricing/outbound/' + @type, params: {country: country}) end |
#list ⇒ Object
19 20 21 |
# File 'lib/nexmo/pricing.rb', line 19 def list request('/account/get-full-pricing/outbound/' + @type) end |
#prefix(prefix) ⇒ Object
23 24 25 |
# File 'lib/nexmo/pricing.rb', line 23 def prefix(prefix) request('/account/get-prefix-pricing/outbound/' + @type, params: {prefix: prefix}) end |