messagemedia_messages_sdk 2.0.0 → 2.0.2
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 +5 -5
- data/README.md +2 -1
- 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/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 +7 -8
@@ -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
|
@@ -1,166 +1,166 @@
|
|
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
|
-
# Message Model.
|
9
|
-
class Message < 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 [FormatEnum]
|
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
|
-
# The media is used to specify the url of the media file that you are trying
|
68
|
-
# to send. Supported file formats include png, jpeg and gif. format
|
69
|
-
# parameter must be set to MMS for this to work.
|
70
|
-
# @return [List of String]
|
71
|
-
attr_accessor :media
|
72
|
-
|
73
|
-
# The subject field is used to denote subject of the MMS message and has a
|
74
|
-
# maximum size of 64 characters long
|
75
|
-
# @return [String]
|
76
|
-
attr_accessor :subject
|
77
|
-
|
78
|
-
# A mapping from model property names to API property names.
|
79
|
-
def self.names
|
80
|
-
@_hash = {} if @_hash.nil?
|
81
|
-
@_hash['callback_url'] = 'callback_url'
|
82
|
-
@_hash['content'] = 'content'
|
83
|
-
@_hash['destination_number'] = 'destination_number'
|
84
|
-
@_hash['delivery_report'] = 'delivery_report'
|
85
|
-
@_hash['format'] = 'format'
|
86
|
-
@_hash['message_expiry_timestamp'] = 'message_expiry_timestamp'
|
87
|
-
@_hash['metadata'] = 'metadata'
|
88
|
-
@_hash['scheduled'] = 'scheduled'
|
89
|
-
@_hash['source_number'] = 'source_number'
|
90
|
-
@_hash['source_number_type'] = 'source_number_type'
|
91
|
-
@_hash['message_id'] = 'message_id'
|
92
|
-
@_hash['status'] = 'status'
|
93
|
-
@_hash['media'] = 'media'
|
94
|
-
@_hash['subject'] = 'subject'
|
95
|
-
@_hash
|
96
|
-
end
|
97
|
-
|
98
|
-
def initialize(content = nil,
|
99
|
-
destination_number = nil,
|
100
|
-
callback_url = nil,
|
101
|
-
delivery_report = false,
|
102
|
-
format = nil,
|
103
|
-
message_expiry_timestamp = nil,
|
104
|
-
metadata = nil,
|
105
|
-
scheduled = nil,
|
106
|
-
source_number = nil,
|
107
|
-
source_number_type = nil,
|
108
|
-
message_id = nil,
|
109
|
-
status = nil,
|
110
|
-
media = nil,
|
111
|
-
subject = nil)
|
112
|
-
@callback_url = callback_url
|
113
|
-
@content = content
|
114
|
-
@destination_number = destination_number
|
115
|
-
@delivery_report = delivery_report
|
116
|
-
@format = format
|
117
|
-
@message_expiry_timestamp = message_expiry_timestamp
|
118
|
-
@metadata = metadata
|
119
|
-
@scheduled = scheduled
|
120
|
-
@source_number = source_number
|
121
|
-
@source_number_type = source_number_type
|
122
|
-
@message_id = message_id
|
123
|
-
@status = status
|
124
|
-
@media = media
|
125
|
-
@subject = subject
|
126
|
-
end
|
127
|
-
|
128
|
-
# Creates an instance of the object from a hash.
|
129
|
-
def self.from_hash(hash)
|
130
|
-
return nil unless hash
|
131
|
-
|
132
|
-
# Extract variables from the hash.
|
133
|
-
content = hash['content']
|
134
|
-
destination_number = hash['destination_number']
|
135
|
-
callback_url = hash['callback_url']
|
136
|
-
delivery_report = hash['delivery_report'] ||= false
|
137
|
-
format = hash['format']
|
138
|
-
message_expiry_timestamp = APIHelper.rfc3339(hash['message_expiry_timestamp']) if
|
139
|
-
hash['message_expiry_timestamp']
|
140
|
-
metadata = hash['metadata']
|
141
|
-
scheduled = APIHelper.rfc3339(hash['scheduled']) if hash['scheduled']
|
142
|
-
source_number = hash['source_number']
|
143
|
-
source_number_type = hash['source_number_type']
|
144
|
-
message_id = hash['message_id']
|
145
|
-
status = hash['status']
|
146
|
-
media = hash['media']
|
147
|
-
subject = hash['subject']
|
148
|
-
|
149
|
-
# Create object from extracted values.
|
150
|
-
Message.new(content,
|
151
|
-
destination_number,
|
152
|
-
callback_url,
|
153
|
-
delivery_report,
|
154
|
-
format,
|
155
|
-
message_expiry_timestamp,
|
156
|
-
metadata,
|
157
|
-
scheduled,
|
158
|
-
source_number,
|
159
|
-
source_number_type,
|
160
|
-
message_id,
|
161
|
-
status,
|
162
|
-
media,
|
163
|
-
subject)
|
164
|
-
end
|
165
|
-
end
|
166
|
-
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
|
+
# Message Model.
|
9
|
+
class Message < 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 [FormatEnum]
|
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
|
+
# The media is used to specify the url of the media file that you are trying
|
68
|
+
# to send. Supported file formats include png, jpeg and gif. format
|
69
|
+
# parameter must be set to MMS for this to work.
|
70
|
+
# @return [List of String]
|
71
|
+
attr_accessor :media
|
72
|
+
|
73
|
+
# The subject field is used to denote subject of the MMS message and has a
|
74
|
+
# maximum size of 64 characters long
|
75
|
+
# @return [String]
|
76
|
+
attr_accessor :subject
|
77
|
+
|
78
|
+
# A mapping from model property names to API property names.
|
79
|
+
def self.names
|
80
|
+
@_hash = {} if @_hash.nil?
|
81
|
+
@_hash['callback_url'] = 'callback_url'
|
82
|
+
@_hash['content'] = 'content'
|
83
|
+
@_hash['destination_number'] = 'destination_number'
|
84
|
+
@_hash['delivery_report'] = 'delivery_report'
|
85
|
+
@_hash['format'] = 'format'
|
86
|
+
@_hash['message_expiry_timestamp'] = 'message_expiry_timestamp'
|
87
|
+
@_hash['metadata'] = 'metadata'
|
88
|
+
@_hash['scheduled'] = 'scheduled'
|
89
|
+
@_hash['source_number'] = 'source_number'
|
90
|
+
@_hash['source_number_type'] = 'source_number_type'
|
91
|
+
@_hash['message_id'] = 'message_id'
|
92
|
+
@_hash['status'] = 'status'
|
93
|
+
@_hash['media'] = 'media'
|
94
|
+
@_hash['subject'] = 'subject'
|
95
|
+
@_hash
|
96
|
+
end
|
97
|
+
|
98
|
+
def initialize(content = nil,
|
99
|
+
destination_number = nil,
|
100
|
+
callback_url = nil,
|
101
|
+
delivery_report = false,
|
102
|
+
format = nil,
|
103
|
+
message_expiry_timestamp = nil,
|
104
|
+
metadata = nil,
|
105
|
+
scheduled = nil,
|
106
|
+
source_number = nil,
|
107
|
+
source_number_type = nil,
|
108
|
+
message_id = nil,
|
109
|
+
status = nil,
|
110
|
+
media = nil,
|
111
|
+
subject = nil)
|
112
|
+
@callback_url = callback_url
|
113
|
+
@content = content
|
114
|
+
@destination_number = destination_number
|
115
|
+
@delivery_report = delivery_report
|
116
|
+
@format = format
|
117
|
+
@message_expiry_timestamp = message_expiry_timestamp
|
118
|
+
@metadata = metadata
|
119
|
+
@scheduled = scheduled
|
120
|
+
@source_number = source_number
|
121
|
+
@source_number_type = source_number_type
|
122
|
+
@message_id = message_id
|
123
|
+
@status = status
|
124
|
+
@media = media
|
125
|
+
@subject = subject
|
126
|
+
end
|
127
|
+
|
128
|
+
# Creates an instance of the object from a hash.
|
129
|
+
def self.from_hash(hash)
|
130
|
+
return nil unless hash
|
131
|
+
|
132
|
+
# Extract variables from the hash.
|
133
|
+
content = hash['content']
|
134
|
+
destination_number = hash['destination_number']
|
135
|
+
callback_url = hash['callback_url']
|
136
|
+
delivery_report = hash['delivery_report'] ||= false
|
137
|
+
format = hash['format']
|
138
|
+
message_expiry_timestamp = APIHelper.rfc3339(hash['message_expiry_timestamp']) if
|
139
|
+
hash['message_expiry_timestamp']
|
140
|
+
metadata = hash['metadata']
|
141
|
+
scheduled = APIHelper.rfc3339(hash['scheduled']) if hash['scheduled']
|
142
|
+
source_number = hash['source_number']
|
143
|
+
source_number_type = hash['source_number_type']
|
144
|
+
message_id = hash['message_id']
|
145
|
+
status = hash['status']
|
146
|
+
media = hash['media']
|
147
|
+
subject = hash['subject']
|
148
|
+
|
149
|
+
# Create object from extracted values.
|
150
|
+
Message.new(content,
|
151
|
+
destination_number,
|
152
|
+
callback_url,
|
153
|
+
delivery_report,
|
154
|
+
format,
|
155
|
+
message_expiry_timestamp,
|
156
|
+
metadata,
|
157
|
+
scheduled,
|
158
|
+
source_number,
|
159
|
+
source_number_type,
|
160
|
+
message_id,
|
161
|
+
status,
|
162
|
+
media,
|
163
|
+
subject)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|