Class: Twilio::REST::Api::V2010::AccountContext::CallContext::PaymentList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Api::V2010::AccountContext::CallContext::PaymentList
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/call/payment.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected]
Instance Method Summary collapse
-
#create(idempotency_key: nil, status_callback: nil, bank_account_type: :unset, charge_amount: :unset, currency: :unset, description: :unset, input: :unset, min_postal_code_length: :unset, parameter: :unset, payment_connector: :unset, payment_method: :unset, postal_code: :unset, security_code: :unset, timeout: :unset, token_type: :unset, valid_card_types: :unset) ⇒ PaymentInstance
Create the PaymentInstance.
-
#initialize(version, account_sid: nil, call_sid: nil) ⇒ PaymentList
constructor
Initialize the PaymentList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, account_sid: nil, call_sid: nil) ⇒ PaymentList
Initialize the PaymentList
29 30 31 32 33 34 35 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/payment.rb', line 29 def initialize(version, account_sid: nil, call_sid: nil) super(version) # Path Solution @solution = {account_sid: account_sid, call_sid: call_sid} @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/Payments.json" end |
Instance Method Details
#create(idempotency_key: nil, status_callback: nil, bank_account_type: :unset, charge_amount: :unset, currency: :unset, description: :unset, input: :unset, min_postal_code_length: :unset, parameter: :unset, payment_connector: :unset, payment_method: :unset, postal_code: :unset, security_code: :unset, timeout: :unset, token_type: :unset, valid_card_types: :unset) ⇒ PaymentInstance
Create the PaymentInstance
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/payment.rb', line 93 def create(idempotency_key: nil, status_callback: nil, bank_account_type: :unset, charge_amount: :unset, currency: :unset, description: :unset, input: :unset, min_postal_code_length: :unset, parameter: :unset, payment_connector: :unset, payment_method: :unset, postal_code: :unset, security_code: :unset, timeout: :unset, token_type: :unset, valid_card_types: :unset) data = Twilio::Values.of({ 'IdempotencyKey' => idempotency_key, 'StatusCallback' => status_callback, 'BankAccountType' => bank_account_type, 'ChargeAmount' => charge_amount, 'Currency' => currency, 'Description' => description, 'Input' => input, 'MinPostalCodeLength' => min_postal_code_length, 'Parameter' => Twilio.serialize_object(parameter), 'PaymentConnector' => payment_connector, 'PaymentMethod' => payment_method, 'PostalCode' => postal_code, 'SecurityCode' => security_code, 'Timeout' => timeout, 'TokenType' => token_type, 'ValidCardTypes' => valid_card_types, }) payload = @version.create('POST', @uri, data: data) PaymentInstance.new( @version, payload, account_sid: @solution[:account_sid], call_sid: @solution[:call_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
125 126 127 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/payment.rb', line 125 def to_s '#<Twilio.Api.V2010.PaymentList>' end |