messagemedia_messages_sdk 2.0.3 → 3.0.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.
@@ -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
@@ -1,112 +1,112 @@
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
- # Reply Model.
9
- class Reply < BaseModel
10
- # The URL specified as the callback URL in the original submit message
11
- # request
12
- # @return [String]
13
- attr_accessor :callback_url
14
-
15
- # Content of the reply
16
- # @return [String]
17
- attr_accessor :content
18
-
19
- # Date time when the reply was received
20
- # @return [DateTime]
21
- attr_accessor :date_received
22
-
23
- # Address from which this reply was sent to
24
- # @return [String]
25
- attr_accessor :destination_number
26
-
27
- # Unique ID of the original message
28
- # @return [UUID | String]
29
- attr_accessor :message_id
30
-
31
- # Any metadata that was included in the original submit message request
32
- # @return [Object]
33
- attr_accessor :metadata
34
-
35
- # Unique ID of this reply
36
- # @return [UUID | String]
37
- attr_accessor :reply_id
38
-
39
- # Address from which this reply was received from
40
- # @return [String]
41
- attr_accessor :source_number
42
-
43
- # Address from which this reply was received from
44
- # @return [VendorAccountId]
45
- attr_accessor :vendor_account_id
46
-
47
- # A mapping from model property names to API property names.
48
- def self.names
49
- @_hash = {} if @_hash.nil?
50
- @_hash['callback_url'] = 'callback_url'
51
- @_hash['content'] = 'content'
52
- @_hash['date_received'] = 'date_received'
53
- @_hash['destination_number'] = 'destination_number'
54
- @_hash['message_id'] = 'message_id'
55
- @_hash['metadata'] = 'metadata'
56
- @_hash['reply_id'] = 'reply_id'
57
- @_hash['source_number'] = 'source_number'
58
- @_hash['vendor_account_id'] = 'vendor_account_id'
59
- @_hash
60
- end
61
-
62
- def initialize(callback_url = nil,
63
- content = nil,
64
- date_received = nil,
65
- destination_number = nil,
66
- message_id = nil,
67
- metadata = nil,
68
- reply_id = nil,
69
- source_number = nil,
70
- vendor_account_id = nil)
71
- @callback_url = callback_url
72
- @content = content
73
- @date_received = date_received
74
- @destination_number = destination_number
75
- @message_id = message_id
76
- @metadata = metadata
77
- @reply_id = reply_id
78
- @source_number = source_number
79
- @vendor_account_id = vendor_account_id
80
- end
81
-
82
- # Creates an instance of the object from a hash.
83
- def self.from_hash(hash)
84
- return nil unless hash
85
-
86
- # Extract variables from the hash.
87
- callback_url = hash['callback_url']
88
- content = hash['content']
89
- date_received = APIHelper.rfc3339(hash['date_received']) if
90
- hash['date_received']
91
- destination_number = hash['destination_number']
92
- message_id = hash['message_id']
93
- metadata = hash['metadata']
94
- reply_id = hash['reply_id']
95
- source_number = hash['source_number']
96
- if hash['vendor_account_id']
97
- vendor_account_id = VendorAccountId.from_hash(hash['vendor_account_id'])
98
- end
99
-
100
- # Create object from extracted values.
101
- Reply.new(callback_url,
102
- content,
103
- date_received,
104
- destination_number,
105
- message_id,
106
- metadata,
107
- reply_id,
108
- source_number,
109
- vendor_account_id)
110
- end
111
- end
112
- 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
+ # Reply Model.
9
+ class Reply < BaseModel
10
+ # The URL specified as the callback URL in the original submit message
11
+ # request
12
+ # @return [String]
13
+ attr_accessor :callback_url
14
+
15
+ # Content of the reply
16
+ # @return [String]
17
+ attr_accessor :content
18
+
19
+ # Date time when the reply was received
20
+ # @return [DateTime]
21
+ attr_accessor :date_received
22
+
23
+ # Address from which this reply was sent to
24
+ # @return [String]
25
+ attr_accessor :destination_number
26
+
27
+ # Unique ID of the original message
28
+ # @return [UUID | String]
29
+ attr_accessor :message_id
30
+
31
+ # Any metadata that was included in the original submit message request
32
+ # @return [Object]
33
+ attr_accessor :metadata
34
+
35
+ # Unique ID of this reply
36
+ # @return [UUID | String]
37
+ attr_accessor :reply_id
38
+
39
+ # Address from which this reply was received from
40
+ # @return [String]
41
+ attr_accessor :source_number
42
+
43
+ # Address from which this reply was received from
44
+ # @return [VendorAccountId]
45
+ attr_accessor :vendor_account_id
46
+
47
+ # A mapping from model property names to API property names.
48
+ def self.names
49
+ @_hash = {} if @_hash.nil?
50
+ @_hash['callback_url'] = 'callback_url'
51
+ @_hash['content'] = 'content'
52
+ @_hash['date_received'] = 'date_received'
53
+ @_hash['destination_number'] = 'destination_number'
54
+ @_hash['message_id'] = 'message_id'
55
+ @_hash['metadata'] = 'metadata'
56
+ @_hash['reply_id'] = 'reply_id'
57
+ @_hash['source_number'] = 'source_number'
58
+ @_hash['vendor_account_id'] = 'vendor_account_id'
59
+ @_hash
60
+ end
61
+
62
+ def initialize(callback_url = nil,
63
+ content = nil,
64
+ date_received = nil,
65
+ destination_number = nil,
66
+ message_id = nil,
67
+ metadata = nil,
68
+ reply_id = nil,
69
+ source_number = nil,
70
+ vendor_account_id = nil)
71
+ @callback_url = callback_url
72
+ @content = content
73
+ @date_received = date_received
74
+ @destination_number = destination_number
75
+ @message_id = message_id
76
+ @metadata = metadata
77
+ @reply_id = reply_id
78
+ @source_number = source_number
79
+ @vendor_account_id = vendor_account_id
80
+ end
81
+
82
+ # Creates an instance of the object from a hash.
83
+ def self.from_hash(hash)
84
+ return nil unless hash
85
+
86
+ # Extract variables from the hash.
87
+ callback_url = hash['callback_url']
88
+ content = hash['content']
89
+ date_received = APIHelper.rfc3339(hash['date_received']) if
90
+ hash['date_received']
91
+ destination_number = hash['destination_number']
92
+ message_id = hash['message_id']
93
+ metadata = hash['metadata']
94
+ reply_id = hash['reply_id']
95
+ source_number = hash['source_number']
96
+ if hash['vendor_account_id']
97
+ vendor_account_id = VendorAccountId.from_hash(hash['vendor_account_id'])
98
+ end
99
+
100
+ # Create object from extracted values.
101
+ Reply.new(callback_url,
102
+ content,
103
+ date_received,
104
+ destination_number,
105
+ message_id,
106
+ metadata,
107
+ reply_id,
108
+ source_number,
109
+ vendor_account_id)
110
+ end
111
+ end
112
+ end
@@ -1,21 +1,21 @@
1
- # message_media_messages
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module MessageMediaMessages
7
- # Type of source address specified, this can be INTERNATIONAL, ALPHANUMERIC or
8
- # SHORTCODE
9
- class SourceNumberTypeEnum
10
- SOURCE_NUMBER_TYPE_ENUM = [
11
- # TODO: Write general description for INTERNATIONAL
12
- INTERNATIONAL = 'INTERNATIONAL'.freeze,
13
-
14
- # TODO: Write general description for ALPHANUMERIC
15
- ALPHANUMERIC = 'ALPHANUMERIC'.freeze,
16
-
17
- # TODO: Write general description for SHORTCODE
18
- SHORTCODE = 'SHORTCODE'.freeze
19
- ].freeze
20
- end
21
- 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
+ # Type of source address specified, this can be INTERNATIONAL, ALPHANUMERIC or
8
+ # SHORTCODE
9
+ class SourceNumberTypeEnum
10
+ SOURCE_NUMBER_TYPE_ENUM = [
11
+ # TODO: Write general description for INTERNATIONAL
12
+ INTERNATIONAL = 'INTERNATIONAL'.freeze,
13
+
14
+ # TODO: Write general description for ALPHANUMERIC
15
+ ALPHANUMERIC = 'ALPHANUMERIC'.freeze,
16
+
17
+ # TODO: Write general description for SHORTCODE
18
+ SHORTCODE = 'SHORTCODE'.freeze
19
+ ].freeze
20
+ end
21
+ end
@@ -1,32 +1,32 @@
1
- # message_media_messages
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module MessageMediaMessages
7
- # The status of the message as per the delivery report
8
- class Status2Enum
9
- STATUS2_ENUM = [
10
- # TODO: Write general description for ENROUTE
11
- ENROUTE = 'enroute'.freeze,
12
-
13
- # TODO: Write general description for FAILED
14
- FAILED = 'failed'.freeze,
15
-
16
- # TODO: Write general description for SUBMITTED
17
- SUBMITTED = 'submitted'.freeze,
18
-
19
- # TODO: Write general description for DELIVERED
20
- DELIVERED = 'delivered'.freeze,
21
-
22
- # TODO: Write general description for EXPIRED
23
- EXPIRED = 'expired'.freeze,
24
-
25
- # TODO: Write general description for REJECTED
26
- REJECTED = 'rejected'.freeze,
27
-
28
- # TODO: Write general description for UNDELIVERABLE
29
- UNDELIVERABLE = 'undeliverable'.freeze
30
- ].freeze
31
- end
32
- 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
+ # The status of the message as per the delivery report
8
+ class Status2Enum
9
+ STATUS2_ENUM = [
10
+ # TODO: Write general description for ENROUTE
11
+ ENROUTE = 'enroute'.freeze,
12
+
13
+ # TODO: Write general description for FAILED
14
+ FAILED = 'failed'.freeze,
15
+
16
+ # TODO: Write general description for SUBMITTED
17
+ SUBMITTED = 'submitted'.freeze,
18
+
19
+ # TODO: Write general description for DELIVERED
20
+ DELIVERED = 'delivered'.freeze,
21
+
22
+ # TODO: Write general description for EXPIRED
23
+ EXPIRED = 'expired'.freeze,
24
+
25
+ # TODO: Write general description for REJECTED
26
+ REJECTED = 'rejected'.freeze,
27
+
28
+ # TODO: Write general description for UNDELIVERABLE
29
+ UNDELIVERABLE = 'undeliverable'.freeze
30
+ ].freeze
31
+ end
32
+ end