prelude-sdk 0.1.0.pre.alpha.3 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +58 -0
- data/README.md +29 -1
- data/lib/prelude_sdk/client.rb +8 -0
- data/lib/prelude_sdk/errors.rb +25 -11
- data/lib/prelude_sdk/file_part.rb +10 -7
- data/lib/prelude_sdk/internal/transport/base_client.rb +18 -8
- data/lib/prelude_sdk/internal/transport/pooled_net_requester.rb +40 -33
- data/lib/prelude_sdk/internal/type/base_page.rb +1 -1
- data/lib/prelude_sdk/internal/type/file_input.rb +7 -4
- data/lib/prelude_sdk/internal/util.rb +8 -7
- data/lib/prelude_sdk/models/notify_get_subscription_config_params.rb +14 -0
- data/lib/prelude_sdk/models/notify_get_subscription_config_response.rb +120 -0
- data/lib/prelude_sdk/models/notify_get_subscription_phone_number_params.rb +20 -0
- data/lib/prelude_sdk/models/notify_get_subscription_phone_number_response.rb +104 -0
- data/lib/prelude_sdk/models/notify_list_subscription_configs_params.rb +30 -0
- data/lib/prelude_sdk/models/notify_list_subscription_configs_response.rb +144 -0
- data/lib/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rb +37 -0
- data/lib/prelude_sdk/models/notify_list_subscription_phone_number_events_response.rb +132 -0
- data/lib/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rb +49 -0
- data/lib/prelude_sdk/models/notify_list_subscription_phone_numbers_response.rb +132 -0
- data/lib/prelude_sdk/models/notify_send_batch_params.rb +110 -0
- data/lib/prelude_sdk/models/notify_send_batch_response.rb +201 -0
- data/lib/prelude_sdk/models/notify_send_params.rb +118 -0
- data/lib/prelude_sdk/models/notify_send_response.rb +94 -0
- data/lib/prelude_sdk/models/transactional_send_params.rb +37 -1
- data/lib/prelude_sdk/models/verification_create_params.rb +45 -5
- data/lib/prelude_sdk/models/verification_create_response.rb +26 -0
- data/lib/prelude_sdk/models/verification_management_delete_phone_number_params.rb +32 -0
- data/lib/prelude_sdk/models/verification_management_delete_phone_number_response.rb +17 -0
- data/lib/prelude_sdk/models/verification_management_list_phone_numbers_params.rb +24 -0
- data/lib/prelude_sdk/models/verification_management_list_phone_numbers_response.rb +37 -0
- data/lib/prelude_sdk/models/verification_management_list_sender_ids_params.rb +14 -0
- data/lib/prelude_sdk/models/verification_management_list_sender_ids_response.rb +65 -0
- data/lib/prelude_sdk/models/verification_management_set_phone_number_params.rb +32 -0
- data/lib/prelude_sdk/models/verification_management_set_phone_number_response.rb +17 -0
- data/lib/prelude_sdk/models/verification_management_submit_sender_id_params.rb +22 -0
- data/lib/prelude_sdk/models/verification_management_submit_sender_id_response.rb +59 -0
- data/lib/prelude_sdk/models/watch_predict_params.rb +11 -1
- data/lib/prelude_sdk/models/watch_send_feedbacks_params.rb +11 -1
- data/lib/prelude_sdk/models.rb +29 -0
- data/lib/prelude_sdk/resources/notify.rb +247 -0
- data/lib/prelude_sdk/resources/transactional.rb +7 -2
- data/lib/prelude_sdk/resources/verification_management.rb +140 -0
- data/lib/prelude_sdk/version.rb +1 -1
- data/lib/prelude_sdk.rb +28 -0
- data/manifest.yaml +2 -0
- data/rbi/prelude_sdk/client.rbi +6 -0
- data/rbi/prelude_sdk/errors.rbi +29 -2
- data/rbi/prelude_sdk/file_part.rbi +1 -1
- data/rbi/prelude_sdk/internal/transport/base_client.rbi +9 -5
- data/rbi/prelude_sdk/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/prelude_sdk/internal/type/base_model.rbi +8 -4
- data/rbi/prelude_sdk/internal/type/base_page.rbi +1 -1
- data/rbi/prelude_sdk/internal/util.rbi +1 -1
- data/rbi/prelude_sdk/models/notify_get_subscription_config_params.rbi +30 -0
- data/rbi/prelude_sdk/models/notify_get_subscription_config_response.rbi +224 -0
- data/rbi/prelude_sdk/models/notify_get_subscription_phone_number_params.rbi +38 -0
- data/rbi/prelude_sdk/models/notify_get_subscription_phone_number_response.rbi +199 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_configs_params.rbi +60 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_configs_response.rbi +286 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbi +66 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_number_events_response.rbi +259 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbi +119 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_numbers_response.rbi +259 -0
- data/rbi/prelude_sdk/models/notify_send_batch_params.rbi +191 -0
- data/rbi/prelude_sdk/models/notify_send_batch_response.rbi +360 -0
- data/rbi/prelude_sdk/models/notify_send_params.rbi +201 -0
- data/rbi/prelude_sdk/models/notify_send_response.rbi +128 -0
- data/rbi/prelude_sdk/models/transactional_send_params.rbi +85 -0
- data/rbi/prelude_sdk/models/verification_create_params.rbi +97 -5
- data/rbi/prelude_sdk/models/verification_create_response.rbi +39 -0
- data/rbi/prelude_sdk/models/verification_management_delete_phone_number_params.rbi +77 -0
- data/rbi/prelude_sdk/models/verification_management_delete_phone_number_response.rbi +30 -0
- data/rbi/prelude_sdk/models/verification_management_list_phone_numbers_params.rbi +64 -0
- data/rbi/prelude_sdk/models/verification_management_list_phone_numbers_response.rbi +87 -0
- data/rbi/prelude_sdk/models/verification_management_list_sender_ids_params.rbi +30 -0
- data/rbi/prelude_sdk/models/verification_management_list_sender_ids_response.rbi +175 -0
- data/rbi/prelude_sdk/models/verification_management_set_phone_number_params.rbi +77 -0
- data/rbi/prelude_sdk/models/verification_management_set_phone_number_response.rbi +30 -0
- data/rbi/prelude_sdk/models/verification_management_submit_sender_id_params.rbi +43 -0
- data/rbi/prelude_sdk/models/verification_management_submit_sender_id_response.rbi +117 -0
- data/rbi/prelude_sdk/models/watch_predict_params.rbi +15 -0
- data/rbi/prelude_sdk/models/watch_send_feedbacks_params.rbi +15 -0
- data/rbi/prelude_sdk/models.rbi +34 -0
- data/rbi/prelude_sdk/resources/notify.rbi +218 -0
- data/rbi/prelude_sdk/resources/transactional.rbi +14 -1
- data/rbi/prelude_sdk/resources/verification_management.rbi +112 -0
- data/sig/prelude_sdk/client.rbs +4 -0
- data/sig/prelude_sdk/errors.rbs +7 -0
- data/sig/prelude_sdk/file_part.rbs +1 -1
- data/sig/prelude_sdk/internal/transport/base_client.rbs +2 -0
- data/sig/prelude_sdk/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/prelude_sdk/models/notify_get_subscription_config_params.rbs +15 -0
- data/sig/prelude_sdk/models/notify_get_subscription_config_response.rbs +95 -0
- data/sig/prelude_sdk/models/notify_get_subscription_phone_number_params.rbs +23 -0
- data/sig/prelude_sdk/models/notify_get_subscription_phone_number_response.rbs +71 -0
- data/sig/prelude_sdk/models/notify_list_subscription_configs_params.rbs +32 -0
- data/sig/prelude_sdk/models/notify_list_subscription_configs_response.rbs +119 -0
- data/sig/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbs +36 -0
- data/sig/prelude_sdk/models/notify_list_subscription_phone_number_events_response.rbs +95 -0
- data/sig/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbs +55 -0
- data/sig/prelude_sdk/models/notify_list_subscription_phone_numbers_response.rbs +95 -0
- data/sig/prelude_sdk/models/notify_send_batch_params.rbs +100 -0
- data/sig/prelude_sdk/models/notify_send_batch_response.rbs +187 -0
- data/sig/prelude_sdk/models/notify_send_params.rbs +100 -0
- data/sig/prelude_sdk/models/notify_send_response.rbs +73 -0
- data/sig/prelude_sdk/models/transactional_send_params.rbs +21 -0
- data/sig/prelude_sdk/models/verification_create_params.rbs +29 -1
- data/sig/prelude_sdk/models/verification_management_delete_phone_number_params.rbs +34 -0
- data/sig/prelude_sdk/models/verification_management_delete_phone_number_response.rbs +14 -0
- data/sig/prelude_sdk/models/verification_management_list_phone_numbers_params.rbs +26 -0
- data/sig/prelude_sdk/models/verification_management_list_phone_numbers_response.rbs +32 -0
- data/sig/prelude_sdk/models/verification_management_list_sender_ids_params.rbs +15 -0
- data/sig/prelude_sdk/models/verification_management_list_sender_ids_response.rbs +64 -0
- data/sig/prelude_sdk/models/verification_management_set_phone_number_params.rbs +34 -0
- data/sig/prelude_sdk/models/verification_management_set_phone_number_response.rbs +14 -0
- data/sig/prelude_sdk/models/verification_management_submit_sender_id_params.rbs +23 -0
- data/sig/prelude_sdk/models/verification_management_submit_sender_id_response.rbs +44 -0
- data/sig/prelude_sdk/models/watch_predict_params.rbs +7 -0
- data/sig/prelude_sdk/models/watch_send_feedbacks_params.rbs +7 -0
- data/sig/prelude_sdk/models.rbs +24 -0
- data/sig/prelude_sdk/resources/notify.rbs +68 -0
- data/sig/prelude_sdk/resources/transactional.rbs +1 -0
- data/sig/prelude_sdk/resources/verification_management.rbs +33 -0
- metadata +82 -4
|
@@ -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
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see PreludeSDK::Resources::Notify#list_subscription_phone_number_events
|
|
6
|
+
class NotifyListSubscriptionPhoneNumberEventsResponse < PreludeSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute events
|
|
8
|
+
# A list of subscription events (status changes) ordered by timestamp descending.
|
|
9
|
+
#
|
|
10
|
+
# @return [Array<PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event>]
|
|
11
|
+
required :events,
|
|
12
|
+
-> { PreludeSDK::Internal::Type::ArrayOf[PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event] }
|
|
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(events:, next_cursor: nil)
|
|
22
|
+
# Some parameter documentations has been truncated, see
|
|
23
|
+
# {PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse} for more
|
|
24
|
+
# details.
|
|
25
|
+
#
|
|
26
|
+
# @param events [Array<PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event>] A list of subscription events (status changes) ordered by timestamp descending.
|
|
27
|
+
#
|
|
28
|
+
# @param next_cursor [String] Pagination cursor for the next page of results. Omitted if there are no more pag
|
|
29
|
+
|
|
30
|
+
class Event < PreludeSDK::Internal::Type::BaseModel
|
|
31
|
+
# @!attribute config_id
|
|
32
|
+
# The subscription configuration ID.
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
required :config_id, String
|
|
36
|
+
|
|
37
|
+
# @!attribute phone_number
|
|
38
|
+
# The phone number in E.164 format.
|
|
39
|
+
#
|
|
40
|
+
# @return [String]
|
|
41
|
+
required :phone_number, String
|
|
42
|
+
|
|
43
|
+
# @!attribute source
|
|
44
|
+
# How the subscription state was changed:
|
|
45
|
+
#
|
|
46
|
+
# - `MO_KEYWORD` - User sent a keyword (STOP/START)
|
|
47
|
+
# - `API` - Changed via API
|
|
48
|
+
# - `CSV_IMPORT` - Imported from CSV
|
|
49
|
+
# - `CARRIER_DISCONNECT` - Automatically unsubscribed due to carrier disconnect
|
|
50
|
+
#
|
|
51
|
+
# @return [Symbol, PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source]
|
|
52
|
+
required :source,
|
|
53
|
+
enum: -> { PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source }
|
|
54
|
+
|
|
55
|
+
# @!attribute state
|
|
56
|
+
# The subscription state after this event:
|
|
57
|
+
#
|
|
58
|
+
# - `SUB` - Subscribed (user can receive marketing messages)
|
|
59
|
+
# - `UNSUB` - Unsubscribed (user has opted out)
|
|
60
|
+
#
|
|
61
|
+
# @return [Symbol, PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::State]
|
|
62
|
+
required :state,
|
|
63
|
+
enum: -> { PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::State }
|
|
64
|
+
|
|
65
|
+
# @!attribute timestamp
|
|
66
|
+
# The date and time when the event occurred.
|
|
67
|
+
#
|
|
68
|
+
# @return [Time]
|
|
69
|
+
required :timestamp, Time
|
|
70
|
+
|
|
71
|
+
# @!attribute reason
|
|
72
|
+
# Additional context about the state change (e.g., the keyword that was sent).
|
|
73
|
+
#
|
|
74
|
+
# @return [String, nil]
|
|
75
|
+
optional :reason, String
|
|
76
|
+
|
|
77
|
+
# @!method initialize(config_id:, phone_number:, source:, state:, timestamp:, reason: nil)
|
|
78
|
+
# Some parameter documentations has been truncated, see
|
|
79
|
+
# {PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event} for
|
|
80
|
+
# more details.
|
|
81
|
+
#
|
|
82
|
+
# @param config_id [String] The subscription configuration ID.
|
|
83
|
+
#
|
|
84
|
+
# @param phone_number [String] The phone number in E.164 format.
|
|
85
|
+
#
|
|
86
|
+
# @param source [Symbol, PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source] How the subscription state was changed:
|
|
87
|
+
#
|
|
88
|
+
# @param state [Symbol, PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::State] The subscription state after this event:
|
|
89
|
+
#
|
|
90
|
+
# @param timestamp [Time] The date and time when the event occurred.
|
|
91
|
+
#
|
|
92
|
+
# @param reason [String] Additional context about the state change (e.g., the keyword that was sent).
|
|
93
|
+
|
|
94
|
+
# How the subscription state was changed:
|
|
95
|
+
#
|
|
96
|
+
# - `MO_KEYWORD` - User sent a keyword (STOP/START)
|
|
97
|
+
# - `API` - Changed via API
|
|
98
|
+
# - `CSV_IMPORT` - Imported from CSV
|
|
99
|
+
# - `CARRIER_DISCONNECT` - Automatically unsubscribed due to carrier disconnect
|
|
100
|
+
#
|
|
101
|
+
# @see PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event#source
|
|
102
|
+
module Source
|
|
103
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
104
|
+
|
|
105
|
+
MO_KEYWORD = :MO_KEYWORD
|
|
106
|
+
API = :API
|
|
107
|
+
CSV_IMPORT = :CSV_IMPORT
|
|
108
|
+
CARRIER_DISCONNECT = :CARRIER_DISCONNECT
|
|
109
|
+
|
|
110
|
+
# @!method self.values
|
|
111
|
+
# @return [Array<Symbol>]
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# The subscription state after this event:
|
|
115
|
+
#
|
|
116
|
+
# - `SUB` - Subscribed (user can receive marketing messages)
|
|
117
|
+
# - `UNSUB` - Unsubscribed (user has opted out)
|
|
118
|
+
#
|
|
119
|
+
# @see PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event#state
|
|
120
|
+
module State
|
|
121
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
122
|
+
|
|
123
|
+
SUB = :SUB
|
|
124
|
+
UNSUB = :UNSUB
|
|
125
|
+
|
|
126
|
+
# @!method self.values
|
|
127
|
+
# @return [Array<Symbol>]
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see PreludeSDK::Resources::Notify#list_subscription_phone_numbers
|
|
6
|
+
class NotifyListSubscriptionPhoneNumbersParams < 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 phone numbers to return per page
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :limit, Integer
|
|
21
|
+
|
|
22
|
+
# @!attribute state
|
|
23
|
+
# Filter by subscription state
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, PreludeSDK::Models::NotifyListSubscriptionPhoneNumbersParams::State, nil]
|
|
26
|
+
optional :state, enum: -> { PreludeSDK::NotifyListSubscriptionPhoneNumbersParams::State }
|
|
27
|
+
|
|
28
|
+
# @!method initialize(cursor: nil, limit: nil, state: nil, request_options: {})
|
|
29
|
+
# @param cursor [String] Pagination cursor from the previous response
|
|
30
|
+
#
|
|
31
|
+
# @param limit [Integer] Maximum number of phone numbers to return per page
|
|
32
|
+
#
|
|
33
|
+
# @param state [Symbol, PreludeSDK::Models::NotifyListSubscriptionPhoneNumbersParams::State] Filter by subscription state
|
|
34
|
+
#
|
|
35
|
+
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
36
|
+
|
|
37
|
+
# Filter by subscription state
|
|
38
|
+
module State
|
|
39
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
40
|
+
|
|
41
|
+
SUB = :SUB
|
|
42
|
+
UNSUB = :UNSUB
|
|
43
|
+
|
|
44
|
+
# @!method self.values
|
|
45
|
+
# @return [Array<Symbol>]
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|