module ZuoraConnect class Configuration attr_accessor :oauth_client_id, :oauth_client_secret, :oauth_client_redirect_uri,:use_s3, :default_locale,:dev_mode_appinstance ,:dev_mode_admin, :dev_mode_user, :dev_mode_pass, :default_time_zone,:delayed_job,:url, :private_key, :dev_mode_logins,:dev_mode_mode, :dev_mode_options, :mode, :timeout,:dev_mode_secret_access_key,:dev_mode_access_key_id,:aws_region, :s3_bucket_name, :s3_folder_name def initialize @timeout = 5.minutes @default_locale = :en @default_time_zone = Time.zone @url = "https://connect.zuora.com/" @mode = "Production" @delayed_job = false @use_s3 = false @private_key = "-----BEGIN RSA PRIVATE KEY-----\nMIIEpgIBAAKCAQEA3PlAZWUbyvBSVU9GZxQM+brbwDfecsrFXJIbEvV76LVfFuTO\nDbyMPyuM0SBEAskb79wqNsn5JD0edCwmvZ+/Kn83b8SFkFW3f1tUxA0zFdVuqKP2\nJk1vms97yvOUveDjv22gYVMJYcSAFEzg9D9fUvTRocuBWQdbTq1cyJL+LYs9bUpl\nMB4oIUZuQ5nYz66y2gLlF0yUFNAfLpaCyaJvAmN93bPWTPfaKf+PMtkWCMQJQ3w+\nGvsudynLyE0ZgLx5mfM18h08iTMl61sUawyUEYNPm71Q6er9TB7oiOt3RT7ncw9P\nN+jzdklEphPp+1RaK35joPLQZjZl3Nh/XZg5eQIDAQABAoIBAQCJB+SgPDgk/C0C\njDurdmqpfvABXmQLKaWER3KUqjjh0X+bUd5Z9F/AWMBley3R0GcLsqtW+J8QkvpM\nroiDtQm2T9fP7r2pCQ7W4otJXKoeUxHhcHQXwpOAHES3UaAes9RoBJKdaAH8Z//J\nFve1X4s8hWdufyXCUOaVfrp4A3euQ3BYkb1n6yCnaEclG/evX6VM5jYMuHSDH0AS\nRUAMotuNvoLEIweNjWIolrKBEe+ZA6Rz6UaSoOxoNl8qWWOMsQvKzWfzHOA/YMnn\n9TN3AR10XYhWVjzNWL2dN1Jh4aD3d0byzImuhnCdIsIkTmS5aogl3/iFDce+9+kF\nLnkH5PuRAoGBAPiXQZdXHu7HwuQvZdb+2kII4kVLyLRM6v81rmXZr7pBUWrdpezy\nnFDj8OumSml4cKOLDUTAj/2/Hjs1o3JVGZqD0EbVrfIF0LZ3LzHb0rAae0uoyG7S\ny+2Y8wjLP53RogdZMA+6uoozEPM7yAp04d+rVPQY8i6JwGQmRYh7xSSlAoGBAOOP\nRssUBabZX13gQQ3BsO28g4HTEiFuqgAvGG/44Xbf74IRQiOT6ZaNYELvgaZT+RW2\nbp5E+T15Qe+SHHdxJhv3wtsnAw7yno1BmHpkAs1mEjjGFbNMF84YcRWSRU09g9Pm\nORhAc4lCFxHh7LnGsI1bgcPOYuFDRSHjYEy6y6VFAoGBAOiE8kEQqEpIZy7wdp1m\nu9fQX3TZsd2TpKsaFwoFV60rs2/16mF7fGLdElgYrrmAgjs2sS6Bvy1lOm2/eiZT\nGyO/72ySKaWbcuF5EZfdOXCnFHRsZy3h1gVjbs/m7JY9owSkk6Pi0OC7aztXy4Cc\nWznPFCNNwhltl5sVgSxsOLZRAoGBAJcPOI581xegevdFc8nfB0V5+86FwCZjYQTI\nPq+uBnW0SDkOndoiSVEAvqMQfP9eBR7NwPbdkJqnUQbo9m6vtP2h5j820YfttSTO\nI5szosyY8oWvsR4Z6D+O6BrKw6h3qnhS/xnDRy8ZqVjcohnc9LyRvz2tVuR0lILf\nfsDQy3kFAoGBAOm3N39RR7BwOMWIbe0Pk/ohJJdKwzsd1t1WyuXjAHJGdhMXkjl5\n9T1UsrouUr6qr545FNwEXktjmJ0IuqwypBC7B9kezKJlNTsZxmtcl7HfIFFOade7\nvrPHAAHPHSvCRcUPcFG1PDnFno66dXFOZwMo7W2lN+xTXuO0EvBAlW9P\n-----END RSA PRIVATE KEY-----\n" # OAuth Settings @oauth_client_id = "" @oauth_client_secret = "" @oauth_client_redirect_uri = "https://connect.zuora.com/" # DEV MODE OPTIONS @dev_mode_logins = { "target_login" => {"tenant_type" => "Zuora", "username" => "user", "password" => "pass", "url" => "url"} } @dev_mode_options = {"name" => {"config_name" => "name", "datatype" => "type", "value" => "value"}} @dev_mode_mode = "Universal" @dev_mode_appinstance = "1" @dev_mode_user = "test" @dev_mode_pass = "test" @dev_mode_admin = false @dev_mode_secret_access_key = nil @dev_mode_access_key_id = nil @aws_region = "us-west-2" @s3_bucket_name = "rbm-apps" @s3_folder_name = Rails.application.class.parent_name end def private_key if ENV["CONNECT_KEY"].blank? @private_key.include?("BEGIN") ? @private_key : Base64.urlsafe_decode64(@private_key) else Base64.urlsafe_decode64(ENV["CONNECT_KEY"]) end end end end