Class: Files::InboxRegistration
- Inherits:
-
Object
- Object
- Files::InboxRegistration
- Defined in:
- lib/files.com/models/inbox_registration.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
- .all(params = {}, options = {}) ⇒ Object
-
.create(params = {}, options = {}) ⇒ Object
Parameters: inbox_code (required) - string - Inbox URL code inbox_recipient_registration_code - string - Inbox recipient registration code password - string - Inbox password name - string - Registrant name company - string - Registrant company name email - string - Registrant email address.
-
.create_export(params = {}, options = {}) ⇒ Object
Parameters: folder_behavior_id - int64 - ID of the associated Inbox.
-
.last_activity(params = {}, options = {}) ⇒ Object
Parameters: inbox_registration_code (required) - string - Inbox registration cookie code.
-
.list(params = {}, options = {}) ⇒ Object
Parameters: cursor - string - Used for pagination.
Instance Method Summary collapse
-
#clickwrap_body ⇒ Object
string - Clickwrap text that was shown to the registrant.
- #clickwrap_body=(value) ⇒ Object
-
#code ⇒ Object
string - Registration cookie code.
- #code=(value) ⇒ Object
-
#company ⇒ Object
string - Registrant company name.
- #company=(value) ⇒ Object
-
#created_at ⇒ Object
date-time - Registration creation date/time.
-
#email ⇒ Object
string - Registrant email address.
- #email=(value) ⇒ Object
-
#form_field_data ⇒ Object
object - Data for form field set with form field ids as keys and user data as values.
- #form_field_data=(value) ⇒ Object
-
#form_field_set_id ⇒ Object
int64 - Id of associated form field set.
- #form_field_set_id=(value) ⇒ Object
-
#inbox_code ⇒ Object
string - Inbox URL code.
- #inbox_code=(value) ⇒ Object
-
#inbox_id ⇒ Object
int64 - Id of associated inbox.
- #inbox_id=(value) ⇒ Object
-
#inbox_recipient_id ⇒ Object
int64 - Id of associated inbox recipient.
- #inbox_recipient_id=(value) ⇒ Object
-
#inbox_recipient_registration_code ⇒ Object
string - Inbox recipient registration code.
- #inbox_recipient_registration_code=(value) ⇒ Object
-
#inbox_title ⇒ Object
string - Title of associated inbox.
- #inbox_title=(value) ⇒ Object
-
#initialize(attributes = {}, options = {}) ⇒ InboxRegistration
constructor
A new instance of InboxRegistration.
-
#ip ⇒ Object
string - Registrant IP Address.
- #ip=(value) ⇒ Object
-
#name ⇒ Object
string - Registrant name.
- #name=(value) ⇒ Object
-
#password ⇒ Object
string - Inbox password.
- #password=(value) ⇒ Object
- #save ⇒ Object
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ InboxRegistration
Returns a new instance of InboxRegistration.
7 8 9 10 |
# File 'lib/files.com/models/inbox_registration.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/inbox_registration.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/inbox_registration.rb', line 5 def @options end |
Class Method Details
.all(params = {}, options = {}) ⇒ Object
168 169 170 |
# File 'lib/files.com/models/inbox_registration.rb', line 168 def self.all(params = {}, = {}) list(params, ) end |
.create(params = {}, options = {}) ⇒ Object
Parameters:
inbox_code (required) - string - Inbox URL code
inbox_recipient_registration_code - string - Inbox recipient registration code
password - string - Inbox password
name - string - Registrant name
company - string - Registrant company name
email - string - Registrant email address
179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/files.com/models/inbox_registration.rb', line 179 def self.create(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: inbox_code must be an String") if params[:inbox_code] and !params[:inbox_code].is_a?(String) raise InvalidParameterError.new("Bad parameter: inbox_recipient_registration_code must be an String") if params[:inbox_recipient_registration_code] and !params[:inbox_recipient_registration_code].is_a?(String) raise InvalidParameterError.new("Bad parameter: password must be an String") if params[:password] and !params[:password].is_a?(String) raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String) raise InvalidParameterError.new("Bad parameter: company must be an String") if params[:company] and !params[:company].is_a?(String) raise InvalidParameterError.new("Bad parameter: email must be an String") if params[:email] and !params[:email].is_a?(String) raise MissingParameterError.new("Parameter missing: inbox_code") unless params[:inbox_code] response, = Api.send_request("/inbox_registrations", :post, params, ) InboxRegistration.new(response.data, ) end |
.create_export(params = {}, options = {}) ⇒ Object
Parameters:
folder_behavior_id - int64 - ID of the associated Inbox. This is required if the user is not a site admin.
204 205 206 207 208 209 |
# File 'lib/files.com/models/inbox_registration.rb', line 204 def self.create_export(params = {}, = {}) 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) response, = Api.send_request("/inbox_registrations/create_export", :post, params, ) Export.new(response.data, ) end |
.last_activity(params = {}, options = {}) ⇒ Object
Parameters:
inbox_registration_code (required) - string - Inbox registration cookie code
194 195 196 197 198 199 200 |
# File 'lib/files.com/models/inbox_registration.rb', line 194 def self.last_activity(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: inbox_registration_code must be an String") if params[:inbox_registration_code] and !params[:inbox_registration_code].is_a?(String) raise MissingParameterError.new("Parameter missing: inbox_registration_code") unless params[:inbox_registration_code] Api.send_request("/inbox_registrations/last_activity", :post, params, ) nil end |
.list(params = {}, options = {}) ⇒ Object
Parameters:
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.
per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
folder_behavior_id - int64 - ID of the associated Inbox. This is required if the user is not a site admin.
158 159 160 161 162 163 164 165 166 |
# File 'lib/files.com/models/inbox_registration.rb', line 158 def self.list(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String) raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer) 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) List.new(InboxRegistration, params) do Api.send_request("/inbox_registrations", :get, params, ) end end |
Instance Method Details
#clickwrap_body ⇒ Object
string - Clickwrap text that was shown to the registrant
58 59 60 |
# File 'lib/files.com/models/inbox_registration.rb', line 58 def clickwrap_body @attributes[:clickwrap_body] end |
#clickwrap_body=(value) ⇒ Object
62 63 64 |
# File 'lib/files.com/models/inbox_registration.rb', line 62 def clickwrap_body=(value) @attributes[:clickwrap_body] = value end |
#code ⇒ Object
string - Registration cookie code
13 14 15 |
# File 'lib/files.com/models/inbox_registration.rb', line 13 def code @attributes[:code] end |
#code=(value) ⇒ Object
17 18 19 |
# File 'lib/files.com/models/inbox_registration.rb', line 17 def code=(value) @attributes[:code] = value end |
#company ⇒ Object
string - Registrant company name
31 32 33 |
# File 'lib/files.com/models/inbox_registration.rb', line 31 def company @attributes[:company] end |
#company=(value) ⇒ Object
35 36 37 |
# File 'lib/files.com/models/inbox_registration.rb', line 35 def company=(value) @attributes[:company] = value end |
#created_at ⇒ Object
date-time - Registration creation date/time
112 113 114 |
# File 'lib/files.com/models/inbox_registration.rb', line 112 def created_at @attributes[:created_at] end |
#email ⇒ Object
string - Registrant email address
40 41 42 |
# File 'lib/files.com/models/inbox_registration.rb', line 40 def email @attributes[:email] end |
#email=(value) ⇒ Object
44 45 46 |
# File 'lib/files.com/models/inbox_registration.rb', line 44 def email=(value) @attributes[:email] = value end |
#form_field_data ⇒ Object
object - Data for form field set with form field ids as keys and user data as values
76 77 78 |
# File 'lib/files.com/models/inbox_registration.rb', line 76 def form_field_data @attributes[:form_field_data] end |
#form_field_data=(value) ⇒ Object
80 81 82 |
# File 'lib/files.com/models/inbox_registration.rb', line 80 def form_field_data=(value) @attributes[:form_field_data] = value end |
#form_field_set_id ⇒ Object
int64 - Id of associated form field set
67 68 69 |
# File 'lib/files.com/models/inbox_registration.rb', line 67 def form_field_set_id @attributes[:form_field_set_id] end |
#form_field_set_id=(value) ⇒ Object
71 72 73 |
# File 'lib/files.com/models/inbox_registration.rb', line 71 def form_field_set_id=(value) @attributes[:form_field_set_id] = value end |
#inbox_code ⇒ Object
string - Inbox URL code
117 118 119 |
# File 'lib/files.com/models/inbox_registration.rb', line 117 def inbox_code @attributes[:inbox_code] end |
#inbox_code=(value) ⇒ Object
121 122 123 |
# File 'lib/files.com/models/inbox_registration.rb', line 121 def inbox_code=(value) @attributes[:inbox_code] = value end |
#inbox_id ⇒ Object
int64 - Id of associated inbox
85 86 87 |
# File 'lib/files.com/models/inbox_registration.rb', line 85 def inbox_id @attributes[:inbox_id] end |
#inbox_id=(value) ⇒ Object
89 90 91 |
# File 'lib/files.com/models/inbox_registration.rb', line 89 def inbox_id=(value) @attributes[:inbox_id] = value end |
#inbox_recipient_id ⇒ Object
int64 - Id of associated inbox recipient
94 95 96 |
# File 'lib/files.com/models/inbox_registration.rb', line 94 def inbox_recipient_id @attributes[:inbox_recipient_id] end |
#inbox_recipient_id=(value) ⇒ Object
98 99 100 |
# File 'lib/files.com/models/inbox_registration.rb', line 98 def inbox_recipient_id=(value) @attributes[:inbox_recipient_id] = value end |
#inbox_recipient_registration_code ⇒ Object
string - Inbox recipient registration code
126 127 128 |
# File 'lib/files.com/models/inbox_registration.rb', line 126 def inbox_recipient_registration_code @attributes[:inbox_recipient_registration_code] end |
#inbox_recipient_registration_code=(value) ⇒ Object
130 131 132 |
# File 'lib/files.com/models/inbox_registration.rb', line 130 def inbox_recipient_registration_code=(value) @attributes[:inbox_recipient_registration_code] = value end |
#inbox_title ⇒ Object
string - Title of associated inbox
103 104 105 |
# File 'lib/files.com/models/inbox_registration.rb', line 103 def inbox_title @attributes[:inbox_title] end |
#inbox_title=(value) ⇒ Object
107 108 109 |
# File 'lib/files.com/models/inbox_registration.rb', line 107 def inbox_title=(value) @attributes[:inbox_title] = value end |
#ip ⇒ Object
string - Registrant IP Address
49 50 51 |
# File 'lib/files.com/models/inbox_registration.rb', line 49 def ip @attributes[:ip] end |
#ip=(value) ⇒ Object
53 54 55 |
# File 'lib/files.com/models/inbox_registration.rb', line 53 def ip=(value) @attributes[:ip] = value end |
#name ⇒ Object
string - Registrant name
22 23 24 |
# File 'lib/files.com/models/inbox_registration.rb', line 22 def name @attributes[:name] end |
#name=(value) ⇒ Object
26 27 28 |
# File 'lib/files.com/models/inbox_registration.rb', line 26 def name=(value) @attributes[:name] = value end |
#password ⇒ Object
string - Inbox password
135 136 137 |
# File 'lib/files.com/models/inbox_registration.rb', line 135 def password @attributes[:password] end |
#password=(value) ⇒ Object
139 140 141 |
# File 'lib/files.com/models/inbox_registration.rb', line 139 def password=(value) @attributes[:password] = value end |
#save ⇒ Object
143 144 145 146 147 148 149 150 151 152 |
# File 'lib/files.com/models/inbox_registration.rb', line 143 def save if @attributes[:id] raise NotImplementedError.new("The InboxRegistration object doesn't support updates.") else new_obj = InboxRegistration.create(@attributes, @options) end @attributes = new_obj.attributes true end |