Class: MuffinMan::Finances::V0

Inherits:
SpApiClient show all
Includes:
EnableLogger
Defined in:
lib/muffin_man/finances/v0.rb

Constant Summary

Constants included from EnableLogger

EnableLogger::LOGGING_ENABLED

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 included from EnableLogger

#log_request_and_response

Methods inherited from SpApiClient

#initialize

Constructor Details

This class inherits a constructor from MuffinMan::SpApiClient

Instance Method Details

#list_financial_event_groups(max_results_per_page = nil, financial_event_group_started_before = nil, financial_event_group_started_after = nil, next_token = nil) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/muffin_man/finances/v0.rb', line 8

def list_financial_event_groups(max_results_per_page = nil, financial_event_group_started_before = nil, financial_event_group_started_after = nil, next_token = nil)
  @local_var_path = "/finances/v0/financialEventGroups"
  @query_params = {}
  @query_params["MaxResultsPerPage"] = max_results_per_page unless max_results_per_page.nil?
  unless financial_event_group_started_before.nil?
    @query_params["FinancialEventGroupStartedBefore"] =
      financial_event_group_started_before
  end
  unless financial_event_group_started_after.nil?
    @query_params["FinancialEventGroupStartedAfter"] =
      financial_event_group_started_after
  end
  @query_params["NextToken"] = next_token unless next_token.nil?
  @request_type = "GET"
  call_api
end

#list_financial_events_by_group_id(event_group_id, max_results_per_page = nil, posted_after = nil, posted_before = nil, next_token = nil) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'lib/muffin_man/finances/v0.rb', line 25

def list_financial_events_by_group_id(event_group_id, max_results_per_page = nil, posted_after = nil, posted_before = nil, next_token = nil)
  @local_var_path = "/finances/v0/financialEventGroups/#{event_group_id}/financialEvents"
  @query_params = {}
  @query_params["MaxResultsPerPage"] = max_results_per_page unless max_results_per_page.nil?
  @query_params["PostedAfter"] = posted_after unless posted_after.nil?
  @query_params["PostedBefore"] = posted_before unless posted_before.nil?
  @query_params["NextToken"] = next_token unless next_token.nil?
  @request_type = "GET"
  call_api
end