files.com 1.1.649 → 1.1.650

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: f762883ff6e320131d7226422ae25f1800e1fbe172e47364e4af6551a32545a0
4
- data.tar.gz: 2869f62037e0932d98f81023013b9ed08f180cba307a137f5b6fad728dbd2f65
3
+ metadata.gz: f7dde18d343e9bf8a8538ccfb34491976a3db43de79ce6589d686767c75316bd
4
+ data.tar.gz: 7d82c5763649255e9817bca9f5c06a6936615ab76e2dd3e160b2d86ece0f61a5
5
5
  SHA512:
6
- metadata.gz: 826dc59eaa2592234e807c00d047e4323efb3a1dc6c511413b349ebe4a78b385a8dbeb6d4733eb8a9000bbf280a7ac94f5cf764c4a5f72bf399f4a7b1a3530b7
7
- data.tar.gz: db29182d2dee5cf4c7896f84521e9a0b79bb2a6ef42bf0ada476d7d2407bd5d36faa3fa0bed0bf4ed7fd2f9322621c4be49c27da103b25540f431641750c7e8d
6
+ metadata.gz: b83595592c9e9e3ac15367209f141970cd60c28a6c7dd78756a82adb027e70e2b026aadaf0c66398c9a82be5b4ab31c5479447496e129b0eb5ec76449caec23a
7
+ data.tar.gz: 3350a714101aa458812fd311a8899040484d16b2d4393cfce4cd445230e87866a783e37cc0f945d288e72fcbc37d278d7a879834c2b34e6e47f4ade1f1a3d1f3
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.649
1
+ 1.1.650
@@ -0,0 +1,150 @@
1
+ # CustomDomain
2
+
3
+ ## Example CustomDomain Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "domain": "files.example.com",
9
+ "destination": "site_alias",
10
+ "dns_status": "correct",
11
+ "ssl_certificate_id": 1,
12
+ "brick_managed": true,
13
+ "folder_behavior_id": 1,
14
+ "created_at": "2000-01-01T01:00:00Z",
15
+ "updated_at": "2000-01-01T01:00:00Z"
16
+ }
17
+ ```
18
+
19
+ * `id` (int64): Custom Domain ID.
20
+ * `domain` (string): Customer-owned domain name.
21
+ * `destination` (string): Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
22
+ * `dns_status` (string): Current DNS verification status.
23
+ * `ssl_certificate_id` (int64): Current SSL certificate ID.
24
+ * `brick_managed` (boolean): Is this domain's SSL certificate automatically managed and renewed by Files.com?
25
+ * `folder_behavior_id` (int64): Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
26
+ * `created_at` (date-time): When this Custom Domain was created.
27
+ * `updated_at` (date-time): When this Custom Domain was last updated.
28
+
29
+
30
+ ---
31
+
32
+ ## List Custom Domains
33
+
34
+ ```
35
+ Files::CustomDomain.list
36
+ ```
37
+
38
+ ### Parameters
39
+
40
+ * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
41
+ * `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
42
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `id`.
43
+
44
+
45
+ ---
46
+
47
+ ## Show Custom Domain
48
+
49
+ ```
50
+ Files::CustomDomain.find(id)
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+ * `id` (int64): Required - Custom Domain ID.
56
+
57
+
58
+ ---
59
+
60
+ ## Create Custom Domain
61
+
62
+ ```
63
+ Files::CustomDomain.create(
64
+ destination: "site_alias",
65
+ folder_behavior_id: 1,
66
+ ssl_certificate_id: 1,
67
+ domain: "files.example.com"
68
+ )
69
+ ```
70
+
71
+ ### Parameters
72
+
73
+ * `destination` (string): Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
74
+ * `folder_behavior_id` (int64): Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
75
+ * `ssl_certificate_id` (int64): Current SSL certificate ID.
76
+ * `domain` (string): Required - Customer-owned domain name.
77
+
78
+
79
+ ---
80
+
81
+ ## Update Custom Domain
82
+
83
+ ```
84
+ Files::CustomDomain.update(id,
85
+ destination: "site_alias",
86
+ folder_behavior_id: 1,
87
+ ssl_certificate_id: 1,
88
+ domain: "files.example.com"
89
+ )
90
+ ```
91
+
92
+ ### Parameters
93
+
94
+ * `id` (int64): Required - Custom Domain ID.
95
+ * `destination` (string): Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
96
+ * `folder_behavior_id` (int64): Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
97
+ * `ssl_certificate_id` (int64): Current SSL certificate ID.
98
+ * `domain` (string): Customer-owned domain name.
99
+
100
+
101
+ ---
102
+
103
+ ## Delete Custom Domain
104
+
105
+ ```
106
+ Files::CustomDomain.delete(id)
107
+ ```
108
+
109
+ ### Parameters
110
+
111
+ * `id` (int64): Required - Custom Domain ID.
112
+
113
+
114
+ ---
115
+
116
+ ## Update Custom Domain
117
+
118
+ ```
119
+ custom_domain = Files::CustomDomain.find(id)
120
+
121
+ custom_domain.update(
122
+ destination: "site_alias",
123
+ folder_behavior_id: 1,
124
+ ssl_certificate_id: 1,
125
+ domain: "files.example.com"
126
+ )
127
+ ```
128
+
129
+ ### Parameters
130
+
131
+ * `id` (int64): Required - Custom Domain ID.
132
+ * `destination` (string): Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
133
+ * `folder_behavior_id` (int64): Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
134
+ * `ssl_certificate_id` (int64): Current SSL certificate ID.
135
+ * `domain` (string): Customer-owned domain name.
136
+
137
+
138
+ ---
139
+
140
+ ## Delete Custom Domain
141
+
142
+ ```
143
+ custom_domain = Files::CustomDomain.find(id)
144
+
145
+ custom_domain.delete
146
+ ```
147
+
148
+ ### Parameters
149
+
150
+ * `id` (int64): Required - Custom Domain ID.
@@ -0,0 +1,214 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class CustomDomain
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - Custom Domain ID.
13
+ def id
14
+ @attributes[:id]
15
+ end
16
+
17
+ def id=(value)
18
+ @attributes[:id] = value
19
+ end
20
+
21
+ # string - Customer-owned domain name.
22
+ def domain
23
+ @attributes[:domain]
24
+ end
25
+
26
+ def domain=(value)
27
+ @attributes[:domain] = value
28
+ end
29
+
30
+ # string - Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
31
+ def destination
32
+ @attributes[:destination]
33
+ end
34
+
35
+ def destination=(value)
36
+ @attributes[:destination] = value
37
+ end
38
+
39
+ # string - Current DNS verification status.
40
+ def dns_status
41
+ @attributes[:dns_status]
42
+ end
43
+
44
+ def dns_status=(value)
45
+ @attributes[:dns_status] = value
46
+ end
47
+
48
+ # int64 - Current SSL certificate ID.
49
+ def ssl_certificate_id
50
+ @attributes[:ssl_certificate_id]
51
+ end
52
+
53
+ def ssl_certificate_id=(value)
54
+ @attributes[:ssl_certificate_id] = value
55
+ end
56
+
57
+ # boolean - Is this domain's SSL certificate automatically managed and renewed by Files.com?
58
+ def brick_managed
59
+ @attributes[:brick_managed]
60
+ end
61
+
62
+ def brick_managed=(value)
63
+ @attributes[:brick_managed] = value
64
+ end
65
+
66
+ # int64 - Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
67
+ def folder_behavior_id
68
+ @attributes[:folder_behavior_id]
69
+ end
70
+
71
+ def folder_behavior_id=(value)
72
+ @attributes[:folder_behavior_id] = value
73
+ end
74
+
75
+ # date-time - When this Custom Domain was created.
76
+ def created_at
77
+ @attributes[:created_at]
78
+ end
79
+
80
+ # date-time - When this Custom Domain was last updated.
81
+ def updated_at
82
+ @attributes[:updated_at]
83
+ end
84
+
85
+ # Parameters:
86
+ # destination - string - Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
87
+ # folder_behavior_id - int64 - Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
88
+ # ssl_certificate_id - int64 - Current SSL certificate ID.
89
+ # domain - string - Customer-owned domain name.
90
+ def update(params = {})
91
+ params ||= {}
92
+ params[:id] = @attributes[:id]
93
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
94
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
95
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
96
+ raise InvalidParameterError.new("Bad parameter: folder_behavior_id must be an Integer") if params[:folder_behavior_id] and !params[:folder_behavior_id].is_a?(Integer)
97
+ raise InvalidParameterError.new("Bad parameter: ssl_certificate_id must be an Integer") if params[:ssl_certificate_id] and !params[:ssl_certificate_id].is_a?(Integer)
98
+ raise InvalidParameterError.new("Bad parameter: domain must be an String") if params[:domain] and !params[:domain].is_a?(String)
99
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
100
+
101
+ Api.send_request("/custom_domains/#{@attributes[:id]}", :patch, params, @options)
102
+ end
103
+
104
+ def delete(params = {})
105
+ params ||= {}
106
+ params[:id] = @attributes[:id]
107
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
108
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
109
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
110
+
111
+ Api.send_request("/custom_domains/#{@attributes[:id]}", :delete, params, @options)
112
+ end
113
+
114
+ def destroy(params = {})
115
+ delete(params)
116
+ nil
117
+ end
118
+
119
+ def save
120
+ if @attributes[:id]
121
+ new_obj = update(@attributes)
122
+ else
123
+ new_obj = CustomDomain.create(@attributes, @options)
124
+ end
125
+
126
+ @attributes = new_obj.attributes
127
+ true
128
+ end
129
+
130
+ # Parameters:
131
+ # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
132
+ # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
133
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `id`.
134
+ def self.list(params = {}, options = {})
135
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
136
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
137
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
138
+
139
+ List.new(CustomDomain, params) do
140
+ Api.send_request("/custom_domains", :get, params, options)
141
+ end
142
+ end
143
+
144
+ def self.all(params = {}, options = {})
145
+ list(params, options)
146
+ end
147
+
148
+ # Parameters:
149
+ # id (required) - int64 - Custom Domain ID.
150
+ def self.find(id, params = {}, options = {})
151
+ params ||= {}
152
+ params[:id] = id
153
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
154
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
155
+
156
+ response, options = Api.send_request("/custom_domains/#{params[:id]}", :get, params, options)
157
+ CustomDomain.new(response.data, options)
158
+ end
159
+
160
+ def self.get(id, params = {}, options = {})
161
+ find(id, params, options)
162
+ end
163
+
164
+ # Parameters:
165
+ # destination - string - Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
166
+ # folder_behavior_id - int64 - Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
167
+ # ssl_certificate_id - int64 - Current SSL certificate ID.
168
+ # domain (required) - string - Customer-owned domain name.
169
+ def self.create(params = {}, options = {})
170
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
171
+ raise InvalidParameterError.new("Bad parameter: folder_behavior_id must be an Integer") if params[:folder_behavior_id] and !params[:folder_behavior_id].is_a?(Integer)
172
+ raise InvalidParameterError.new("Bad parameter: ssl_certificate_id must be an Integer") if params[:ssl_certificate_id] and !params[:ssl_certificate_id].is_a?(Integer)
173
+ raise InvalidParameterError.new("Bad parameter: domain must be an String") if params[:domain] and !params[:domain].is_a?(String)
174
+ raise MissingParameterError.new("Parameter missing: domain") unless params[:domain]
175
+
176
+ response, options = Api.send_request("/custom_domains", :post, params, options)
177
+ CustomDomain.new(response.data, options)
178
+ end
179
+
180
+ # Parameters:
181
+ # destination - string - Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
182
+ # folder_behavior_id - int64 - Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
183
+ # ssl_certificate_id - int64 - Current SSL certificate ID.
184
+ # domain - string - Customer-owned domain name.
185
+ def self.update(id, params = {}, options = {})
186
+ params ||= {}
187
+ params[:id] = id
188
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
189
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
190
+ raise InvalidParameterError.new("Bad parameter: folder_behavior_id must be an Integer") if params[:folder_behavior_id] and !params[:folder_behavior_id].is_a?(Integer)
191
+ raise InvalidParameterError.new("Bad parameter: ssl_certificate_id must be an Integer") if params[:ssl_certificate_id] and !params[:ssl_certificate_id].is_a?(Integer)
192
+ raise InvalidParameterError.new("Bad parameter: domain must be an String") if params[:domain] and !params[:domain].is_a?(String)
193
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
194
+
195
+ response, options = Api.send_request("/custom_domains/#{params[:id]}", :patch, params, options)
196
+ CustomDomain.new(response.data, options)
197
+ end
198
+
199
+ def self.delete(id, params = {}, options = {})
200
+ params ||= {}
201
+ params[:id] = id
202
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
203
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
204
+
205
+ Api.send_request("/custom_domains/#{params[:id]}", :delete, params, options)
206
+ nil
207
+ end
208
+
209
+ def self.destroy(id, params = {}, options = {})
210
+ delete(id, params, options)
211
+ nil
212
+ end
213
+ end
214
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.649"
4
+ VERSION = "1.1.650"
5
5
  end
data/lib/files.com.rb CHANGED
@@ -60,6 +60,7 @@ require "files.com/models/bundle_recipient"
60
60
  require "files.com/models/bundle_registration"
61
61
  require "files.com/models/child_site_management_policy"
62
62
  require "files.com/models/clickwrap"
63
+ require "files.com/models/custom_domain"
63
64
  require "files.com/models/desktop_configuration_profile"
64
65
  require "files.com/models/dns_record"
65
66
  require "files.com/models/email_incoming_message"
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.649
4
+ version: 1.1.650
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-06-16 00:00:00.000000000 Z
11
+ date: 2026-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -198,6 +198,7 @@ files:
198
198
  - docs/bundle_registration.md
199
199
  - docs/child_site_management_policy.md
200
200
  - docs/clickwrap.md
201
+ - docs/custom_domain.md
201
202
  - docs/desktop_configuration_profile.md
202
203
  - docs/dns_record.md
203
204
  - docs/email_incoming_message.md
@@ -336,6 +337,7 @@ files:
336
337
  - lib/files.com/models/bundle_registration.rb
337
338
  - lib/files.com/models/child_site_management_policy.rb
338
339
  - lib/files.com/models/clickwrap.rb
340
+ - lib/files.com/models/custom_domain.rb
339
341
  - lib/files.com/models/desktop_configuration_profile.rb
340
342
  - lib/files.com/models/dir.rb
341
343
  - lib/files.com/models/dns_record.rb