Class: Twilio::REST::Numbers::V2::BundleCloneInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Numbers::V2::BundleCloneInstance
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Bundle resource.
-
#bundle_sid ⇒ String
The unique string that we created to identify the Bundle resource.
-
#context ⇒ BundleCloneContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create(target_account_sid: nil, move_to_draft: :unset, friendly_name: :unset) ⇒ BundleCloneInstance
Create the BundleCloneInstance.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#email ⇒ String
The email address that will receive updates when the Bundle resource changes status.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, bundle_sid: nil) ⇒ BundleCloneInstance
constructor
Initialize the BundleCloneInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#regulation_sid ⇒ String
The unique string of a regulation that is associated to the Bundle resource.
- #status ⇒ Status
-
#status_callback ⇒ String
The URL we call to inform your application of status changes.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
-
#valid_until ⇒ Time
The date and time in GMT in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format when the resource will be valid until.
Constructor Details
#initialize(version, payload, bundle_sid: nil) ⇒ BundleCloneInstance
Initialize the BundleCloneInstance
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 144 def initialize(version, payload , bundle_sid: nil) super(version) # Marshaled Properties @properties = { 'bundle_sid' => payload['bundle_sid'], 'account_sid' => payload['account_sid'], 'regulation_sid' => payload['regulation_sid'], 'friendly_name' => payload['friendly_name'], 'status' => payload['status'], 'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']), 'email' => payload['email'], 'status_callback' => payload['status_callback'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], } # Context @instance_context = nil @params = { 'bundle_sid' => bundle_sid || @properties['bundle_sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Bundle resource.
186 187 188 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 186 def account_sid @properties['account_sid'] end |
#bundle_sid ⇒ String
Returns The unique string that we created to identify the Bundle resource.
180 181 182 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 180 def bundle_sid @properties['bundle_sid'] end |
#context ⇒ BundleCloneContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
171 172 173 174 175 176 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 171 def context unless @instance_context @instance_context = BundleCloneContext.new(@version , @params['bundle_sid']) end @instance_context end |
#create(target_account_sid: nil, move_to_draft: :unset, friendly_name: :unset) ⇒ BundleCloneInstance
Create the BundleCloneInstance
250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 250 def create( target_account_sid: nil, move_to_draft: :unset, friendly_name: :unset ) context.create( target_account_sid: target_account_sid, move_to_draft: move_to_draft, friendly_name: friendly_name, ) end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
228 229 230 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 228 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
234 235 236 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 234 def date_updated @properties['date_updated'] end |
#email ⇒ String
Returns The email address that will receive updates when the Bundle resource changes status.
216 217 218 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 216 def email @properties['email'] end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
198 199 200 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 198 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
272 273 274 275 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 272 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V2.BundleCloneInstance #{values}>" end |
#regulation_sid ⇒ String
Returns The unique string of a regulation that is associated to the Bundle resource.
192 193 194 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 192 def regulation_sid @properties['regulation_sid'] end |
#status ⇒ Status
204 205 206 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 204 def status @properties['status'] end |
#status_callback ⇒ String
Returns The URL we call to inform your application of status changes.
222 223 224 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 222 def status_callback @properties['status_callback'] end |
#to_s ⇒ Object
Provide a user friendly representation
265 266 267 268 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 265 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V2.BundleCloneInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
240 241 242 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 240 def url @properties['url'] end |
#valid_until ⇒ Time
Returns The date and time in GMT in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format when the resource will be valid until.
210 211 212 |
# File 'lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb', line 210 def valid_until @properties['valid_until'] end |