Class: Telnyx::Resources::Payment::AutoRechargePrefs
- Inherits:
-
Object
- Object
- Telnyx::Resources::Payment::AutoRechargePrefs
- Defined in:
- lib/telnyx/resources/payment/auto_recharge_prefs.rb
Overview
V2 Auto Recharge Preferences API
Instance Method Summary collapse
-
#initialize(client:) ⇒ AutoRechargePrefs
constructor
private
A new instance of AutoRechargePrefs.
-
#list(request_options: {}) ⇒ Telnyx::Models::Payment::AutoRechargePrefListResponse
Returns the payment auto recharge preferences.
-
#update(enabled: nil, invoice_enabled: nil, preference: nil, recharge_amount: nil, threshold_amount: nil, request_options: {}) ⇒ Telnyx::Models::Payment::AutoRechargePrefUpdateResponse
Some parameter documentations has been truncated, see Models::Payment::AutoRechargePrefUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ AutoRechargePrefs
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 AutoRechargePrefs.
62 63 64 |
# File 'lib/telnyx/resources/payment/auto_recharge_prefs.rb', line 62 def initialize(client:) @client = client end |
Instance Method Details
#list(request_options: {}) ⇒ Telnyx::Models::Payment::AutoRechargePrefListResponse
Returns the payment auto recharge preferences.
50 51 52 53 54 55 56 57 |
# File 'lib/telnyx/resources/payment/auto_recharge_prefs.rb', line 50 def list(params = {}) @client.request( method: :get, path: "payment/auto_recharge_prefs", model: Telnyx::Models::Payment::AutoRechargePrefListResponse, options: params[:request_options] ) end |
#update(enabled: nil, invoice_enabled: nil, preference: nil, recharge_amount: nil, threshold_amount: nil, request_options: {}) ⇒ Telnyx::Models::Payment::AutoRechargePrefUpdateResponse
Some parameter documentations has been truncated, see Models::Payment::AutoRechargePrefUpdateParams for more details.
Update payment auto recharge preferences.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/telnyx/resources/payment/auto_recharge_prefs.rb', line 30 def update(params = {}) parsed, = Telnyx::Payment::AutoRechargePrefUpdateParams.dump_request(params) @client.request( method: :patch, path: "payment/auto_recharge_prefs", body: parsed, model: Telnyx::Models::Payment::AutoRechargePrefUpdateResponse, options: ) end |