trycourier 4.16.0 → 4.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/lib/courier/client.rb +4 -0
  4. data/lib/courier/models/preference_section_archive_params.rb +20 -0
  5. data/lib/courier/models/preference_section_create_params.rb +14 -0
  6. data/lib/courier/models/preference_section_create_request.rb +36 -0
  7. data/lib/courier/models/preference_section_get_response.rb +83 -0
  8. data/lib/courier/models/preference_section_list_params.rb +14 -0
  9. data/lib/courier/models/preference_section_list_response.rb +18 -0
  10. data/lib/courier/models/preference_section_publish_params.rb +14 -0
  11. data/lib/courier/models/preference_section_replace_params.rb +20 -0
  12. data/lib/courier/models/preference_section_replace_request.rb +37 -0
  13. data/lib/courier/models/preference_section_retrieve_params.rb +20 -0
  14. data/lib/courier/models/preference_sections/topic_archive_params.rb +28 -0
  15. data/lib/courier/models/preference_sections/topic_create_params.rb +22 -0
  16. data/lib/courier/models/preference_sections/topic_list_params.rb +22 -0
  17. data/lib/courier/models/preference_sections/topic_replace_params.rb +28 -0
  18. data/lib/courier/models/preference_sections/topic_retrieve_params.rb +28 -0
  19. data/lib/courier/models/preference_topic_create_request.rb +93 -0
  20. data/lib/courier/models/preference_topic_get_response.rb +124 -0
  21. data/lib/courier/models/preference_topic_list_response.rb +17 -0
  22. data/lib/courier/models/preference_topic_replace_request.rb +90 -0
  23. data/lib/courier/models/publish_preferences_response.rb +51 -0
  24. data/lib/courier/models.rb +32 -0
  25. data/lib/courier/resources/preference_sections/topics.rb +173 -0
  26. data/lib/courier/resources/preference_sections.rb +155 -0
  27. data/lib/courier/version.rb +1 -1
  28. data/lib/courier.rb +22 -0
  29. data/rbi/courier/client.rbi +3 -0
  30. data/rbi/courier/models/preference_section_archive_params.rbi +38 -0
  31. data/rbi/courier/models/preference_section_create_params.rbi +30 -0
  32. data/rbi/courier/models/preference_section_create_request.rbi +61 -0
  33. data/rbi/courier/models/preference_section_get_response.rbi +106 -0
  34. data/rbi/courier/models/preference_section_list_params.rbi +30 -0
  35. data/rbi/courier/models/preference_section_list_response.rbi +35 -0
  36. data/rbi/courier/models/preference_section_publish_params.rbi +30 -0
  37. data/rbi/courier/models/preference_section_replace_params.rbi +38 -0
  38. data/rbi/courier/models/preference_section_replace_request.rbi +62 -0
  39. data/rbi/courier/models/preference_section_retrieve_params.rbi +38 -0
  40. data/rbi/courier/models/preference_sections/topic_archive_params.rbi +48 -0
  41. data/rbi/courier/models/preference_sections/topic_create_params.rbi +40 -0
  42. data/rbi/courier/models/preference_sections/topic_list_params.rbi +40 -0
  43. data/rbi/courier/models/preference_sections/topic_replace_params.rbi +48 -0
  44. data/rbi/courier/models/preference_sections/topic_retrieve_params.rbi +48 -0
  45. data/rbi/courier/models/preference_topic_create_request.rbi +181 -0
  46. data/rbi/courier/models/preference_topic_get_response.rbi +209 -0
  47. data/rbi/courier/models/preference_topic_list_response.rbi +35 -0
  48. data/rbi/courier/models/preference_topic_replace_request.rbi +180 -0
  49. data/rbi/courier/models/publish_preferences_response.rbi +70 -0
  50. data/rbi/courier/models.rbi +38 -0
  51. data/rbi/courier/resources/preference_sections/topics.rbi +149 -0
  52. data/rbi/courier/resources/preference_sections.rbi +113 -0
  53. data/sig/courier/client.rbs +2 -0
  54. data/sig/courier/models/preference_section_archive_params.rbs +23 -0
  55. data/sig/courier/models/preference_section_create_params.rbs +15 -0
  56. data/sig/courier/models/preference_section_create_request.rbs +30 -0
  57. data/sig/courier/models/preference_section_get_response.rbs +60 -0
  58. data/sig/courier/models/preference_section_list_params.rbs +15 -0
  59. data/sig/courier/models/preference_section_list_response.rbs +18 -0
  60. data/sig/courier/models/preference_section_publish_params.rbs +15 -0
  61. data/sig/courier/models/preference_section_replace_params.rbs +25 -0
  62. data/sig/courier/models/preference_section_replace_request.rbs +30 -0
  63. data/sig/courier/models/preference_section_retrieve_params.rbs +23 -0
  64. data/sig/courier/models/preference_sections/topic_archive_params.rbs +30 -0
  65. data/sig/courier/models/preference_sections/topic_create_params.rbs +27 -0
  66. data/sig/courier/models/preference_sections/topic_list_params.rbs +25 -0
  67. data/sig/courier/models/preference_sections/topic_replace_params.rbs +34 -0
  68. data/sig/courier/models/preference_sections/topic_retrieve_params.rbs +30 -0
  69. data/sig/courier/models/preference_topic_create_request.rbs +68 -0
  70. data/sig/courier/models/preference_topic_get_response.rbs +93 -0
  71. data/sig/courier/models/preference_topic_list_response.rbs +16 -0
  72. data/sig/courier/models/preference_topic_replace_request.rbs +68 -0
  73. data/sig/courier/models/publish_preferences_response.rbs +40 -0
  74. data/sig/courier/models.rbs +32 -0
  75. data/sig/courier/resources/preference_sections/topics.rbs +49 -0
  76. data/sig/courier/resources/preference_sections.rbs +42 -0
  77. metadata +68 -2
