files.com 1.0.132 → 1.0.133

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: '08bc9f16d5d9c80f23b951dfd587fd8e6ac05da09efbc174d4f01d802c45596b'
4
- data.tar.gz: c15f2b59612650caf3c4df6d5e3ffa9ba6be5b4836d0e2eb52617874d60aebec
3
+ metadata.gz: d035ac320deed565de483766b7bd1132c09c9cda2cb9e3fca6ea315e218b22b3
4
+ data.tar.gz: 411f29ad91d887b4fd5074b42e2b551fdccac61bf764022de32d1bd345f4ddfe
5
5
  SHA512:
6
- metadata.gz: 69c4a9e1e1daae0bf0cd0f37ee8ccda29b50ac8bdcce773852b767a8c8f551bdf14f881256568efbb87dde514f42d81e30c737b519993f016204bebdd493a87d
7
- data.tar.gz: a15358d708e6496abd3ce5ab63efa1ffdd9cdc2357a470780fd71cd2026a1ed1c201a104eb4fb373347b6607a3180bb675e00f61695061649ae1675b90143c5b
6
+ metadata.gz: ad1e0300e759301679cc8c6125f02aa5e962a686a057b6a158f4a52e430e3b2fe3f1d8e4a33eed6a330298bfd248327d43e50a2e8e29e999765174a69b195026
7
+ data.tar.gz: 2495ec0411de523c389c0e6fb3872ec6859bd3484666848f9a63c7697791ab9a001f221ac2a48cc274ca710736c1ef7bcd7495987d9436fa4c3f27c347d45909
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.132
1
+ 1.0.133
@@ -17,6 +17,9 @@
17
17
  * `note` (string): A note sent to the recipient with the bundle.
18
18
  * `recipient` (string): The recipient's email address.
19
19
  * `sent_at` (date-time): When the Bundle was shared with this recipient.
20
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
21
+ * `bundle_id` (int64): Bundle to share.
22
+ * `share_after_create` (boolean): Set to true to share the link with the recipient upon creation.
20
23
 
21
24
 
22
25
  ---
@@ -44,3 +47,30 @@ Files::BundleRecipient.list(
44
47
  * `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `has_registrations`.
45
48
  * `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `has_registrations`.
46
49
  * `bundle_id` (int64): Required - List recipients for the bundle with this ID.
50
+
51
+
52
+ ---
53
+
54
+ ## Create Bundle Recipient
55
+
56
+ ```
57
+ Files::BundleRecipient.create(
58
+ user_id: 1,
59
+ bundle_id: 1,
60
+ recipient: "johndoe@gmail.com",
61
+ name: "John Smith",
62
+ company: "Acme Ltd",
63
+ note: "Just a note.",
64
+ share_after_create: true
65
+ )
66
+ ```
67
+
68
+ ### Parameters
69
+
70
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
71
+ * `bundle_id` (int64): Required - Bundle to share.
72
+ * `recipient` (string): Required - Email addresses to share this bundle with.
73
+ * `name` (string): Name of recipient.
74
+ * `company` (string): Company of recipient.
75
+ * `note` (string): Note to include in email.
76
+ * `share_after_create` (boolean): Set to true to share the link with the recipient upon creation.
@@ -0,0 +1,76 @@
1
+ # InboxRecipient
2
+
3
+ ## Example InboxRecipient Object
4
+
5
+ ```
6
+ {
7
+ "company": "Acme Inc.",
8
+ "name": "John Doe",
9
+ "note": "Some note.",
10
+ "recipient": "john.doe@example.com",
11
+ "sent_at": "2000-01-01T01:00:00Z"
12
+ }
13
+ ```
14
+
15
+ * `company` (string): The recipient's company.
16
+ * `name` (string): The recipient's name.
17
+ * `note` (string): A note sent to the recipient with the inbox.
18
+ * `recipient` (string): The recipient's email address.
19
+ * `sent_at` (date-time): When the Inbox was shared with this recipient.
20
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
21
+ * `inbox_id` (int64): Inbox to share.
22
+ * `share_after_create` (boolean): Set to true to share the link with the recipient upon creation.
23
+
24
+
25
+ ---
26
+
27
+ ## List Inbox Recipients
28
+
29
+ ```
30
+ Files::InboxRecipient.list(
31
+ user_id: 1,
32
+ per_page: 1,
33
+ inbox_id: 1
34
+ )
35
+ ```
36
+
37
+ ### Parameters
38
+
39
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
40
+ * `cursor` (string): Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
41
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
42
+ * `sort_by` (object): If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `has_registrations`.
43
+ * `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `has_registrations`.
44
+ * `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `has_registrations`.
45
+ * `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `has_registrations`.
46
+ * `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `has_registrations`.
47
+ * `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `has_registrations`.
48
+ * `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `has_registrations`.
49
+ * `inbox_id` (int64): Required - List recipients for the inbox with this ID.
50
+
51
+
52
+ ---
53
+
54
+ ## Create Inbox Recipient
55
+
56
+ ```
57
+ Files::InboxRecipient.create(
58
+ user_id: 1,
59
+ inbox_id: 1,
60
+ recipient: "johndoe@gmail.com",
61
+ name: "John Smith",
62
+ company: "Acme Ltd",
63
+ note: "Just a note.",
64
+ share_after_create: true
65
+ )
66
+ ```
67
+
68
+ ### Parameters
69
+
70
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
71
+ * `inbox_id` (int64): Required - Inbox to share.
72
+ * `recipient` (string): Required - Email addresses to share this inbox with.
73
+ * `name` (string): Name of recipient.
74
+ * `company` (string): Company of recipient.
75
+ * `note` (string): Note to include in email.
76
+ * `share_after_create` (boolean): Set to true to share the link with the recipient upon creation.
@@ -17,12 +17,16 @@
17
17
 
18
18
  ]
