Sha256: 0dd4fe43db167d7ea0343bbb3f633239358ea409dab807f1ab645c4585017716

Contents?: true

Size: 1.71 KB

Versions: 4

Compression:

Stored size: 1.71 KB

Contents

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, :additional_apartment_models

    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 = ENV["CONNECT_KEY"]
      @additional_apartment_models = []

      # 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
      raise "Private Key Not Set" if @private_key.blank?
      @private_key.include?("BEGIN") ? @private_key : Base64.urlsafe_decode64(@private_key)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
zuora_connect-1.4.45 lib/zuora_connect/configuration.rb
zuora_connect-1.4.44 lib/zuora_connect/configuration.rb
zuora_connect-1.4.43 lib/zuora_connect/configuration.rb
zuora_connect-1.4.42 lib/zuora_connect/configuration.rb