class SocketLabs::InjectionApi::Core::Serialization::MergeFieldJson
Represents a merge field as a field and value pair. To be serialized into JSON string before sending to the Injection Api.
Attributes
field[RW]
The field of your merge field.
value[RW]
The merge field value.
Public Class Methods
new( field = nil, value = nil )
click to toggle source
Initializes a new instance of the MergeFieldJson
class @param [String] field @param [String] value
# File lib/socketlabs/injectionapi/core/serialization/merge_field_json.rb, line 18 def initialize( field = nil, value = nil ) @field = field @value = value end
Public Instance Methods
to_hash()
click to toggle source
build json hash for MergeFieldJson
@return [hash]
# File lib/socketlabs/injectionapi/core/serialization/merge_field_json.rb, line 28 def to_hash { :field => @field, :value => @value } end