Sha256: 962e942f8dc77ad9defead382417f3a11dbbf3b8320b55b7c464e1e075de8334
Contents?: true
Size: 726 Bytes
Versions: 26
Compression:
Stored size: 726 Bytes
Contents
module TheCity class UserAddressWriter < ApiWriter # Constructor. # # @param data The json object data to save. def initialize(data) if data[:id] @url_action = :put @url_data_path = "/users/#{data[:user_id]}/addresses/#{data[:id]}" else @url_action = :post @url_data_path = "/users/#{data[:user_id]}/addresses" end @url_data_delete_path = "/users/#{data[:user_id]}/addresses/#{data[:id]}" @url_data_params = data @updatable_fields = [:city, :zipcode, :street, :location_type, :state] end end end
Version data entries
26 entries across 26 versions & 1 rubygems