Class: RingCentralSdk::REST::Request::SMS
- Defined in:
- lib/ringcentral_sdk/rest/request/sms.rb
Constant Summary
Constants inherited from Multipart
Multipart::CONTENT_ID_HEADER, Multipart::DEFAULT_BASE64_ENCODE, Multipart::DEFAULT_CONTENT_ID_DISABLE, Multipart::DEFAULT_ID, Multipart::DEFAULT_METHOD
Instance Attribute Summary
Attributes inherited from Multipart
#account_id, #extension_id, #method, #mime, #mime_part_params
Instance Method Summary collapse
Methods inherited from Multipart
#add_file, #add_files, #add_json, #add_part, #add_text, #body, #content_type, #initialize, #path_params, #set_url
Methods inherited from Base
#body, #content_type, #headers, #method, #params
Constructor Details
This class inherits a constructor from RingCentralSdk::REST::Request::Multipart
Instance Method Details
#add_metadata(data, opts = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/ringcentral_sdk/rest/request/sms.rb', line 5 def (data, opts = {}) if data.is_a? Hash inf = RingCentralSdk::REST::Request::Inflator::ContactInfo.new if data.key? :to data[:to] = inf.inflate_to_array data[:to] end if data.key? :from data[:from] = inf.inflate_to_object data[:from] end end super data, opts end |
#url ⇒ Object
19 20 21 |
# File 'lib/ringcentral_sdk/rest/request/sms.rb', line 19 def url "/restapi/v1.0/account/#{@account_id}/extension/#{@extension_id}/sms" end |