pnap_ip_api 2.2.0 → 2.3.0

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.
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
9
+ Generator version: 7.20.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module IpApi
17
17
  # Tag request to assign to resource.
18
- class TagAssignmentRequest
18
+ class TagAssignmentRequest < ApiModelBase
19
19
  # The name of the tag. Tag names are case-sensitive, and should be composed of a maximum of 100 characters including UTF-8 Unicode letters, numbers, and the following symbols: '-', '_'. Regex: [A-zÀ-ú0-9_-]{1,100}.
20
20
  attr_accessor :name
21
21
 
@@ -30,9 +30,14 @@ module IpApi
30
30
  }
31
31
  end
32
32
 
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
33
38
  # Returns all the JSON keys this model knows about
34
39
  def self.acceptable_attributes
35
- attribute_map.values
40
+ acceptable_attribute_map.values
36
41
  end
37
42
 
38
43
  # Attribute type mapping.
@@ -57,9 +62,10 @@ module IpApi
57
62
  end
58
63
 
59
64
  # check to see if the attribute exists and convert string to symbol for hash key
65
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
66
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
- if (!self.class.attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `IpApi::TagAssignmentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ if (!acceptable_attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `IpApi::TagAssignmentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
69
  end
64
70
  h[k.to_sym] = v
65
71
  }
@@ -95,6 +101,16 @@ module IpApi
95
101
  true
96
102
  end
97
103
 
104
+ # Custom attribute writer method with validation
105
+ # @param [Object] name Value to be assigned
106
+ def name=(name)
107
+ if name.nil?
108
+ fail ArgumentError, 'name cannot be nil'
109
+ end
110
+
111
+ @name = name
112
+ end
113
+
98
114
  # Checks equality by comparing each attribute.
99
115
  # @param [Object] Object to be compared
100
116
  def ==(o)
@@ -139,61 +155,6 @@ module IpApi
139
155
  new(transformed_hash)
140
156
  end
141
157
 
142
- # Deserializes the data based on type
143
- # @param string type Data type
144
- # @param string value Value to be deserialized
145
- # @return [Object] Deserialized data
146
- def self._deserialize(type, value)
147
- case type.to_sym
148
- when :Time
149
- Time.parse(value)
150
- when :Date
151
- Date.parse(value)
152
- when :String
153
- value.to_s
154
- when :Integer
155
- value.to_i
156
- when :Float
157
- value.to_f
158
- when :Boolean
159
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
160
- true
161
- else
162
- false
163
- end
164
- when :Object
165
- # generic object (usually a Hash), return directly
166
- value
167
- when /\AArray<(?<inner_type>.+)>\z/
168
- inner_type = Regexp.last_match[:inner_type]
169
- value.map { |v| _deserialize(inner_type, v) }
170
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
171
- k_type = Regexp.last_match[:k_type]
172
- v_type = Regexp.last_match[:v_type]
173
- {}.tap do |hash|
174
- value.each do |k, v|
175
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
176
- end
177
- end
178
- else # model
179
- # models (e.g. Pet) or oneOf
180
- klass = IpApi.const_get(type)
181
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
182
- end
183
- end
184
-
185
- # Returns the string representation of the object
186
- # @return [String] String presentation of the object
187
- def to_s
188
- to_hash.to_s
189
- end
190
-
191
- # to_body is an alias to to_hash (backward compatibility)
192
- # @return [Hash] Returns the object in the form of hash
193
- def to_body
194
- to_hash
195
- end
196
-
197
158
  # Returns the object in the form of hash
198
159
  # @return [Hash] Returns the object in the form of hash
199
160
  def to_hash
@@ -210,24 +171,6 @@ module IpApi
210
171
  hash
211
172
  end
212
173
 
213
- # Outputs non-array value in the form of hash
214
- # For object, use to_hash. Otherwise, just return the value
215
- # @param [Object] value Any valid value
216
- # @return [Hash] Returns the value in the form of hash
217
- def _to_hash(value)
218
- if value.is_a?(Array)
219
- value.compact.map { |v| _to_hash(v) }
220
- elsif value.is_a?(Hash)
221
- {}.tap do |hash|
222
- value.each { |k, v| hash[k] = _to_hash(v) }
223
- end
224
- elsif value.respond_to? :to_hash
225
- value.to_hash
226
- else
227
- value
228
- end
229
- end
230
-
231
174
  end
232
175
 
233
176
  end
