@@ -66,7 +66,6 @@ Update Email Channel
66
66
email_channel.channel_id = ' 01234567-890a-bcde-f012-3456789abc0'
67
67
email_channel.type = ' email'
68
68
email_channel.commercial_opted_in = ' 2018-10-28T10:34:22'
69
- email_channel.address = ' [email protected] '
70
69
email_channel.timezone = ' America/Los_Angeles'
71
70
email_channel.locale_country = ' US'
72
71
email_channel.locale_language = ' en'
@@ -75,7 +74,36 @@ Update Email Channel
75
74
.. note ::
76
75
77
76
The only thing required to make a request is the channel_id. However, anything
78
- that needs to be updated must also be included.
77
+ that needs to be updated must also be included. Please note that you cannot
78
+ update an email address with this method. Please use the replace method instead.
79
+
80
+ Replace Email Channel
81
+ --------------------
82
+
83
+ .. code-block :: ruby
84
+
85
+ require ' urbanairship'
86
+ UA = Urbanairship
87
+ airship = UA ::Client .new (key: ' application_key' , secret: ' master_secret' )
88
+ email_channel = UA ::Email .new (client: airship)
89
+ email_channel.channel_id = ' 01234567-890a-bcde-f012-3456789abc0'
90
+ email_channel.address = ' [email protected] '
91
+ email_channel.type = ' email'
92
+ email_channel.commercial_opted_in = ' 2018-10-28T10:34:22'
93
+ email_channel.timezone = ' America/Los_Angeles'
94
+ email_channel.locale_country = ' US'
95
+ email_channel.locale_language = ' en'
96
+ email_channel.update
97
+
98
+ .. note ::
99
+
100
+ This will replace an existing email channel and will do the following actions:
101
+
102
+ - Register a new channel
103
+ - Associate the new email channel with the same user as the source channel
104
+ - Uninstall the source channel
105
+
106
+ Address, Channel ID and type are all required parameters for this method.
79
107
80
108
Email Tags
81
109
----------
0 commit comments