Class: SevenApi::Resources::Subaccounts
- Inherits:
-
SevenApi::Resource
- Object
- SevenApi::Resource
- SevenApi::Resources::Subaccounts
- Defined in:
- lib/seven_api/resources/subaccounts.rb
Constant Summary
Constants inherited from SevenApi::Resource
Instance Attribute Summary
Attributes inherited from SevenApi::Resource
#api_key, #builder, #conn, #endpoint, #http_methods, #request_methods, #sent_with
Instance Method Summary collapse
-
#create(params) ⇒ Hash
Create a subaccount read more: docs.seven.io/en/rest-api/endpoints/subaccounts#create-subaccount.
-
#delete(params) ⇒ Hash
Delete a subaccount read more: docs.seven.io/en/rest-api/endpoints/subaccounts#delete-a-subaccount.
-
#read(params = {}) ⇒ Hash
Retrieve all subaccounts read more: docs.seven.io/en/rest-api/endpoints/subaccounts#list-subaccounts.
-
#transfer_credits(params) ⇒ Hash
Transfer credits to a subaccount read more: docs.seven.io/en/rest-api/endpoints/subaccounts#manual-credit-transfer.
-
#update(params) ⇒ Hash
Update automatic charging of a subaccount read more: docs.seven.io/en/rest-api/endpoints/subaccounts#automatic-credit-transfer.
Methods inherited from SevenApi::Resource
get_endpoint, get_http_methods, #initialize
Constructor Details
This class inherits a constructor from SevenApi::Resource
Instance Method Details
#create(params) ⇒ Hash
Create a subaccount read more: docs.seven.io/en/rest-api/endpoints/subaccounts#create-subaccount
22 23 24 25 26 |
# File 'lib/seven_api/resources/subaccounts.rb', line 22 def create(params) SevenApi::Subaccounts::Validator::create(params) request(params.merge({ :action => SevenApi::Subaccounts::Action::CREATE })) end |
#delete(params) ⇒ Hash
Delete a subaccount read more: docs.seven.io/en/rest-api/endpoints/subaccounts#delete-a-subaccount
32 33 34 35 36 |
# File 'lib/seven_api/resources/subaccounts.rb', line 32 def delete(params) SevenApi::Subaccounts::Validator::delete(params) request(params.merge({ :action => SevenApi::Subaccounts::Action::DELETE })) end |
#read(params = {}) ⇒ Hash
Retrieve all subaccounts read more: docs.seven.io/en/rest-api/endpoints/subaccounts#list-subaccounts
42 43 44 |
# File 'lib/seven_api/resources/subaccounts.rb', line 42 def read(params = {}) request({}, params.merge({ :action => SevenApi::Subaccounts::Action::READ })) end |
#transfer_credits(params) ⇒ Hash
Transfer credits to a subaccount read more: docs.seven.io/en/rest-api/endpoints/subaccounts#manual-credit-transfer
50 51 52 53 54 |
# File 'lib/seven_api/resources/subaccounts.rb', line 50 def transfer_credits(params) SevenApi::Subaccounts::Validator::transfer_credits(params) request(params.merge({ :action => SevenApi::Subaccounts::Action::TRANSFER_CREDITS })) end |
#update(params) ⇒ Hash
Update automatic charging of a subaccount read more: docs.seven.io/en/rest-api/endpoints/subaccounts#automatic-credit-transfer
60 61 62 63 64 |
# File 'lib/seven_api/resources/subaccounts.rb', line 60 def update(params) SevenApi::Subaccounts::Validator::update(params) request(params.merge({ :action => SevenApi::Subaccounts::Action::UPDATE })) end |