Class: MethodRuby::Resources::Accounts::Sensitive
- Inherits:
-
Object
- Object
- MethodRuby::Resources::Accounts::Sensitive
- Defined in:
- lib/method_ruby/resources/accounts/sensitive.rb
Overview
Sensitive data for accounts
Instance Method Summary collapse
-
#create(account_id, expand:, method_version:, idempotency_key: nil, request_options: {}) ⇒ MethodRuby::Models::Accounts::SensitiveCreateResponse
Some parameter documentations has been truncated, see Models::Accounts::SensitiveCreateParams for more details.
-
#initialize(client:) ⇒ Sensitive
constructor
private
A new instance of Sensitive.
-
#list(account_id, method_version:, page: nil, page_cursor: nil, page_limit: nil, request_options: {}) ⇒ MethodRuby::Models::Accounts::SensitiveListResponse
Some parameter documentations has been truncated, see Models::Accounts::SensitiveListParams for more details.
-
#retrieve(astv_id, account_id:, method_version:, request_options: {}) ⇒ MethodRuby::Models::Accounts::SensitiveRetrieveResponse
Some parameter documentations has been truncated, see Models::Accounts::SensitiveRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ Sensitive
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 Sensitive.
116 117 118 |
# File 'lib/method_ruby/resources/accounts/sensitive.rb', line 116 def initialize(client:) @client = client end |
Instance Method Details
#create(account_id, expand:, method_version:, idempotency_key: nil, request_options: {}) ⇒ MethodRuby::Models::Accounts::SensitiveCreateResponse
Some parameter documentations has been truncated, see Models::Accounts::SensitiveCreateParams for more details.
Creates a new sensitive data request for the specified account.
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/method_ruby/resources/accounts/sensitive.rb', line 28 def create(account_id, params) parsed, = MethodRuby::Accounts::SensitiveCreateParams.dump_request(params) header_params = {method_version: "method-version", idempotency_key: "idempotency-key"} @client.request( method: :post, path: ["accounts/%1$s/sensitive", account_id], headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: MethodRuby::Models::Accounts::SensitiveCreateResponse, security: {secret_key: true}, options: ) end |
#list(account_id, method_version:, page: nil, page_cursor: nil, page_limit: nil, request_options: {}) ⇒ MethodRuby::Models::Accounts::SensitiveListResponse
Some parameter documentations has been truncated, see Models::Accounts::SensitiveListParams for more details.
Returns a list of sensitive data records for the specified account.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/method_ruby/resources/accounts/sensitive.rb', line 98 def list(account_id, params) query_params = [:page, :page_cursor, :page_limit] parsed, = MethodRuby::Accounts::SensitiveListParams.dump_request(params) query = MethodRuby::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :get, path: ["accounts/%1$s/sensitive", account_id], query: query, headers: parsed.except(*query_params).transform_keys(method_version: "method-version"), model: MethodRuby::Models::Accounts::SensitiveListResponse, security: {secret_key: true}, options: ) end |
#retrieve(astv_id, account_id:, method_version:, request_options: {}) ⇒ MethodRuby::Models::Accounts::SensitiveRetrieveResponse
Some parameter documentations has been truncated, see Models::Accounts::SensitiveRetrieveParams for more details.
Retrieves an account sensitive record by its unique identifier.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/method_ruby/resources/accounts/sensitive.rb', line 60 def retrieve(astv_id, params) parsed, = MethodRuby::Accounts::SensitiveRetrieveParams.dump_request(params) account_id = parsed.delete(:account_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["accounts/%1$s/sensitive/%2$s", account_id, astv_id], headers: parsed.transform_keys(method_version: "method-version"), model: MethodRuby::Models::Accounts::SensitiveRetrieveResponse, security: {secret_key: true}, options: ) end |