cloudmersive-validate-api-client 2.0.7 → 2.0.8

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: d14d3b1a082f8d1d2ae4b50a65512242ca9b152d4b29c5e42ba42473e71f2996
4
- data.tar.gz: 5f569c749b74e3d990631780d331f8cefeb120becfe22b64adf24f7dfb9c01ed
3
+ metadata.gz: 1fb382f1dbe5f06ff959501816df879a458d77f7469f9112cfabeb1f9966917c
4
+ data.tar.gz: f640178248133cd34265425ab9d4fde9ba97f353afed3fc75600f64f23f747a9
5
5
  SHA512:
6
- metadata.gz: 2a5e2ca62a6ff43f583cd766070f99f965049e91c0d3641b7a28353cb6d9713988742cffb7adbfd92cf18da3226fd9d87abe6a0d6431a726c8b40c9cd43c20fc
7
- data.tar.gz: 4e3e9e3bf3784121b61b33181e12e50bf1fd5844882ff14665ea59283d6ce1df2387c0d4ce701e3eb9af8137b9abe987dbfbf9940d422e468a1c49b26a323850
6
+ metadata.gz: d86f5d1155b8ddeaf82843e39a5bd1155d064d10ec5b73f62a2015bdce567718480a8772188350a0919a6dd572da368a7d7f6cc03255788e2bc213b781369c5f
7
+ data.tar.gz: 89f94bc4cfffc3faa4b97f451487a2f259e8e0a10c75aaa103b8f1d8377b7cece8541f95321112a39169b1ab41fa5d137a1a9c18a8caa7b3aa92ce7b81f0ed01
data/README.md CHANGED
@@ -7,7 +7,7 @@ The validation APIs help you validate data. Check if an E-mail address is real.
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 2.0.7
10
+ - Package version: 2.0.8
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-validate-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-validate-api-client-2.0.7.gem
26
+ gem install ./cloudmersive-validate-api-client-2.0.8.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-validate-api-client-2.0.7.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-validate-api-client-2.0.8.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'cloudmersive-validate-api-client', '~> 2.0.7'
34
+ gem 'cloudmersive-validate-api-client', '~> 2.0.8'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -87,6 +87,7 @@ Class | Method | HTTP request | Description
87
87
  *CloudmersiveValidateApiClient::AddressApi* | [**address_country**](docs/AddressApi.md#address_country) | **POST** /validate/address/country | Validate and normalize country information, return ISO 3166-1 country codes and country name
88
88
  *CloudmersiveValidateApiClient::AddressApi* | [**address_country_list**](docs/AddressApi.md#address_country_list) | **POST** /validate/address/country/list | Get a list of ISO 3166-1 countries
89
89
  *CloudmersiveValidateApiClient::AddressApi* | [**address_get_country_currency**](docs/AddressApi.md#address_get_country_currency) | **POST** /validate/address/country/get-currency | Get the currency of the input country
90
+ *CloudmersiveValidateApiClient::AddressApi* | [**address_get_country_region**](docs/AddressApi.md#address_get_country_region) | **POST** /validate/address/country/get-region | Get the region, subregion and continent of the country
90
91
  *CloudmersiveValidateApiClient::AddressApi* | [**address_get_timezone**](docs/AddressApi.md#address_get_timezone) | **POST** /validate/address/country/get-timezones | Gets IANA/Olsen time zones for a country
91
92
  *CloudmersiveValidateApiClient::AddressApi* | [**address_parse_string**](docs/AddressApi.md#address_parse_string) | **POST** /validate/address/parse | Parse an unstructured input text string into an international, formatted address
92
93
  *CloudmersiveValidateApiClient::AddressApi* | [**address_validate_address**](docs/AddressApi.md#address_validate_address) | **POST** /validate/address/street-address | Validate a street address
@@ -8,6 +8,7 @@ Method | HTTP request | Description
8
8
  [**address_country**](AddressApi.md#address_country) | **POST** /validate/address/country | Validate and normalize country information, return ISO 3166-1 country codes and country name
9
9
  [**address_country_list**](AddressApi.md#address_country_list) | **POST** /validate/address/country/list | Get a list of ISO 3166-1 countries
10
10
  [**address_get_country_currency**](AddressApi.md#address_get_country_currency) | **POST** /validate/address/country/get-currency | Get the currency of the input country
11
+ [**address_get_country_region**](AddressApi.md#address_get_country_region) | **POST** /validate/address/country/get-region | Get the region, subregion and continent of the country
11
12
  [**address_get_timezone**](AddressApi.md#address_get_timezone) | **POST** /validate/address/country/get-timezones | Gets IANA/Olsen time zones for a country
12
13
  [**address_parse_string**](AddressApi.md#address_parse_string) | **POST** /validate/address/parse | Parse an unstructured input text string into an international, formatted address
13
14
  [**address_validate_address**](AddressApi.md#address_validate_address) | **POST** /validate/address/street-address | Validate a street address
@@ -226,6 +227,60 @@ Name | Type | Description | Notes
226
227
 
227
228
 
228
229
 
230
+ # **address_get_country_region**
231
+ > ValidateCountryResponse address_get_country_region(input)
232
+
233
+ Get the region, subregion and continent of the country
234
+
235
+ Gets the continent information including region and subregion for the input country.
236
+
237
+ ### Example
238
+ ```ruby
239
+ # load the gem
240
+ require 'cloudmersive-validate-api-client'
241
+ # setup authorization
242
+ CloudmersiveValidateApiClient.configure do |config|
243
+ # Configure API key authorization: Apikey
244
+ config.api_key['Apikey'] = 'YOUR API KEY'
245
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
246
+ #config.api_key_prefix['Apikey'] = 'Bearer'
247
+ end
248
+
249
+ api_instance = CloudmersiveValidateApiClient::AddressApi.new
250
+
251
+ input = CloudmersiveValidateApiClient::ValidateCountryRequest.new # ValidateCountryRequest | Input request
252
+
253
+
254
+ begin
255
+ #Get the region, subregion and continent of the country
256
+ result = api_instance.address_get_country_region(input)
257
+ p result
258
+ rescue CloudmersiveValidateApiClient::ApiError => e
259
+ puts "Exception when calling AddressApi->address_get_country_region: #{e}"
260
+ end
261
+ ```
262
+
263
+ ### Parameters
264
+
265
+ Name | Type | Description | Notes
266
+ ------------- | ------------- | ------------- | -------------
267
+ **input** | [**ValidateCountryRequest**](ValidateCountryRequest.md)| Input request |
268
+
269
+ ### Return type
270
+
271
+ [**ValidateCountryResponse**](ValidateCountryResponse.md)
272
+
273
+ ### Authorization
274
+
275
+ [Apikey](../README.md#Apikey)
276
+
277
+ ### HTTP request headers
278
+
279
+ - **Content-Type**: application/json, text/json
280
+ - **Accept**: application/json, text/json, application/xml, text/xml
281
+
282
+
283
+
229
284
  # **address_get_timezone**
230
285
  > GetTimezonesResponse address_get_timezone(input)
231
286
 
@@ -10,5 +10,7 @@ Name | Type | Description | Notes
10
10
  **iso_currency_code** | **String** | ISO 4217 currency three-letter code associated with the country | [optional]
11
11
  **currency_symbol** | **String** | Symbol associated with the currency | [optional]
12
12
  **currency_english_name** | **String** | Full name of the currency | [optional]
13
+ **region** | **String** | Region (continent) in which the country is located; possible values are None, Europe, Americas, Asia, Africa, Oceania | [optional]
14
+ **subregion** | **String** | Subregion in which the country is located; possible values are None, NorthernEurope, WesternEurope, SouthernEurope, EasternEurope, CentralAmerica, NorthernAmerica, SouthAmerica, EasternAfrica, MiddleAfrica, NorthernAfrica , SouthernAfrica , WesternAfrica , CentralAsia , EasternAsia , SouthernAsia , SouthEasternAsia , WesternAsia , Southern , Middle , AustraliaandNewZealand , Melanesia , Polynesia , Micronesia , Caribbean, | [optional]
13
15
 
14
16
 
@@ -13,5 +13,7 @@ Name | Type | Description | Notes
13
13
  **iso_currency_code** | **String** | ISO 4217 currency three-letter code associated with the country | [optional]
14
14
  **currency_symbol** | **String** | Symbol associated with the currency | [optional]
15
15
  **currency_english_name** | **String** | Full name of the currency | [optional]
16
+ **region** | **String** | Region (continent) in which the country is located; possible values are None, Europe, Americas, Asia, Africa, Oceania | [optional]
17
+ **subregion** | **String** | Subregion in which the country is located; possible values are None, NorthernEurope, WesternEurope, SouthernEurope, EasternEurope, CentralAmerica, NorthernAmerica, SouthAmerica, EasternAfrica, MiddleAfrica, NorthernAfrica , SouthernAfrica , WesternAfrica , CentralAsia , EasternAsia , SouthernAsia , SouthEasternAsia , WesternAsia , Southern , Middle , AustraliaandNewZealand , Melanesia , Polynesia , Micronesia , Caribbean, | [optional]
16
18
 
17
19
 
@@ -227,6 +227,60 @@ module CloudmersiveValidateApiClient
227
227
  end
228
228
  return data, status_code, headers
229
229
  end
230
+ # Get the region, subregion and continent of the country
231
+ # Gets the continent information including region and subregion for the input country.
232
+ # @param input Input request
233
+ # @param [Hash] opts the optional parameters
234
+ # @return [ValidateCountryResponse]
235
+ def address_get_country_region(input, opts = {})
236
+ data, _status_code, _headers = address_get_country_region_with_http_info(input, opts)
237
+ data
238
+ end
239
+
240
+ # Get the region, subregion and continent of the country
241
+ # Gets the continent information including region and subregion for the input country.
242
+ # @param input Input request
243
+ # @param [Hash] opts the optional parameters
244
+ # @return [Array<(ValidateCountryResponse, Fixnum, Hash)>] ValidateCountryResponse data, response status code and response headers
245
+ def address_get_country_region_with_http_info(input, opts = {})
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug 'Calling API: AddressApi.address_get_country_region ...'
248
+ end
249
+ # verify the required parameter 'input' is set
250
+ if @api_client.config.client_side_validation && input.nil?
251
+ fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_get_country_region"
252
+ end
253
+ # resource path
254
+ local_var_path = '/validate/address/country/get-region'
255
+
256
+ # query parameters
257
+ query_params = {}
258
+
259
+ # header parameters
260
+ header_params = {}
261
+ # HTTP header 'Accept' (if needed)
262
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
263
+ # HTTP header 'Content-Type'
264
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
265
+
266
+ # form parameters
267
+ form_params = {}
268
+
269
+ # http body (model)
270
+ post_body = @api_client.object_to_http_body(input)
271
+ auth_names = ['Apikey']
272
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
273
+ :header_params => header_params,
274
+ :query_params => query_params,
275
+ :form_params => form_params,
276
+ :body => post_body,
277
+ :auth_names => auth_names,
278
+ :return_type => 'ValidateCountryResponse')
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug "API called: AddressApi#address_get_country_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
281
+ end
282
+ return data, status_code, headers
283
+ end
230
284
  # Gets IANA/Olsen time zones for a country
231
285
  # Gets the IANA/Olsen time zones for a country.
232
286
  # @param input Input request
@@ -36,6 +36,12 @@ module CloudmersiveValidateApiClient
36
36
  # Full name of the currency
37
37
  attr_accessor :currency_english_name
38
38
 
39
+ # Region (continent) in which the country is located; possible values are None, Europe, Americas, Asia, Africa, Oceania
40
+ attr_accessor :region
41
+
42
+ # Subregion in which the country is located; possible values are None, NorthernEurope, WesternEurope, SouthernEurope, EasternEurope, CentralAmerica, NorthernAmerica, SouthAmerica, EasternAfrica, MiddleAfrica, NorthernAfrica , SouthernAfrica , WesternAfrica , CentralAsia , EasternAsia , SouthernAsia , SouthEasternAsia , WesternAsia , Southern , Middle , AustraliaandNewZealand , Melanesia , Polynesia , Micronesia , Caribbean,
43
+ attr_accessor :subregion
44
+
39
45
  # Attribute mapping from ruby-style variable name to JSON key.
40
46
  def self.attribute_map
41
47
  {
@@ -45,7 +51,9 @@ module CloudmersiveValidateApiClient
45
51
  :'is_european_union_member' => :'IsEuropeanUnionMember',
46
52
  :'iso_currency_code' => :'ISOCurrencyCode',
47
53
  :'currency_symbol' => :'CurrencySymbol',
48
- :'currency_english_name' => :'CurrencyEnglishName'
54
+ :'currency_english_name' => :'CurrencyEnglishName',
55
+ :'region' => :'Region',
56
+ :'subregion' => :'Subregion'
49
57
  }
50
58
  end
51
59
 
@@ -58,7 +66,9 @@ module CloudmersiveValidateApiClient
58
66
  :'is_european_union_member' => :'BOOLEAN',
59
67
  :'iso_currency_code' => :'String',
60
68
  :'currency_symbol' => :'String',
61
- :'currency_english_name' => :'String'
69
+ :'currency_english_name' => :'String',
70
+ :'region' => :'String',
71
+ :'subregion' => :'String'
62
72
  }
63
73
  end
64
74
 
@@ -97,6 +107,14 @@ module CloudmersiveValidateApiClient
97
107
  if attributes.has_key?(:'CurrencyEnglishName')
98
108
  self.currency_english_name = attributes[:'CurrencyEnglishName']
99
109
  end
110
+
111
+ if attributes.has_key?(:'Region')
112
+ self.region = attributes[:'Region']
113
+ end
114
+
115
+ if attributes.has_key?(:'Subregion')
116
+ self.subregion = attributes[:'Subregion']
117
+ end
100
118
  end
101
119
 
102
120
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -123,7 +141,9 @@ module CloudmersiveValidateApiClient
123
141
  is_european_union_member == o.is_european_union_member &&
124
142
  iso_currency_code == o.iso_currency_code &&
125
143
  currency_symbol == o.currency_symbol &&
126
- currency_english_name == o.currency_english_name
144
+ currency_english_name == o.currency_english_name &&
145
+ region == o.region &&
146
+ subregion == o.subregion
127
147
  end
128
148
 
129
149
  # @see the `==` method
@@ -135,7 +155,7 @@ module CloudmersiveValidateApiClient
135
155
  # Calculates hash code according to all attributes.
136
156
  # @return [Fixnum] Hash code
137
157
  def hash
138
- [country_name, three_letter_code, iso_two_letter_code, is_european_union_member, iso_currency_code, currency_symbol, currency_english_name].hash
158
+ [country_name, three_letter_code, iso_two_letter_code, is_european_union_member, iso_currency_code, currency_symbol, currency_english_name, region, subregion].hash
139
159
  end
140
160
 
141
161
  # Builds the object from hash
@@ -45,6 +45,12 @@ module CloudmersiveValidateApiClient
45
45
  # Full name of the currency
46
46
  attr_accessor :currency_english_name
47
47
 
48
+ # Region (continent) in which the country is located; possible values are None, Europe, Americas, Asia, Africa, Oceania
49
+ attr_accessor :region
50
+
51
+ # Subregion in which the country is located; possible values are None, NorthernEurope, WesternEurope, SouthernEurope, EasternEurope, CentralAmerica, NorthernAmerica, SouthAmerica, EasternAfrica, MiddleAfrica, NorthernAfrica , SouthernAfrica , WesternAfrica , CentralAsia , EasternAsia , SouthernAsia , SouthEasternAsia , WesternAsia , Southern , Middle , AustraliaandNewZealand , Melanesia , Polynesia , Micronesia , Caribbean,
52
+ attr_accessor :subregion
53
+
48
54
  # Attribute mapping from ruby-style variable name to JSON key.
49
55
  def self.attribute_map
50
56
  {
@@ -57,7 +63,9 @@ module CloudmersiveValidateApiClient
57
63
  :'timezones' => :'Timezones',
58
64
  :'iso_currency_code' => :'ISOCurrencyCode',
59
65
  :'currency_symbol' => :'CurrencySymbol',
60
- :'currency_english_name' => :'CurrencyEnglishName'
66
+ :'currency_english_name' => :'CurrencyEnglishName',
67
+ :'region' => :'Region',
68
+ :'subregion' => :'Subregion'
61
69
  }
62
70
  end
63
71
 
@@ -73,7 +81,9 @@ module CloudmersiveValidateApiClient
73
81
  :'timezones' => :'Array<Timezone>',
74
82
  :'iso_currency_code' => :'String',
75
83
  :'currency_symbol' => :'String',
76
- :'currency_english_name' => :'String'
84
+ :'currency_english_name' => :'String',
85
+ :'region' => :'String',
86
+ :'subregion' => :'String'
77
87
  }
78
88
  end
79
89
 
@@ -126,6 +136,14 @@ module CloudmersiveValidateApiClient
126
136
  if attributes.has_key?(:'CurrencyEnglishName')
127
137
  self.currency_english_name = attributes[:'CurrencyEnglishName']
128
138
  end
139
+
140
+ if attributes.has_key?(:'Region')
141
+ self.region = attributes[:'Region']
142
+ end
143
+
144
+ if attributes.has_key?(:'Subregion')
145
+ self.subregion = attributes[:'Subregion']
146
+ end
129
147
  end
130
148
 
131
149
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -155,7 +173,9 @@ module CloudmersiveValidateApiClient
155
173
  timezones == o.timezones &&
156
174
  iso_currency_code == o.iso_currency_code &&
157
175
  currency_symbol == o.currency_symbol &&
158
- currency_english_name == o.currency_english_name
176
+ currency_english_name == o.currency_english_name &&
177
+ region == o.region &&
178
+ subregion == o.subregion
159
179
  end
160
180
 
161
181
  # @see the `==` method
@@ -167,7 +187,7 @@ module CloudmersiveValidateApiClient
167
187
  # Calculates hash code according to all attributes.
168
188
  # @return [Fixnum] Hash code
169
189
  def hash
170
- [successful, country_full_name, iso_two_letter_code, fips_two_letter_code, three_letter_code, is_european_union_member, timezones, iso_currency_code, currency_symbol, currency_english_name].hash
190
+ [successful, country_full_name, iso_two_letter_code, fips_two_letter_code, three_letter_code, is_european_union_member, timezones, iso_currency_code, currency_symbol, currency_english_name, region, subregion].hash
171
191
  end
172
192
 
173
193
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveValidateApiClient
14
- VERSION = '2.0.7'
14
+ VERSION = '2.0.8'
15
15
  end
@@ -79,6 +79,18 @@ describe 'AddressApi' do
79
79
  end
80
80
  end
81
81
 
82
+ # unit tests for address_get_country_region
83
+ # Get the region, subregion and continent of the country
84
+ # Gets the continent information including region and subregion for the input country.
85
+ # @param input Input request
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [ValidateCountryResponse]
88
+ describe 'address_get_country_region test' do
89
+ it 'should work' do
90
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
91
+ end
92
+ end
93
+
82
94
  # unit tests for address_get_timezone
83
95
  # Gets IANA/Olsen time zones for a country
84
96
  # Gets the IANA/Olsen time zones for a country.
@@ -74,4 +74,16 @@ describe 'CountryDetails' do
74
74
  end
75
75
  end
76
76
 
77
+ describe 'test attribute "region"' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
+ end
81
+ end
82
+
83
+ describe 'test attribute "subregion"' do
84
+ it 'should work' do
85
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
+ end
87
+ end
88
+
77
89
  end
@@ -92,4 +92,16 @@ describe 'ValidateCountryResponse' do
92
92
  end
93
93
  end
94
94
 
95
+ describe 'test attribute "region"' do
96
+ it 'should work' do
97
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
+ end
99
+ end
100
+
101
+ describe 'test attribute "subregion"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
95
107
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudmersive-validate-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-12 00:00:00.000000000 Z
11
+ date: 2020-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus