class Markety::LeadKey

Encapsulates a key used to look up or describe a specific marketo lead. Markety users should not use this class directly.

Public Class Methods

new(key_type, key_value) click to toggle source
  • key_type - value of LeadKeyType enum; the type of key to use see LeadKeyType

  • key_value - a string value for the given type

# File lib/markety/lead_key.rb, line 7
def initialize(key_type, key_value)
  @key_type = key_type
  @key_value = key_value
end

Public Instance Methods

key_type() click to toggle source

get the key type (a LeadKeyType enum value)

# File lib/markety/lead_key.rb, line 13
def key_type
  @key_type
end
key_value() click to toggle source

get the key value

# File lib/markety/lead_key.rb, line 18
def key_value
  @key_value
end
to_hash() click to toggle source

create a hash from this instance, for sending this object to marketo using savon

# File lib/markety/lead_key.rb, line 23
def to_hash
  {
    "keyType" => @key_type,
    "keyValue" => @key_value
  }
end