Class: Files::PartnerSite
- Inherits:
-
Object
- Object
- Files::PartnerSite
- Defined in:
- lib/files.com/models/partner_site.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
- .linkeds(params = {}, options = {}) ⇒ Object
-
.list(params = {}, options = {}) ⇒ Object
Parameters: cursor - string - Used for pagination.
Instance Method Summary collapse
-
#guest_partner_id ⇒ Object
int64 - Guest Partner ID.
-
#guest_partner_name ⇒ Object
string - Guest Partner Name.
-
#guest_site_id ⇒ Object
int64 - Guest Site ID.
-
#guest_site_name ⇒ Object
string - Guest Site Name.
-
#host_partner_id ⇒ Object
int64 - Host Partner ID.
-
#host_partner_name ⇒ Object
string - Host Partner Name.
-
#host_site_id ⇒ Object
int64 - Host Site ID.
-
#host_site_name ⇒ Object
string - Host Site Name.
-
#initialize(attributes = {}, options = {}) ⇒ PartnerSite
constructor
A new instance of PartnerSite.
-
#workspace_id ⇒ Object
int64 - Workspace ID for the Host Partner.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ PartnerSite
Returns a new instance of PartnerSite.
7 8 9 10 |
# File 'lib/files.com/models/partner_site.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/partner_site.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/partner_site.rb', line 5 def @options end |
Class Method Details
.all(params = {}, options = {}) ⇒ Object
76 77 78 |
# File 'lib/files.com/models/partner_site.rb', line 76 def self.all(params = {}, = {}) list(params, ) end |
.linkeds(params = {}, options = {}) ⇒ Object
57 58 59 60 61 62 |
# File 'lib/files.com/models/partner_site.rb', line 57 def self.linkeds(params = {}, = {}) response, = Api.send_request("/partner_sites/linked_partner_sites", :get, params, ) response.data.map do |entity_data| PartnerSite.new(entity_data, ) end 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).
67 68 69 70 71 72 73 74 |
# File 'lib/files.com/models/partner_site.rb', line 67 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) List.new(PartnerSite, params) do Api.send_request("/partner_sites", :get, params, ) end end |
Instance Method Details
#guest_partner_id ⇒ Object
int64 - Guest Partner ID
23 24 25 |
# File 'lib/files.com/models/partner_site.rb', line 23 def guest_partner_id @attributes[:guest_partner_id] end |
#guest_partner_name ⇒ Object
string - Guest Partner Name
28 29 30 |
# File 'lib/files.com/models/partner_site.rb', line 28 def guest_partner_name @attributes[:guest_partner_name] end |
#guest_site_id ⇒ Object
int64 - Guest Site ID
43 44 45 |
# File 'lib/files.com/models/partner_site.rb', line 43 def guest_site_id @attributes[:guest_site_id] end |
#guest_site_name ⇒ Object
string - Guest Site Name
48 49 50 |
# File 'lib/files.com/models/partner_site.rb', line 48 def guest_site_name @attributes[:guest_site_name] end |
#host_partner_id ⇒ Object
int64 - Host Partner ID
13 14 15 |
# File 'lib/files.com/models/partner_site.rb', line 13 def host_partner_id @attributes[:host_partner_id] end |
#host_partner_name ⇒ Object
string - Host Partner Name
18 19 20 |
# File 'lib/files.com/models/partner_site.rb', line 18 def host_partner_name @attributes[:host_partner_name] end |
#host_site_id ⇒ Object
int64 - Host Site ID
33 34 35 |
# File 'lib/files.com/models/partner_site.rb', line 33 def host_site_id @attributes[:host_site_id] end |
#host_site_name ⇒ Object
string - Host Site Name
38 39 40 |
# File 'lib/files.com/models/partner_site.rb', line 38 def host_site_name @attributes[:host_site_name] end |
#workspace_id ⇒ Object
int64 - Workspace ID for the Host Partner
53 54 55 |
# File 'lib/files.com/models/partner_site.rb', line 53 def workspace_id @attributes[:workspace_id] end |