Class: Plivo::Resources::PricingInterface

Inherits:
Base::ResourceInterface show all
Defined in:
lib/plivo/resources/pricings.rb

Constant Summary

Constants included from Utils

Utils::TYPE_WHITELIST

Instance Method Summary collapse

Methods included from Utils

GetSortedQueryParamString?, compute_signatureV3?, expected_type?, expected_value?, generate_url?, getMapFromQueryString?, raise_invalid_request, valid_account?, valid_mainaccount?, valid_param?, valid_signature?, valid_signatureV3?, 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

Parameters:

  • country_iso (String)


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