files.com 1.1.724 → 1.1.726

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e23c9113ed96b29c135b19d6386ab1db06fe9915b66bd9f7290e7557fd8d40db
4
- data.tar.gz: 3c6a7fb5723b5a4448963b9efb02fc3ebe0e90c80ab1cfc051f11644c3114f91
3
+ metadata.gz: 99d00ff3f6de44502b570e22218eecd9db83139f7e8a390164348b03338af067
4
+ data.tar.gz: 224c7b2de16f38355ca2c965edbb91334b068d6493f7a8e33235c8f13643e566
5
5
  SHA512:
6
- metadata.gz: 12dff8c75085e405bcbafe375424e60a8b7907608974579a25bad627432fe38b118bfb6bc1b0e9e6eb1a55331646be3dc5e8b0e33f652689dde96ce18eac3ae5
7
- data.tar.gz: 69acaf3ad0fadffd419fc3ab261e819a8c0f10bfb94e71691428866436ba325be1f819aae4e92f60709db9e7c391a1a4060c28743c56ee755d0a2fdd1e60da09
6
+ metadata.gz: 95e8400e5d1ccefae4287f70d53a74076fafa70da9930dc683a2208856ea824bff349c84715e16f397fd358607bf596656277d701b84df71575ca6fe1b928ac5
7
+ data.tar.gz: f0030b332879bc0d32f7d8b5c83ecfb8552654672cd5456bf6c13310cfd33d419fb0b3fed5a9792186b514feb7c93bfd169b931cabc763f938c02f7e8c969a35
data/Gemfile.lock CHANGED
@@ -2,10 +2,10 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  files.com (1.1.0)
5
- addressable (>= 2.8.0)
5
+ addressable (>= 2.9.0)
6
6
  base64 (~> 0.2)
7
7
  bigdecimal
8
- concurrent-ruby (>= 1.1.3)
8
+ concurrent-ruby (>= 1.3.7)
9
9
  faraday (>= 1.0.1)
10
10
  faraday-multipart (>= 1.0)
11
11
  faraday-net_http_persistent (>= 2.0)
@@ -16,15 +16,15 @@ PATH
16
16
  GEM
17
17
  remote: https://rubygems.org/
18
18
  specs:
19
- addressable (2.8.1)
20
- public_suffix (>= 2.0.2, < 6.0)
19
+ addressable (2.9.0)
20
+ public_suffix (>= 2.0.2, < 8.0)
21
21
  ast (2.4.2)
22
22
  base64 (0.2.0)
23
23
  benchmark (0.4.1)
24
24
  bigdecimal (4.1.3)
25
25
  byebug (11.1.3)
26
26
  coderay (1.1.3)
27
- concurrent-ruby (1.1.10)
27
+ concurrent-ruby (1.3.8)
28
28
  connection_pool (2.2.5)
29
29
  diff-lcs (1.5.0)
30
30
  faraday (2.5.2)
@@ -58,7 +58,7 @@ GEM
58
58
  rainbow (3.1.1)
59
59
  rake (13.0.6)
60
60
  regexp_parser (2.5.0)
61
- rexml (3.2.5)
61
+ rexml (3.4.4)
62
62
  rspec (3.11.0)
63
63
  rspec-core (~> 3.11.0)
64
64
  rspec-expectations (~> 3.11.0)
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.724
1
+ 1.1.726
@@ -11,6 +11,10 @@
11
11
  "ssl_certificate_id": 1,
12
12
  "brick_managed": true,
13
13
  "folder_behavior_id": 1,
14
+ "ip_addresses": [
15
+ "203.0.113.1",
16
+ "203.0.113.2"
17
+ ],
14
18
  "created_at": "2000-01-01T01:00:00Z",
15
19
  "updated_at": "2000-01-01T01:00:00Z"
16
20
  }
@@ -23,6 +27,7 @@
23
27
  * `ssl_certificate_id` (int64): Current SSL certificate ID.
24
28
  * `brick_managed` (boolean): Is this domain's SSL certificate automatically managed and renewed by Files.com?
25
29
  * `folder_behavior_id` (int64): Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior. Preserved as historical context when `destination` becomes `unassigned`.
30
+ * `ip_addresses` (array(string)): Dedicated public IP addresses allocated to this Custom Domain.
26
31
  * `created_at` (date-time): When this Custom Domain was created.
27
32
  * `updated_at` (date-time): When this Custom Domain was last updated.
28
33
 
@@ -55,6 +60,22 @@ Files::CustomDomain.find(id)
55
60
  * `id` (int64): Required - Custom Domain ID.
56
61
 
57
62
 