@@ -6,8 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
10
-
9
+ Generator version: 7.20.0
11
10
  =end
12
11
 
13
12
  def get_version()
data/lib/pnap_ip_api.rb CHANGED
@@ -6,13 +6,14 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
9
+ Generator version: 7.20.0
10
10
 
11
11
  =end
12
12
 
13
13
  # Common files
14
14
  require 'pnap_ip_api/api_client'
15
15
  require 'pnap_ip_api/api_error'
16
+ require 'pnap_ip_api/api_model_base'
16
17
  require 'pnap_ip_api/version'
17
18
  require 'pnap_ip_api/configuration'
18
19
 
data/pnap_ip_api.gemspec CHANGED
@@ -8,7 +8,7 @@
8
8
  The version of the OpenAPI document: 1.0
9
9
  Contact: support@phoenixnap.com
10
10
  Generated by: https://openapi-generator.tech
11
- OpenAPI Generator version: 7.2.0
11
+ Generator version: 7.20.0
12
12
 
13
13
  =end
14
14
 
@@ -19,14 +19,14 @@ Gem::Specification.new do |s|
19
19
  s.name = "pnap_ip_api"
20
20
  s.version = IpApi::VERSION
21
21
  s.platform = Gem::Platform::RUBY
22
- s.authors = ["PhoenixNAP"]
22
+ s.authors = ["OpenAPI-Generator"]
23
23
  s.email = ["support@phoenixnap.com"]
24
- s.homepage = "https://phoenixnap.com/bare-metal-cloud"
24
+ s.homepage = "https://openapi-generator.tech"
25
25
  s.summary = "IP Addresses API Ruby Gem"
26
- s.description = "IP Addresses API Ruby Gem"
26
+ s.description = "Public IP blocks are a set of contiguous IPs that allow you to access your servers or networks from the internet. Use the IP Addresses API to request and delete IP blocks.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/public-ip-management#bmc-public-ip-allocations-api' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/ips/v1/)</b> "
27
27
  s.license = "MPL-2.0"
28
28
  s.required_ruby_version = ">= 2.7"
29
- s.metadata = { "source_code_uri" => "https://github.com/phoenixnap/ruby-sdk-bmc" }
29
+ s.metadata = {}
30
30
 
31
31
  s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
32
32
 
@@ -36,4 +36,4 @@ Gem::Specification.new do |s|
36
36
  s.test_files = `find spec/*`.split("\n")
37
37
  s.executables = []
38
38
  s.require_paths = ["lib"]
39
- end
39
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
9
+ Generator version: 7.20.0
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
9
+ Generator version: 7.20.0
10
10
 
11
11
  =end
12
12
 
@@ -18,7 +18,7 @@ require 'date'
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
20
  describe IpApi::DeleteIpBlockResult do
21
- let(:instance) { IpApi::DeleteIpBlockResult.new }
21
+ #let(:instance) { IpApi::DeleteIpBlockResult.new }
22
22
 
23
23
  describe 'test an instance of DeleteIpBlockResult' do
24
24
  it 'should create an instance of DeleteIpBlockResult' do
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
9
+ Generator version: 7.20.0
10
10
 
11
11
  =end
12
12
 
@@ -18,7 +18,7 @@ require 'date'
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
20
  describe IpApi::Error do
21
- let(:instance) { IpApi::Error.new }
21
+ #let(:instance) { IpApi::Error.new }
22
22
 
23
23
  describe 'test an instance of Error' do
24
24
  it 'should create an instance of Error' do
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
9
+ Generator version: 7.20.0
10
10
 
11
11
  =end
12
12
 
@@ -18,7 +18,7 @@ require 'date'
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
20
  describe IpApi::IpBlockCreate do
21
- let(:instance) { IpApi::IpBlockCreate.new }
21
+ #let(:instance) { IpApi::IpBlockCreate.new }
22
22
 
23
23
  describe 'test an instance of IpBlockCreate' do
24
24
  it 'should create an instance of IpBlockCreate' do
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
9
+ Generator version: 7.20.0
10
10
 
11
11
  =end
12
12
 
@@ -18,7 +18,7 @@ require 'date'
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
20
  describe IpApi::IpBlockPatch do
21
- let(:instance) { IpApi::IpBlockPatch.new }
21
+ #let(:instance) { IpApi::IpBlockPatch.new }
22
22
 
23
23
  describe 'test an instance of IpBlockPatch' do
