Class: Files::BundleRegistration

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/bundle_registration.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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 = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/bundle_registration.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/bundle_registration.rb', line 5

def options
  @options
end

Class Method Details

.all(params = {}, options = {}) ⇒ Object



91
92
93
# File 'lib/files.com/models/bundle_registration.rb', line 91

def self.all(params = {}, options = {})
  list(params, options)
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: 10,000, 1,000 or less is recommended).
bundle_id - int64 - ID of the associated Bundle


81
82
83
84
85
86
87
88
89
# File 'lib/files.com/models/bundle_registration.rb', line 81

def self.list(params = {}, options = {})
  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: bundle_id must be an Integer") if params[:bundle_id] and !params[:bundle_id].is_a?(Integer)

  List.new(BundleRegistration, params) do
    Api.send_request("/bundle_registrations", :get, params, options)
  end
end

Instance Method Details

#bundle_codeObject

string - Bundle URL code



58
59
60
# File 'lib/files.com/models/bundle_registration.rb', line 58

def bundle_code
  @attributes[:bundle_code]
end

#bundle_idObject

int64 - Id of associated bundle



63
64
65
# File 'lib/files.com/models/bundle_registration.rb', line 63

def bundle_id
  @attributes[:bundle_id]
end

#bundle_recipient_idObject

int64 - Id of associated bundle recipient



68
69
70
# File 'lib/files.com/models/bundle_registration.rb', line 68

def bundle_recipient_id
  @attributes[:bundle_recipient_id]
end

#clickwrap_bodyObject

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

#codeObject

string - Registration cookie code



13
14
15
# File 'lib/files.com/models/bundle_registration.rb', line 13

def code
  @attributes[:code]
end

#companyObject

string - Registrant company name



23
24
25
# File 'lib/files.com/models/bundle_registration.rb', line 23

def company
  @attributes[:company]
end

#created_atObject

date-time - Registration creation date/time



73
74
75
# File 'lib/files.com/models/bundle_registration.rb', line 73

def created_at
  @attributes[:created_at]
end

#emailObject

string - Registrant email address



28
29
30
# File 'lib/files.com/models/bundle_registration.rb', line 28

def email
  @attributes[:email]
end

#form_field_dataObject

object - 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_idObject

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_codeObject

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

#ipObject

string - Registrant IP Address



33
34
35
# File 'lib/files.com/models/bundle_registration.rb', line 33

def ip
  @attributes[:ip]
end

#nameObject

string - Registrant name



18
19
20
# File 'lib/files.com/models/bundle_registration.rb', line 18

def name
  @attributes[:name]
end