63
+ ---
64
+
65
+ ## Allocate dedicated IP addresses to this Custom Domain
66
+
67
+ ```
68
+ Files::CustomDomain.create_allocate_ip(id,
69
+ count: 1
70
+ )
71
+ ```
72
+
73
+ ### Parameters
74
+
75
+ * `id` (int64): Required - Custom Domain ID.
76
+ * `count` (int64): Required - Number of dedicated IP addresses to allocate.
77
+
78
+
58
79
  ---
59
80
 
60
81
  ## Create Custom Domain
@@ -5,6 +5,7 @@
5
5
  ```
6
6
  {
7
7
  "active": true,
8
+ "custom_domain_id": 1,
8
9
  "id": 1,
9
10
  "name": "My Key",
10
11
  "key_type": "ssh-rsa",
@@ -14,6 +15,7 @@
14
15
  ```
15
16
 
16
17
  * `active` (boolean): If true, use this SFTP Host Key.
18
+ * `custom_domain_id` (int64): Custom Domain ID. If set, this key is used only for that Custom Domain.
17
19
  * `id` (int64): SFTP Host Key ID
18
20
  * `name` (string): The friendly name of this SFTP Host Key.
19
21
  * `key_type` (string): SSH key type
@@ -56,6 +58,7 @@ Files::SftpHostKey.find(id)
56
58
  ```
57
59
  Files::SftpHostKey.create(
58
60
  active: true,
61
+ custom_domain_id: 1,
59
62
  name: "My Key"
60
63
  )
61
64
  ```
