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
#api, from_raw, #handle_response, handle_response, #id_from_response, id_from_response, unpack
Instance Method Details
#destroy ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/immoscout/models/actions/publish.rb', line 22 def destroy response = api.delete( "publish/#{real_estate.id}_#{publish_channel.id}" ) handle_response(response) self end |
#save ⇒ Object
16 17 18 19 20 |
# File 'lib/immoscout/models/actions/publish.rb', line 16 def save response = api.post('publish', as_json) handle_response(response) self end |