@@ -0,0 +1,27 @@
1
+ module Courier
2
+ module Models
3
+ module PreferenceSections
4
+ type topic_create_params =
5
+ { section_id: String } & Courier::Internal::Type::request_parameters
6
+
7
+ class TopicCreateParams < Courier::Models::PreferenceTopicCreateRequest
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ def section_id: -> String
12
+
13
+ def section_id=: (String _) -> String
14
+
15
+ def initialize: (
16
+ section_id: String,
17
+ ?request_options: Courier::request_opts
18
+ ) -> void
19
+
20
+ def to_hash: -> {
21
+ section_id: String,
22
+ request_options: Courier::RequestOptions
23
+ }
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,25 @@
1
+ module Courier
2
+ module Models
3
+ module PreferenceSections
4
+ type topic_list_params =
5
+ { section_id: String } & Courier::Internal::Type::request_parameters
6
+
7
+ class TopicListParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ attr_accessor section_id: String
12
+
13
+ def initialize: (
14
+ section_id: String,
15
+ ?request_options: Courier::request_opts
16
+ ) -> void
17
+
18
+ def to_hash: -> {
19
+ section_id: String,
20
+ request_options: Courier::RequestOptions
21
+ }
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,34 @@
1
+ module Courier
2
+ module Models
3
+ module PreferenceSections
4
+ type topic_replace_params =
5
+ { section_id: String, topic_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TopicReplaceParams < Courier::Models::PreferenceTopicReplaceRequest
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ def section_id: -> String
13
+
14
+ def section_id=: (String _) -> String
15
+
16
+ def topic_id: -> String
17
+
18
+ def topic_id=: (String _) -> String
19
+
20
+ def initialize: (
21
+ section_id: String,
22
+ topic_id: String,
23
+ ?request_options: Courier::request_opts
24
+ ) -> void
25
+
26
+ def to_hash: -> {
27
+ section_id: String,
28
+ topic_id: String,
29
+ request_options: Courier::RequestOptions
30
+ }
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ module PreferenceSections
4
+ type topic_retrieve_params =
5
+ { section_id: String, topic_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TopicRetrieveParams < Courier::Internal::Type::BaseModel
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ attr_accessor section_id: String
13
+
14
+ attr_accessor topic_id: String
15
+
16
+ def initialize: (
17
+ section_id: String,
18
+ topic_id: String,
19
+ ?request_options: Courier::request_opts
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ section_id: String,
24
+ topic_id: String,
25
+ request_options: Courier::RequestOptions
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,68 @@
1
+ module Courier
2
+ module Models
3
+ type preference_topic_create_request =
4
+ {
5
+ default_status: Courier::Models::PreferenceTopicCreateRequest::default_status,
6
+ name: String,
7
+ allowed_preferences: ::Array[Courier::Models::PreferenceTopicCreateRequest::allowed_preference]?,
8
+ include_unsubscribe_header: bool?,
9
+ routing_options: ::Array[Courier::Models::channel_classification]?,
10
+ topic_data: ::Hash[Symbol, top]?
11
+ }
12
+
13
+ class PreferenceTopicCreateRequest < Courier::Internal::Type::BaseModel
14
+ attr_accessor default_status: Courier::Models::PreferenceTopicCreateRequest::default_status
15
+
16
+ attr_accessor name: String
17
+
18
+ attr_accessor allowed_preferences: ::Array[Courier::Models::PreferenceTopicCreateRequest::allowed_preference]?
19
+
20
+ attr_accessor include_unsubscribe_header: bool?
21
+
22
+ attr_accessor routing_options: ::Array[Courier::Models::channel_classification]?
23
+
24
+ attr_accessor topic_data: ::Hash[Symbol, top]?
25
+
26
+ def initialize: (
27
+ default_status: Courier::Models::PreferenceTopicCreateRequest::default_status,
28
+ name: String,
29
+ ?allowed_preferences: ::Array[Courier::Models::PreferenceTopicCreateRequest::allowed_preference]?,
30
+ ?include_unsubscribe_header: bool?,
31
+ ?routing_options: ::Array[Courier::Models::channel_classification]?,
32
+ ?topic_data: ::Hash[Symbol, top]?
33
+ ) -> void
34
+
35
+ def to_hash: -> {
36
+ default_status: Courier::Models::PreferenceTopicCreateRequest::default_status,
37
+ name: String,
38
+ allowed_preferences: ::Array[Courier::Models::PreferenceTopicCreateRequest::allowed_preference]?,
39
+ include_unsubscribe_header: bool?,
40
+ routing_options: ::Array[Courier::Models::channel_classification]?,
41
+ topic_data: ::Hash[Symbol, top]?
42
+ }
43
+
44
+ type default_status = :OPTED_OUT | :OPTED_IN | :REQUIRED
45
+
46
+ module DefaultStatus
47
+ extend Courier::Internal::Type::Enum
48
+
49
+ OPTED_OUT: :OPTED_OUT
50
+ OPTED_IN: :OPTED_IN
51
+ REQUIRED: :REQUIRED
52
+
53
+ def self?.values: -> ::Array[Courier::Models::PreferenceTopicCreateRequest::default_status]
54
+ end
55
+
56
+ type allowed_preference = :snooze | :channel_preferences
57
+
58
+ module AllowedPreference
59
+ extend Courier::Internal::Type::Enum
60
+
61
+ SNOOZE: :snooze
62
+ CHANNEL_PREFERENCES: :channel_preferences
63
+
64
+ def self?.values: -> ::Array[Courier::Models::PreferenceTopicCreateRequest::allowed_preference]
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,93 @@
1
+ module Courier
2
+ module Models
3
+ type preference_topic_get_response =
4
+ {
5
+ id: String,
6
+ allowed_preferences: ::Array[Courier::Models::PreferenceTopicGetResponse::allowed_preference],
7
+ created: String,
8
+ default_status: Courier::Models::PreferenceTopicGetResponse::default_status,
9
+ include_unsubscribe_header: bool,
10
+ name: String,
11
+ routing_options: ::Array[Courier::Models::channel_classification],
12
+ topic_data: ::Hash[Symbol, top],
13
+ updated: String,
14
+ creator: String?,
15
+ updater: String?
16
+ }
17
+
18
+ class PreferenceTopicGetResponse < Courier::Internal::Type::BaseModel
19
+ attr_accessor id: String
20
+
21
+ attr_accessor allowed_preferences: ::Array[Courier::Models::PreferenceTopicGetResponse::allowed_preference]
22
+
23
+ attr_accessor created: String
24
+
25
+ attr_accessor default_status: Courier::Models::PreferenceTopicGetResponse::default_status
26
+
27
+ attr_accessor include_unsubscribe_header: bool
28
+
29
+ attr_accessor name: String
30
+
31
+ attr_accessor routing_options: ::Array[Courier::Models::channel_classification]
32
+
33
+ attr_accessor topic_data: ::Hash[Symbol, top]
34
+
35
+ attr_accessor updated: String
36
+
37
+ attr_accessor creator: String?
38
+
39
+ attr_accessor updater: String?
40
+
41
+ def initialize: (
42
+ id: String,
43
+ allowed_preferences: ::Array[Courier::Models::PreferenceTopicGetResponse::allowed_preference],
44
+ created: String,
45
+ default_status: Courier::Models::PreferenceTopicGetResponse::default_status,
46
+ include_unsubscribe_header: bool,
47
+ name: String,
48
+ routing_options: ::Array[Courier::Models::channel_classification],
49
+ topic_data: ::Hash[Symbol, top],
50
+ updated: String,
51
+ ?creator: String?,
52
+ ?updater: String?
53
+ ) -> void
54
+
55
+ def to_hash: -> {
56
+ id: String,
57
+ allowed_preferences: ::Array[Courier::Models::PreferenceTopicGetResponse::allowed_preference],
58
+ created: String,
59
+ default_status: Courier::Models::PreferenceTopicGetResponse::default_status,
60
+ include_unsubscribe_header: bool,
61
+ name: String,
62
+ routing_options: ::Array[Courier::Models::channel_classification],
63
+ topic_data: ::Hash[Symbol, top],
64
+ updated: String,
65
+ creator: String?,
66
+ updater: String?
67
+ }
68
+
69
+ type allowed_preference = :snooze | :channel_preferences
70
+
71
+ module AllowedPreference
72
+ extend Courier::Internal::Type::Enum
73
+
74
+ SNOOZE: :snooze
75
+ CHANNEL_PREFERENCES: :channel_preferences
76
+
77
+ def self?.values: -> ::Array[Courier::Models::PreferenceTopicGetResponse::allowed_preference]
78
+ end
79
+
80
+ type default_status = :OPTED_OUT | :OPTED_IN | :REQUIRED
81
+
82
+ module DefaultStatus
83
+ extend Courier::Internal::Type::Enum
84
+
85
+ OPTED_OUT: :OPTED_OUT
86
+ OPTED_IN: :OPTED_IN
87
+ REQUIRED: :REQUIRED
88
+
89
+ def self?.values: -> ::Array[Courier::Models::PreferenceTopicGetResponse::default_status]
90
+ end
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,16 @@
1
+ module Courier
2
+ module Models
3
+ type preference_topic_list_response =
4
+ { results: ::Array[Courier::PreferenceTopicGetResponse] }
5
+
6
+ class PreferenceTopicListResponse < Courier::Internal::Type::BaseModel
7
+ attr_accessor results: ::Array[Courier::PreferenceTopicGetResponse]
8
+
9
+ def initialize: (
10
+ results: ::Array[Courier::PreferenceTopicGetResponse]
11
+ ) -> void
12
+
13
+ def to_hash: -> { results: ::Array[Courier::PreferenceTopicGetResponse] }
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,68 @@
1
+ module Courier
2
+ module Models
3
+ type preference_topic_replace_request =
4
+ {
5
+ default_status: Courier::Models::PreferenceTopicReplaceRequest::default_status,
6
+ name: String,
7
+ allowed_preferences: ::Array[Courier::Models::PreferenceTopicReplaceRequest::allowed_preference]?,
8
+ include_unsubscribe_header: bool?,
9
+ routing_options: ::Array[Courier::Models::channel_classification]?,
10
+ topic_data: ::Hash[Symbol, top]?
11
+ }
12
+
13
+ class PreferenceTopicReplaceRequest < Courier::Internal::Type::BaseModel
14
+ attr_accessor default_status: Courier::Models::PreferenceTopicReplaceRequest::default_status
15
+
16
+ attr_accessor name: String
17
+
18
+ attr_accessor allowed_preferences: ::Array[Courier::Models::PreferenceTopicReplaceRequest::allowed_preference]?
19
+
20
+ attr_accessor include_unsubscribe_header: bool?
21
+
22
+ attr_accessor routing_options: ::Array[Courier::Models::channel_classification]?
23
+
24
+ attr_accessor topic_data: ::Hash[Symbol, top]?
25
+
26
+ def initialize: (
27
+ default_status: Courier::Models::PreferenceTopicReplaceRequest::default_status,
28
+ name: String,
29
+ ?allowed_preferences: ::Array[Courier::Models::PreferenceTopicReplaceRequest::allowed_preference]?,
30
+ ?include_unsubscribe_header: bool?,
31
+ ?routing_options: ::Array[Courier::Models::channel_classification]?,
32
+ ?topic_data: ::Hash[Symbol, top]?
33
+ ) -> void
34
+
35
+ def to_hash: -> {
36
+ default_status: Courier::Models::PreferenceTopicReplaceRequest::default_status,
37
+ name: String,
38
+ allowed_preferences: ::Array[Courier::Models::PreferenceTopicReplaceRequest::allowed_preference]?,
39
+ include_unsubscribe_header: bool?,
40
+ routing_options: ::Array[Courier::Models::channel_classification]?,
41
+ topic_data: ::Hash[Symbol, top]?
42
+ }
43
+
44
+ type default_status = :OPTED_OUT | :OPTED_IN | :REQUIRED
45
+
46
+ module DefaultStatus
47
+ extend Courier::Internal::Type::Enum
48
+
49
+ OPTED_OUT: :OPTED_OUT
50
+ OPTED_IN: :OPTED_IN
51
+ REQUIRED: :REQUIRED
52
+
53
+ def self?.values: -> ::Array[Courier::Models::PreferenceTopicReplaceRequest::default_status]
54
+ end
55
+
56
+ type allowed_preference = :snooze | :channel_preferences
57
+
58
+ module AllowedPreference
59
+ extend Courier::Internal::Type::Enum
60
+
61
+ SNOOZE: :snooze
62
+ CHANNEL_PREFERENCES: :channel_preferences
63
+
64
+ def self?.values: -> ::Array[Courier::Models::PreferenceTopicReplaceRequest::allowed_preference]
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,40 @@
1
+ module Courier
2
+ module Models
3
+ type publish_preferences_response =
4
+ {
5
+ page_id: String,
6
+ published_at: String,
7
+ published_version: Float,
8
+ preview_url: String?,
9
+ published_by: String?
10
+ }
11
+
12
+ class PublishPreferencesResponse < Courier::Internal::Type::BaseModel
13
+ attr_accessor page_id: String
14
+
15
+ attr_accessor published_at: String
16
+
17
+ attr_accessor published_version: Float
18
+
19
+ attr_accessor preview_url: String?
20
+
21
+ attr_accessor published_by: String?
22
+
23
+ def initialize: (
24
+ page_id: String,
25
+ published_at: String,
26
+ published_version: Float,
27
+ ?preview_url: String?,
28
+ ?published_by: String?
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ page_id: String,
33
+ published_at: String,
34
+ published_version: Float,
35
+ preview_url: String?,
36
+ published_by: String?
37
+ }
38
+ end
39
+ end
40
+ end
@@ -361,8 +361,38 @@ module Courier
361
361
 
362
362
  class Preference = Courier::Models::Preference
363
363
 
364
+ class PreferenceSectionArchiveParams = Courier::Models::PreferenceSectionArchiveParams
365
+
366
+ class PreferenceSectionCreateParams = Courier::Models::PreferenceSectionCreateParams
367
+
368
+ class PreferenceSectionCreateRequest = Courier::Models::PreferenceSectionCreateRequest
369
+
370
+ class PreferenceSectionGetResponse = Courier::Models::PreferenceSectionGetResponse
371
+
372
+ class PreferenceSectionListParams = Courier::Models::PreferenceSectionListParams
373
+
374
+ class PreferenceSectionListResponse = Courier::Models::PreferenceSectionListResponse
375
+
376
+ class PreferenceSectionPublishParams = Courier::Models::PreferenceSectionPublishParams
377
+
378
+ class PreferenceSectionReplaceParams = Courier::Models::PreferenceSectionReplaceParams
379
+
380
+ class PreferenceSectionReplaceRequest = Courier::Models::PreferenceSectionReplaceRequest
381
+
382
+ class PreferenceSectionRetrieveParams = Courier::Models::PreferenceSectionRetrieveParams
383
+
384
+ module PreferenceSections = Courier::Models::PreferenceSections
385
+
364
386
  module PreferenceStatus = Courier::Models::PreferenceStatus
365
387
 
388
+ class PreferenceTopicCreateRequest = Courier::Models::PreferenceTopicCreateRequest
389
+
390
+ class PreferenceTopicGetResponse = Courier::Models::PreferenceTopicGetResponse
391
+
392
+ class PreferenceTopicListResponse = Courier::Models::PreferenceTopicListResponse
393
+
394
+ class PreferenceTopicReplaceRequest = Courier::Models::PreferenceTopicReplaceRequest
395
+
366
396
  class ProfileCreateParams = Courier::Models::ProfileCreateParams
367
397
 
368
398
  class ProfileDeleteParams = Courier::Models::ProfileDeleteParams
@@ -391,6 +421,8 @@ module Courier
391
421
 
392
422
  class ProviderUpdateParams = Courier::Models::ProviderUpdateParams
393
423
 
424
+ class PublishPreferencesResponse = Courier::Models::PublishPreferencesResponse
425
+
394
426
  class PutSubscriptionsRecipient = Courier::Models::PutSubscriptionsRecipient
395
427
 
396
428
  class PutTenantTemplateRequest = Courier::Models::PutTenantTemplateRequest
@@ -0,0 +1,49 @@
1
+ module Courier
2
+ module Resources
3
+ class PreferenceSections
4
+ class Topics
5
+ def create: (
6
+ String section_id,
7
+ default_status: Courier::Models::PreferenceTopicCreateRequest::default_status,
8
+ name: String,
9
+ ?allowed_preferences: ::Array[Courier::Models::PreferenceTopicCreateRequest::allowed_preference]?,
10
+ ?include_unsubscribe_header: bool?,
11
+ ?routing_options: ::Array[Courier::Models::channel_classification]?,
12
+ ?topic_data: ::Hash[Symbol, top]?,
13
+ ?request_options: Courier::request_opts
14
+ ) -> Courier::PreferenceTopicGetResponse
15
+
16
+ def retrieve: (
17
+ String topic_id,
18
+ section_id: String,
19
+ ?request_options: Courier::request_opts
20
+ ) -> Courier::PreferenceTopicGetResponse
21
+
22
+ def list: (
23
+ String section_id,
24
+ ?request_options: Courier::request_opts
25
+ ) -> Courier::PreferenceTopicListResponse
26
+
27
+ def archive: (
28
+ String topic_id,
29
+ section_id: String,
30
+ ?request_options: Courier::request_opts
31
+ ) -> nil
32
+
33
+ def replace: (
34
+ String topic_id,
35
+ section_id: String,
36
+ default_status: Courier::Models::PreferenceTopicReplaceRequest::default_status,
37
+ name: String,
38
+ ?allowed_preferences: ::Array[Courier::Models::PreferenceTopicReplaceRequest::allowed_preference]?,
39
+ ?include_unsubscribe_header: bool?,
40
+ ?routing_options: ::Array[Courier::Models::channel_classification]?,
41
+ ?topic_data: ::Hash[Symbol, top]?,
42
+ ?request_options: Courier::request_opts
43
+ ) -> Courier::PreferenceTopicGetResponse
44
+
45
+ def initialize: (client: Courier::Client) -> void
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,42 @@
1
+ module Courier
2
+ module Resources
3
+ class PreferenceSections
4
+ attr_reader topics: Courier::Resources::PreferenceSections::Topics
5
+
6
+ def create: (
7
+ name: String,
8
+ ?has_custom_routing: bool?,
9
+ ?routing_options: ::Array[Courier::Models::channel_classification]?,
10
+ ?request_options: Courier::request_opts
11
+ ) -> Courier::PreferenceSectionGetResponse
12
+
13
+ def retrieve: (
14
+ String section_id,
15
+ ?request_options: Courier::request_opts
16
+ ) -> Courier::PreferenceSectionGetResponse
17
+
18
+ def list: (
19
+ ?request_options: Courier::request_opts
20
+ ) -> Courier::PreferenceSectionListResponse
21
+
22
+ def archive: (
23
+ String section_id,
24
+ ?request_options: Courier::request_opts
25
+ ) -> nil
26
+
27
+ def publish: (
28
+ ?request_options: Courier::request_opts
29
+ ) -> Courier::PublishPreferencesResponse
30
+
31
+ def replace: (
32
+ String section_id,
33
+ name: String,
34
+ ?has_custom_routing: bool?,
35
+ ?routing_options: ::Array[Courier::Models::channel_classification]?,
36
+ ?request_options: Courier::request_opts
37
+ ) -> Courier::PreferenceSectionGetResponse
38
+
39
+ def initialize: (client: Courier::Client) -> void
40
+ end
41
+ end
42
+ end