Class: MicrosoftGraph::Communications::CallRecords::CallRecordsRequestBuilder
- Inherits:
-
MicrosoftKiotaAbstractions::BaseRequestBuilder
- Object
- MicrosoftKiotaAbstractions::BaseRequestBuilder
- MicrosoftGraph::Communications::CallRecords::CallRecordsRequestBuilder
- Defined in:
- lib/communications/call_records/call_records_request_builder.rb
Overview
Provides operations to manage the callRecords property of the microsoft.graph.cloudCommunications entity.
Defined Under Namespace
Classes: CallRecordsRequestBuilderGetQueryParameters
Instance Method Summary collapse
-
#by_call_record_id(call_record_id) ⇒ Object
Provides operations to manage the callRecords property of the microsoft.graph.cloudCommunications entity.
-
#count ⇒ Object
Provides operations to count the resources in the collection.
-
#get(request_configuration = nil) ⇒ Object
Retrieve the properties and relationships of a callRecord object.
-
#initialize(path_parameters, request_adapter) ⇒ Object
constructor
Instantiates a new CallRecordsRequestBuilder and sets the default values.
-
#microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time(from_date_time, to_date_time) ⇒ Object
Provides operations to call the getDirectRoutingCalls method.
-
#microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time(from_date_time, to_date_time) ⇒ Object
Provides operations to call the getPstnCalls method.
-
#post(body, request_configuration = nil) ⇒ Object
Create new navigation property to callRecords for communications.
-
#to_get_request_information(request_configuration = nil) ⇒ Object
Retrieve the properties and relationships of a callRecord object.
-
#to_post_request_information(body, request_configuration = nil) ⇒ Object
Create new navigation property to callRecords for communications.
Constructor Details
#initialize(path_parameters, request_adapter) ⇒ Object
Instantiates a new CallRecordsRequestBuilder and sets the default values.
43 44 45 |
# File 'lib/communications/call_records/call_records_request_builder.rb', line 43 def initialize(path_parameters, request_adapter) super(path_parameters, request_adapter, "{+baseurl}/communications/callRecords{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}") end |
Instance Method Details
#by_call_record_id(call_record_id) ⇒ Object
Provides operations to manage the callRecords property of the microsoft.graph.cloudCommunications entity.
31 32 33 34 35 36 |
# File 'lib/communications/call_records/call_records_request_builder.rb', line 31 def by_call_record_id(call_record_id) raise StandardError, 'call_record_id cannot be null' if call_record_id.nil? url_tpl_params = @path_parameters.clone url_tpl_params["callRecord%2Did"] = call_record_id return MicrosoftGraph::Communications::CallRecords::Item::CallRecordItemRequestBuilder.new(url_tpl_params, @request_adapter) end |
#count ⇒ Object
Provides operations to count the resources in the collection.
23 24 25 |
# File 'lib/communications/call_records/call_records_request_builder.rb', line 23 def count() return MicrosoftGraph::Communications::CallRecords::Count::CountRequestBuilder.new(@path_parameters, @request_adapter) end |
#get(request_configuration = nil) ⇒ Object
Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions.
51 52 53 54 55 56 57 58 59 |
# File 'lib/communications/call_records/call_records_request_builder.rb', line 51 def get(request_configuration=nil) request_info = self.to_get_request_information( request_configuration ) error_mapping = Hash.new error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsCallRecordCollectionResponse.create_from_discriminator_value(pn) }, error_mapping) end |
#microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time(from_date_time, to_date_time) ⇒ Object
Provides operations to call the getDirectRoutingCalls method.
66 67 68 69 70 |
# File 'lib/communications/call_records/call_records_request_builder.rb', line 66 def microsoft_graph_call_records_get_direct_routing_calls_with_from_date_time_with_to_date_time(from_date_time, to_date_time) raise StandardError, 'from_date_time cannot be null' if from_date_time.nil? raise StandardError, 'to_date_time cannot be null' if to_date_time.nil? return MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder.new(@path_parameters, @request_adapter, fromDateTime, toDateTime) end |
#microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time(from_date_time, to_date_time) ⇒ Object
Provides operations to call the getPstnCalls method.
77 78 79 80 81 |
# File 'lib/communications/call_records/call_records_request_builder.rb', line 77 def microsoft_graph_call_records_get_pstn_calls_with_from_date_time_with_to_date_time(from_date_time, to_date_time) raise StandardError, 'from_date_time cannot be null' if from_date_time.nil? raise StandardError, 'to_date_time cannot be null' if to_date_time.nil? return MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder.new(@path_parameters, @request_adapter, fromDateTime, toDateTime) end |
#post(body, request_configuration = nil) ⇒ Object
Create new navigation property to callRecords for communications
88 89 90 91 92 93 94 95 96 97 |
# File 'lib/communications/call_records/call_records_request_builder.rb', line 88 def post(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = self.to_post_request_information( body, request_configuration ) error_mapping = Hash.new error_mapping["4XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } error_mapping["5XX"] = lambda {|pn| MicrosoftGraph::Models::ODataErrorsODataError.create_from_discriminator_value(pn) } return @request_adapter.send_async(request_info, lambda {|pn| MicrosoftGraph::Models::CallRecordsCallRecord.create_from_discriminator_value(pn) }, error_mapping) end |
#to_get_request_information(request_configuration = nil) ⇒ Object
Retrieve the properties and relationships of a callRecord object. There are two ways to get the id of a callRecord: You can use the $expand query parameter to optionally include session and segment details, as shown in the Get full details example. When you expand session details, the maximum page size is 60 sessions.
103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/communications/call_records/call_records_request_builder.rb', line 103 def to_get_request_information(request_configuration=nil) request_info = MicrosoftKiotaAbstractions::RequestInformation.new() request_info.url_template = @url_template request_info.path_parameters = @path_parameters request_info.http_method = :GET request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) request_info.(request_configuration.) end return request_info end |
#to_post_request_information(body, request_configuration = nil) ⇒ Object
Create new navigation property to callRecords for communications
122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/communications/call_records/call_records_request_builder.rb', line 122 def to_post_request_information(body, request_configuration=nil) raise StandardError, 'body cannot be null' if body.nil? request_info = MicrosoftKiotaAbstractions::RequestInformation.new() request_info.url_template = @url_template request_info.path_parameters = @path_parameters request_info.http_method = :POST request_info.headers.add('Accept', 'application/json') unless request_configuration.nil? request_info.add_headers_from_raw_object(request_configuration.headers) request_info.(request_configuration.) end request_info.set_content_from_parsable(@request_adapter, "application/json", body) return request_info end |