Class: Twilio::REST::Insights::V2::InboundReportList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/insights/v2/inbound_report.rb

Defined Under Namespace

Classes: InsightsV2CreatePhoneNumbersReportRequest, InsightsV2CreatePhoneNumbersReportRequestTimeRange, PhoneNumberReportFilter, ReportFilter

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ InboundReportList

Initialize the InboundReportList

Parameters:

  • version (Version) —

    Version that contains the resource



94
95
96
97
98
99
100
101
# File 'lib/twilio-ruby/rest/insights/v2/inbound_report.rb', line 94

def initialize(version)
    super(version)
    
    # Path Solution
    @solution = {  }
    @uri = "/Voice/Reports/PhoneNumbers/Inbound"
    
end

Instance Method Details

#create(insights_v2_create_phone_numbers_report_request: :unset) ⇒ InboundReportInstance

Create the InboundReportInstance

Parameters:

Returns:



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/twilio-ruby/rest/insights/v2/inbound_report.rb', line 106

def create(insights_v2_create_phone_numbers_report_request: :unset
)

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    headers['Content-Type'] = 'application/json'
    
    
    
    
    payload = @version.create('POST', @uri, headers: headers, data: insights_v2_create_phone_numbers_report_request.to_json)
    InboundReportInstance.new(
        @version,
        payload,
    )
end

#create_with_metadata(insights_v2_create_phone_numbers_report_request: :unset) ⇒ InboundReportInstance

Create the InboundReportInstanceMetadata

Parameters:

Returns:



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/twilio-ruby/rest/insights/v2/inbound_report.rb', line 126

def (insights_v2_create_phone_numbers_report_request: :unset
)

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    headers['Content-Type'] = 'application/json'
    
    
    
    
    response = @version.('POST', @uri, headers: headers, data: insights_v2_create_phone_numbers_report_request.to_json)
    inbound_report_instance = InboundReportInstance.new(
        @version,
        response.body,
    )
    .new(
        @version,
        inbound_report_instance,
        response.headers,
        response.status_code
    )
end

#to_s ⇒ Object

Provide a user friendly representation



152
153
154
# File 'lib/twilio-ruby/rest/insights/v2/inbound_report.rb', line 152

def to_s
    '#<Twilio.Insights.V2.InboundReportList>'
end