Class: Telnyx::Resources::Payment
- Inherits:
-
Object
- Object
- Telnyx::Resources::Payment
- Defined in:
- lib/telnyx/resources/payment.rb,
lib/telnyx/resources/payment/auto_recharge_prefs.rb
Overview
Operations for managing stored payment transactions.
Defined Under Namespace
Classes: AutoRechargePrefs
Instance Attribute Summary collapse
-
#auto_recharge_prefs ⇒ Telnyx::Resources::Payment::AutoRechargePrefs
readonly
V2 Auto Recharge Preferences API.
Instance Method Summary collapse
-
#create_stored_payment_transaction(amount:, request_options: {}) ⇒ Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse
Create a stored payment transaction.
-
#initialize(client:) ⇒ Payment
constructor
private
A new instance of Payment.
Constructor Details
#initialize(client:) ⇒ Payment
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Payment.
36 37 38 39 |
# File 'lib/telnyx/resources/payment.rb', line 36 def initialize(client:) @client = client @auto_recharge_prefs = Telnyx::Resources::Payment::AutoRechargePrefs.new(client: client) end |
Instance Attribute Details
#auto_recharge_prefs ⇒ Telnyx::Resources::Payment::AutoRechargePrefs (readonly)
V2 Auto Recharge Preferences API
9 10 11 |
# File 'lib/telnyx/resources/payment.rb', line 9 def auto_recharge_prefs @auto_recharge_prefs end |
Instance Method Details
#create_stored_payment_transaction(amount:, request_options: {}) ⇒ Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse
Create a stored payment transaction
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/telnyx/resources/payment.rb', line 22 def create_stored_payment_transaction(params) parsed, = Telnyx::PaymentCreateStoredPaymentTransactionParams.dump_request(params) @client.request( method: :post, path: "v2/payment/stored_payment_transactions", body: parsed, model: Telnyx::Models::PaymentCreateStoredPaymentTransactionResponse, options: ) end |