devme-sdk-ruby 1.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.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +8 -0
  3. data/Gemfile +9 -0
  4. data/Gemfile.lock +71 -0
  5. data/LICENSE.md +25 -0
  6. data/README.md +97 -0
  7. data/Rakefile +10 -0
  8. data/devme-sdk-ruby.gemspec +38 -0
  9. data/examples/app/.gitignore +198 -0
  10. data/examples/app/Gemfile +6 -0
  11. data/examples/app/Gemfile.lock +23 -0
  12. data/examples/app/test-api.rb +20 -0
  13. data/lib/devme-sdk-ruby/api/country_api.rb +178 -0
  14. data/lib/devme-sdk-ruby/api/currency_api.rb +333 -0
  15. data/lib/devme-sdk-ruby/api/domain_api.rb +81 -0
  16. data/lib/devme-sdk-ruby/api/email_api.rb +91 -0
  17. data/lib/devme-sdk-ruby/api/ip_api.rb +81 -0
  18. data/lib/devme-sdk-ruby/api/phone_api.rb +85 -0
  19. data/lib/devme-sdk-ruby/api/utils_api.rb +78 -0
  20. data/lib/devme-sdk-ruby/api_client.rb +390 -0
  21. data/lib/devme-sdk-ruby/api_error.rb +57 -0
  22. data/lib/devme-sdk-ruby/configuration.rb +285 -0
  23. data/lib/devme-sdk-ruby/models/convert_currency_out.rb +280 -0
  24. data/lib/devme-sdk-ruby/models/error.rb +251 -0
  25. data/lib/devme-sdk-ruby/models/get_country_details_out.rb +230 -0
  26. data/lib/devme-sdk-ruby/models/get_currency_details_out.rb +230 -0
  27. data/lib/devme-sdk-ruby/models/get_currency_exchange_rate_out.rb +250 -0
  28. data/lib/devme-sdk-ruby/models/get_domain_whois_out.rb +230 -0
  29. data/lib/devme-sdk-ruby/models/get_email_details_out.rb +290 -0
  30. data/lib/devme-sdk-ruby/models/get_ip_details_city_out.rb +260 -0
  31. data/lib/devme-sdk-ruby/models/get_ip_details_out.rb +269 -0
  32. data/lib/devme-sdk-ruby/models/get_phone_details_out.rb +270 -0
  33. data/lib/devme-sdk-ruby/models/http_error_out.rb +252 -0
  34. data/lib/devme-sdk-ruby/models/list_countries_item.rb +230 -0
  35. data/lib/devme-sdk-ruby/models/list_countries_out.rb +242 -0
  36. data/lib/devme-sdk-ruby/models/list_currencies_item.rb +314 -0
  37. data/lib/devme-sdk-ruby/models/list_currencies_out.rb +242 -0
  38. data/lib/devme-sdk-ruby/models/who_am_i_out.rb +264 -0
  39. data/lib/devme-sdk-ruby/version.rb +15 -0
  40. data/lib/devme-sdk-ruby.rb +62 -0
  41. data/spec/api/country_api_spec.rb +66 -0
  42. data/spec/api/currency_api_spec.rb +101 -0
  43. data/spec/api/domain_api_spec.rb +46 -0
  44. data/spec/api/email_api_spec.rb +48 -0
  45. data/spec/api/ip_api_spec.rb +53 -0
  46. data/spec/api/phone_api_spec.rb +46 -0
  47. data/spec/api/utils_api_spec.rb +45 -0
  48. data/spec/api_client_spec.rb +226 -0
  49. data/spec/configuration_spec.rb +42 -0
  50. data/spec/spec_helper.rb +111 -0
  51. metadata +146 -0
