Sha256: 77ac94f050e9e1ccc121dac689f0ad9a00fe5e44826fe49f732d9227df8d017e

Contents?: true

Size: 652 Bytes

Versions: 26

Compression:

Stored size: 652 Bytes

Contents

class Ey::Core::Client
  class Real
    def get_account_trial(params={})
      url = params["url"]
      request(
        :url => url,
      )
    end
  end # Real

  class Mock
    def get_account_trial(params={})
      account_id = resource_identity(params)

      find(:accounts, account_id)

      resource = {
        "id"         => Cistern::Mock.random_numbers(4),
        "duration"   => 500,
        "used"       => 30,
        "created_at" => Time.now.to_s,
        "account"    => url_for("/accounts/#{account_id}")
      }

      response(
        :body   => {"account_trial" => resource},
        :status => 200,
      )
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
ey-core-3.1.4 lib/ey-core/requests/get_account_trial.rb
ey-core-3.1.3 lib/ey-core/requests/get_account_trial.rb
ey-core-3.1.2 lib/ey-core/requests/get_account_trial.rb
ey-core-3.1.1 lib/ey-core/requests/get_account_trial.rb
ey-core-3.1.0 lib/ey-core/requests/get_account_trial.rb
ey-core-3.0.5 lib/ey-core/requests/get_account_trial.rb
ey-core-3.0.4 lib/ey-core/requests/get_account_trial.rb
ey-core-3.0.3 lib/ey-core/requests/get_account_trial.rb
ey-core-3.0.2 lib/ey-core/requests/get_account_trial.rb
ey-core-3.0.1 lib/ey-core/requests/get_account_trial.rb
ey-core-3.0.0 lib/ey-core/requests/get_account_trial.rb
ey-pro-cli-0.0.17 lib/vendor/core/ey-core/requests/get_account_trial.rb
ey-pro-cli-0.0.16 lib/vendor/core/ey-core/requests/get_account_trial.rb
ey-pro-cli-0.0.15 lib/vendor/core/ey-core/requests/get_account_trial.rb
ey-pro-cli-0.0.14 lib/vendor/core/ey-core/requests/get_account_trial.rb
ey-pro-cli-0.0.13 lib/vendor/core/ey-core/requests/get_account_trial.rb
ey-pro-cli-0.0.12 lib/vendor/core/ey-core/requests/get_account_trial.rb
ey-pro-cli-0.0.11 lib/vendor/core/ey-core/requests/get_account_trial.rb
ey-pro-cli-0.0.10 lib/vendor/core/ey-core/requests/get_account_trial.rb
ey-pro-cli-0.0.9 lib/vendor/core/ey-core/requests/get_account_trial.rb