Class: Lago::Api::Resources::Customers::Wallets::Alert
- Defined in:
- lib/lago/api/resources/customers/wallets/alert.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #create_batch(customer_id, wallet_code, params) ⇒ Object
- #destroy_all(customer_id, wallet_code) ⇒ Object
Methods inherited from Base
Methods inherited from Nested
#create, #destroy, #get, #get_all, #initialize, #update
Methods inherited from Base
#create, #destroy, #get, #get_all, #initialize, #update, #whitelist_params
Constructor Details
This class inherits a constructor from Lago::Api::Resources::Nested
Instance Method Details
#create_batch(customer_id, wallet_code, params) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/lago/api/resources/customers/wallets/alert.rb', line 9 def create_batch(customer_id, wallet_code, params) response = connection.post( whitelist_create_batch_params(params), api_resource(customer_id, wallet_code), ) JSON.parse(response.to_json, object_class: OpenStruct).alerts end |
#destroy_all(customer_id, wallet_code) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/lago/api/resources/customers/wallets/alert.rb', line 18 def destroy_all(customer_id, wallet_code) connection.destroy( api_resource(customer_id, wallet_code), identifier: nil, ) nil end |