Class: Plivo::Resources::PricingInterface
- Inherits:
-
Base::ResourceInterface
- Object
- Base::ResourceInterface
- Plivo::Resources::PricingInterface
- Defined in:
- lib/plivo/resources/pricings.rb
Constant Summary
Constants included from Utils
Instance Method Summary collapse
- #get(country_iso) ⇒ Object
-
#initialize(client, resource_list_json = nil) ⇒ PricingInterface
constructor
A new instance of PricingInterface.
Methods included from Utils
expected_type?, expected_value?, raise_invalid_request, valid_account?, valid_mainaccount?, valid_param?, valid_signature?, valid_subaccount?
Constructor Details
#initialize(client, resource_list_json = nil) ⇒ PricingInterface
Returns a new instance of PricingInterface.
25 26 27 28 29 30 |
# File 'lib/plivo/resources/pricings.rb', line 25 def initialize(client, resource_list_json = nil) @_name = 'Pricing' @_resource_type = Pricing @_identifier_string = 'country_iso' super end |
Instance Method Details
#get(country_iso) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/plivo/resources/pricings.rb', line 33 def get(country_iso) valid_param?(:country_iso, country_iso, [String, Symbol], true) unless country_iso.length == 2 raise_invalid_request('country_iso should be of length 2') end params = { country_iso: country_iso } perform_get_without_identifier(params) end |