Class: MethodRuby::Resources::ManagedAccounts
- Inherits:
-
Object
- Object
- MethodRuby::Resources::ManagedAccounts
- Defined in:
- lib/method_ruby/resources/managed_accounts.rb,
lib/method_ruby/resources/managed_accounts/transactions.rb
Overview
Method-managed accounts
Defined Under Namespace
Classes: Transactions
Instance Attribute Summary collapse
-
#transactions ⇒ MethodRuby::Resources::ManagedAccounts::Transactions
readonly
Method-managed accounts.
Instance Method Summary collapse
-
#initialize(client:) ⇒ ManagedAccounts
constructor
private
A new instance of ManagedAccounts.
-
#list(method_version:, request_options: {}) ⇒ MethodRuby::Models::ManagedAccountListResponse
Some parameter documentations has been truncated, see Models::ManagedAccountListParams for more details.
-
#retrieve(macc_id, method_version:, request_options: {}) ⇒ MethodRuby::Models::ManagedAccountRetrieveResponse
Some parameter documentations has been truncated, see Models::ManagedAccountRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ ManagedAccounts
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 ManagedAccounts.
68 69 70 71 |
# File 'lib/method_ruby/resources/managed_accounts.rb', line 68 def initialize(client:) @client = client @transactions = MethodRuby::Resources::ManagedAccounts::Transactions.new(client: client) end |
Instance Attribute Details
#transactions ⇒ MethodRuby::Resources::ManagedAccounts::Transactions (readonly)
Method-managed accounts
9 10 11 |
# File 'lib/method_ruby/resources/managed_accounts.rb', line 9 def transactions @transactions end |
Instance Method Details
#list(method_version:, request_options: {}) ⇒ MethodRuby::Models::ManagedAccountListResponse
Some parameter documentations has been truncated, see Models::ManagedAccountListParams for more details.
Returns all managed accounts for the team.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/method_ruby/resources/managed_accounts.rb', line 53 def list(params) parsed, = MethodRuby::ManagedAccountListParams.dump_request(params) @client.request( method: :get, path: "managed_accounts", headers: parsed.transform_keys(method_version: "method-version"), model: MethodRuby::Models::ManagedAccountListResponse, security: {secret_key: true}, options: ) end |
#retrieve(macc_id, method_version:, request_options: {}) ⇒ MethodRuby::Models::ManagedAccountRetrieveResponse
Some parameter documentations has been truncated, see Models::ManagedAccountRetrieveParams for more details.
Returns a single managed account by its identifier.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/method_ruby/resources/managed_accounts.rb', line 27 def retrieve(macc_id, params) parsed, = MethodRuby::ManagedAccountRetrieveParams.dump_request(params) @client.request( method: :get, path: ["managed_accounts/%1$s", macc_id], headers: parsed.transform_keys(method_version: "method-version"), model: MethodRuby::Models::ManagedAccountRetrieveResponse, security: {secret_key: true}, options: ) end |