Sha256: 0fe80f3d402b1624c3c2f217d3d8c4fda6fd960a3186df9032d0129954f429cb
Contents?: true
Size: 1.06 KB
Versions: 53
Compression:
Stored size: 1.06 KB
Contents
class Ey::Core::Client class Real def cancel_account(resource_id, requested_by_id) request( :method => :post, :path => "account_cancellations", :params => {"requested_by_id" => requested_by_id, "account_id" => resource_id}, ) end end # Real class Mock def cancel_account(resource_id, requested_by_id) self.data[:accounts][resource_id]['cancelled_at'] = Time.now account_cancellation_id = self.uuid self.data[:accounts][resource_id]['cancellation'] = url_for("/account_cancellations/#{account_cancellation_id}") cancellation = { "id" => account_cancellation_id, "created_at" => Time.now, "kind" => "self", } self.data[:account_cancellations]||= {} self.data[:account_cancellations][account_cancellation_id] = cancellation response( :body => {"cancellation" => cancellation}, :status => 200, :headers => { "Content-Type" => "application/json; charset=utf8" } ) end end # Mock end # Ey::Core::Client
Version data entries
53 entries across 53 versions & 3 rubygems