prelude-sdk 0.1.0 → 0.2.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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +9 -9
  4. data/lib/prelude_sdk/client.rb +4 -0
  5. data/lib/prelude_sdk/models/notify_get_subscription_config_params.rb +14 -0
  6. data/lib/prelude_sdk/models/notify_get_subscription_config_response.rb +120 -0
  7. data/lib/prelude_sdk/models/notify_get_subscription_phone_number_params.rb +20 -0
  8. data/lib/prelude_sdk/models/notify_get_subscription_phone_number_response.rb +104 -0
  9. data/lib/prelude_sdk/models/notify_list_subscription_configs_params.rb +30 -0
  10. data/lib/prelude_sdk/models/notify_list_subscription_configs_response.rb +144 -0
  11. data/lib/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rb +37 -0
  12. data/lib/prelude_sdk/models/notify_list_subscription_phone_number_events_response.rb +132 -0
  13. data/lib/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rb +49 -0
  14. data/lib/prelude_sdk/models/notify_list_subscription_phone_numbers_response.rb +132 -0
  15. data/lib/prelude_sdk/models/notify_send_batch_params.rb +110 -0
  16. data/lib/prelude_sdk/models/notify_send_batch_response.rb +201 -0
  17. data/lib/prelude_sdk/models/notify_send_params.rb +118 -0
  18. data/lib/prelude_sdk/models/notify_send_response.rb +94 -0
  19. data/lib/prelude_sdk/models.rb +15 -0
  20. data/lib/prelude_sdk/resources/notify.rb +247 -0
  21. data/lib/prelude_sdk/version.rb +1 -1
  22. data/lib/prelude_sdk.rb +16 -0
  23. data/manifest.yaml +1 -0
  24. data/rbi/prelude_sdk/client.rbi +3 -0
  25. data/rbi/prelude_sdk/models/notify_get_subscription_config_params.rbi +30 -0
  26. data/rbi/prelude_sdk/models/notify_get_subscription_config_response.rbi +224 -0
  27. data/rbi/prelude_sdk/models/notify_get_subscription_phone_number_params.rbi +38 -0
  28. data/rbi/prelude_sdk/models/notify_get_subscription_phone_number_response.rbi +199 -0
  29. data/rbi/prelude_sdk/models/notify_list_subscription_configs_params.rbi +60 -0
  30. data/rbi/prelude_sdk/models/notify_list_subscription_configs_response.rbi +286 -0
  31. data/rbi/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbi +66 -0
  32. data/rbi/prelude_sdk/models/notify_list_subscription_phone_number_events_response.rbi +259 -0
  33. data/rbi/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbi +119 -0
  34. data/rbi/prelude_sdk/models/notify_list_subscription_phone_numbers_response.rbi +259 -0
  35. data/rbi/prelude_sdk/models/notify_send_batch_params.rbi +191 -0
  36. data/rbi/prelude_sdk/models/notify_send_batch_response.rbi +360 -0
  37. data/rbi/prelude_sdk/models/notify_send_params.rbi +201 -0
  38. data/rbi/prelude_sdk/models/notify_send_response.rbi +128 -0
  39. data/rbi/prelude_sdk/models.rbi +19 -0
  40. data/rbi/prelude_sdk/resources/notify.rbi +218 -0
  41. data/sig/prelude_sdk/client.rbs +2 -0
  42. data/sig/prelude_sdk/models/notify_get_subscription_config_params.rbs +15 -0
  43. data/sig/prelude_sdk/models/notify_get_subscription_config_response.rbs +95 -0
  44. data/sig/prelude_sdk/models/notify_get_subscription_phone_number_params.rbs +23 -0
  45. data/sig/prelude_sdk/models/notify_get_subscription_phone_number_response.rbs +71 -0
  46. data/sig/prelude_sdk/models/notify_list_subscription_configs_params.rbs +32 -0
  47. data/sig/prelude_sdk/models/notify_list_subscription_configs_response.rbs +119 -0
  48. data/sig/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbs +36 -0
  49. data/sig/prelude_sdk/models/notify_list_subscription_phone_number_events_response.rbs +95 -0
  50. data/sig/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbs +55 -0
  51. data/sig/prelude_sdk/models/notify_list_subscription_phone_numbers_response.rbs +95 -0
  52. data/sig/prelude_sdk/models/notify_send_batch_params.rbs +100 -0
  53. data/sig/prelude_sdk/models/notify_send_batch_response.rbs +187 -0
  54. data/sig/prelude_sdk/models/notify_send_params.rbs +100 -0
  55. data/sig/prelude_sdk/models/notify_send_response.rbs +73 -0
  56. data/sig/prelude_sdk/models.rbs +14 -0
  57. data/sig/prelude_sdk/resources/notify.rbs +68 -0
  58. metadata +47 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdd2764aef5a2905ae9ff686383745a878831c2402b1858f60025c4185f9fce1
