Sha256: ba7c2833a80396dbe1ced762d0feca22e4292253395bfda9943e754b12b1e67a

Contents?: true

Size: 412 Bytes

Versions: 47

Compression:

Stored size: 412 Bytes

Contents

module ZuoraConnect
  class Login

    def initialize (fields)
      self.attr_builder("client",::ZuoraAPI::Login.new(fields.map{|k,v| [k.to_sym, v]}.to_h)) if fields["tenant_type"] == "Zuora"
      fields.each do |k,v|
        self.attr_builder(k,v)
      end
    end

    def attr_builder(field,val)
      singleton_class.class_eval { attr_accessor "#{field}" }
      send("#{field}=", val)
    end

  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
zuora_connect-1.0.1 app/models/zuora_connect/login.rb
zuora_connect-1.0.0 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.3.7 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.3.5 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.3.4 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.3.3 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.3.2 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.3.1 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.3.0 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.2.9 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.2.8 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.2.7 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.2.6 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.2.5 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.2.4 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.2.3 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.2.2 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.2.1 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.2 app/models/zuora_connect/login.rb
zuora_connect-0.0.9.1 app/models/zuora_connect/login.rb