Sha256: e170b6c0e9784512ca45a78882f97140b0aed91d5e2cf3147eac24054f95ffd5

Contents?: true

Size: 1.1 KB

Versions: 25

Compression:

Stored size: 1.1 KB

Contents

module Stripe
  module TestData
    def make_error(type, message)
      {
        :error => {
          :type => type,
          :message => message,
        }
      }
    end

    def make_invalid_api_key_error
      {
        :error => {
          :type => "invalid_request_error",
          :message => "Invalid API Key provided: invalid"
        }
      }
    end

    def make_invalid_exp_year_error
      {
        :error => {
          :code => "invalid_expiry_year",
          :param => "exp_year",
          :type => "card_error",
          :message => "Your card's expiration year is invalid"
        }
      }
    end

    def make_missing_id_error
      {
        :error => {
          :param => "id",
          :type => "invalid_request_error",
          :message => "Missing id"
        }
      }
    end

    def make_rate_limit_error
      {
        :error => {
          :type => "invalid_request_error",
          :message => "Too many requests in a period of time."
        }
      }
    end

    def make_api_error
      {
        :error => {
          :type => "api_error"
        }
      }
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
stripe-3.3.2 test/test_data.rb
stripe-3.3.1 test/test_data.rb
stripe-3.3.0 test/test_data.rb
stripe-3.2.0 test/test_data.rb
stripe-3.1.0 test/test_data.rb
stripe-3.0.3 test/test_data.rb
stripe-3.0.1 test/test_data.rb
stripe-3.0.0 test/test_data.rb
stripe-2.12.0 test/test_data.rb
stripe-2.11.0 test/test_data.rb
stripe-2.10.0 test/test_data.rb
stripe-2.9.0 test/test_data.rb
stripe-2.8.0 test/test_data.rb
stripe-2.7.0 test/test_data.rb
stripe-2.6.0 test/test_data.rb
stripe-2.5.0 test/test_data.rb
stripe-2.4.0 test/test_data.rb
stripe-2.3.0 test/test_data.rb
stripe-2.2.1 test/test_data.rb
stripe-2.2.0 test/test_data.rb