Class: Privy::Resources::Wallets::Earn::Ethereum::Incentive
- Inherits:
-
Object
- Object
- Privy::Resources::Wallets::Earn::Ethereum::Incentive
- Defined in:
- lib/privy/resources/wallets/earn/ethereum/incentive.rb
Overview
Operations related to wallet actions
Instance Method Summary collapse
-
#_claim(wallet_id, chain:, privy_authorization_signature: nil, privy_idempotency_key: nil, privy_request_expiry: nil, request_options: {}) ⇒ Privy::Models::EarnIncentiveClaimActionResponse
Some parameter documentations has been truncated, see Models::Wallets::Earn::Ethereum::IncentiveClaimParams for more details.
-
#initialize(client:) ⇒ Incentive
constructor
private
A new instance of Incentive.
Constructor Details
#initialize(client:) ⇒ Incentive
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 Incentive.
53 54 55 |
# File 'lib/privy/resources/wallets/earn/ethereum/incentive.rb', line 53 def initialize(client:) @client = client end |
Instance Method Details
#_claim(wallet_id, chain:, privy_authorization_signature: nil, privy_idempotency_key: nil, privy_request_expiry: nil, request_options: {}) ⇒ Privy::Models::EarnIncentiveClaimActionResponse
Some parameter documentations has been truncated, see Models::Wallets::Earn::Ethereum::IncentiveClaimParams for more details.
Claim incentive rewards for a wallet.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/privy/resources/wallets/earn/ethereum/incentive.rb', line 32 def _claim(wallet_id, params) parsed, = Privy::Wallets::Earn::Ethereum::IncentiveClaimParams.dump_request(params) header_params = { privy_authorization_signature: "privy-authorization-signature", privy_idempotency_key: "privy-idempotency-key", privy_request_expiry: "privy-request-expiry" } @client.request( method: :post, path: ["v1/wallets/%1$s/earn/ethereum/incentive/claim", wallet_id], headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Privy::EarnIncentiveClaimActionResponse, options: ) end |