Class: FellowshipOne::ContributionReader

Inherits:
ApiReader
  • Object
show all
Defined in:
lib/readers/contribution_reader.rb

Instance Attribute Summary

Attributes inherited from ApiReader

#headers

Instance Method Summary collapse

Methods inherited from ApiReader

#load_feed, #load_new

Constructor Details

#initialize(contribution_id = nil) ⇒ ContributionReader

Constructor.

Parameters:

  • contribution_id (optional) (defaults to: nil)

    The ID of the contribution to load.



8
9
10
11
12
13
14
# File 'lib/readers/contribution_reader.rb', line 8

def initialize(contribution_id = nil)
  if contribution_id.nil?
    @url_new_data_path = '/giving/v1/contributionreceipts/new'
  else
    @url_data_path = "/giving/v1/contributionreceipts/#{contribution_id}"
  end      
end