Class: SBF::Client::RecurringGiftEndpoint

Inherits:
EntityEndpoint show all
Defined in:
lib/stbaldricks/endpoints/recurring_gift.rb

Instance Attribute Summary

Attributes inherited from EntityEndpoint

#orig_target_class

Instance Method Summary collapse

Methods inherited from EntityEndpoint

#aggregate, #create, #delete, #find, #find_first, #get, #initialize, #save, #update

Constructor Details

This class inherits a constructor from SBF::Client::EntityEndpoint

Instance Method Details

#sync(data) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/stbaldricks/endpoints/recurring_gift.rb', line 6

def sync(data)
  response = SBF::Client::Api::Request.post_request("#{base_uri}/sync", data)

  unless ok?(response)
    parsed_response_body = JSON.parse(response.body).symbolize!
    error = SBF::Client::ErrorEntity.new(parsed_response_body)
  end

  SBF::Client::Api::Response.new(http_code: response.code, data: response, error: error)
end