19
19
  }
20
- ]
20
+ ],
21
+ "clickwrap_id": 1,
22
+ "clickwrap_body": ""
21
23
  }
22
24
  ```
23
25
 
24
- * `code` (int64): Status http code
26
+ * `code` (int64): Status HTTP code
25
27
  * `message` (string): Error message
26
28
  * `status` (string): Status message
27
29
  * `data`: Additional data
28
30
  * `errors` (array): A list of api errors
31
+ * `clickwrap_id` (int64): Required Clickwrap id
32
+ * `clickwrap_body` (string): Required Clickwrap body
@@ -58,6 +58,7 @@ require "files.com/models/history"
58
58
  require "files.com/models/history_export"
59
59
  require "files.com/models/history_export_result"
60
60
  require "files.com/models/image"
61
+ require "files.com/models/inbox_recipient"
61
62
  require "files.com/models/inbox_registration"
62
63
  require "files.com/models/inbox_upload"
63
64
  require "files.com/models/invoice"
@@ -14,26 +14,82 @@ module Files
14
14
  @attributes[:company]
15
15
  end
16
16
 
17
+ def company=(value)
18
+ @attributes[:company] = value
19
+ end
20
+
17
21
  # string - The recipient's name.
18
22
  def name
19
23
  @attributes[:name]
20
24
  end
21
25
 
26
+ def name=(value)
27
+ @attributes[:name] = value
28
+ end
29
+
22
30
  # string - A note sent to the recipient with the bundle.
23
31
  def note
24
32
  @attributes[:note]
25
33
  end
26
34
 
35
+ def note=(value)
36
+ @attributes[:note] = value
37
+ end
38
+
27
39
  # string - The recipient's email address.
28
40
  def recipient
29
41
  @attributes[:recipient]
30
42
  end
31
43
 
44
+ def recipient=(value)
45
+ @attributes[:recipient] = value
46
+ end
47
+
32
48
  # date-time - When the Bundle was shared with this recipient.
33
49
  def sent_at
34
50
  @attributes[:sent_at]
35
51
  end
36
52
 
53
+ def sent_at=(value)
54
+ @attributes[:sent_at] = value
55
+ end
56
+
57
+ # int64 - User ID. Provide a value of `0` to operate the current session's user.
58
+ def user_id
59
+ @attributes[:user_id]
60
+ end
61
+
62
+ def user_id=(value)
63
+ @attributes[:user_id] = value
64
+ end
65
+
66
+ # int64 - Bundle to share.
67
+ def bundle_id
68
+ @attributes[:bundle_id]
69
+ end
70
+
71
+ def bundle_id=(value)
72
+ @attributes[:bundle_id] = value
73
+ end
74
+
75
+ # boolean - Set to true to share the link with the recipient upon creation.
76
+ def share_after_create
77
+ @attributes[:share_after_create]
78
+ end
79
+
80
+ def share_after_create=(value)
81
+ @attributes[:share_after_create] = value
82
+ end
83
+
84
+ def save
85
+ if @attributes[:id]
86
+ raise NotImplementedError.new("The BundleRecipient object doesn't support updates.")
87
+ else
88
+ new_obj = BundleRecipient.create(@attributes, @options)
89
+ @attributes = new_obj.attributes
90
+ end
91
+ end
92
+
37
93
  # Parameters:
38
94
  # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
39
95
  # cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
@@ -68,5 +124,27 @@ module Files
68
124
  def self.all(params = {}, options = {})
69
125
  list(params, options)
70
126
  end
127
+
128
+ # Parameters:
129
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
130
+ # bundle_id (required) - int64 - Bundle to share.
131
+ # recipient (required) - string - Email addresses to share this bundle with.
132
+ # name - string - Name of recipient.
133
+ # company - string - Company of recipient.
134
+ # note - string - Note to include in email.
135
+ # share_after_create - boolean - Set to true to share the link with the recipient upon creation.
136
+ def self.create(params = {}, options = {})
137
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
138
+ raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params.dig(:bundle_id) and !params.dig(:bundle_id).is_a?(Integer)
139
+ raise InvalidParameterError.new("Bad parameter: recipient must be an String") if params.dig(:recipient) and !params.dig(:recipient).is_a?(String)
140
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
141
+ raise InvalidParameterError.new("Bad parameter: company must be an String") if params.dig(:company) and !params.dig(:company).is_a?(String)
142
+ raise InvalidParameterError.new("Bad parameter: note must be an String") if params.dig(:note) and !params.dig(:note).is_a?(String)
143
+ raise MissingParameterError.new("Parameter missing: bundle_id") unless params.dig(:bundle_id)
144
+ raise MissingParameterError.new("Parameter missing: recipient") unless params.dig(:recipient)
145
+
146
+ response, options = Api.send_request("/bundle_recipients", :post, params, options)
147
+ BundleRecipient.new(response.data, options)
148
+ end
71
149
  end
72
150
  end
@@ -0,0 +1,150 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class InboxRecipient
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # string - The recipient's company.
13
+ def company
14
+ @attributes[:company]
15
+ end
16
+
17
+ def company=(value)
18
+ @attributes[:company] = value
19
+ end
20
+
21
+ # string - The recipient's name.
22
+ def name
23
+ @attributes[:name]
24
+ end
25
+
26
+ def name=(value)
27
+ @attributes[:name] = value
28
+ end
29
+
30
+ # string - A note sent to the recipient with the inbox.
31
+ def note
32
+ @attributes[:note]
33
+ end
34
+
35
+ def note=(value)
36
+ @attributes[:note] = value
37
+ end
38
+
39
+ # string - The recipient's email address.
40
+ def recipient
41
+ @attributes[:recipient]
42
+ end
43
+
44
+ def recipient=(value)
45
+ @attributes[:recipient] = value
46
+ end
47
+
48
+ # date-time - When the Inbox was shared with this recipient.
49
+ def sent_at
50
+ @attributes[:sent_at]
51
+ end
52
+
53
+ def sent_at=(value)
54
+ @attributes[:sent_at] = value
55
+ end
56
+
57
+ # int64 - User ID. Provide a value of `0` to operate the current session's user.
58
+ def user_id
59
+ @attributes[:user_id]
60
+ end
61
+
62
+ def user_id=(value)
63
+ @attributes[:user_id] = value
64
+ end
65
+
66
+ # int64 - Inbox to share.
67
+ def inbox_id
68
+ @attributes[:inbox_id]
69
+ end
70
+
71
+ def inbox_id=(value)
72
+ @attributes[:inbox_id] = value
73
+ end
74
+
75
+ # boolean - Set to true to share the link with the recipient upon creation.
76
+ def share_after_create
77
+ @attributes[:share_after_create]
78
+ end
79
+
80
+ def share_after_create=(value)
81
+ @attributes[:share_after_create] = value
82
+ end
83
+
84
+ def save
85
+ if @attributes[:id]
86
+ raise NotImplementedError.new("The InboxRecipient object doesn't support updates.")
87
+ else
88
+ new_obj = InboxRecipient.create(@attributes, @options)
89
+ @attributes = new_obj.attributes
90
+ end
91
+ end
92
+
93
+ # Parameters:
94
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
95
+ # cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
96
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
97
+ # sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `has_registrations`.
98
+ # filter - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `has_registrations`.
99
+ # filter_gt - object - If set, return records where the specifiied field is greater than the supplied value. Valid fields are `has_registrations`.
100
+ # filter_gteq - object - If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `has_registrations`.
101
+ # filter_like - object - If set, return records where the specifiied field is equal to the supplied value. Valid fields are `has_registrations`.
102
+ # filter_lt - object - If set, return records where the specifiied field is less than the supplied value. Valid fields are `has_registrations`.
103
+ # filter_lteq - object - If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `has_registrations`.
104
+ # inbox_id (required) - int64 - List recipients for the inbox with this ID.
105
+ def self.list(params = {}, options = {})
106
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
107
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
108
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
109
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params.dig(:sort_by) and !params.dig(:sort_by).is_a?(Hash)
110
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params.dig(:filter) and !params.dig(:filter).is_a?(Hash)
111
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params.dig(:filter_gt) and !params.dig(:filter_gt).is_a?(Hash)
112
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params.dig(:filter_gteq) and !params.dig(:filter_gteq).is_a?(Hash)
113
+ raise InvalidParameterError.new("Bad parameter: filter_like must be an Hash") if params.dig(:filter_like) and !params.dig(:filter_like).is_a?(Hash)
114
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params.dig(:filter_lt) and !params.dig(:filter_lt).is_a?(Hash)
115
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params.dig(:filter_lteq) and !params.dig(:filter_lteq).is_a?(Hash)
116
+ raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if params.dig(:inbox_id) and !params.dig(:inbox_id).is_a?(Integer)
117
+ raise MissingParameterError.new("Parameter missing: inbox_id") unless params.dig(:inbox_id)
118
+
119
+ List.new(InboxRecipient, params) do
120
+ Api.send_request("/inbox_recipients", :get, params, options)
121
+ end
122
+ end
123
+
124
+ def self.all(params = {}, options = {})
125
+ list(params, options)
126
+ end
127
+
128
+ # Parameters:
129
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
130
+ # inbox_id (required) - int64 - Inbox to share.
131
+ # recipient (required) - string - Email addresses to share this inbox with.
132
+ # name - string - Name of recipient.
133
+ # company - string - Company of recipient.
134
+ # note - string - Note to include in email.
135
+ # share_after_create - boolean - Set to true to share the link with the recipient upon creation.
136
+ def self.create(params = {}, options = {})
137
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
138
+ raise InvalidParameterError.new("Bad parameter: inbox_id must be an Integer") if params.dig(:inbox_id) and !params.dig(:inbox_id).is_a?(Integer)
139
+ raise InvalidParameterError.new("Bad parameter: recipient must be an String") if params.dig(:recipient) and !params.dig(:recipient).is_a?(String)
140
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
141
+ raise InvalidParameterError.new("Bad parameter: company must be an String") if params.dig(:company) and !params.dig(:company).is_a?(String)
142
+ raise InvalidParameterError.new("Bad parameter: note must be an String") if params.dig(:note) and !params.dig(:note).is_a?(String)
143
+ raise MissingParameterError.new("Parameter missing: inbox_id") unless params.dig(:inbox_id)
144
+ raise MissingParameterError.new("Parameter missing: recipient") unless params.dig(:recipient)
145
+
146
+ response, options = Api.send_request("/inbox_recipients", :post, params, options)
147
+ InboxRecipient.new(response.data, options)
148
+ end
149
+ end
150
+ end
@@ -9,7 +9,7 @@ module Files
9
9
  @options = options || {}
10
10
  end
11
11
 
12
- # int64 - Status http code
12
+ # int64 - Status HTTP code
13
13
  def code
14
14
  @attributes[:code]
15
15
  end
@@ -33,5 +33,15 @@ module Files
33
33
  def errors
34
34
  @attributes[:errors]
35
35
  end
36
+
37
+ # int64 - Required Clickwrap id
38
+ def clickwrap_id
39
+ @attributes[:clickwrap_id]
40
+ end
41
+
42
+ # string - Required Clickwrap body
43
+ def clickwrap_body
44
+ @attributes[:clickwrap_body]
45
+ end
36
46
  end
37
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.132
4
+ version: 1.0.133
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
@@ -117,6 +117,7 @@ files:
117
117
  - docs/history_export.md
118
118
  - docs/history_export_result.md
119
119
  - docs/image.md
120
+ - docs/inbox_recipient.md
120
121
  - docs/inbox_registration.md
121
122
  - docs/inbox_upload.md
122
123
  - docs/invoice.md
@@ -187,6 +188,7 @@ files:
187
188
  - lib/files.com/models/history_export.rb
188
189
  - lib/files.com/models/history_export_result.rb
189
190
  - lib/files.com/models/image.rb
191
+ - lib/files.com/models/inbox_recipient.rb
190
192
  - lib/files.com/models/inbox_registration.rb
191
193
  - lib/files.com/models/inbox_upload.rb
192
194
  - lib/files.com/models/invoice.rb