4
- data.tar.gz: be34c995e5c189bd7bfc38a03f30d0e399376ffdbb70f42c3776f64df56de7e4
3
+ metadata.gz: 20bf770b210bf23b3214f6dc77fd7e2f74a96869d52c7f96788a548a87c8afb0
4
+ data.tar.gz: fcb6a885d033659e8a2d8f7c91b97e04cf9df00ac8da6ad1392961f77f52c525
5
5
  SHA512:
6
- metadata.gz: 953de3f45bdc0854d720388783118e6daff94fcfda5fa3de09bace85598b61e7165f87ac2439f1c275822e80f6811d711c055d2d8b5399824aec74f2dd715208
7
- data.tar.gz: c7b590b961d3bcdb03aafbcc97fa3d4c80e0ac59a70a2dd79451000fe300b702c90a1cb30f7a6fa8c0604c73365f4e5fbb0da7a05e0df2aa77a1ee672ce5e008
6
+ metadata.gz: 2797a1a23e09c4a7038ac2f06a86d491c1505c734d7fecaea592b7d0fc125818a1517cab2d1431229c3cf1634b8847c754e58b511c7d7968517f2095a3aa1536
7
+ data.tar.gz: 5bdad09b05d0f22ceba1f75fd9b3fbf7f045331729c288ae938b78de419a378382469347e1ea50ab7f6fcf044f3ffe120ff27136c995ea163bad08987991840c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0 (2025-12-05)
4
+
5
+ Full Changelog: [v0.1.0...v0.2.0](https://github.com/prelude-so/ruby-sdk/compare/v0.1.0...v0.2.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add Notify API methods ([8ce7793](https://github.com/prelude-so/ruby-sdk/commit/8ce7793912b2b074deaa66c32e4cc2b7d0873623))
10
+
11
+
12
+ ### Chores
13
+
14
+ * explicitly require "base64" gem ([ce6be23](https://github.com/prelude-so/ruby-sdk/commit/ce6be23941786dfe0ed1356b31eb65014da48407))
15
+
3
16
  ## 0.1.0 (2025-11-17)
4
17
 
5
18
  Full Changelog: [v0.1.0-alpha.3...v0.1.0](https://github.com/prelude-so/ruby-sdk/compare/v0.1.0-alpha.3...v0.1.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "prelude-sdk", "~> 0.1.0"
20
+ gem "prelude-sdk", "~> 0.2.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -207,25 +207,25 @@ prelude.verification.create(**params)
207
207
  Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:
208
208
 
209
209
  ```ruby
210
- # :allow
211
- puts(PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action::ALLOW)
210
+ # :SUB
211
+ puts(PreludeSDK::NotifyListSubscriptionPhoneNumbersParams::State::SUB)
212
212
 
213
- # Revealed type: `T.all(PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action, Symbol)`
214
- T.reveal_type(PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action::ALLOW)
213
+ # Revealed type: `T.all(PreludeSDK::NotifyListSubscriptionPhoneNumbersParams::State, Symbol)`
214
+ T.reveal_type(PreludeSDK::NotifyListSubscriptionPhoneNumbersParams::State::SUB)
215
215
  ```
216
216
 
217
217
  Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:
218
218
 
219
219
  ```ruby
220
220
  # Using the enum constants preserves the tagged type information:
221
- prelude.verification_management.delete_phone_number(
222
- action: PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action::ALLOW,
221
+ prelude.notify.list_subscription_phone_numbers(
222
+ state: PreludeSDK::NotifyListSubscriptionPhoneNumbersParams::State::SUB,
223
223
  # …
224
224
  )
225
225
 
226
226
  # Literal values are also permissible:
227
- prelude.verification_management.delete_phone_number(
228
- action: :allow,
227
+ prelude.notify.list_subscription_phone_numbers(
228
+ state: :SUB,
229
229
  # …
230
230
  )
231
231
  ```
@@ -22,6 +22,9 @@ module PreludeSDK
22
22
  # @return [PreludeSDK::Resources::Lookup]
23
23
  attr_reader :lookup
24
24
 
25
+ # @return [PreludeSDK::Resources::Notify]
26
+ attr_reader :notify
27
+
25
28
  # @return [PreludeSDK::Resources::Transactional]
26
29
  attr_reader :transactional
27
30
 
@@ -82,6 +85,7 @@ module PreludeSDK
82
85
  )
83
86
 
84
87
  @lookup = PreludeSDK::Resources::Lookup.new(client: self)
88
+ @notify = PreludeSDK::Resources::Notify.new(client: self)
85
89
  @transactional = PreludeSDK::Resources::Transactional.new(client: self)
86
90
  @verification = PreludeSDK::Resources::Verification.new(client: self)
87
91
  @verification_management = PreludeSDK::Resources::VerificationManagement.new(client: self)
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PreludeSDK
4
+ module Models
5
+ # @see PreludeSDK::Resources::Notify#get_subscription_config
6
+ class NotifyGetSubscriptionConfigParams < PreludeSDK::Internal::Type::BaseModel
7
+ extend PreludeSDK::Internal::Type::RequestParameters::Converter
8
+ include PreludeSDK::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,120 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PreludeSDK
4
+ module Models
5
+ # @see PreludeSDK::Resources::Notify#get_subscription_config
6
+ class NotifyGetSubscriptionConfigResponse < PreludeSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The subscription configuration ID.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute callback_url
14
+ # The URL to call when subscription status changes.
15
+ #
16
+ # @return [String]
17
+ required :callback_url, String
18
+
19
+ # @!attribute created_at
20
+ # The date and time when the configuration was created.
21
+ #
22
+ # @return [Time]
23
+ required :created_at, Time
24
+
25
+ # @!attribute messages
26
+ # The subscription messages configuration.
27
+ #
28
+ # @return [PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::Messages]
29
+ required :messages, -> { PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::Messages }
30
+
31
+ # @!attribute name
32
+ # The human-readable name for the subscription configuration.
33
+ #
34
+ # @return [String]
35
+ required :name, String
36
+
37
+ # @!attribute updated_at
38
+ # The date and time when the configuration was last updated.
39
+ #
40
+ # @return [Time]
41
+ required :updated_at, Time
42
+
43
+ # @!attribute mo_phone_numbers
44
+ # A list of phone numbers for receiving inbound messages.
45
+ #
46
+ # @return [Array<PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::MoPhoneNumber>, nil]
47
+ optional :mo_phone_numbers,
48
+ -> { PreludeSDK::Internal::Type::ArrayOf[PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::MoPhoneNumber] }
49
+
50
+ # @!method initialize(id:, callback_url:, created_at:, messages:, name:, updated_at:, mo_phone_numbers: nil)
51
+ # @param id [String] The subscription configuration ID.
52
+ #
53
+ # @param callback_url [String] The URL to call when subscription status changes.
54
+ #
55
+ # @param created_at [Time] The date and time when the configuration was created.
56
+ #
57
+ # @param messages [PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::Messages] The subscription messages configuration.
58
+ #
59
+ # @param name [String] The human-readable name for the subscription configuration.
60
+ #
61
+ # @param updated_at [Time] The date and time when the configuration was last updated.
62
+ #
63
+ # @param mo_phone_numbers [Array<PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::MoPhoneNumber>] A list of phone numbers for receiving inbound messages.
64
+
65
+ # @see PreludeSDK::Models::NotifyGetSubscriptionConfigResponse#messages
66
+ class Messages < PreludeSDK::Internal::Type::BaseModel
67
+ # @!attribute help_message
68
+ # Message sent when user requests help.
69
+ #
70
+ # @return [String, nil]
71
+ optional :help_message, String
72
+
73
+ # @!attribute start_message
74
+ # Message sent when user subscribes.
75
+ #
76
+ # @return [String, nil]
77
+ optional :start_message, String
78
+
79
+ # @!attribute stop_message
80
+ # Message sent when user unsubscribes.
81
+ #
82
+ # @return [String, nil]
83
+ optional :stop_message, String
84
+
85
+ # @!method initialize(help_message: nil, start_message: nil, stop_message: nil)
86
+ # The subscription messages configuration.
87
+ #
88
+ # @param help_message [String] Message sent when user requests help.
89
+ #
90
+ # @param start_message [String] Message sent when user subscribes.
91
+ #
92
+ # @param stop_message [String] Message sent when user unsubscribes.
93
+ end
94
+
95
+ class MoPhoneNumber < PreludeSDK::Internal::Type::BaseModel
96
+ # @!attribute country_code
97
+ # The ISO 3166-1 alpha-2 country code.
98
+ #
99
+ # @return [String]
100
+ required :country_code, String
101
+
102
+ # @!attribute phone_number
103
+ # The phone number in E.164 format for long codes, or short code format for short
104
+ # codes.
105
+ #
106
+ # @return [String]
107
+ required :phone_number, String
108
+
109
+ # @!method initialize(country_code:, phone_number:)
110
+ # Some parameter documentations has been truncated, see
111
+ # {PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::MoPhoneNumber} for
112
+ # more details.
113
+ #
114
+ # @param country_code [String] The ISO 3166-1 alpha-2 country code.
115
+ #
116
+ # @param phone_number [String] The phone number in E.164 format for long codes, or short code format for short
117
+ end
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PreludeSDK
4
+ module Models
5
+ # @see PreludeSDK::Resources::Notify#get_subscription_phone_number
6
+ class NotifyGetSubscriptionPhoneNumberParams < PreludeSDK::Internal::Type::BaseModel
7
+ extend PreludeSDK::Internal::Type::RequestParameters::Converter
8
+ include PreludeSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute config_id
11
+ #
12
+ # @return [String]
13
+ required :config_id, String
14
+
15
+ # @!method initialize(config_id:, request_options: {})
16
+ # @param config_id [String]
17
+ # @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PreludeSDK
4
+ module Models
5
+ # @see PreludeSDK::Resources::Notify#get_subscription_phone_number
6
+ class NotifyGetSubscriptionPhoneNumberResponse < PreludeSDK::Internal::Type::BaseModel
7
+ # @!attribute config_id
8
+ # The subscription configuration ID.
9
+ #
10
+ # @return [String]
11
+ required :config_id, String
12
+
13
+ # @!attribute phone_number
14
+ # The phone number in E.164 format.
15
+ #
16
+ # @return [String]
17
+ required :phone_number, String
18
+
19
+ # @!attribute source
20
+ # How the subscription state was changed:
21
+ #
22
+ # - `MO_KEYWORD` - User sent a keyword (STOP/START)
23
+ # - `API` - Changed via API
24
+ # - `CSV_IMPORT` - Imported from CSV
25
+ # - `CARRIER_DISCONNECT` - Automatically unsubscribed due to carrier disconnect
26
+ #
27
+ # @return [Symbol, PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::Source]
28
+ required :source, enum: -> { PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::Source }
29
+
30
+ # @!attribute state
31
+ # The subscription state:
32
+ #
33
+ # - `SUB` - Subscribed (user can receive marketing messages)
34
+ # - `UNSUB` - Unsubscribed (user has opted out)
35
+ #
36
+ # @return [Symbol, PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::State]
37
+ required :state, enum: -> { PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::State }
38
+
39
+ # @!attribute updated_at
40
+ # The date and time when the subscription status was last updated.
41
+ #
42
+ # @return [Time]
43
+ required :updated_at, Time
44
+
45
+ # @!attribute reason
46
+ # Additional context about the state change (e.g., the keyword that was sent).
47
+ #
48
+ # @return [String, nil]
49
+ optional :reason, String
50
+
51
+ # @!method initialize(config_id:, phone_number:, source:, state:, updated_at:, reason: nil)
52
+ # Some parameter documentations has been truncated, see
53
+ # {PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse} for more details.
54
+ #
55
+ # @param config_id [String] The subscription configuration ID.
56
+ #
57
+ # @param phone_number [String] The phone number in E.164 format.
58
+ #
59
+ # @param source [Symbol, PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::Source] How the subscription state was changed:
60
+ #
61
+ # @param state [Symbol, PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::State] The subscription state:
62
+ #
63
+ # @param updated_at [Time] The date and time when the subscription status was last updated.
64
+ #
65
+ # @param reason [String] Additional context about the state change (e.g., the keyword that was sent).
66
+
67
+ # How the subscription state was changed:
68
+ #
69
+ # - `MO_KEYWORD` - User sent a keyword (STOP/START)
70
+ # - `API` - Changed via API
71
+ # - `CSV_IMPORT` - Imported from CSV
72
+ # - `CARRIER_DISCONNECT` - Automatically unsubscribed due to carrier disconnect
73
+ #
74
+ # @see PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse#source
75
+ module Source
76
+ extend PreludeSDK::Internal::Type::Enum
77
+
78
+ MO_KEYWORD = :MO_KEYWORD
79
+ API = :API
80
+ CSV_IMPORT = :CSV_IMPORT
81
+ CARRIER_DISCONNECT = :CARRIER_DISCONNECT
82
+
83
+ # @!method self.values
84
+ # @return [Array<Symbol>]
85
+ end
86
+
87
+ # The subscription state:
88
+ #
89
+ # - `SUB` - Subscribed (user can receive marketing messages)
90
+ # - `UNSUB` - Unsubscribed (user has opted out)
91
+ #
92
+ # @see PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse#state
93
+ module State
94
+ extend PreludeSDK::Internal::Type::Enum
95
+
96
+ SUB = :SUB
97
+ UNSUB = :UNSUB
98
+
99
+ # @!method self.values
100
+ # @return [Array<Symbol>]
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PreludeSDK
4
+ module Models
5
+ # @see PreludeSDK::Resources::Notify#list_subscription_configs
6
+ class NotifyListSubscriptionConfigsParams < PreludeSDK::Internal::Type::BaseModel
7
+ extend PreludeSDK::Internal::Type::RequestParameters::Converter
8
+ include PreludeSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute cursor
11
+ # Pagination cursor from the previous response
12
+ #
13
+ # @return [String, nil]
14
+ optional :cursor, String
15
+
16
+ # @!attribute limit
17
+ # Maximum number of configurations to return per page
18
+ #
19
+ # @return [Integer, nil]
20
+ optional :limit, Integer
21
+
22
+ # @!method initialize(cursor: nil, limit: nil, request_options: {})
23
+ # @param cursor [String] Pagination cursor from the previous response
24
+ #
25
+ # @param limit [Integer] Maximum number of configurations to return per page
26
+ #
27
+ # @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,144 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PreludeSDK
4
+ module Models
5
+ # @see PreludeSDK::Resources::Notify#list_subscription_configs
6
+ class NotifyListSubscriptionConfigsResponse < PreludeSDK::Internal::Type::BaseModel
7
+ # @!attribute configs
8
+ # A list of subscription management configurations.
9
+ #
10
+ # @return [Array<PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config>]
11
+ required :configs,
12
+ -> { PreludeSDK::Internal::Type::ArrayOf[PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config] }
13
+
14
+ # @!attribute next_cursor
15
+ # Pagination cursor for the next page of results. Omitted if there are no more
16
+ # pages.
17
+ #
18
+ # @return [String, nil]
19
+ optional :next_cursor, String
20
+
21
+ # @!method initialize(configs:, next_cursor: nil)
22
+ # Some parameter documentations has been truncated, see
23
+ # {PreludeSDK::Models::NotifyListSubscriptionConfigsResponse} for more details.
24
+ #
25
+ # @param configs [Array<PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config>] A list of subscription management configurations.
26
+ #
27
+ # @param next_cursor [String] Pagination cursor for the next page of results. Omitted if there are no more pag
28
+
29
+ class Config < PreludeSDK::Internal::Type::BaseModel
30
+ # @!attribute id
31
+ # The subscription configuration ID.
32
+ #
33
+ # @return [String]
34
+ required :id, String
35
+
36
+ # @!attribute callback_url
37
+ # The URL to call when subscription status changes.
38
+ #
39
+ # @return [String]
40
+ required :callback_url, String
41
+
42
+ # @!attribute created_at
43
+ # The date and time when the configuration was created.
44
+ #
45
+ # @return [Time]
46
+ required :created_at, Time
47
+
48
+ # @!attribute messages
49
+ # The subscription messages configuration.
50
+ #
51
+ # @return [PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::Messages]
52
+ required :messages, -> { PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::Messages }
53
+
54
+ # @!attribute name
55
+ # The human-readable name for the subscription configuration.
56
+ #
57
+ # @return [String]
58
+ required :name, String
59
+
60
+ # @!attribute updated_at
61
+ # The date and time when the configuration was last updated.
62
+ #
63
+ # @return [Time]
64
+ required :updated_at, Time
65
+
66
+ # @!attribute mo_phone_numbers
67
+ # A list of phone numbers for receiving inbound messages.
68
+ #
69
+ # @return [Array<PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::MoPhoneNumber>, nil]
70
+ optional :mo_phone_numbers,
71
+ -> { PreludeSDK::Internal::Type::ArrayOf[PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::MoPhoneNumber] }
72
+
73
+ # @!method initialize(id:, callback_url:, created_at:, messages:, name:, updated_at:, mo_phone_numbers: nil)
74
+ # @param id [String] The subscription configuration ID.
75
+ #
76
+ # @param callback_url [String] The URL to call when subscription status changes.
77
+ #
78
+ # @param created_at [Time] The date and time when the configuration was created.
79
+ #
80
+ # @param messages [PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::Messages] The subscription messages configuration.
81
+ #
82
+ # @param name [String] The human-readable name for the subscription configuration.
83
+ #
84
+ # @param updated_at [Time] The date and time when the configuration was last updated.
85
+ #
86
+ # @param mo_phone_numbers [Array<PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::MoPhoneNumber>] A list of phone numbers for receiving inbound messages.
87
+
88
+ # @see PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config#messages
89
+ class Messages < PreludeSDK::Internal::Type::BaseModel
90
+ # @!attribute help_message
91
+ # Message sent when user requests help.
92
+ #
93
+ # @return [String, nil]
94
+ optional :help_message, String
95
+
96
+ # @!attribute start_message
97
+ # Message sent when user subscribes.
98
+ #
99
+ # @return [String, nil]
100
+ optional :start_message, String
101
+
102
+ # @!attribute stop_message
103
+ # Message sent when user unsubscribes.
104
+ #
105
+ # @return [String, nil]
106
+ optional :stop_message, String
107
+
108
+ # @!method initialize(help_message: nil, start_message: nil, stop_message: nil)
109
+ # The subscription messages configuration.
110
+ #
111
+ # @param help_message [String] Message sent when user requests help.
112
+ #
113
+ # @param start_message [String] Message sent when user subscribes.
114
+ #
115
+ # @param stop_message [String] Message sent when user unsubscribes.
116
+ end
117
+
118
+ class MoPhoneNumber < PreludeSDK::Internal::Type::BaseModel
119
+ # @!attribute country_code
120
+ # The ISO 3166-1 alpha-2 country code.
121
+ #
122
+ # @return [String]
123
+ required :country_code, String
124
+
125
+ # @!attribute phone_number
126
+ # The phone number in E.164 format for long codes, or short code format for short
127
+ # codes.
128
+ #
129
+ # @return [String]
130
+ required :phone_number, String
131
+
132
+ # @!method initialize(country_code:, phone_number:)
133
+ # Some parameter documentations has been truncated, see
134
+ # {PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::MoPhoneNumber}
135
+ # for more details.
136
+ #
137
+ # @param country_code [String] The ISO 3166-1 alpha-2 country code.
138
+ #
139
+ # @param phone_number [String] The phone number in E.164 format for long codes, or short code format for short
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PreludeSDK
4
+ module Models
5
+ # @see PreludeSDK::Resources::Notify#list_subscription_phone_number_events
6
+ class NotifyListSubscriptionPhoneNumberEventsParams < PreludeSDK::Internal::Type::BaseModel
7
+ extend PreludeSDK::Internal::Type::RequestParameters::Converter
8
+ include PreludeSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute config_id
11
+ #
12
+ # @return [String]
13
+ required :config_id, String
14
+
15
+ # @!attribute cursor
16
+ # Pagination cursor from the previous response
17
+ #
18
+ # @return [String, nil]
19
+ optional :cursor, String
20
+
21
+ # @!attribute limit
22
+ # Maximum number of events to return per page
23
+ #
24
+ # @return [Integer, nil]
25
+ optional :limit, Integer
26
+
27
+ # @!method initialize(config_id:, cursor: nil, limit: nil, request_options: {})
28
+ # @param config_id [String]
29
+ #
30
+ # @param cursor [String] Pagination cursor from the previous response
31
+ #
32
+ # @param limit [Integer] Maximum number of events to return per page
33
+ #
34
+ # @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
35
+ end
36
+ end
37
+ end