24
24
  it 'should create an instance of IpBlockPatch' do
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
9
+ Generator version: 7.20.0
10
10
 
11
11
  =end
12
12
 
@@ -18,7 +18,7 @@ require 'date'
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
20
  describe IpApi::IpBlock do
21
- let(:instance) { IpApi::IpBlock.new }
21
+ #let(:instance) { IpApi::IpBlock.new }
22
22
 
23
23
  describe 'test an instance of IpBlock' do
24
24
  it 'should create an instance of IpBlock' do
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
9
+ Generator version: 7.20.0
10
10
 
11
11
  =end
12
12
 
@@ -18,7 +18,7 @@ require 'date'
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
20
  describe IpApi::TagAssignmentRequest do
21
- let(:instance) { IpApi::TagAssignmentRequest.new }
21
+ #let(:instance) { IpApi::TagAssignmentRequest.new }
22
22
 
23
23
  describe 'test an instance of TagAssignmentRequest' do
24
24
  it 'should create an instance of TagAssignmentRequest' do
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
9
+ Generator version: 7.20.0
10
10
 
11
11
  =end
12
12
 
@@ -18,7 +18,7 @@ require 'date'
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
20
  describe IpApi::TagAssignment do
21
- let(:instance) { IpApi::TagAssignment.new }
21
+ #let(:instance) { IpApi::TagAssignment.new }
22
22
 
23
23
  describe 'test an instance of TagAssignment' do
24
24
  it 'should create an instance of TagAssignment' do
data/spec/spec_helper.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0
7
7
  Contact: support@phoenixnap.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.2.0
9
+ Generator version: 7.20.0
10
10
 
11
11
  =end
12
12
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pnap_ip_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
- - PhoenixNAP
7
+ - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-15 00:00:00.000000000 Z
11
+ date: 2026-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -50,7 +50,11 @@ dependencies:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
52
  version: 3.6.0
53
- description: IP Addresses API Ruby Gem
53
+ description: 'Public IP blocks are a set of contiguous IPs that allow you to access
54
+ your servers or networks from the internet. Use the IP Addresses API to request
55
+ and delete IP blocks.<br> <br> <span class=''pnap-api-knowledge-base-link''> Knowledge
56
+ base articles to help you can be found <a href=''https://phoenixnap.com/kb/public-ip-management#bmc-public-ip-allocations-api''
57
+ target=''_blank''>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/ips/v1/)</b> '
54
58
  email:
55
59
  - support@phoenixnap.com
56
60
  executables: []
@@ -73,6 +77,7 @@ files:
73
77
  - lib/pnap_ip_api/api/ip_blocks_api.rb
74
78
  - lib/pnap_ip_api/api_client.rb
75
79
  - lib/pnap_ip_api/api_error.rb
80
+ - lib/pnap_ip_api/api_model_base.rb
76
81
  - lib/pnap_ip_api/configuration.rb
77
82
  - lib/pnap_ip_api/models/delete_ip_block_result.rb
78
83
  - lib/pnap_ip_api/models/error.rb
@@ -92,11 +97,10 @@ files:
92
97
  - spec/models/tag_assignment_request_spec.rb
93
98
  - spec/models/tag_assignment_spec.rb
94
99
  - spec/spec_helper.rb
95
- homepage: https://phoenixnap.com/bare-metal-cloud
100
+ homepage: https://openapi-generator.tech
96
101
  licenses:
97
102
  - MPL-2.0
98
- metadata:
99
- source_code_uri: https://github.com/phoenixnap/ruby-sdk-bmc
103
+ metadata: {}
100
104
  post_install_message:
101
105
  rdoc_options: []
102
106
  require_paths:
@@ -118,11 +122,11 @@ specification_version: 4
118
122
  summary: IP Addresses API Ruby Gem
119
123
  test_files:
120
124
  - spec/api/ip_blocks_api_spec.rb
125
+ - spec/models/ip_block_create_spec.rb
121
126
  - spec/models/error_spec.rb
122
127
  - spec/models/tag_assignment_spec.rb
123
- - spec/models/delete_ip_block_result_spec.rb
124
128
  - spec/models/tag_assignment_request_spec.rb
125
129
  - spec/models/ip_block_patch_spec.rb
126
130
  - spec/models/ip_block_spec.rb
127
- - spec/models/ip_block_create_spec.rb
131
+ - spec/models/delete_ip_block_result_spec.rb
128
132
  - spec/spec_helper.rb