seven_api 0.6.0 → 0.6.1

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.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -6
  3. data/.idea/inspectionProfiles/Project_Default.xml +5 -5
  4. data/.idea/ruby-client.iml +48 -13
  5. data/Gemfile +2 -2
  6. data/LICENSE +21 -21
  7. data/README.md +1 -1
  8. data/Rakefile +5 -5
  9. data/doc/SevenApi/Client.html +8 -8
  10. data/doc/SevenApi/Contacts/Action.html +0 -0
  11. data/doc/SevenApi/Contacts.html +0 -0
  12. data/doc/SevenApi/Endpoint.html +0 -0
  13. data/doc/SevenApi/Hooks/Action.html +0 -0
  14. data/doc/SevenApi/Hooks/EventType.html +0 -0
  15. data/doc/SevenApi/Hooks/RequestMethod.html +0 -0
  16. data/doc/SevenApi/Hooks/Validator.html +26 -26
  17. data/doc/SevenApi/Hooks.html +0 -0
  18. data/doc/SevenApi/Journal/Type.html +0 -0
  19. data/doc/SevenApi/Journal/Validator.html +18 -18
  20. data/doc/SevenApi/Journal.html +0 -0
  21. data/doc/SevenApi/Lookup/Type.html +0 -0
  22. data/doc/SevenApi/Lookup.html +0 -0
  23. data/doc/SevenApi/Resource.html +13 -13
  24. data/doc/SevenApi/Resources/Analytics.html +2 -2
  25. data/doc/SevenApi/Resources/Balance.html +2 -2
  26. data/doc/SevenApi/Resources/Contacts.html +6 -6
  27. data/doc/SevenApi/Resources/Hooks.html +10 -10
  28. data/doc/SevenApi/Resources/Journal.html +2 -2
  29. data/doc/SevenApi/Resources/Lookup.html +8 -8
  30. data/doc/SevenApi/Resources/Pricing.html +2 -2
  31. data/doc/SevenApi/Resources/Sms.html +2 -2
  32. data/doc/SevenApi/Resources/Status.html +2 -2
  33. data/doc/SevenApi/Resources/Subaccounts.html +18 -18
  34. data/doc/SevenApi/Resources/ValidateForVoice.html +2 -2
  35. data/doc/SevenApi/Resources/Voice.html +2 -2
  36. data/doc/SevenApi/Resources.html +0 -0
  37. data/doc/SevenApi/Sms/Type.html +0 -0
  38. data/doc/SevenApi/Sms.html +0 -0
  39. data/doc/SevenApi/Subaccounts/Action.html +0 -0
  40. data/doc/SevenApi/Subaccounts/Validator.html +29 -29
  41. data/doc/SevenApi/Subaccounts.html +0 -0
  42. data/doc/SevenApi/Util.html +39 -39
  43. data/doc/SevenApi.html +0 -0
  44. data/document.sh +3 -0
  45. data/lib/seven_api/client.rb +32 -32
  46. data/lib/seven_api/contacts.rb +5 -5
  47. data/lib/seven_api/endpoint.rb +0 -0
  48. data/lib/seven_api/hooks.rb +69 -68
  49. data/lib/seven_api/journal.rb +39 -39
  50. data/lib/seven_api/lookup.rb +12 -12
  51. data/lib/seven_api/numbers.rb +9 -9
  52. data/lib/seven_api/paginated.rb +10 -10
  53. data/lib/seven_api/rcs.rb +0 -0
  54. data/lib/seven_api/resource.rb +1 -2
  55. data/lib/seven_api/resources/analytics.rb +54 -54
  56. data/lib/seven_api/resources/balance.rb +19 -19
  57. data/lib/seven_api/resources/contacts.rb +56 -56
  58. data/lib/seven_api/resources/groups.rb +56 -56
  59. data/lib/seven_api/resources/hooks.rb +40 -40
  60. data/lib/seven_api/resources/journal.rb +20 -20
  61. data/lib/seven_api/resources/lookup.rb +63 -63
  62. data/lib/seven_api/resources/numbers.rb +70 -69
  63. data/lib/seven_api/resources/pricing.rb +20 -20
  64. data/lib/seven_api/resources/rcs.rb +3 -3
  65. data/lib/seven_api/resources/sms.rb +29 -20
  66. data/lib/seven_api/resources/status.rb +20 -20
  67. data/lib/seven_api/resources/subaccounts.rb +65 -65
  68. data/lib/seven_api/resources/validate_for_voice.rb +20 -20
  69. data/lib/seven_api/resources/voice.rb +29 -20
  70. data/lib/seven_api/sms.rb +9 -9
  71. data/lib/seven_api/subaccounts.rb +55 -55
  72. data/lib/seven_api/util.rb +68 -68
  73. data/lib/seven_api/version.rb +5 -5
  74. data/lib/seven_api.rb +6 -6
  75. data/release.sh +4 -4
  76. data/seven_api.gemspec +0 -0
  77. data/spec/EnvKeyStore.rb +14 -14
  78. data/spec/matchers.rb +22 -22
  79. data/spec/seven_api/analytics_spec.rb +49 -49
  80. data/spec/seven_api/balance_spec.rb +18 -18
  81. data/spec/seven_api/client_spec.rb +15 -15
  82. data/spec/seven_api/contacts_spec.rb +100 -100
  83. data/spec/seven_api/groups_spec.rb +74 -74
  84. data/spec/seven_api/hooks_spec.rb +108 -108
  85. data/spec/seven_api/instance_spec.rb +22 -22
  86. data/spec/seven_api/journal_spec.rb +86 -86
  87. data/spec/seven_api/lookup_spec.rb +197 -197
  88. data/spec/seven_api/numbers_spec.rb +135 -135
  89. data/spec/seven_api/pricing_spec.rb +76 -76
  90. data/spec/seven_api/rcs_spec.rb +0 -0
  91. data/spec/seven_api/sms_spec.rb +103 -103
  92. data/spec/seven_api/subaccounts_spec.rb +121 -121
  93. data/spec/seven_api/validate_for_voice_spec.rb +19 -19
  94. data/spec/seven_api/voice_spec.rb +51 -51
  95. data/spec/seven_api_spec.rb +9 -9
  96. metadata +4 -6
