Class: Twilio::REST::Api::V2010::AccountContext::CallList::FeedbackSummaryList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, account_sid: nil) ⇒ FeedbackSummaryList

Initialize the FeedbackSummaryList

Parameters:

  • version (Version)

    Version that contains the resource

  • account_sid (String) (defaults to: nil)

    The SID of the Account that created this Call resource.


23
24
25
26
27
28
29
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb', line 23

def initialize(version, account_sid: nil)
  super(version)

  # Path Solution
  @solution = {account_sid: }
  @uri = "/Accounts/#{@solution[:account_sid]}/Calls/FeedbackSummary.json"
end

Instance Method Details

#create(start_date: nil, end_date: nil, include_subaccounts: :unset, status_callback: :unset, status_callback_method: :unset) ⇒ FeedbackSummaryInstance

Create the FeedbackSummaryInstance

Parameters:

  • start_date (Date) (defaults to: nil)

    Only include feedback given on or after this date. Format is `YYYY-MM-DD` and specified in UTC.

  • end_date (Date) (defaults to: nil)

    Only include feedback given on or before this date. Format is `YYYY-MM-DD` and specified in UTC.

  • include_subaccounts (Boolean) (defaults to: :unset)

    Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account.

  • status_callback (String) (defaults to: :unset)

    The URL that we will request when the feedback summary is complete.

  • status_callback_method (String) (defaults to: :unset)

    The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL.

Returns:


45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb', line 45

def create(start_date: nil, end_date: nil, include_subaccounts: :unset, status_callback: :unset, status_callback_method: :unset)
  data = Twilio::Values.of({
      'StartDate' => Twilio.serialize_iso8601_date(start_date),
      'EndDate' => Twilio.serialize_iso8601_date(end_date),
      'IncludeSubaccounts' => include_subaccounts,
      'StatusCallback' => status_callback,
      'StatusCallbackMethod' => status_callback_method,
  })

  payload = @version.create('POST', @uri, data: data)

  FeedbackSummaryInstance.new(@version, payload, account_sid: @solution[:account_sid], )
end

#to_sObject

Provide a user friendly representation


61
62
63
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb', line 61

def to_s
  '#<Twilio.Api.V2010.FeedbackSummaryList>'
end