Class: Telnyx::Resources::Payment::AutoRechargePrefs
- Inherits:
-
Object
- Object
- Telnyx::Resources::Payment::AutoRechargePrefs
- Defined in:
- lib/telnyx/resources/payment/auto_recharge_prefs.rb
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.
61 62 63 |
# File 'lib/telnyx/resources/payment/auto_recharge_prefs.rb', line 61 def initialize(client:) @client = client end |
Instance Method Details
#list(request_options: {}) ⇒ Telnyx::Models::Payment::AutoRechargePrefListResponse
Returns the payment auto recharge preferences.
49 50 51 52 53 54 55 56 |
# File 'lib/telnyx/resources/payment/auto_recharge_prefs.rb', line 49 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.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/telnyx/resources/payment/auto_recharge_prefs.rb', line 29 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 |