Class: Twilio::REST::PreviewMessaging::V1::BroadcastInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ BroadcastInstance

Initialize the BroadcastInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this Broadcast resource.

  • sid (String)

    The SID of the Call resource to fetch.



97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb', line 97

def initialize(version, payload )
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'broadcast_sid' => payload['broadcast_sid'],
        'created_date' => Twilio.deserialize_iso8601_datetime(payload['created_date']),
        'updated_date' => Twilio.deserialize_iso8601_datetime(payload['updated_date']),
        'broadcast_status' => payload['broadcast_status'],
        'execution_details' => payload['execution_details'],
        'results_file' => payload['results_file'],
    }
end

Instance Method Details

#broadcast_sidString

Returns Numeric ID indentifying individual Broadcast requests.

Returns:

  • (String)

    Numeric ID indentifying individual Broadcast requests



114
115
116
# File 'lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb', line 114

def broadcast_sid
    @properties['broadcast_sid']
end

#broadcast_statusString

Returns Status of the Broadcast request. Valid values are None, Pending-Upload, Uploaded, Queued, Executing, Execution-Failure, Execution-Completed, Cancelation-Requested, and Canceled.

Returns:

  • (String)

    Status of the Broadcast request. Valid values are None, Pending-Upload, Uploaded, Queued, Executing, Execution-Failure, Execution-Completed, Cancelation-Requested, and Canceled



132
133
134
# File 'lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb', line 132

def broadcast_status
    @properties['broadcast_status']
end

#created_dateTime

Returns Timestamp of when the Broadcast was created.

Returns:

  • (Time)

    Timestamp of when the Broadcast was created



120
121
122
# File 'lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb', line 120

def created_date
    @properties['created_date']
end

#execution_detailsMessagingV1BroadcastExecutionDetails

Returns:

  • (MessagingV1BroadcastExecutionDetails)


138
139
140
# File 'lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb', line 138

def execution_details
    @properties['execution_details']
end

#inspectObject

Provide a detailed, user friendly representation



156
157
158
# File 'lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb', line 156

def inspect
    "<Twilio.PreviewMessaging.V1.BroadcastInstance>"
end

#results_fileString

Returns Path to a file detailing successful requests and errors from Broadcast execution.

Returns:

  • (String)

    Path to a file detailing successful requests and errors from Broadcast execution



144
145
146
# File 'lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb', line 144

def results_file
    @properties['results_file']
end

#to_sObject

Provide a user friendly representation



150
151
152
# File 'lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb', line 150

def to_s
    "<Twilio.PreviewMessaging.V1.BroadcastInstance>"
end

#updated_dateTime

Returns Timestamp of when the Broadcast was last updated.

Returns:

  • (Time)

    Timestamp of when the Broadcast was last updated



126
127
128
# File 'lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb', line 126

def updated_date
    @properties['updated_date']
end