messagemedia_messages_sdk 2.0.3 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +292 -294
- data/lib/message_media_messages/exceptions/send_messages400_response_exception.rb +29 -29
- data/lib/message_media_messages/http/auth/auth_manager.rb +90 -90
- data/lib/message_media_messages/http/faraday_client.rb +1 -1
- data/lib/message_media_messages/models/confirm_delivery_reports_as_received_request1.rb +35 -35
- data/lib/message_media_messages/models/confirm_replies_as_received_request1.rb +35 -35
- data/lib/message_media_messages/models/delivery_report.rb +135 -135
- data/lib/message_media_messages/models/format1_enum.rb +20 -20
- data/lib/message_media_messages/models/format_enum.rb +20 -20
- data/lib/message_media_messages/models/get_message_status_response.rb +145 -145
- data/lib/message_media_messages/models/message.rb +166 -166
- data/lib/message_media_messages/models/reply.rb +112 -112
- data/lib/message_media_messages/models/source_number_type_enum.rb +21 -21
- data/lib/message_media_messages/models/status2_enum.rb +32 -32
- data/lib/message_media_messages/models/status_enum.rb +44 -44
- data/lib/message_media_messages/models/vendor_account_id.rb +44 -44
- metadata +12 -12
@@ -1,20 +1,20 @@
|
|
1
|
-
# message_media_messages
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module MessageMediaMessages
|
7
|
-
# Format of message, SMS or TTS (Text To Speech).
|
8
|
-
class Format1Enum
|
9
|
-
FORMAT1_ENUM = [
|
10
|
-
# TODO: Write general description for SMS
|
11
|
-
SMS = 'SMS'.freeze,
|
12
|
-
|
13
|
-
# TODO: Write general description for TTS
|
14
|
-
TTS = 'TTS'.freeze,
|
15
|
-
|
16
|
-
# TODO: Write general description for MMS
|
17
|
-
MMS = 'MMS'.freeze
|
18
|
-
].freeze
|
19
|
-
end
|
20
|
-
end
|
1
|
+
# message_media_messages
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MessageMediaMessages
|
7
|
+
# Format of message, SMS or TTS (Text To Speech).
|
8
|
+
class Format1Enum
|
9
|
+
FORMAT1_ENUM = [
|
10
|
+
# TODO: Write general description for SMS
|
11
|
+
SMS = 'SMS'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for TTS
|
14
|
+
TTS = 'TTS'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for MMS
|
17
|
+
MMS = 'MMS'.freeze
|
18
|
+
].freeze
|
19
|
+
end
|
20
|
+
end
|
@@ -1,20 +1,20 @@
|
|
1
|
-
# message_media_messages
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
module MessageMediaMessages
|
7
|
-
# Format.
|
8
|
-
class FormatEnum
|
9
|
-
FORMAT_ENUM = [
|
10
|
-
# TODO: Write general description for SMS
|
11
|
-
SMS = 'SMS'.freeze,
|
12
|
-
|
13
|
-
# TODO: Write general description for TTS
|
14
|
-
TTS = 'TTS'.freeze,
|
15
|
-
|
16
|
-
# TODO: Write general description for MMS
|
17
|
-
MMS = 'MMS'.freeze
|
18
|
-
].freeze
|
19
|
-
end
|
20
|
-
end
|
1
|
+
# message_media_messages
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MessageMediaMessages
|
7
|
+
# Format.
|
8
|
+
class FormatEnum
|
9
|
+
FORMAT_ENUM = [
|
10
|
+
# TODO: Write general description for SMS
|
11
|
+
SMS = 'SMS'.freeze,
|
12
|
+
|
13
|
+
# TODO: Write general description for TTS
|
14
|
+
TTS = 'TTS'.freeze,
|
15
|
+
|
16
|
+
# TODO: Write general description for MMS
|
17
|
+
MMS = 'MMS'.freeze
|
18
|
+
].freeze
|
19
|
+
end
|
20
|
+
end
|
@@ -1,145 +1,145 @@
|
|
1
|
-
# message_media_messages
|
2
|
-
#
|
3
|
-
# This file was automatically generated by APIMATIC v2.0
|
4
|
-
# ( https://apimatic.io ).
|
5
|
-
|
6
|
-
require 'date'
|
7
|
-
module MessageMediaMessages
|
8
|
-
# GetMessageStatusResponse Model.
|
9
|
-
class GetMessageStatusResponse < BaseModel
|
10
|
-
# URL replies and delivery reports to this message will be pushed to
|
11
|
-
# @return [String]
|
12
|
-
attr_accessor :callback_url
|
13
|
-
|
14
|
-
# Content of the message
|
15
|
-
# @return [String]
|
16
|
-
attr_accessor :content
|
17
|
-
|
18
|
-
# Destination number of the message
|
19
|
-
# @return [String]
|
20
|
-
attr_accessor :destination_number
|
21
|
-
|
22
|
-
# Request a delivery report for this message
|
23
|
-
# @return [Boolean]
|
24
|
-
attr_accessor :delivery_report
|
25
|
-
|
26
|
-
# Format of message, SMS or TTS (Text To Speech).
|
27
|
-
# @return [Format1Enum]
|
28
|
-
attr_accessor :format
|
29
|
-
|
30
|
-
# Date time after which the message expires and will not be sent
|
31
|
-
# @return [DateTime]
|
32
|
-
attr_accessor :message_expiry_timestamp
|
33
|
-
|
34
|
-
# Metadata for the message specified as a set of key value pairs, each key
|
35
|
-
# can be up to 100 characters long and each value can be up to 256
|
36
|
-
# characters long
|
37
|
-
# ```
|
38
|
-
# {
|
39
|
-
# "myKey": "myValue",
|
40
|
-
# "anotherKey": "anotherValue"
|
41
|
-
# }
|
42
|
-
# ```
|
43
|
-
# @return [Object]
|
44
|
-
attr_accessor :metadata
|
45
|
-
|
46
|
-
# Scheduled delivery date time of the message
|
47
|
-
# @return [DateTime]
|
48
|
-
attr_accessor :scheduled
|
49
|
-
|
50
|
-
# Scheduled delivery date time of the message
|
51
|
-
# @return [String]
|
52
|
-
attr_accessor :source_number
|
53
|
-
|
54
|
-
# Type of source address specified, this can be INTERNATIONAL, ALPHANUMERIC
|
55
|
-
# or SHORTCODE
|
56
|
-
# @return [SourceNumberTypeEnum]
|
57
|
-
attr_accessor :source_number_type
|
58
|
-
|
59
|
-
# Unique ID of this message
|
60
|
-
# @return [UUID | String]
|
61
|
-
attr_accessor :message_id
|
62
|
-
|
63
|
-
# The status of the message
|
64
|
-
# @return [StatusEnum]
|
65
|
-
attr_accessor :status
|
66
|
-
|
67
|
-
# A mapping from model property names to API property names.
|
68
|
-
def self.names
|
69
|
-
@_hash = {} if @_hash.nil?
|
70
|
-
@_hash['callback_url'] = 'callback_url'
|
71
|
-
@_hash['content'] = 'content'
|
72
|
-
@_hash['destination_number'] = 'destination_number'
|
73
|
-
@_hash['delivery_report'] = 'delivery_report'
|
74
|
-
@_hash['format'] = 'format'
|
75
|
-
@_hash['message_expiry_timestamp'] = 'message_expiry_timestamp'
|
76
|
-
@_hash['metadata'] = 'metadata'
|
77
|
-
@_hash['scheduled'] = 'scheduled'
|
78
|
-
@_hash['source_number'] = 'source_number'
|
79
|
-
@_hash['source_number_type'] = 'source_number_type'
|
80
|
-
@_hash['message_id'] = 'message_id'
|
81
|
-
@_hash['status'] = 'status'
|
82
|
-
@_hash
|
83
|
-
end
|
84
|
-
|
85
|
-
def initialize(callback_url = nil,
|
86
|
-
content = nil,
|
87
|
-
destination_number = nil,
|
88
|
-
delivery_report = false,
|
89
|
-
format = nil,
|
90
|
-
message_expiry_timestamp = nil,
|
91
|
-
metadata = nil,
|
92
|
-
scheduled = nil,
|
93
|
-
source_number = nil,
|
94
|
-
source_number_type = nil,
|
95
|
-
message_id = nil,
|
96
|
-
status = nil)
|
97
|
-
@callback_url = callback_url
|
98
|
-
@content = content
|
99
|
-
@destination_number = destination_number
|
100
|
-
@delivery_report = delivery_report
|
101
|
-
@format = format
|
102
|
-
@message_expiry_timestamp = message_expiry_timestamp
|
103
|
-
@metadata = metadata
|
104
|
-
@scheduled = scheduled
|
105
|
-
@source_number = source_number
|
106
|
-
@source_number_type = source_number_type
|
107
|
-
@message_id = message_id
|
108
|
-
@status = status
|
109
|
-
end
|
110
|
-
|
111
|
-
# Creates an instance of the object from a hash.
|
112
|
-
def self.from_hash(hash)
|
113
|
-
return nil unless hash
|
114
|
-
|
115
|
-
# Extract variables from the hash.
|
116
|
-
callback_url = hash['callback_url']
|
117
|
-
content = hash['content']
|
118
|
-
destination_number = hash['destination_number']
|
119
|
-
delivery_report = hash['delivery_report'] ||= false
|
120
|
-
format = hash['format']
|
121
|
-
message_expiry_timestamp = APIHelper.rfc3339(hash['message_expiry_timestamp']) if
|
122
|
-
hash['message_expiry_timestamp']
|
123
|
-
metadata = hash['metadata']
|
124
|
-
scheduled = APIHelper.rfc3339(hash['scheduled']) if hash['scheduled']
|
125
|
-
source_number = hash['source_number']
|
126
|
-
source_number_type = hash['source_number_type']
|
127
|
-
message_id = hash['message_id']
|
128
|
-
status = hash['status']
|
129
|
-
|
130
|
-
# Create object from extracted values.
|
131
|
-
GetMessageStatusResponse.new(callback_url,
|
132
|
-
content,
|
133
|
-
destination_number,
|
134
|
-
delivery_report,
|
135
|
-
format,
|
136
|
-
message_expiry_timestamp,
|
137
|
-
metadata,
|
138
|
-
scheduled,
|
139
|
-
source_number,
|
140
|
-
source_number_type,
|
141
|
-
message_id,
|
142
|
-
status)
|
143
|
-
end
|
144
|
-
end
|
145
|
-
end
|
1
|
+
# message_media_messages
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
require 'date'
|
7
|
+
module MessageMediaMessages
|
8
|
+
# GetMessageStatusResponse Model.
|
9
|
+
class GetMessageStatusResponse < BaseModel
|
10
|
+
# URL replies and delivery reports to this message will be pushed to
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :callback_url
|
13
|
+
|
14
|
+
# Content of the message
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :content
|
17
|
+
|
18
|
+
# Destination number of the message
|
19
|
+
# @return [String]
|
20
|
+
attr_accessor :destination_number
|
21
|
+
|
22
|
+
# Request a delivery report for this message
|
23
|
+
# @return [Boolean]
|
24
|
+
attr_accessor :delivery_report
|
25
|
+
|
26
|
+
# Format of message, SMS or TTS (Text To Speech).
|
27
|
+
# @return [Format1Enum]
|
28
|
+
attr_accessor :format
|
29
|
+
|
30
|
+
# Date time after which the message expires and will not be sent
|
31
|
+
# @return [DateTime]
|
32
|
+
attr_accessor :message_expiry_timestamp
|
33
|
+
|
34
|
+
# Metadata for the message specified as a set of key value pairs, each key
|
35
|
+
# can be up to 100 characters long and each value can be up to 256
|
36
|
+
# characters long
|
37
|
+
# ```
|
38
|
+
# {
|
39
|
+
# "myKey": "myValue",
|
40
|
+
# "anotherKey": "anotherValue"
|
41
|
+
# }
|
42
|
+
# ```
|
43
|
+
# @return [Object]
|
44
|
+
attr_accessor :metadata
|
45
|
+
|
46
|
+
# Scheduled delivery date time of the message
|
47
|
+
# @return [DateTime]
|
48
|
+
attr_accessor :scheduled
|
49
|
+
|
50
|
+
# Scheduled delivery date time of the message
|
51
|
+
# @return [String]
|
52
|
+
attr_accessor :source_number
|
53
|
+
|
54
|
+
# Type of source address specified, this can be INTERNATIONAL, ALPHANUMERIC
|
55
|
+
# or SHORTCODE
|
56
|
+
# @return [SourceNumberTypeEnum]
|
57
|
+
attr_accessor :source_number_type
|
58
|
+
|
59
|
+
# Unique ID of this message
|
60
|
+
# @return [UUID | String]
|
61
|
+
attr_accessor :message_id
|
62
|
+
|
63
|
+
# The status of the message
|
64
|
+
# @return [StatusEnum]
|
65
|
+
attr_accessor :status
|
66
|
+
|
67
|
+
# A mapping from model property names to API property names.
|
68
|
+
def self.names
|
69
|
+
@_hash = {} if @_hash.nil?
|
70
|
+
@_hash['callback_url'] = 'callback_url'
|
71
|
+
@_hash['content'] = 'content'
|
72
|
+
@_hash['destination_number'] = 'destination_number'
|
73
|
+
@_hash['delivery_report'] = 'delivery_report'
|
74
|
+
@_hash['format'] = 'format'
|
75
|
+
@_hash['message_expiry_timestamp'] = 'message_expiry_timestamp'
|
76
|
+
@_hash['metadata'] = 'metadata'
|
77
|
+
@_hash['scheduled'] = 'scheduled'
|
78
|
+
@_hash['source_number'] = 'source_number'
|
79
|
+
@_hash['source_number_type'] = 'source_number_type'
|
80
|
+
@_hash['message_id'] = 'message_id'
|
81
|
+
@_hash['status'] = 'status'
|
82
|
+
@_hash
|
83
|
+
end
|
84
|
+
|
85
|
+
def initialize(callback_url = nil,
|
86
|
+
content = nil,
|
87
|
+
destination_number = nil,
|
88
|
+
delivery_report = false,
|
89
|
+
format = nil,
|
90
|
+
message_expiry_timestamp = nil,
|
91
|
+
metadata = nil,
|
92
|
+
scheduled = nil,
|
93
|
+
source_number = nil,
|
94
|
+
source_number_type = nil,
|
95
|
+
message_id = nil,
|
96
|
+
status = nil)
|
97
|
+
@callback_url = callback_url
|
98
|
+
@content = content
|
99
|
+
@destination_number = destination_number
|
100
|
+
@delivery_report = delivery_report
|
101
|
+
@format = format
|
102
|
+
@message_expiry_timestamp = message_expiry_timestamp
|
103
|
+
@metadata = metadata
|
104
|
+
@scheduled = scheduled
|
105
|
+
@source_number = source_number
|
106
|
+
@source_number_type = source_number_type
|
107
|
+
@message_id = message_id
|
108
|
+
@status = status
|
109
|
+
end
|
110
|
+
|
111
|
+
# Creates an instance of the object from a hash.
|
112
|
+
def self.from_hash(hash)
|
113
|
+
return nil unless hash
|
114
|
+
|
115
|
+
# Extract variables from the hash.
|
116
|
+
callback_url = hash['callback_url']
|
117
|
+
content = hash['content']
|
118
|
+
destination_number = hash['destination_number']
|
119
|
+
delivery_report = hash['delivery_report'] ||= false
|
120
|
+
format = hash['format']
|
121
|
+
message_expiry_timestamp = APIHelper.rfc3339(hash['message_expiry_timestamp']) if
|
122
|
+
hash['message_expiry_timestamp']
|
123
|
+
metadata = hash['metadata']
|
124
|
+
scheduled = APIHelper.rfc3339(hash['scheduled']) if hash['scheduled']
|
125
|
+
source_number = hash['source_number']
|
126
|
+
source_number_type = hash['source_number_type']
|
127
|
+
message_id = hash['message_id']
|
128
|
+
status = hash['status']
|
129
|
+
|
130
|
+
# Create object from extracted values.
|
131
|
+
GetMessageStatusResponse.new(callback_url,
|
132
|
+
content,
|
133
|
+
destination_number,
|
134
|
+
delivery_report,
|
135
|
+
format,
|
136
|
+
message_expiry_timestamp,
|
137
|
+
metadata,
|
138
|
+
scheduled,
|
139
|
+
source_number,
|
140
|
+
source_number_type,
|
141
|
+
message_id,
|
142
|
+
status)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|