Class: TheCity::DonationExport
- Defined in:
- lib/api/donation_export.rb
Instance Attribute Summary
Attributes inherited from ApiObject
#error_messages, #marked_for_destruction
Class Method Summary collapse
-
.load_by_id(donation_export_id, options = {}) ⇒ Object
Loads the donation export by the specified ID.
Instance Method Summary collapse
-
#initialize(json_data = nil) ⇒ DonationExport
constructor
Constructor.
Methods inherited from ApiObject
__tc_attributes, #delete, #initialize_from_json_object, #is_deleted?, #save, #set_attributes, tc_attr_accessor, #to_attributes
Constructor Details
#initialize(json_data = nil) ⇒ DonationExport
Constructor.
29 30 31 32 |
# File 'lib/api/donation_export.rb', line 29 def initialize(json_data = nil) @writer_object = DonationExportWriter initialize_from_json_object(json_data) unless json_data.nil? end |
Class Method Details
.load_by_id(donation_export_id, options = {}) ⇒ Object
Loads the donation export by the specified ID.
Returns a new TheCity::DonationExport object.
18 19 20 21 22 23 |
# File 'lib/api/donation_export.rb', line 18 def self.load_by_id(donation_export_id, = {}) donation_reader = DonationExportReader.new(donation_export_id, ) self.new(donation_reader.load_feed) rescue nil end |