messagebird-rest 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd213489a7f5a7e70a7418ab2e3be5c4aa8cedfa61042121edb1c03dddd6d56a
4
- data.tar.gz: 9eca63a90298b50cc4d07fb0b7ff6abc7d1ae292155e7f456df18256ae7f64e3
3
+ metadata.gz: 3fde70fc0a75d2f007d9c317974f657973264297eab5ff2f0b2a0f959e30d2d2
4
+ data.tar.gz: cb9bad90faa280eeea6a127fc8885bb63bf3eeb6dd607eb3483f27be3469ff3c
5
5
  SHA512:
6
- metadata.gz: 373dae967d6e226cccb6f775666369b1cdc07491593cc1f5ed4fb6e7950c887723475360d4b3d04e50f00b609542190980a99ac3c09bbca5974f636791b86755
7
- data.tar.gz: 8bc8ca63f00b5b77731ca3082497ea9cf9f8ae4738878e15d49361438adf5aa03baa2a35bc3bebec4e46a5b7c30e42cbc17be109fefee47543e0f3c3ac7410c0
6
+ metadata.gz: 1ede3f901990e717e00ce5765d9df78edf7797663f2211da70a4ae37d0c1a7b339a6d0f91b6f462563bf2c4ded69f227987da630e5d4dcb2c87b9017790a0e70
7
+ data.tar.gz: 29866e1b73c36d108604860a13d1434f2cf85b0905ef21d485e5114c8dd6bb8b4aa640bb1ceba0c472691e5225c4904cde9b312ef7427d0a107b59b5c4bbe2ed
@@ -232,16 +232,10 @@ module MessageBird
232
232
  end
233
233
 
234
234
  # Retrieve messages with optional paging and status filter.
235
- def message_list(filter = {})
236
- limit = filter[:limit] || 10
237
- offset = filter[:offset] || 0
238
- status = filter[:status] || ''
239
-
240
- params = { limit: limit, offset: offset }
241
- if status != ''
242
- params['status'] = status
243
- end
244
- query = 'messages?' + URI.encode_www_form(params)
235
+ def message_list(filters = {})
236
+ params = { limit: 10, offset: 0 }.merge(filters).compact
237
+ query = "messages?#{URI.encode_www_form(params)}"
238
+
245
239
  List.new(Message, request(:get, query))
246
240
  end
247
241
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module MessageBird
4
4
  module Version
5
- STRING = '2.0.0'
5
+ STRING = '2.0.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: messagebird-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maurice Nonnekes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-14 00:00:00.000000000 Z
11
+ date: 2021-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec