Class: Privy::Resources::Apps
- Inherits:
-
Object
- Object
- Privy::Resources::Apps
- Defined in:
- lib/privy/resources/apps.rb,
lib/privy/resources/apps/allowlist.rb
Overview
Operations related to app settings and allowlist management
Defined Under Namespace
Classes: Allowlist
Instance Attribute Summary collapse
-
#allowlist ⇒ Privy::Resources::Apps::Allowlist
readonly
Operations related to app settings and allowlist management.
Instance Method Summary collapse
-
#get(app_id, request_options: {}) ⇒ Privy::Models::AppResponse
Get the settings and configuration for an app.
-
#get_gas_spend(end_timestamp:, start_timestamp:, wallet_ids:, request_options: {}) ⇒ Privy::Models::GasSpendResponseBody
Get aggregated Privy gas credits charged for a set of wallets over a time range.
-
#get_test_credentials(app_id, request_options: {}) ⇒ Privy::Models::TestAccountsResponse
Get the test accounts and credentials for an app.
-
#initialize(client:) ⇒ Apps
constructor
private
A new instance of Apps.
Constructor Details
#initialize(client:) ⇒ Apps
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 Apps.
79 80 81 82 |
# File 'lib/privy/resources/apps.rb', line 79 def initialize(client:) @client = client @allowlist = Privy::Resources::Apps::Allowlist.new(client: client) end |
Instance Attribute Details
#allowlist ⇒ Privy::Resources::Apps::Allowlist (readonly)
Operations related to app settings and allowlist management
9 10 11 |
# File 'lib/privy/resources/apps.rb', line 9 def allowlist @allowlist end |
Instance Method Details
#get(app_id, request_options: {}) ⇒ Privy::Models::AppResponse
Get the settings and configuration for an app.
22 23 24 25 26 27 28 29 |
# File 'lib/privy/resources/apps.rb', line 22 def get(app_id, params = {}) @client.request( method: :get, path: ["v1/apps/%1$s", app_id], model: Privy::AppResponse, options: params[:request_options] ) end |
#get_gas_spend(end_timestamp:, start_timestamp:, wallet_ids:, request_options: {}) ⇒ Privy::Models::GasSpendResponseBody
Get aggregated Privy gas credits charged for a set of wallets over a time range. Maximum 100 wallet IDs and 30-day range per request.
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/privy/resources/apps.rb', line 44 def get_gas_spend(params) parsed, = Privy::AppGetGasSpendParams.dump_request(params) query = Privy::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "v1/apps/gas_spend", query: query, model: Privy::GasSpendResponseBody, options: ) end |
#get_test_credentials(app_id, request_options: {}) ⇒ Privy::Models::TestAccountsResponse
Get the test accounts and credentials for an app.
67 68 69 70 71 72 73 74 |
# File 'lib/privy/resources/apps.rb', line 67 def get_test_credentials(app_id, params = {}) @client.request( method: :get, path: ["v1/apps/%1$s/test_credentials", app_id], model: Privy::TestAccountsResponse, options: params[:request_options] ) end |