Class: TheCity::UserInvitationWriter

Inherits:
ApiWriter
  • Object
show all
Defined in:
lib/writers/user_invitation_writer.rb

Instance Attribute Summary

Attributes inherited from ApiWriter

#error_messages, #response_code

Instance Method Summary collapse

Methods inherited from ApiWriter

#save_object

Constructor Details

#initialize(data) ⇒ UserInvitationWriter

Constructor.

Parameters:

  • data

    The json object data to save.



8
9
10
11
12
# File 'lib/writers/user_invitation_writer.rb', line 8

def initialize(data)
  @url_action = :post   
  @url_data_path = "/users/#{data[:user_id]}/invitations"   
  @url_data_params = data
end

Instance Method Details

#delete_objectObject



15
16
17
# File 'lib/writers/user_invitation_writer.rb', line 15

def delete_object
  raise TheCityExceptions::TheCityResponseError.new('Unable to delete user invitation')
end