pingram 1.0.13 → 1.0.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc0f817becd9705b1ebb50e8fcd710b93b8d3be965fff1a52d84f020679ad67e
4
- data.tar.gz: 2a752eb8e38f74db65cdab431ca94994329777bfbafec3834a40aafdc8388336
3
+ metadata.gz: 8b0da74b04be34652ce4772d960f635a00fd4de9282f579a2b4f2b5fff340e22
4
+ data.tar.gz: a830cb772656fc43455340ef6f7bc447c3a4ad8ecb096ffd6ceded61aa2e8dce
5
5
  SHA512:
6
- metadata.gz: 66ae5af2606968823cf5520930996b68c7eebf151ff988f863a7c524b0adea59787d077e270a1157f1e6efedcbe31e231b8eceffada53c8a17df9c44297d52a2
7
- data.tar.gz: 9d0156592f907eb044f86002f987e3196e4bd89a161608cf765d9f66f316b42a39fa52bcee8d22b9ee176b0d4419986adbcfa9b0d4b297aeffd8234da1ae664e
6
+ metadata.gz: 91ee7f634122374ab81a9cea5187eef7ca4ee3b207f9fc1b5f1eb993cf16049bd39a8b429d932be7e99a5bc4ffac9247324987e8bb03702016981c9591aaf24d
7
+ data.tar.gz: a0cbcb303e77a518f768df2fa83f4f96c81a423db53e5ac41bc0b1221911be75f3b0b31f04a6a48e28d4c32f40ed33e2609c693f9e230d7342fbc3f4d8e0a3e5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pingram (1.0.13)
4
+ pingram (1.0.14)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -19,7 +19,7 @@ module Pingram
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Send an SMS notification directly without templates
22
+ # Send an SMS or MMS notification directly without templates
23
23
  # @param send_sms_request [SendSmsRequest]
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @return [SendSmsResponse]
@@ -28,7 +28,7 @@ module Pingram
28
28
  data
29
29
  end
30
30
 
31
- # Send an SMS notification directly without templates
31
+ # Send an SMS or MMS notification directly without templates
32
32
  # @param send_sms_request [SendSmsRequest]
33
33
  # @param [Hash] opts the optional parameters
34
34
  # @return [Array<(SendSmsResponse, Integer, Hash)>] SendSmsResponse data, response status code and response headers
@@ -32,7 +32,7 @@ module Pingram
32
32
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
33
33
  def initialize(config = Configuration.default)
34
34
  @config = config
35
- @user_agent = "pingram-ruby/1.0.13"
35
+ @user_agent = "pingram-ruby/1.0.14"
36
36
  @default_headers = {
37
37
  'Content-Type' => 'application/json',
38
38
  'User-Agent' => @user_agent
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Pingram
17
- # Request body for `POST /sms` (send SMS without a template).
17
+ # Request body for `POST /sms` (send SMS or MMS without a template).
18
18
  class SendSmsRequest < ApiModelBase
19
19
  # The notification type to send.
20
20
  attr_accessor :type
@@ -22,9 +22,12 @@ module Pingram
22
22
  # The phone number of the recipient.
23
23
  attr_accessor :to
24
24
 
25
- # The message of the SMS notification.
25
+ # The message of the SMS or MMS notification. Optional when `mediaUrls` is provided.
26
26
  attr_accessor :message
27
27
 
28
+ # Public HTTPS URLs of media to attach (MMS).
29
+ attr_accessor :media_urls
30
+
28
31
  # The ISO 8601 datetime to schedule the SMS notification.
29
32
  attr_accessor :schedule
30
33
 
@@ -37,6 +40,7 @@ module Pingram
37
40
  :'type' => :'type',
38
41
  :'to' => :'to',
39
42
  :'message' => :'message',
43
+ :'media_urls' => :'mediaUrls',
40
44
  :'schedule' => :'schedule',
41
45
  :'from' => :'from'
42
46
  }
@@ -58,6 +62,7 @@ module Pingram
58
62
  :'type' => :'String',
59
63
  :'to' => :'String',
60
64
  :'message' => :'String',
65
+ :'media_urls' => :'Array<String>',
61
66
  :'schedule' => :'String',
62
67
  :'from' => :'String'
63
68
  }
@@ -99,8 +104,12 @@ module Pingram
99
104
 
100
105
  if attributes.key?(:'message')
101
106
  self.message = attributes[:'message']
102
- else
103
- self.message = nil
107
+ end
108
+
109
+ if attributes.key?(:'media_urls')
110
+ if (value = attributes[:'media_urls']).is_a?(Array)
111
+ self.media_urls = value
112
+ end
104
113
  end
105
114
 
106
115
  if attributes.key?(:'schedule')
@@ -125,10 +134,6 @@ module Pingram
125
134
  invalid_properties.push('invalid value for "to", to cannot be nil.')
126
135
  end
127
136
 
128
- if @message.nil?
129
- invalid_properties.push('invalid value for "message", message cannot be nil.')
130
- end
131
-
132
137
  invalid_properties
133
138
  end
134
139
 
@@ -138,7 +143,6 @@ module Pingram
138
143
  warn '[DEPRECATED] the `valid?` method is obsolete'
139
144
  return false if @type.nil?
140
145
  return false if @to.nil?
141
- return false if @message.nil?
142
146
  true
143
147
  end
144
148
 
@@ -162,16 +166,6 @@ module Pingram
162
166
  @to = to
163
167
  end
164
168
 
165
- # Custom attribute writer method with validation
166
- # @param [Object] message Value to be assigned
167
- def message=(message)
168
- if message.nil?
169
- fail ArgumentError, 'message cannot be nil'
170
- end
171
-
172
- @message = message
173
- end
174
-
175
169
  # Checks equality by comparing each attribute.
176
170
  # @param [Object] Object to be compared
177
171
  def ==(o)
@@ -180,6 +174,7 @@ module Pingram
180
174
  type == o.type &&
181
175
  to == o.to &&
182
176
  message == o.message &&
177
+ media_urls == o.media_urls &&
183
178
  schedule == o.schedule &&
184
179
  from == o.from
185
180
  end
@@ -193,7 +188,7 @@ module Pingram
193
188
  # Calculates hash code according to all attributes.
194
189
  # @return [Integer] Hash code
195
190
  def hash
196
- [type, to, message, schedule, from].hash
191
+ [type, to, message, media_urls, schedule, from].hash
197
192
  end
198
193
 
199
194
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Pingram
14
- VERSION = '1.0.13'
14
+ VERSION = '1.0.14'
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pingram
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pingram