Skip to content

Commit 8f893c3

Browse files
author
github-actions-bot
committed
fix(countries): remove duplicate countries
1 parent c306123 commit 8f893c3

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
affixapi (1.1.57)
4+
affixapi (1.1.58)
55
typhoeus (~> 1.0, >= 1.0.1)
66

77
GEM

lib/openapi_client/models/address_no_non_null_request.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def self.openapi_nullable
8282
:'street_address',
8383
:'locality',
8484
:'administrative_area',
85+
:'country',
8586
:'post_code'
8687
])
8788
end
@@ -126,26 +127,21 @@ def initialize(attributes = {})
126127
# @return Array for valid properties with the reasons
127128
def list_invalid_properties
128129
invalid_properties = Array.new
129-
if @country.nil?
130-
invalid_properties.push('invalid value for "country", country cannot be nil.')
131-
end
132-
133130
invalid_properties
134131
end
135132

136133
# Check to see if the all the properties in the model are valid
137134
# @return true if the model is valid
138135
def valid?
139-
return false if @country.nil?
140-
country_validator = EnumAttributeValidator.new('String', ["CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LT", "LV", "LU", "NL", "NO", "PH", "PL", "RO", "SE", "SG", "SK", "CN", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "HK", "TW"])
136+
country_validator = EnumAttributeValidator.new('String', ["CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LU", "LV", "NL", "NO", "PH", "PL", "RO", "SE", "SK", "CN", "HK", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "TW"])
141137
return false unless country_validator.valid?(@country)
142138
true
143139
end
144140

145141
# Custom attribute writer method checking allowed values (enum).
146142
# @param [Object] country Object to be assigned
147143
def country=(country)
148-
validator = EnumAttributeValidator.new('String', ["CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LT", "LV", "LU", "NL", "NO", "PH", "PL", "RO", "SE", "SG", "SK", "CN", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "HK", "TW"])
144+
validator = EnumAttributeValidator.new('String', ["CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LU", "LV", "NL", "NO", "PH", "PL", "RO", "SE", "SK", "CN", "HK", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "TW"])
149145
unless validator.valid?(country)
150146
fail ArgumentError, "invalid value for \"country\", must be one of #{validator.allowable_values}."
151147
end

lib/openapi_client/models/address_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@ def list_invalid_properties
133133
# Check to see if the all the properties in the model are valid
134134
# @return true if the model is valid
135135
def valid?
136-
country_validator = EnumAttributeValidator.new('String', ["null", "CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LT", "LV", "LU", "NL", "NO", "PH", "PL", "RO", "SE", "SG", "SK", "CN", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "HK", "TW"])
136+
country_validator = EnumAttributeValidator.new('String', ["null", "CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LU", "LV", "NL", "NO", "PH", "PL", "RO", "SE", "SK", "CN", "HK", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "TW"])
137137
return false unless country_validator.valid?(@country)
138138
true
139139
end
140140

141141
# Custom attribute writer method checking allowed values (enum).
142142
# @param [Object] country Object to be assigned
143143
def country=(country)
144-
validator = EnumAttributeValidator.new('String', ["null", "CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LT", "LV", "LU", "NL", "NO", "PH", "PL", "RO", "SE", "SG", "SK", "CN", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "HK", "TW"])
144+
validator = EnumAttributeValidator.new('String', ["null", "CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LU", "LV", "NL", "NO", "PH", "PL", "RO", "SE", "SK", "CN", "HK", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "TW"])
145145
unless validator.valid?(country)
146146
fail ArgumentError, "invalid value for \"country\", must be one of #{validator.allowable_values}."
147147
end

lib/openapi_client/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
=end
1212

1313
module OpenapiClient
14-
VERSION = '1.1.57'
14+
VERSION = '1.1.58'
1515
end

spec/models/address_no_non_null_request_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
describe 'test attribute "country"' do
4747
it 'should work' do
4848
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LT", "LV", "LU", "NL", "NO", "PH", "PL", "RO", "SE", "SG", "SK", "CN", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "HK", "TW"])
49+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LU", "LV", "NL", "NO", "PH", "PL", "RO", "SE", "SK", "CN", "HK", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "TW"])
5050
# validator.allowable_values.each do |value|
5151
# expect { instance.country = value }.not_to raise_error
5252
# end

spec/models/address_response_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
describe 'test attribute "country"' do
4747
it 'should work' do
4848
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["null", "CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LT", "LV", "LU", "NL", "NO", "PH", "PL", "RO", "SE", "SG", "SK", "CN", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "HK", "TW"])
49+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["null", "CA", "US", "MX", "AT", "AU", "BE", "CH", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GB", "IE", "IM", "IS", "IT", "LI", "LT", "LU", "LV", "NL", "NO", "PH", "PL", "RO", "SE", "SK", "CN", "HK", "ID", "IN", "JP", "KR", "MO", "MY", "SG", "TW"])
5050
# validator.allowable_values.each do |value|
5151
# expect { instance.country = value }.not_to raise_error
5252
# end

0 commit comments

Comments
 (0)