Class: Rapleaf::Marketo::LeadKey

Inherits:
Object
  • Object
show all
Defined in:
lib/marketo/lead_key.rb

Overview

Encapsulates a key used to look up or describe a specific marketo lead.

Instance Method Summary collapse

Constructor Details

#initialize(key_type, key_value) ⇒ LeadKey

  • key_type the type of key to use see LeadKeyType

  • key_value normally a string value for the given type



7
8
9
10
# File 'lib/marketo/lead_key.rb', line 7

def initialize(key_type, key_value)
  @key_type = key_type
  @key_value = key_value
end

Instance Method Details

#key_typeObject

get the key type



13
14
15
# File 'lib/marketo/lead_key.rb', line 13

def key_type
  @key_type
end

#key_valueObject

get the key value



18
19
20
# File 'lib/marketo/lead_key.rb', line 18

def key_value
  @key_value
end

#to_hashObject

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



23
24
25
26
27
28
# File 'lib/marketo/lead_key.rb', line 23

def to_hash
  {
      :key_type => @key_type,
      :key_value => @key_value
  }
end