Class: Files::BundleRegistration
- Inherits:
-
Object
- Object
- Files::BundleRegistration
- Defined in:
- lib/files.com/models/bundle_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
-
.list(params = {}, options = {}) ⇒ Object
Parameters: user_id - int64 - User ID.
Instance Method Summary collapse
-
#clickwrap_body ⇒ Object
string - Clickwrap text that was shown to the registrant.
-
#code ⇒ Object
string - Registration cookie code.
-
#company ⇒ Object
string - Registrant company name.
-
#email ⇒ Object
string - Registrant email address.
-
#form_field_data ⇒ Object
string - Data for form field set with form field ids as keys and user data as values.
-
#form_field_set_id ⇒ Object
int64 - Id of associated form field set.
-
#inbox_code ⇒ Object
string - InboxRegistration cookie code, if there is an associated InboxRegistration.
-
#initialize(attributes = {}, options = {}) ⇒ BundleRegistration
constructor
A new instance of BundleRegistration.
-
#ip ⇒ Object
string - Registrant IP Address.
-
#name ⇒ Object
string - Registrant name.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ BundleRegistration
Returns a new instance of BundleRegistration.
7 8 9 10 |
# File 'lib/files.com/models/bundle_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/bundle_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/bundle_registration.rb', line 5 def @options end |
Class Method Details
.all(params = {}, options = {}) ⇒ Object
73 74 75 |
# File 'lib/files.com/models/bundle_registration.rb', line 73 def self.all(params = {}, = {}) list(params, ) end |
.list(params = {}, options = {}) ⇒ Object
Parameters:
user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
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.
per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
bundle_id - int64 - ID of the associated Bundle
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/files.com/models/bundle_registration.rb', line 62 def self.list(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String) raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer) raise InvalidParameterError.new("Bad parameter: bundle_id must be an Integer") if params.dig(:bundle_id) and !params.dig(:bundle_id).is_a?(Integer) List.new(BundleRegistration, params) do Api.send_request("/bundle_registrations", :get, params, ) end end |
Instance Method Details
#clickwrap_body ⇒ Object
string - Clickwrap text that was shown to the registrant
43 44 45 |
# File 'lib/files.com/models/bundle_registration.rb', line 43 def clickwrap_body @attributes[:clickwrap_body] end |
#code ⇒ Object
string - Registration cookie code
13 14 15 |
# File 'lib/files.com/models/bundle_registration.rb', line 13 def code @attributes[:code] end |
#company ⇒ Object
string - Registrant company name
23 24 25 |
# File 'lib/files.com/models/bundle_registration.rb', line 23 def company @attributes[:company] end |
#email ⇒ Object
string - Registrant email address
28 29 30 |
# File 'lib/files.com/models/bundle_registration.rb', line 28 def email @attributes[:email] end |
#form_field_data ⇒ Object
string - Data for form field set with form field ids as keys and user data as values
53 54 55 |
# File 'lib/files.com/models/bundle_registration.rb', line 53 def form_field_data @attributes[:form_field_data] end |
#form_field_set_id ⇒ Object
int64 - Id of associated form field set
48 49 50 |
# File 'lib/files.com/models/bundle_registration.rb', line 48 def form_field_set_id @attributes[:form_field_set_id] end |
#inbox_code ⇒ Object
string - InboxRegistration cookie code, if there is an associated InboxRegistration
38 39 40 |
# File 'lib/files.com/models/bundle_registration.rb', line 38 def inbox_code @attributes[:inbox_code] end |
#ip ⇒ Object
string - Registrant IP Address
33 34 35 |
# File 'lib/files.com/models/bundle_registration.rb', line 33 def ip @attributes[:ip] end |
#name ⇒ Object
string - Registrant name
18 19 20 |
# File 'lib/files.com/models/bundle_registration.rb', line 18 def name @attributes[:name] end |