Class: Privy::Resources::Wallets::Actions
- Inherits:
-
Object
- Object
- Privy::Resources::Wallets::Actions
- Defined in:
- lib/privy/resources/wallets/actions.rb,
sig/privy/resources/wallets/actions.rbs
Overview
Operations related to wallet actions
Instance Method Summary collapse
-
#get(action_id, wallet_id:, include: nil, privy_authorization_signature: nil, request_options: {}) ⇒ Privy::Models::Wallets::SwapActionResponse, ...
Some parameter documentations has been truncated, see Models::Wallets::ActionGetParams for more details.
-
#initialize(client:) ⇒ Actions
constructor
private
A new instance of Actions.
Constructor Details
#initialize(client:) ⇒ Actions
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 Actions.
52 53 54 |
# File 'lib/privy/resources/wallets/actions.rb', line 52 def initialize(client:) @client = client end |
Instance Method Details
#get(action_id, wallet_id:, include: nil, privy_authorization_signature: nil, request_options: {}) ⇒ Privy::Models::Wallets::SwapActionResponse, ...
Some parameter documentations has been truncated, see Models::Wallets::ActionGetParams for more details.
Get the current status of a wallet action by its ID. Use ?include=steps to
include step-level details.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/privy/resources/wallets/actions.rb', line 29 def get(action_id, params) query_params = [:include] parsed, = Privy::Wallets::ActionGetParams.dump_request(params) query = Privy::Internal::Util.encode_query_params(parsed.slice(*query_params)) wallet_id = parsed.delete(:wallet_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["v1/wallets/%1$s/actions/%2$s", wallet_id, action_id], query: query, headers: parsed.except(*query_params).transform_keys( privy_authorization_signature: "privy-authorization-signature" ), model: Privy::Wallets::WalletActionResponse, options: ) end |