Module: CapitalOneAPI::RewardsResource

Included in:
Client
Defined in:
lib/capitalone-api/resources/rewards_resource.rb

Instance Method Summary collapse

Instance Method Details

#get_rewards_account_details(access_token:, account_id:) ⇒ Object

Parameters:

  • access_token (String)
  • account_id (String)


16
17
18
19
# File 'lib/capitalone-api/resources/rewards_resource.rb', line 16

def (access_token:, account_id:)
   = CGI.escape()
  get_request("#{@server_url}/rewards/accounts/#{account_id}", access_token)
end

#get_rewards_accounts(access_token:) ⇒ Object

Parameters:

  • access_token (String)


10
11
12
# File 'lib/capitalone-api/resources/rewards_resource.rb', line 10

def get_rewards_accounts(access_token:)
  get_request("#{@server_url}/rewards/accounts", access_token)
end

#rewards_authorize_url(params = {}) ⇒ Object

Parameters:

  • params (Hash) (defaults to: {})


5
6
7
# File 'lib/capitalone-api/resources/rewards_resource.rb', line 5

def rewards_authorize_url(params = {})
  "#{base_authorize_url(params)}&scope=openid%20read_rewards_account_info"
end