Class: Responsys::Api::Object::ListMergeRule

Inherits:
Object
  • Object
show all
Defined in:
lib/responsys/api/object/list_merge_rule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ListMergeRule

Returns a new instance of ListMergeRule.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/responsys/api/object/list_merge_rule.rb', line 7

def initialize(options = {})
  @insert_on_no_match = options[:insertOnNoMatch].nil? ? false : options[:insertOnNoMatch]
  @update_on_match = options[:updateOnMatch] || "REPLACE_ALL"
  @match_column_name1 = options[:matchColumnName1] || "EMAIL_ADDRESS_"
  @match_column_name2 = options[:matchColumnName2] || ""
  @match_column_name3 = options[:matchColumnName3] || ""
  @match_operator = options[:matchOperator] || "AND"
  @optin_value = options[:optinValue] || "I"
  @optout_value = options[:optoutValue] || "O"
  @html_value = options[:htmlValue] || "H"
  @text_value = options[:textValue] || "T"
  @reject_record_if_channel_empty = options[:rejectRecordIfChannelEmpty] || ""
  @default_permission_status = options[:defaultPermissionStatus] || "OPTOUT"
end

Instance Attribute Details

#default_permission_statusObject

Returns the value of attribute default_permission_status.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def default_permission_status
  @default_permission_status
end

#html_valueObject

Returns the value of attribute html_value.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def html_value
  @html_value
end

#insert_on_no_matchObject

Returns the value of attribute insert_on_no_match.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def insert_on_no_match
  @insert_on_no_match
end

#match_column_name1Object

Returns the value of attribute match_column_name1.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def match_column_name1
  @match_column_name1
end

#match_column_name2Object

Returns the value of attribute match_column_name2.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def match_column_name2
  @match_column_name2
end

#match_column_name3Object

Returns the value of attribute match_column_name3.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def match_column_name3
  @match_column_name3
end

#match_operatorObject

Returns the value of attribute match_operator.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def match_operator
  @match_operator
end

#optin_valueObject

Returns the value of attribute optin_value.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def optin_value
  @optin_value
end

#optout_valueObject

Returns the value of attribute optout_value.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def optout_value
  @optout_value
end

#reject_record_if_channel_emptyObject

Returns the value of attribute reject_record_if_channel_empty.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def reject_record_if_channel_empty
  @reject_record_if_channel_empty
end

#text_valueObject

Returns the value of attribute text_value.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def text_value
  @text_value
end

#update_on_matchObject

Returns the value of attribute update_on_match.



5
6
7
# File 'lib/responsys/api/object/list_merge_rule.rb', line 5

def update_on_match
  @update_on_match
end

Instance Method Details

#to_apiObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/responsys/api/object/list_merge_rule.rb', line 22

def to_api
  {
    insertOnNoMatch: @insert_on_no_match,
    updateOnMatch: @update_on_match,
    matchColumnName1: @match_column_name1,
    matchColumnName2: @match_column_name2,
    matchColumnName3: @match_column_name3,
    matchOperator: @match_operator,
    optinValue: @optin_value,
    optoutValue: @optout_value,
    htmlValue: @html_value,
    textValue: @text_value,
    rejectRecordIfChannelEmpty: @reject_record_if_channel_empty,
    defaultPermissionStatus: @default_permission_status
  }
end