Sha256: d914886a4457531b9f666adb30fa6e213cf0163c366c850d170dbbc19a62f6cc

Contents?: true

Size: 633 Bytes

Versions: 37

Compression:

Stored size: 633 Bytes

Contents

class Zendesk2::Client
  class Real
    def get_organization(params={})
      id = params["id"]

      request(
        :method => :get,
        :path   => "/organizations/#{id}.json"
      )
    end
  end # Real

  class Mock
    def get_organization(params={})
      id   = params["id"]
      if body = self.data[:organizations][id]

        response(
          :path  => "/organizations/#{id}.json",
          :body  => {
            "organization" => body
          },
        )
      else 
        response(
          :path   => "/organizations/#{id}.json",
          :status => 404
        )
      end
    end
  end # Mock
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
zendesk2-0.4.4 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.4.3 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.4.2 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.4.1 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.4.0 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.3.2 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.3.1 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.3.0 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.2.7 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.2.6 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.2.5 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.2.4 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.2.3 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.2.2 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.2.1 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.2.0 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.1.3 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.1.2 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.1.1 lib/zendesk2/client/requests/get_organization.rb
zendesk2-0.1.0 lib/zendesk2/client/requests/get_organization.rb