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
GetSortedQueryParamString?, compute_signatureV3?, expected_type?, expected_value?, generate_url?, getMapFromQueryString?, is_one_among_string_url?, multi_valid_param?, raise_invalid_request, valid_account?, valid_date_format?, valid_mainaccount?, valid_multiple_destination_integers?, valid_multiple_destination_nos?, valid_param?, valid_range?, valid_signature?, valid_signatureV3?, valid_subaccount?, valid_url?
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 |