Class: MuffinMan::Tokens::V20210301
- Inherits:
-
SpApiClient
- Object
- SpApiClient
- MuffinMan::Tokens::V20210301
- Defined in:
- lib/muffin_man/tokens/v20210301.rb
Constant Summary
Constants inherited from SpApiClient
SpApiClient::ACCESS_TOKEN_URL, SpApiClient::AWS_REGION_MAP, SpApiClient::SERVICE_NAME, SpApiClient::UNPROCESSABLE_ENTITY_STATUS_CODE
Instance Attribute Summary
Attributes inherited from SpApiClient
#access_token_cache_key, #aws_access_key_id, #aws_secret_access_key, #client_id, #client_secret, #config, #credentials, #local_var_path, #pii_data_elements, #query_params, #refresh_token, #region, #request_body, #request_type, #sandbox, #scope, #sts_iam_role_arn
Instance Method Summary collapse
Methods inherited from SpApiClient
Constructor Details
This class inherits a constructor from MuffinMan::SpApiClient
Instance Method Details
#create_restricted_data_token(path, method, data_elements, target_application: nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/muffin_man/tokens/v20210301.rb', line 4 def create_restricted_data_token(path, method, data_elements, target_application: nil) @local_var_path = "/tokens/2021-03-01/restrictedDataToken" @request_body = {} @request_body["targetApplication"] = target_application unless target_application.nil? restricted_resources = { "method" => method, "path" => path, "dataElements" => data_elements } @request_body["restrictedResources"] = [restricted_resources] @request_type = "POST" call_api end |