Module: Checkdin::WonRewards

Included in:
Client
Defined in:
lib/checkdin/won_rewards.rb

Instance Method Summary collapse

Instance Method Details

#won_reward(id) ⇒ Object

Retrieve information about a won reward

param [Integer] id The ID of the reward



8
9
10
11
# File 'lib/checkdin/won_rewards.rb', line 8

def won_reward(id)
  response = connection.get("won_rewards/#{id}")
  return_error_or_body(response)
end

#won_rewards(options = {}) ⇒ Object

Get a list of all won rewards for the authenticating client.

Parameters:

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

Options Hash (options):

  • Integer (Object)

    :campaign_id - Only return won rewards for this campaign.

  • Integer (Object)

    :user_id - Only return won rewards for this user.

  • Integer (Object)

    :promotion_id - Only return won rewards for this promotion.

  • Integer (Object)

    :limit - The maximum number of records to return.



21
22
23
24
25
26
# File 'lib/checkdin/won_rewards.rb', line 21

def won_rewards(options={})
  response = connection.get do |req|
    req.url "won_rewards", options
  end
  return_error_or_body(response)
end