@@ -1,51 +1,51 @@
1
- # frozen_string_literal: true
2
-
3
- require 'spec_helper'
4
- require 'seven_api/resources/voice'
5
-
6
- RSpec.describe SevenApi, 'voice' do
7
- def assert_response(response)
8
- expect(response).to be_a(String)
9
-
10
- code, id, cost = response.split("\n")
11
-
12
- expect(Integer(code)).to be_an_instance_of(Integer)
13
- expect(id.to_f).to be_an_instance_of(Float) if id != ''
14
- expect(cost.to_f).to be_an_instance_of(Float)
15
- end
16
-
17
- def request(text, extra_params = {})
18
- stub = <<~TEXT
19
- 301
20
-
21
- 0.1
22
- TEXT
23
-
24
- params = {
25
- from: nil,
26
- text: text,
27
- to: '491716992343'
28
- }.merge(extra_params)
29
-
30
- helper = Helper.new(SevenApi::Resources::Voice)
31
- assert_response(helper.request(helper.resource.method(:send), stub, params))
32
- end
33
-
34
- it 'calls a number with text input' do
35
- request('Your glasses are ready for pickup.')
36
- end
37
-
38
- it 'calls a number with xml input' do
39
- text = <<~XML
40
- <?xml version="1.0" encoding="UTF-8"?>
41
- <Response>
42
- <Say voice="woman" language="en-EN">
43
- Your glasses are ready for pickup.
44
- </Say>
45
- <Record maxlength="20" />
46
- </Response>
47
- XML
48
-
49
- request(text, { xml: true })
50
- end
51
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+ require 'seven_api/resources/voice'
5
+
6
+ RSpec.describe SevenApi, 'voice' do
7
+ def assert_response(response)
8
+ expect(response).to be_a(String)
9
+
10
+ code, id, cost = response.split("\n")
11
+
12
+ expect(Integer(code)).to be_an_instance_of(Integer)
13
+ expect(id.to_f).to be_an_instance_of(Float) if id != ''
14
+ expect(cost.to_f).to be_an_instance_of(Float)
15
+ end
16
+
17
+ def request(text, extra_params = {})
18
+ stub = <<~TEXT
19
+ 301
20
+
21
+ 0.1
22
+ TEXT
23
+
24
+ params = {
25
+ from: nil,
26
+ text: text,
27
+ to: '491716992343'
28
+ }.merge(extra_params)
29
+
30
+ helper = Helper.new(SevenApi::Resources::Voice)
31
+ assert_response(helper.request(helper.resource.method(:send), stub, params))
32
+ end
33
+
34
+ it 'calls a number with text input' do
35
+ request('Your glasses are ready for pickup.')
36
+ end
37
+
38
+ it 'calls a number with xml input' do
39
+ text = <<~XML
40
+ <?xml version="1.0" encoding="UTF-8"?>
41
+ <Response>
42
+ <Say voice="woman" language="en-EN">
43
+ Your glasses are ready for pickup.
44
+ </Say>
45
+ <Record maxlength="20" />
46
+ </Response>
47
+ XML
48
+
49
+ request(text, { xml: true })
50
+ end
51
+ end
@@ -1,9 +1,9 @@
1
- # frozen_string_literal: true
2
-
3
- require 'spec_helper'
4
-
5
- describe SevenApi do
6
- it 'has a version number' do
7
- expect(SevenApi::VERSION).not_to be nil
8
- end
9
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe SevenApi do
6
+ it 'has a version number' do
7
+ expect(SevenApi::VERSION).not_to be nil
8
+ end
9
+ end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seven_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - seven communications GmbH & Co. KG
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-05-14 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -131,6 +130,7 @@ files:
131
130
  - doc/js/jquery.js
132
131
  - doc/method_list.html
133
132
  - doc/top-level-namespace.html
133
+ - document.sh
134
134
  - lib/seven_api.rb
135
135
  - lib/seven_api/client.rb
136
136
  - lib/seven_api/contacts.rb
@@ -187,7 +187,6 @@ homepage: https://github.com/seven-io/ruby-client
187
187
  licenses:
188
188
  - MIT
189
189
  metadata: {}
190
- post_install_message:
191
190
  rdoc_options: []
192
191
  require_paths:
193
192
  - lib
@@ -202,8 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
201
  - !ruby/object:Gem::Version
203
202
  version: '0'
204
203
  requirements: []
205
- rubygems_version: 3.3.26
206
- signing_key:
204
+ rubygems_version: 3.6.7
207
205
  specification_version: 4
208
206
  summary: Official API Client for the seven SMS Gateway
209
207
  test_files: