Sha256: fda832e985900556bbfc4dc78e161246a7127d0ad69cc508a955dbddd13c7166

Contents?: true

Size: 1.06 KB

Versions: 20

Compression:

Stored size: 1.06 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

20 entries across 20 versions & 1 rubygems

Version Path
stripe-3.14.0 test/test_data.rb
stripe-3.13.1 test/test_data.rb
stripe-3.13.0 test/test_data.rb
stripe-3.12.1 test/test_data.rb
stripe-3.12.0 test/test_data.rb
stripe-3.11.0 test/test_data.rb
stripe-3.10.0 test/test_data.rb
stripe-3.9.2 test/test_data.rb
stripe-3.9.1 test/test_data.rb
stripe-3.9.0 test/test_data.rb
stripe-3.8.2 test/test_data.rb
stripe-3.8.1 test/test_data.rb
stripe-3.8.0 test/test_data.rb
stripe-3.7.0 test/test_data.rb
stripe-3.6.0 test/test_data.rb
stripe-3.5.3 test/test_data.rb
stripe-3.5.2 test/test_data.rb
stripe-3.5.1 test/test_data.rb
stripe-3.5.0 test/test_data.rb
stripe-3.4.1 test/test_data.rb