Class: Twilio::TwiML::Pay

Inherits:
TwiML
  • Object
show all
Defined in:
lib/twilio-ruby/twiml/voice_response.rb

Overview

<Pay> Twiml Verb

Instance Attribute Summary

Attributes inherited from TwiML

#name

Instance Method Summary collapse

Methods inherited from TwiML

#add_child, #add_text, #append, #comment, to_lower_camel_case, #to_s, #xml

Constructor Details

#initialize(**keyword_args) {|_self| ... } ⇒ Pay

Returns a new instance of Pay.

Yields:

  • (_self)

Yield Parameters:



1327
1328
1329
1330
1331
1332
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1327

def initialize(**keyword_args)
  super(**keyword_args)
  @name = 'Pay'

  yield(self) if block_given?
end

Instance Method Details

#parameter(name: nil, value: nil, **keyword_args) ⇒ Object

Create a new <Parameter> element

name

The name of the custom parameter

value

The value of the custom parameter

keyword_args

additional attributes



1354
1355
1356
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1354

def parameter(name: nil, value: nil, **keyword_args)
  append(Parameter.new(name: name, value: value, **keyword_args))
end

#prompt(for_: nil, error_type: nil, card_type: nil, attempt: nil, require_matching_inputs: nil, **keyword_args) {|prompt| ... } ⇒ Object

Create a new <Prompt> element

for_

Name of the payment source data element

error_type

Type of error

card_type

Type of the credit card

attempt

Current attempt count

require_matching_inputs

Require customer to input requested information twice and verify matching.

keyword_args

additional attributes

Yields:



1342
1343
1344
1345
1346
1347
# File 'lib/twilio-ruby/twiml/voice_response.rb', line 1342

def prompt(for_: nil, error_type: nil, card_type: nil, attempt: nil, require_matching_inputs: nil, **keyword_args)
  prompt = Prompt.new(for_: for_, error_type: error_type, card_type: card_type, attempt: attempt, require_matching_inputs: require_matching_inputs, **keyword_args)

  yield(prompt) if block_given?
  append(prompt)
end