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
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
28 29 30 31 32 33 34 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/payment.rb', line 28 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
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/payment.rb', line 54 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
105 106 107 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/payment.rb', line 105 def to_s '#<Twilio.Api.V2010.PaymentList>' end |