8000 fix: set correct Parameter name (#729) · twilio/twilio-java@489ab34 · GitHub
[go: up one dir, main page]

Skip to content

Commit 489ab34

Browse files
authored
fix: set correct Parameter name (#729)
1 parent 61acfef commit 489ab34

21 files changed

+146
-146
lines changed

src/main/java/com/twilio/rest/chat/v1/ServiceUpdater.java

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -442,31 +442,31 @@ private void addPostParams(final Request request) {
442442

443443
}
444444
if (notificationsNewMessageEnabled != null) {
445-
request.addPostParam("NotificationsNewMessageEnabled", notificationsNewMessageEnabled.toString());
445+
request.addPostParam("Notifications.NewMessage.Enabled", notificationsNewMessageEnabled.toString());
446446

447447
}
448448
if (notificationsNewMessageTemplate != null) {
449449
request.addPostParam("Notifications.NewMessage.Template", notificationsNewMessageTemplate);
450450

451451
}
452452
if (notificationsAddedToChannelEnabled != null) {
453-
request.addPostParam("NotificationsAddedToChannelEnabled", notificationsAddedToChannelEnabled.toString());
453+
request.addPostParam("Notifications.AddedToChannel.Enabled", notificationsAddedToChannelEnabled.toString());
454454

455455
}
456456
if (notificationsAddedToChannelTemplate != null) {
457457
request.addPostParam("Notifications.AddedToChannel.Template", notificationsAddedToChannelTemplate);
458458

459459
}
460460
if (notificationsRemovedFromChannelEnabled != null) {
461-
request.addPostParam("NotificationsRemovedFromChannelEnabled", notificationsRemovedFromChannelEnabled.toString());
461+
request.addPostParam("Notifications.RemovedFromChannel.Enabled", notificationsRemovedFromChannelEnabled.toString());
462462

463463
}
464464
if (notificationsRemovedFromChannelTemplate != null) {
465465
request.addPostParam("Notifications.RemovedFromChannel.Template", notificationsRemovedFromChannelTemplate);
466466

467467
}
468468
if (notificationsInvitedToChannelEnabled != null) {
469-
request.addPostParam("NotificationsInvitedToChannelEnabled", notificationsInvitedToChannelEnabled.toString());
469+
request.addPostParam("Notifications.InvitedToChannel.Enabled", notificationsInvitedToChannelEnabled.toString());
470470

471471
}
472472
if (notificationsInvitedToChannelTemplate != null) {
@@ -492,139 +492,139 @@ private void addPostParams(final Request request) {
492492

493493
}
494494
if (webhooksOnMessageSendUrl != null) {
495-
request.addPostParam("WebhooksOnMessageSendUrl", webhooksOnMessageSendUrl.toString());
495+
request.addPostParam("Webhooks.OnMessageSend.Url", webhooksOnMessageSendUrl.toString());
496496

497497
}
498498
if (webhooksOnMessageSendMethod != null) {
499-
request.addPostParam("WebhooksOnMessageSendMethod", webhooksOnMessageSendMethod.toString());
499+
request.addPostParam("Webhooks.OnMessageSend.Method", webhooksOnMessageSendMethod.toString());
500500

501501
}
502502
if (webhooksOnMessageUpdateUrl != null) {
503-
request.addPostParam("WebhooksOnMessageUpdateUrl", webhooksOnMessageUpdateUrl.toString());
503+
request.addPostParam("Webhooks.OnMessageUpdate.Url", webhooksOnMessageUpdateUrl.toString());
504504

505505
}
506506
if (webhooksOnMessageUpdateMethod != null) {
507-
request.addPostParam("WebhooksOnMessageUpdateMethod", webhooksOnMessageUpdateMethod.toString());
507+
request.addPostParam("Webhooks.OnMessageUpdate.Method", webhooksOnMessageUpdateMethod.toString());
508508

509509
}
510510
if (webhooksOnMessageRemoveUrl != null) {
511-
request.addPostParam("WebhooksOnMessageRemoveUrl", webhooksOnMessageRemoveUrl.toString());
511+
request.addPostParam("Webhooks.OnMessageRemove.Url", webhooksOnMessageRemoveUrl.toString());
512512

513513
}
514514
if (webhooksOnMessageRemoveMethod != null) {
515-
request.addPostParam("WebhooksOnMessageRemoveMethod", webhooksOnMessageRemoveMethod.toString());
515+
request.addPostParam("Webhooks.OnMessageRemove.Method", webhooksOnMessageRemoveMethod.toString());
516516

517517
}
518518
if (webhooksOnChannelAddUrl != null) {
519-
request.addPostParam("WebhooksOnChannelAddUrl", webhooksOnChannelAddUrl.toString());
519+
request.addPostParam("Webhooks.OnChannelAdd.Url", webhooksOnChannelAddUrl.toString());
520520

521521
}
522522
if (webhooksOnChannelAddMethod != null) {
523-
request.addPostParam("WebhooksOnChannelAddMethod", webhooksOnChannelAddMethod.toString());
523+
request.addPostParam("Webhooks.OnChannelAdd.Method", webhooksOnChannelAddMethod.toString());
524524

525525
}
526526
if (webhooksOnChannelDestroyUrl != null) {
527-
request.addPostParam("WebhooksOnChannelDestroyUrl", webhooksOnChannelDestroyUrl.toString());
527+
request.addPostParam("Webhooks.OnChannelDestroy.Url", webhooksOnChannelDestroyUrl.toString());
528528

529529
}
530530
if (webhooksOnChannelDestroyMethod != null) {
531-
request.addPostParam("WebhooksOnChannelDestroyMethod", webhooksOnChannelDestroyMethod.toString());
531+
request.addPostParam("Webhooks.OnChannelDestroy.Method", webhooksOnChannelDestroyMethod.toString());
532532

533533
}
534534
if (webhooksOnChannelUpdateUrl != null) {
535-
request.addPostParam("WebhooksOnChannelUpdateUrl", webhooksOnChannelUpdateUrl.toString());
535+
request.addPostParam("Webhooks.OnChannelUpdate.Url", webhooksOnChannelUpdateUrl.toString());
536536

537537
}
538538
if (webhooksOnChannelUpdateMethod != null) {
539-
request.addPostParam("WebhooksOnChannelUpdateMethod", webhooksOnChannelUpdateMethod.toString());
539+
request.addPostParam("Webhooks.OnChannelUpdate.Method", webhooksOnChannelUpdateMethod.toString());
540540

541541
}
542542
if (webhooksOnMemberAddUrl != null) {
543-
request.addPostParam("WebhooksOnMemberAddUrl", webhooksOnMemberAddUrl.toString());
543+
request.addPostParam("Webhooks.OnMemberAdd.Url", webhooksOnMemberAddUrl.toString());
544544

545545
}
546546
if (webhooksOnMemberAddMethod != null) {
547-
request.addPostParam("WebhooksOnMemberAddMethod", webhooksOnMemberAddMethod.toString());
547+
request.addPostParam("Webhooks.OnMemberAdd.Method", webhooksOnMemberAddMethod.toString());
548548

549549
}
550550
if (webhooksOnMemberRemoveUrl != null) {
551-
request.addPostParam("WebhooksOnMemberRemoveUrl", webhooksOnMemberRemoveUrl.toString());
551+
request.addPostParam("Webhooks.OnMemberRemove.Url", webhooksOnMemberRemoveUrl.toString());
552552

553553
}
554554
if (webhooksOnMemberRemoveMethod != null) {
555-
request.addPostParam("WebhooksOnMemberRemoveMethod", webhooksOnMemberRemoveMethod.toString());
555+
request.addPostParam("Webhooks.OnMemberRemove.Method", webhooksOnMemberRemoveMethod.toString());
556556

557557
}
558558
if (webhooksOnMessageSentUrl != null) {
559-
request.addPostParam("WebhooksOnMessageSentUrl", webhooksOnMessageSentUrl.toString());
559+
request.addPostParam("Webhooks.OnMessageSent.Url", webhooksOnMessageSentUrl.toString());
560560

561561
}
562562
if (webhooksOnMessageSentMethod != null) {
563-
request.addPostParam("WebhooksOnMessageSentMethod", webhooksOnMessageSentMethod.toString());
563+
request.addPostParam("Webhooks.OnMessageSent.Method", webhooksOnMessageSentMethod.toString());
564564

565565
}
566566
if (webhooksOnMessageUpdatedUrl != null) {
567-
request.addPostParam("WebhooksOnMessageUpdatedUrl", webhooksOnMessageUpdatedUrl.toString());
567+
request.addPostParam("Webhooks.OnMessageUpdated.Url", webhooksOnMessageUpdatedUrl.toString());
568568

569569
}
570570
if (webhooksOnMessageUpdatedMethod != null) {
571-
request.addPostParam("WebhooksOnMessageUpdatedMethod", webhooksOnMessageUpdatedMethod.toString());
571+
request.addPostParam("Webhooks.OnMessageUpdated.Method", webhooksOnMessageUpdatedMethod.toString());
572572

573573
}
574574
if (webhooksOnMessageRemovedUrl != null) {
575-
request.addPostParam("WebhooksOnMessageRemovedUrl", webhooksOnMessageRemovedUrl.toString());
575+
request.addPostParam("Webhooks.OnMessageRemoved.Url", webhooksOnMessageRemovedUrl.toString());
576576

577577
}
578578
if (webhooksOnMessageRemovedMethod != null) {
579-
request.addPostParam("WebhooksOnMessageRemovedMethod", webhooksOnMessageRemovedMethod.toString());
579+
request.addPostParam("Webhooks.OnMessageRemoved.Method", webhooksOnMessageRemovedMethod.toString());
580580

581581
}
582582
if (webhooksOnChannelAddedUrl != null) {
583-
request.addPostParam("WebhooksOnChannelAddedUrl", webhooksOnChannelAddedUrl.toString());
583+
request.addPostParam("Webhooks.OnChannelAdded.Url", webhooksOnChannelAddedUrl.toString());
584584

585585
}
586586
if (webhooksOnChannelAddedMethod != null) {
587-
request.addPostParam("WebhooksOnChannelAddedMethod", webhooksOnChannelAddedMethod.toString());
587+
request.addPostParam("Webhooks.OnChannelAdded.Method", webhooksOnChannelAddedMethod.toString());
588588

589589
}
590590
if (webhooksOnChannelDestroyedUrl != null) {
591-
request.addPostParam("WebhooksOnChannelDestroyedUrl", webhooksOnChannelDestroyedUrl.toString());
591+
request.addPostParam("Webhooks.OnChannelDestroyed.Url", webhooksOnChannelDestroyedUrl.toString());
592592

593593
}
594594
if (webhooksOnChannelDestroyedMethod != null) {
595-
request.addPostParam("WebhooksOnChannelDestroyedMethod", webhooksOnChannelDestroyedMethod.toString());
595+
request.addPostParam("Webhooks.OnChannelDestroyed.Method", webhooksOnChannelDestroyedMethod.toString());
596596

597597
}
598598
if (webhooksOnChannelUpdatedUrl != null) {
599-
request.addPostParam("WebhooksOnChannelUpdatedUrl", webhooksOnChannelUpdatedUrl.toString());
599+
request.addPostParam("Webhooks.OnChannelUpdated.Url", webhooksOnChannelUpdatedUrl.toString());
600600

601601
}
602602
if (webhooksOnChannelUpdatedMethod != null) {
603-
request.addPostParam("WebhooksOnChannelUpdatedMethod", webhooksOnChannelUpdatedMethod.toString());
603+
request.addPostParam("Webhooks.OnChannelUpdated.Method", webhooksOnChannelUpdatedMethod.toString());
604604

605605
}
606606
if (webhooksOnMemberAddedUrl != null) {
607-
request.addPostParam("WebhooksOnMemberAddedUrl", webhooksOnMemberAddedUrl.toString());
607+
request.addPostParam("Webhooks.OnMemberAdded.Url", webhooksOnMemberAddedUrl.toString());
608608

609609
}
610610
if (webhooksOnMemberAddedMethod != null) {
611-
request.addPostParam("WebhooksOnMemberAddedMethod", webhooksOnMemberAddedMethod.toString());
611+
request.addPostParam("Webhooks.OnMemberAdded.Method", webhooksOnMemberAddedMethod.toString());
612612

613613
}
614614
if (webhooksOnMemberRemovedUrl != null) {
615-
request.addPostParam("WebhooksOnMemberRemovedUrl", webhooksOnMemberRemovedUrl.toString());
615+
request.addPostParam("Webhooks.OnMemberRemoved.Url", webhooksOnMemberRemovedUrl.toString());
616616

617617
}
618618
if (webhooksOnMemberRemovedMethod != null) {
619-
request.addPostParam("WebhooksOnMemberRemovedMethod", webhooksOnMemberRemovedMethod.toString());
619+
request.addPostParam("Webhooks.OnMemberRemoved.Method", webhooksOnMemberRemovedMethod.toString());
620620

621621
}
622622
if (limitsChannelMembers != null) {
623-
request.addPostParam("LimitsChannelMembers", limitsChannelMembers.toString());
623+
request.addPostParam("Limits.ChannelMembers", limitsChannelMembers.toString());
624624

625625
}
626626
if (limitsUserChannels != null) {
627-
request.addPostParam("LimitsUserChannels", limitsUserChannels.toString());
627+
request.addPostParam("Limits.UserChannels", limitsUserChannels.toString());
628628

629629
}
630630
}

src/main/java/com/twilio/rest/chat/v2/ServiceUpdater.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ private void addPostParams(final Request request) {
263263

264264
}
265265
if (notificationsNewMessageEnabled != null) {
266-
request.addPostParam("NotificationsNewMessageEnabled", notificationsNewMessageEnabled.toString());
266+
request.addPostParam("Notifications.NewMessage.Enabled", notificationsNewMessageEnabled.toString());
267267

268268
}
269269
if (notificationsNewMessageTemplate != null) {
@@ -275,11 +275,11 @@ private void addPostParams(final Request request) {
275275

276276
}
277277
if (notificationsNewMessageBadgeCountEnabled != null) {
278-
request.addPostParam("NotificationsNewMessageBadgeCountEnabled", notificationsNewMessageBadgeCountEnabled.toString());
278+
request.addPostParam("Notifications.NewMessage.BadgeCountEnabled", notificationsNewMessageBadgeCountEnabled.toString());
279279

280280
}
281281
if (notificationsAddedToChannelEnabled != null) {
282-
request.addPostParam("NotificationsAddedToChannelEnabled", notificationsAddedToChannelEnabled.toString());
282+
request.addPostParam("Notifications.AddedToChannel.Enabled", notificationsAddedToChannelEnabled.toString());
283283

284284
}
285285
if (notificationsAddedToChannelTemplate != null) {
@@ -291,7 +291,7 @@ private void addPostParams(final Request request) {
291291

292292
}
293293
if (notificationsRemovedFromChannelEnabled != null) {
294-
request.addPostParam("NotificationsRemovedFromChannelEnabled", notificationsRemovedFromChannelEnabled.toString());
294+
request.addPostParam("Notifications.RemovedFromChannel.Enabled", notificationsRemovedFromChannelEnabled.toString());
295295

296296
}
297297
if (notificationsRemovedFromChannelTemplate != null) {
@@ -303,7 +303,7 @@ private void addPostParams(final Request request) {
303303

304304
}
305305
if (notificationsInvitedToChannelEnabled != null) {
306-
request.addPostParam("NotificationsInvitedToChannelEnabled", notificationsInvitedToChannelEnabled.toString());
306+
request.addPostParam("Notifications.InvitedToChannel.Enabled", notificationsInvitedToChannelEnabled.toString());
307307

308308
}
309309
if (notificationsInvitedToChannelTemplate != null) {
@@ -333,11 +333,11 @@ private void addPostParams(final Request request) {
333333

334334
}
335335
if (limitsChannelMembers != null) {
336-
request.addPostParam("LimitsChannelMembers", limitsChannelMembers.toString());
336+
request.addPostParam("Limits.ChannelMembers", limitsChannelMembers.toString());
337337

338338
}
339339
if (limitsUserChannels != null) {
340-
request.addPostParam("LimitsUserChannels", limitsUserChannels.toString());
340+
request.addPostParam("Limits.UserChannels", limitsUserChannels.toString());
341341

342342
}
343343
if (mediaCompatibilityMessage != null) {
@@ -353,7 +353,7 @@ private void addPostParams(final Request request) {
353353

354354
}
355355
if (notificationsLogEnabled != null) {
356-
request.addPostParam("NotificationsLogEnabled", notificationsLogEnabled.toString());
356+
request.addPostParam("Notifications.LogEnabled", notificationsLogEnabled.toString());
357357

358358
}
359359
}

src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookCreator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private void addPostParams(final Request request) {
119119

120120
}
121121
if (configurationMethod != null) {
122-
request.addPostParam("ConfigurationMethod", configurationMethod.toString());
122+
request.addPostParam("Configuration.Method", configurationMethod.toString());
123123

124124
}
125125
if (configurationFilters != null) {
@@ -139,7 +139,7 @@ private void addPostParams(final Request request) {
139139

140140
}
141141
if (configurationRetryCount != null) {
142-
request.addPostParam("ConfigurationRetryCount", configurationRetryCount.toString());
142+
request.addPostParam("Configuration.RetryCount", configurationRetryCount.toString());
143143

144144
}
145145
}

src/main/java/com/twilio/rest/chat/v2/service/channel/WebhookUpdater.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private void addPostParams(final Request request) {
110110

111111
}
112112
if (configurationMethod != null) {
113-
request.addPostParam("ConfigurationMethod", configurationMethod.toString());
113+
request.addPostParam("Configuration.Method", configurationMethod.toString());
114114

115115
}
116116
if (configurationFilters != null) {
@@ -130,7 +130,7 @@ private void addPostParams(final Request request) {
130130

131131
}
132132
if (configurationRetryCount != null) {
133-
request.addPostParam("ConfigurationRetryCount", configurationRetryCount.toString());
133+
request.addPostParam("Configuration.RetryCount", configurationRetryCount.toString());
134134

135135
}
136136
}

src/main/java/com/twilio/rest/conversations/v1/AddressConfigurationCreator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ private void addPostParams(final Request request) {
136136

137137
}
138138
if (autoCreationEnabled != null) {
139-
request.addPostParam("AutoCreationEnabled", autoCreationEnabled.toString());
139+
request.addPostParam("AutoCreation.Enabled", autoCreationEnabled.toString());
140140

141141
}
142142
if (autoCreationType != null) {
143-
request.addPostParam("AutoCreationType", autoCreationType.toString());
143+
request.addPostParam("AutoCreation.Type", autoCreationType.toString());
144144

145145
}
146146
if (autoCreationConversationServiceSid != null) {
@@ -152,7 +152,7 @@ private void addPostParams(final Request request) {
152152

153153
}
154154
if (autoCreationWebhookMethod != null) {
155-
request.addPostParam("AutoCreationWebhookMethod", autoCreationWebhookMethod.toString());
155+
request.addPostParam("AutoCreation.WebhookMethod", autoCreationWebhookMethod.toString());
156156

157157
}
158158
if (autoCreationWebhookFilters != null) {
@@ -166,7 +166,7 @@ private void addPostParams(final Request request) {
166166

167167
}
168168
if (autoCreationStudioRetryCount != null) {
169-
request.addPostParam("AutoCreationStudioRetryCount", autoCreationStudioRetryCount.toString());
169+
request.addPostParam("AutoCreation.StudioRetryCount", autoCreationStudioRetryCount.toString());
170170

171171
}
172172
}

src/main/java/com/twilio/rest/conversations/v1/AddressConfigurationUpdater.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ private void addPostParams(final Request request) {
116116

117117
}
118118
if (autoCreationEnabled != null) {
119-
request.addPostParam("AutoCreationEnabled", autoCreationEnabled.toString());
119+
request.addPostParam("AutoCreation.Enabled", autoCreationEnabled.toString());
120120

121121
}
122122
if (autoCreationType != null) {
123-
request.addPostParam("AutoCreationType", autoCreationType.toString());
123+
request.addPostParam("AutoCreation.Type", autoCreationType.toString());
124124

125125
}
126126
if (autoCreationConversationServiceSid != null) {
@@ -132,7 +132,7 @@ private void addPostParams(final Request request) {
132132

133133
}
134134
if (autoCreationWebhookMethod != null) {
135-
request.addPostParam("AutoCreationWebhookMethod", autoCreationWebhookMethod.toString());
135+
request.addPostParam("AutoCreation.WebhookMethod", autoCreationWebhookMethod.toString());
136136

137137
}
138138
if (autoCreationWebhookFilters != null) {
@@ -146,7 +146,7 @@ private void addPostParams(final Request request) {
146146

147147
}
148148
if (autoCreationStudioRetryCount != null) {
149-
request.addPostParam("AutoCreationStudioRetryCount", autoCreationStudioRetryCount.toString());
149+
request.addPostParam("AutoCreation.StudioRetryCount", autoCreationStudioRetryCount.toString());
150150

151151
}
152152
}

src/main/java/com/twilio/rest/conversations/v1/conversation/WebhookCreator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private void addPostParams(final Request request) {
116116

117117
}
118118
if (configurationMethod != null) {
119-
request.addPostParam("ConfigurationMethod", configurationMethod.toString());
119+
request.addPostParam("Configuration.Method", configurationMethod.toString());
120120

121121
}
122122
if (configurationFilters != null) {
@@ -136,7 +136,7 @@ private void addPostParams(final Request request) {
136136

137137
}
138138
if (configurationReplayAfter != null) {
139-
request.addPostParam(< 4B16 span class="pl-s">"ConfigurationReplayAfter", configurationReplayAfter.toString());
139+
request.addPostParam("Configuration.ReplayAfter", configurationReplayAfter.toString());
140140

141141
}
142142
}

0 commit comments

Comments
 (0)
0