Module: Immoscout::Models::Actions::Publish
- Extended by:
- ActiveSupport::Concern
- Includes:
- Concerns::Modelable
- Included in:
- Publish
- Defined in:
- lib/immoscout/models/actions/publish.rb
Overview
Actions to publish a Real Estate.
Instance Method Summary collapse
Methods included from Concerns::Modelable
from_raw, handle_response, id_from_response, unpack
Instance Method Details
#destroy ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/immoscout/models/actions/publish.rb', line 19 def destroy response = api.delete( "publish/#{real_estate.id}_#{publish_channel.id}" ) handle_response(response) self end |
#save ⇒ Object
13 14 15 16 17 |
# File 'lib/immoscout/models/actions/publish.rb', line 13 def save response = api.post('publish', as_json) handle_response(response) self end |