@@ -63,6 +66,7 @@ Files::SftpHostKey.create(
63
66
  ### Parameters
64
67
 
65
68
  * `active` (boolean): If true, use this SFTP Host Key.
69
+ * `custom_domain_id` (int64): Custom Domain ID. If set, this key is used only for that Custom Domain.
66
70
  * `name` (string): The friendly name of this SFTP Host Key.
67
71
  * `private_key` (string): The private key data.
68
72
 
@@ -74,6 +78,7 @@ Files::SftpHostKey.create(
74
78
  ```
75
79
  Files::SftpHostKey.update(id,
76
80
  active: true,
81
+ custom_domain_id: 1,
77
82
  name: "My Key"
78
83
  )
79
84
  ```
@@ -82,6 +87,7 @@ Files::SftpHostKey.update(id,
82
87
 
83
88
  * `id` (int64): Required - Sftp Host Key ID.
84
89
  * `active` (boolean): If true, use this SFTP Host Key.
90
+ * `custom_domain_id` (int64): Custom Domain ID. If set, this key is used only for that Custom Domain.
85
91
  * `name` (string): The friendly name of this SFTP Host Key.
86
92
  * `private_key` (string): The private key data.
87
93
 
@@ -108,6 +114,7 @@ sftp_host_key = Files::SftpHostKey.find(id)
108
114
 
109
115
  sftp_host_key.update(
110
116
  active: true,
117
+ custom_domain_id: 1,
111
118
  name: "My Key"
112
119
  )
113
120
  ```
@@ -116,6 +123,7 @@ sftp_host_key.update(
116
123
 
117
124
  * `id` (int64): Required - Sftp Host Key ID.
118
125
  * `active` (boolean): If true, use this SFTP Host Key.
126
+ * `custom_domain_id` (int64): Custom Domain ID. If set, this key is used only for that Custom Domain.
119
127
  * `name` (string): The friendly name of this SFTP Host Key.
120
128
  * `private_key` (string): The private key data.
121
129
 
data/files.com.gemspec CHANGED
@@ -11,10 +11,10 @@ Gem::Specification.new do |s|
11
11
  s.description = "The Files.com Ruby client."
12
12
  s.license = "MIT"
13
13
  s.required_ruby_version = ">= 2.7"
14
- s.add_dependency 'addressable', ">= 2.8.0"
14
+ s.add_dependency 'addressable', ">= 2.9.0"
15
15
  s.add_dependency 'base64', "~> 0.2"
16
16
  s.add_dependency 'bigdecimal', ">= 0"
17
- s.add_dependency 'concurrent-ruby', ">= 1.1.3"
17
+ s.add_dependency 'concurrent-ruby', ">= 1.3.7"
18
18
  s.add_dependency 'faraday', ">= 1.0.1"
19
19
  s.add_dependency 'faraday-multipart', ">= 1.0"
20
20
  s.add_dependency 'faraday-net_http_persistent', '>= 2.0'
@@ -72,6 +72,15 @@ module Files
72
72
  @attributes[:folder_behavior_id] = value
73
73
  end
74
74
 
75
+ # array(string) - Dedicated public IP addresses allocated to this Custom Domain.
76
+ def ip_addresses
77
+ @attributes[:ip_addresses]
78
+ end
79
+
80
+ def ip_addresses=(value)
81
+ @attributes[:ip_addresses] = value
82
+ end
83
+
75
84
  # date-time - When this Custom Domain was created.
76
85
  def created_at
77
86
  @attributes[:created_at]
@@ -161,6 +170,21 @@ module Files
161
170
  find(id, params, options)
162
171
  end
163
172
 
173
+ # Parameters:
174
+ # id (required) - int64 - Custom Domain ID.
175
+ # count (required) - int64 - Number of dedicated IP addresses to allocate.
176
+ def self.create_allocate_ip(id, params = {}, options = {})
177
+ params ||= {}
178
+ params[:id] = id
179
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
180
+ raise InvalidParameterError.new("Bad parameter: count must be an Integer") if params[:count] and !params[:count].is_a?(Integer)
181
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
182
+ raise MissingParameterError.new("Parameter missing: count") unless params[:count]
183
+
184
+ response, options = Api.send_request("/custom_domains/#{params[:id]}/allocate_ips", :post, params, options)
185
+ CustomDomain.new(response.data, options)
186
+ end
187
+
164
188
  # Parameters:
165
189
  # destination - string - Where this custom domain routes. Can be `site_alias`, `public_hosting`, `s3_endpoint`, or `unassigned` (not routing traffic). Set to `unassigned` automatically when a bound `public_hosting` folder behavior is deleted, and can be set manually via the API for any reason.
166
190
  # folder_behavior_id - int64 - Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior. Preserved as historical context when `destination` becomes `unassigned`.
@@ -18,6 +18,15 @@ module Files
18
18
  @attributes[:active] = value
19
19
  end
20
20
 
21
+ # int64 - Custom Domain ID. If set, this key is used only for that Custom Domain.
22
+ def custom_domain_id
23
+ @attributes[:custom_domain_id]
24
+ end
25
+
26
+ def custom_domain_id=(value)
27
+ @attributes[:custom_domain_id] = value
28
+ end
29
+
21
30
  # int64 - SFTP Host Key ID
22
31
  def id
23
32
  @attributes[:id]
@@ -74,6 +83,7 @@ module Files
74
83
 
75
84
  # Parameters:
76
85
  # active - boolean - If true, use this SFTP Host Key.
86
+ # custom_domain_id - int64 - Custom Domain ID. If set, this key is used only for that Custom Domain.
77
87
  # name - string - The friendly name of this SFTP Host Key.
78
88
  # private_key - string - The private key data.
79
89
  def update(params = {})
@@ -81,6 +91,7 @@ module Files
81
91
  params[:id] = @attributes[:id]
82
92
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
83
93
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
94
+ raise InvalidParameterError.new("Bad parameter: custom_domain_id must be an Integer") if params[:custom_domain_id] and !params[:custom_domain_id].is_a?(Integer)
84
95
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
85
96
  raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String)
86
97
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
@@ -148,9 +159,11 @@ module Files
148
159
 
149
160
  # Parameters:
150
161
  # active - boolean - If true, use this SFTP Host Key.
162
+ # custom_domain_id - int64 - Custom Domain ID. If set, this key is used only for that Custom Domain.
151
163
  # name - string - The friendly name of this SFTP Host Key.
152
164
  # private_key - string - The private key data.
153
165
  def self.create(params = {}, options = {})
166
+ raise InvalidParameterError.new("Bad parameter: custom_domain_id must be an Integer") if params[:custom_domain_id] and !params[:custom_domain_id].is_a?(Integer)
154
167
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
155
168
  raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String)
156
169
 
@@ -160,12 +173,14 @@ module Files
160
173
 
161
174
  # Parameters:
162
175
  # active - boolean - If true, use this SFTP Host Key.
176
+ # custom_domain_id - int64 - Custom Domain ID. If set, this key is used only for that Custom Domain.
163
177
  # name - string - The friendly name of this SFTP Host Key.
164
178
  # private_key - string - The private key data.
165
179
  def self.update(id, params = {}, options = {})
166
180
  params ||= {}
167
181
  params[:id] = id
168
182
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
183
+ raise InvalidParameterError.new("Bad parameter: custom_domain_id must be an Integer") if params[:custom_domain_id] and !params[:custom_domain_id].is_a?(Integer)
169
184
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
170
185
  raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String)
171
186
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.724"
4
+ VERSION = "1.1.726"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.724
4
+ version: 1.1.726
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-15 00:00:00.000000000 Z
11
+ date: 2026-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.8.0
19
+ version: 2.9.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 2.8.0
26
+ version: 2.9.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: base64
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 1.1.3
61
+ version: 1.3.7
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 1.1.3
68
+ version: 1.3.7
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: faraday
71
71
  requirement: !ruby/object:Gem::Requirement