@@ -0,0 +1,242 @@
1
+ =begin
2
+ #DEV.ME API Documentation
3
+
4
+ #DEV.ME API Documentation [Currency Conversion and Exchange Rates API](https://dev.me/products/currency) - [IP2Location, IP Country, IP Information API](https://dev.me/products/ip) - [Email Validation, Mailbox Verification](https://dev.me/products/email) - [Phone Number Validation](https://dev.me/products/phone). You can learn more at [dev.me](https://dev.me). For this example you can use api key `demo-key` to test the APIs
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@dev.me
8
+
9
+
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DevmeSdk
17
+ class ListCurrenciesOut
18
+ # page number
19
+ attr_accessor :page
20
+
21
+ # total number of currencies
22
+ attr_accessor :total
23
+
24
+ # list of currencies
25
+ attr_accessor :list
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'page' => :'page',
31
+ :'total' => :'total',
32
+ :'list' => :'list'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'page' => :'Float',
45
+ :'total' => :'Float',
46
+ :'list' => :'Array<ListCurrenciesItem>'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DevmeSdk::ListCurrenciesOut` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DevmeSdk::ListCurrenciesOut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'page')
72
+ self.page = attributes[:'page']
73
+ end
74
+
75
+ if attributes.key?(:'total')
76
+ self.total = attributes[:'total']
77
+ end
78
+
79
+ if attributes.key?(:'list')
80
+ if (value = attributes[:'list']).is_a?(Array)
81
+ self.list = value
82
+ end
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ true
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ page == o.page &&
105
+ total == o.total &&
106
+ list == o.list
107
+ end
108
+
109
+ # @see the `==` method
110
+ # @param [Object] Object to be compared
111
+ def eql?(o)
112
+ self == o
113
+ end
114
+
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Integer] Hash code
117
+ def hash
118
+ [page, total, list].hash
119
+ end
120
+
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def self.build_from_hash(attributes)
125
+ new.build_from_hash(attributes)
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ self.class.openapi_types.each_pair do |key, type|
134
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
135
+ self.send("#{key}=", nil)
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
140
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ end
142
+ elsif !attributes[self.class.attribute_map[key]].nil?
143
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
+ end
145
+ end
146
+
147
+ self
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :Time
157
+ Time.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else
187
+ # model
188
+ # models (e.g. Pet) or oneOf
189
+ klass = DevmeSdk.const_get(type)
190
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
191
+ end
192
+ end
193
+
194
+ # Returns the string representation of the object
195
+ # @return [String] String presentation of the object
196
+ def to_s
197
+ to_hash.to_s
198
+ end
199
+
200
+ # to_body is an alias to to_hash (backward compatibility)
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_body
203
+ to_hash
204
+ end
205
+
206
+ # Returns the object in the form of hash
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_hash
209
+ hash = {}
210
+ self.class.attribute_map.each_pair do |attr, param|
211
+ value = self.send(attr)
212
+ if value.nil?
213
+ is_nullable = self.class.openapi_nullable.include?(attr)
214
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
215
+ end
216
+
217
+ hash[param] = _to_hash(value)
218
+ end
219
+ hash
220
+ end
221
+
222
+ # Outputs non-array value in the form of hash
223
+ # For object, use to_hash. Otherwise, just return the value
224
+ # @param [Object] value Any valid value
225
+ # @return [Hash] Returns the value in the form of hash
226
+ def _to_hash(value)
227
+ if value.is_a?(Array)
228
+ value.compact.map { |v| _to_hash(v) }
229
+ elsif value.is_a?(Hash)
230
+ {}.tap do |hash|
231
+ value.each { |k, v| hash[k] = _to_hash(v) }
232
+ end
233
+ elsif value.respond_to? :to_hash
234
+ value.to_hash
235
+ else
236
+ value
237
+ end
238
+ end
239
+
240
+ end
241
+
242
+ end
@@ -0,0 +1,264 @@
1
+ =begin
2
+ #DEV.ME API Documentation
3
+
4
+ #DEV.ME API Documentation [Currency Conversion and Exchange Rates API](https://dev.me/products/currency) - [IP2Location, IP Country, IP Information API](https://dev.me/products/ip) - [Email Validation, Mailbox Verification](https://dev.me/products/email) - [Phone Number Validation](https://dev.me/products/phone). You can learn more at [dev.me](https://dev.me). For this example you can use api key `demo-key` to test the APIs
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@dev.me
8
+
9
+
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DevmeSdk
17
+ class WhoAmIOut
18
+ attr_accessor :user_id
19
+
20
+ attr_accessor :email
21
+
22
+ attr_accessor :username
23
+
24
+ attr_accessor :req_ip_address
25
+
26
+ attr_accessor :req_ip_country
27
+
28
+ attr_accessor :req_user_agent
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'user_id' => :'userId',
34
+ :'email' => :'email',
35
+ :'username' => :'username',
36
+ :'req_ip_address' => :'reqIpAddress',
37
+ :'req_ip_country' => :'reqIpCountry',
38
+ :'req_user_agent' => :'reqUserAgent'
39
+ }
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'user_id' => :'String',
51
+ :'email' => :'String',
52
+ :'username' => :'String',
53
+ :'req_ip_address' => :'String',
54
+ :'req_ip_country' => :'String',
55
+ :'req_user_agent' => :'String'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DevmeSdk::WhoAmIOut` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DevmeSdk::WhoAmIOut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'user_id')
81
+ self.user_id = attributes[:'user_id']
82
+ end
83
+
84
+ if attributes.key?(:'email')
85
+ self.email = attributes[:'email']
86
+ end
87
+
88
+ if attributes.key?(:'username')
89
+ self.username = attributes[:'username']
90
+ end
91
+
92
+ if attributes.key?(:'req_ip_address')
93
+ self.req_ip_address = attributes[:'req_ip_address']
94
+ end
95
+
96
+ if attributes.key?(:'req_ip_country')
97
+ self.req_ip_country = attributes[:'req_ip_country']
98
+ end
99
+
100
+ if attributes.key?(:'req_user_agent')
101
+ self.req_user_agent = attributes[:'req_user_agent']
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ invalid_properties = Array.new
109
+ invalid_properties
110
+ end
111
+
112
+ # Check to see if the all the properties in the model are valid
113
+ # @return true if the model is valid
114
+ def valid?
115
+ true
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ user_id == o.user_id &&
124
+ email == o.email &&
125
+ username == o.username &&
126
+ req_ip_address == o.req_ip_address &&
127
+ req_ip_country == o.req_ip_country &&
128
+ req_user_agent == o.req_user_agent
129
+ end
130
+
131
+ # @see the `==` method
132
+ # @param [Object] Object to be compared
133
+ def eql?(o)
134
+ self == o
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ def hash
140
+ [user_id, email, username, req_ip_address, req_ip_country, req_user_agent].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def self.build_from_hash(attributes)
147
+ new.build_from_hash(attributes)
148
+ end
149
+
150
+ # Builds the object from hash
151
+ # @param [Hash] attributes Model attributes in the form of hash
152
+ # @return [Object] Returns the model itself
153
+ def build_from_hash(attributes)
154
+ return nil unless attributes.is_a?(Hash)
155
+ self.class.openapi_types.each_pair do |key, type|
156
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
157
+ self.send("#{key}=", nil)
158
+ elsif type =~ /\AArray<(.*)>/i
159
+ # check to ensure the input is an array given that the attribute
160
+ # is documented as an array but the input is not
161
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
162
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
163
+ end
164
+ elsif !attributes[self.class.attribute_map[key]].nil?
165
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ end
167
+ end
168
+
169
+ self
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def _deserialize(type, value)
177
+ case type.to_sym
178
+ when :Time
179
+ Time.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :Boolean
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else
209
+ # model
210
+ # models (e.g. Pet) or oneOf
211
+ klass = DevmeSdk.const_get(type)
212
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
213
+ end
214
+ end
215
+
216
+ # Returns the string representation of the object
217
+ # @return [String] String presentation of the object
218
+ def to_s
219
+ to_hash.to_s
220
+ end
221
+
222
+ # to_body is an alias to to_hash (backward compatibility)
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_body
225
+ to_hash
226
+ end
227
+
228
+ # Returns the object in the form of hash
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_hash
231
+ hash = {}
232
+ self.class.attribute_map.each_pair do |attr, param|
233
+ value = self.send(attr)
234
+ if value.nil?
235
+ is_nullable = self.class.openapi_nullable.include?(attr)
236
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
237
+ end
238
+
239
+ hash[param] = _to_hash(value)
240
+ end
241
+ hash
242
+ end
243
+
244
+ # Outputs non-array value in the form of hash
245
+ # For object, use to_hash. Otherwise, just return the value
246
+ # @param [Object] value Any valid value
247
+ # @return [Hash] Returns the value in the form of hash
248
+ def _to_hash(value)
249
+ if value.is_a?(Array)
250
+ value.compact.map { |v| _to_hash(v) }
251
+ elsif value.is_a?(Hash)
252
+ {}.tap do |hash|
253
+ value.each { |k, v| hash[k] = _to_hash(v) }
254
+ end
255
+ elsif value.respond_to? :to_hash
256
+ value.to_hash
257
+ else
258
+ value
259
+ end
260
+ end
261
+
262
+ end
263
+
264
+ end
@@ -0,0 +1,15 @@
1
+ =begin
2
+ #DEV.ME API Documentation
3
+
4
+ #DEV.ME API Documentation [Currency Conversion and Exchange Rates API](https://dev.me/products/currency) - [IP2Location, IP Country, IP Information API](https://dev.me/products/ip) - [Email Validation, Mailbox Verification](https://dev.me/products/email) - [Phone Number Validation](https://dev.me/products/phone). You can learn more at [dev.me](https://dev.me). For this example you can use api key `demo-key` to test the APIs
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@dev.me
8
+
9
+
10
+
11
+ =end
12
+
13
+ module DevmeSdk
14
+ VERSION = '1.0.2'
15
+ end
@@ -0,0 +1,62 @@
1
+ =begin
2
+ #DEV.ME API Documentation
3
+
4
+ #DEV.ME API Documentation [Currency Conversion and Exchange Rates API](https://dev.me/products/currency) - [IP2Location, IP Country, IP Information API](https://dev.me/products/ip) - [Email Validation, Mailbox Verification](https://dev.me/products/email) - [Phone Number Validation](https://dev.me/products/phone). You can learn more at [dev.me](https://dev.me). For this example you can use api key `demo-key` to test the APIs
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@dev.me
8
+
9
+
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'devme-sdk-ruby/api_client'
15
+ require 'devme-sdk-ruby/api_error'
16
+ require 'devme-sdk-ruby/version'
17
+ require 'devme-sdk-ruby/configuration'
18
+
19
+ # Models
20
+ require 'devme-sdk-ruby/models/convert_currency_out'
21
+ require 'devme-sdk-ruby/models/error'
22
+ require 'devme-sdk-ruby/models/get_country_details_out'
23
+ require 'devme-sdk-ruby/models/get_currency_details_out'
24
+ require 'devme-sdk-ruby/models/get_currency_exchange_rate_out'
25
+ require 'devme-sdk-ruby/models/get_domain_whois_out'
26
+ require 'devme-sdk-ruby/models/get_email_details_out'
27
+ require 'devme-sdk-ruby/models/get_ip_details_city_out'
28
+ require 'devme-sdk-ruby/models/get_ip_details_out'
29
+ require 'devme-sdk-ruby/models/get_phone_details_out'
30
+ require 'devme-sdk-ruby/models/http_error_out'
31
+ require 'devme-sdk-ruby/models/list_countries_item'
32
+ require 'devme-sdk-ruby/models/list_countries_out'
33
+ require 'devme-sdk-ruby/models/list_currencies_item'
34
+ require 'devme-sdk-ruby/models/list_currencies_out'
35
+ require 'devme-sdk-ruby/models/who_am_i_out'
36
+
37
+ # APIs
38
+ require 'devme-sdk-ruby/api/country_api'
39
+ require 'devme-sdk-ruby/api/currency_api'
40
+ require 'devme-sdk-ruby/api/domain_api'
41
+ require 'devme-sdk-ruby/api/email_api'
42
+ require 'devme-sdk-ruby/api/ip_api'
43
+ require 'devme-sdk-ruby/api/phone_api'
44
+ require 'devme-sdk-ruby/api/utils_api'
45
+
46
+ module DevmeSdk
47
+ class << self
48
+ # Customize default settings for the SDK using block.
49
+ # DevmeSdk.configure do |config|
50
+ # config.username = "xxx"
51
+ # config.password = "xxx"
52
+ # end
53
+ # If no block given, return the default Configuration object.
54
+ def configure
55
+ if block_given?
56
+ yield(Configuration.default)
57
+ else
58
+ Configuration.default
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,66 @@
1
+ =begin
2
+ #DEV.ME API Documentation
3
+
4
+ #DEV.ME API Documentation [Currency Conversion and Exchange Rates API](https://dev.me/products/currency) - [IP2Location, IP Country, IP Information API](https://dev.me/products/ip) - [Email Validation, Mailbox Verification](https://dev.me/products/email) - [Phone Number Validation](https://dev.me/products/phone). You can learn more at [dev.me](https://dev.me). For this example you can use api key `demo-key` to test the APIs
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@dev.me
8
+
9
+
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for DevmeSdk::CountryApi
17
+
18
+ # Please update as you see appropriate
19
+ describe 'CountryApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = DevmeSdk::CountryApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of CountryApi' do
30
+ it 'should create an instance of CountryApi' do
31
+ expect(@api_instance).to be_instance_of(DevmeSdk::CountryApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for v1_get_country_details
36
+ # Get country facts and information
37
+ # @param code code - country code ISO 4217
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Array<String>] :expand expand - expand properties
40
+ # @option opts [Array<String>] :exclude exclude - exclude properties
41
+ # @option opts [String] :language language - localisation language
42
+ # @return [GetCountryDetailsOut]
43
+ describe 'v1_get_country_details test' do
44
+ it 'should work' do
45
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
46
+ end
47
+ end
48
+
49
+ # unit tests for v1_list_countries
50
+ # Get list of all countries
51
+ # @param [Hash] opts the optional parameters
52
+ # @option opts [Array<String>] :code code - country code ISO 4217
53
+ # @option opts [Array<String>] :expand expand - expand properties
54
+ # @option opts [Array<String>] :exclude exclude - exclude properties
55
+ # @option opts [String] :language language - localisation language
56
+ # @option opts [Array<String>] :sort sort - sort properties
57
+ # @option opts [String] :page page - page number
58
+ # @option opts [String] :page_size pageSize - page size
59
+ # @return [ListCountriesOut]
60
+ describe 'v1_list_countries test' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
+ end
64
+ end
65
+
66
+ end