files.com 1.1.671 → 1.1.672
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 +4 -4
- data/_VERSION +1 -1
- data/docs/action_log.md +1 -21
- data/docs/action_notification_export_result.md +0 -17
- data/docs/ai_assistant_personality.md +0 -14
- data/docs/ai_task.md +0 -14
- data/docs/api_key.md +1 -27
- data/docs/api_request_log.md +1 -21
- data/docs/app.md +0 -15
- data/docs/as2_incoming_message.md +0 -18
- data/docs/as2_outgoing_message.md +0 -18
- data/docs/as2_partner.md +0 -14
- data/docs/as2_station.md +0 -14
- data/docs/automation.md +1 -22
- data/docs/automation_log.md +1 -21
- data/docs/automation_run.md +0 -19
- data/docs/bandwidth_snapshot.md +0 -18
- data/docs/behavior.md +0 -14
- data/docs/bundle.md +1 -50
- data/docs/bundle_action.md +0 -25
- data/docs/bundle_download.md +0 -23
- data/docs/bundle_notification.md +0 -19
- data/docs/bundle_recipient.md +0 -21
- data/docs/bundle_registration.md +0 -61
- data/docs/chat_session.md +2 -14
- data/docs/child_site_management_policy.md +0 -9
- data/docs/clickwrap.md +0 -13
- data/docs/custom_domain.md +0 -13
- data/docs/desktop_configuration_profile.md +0 -14
- data/docs/dns_record.md +0 -9
- data/docs/email_incoming_message.md +0 -19
- data/docs/email_log.md +1 -20
- data/docs/event_channel.md +0 -14
- data/docs/event_delivery_attempt.md +0 -14
- data/docs/event_record.md +0 -19
- data/docs/event_subscription.md +0 -14
- data/docs/event_target.md +0 -14
- data/docs/exavault_api_request_log.md +1 -21
- data/docs/expectation.md +0 -14
- data/docs/expectation_evaluation.md +0 -14
- data/docs/expectation_incident.md +0 -14
- data/docs/external_event.md +0 -18
- data/docs/file.md +2 -90
- data/docs/file_migration.md +0 -32
- data/docs/file_migration_log.md +1 -20
- data/docs/file_upload_part.md +1 -3
- data/docs/folder.md +0 -20
- data/docs/form_field_set.md +0 -15
- data/docs/ftp_action_log.md +1 -21
- data/docs/gpg_key.md +0 -21
- data/docs/group.md +0 -19
- data/docs/group_user.md +2 -22
- data/docs/history.md +0 -85
- data/docs/history_export_result.md +0 -17
- data/docs/holiday_region.md +0 -9
- data/docs/inbound_s3_log.md +1 -21
- data/docs/inbox_recipient.md +0 -19
- data/docs/inbox_registration.md +0 -57
- data/docs/inbox_upload.md +0 -18
- data/docs/invoice.md +0 -9
- data/docs/ip_address.md +0 -59
- data/docs/key_lifecycle_rule.md +0 -14
- data/docs/lock.md +0 -15
- data/docs/message.md +0 -17
- data/docs/message_comment.md +0 -18
- data/docs/message_comment_reaction.md +0 -18
- data/docs/message_reaction.md +0 -17
- data/docs/metadata_category.md +0 -13
- data/docs/notification.md +0 -20
- data/docs/outbound_connection_log.md +1 -21
- data/docs/partner.md +0 -14
- data/docs/partner_channel.md +0 -14
- data/docs/partner_site_request.md +0 -14
- data/docs/payment.md +0 -9
- data/docs/pending_work_event.md +0 -18
- data/docs/permission.md +0 -22
- data/docs/preview.md +0 -57
- data/docs/project.md +0 -9
- data/docs/public_hosting_request_log.md +1 -21
- data/docs/public_key.md +0 -21
- data/docs/remote_bandwidth_snapshot.md +0 -18
- data/docs/remote_mount_backend.md +0 -13
- data/docs/remote_server.md +0 -233
- data/docs/remote_server_credential.md +0 -15
- data/docs/request.md +0 -17
- data/docs/restore.md +0 -14
- data/docs/scheduled_export.md +0 -15
- data/docs/scim_log.md +0 -13
- data/docs/session.md +1 -232
- data/docs/settings_change.md +0 -16
- data/docs/sftp_action_log.md +1 -21
- data/docs/sftp_host_key.md +0 -9
- data/docs/share_group.md +0 -15
- data/docs/siem_http_destination.md +0 -9
- data/docs/siem_http_destination_event.md +0 -18
- data/docs/site.md +0 -179
- data/docs/site_subdomain_redirect.md +0 -13
- data/docs/snapshot.md +0 -9
- data/docs/sso_event.md +0 -19
- data/docs/sso_strategy.md +0 -406
- data/docs/sync.md +0 -14
- data/docs/sync_log.md +1 -20
- data/docs/sync_run.md +0 -21
- data/docs/usage_daily_snapshot.md +0 -18
- data/docs/usage_snapshot.md +0 -9
- data/docs/user.md +2 -49
- data/docs/user_cipher_use.md +0 -21
- data/docs/user_lifecycle_rule.md +0 -14
- data/docs/user_request.md +0 -9
- data/docs/user_security_event.md +0 -18
- data/docs/user_sftp_client_use.md +0 -15
- data/docs/web_dav_action_log.md +1 -21
- data/docs/workspace.md +0 -15
- data/lib/files.com/models/action_log.rb +0 -24
- data/lib/files.com/models/action_notification_export_result.rb +0 -12
- data/lib/files.com/models/ai_assistant_personality.rb +0 -11
- data/lib/files.com/models/ai_task.rb +0 -11
- data/lib/files.com/models/api_key.rb +5 -39
- data/lib/files.com/models/api_request_log.rb +0 -24
- data/lib/files.com/models/app.rb +0 -13
- data/lib/files.com/models/as2_incoming_message.rb +0 -19
- data/lib/files.com/models/as2_outgoing_message.rb +0 -19
- data/lib/files.com/models/as2_partner.rb +0 -11
- data/lib/files.com/models/as2_station.rb +0 -11
- data/lib/files.com/models/automation.rb +0 -30
- data/lib/files.com/models/automation_log.rb +0 -24
- data/lib/files.com/models/automation_run.rb +0 -16
- data/lib/files.com/models/bandwidth_snapshot.rb +0 -19
- data/lib/files.com/models/behavior.rb +0 -11
- data/lib/files.com/models/bundle.rb +0 -52
- data/lib/files.com/models/bundle_action.rb +0 -25
- data/lib/files.com/models/bundle_download.rb +0 -23
- data/lib/files.com/models/bundle_notification.rb +0 -15
- data/lib/files.com/models/bundle_recipient.rb +0 -27
- data/lib/files.com/models/bundle_registration.rb +0 -125
- data/lib/files.com/models/chat_session.rb +5 -11
- data/lib/files.com/models/child_site_management_policy.rb +0 -5
- data/lib/files.com/models/clickwrap.rb +0 -9
- data/lib/files.com/models/custom_domain.rb +0 -9
- data/lib/files.com/models/desktop_configuration_profile.rb +0 -11
- data/lib/files.com/models/dns_record.rb +0 -5
- data/lib/files.com/models/email_incoming_message.rb +0 -21
- data/lib/files.com/models/email_log.rb +0 -22
- data/lib/files.com/models/event_channel.rb +0 -11
- data/lib/files.com/models/event_delivery_attempt.rb +0 -11
- data/lib/files.com/models/event_record.rb +0 -21
- data/lib/files.com/models/event_subscription.rb +0 -11
- data/lib/files.com/models/event_target.rb +0 -11
- data/lib/files.com/models/exavault_api_request_log.rb +0 -24
- data/lib/files.com/models/expectation.rb +0 -11
- data/lib/files.com/models/expectation_evaluation.rb +0 -11
- data/lib/files.com/models/expectation_incident.rb +0 -11
- data/lib/files.com/models/external_event.rb +0 -19
- data/lib/files.com/models/file.rb +0 -207
- data/lib/files.com/models/file_migration.rb +0 -27
- data/lib/files.com/models/file_migration_log.rb +0 -22
- data/lib/files.com/models/file_upload_part.rb +0 -5
- data/lib/files.com/models/folder.rb +0 -69
- data/lib/files.com/models/form_field_set.rb +0 -9
- data/lib/files.com/models/ftp_action_log.rb +0 -24
- data/lib/files.com/models/gpg_key.rb +0 -21
- data/lib/files.com/models/group.rb +0 -16
- data/lib/files.com/models/group_user.rb +1 -21
- data/lib/files.com/models/history.rb +0 -94
- data/lib/files.com/models/history_export_result.rb +0 -12
- data/lib/files.com/models/holiday_region.rb +0 -5
- data/lib/files.com/models/inbound_s3_log.rb +0 -24
- data/lib/files.com/models/inbox_recipient.rb +0 -25
- data/lib/files.com/models/inbox_registration.rb +0 -121
- data/lib/files.com/models/inbox_upload.rb +0 -19
- data/lib/files.com/models/invoice.rb +0 -5
- data/lib/files.com/models/ip_address.rb +0 -37
- data/lib/files.com/models/key_lifecycle_rule.rb +0 -11
- data/lib/files.com/models/lock.rb +0 -27
- data/lib/files.com/models/message.rb +0 -12
- data/lib/files.com/models/message_comment.rb +0 -14
- data/lib/files.com/models/message_comment_reaction.rb +0 -14
- data/lib/files.com/models/message_reaction.rb +0 -12
- data/lib/files.com/models/metadata_category.rb +0 -9
- data/lib/files.com/models/notification.rb +0 -18
- data/lib/files.com/models/outbound_connection_log.rb +0 -24
- data/lib/files.com/models/partner.rb +0 -11
- data/lib/files.com/models/partner_channel.rb +0 -11
- data/lib/files.com/models/partner_site_request.rb +0 -11
- data/lib/files.com/models/payment.rb +0 -5
- data/lib/files.com/models/pending_work_event.rb +0 -19
- data/lib/files.com/models/permission.rb +0 -22
- data/lib/files.com/models/preview.rb +0 -57
- data/lib/files.com/models/project.rb +0 -5
- data/lib/files.com/models/public_hosting_request_log.rb +0 -24
- data/lib/files.com/models/public_key.rb +0 -21
- data/lib/files.com/models/remote_bandwidth_snapshot.rb +0 -19
- data/lib/files.com/models/remote_mount_backend.rb +0 -9
- data/lib/files.com/models/remote_server.rb +0 -297
- data/lib/files.com/models/remote_server_credential.rb +0 -13
- data/lib/files.com/models/request.rb +0 -12
- data/lib/files.com/models/restore.rb +0 -11
- data/lib/files.com/models/scheduled_export.rb +0 -13
- data/lib/files.com/models/scim_log.rb +0 -9
- data/lib/files.com/models/session.rb +0 -493
- data/lib/files.com/models/settings_change.rb +0 -16
- data/lib/files.com/models/sftp_action_log.rb +0 -24
- data/lib/files.com/models/sftp_host_key.rb +0 -5
- data/lib/files.com/models/share_group.rb +0 -9
- data/lib/files.com/models/siem_http_destination.rb +0 -5
- data/lib/files.com/models/siem_http_destination_event.rb +0 -19
- data/lib/files.com/models/site.rb +0 -1021
- data/lib/files.com/models/site_subdomain_redirect.rb +0 -9
- data/lib/files.com/models/snapshot.rb +0 -5
- data/lib/files.com/models/sso_event.rb +0 -21
- data/lib/files.com/models/sso_strategy.rb +0 -632
- data/lib/files.com/models/sync.rb +0 -11
- data/lib/files.com/models/sync_log.rb +0 -22
- data/lib/files.com/models/sync_run.rb +0 -21
- data/lib/files.com/models/usage_daily_snapshot.rb +0 -19
- data/lib/files.com/models/usage_snapshot.rb +0 -5
- data/lib/files.com/models/user.rb +0 -59
- data/lib/files.com/models/user_cipher_use.rb +0 -21
- data/lib/files.com/models/user_lifecycle_rule.rb +0 -11
- data/lib/files.com/models/user_request.rb +0 -5
- data/lib/files.com/models/user_security_event.rb +0 -19
- data/lib/files.com/models/user_sftp_client_use.rb +0 -9
- data/lib/files.com/models/web_dav_action_log.rb +0 -24
- data/lib/files.com/models/workspace.rb +0 -13
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +0 -59
- metadata +1 -119
- data/docs/account.md +0 -155
- data/docs/action_webhook_failure.md +0 -28
- data/docs/agent_proxy_identity.md +0 -49
- data/docs/agent_proxy_identity_endpoint.md +0 -11
- data/docs/agent_proxy_identity_result.md +0 -24
- data/docs/agent_v2_auth.md +0 -17
- data/docs/announcement.md +0 -57
- data/docs/blog_post.md +0 -57
- data/docs/bundle_recipient_registration.md +0 -39
- data/docs/certificate.md +0 -258
- data/docs/child_site.md +0 -583
- data/docs/clickwrap_acceptance.md +0 -30
- data/docs/client_log.md +0 -17
- data/docs/crash_report.md +0 -50
- data/docs/custom_domain_for_proxy.md +0 -23
- data/docs/email_preference.md +0 -108
- data/docs/email_preference_bundle_notification.md +0 -15
- data/docs/email_preference_notification.md +0 -17
- data/docs/export.md +0 -90
- data/docs/front_end_server.md +0 -111
- data/docs/frontend_metric.md +0 -34
- data/docs/inbox.md +0 -102
- data/docs/inbox_recipient_registration.md +0 -35
- data/docs/ip.md +0 -63
- data/docs/ip_abuse_entry.md +0 -47
- data/docs/label.md +0 -9
- data/docs/lead.md +0 -161
- data/docs/monitoring_stat.md +0 -38
- data/docs/monitoring_stats.md +0 -15
- data/docs/mover_package.md +0 -68
- data/docs/nps_response.md +0 -75
- data/docs/oauth_redirect.md +0 -11
- data/docs/paired_api_key.md +0 -19
- data/docs/paypal_express_info.md +0 -31
- data/docs/paypal_express_url.md +0 -11
- data/docs/plan.md +0 -107
- data/docs/public_hosting_session_pairing.md +0 -15
- data/docs/public_inbox.md +0 -121
- data/docs/public_url.md +0 -59
- data/docs/regional_migration.md +0 -0
- data/docs/release.md +0 -83
- data/docs/release_package.md +0 -19
- data/docs/revision.md +0 -40
- data/docs/safe_plan.md +0 -0
- data/docs/session_available_site.md +0 -26
- data/docs/setting.md +0 -33
- data/docs/settings.md +0 -498
- data/docs/ssl_certificate.md +0 -37
- data/docs/staging_site.md +0 -591
- data/docs/support_request.md +0 -126
- data/docs/sync_api_usage_snapshot.md +0 -23
- data/docs/sync_api_usage_snapshot_report.md +0 -71
- data/docs/sync_bandwidth_snapshot.md +0 -48
- data/docs/two_factor_authentication_method.md +0 -169
- data/docs/warning.md +0 -36
- data/docs/webauthn_sign_request.md +0 -13
- data/docs/zip_download.md +0 -32
- data/docs/zip_download_file.md +0 -45
- data/docs/zip_download_files.md +0 -23
- data/lib/files.com/models/account.rb +0 -346
- data/lib/files.com/models/action_webhook_failure.rb +0 -34
- data/lib/files.com/models/agent_proxy_identity.rb +0 -47
- data/lib/files.com/models/agent_proxy_identity_endpoint.rb +0 -17
- data/lib/files.com/models/agent_proxy_identity_result.rb +0 -27
- data/lib/files.com/models/agent_v2_auth.rb +0 -32
- data/lib/files.com/models/announcement.rb +0 -89
- data/lib/files.com/models/blog_post.rb +0 -84
- data/lib/files.com/models/bundle_recipient_registration.rb +0 -105
- data/lib/files.com/models/certificate.rb +0 -455
- data/lib/files.com/models/child_site.rb +0 -1756
- data/lib/files.com/models/clickwrap_acceptance.rb +0 -56
- data/lib/files.com/models/client_log.rb +0 -25
- data/lib/files.com/models/crash_report.rb +0 -151
- data/lib/files.com/models/custom_domain_for_proxy.rb +0 -47
- data/lib/files.com/models/email_preference.rb +0 -124
- data/lib/files.com/models/email_preference_bundle_notification.rb +0 -27
- data/lib/files.com/models/email_preference_notification.rb +0 -32
- data/lib/files.com/models/export.rb +0 -153
- data/lib/files.com/models/front_end_server.rb +0 -335
- data/lib/files.com/models/frontend_metric.rb +0 -65
- data/lib/files.com/models/inbox.rb +0 -123
- data/lib/files.com/models/inbox_recipient_registration.rb +0 -87
- data/lib/files.com/models/ip.rb +0 -82
- data/lib/files.com/models/ip_abuse_entry.rb +0 -96
- data/lib/files.com/models/label.rb +0 -22
- data/lib/files.com/models/lead.rb +0 -434
- data/lib/files.com/models/monitoring_stat.rb +0 -43
- data/lib/files.com/models/monitoring_stats.rb +0 -22
- data/lib/files.com/models/mover_package.rb +0 -80
- data/lib/files.com/models/nps_response.rb +0 -128
- data/lib/files.com/models/oauth_redirect.rb +0 -17
- data/lib/files.com/models/paired_api_key.rb +0 -37
- data/lib/files.com/models/paypal_express_info.rb +0 -67
- data/lib/files.com/models/paypal_express_url.rb +0 -17
- data/lib/files.com/models/plan.rb +0 -209
- data/lib/files.com/models/public_hosting_session_pairing.rb +0 -27
- data/lib/files.com/models/public_inbox.rb +0 -142
- data/lib/files.com/models/public_url.rb +0 -177
- data/lib/files.com/models/regional_migration.rb +0 -12
- data/lib/files.com/models/release.rb +0 -153
- data/lib/files.com/models/release_package.rb +0 -37
- data/lib/files.com/models/revision.rb +0 -53
- data/lib/files.com/models/safe_plan.rb +0 -12
- data/lib/files.com/models/session_available_site.rb +0 -47
- data/lib/files.com/models/setting.rb +0 -36
- data/lib/files.com/models/settings.rb +0 -1072
- data/lib/files.com/models/ssl_certificate.rb +0 -77
- data/lib/files.com/models/staging_site.rb +0 -1781
- data/lib/files.com/models/support_request.rb +0 -209
- data/lib/files.com/models/sync_api_usage_snapshot.rb +0 -47
- data/lib/files.com/models/sync_api_usage_snapshot_report.rb +0 -162
- data/lib/files.com/models/sync_bandwidth_snapshot.rb +0 -104
- data/lib/files.com/models/two_factor_authentication_method.rb +0 -250
- data/lib/files.com/models/warning.rb +0 -38
- data/lib/files.com/models/webauthn_sign_request.rb +0 -17
- data/lib/files.com/models/zip_download.rb +0 -73
- data/lib/files.com/models/zip_download_file.rb +0 -111
- data/lib/files.com/models/zip_download_files.rb +0 -42
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Files
|
|
4
|
-
class IpAbuseEntry
|
|
5
|
-
attr_reader :options, :attributes
|
|
6
|
-
|
|
7
|
-
def initialize(attributes = {}, options = {})
|
|
8
|
-
@attributes = attributes || {}
|
|
9
|
-
@options = options || {}
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
# string
|
|
13
|
-
def ip
|
|
14
|
-
@attributes[:ip]
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def ip=(value)
|
|
18
|
-
@attributes[:ip] = value
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# string
|
|
22
|
-
def list
|
|
23
|
-
@attributes[:list]
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def list=(value)
|
|
27
|
-
@attributes[:list] = value
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# string
|
|
31
|
-
def hostname
|
|
32
|
-
@attributes[:hostname]
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def hostname=(value)
|
|
36
|
-
@attributes[:hostname] = value
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
# string
|
|
40
|
-
def reason
|
|
41
|
-
@attributes[:reason]
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def reason=(value)
|
|
45
|
-
@attributes[:reason] = value
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def save
|
|
49
|
-
if @attributes[:id]
|
|
50
|
-
raise NotImplementedError.new("The IpAbuseEntry object doesn't support updates.")
|
|
51
|
-
else
|
|
52
|
-
new_obj = IpAbuseEntry.create(@attributes, @options)
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
@attributes = new_obj.attributes
|
|
56
|
-
true
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
# Parameters:
|
|
60
|
-
# 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.
|
|
61
|
-
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
62
|
-
def self.list(params = {}, options = {})
|
|
63
|
-
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
64
|
-
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
65
|
-
|
|
66
|
-
Api.send_request("/ip_abuse_entries", :get, params, options)
|
|
67
|
-
nil
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def self.all(params = {}, options = {})
|
|
71
|
-
list(params, options)
|
|
72
|
-
nil
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
# Parameters:
|
|
76
|
-
# ip (required) - string
|
|
77
|
-
# list - string
|
|
78
|
-
# hostname - string
|
|
79
|
-
# reason - string
|
|
80
|
-
def self.create(params = {}, options = {})
|
|
81
|
-
raise InvalidParameterError.new("Bad parameter: ip must be an String") if params[:ip] and !params[:ip].is_a?(String)
|
|
82
|
-
raise InvalidParameterError.new("Bad parameter: list must be an String") if params[:list] and !params[:list].is_a?(String)
|
|
83
|
-
raise InvalidParameterError.new("Bad parameter: hostname must be an String") if params[:hostname] and !params[:hostname].is_a?(String)
|
|
84
|
-
raise InvalidParameterError.new("Bad parameter: reason must be an String") if params[:reason] and !params[:reason].is_a?(String)
|
|
85
|
-
raise MissingParameterError.new("Parameter missing: ip") unless params[:ip]
|
|
86
|
-
|
|
87
|
-
Api.send_request("/ip_abuse_entries", :post, params, options)
|
|
88
|
-
nil
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
def self.create_export(params = {}, options = {})
|
|
92
|
-
response, options = Api.send_request("/ip_abuse_entries/create_export", :post, params, options)
|
|
93
|
-
Export.new(response.data, options)
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
|
-
end
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Files
|
|
4
|
-
class Label
|
|
5
|
-
attr_reader :options, :attributes
|
|
6
|
-
|
|
7
|
-
def initialize(attributes = {}, options = {})
|
|
8
|
-
@attributes = attributes || {}
|
|
9
|
-
@options = options || {}
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def self.list(params = {}, options = {})
|
|
13
|
-
Api.send_request("/labels", :get, params, options)
|
|
14
|
-
nil
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def self.all(params = {}, options = {})
|
|
18
|
-
list(params, options)
|
|
19
|
-
nil
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
@@ -1,434 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Files
|
|
4
|
-
class Lead
|
|
5
|
-
attr_reader :options, :attributes
|
|
6
|
-
|
|
7
|
-
def initialize(attributes = {}, options = {})
|
|
8
|
-
@attributes = attributes || {}
|
|
9
|
-
@options = options || {}
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
# int64 - Lead ID
|
|
13
|
-
def id
|
|
14
|
-
@attributes[:id]
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def id=(value)
|
|
18
|
-
@attributes[:id] = value
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# string - Lead Cookie Code
|
|
22
|
-
def code
|
|
23
|
-
@attributes[:code]
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def code=(value)
|
|
27
|
-
@attributes[:code] = value
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# string - Lead name
|
|
31
|
-
def name
|
|
32
|
-
@attributes[:name]
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def name=(value)
|
|
36
|
-
@attributes[:name] = value
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
# string - Lead address
|
|
40
|
-
def address
|
|
41
|
-
@attributes[:address]
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def address=(value)
|
|
45
|
-
@attributes[:address] = value
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
# string - Lead address 2
|
|
49
|
-
def address_2
|
|
50
|
-
@attributes[:address_2]
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def address_2=(value)
|
|
54
|
-
@attributes[:address_2] = value
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# string - Lead city
|
|
58
|
-
def city
|
|
59
|
-
@attributes[:city]
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
def city=(value)
|
|
63
|
-
@attributes[:city] = value
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
# string - Lead company name
|
|
67
|
-
def company_name
|
|
68
|
-
@attributes[:company_name]
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
def company_name=(value)
|
|
72
|
-
@attributes[:company_name] = value
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
# string - Contact name at the company
|
|
76
|
-
def contact_name
|
|
77
|
-
@attributes[:contact_name]
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
def contact_name=(value)
|
|
81
|
-
@attributes[:contact_name] = value
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# string - Lead country
|
|
85
|
-
def country
|
|
86
|
-
@attributes[:country]
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
def country=(value)
|
|
90
|
-
@attributes[:country] = value
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
# string - Lead preferred currency
|
|
94
|
-
def currency
|
|
95
|
-
@attributes[:currency]
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
def currency=(value)
|
|
99
|
-
@attributes[:currency] = value
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
# string - Lead email address
|
|
103
|
-
def email
|
|
104
|
-
@attributes[:email]
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
def email=(value)
|
|
108
|
-
@attributes[:email] = value
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
# string - Lead preferred language
|
|
112
|
-
def language
|
|
113
|
-
@attributes[:language]
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
def language=(value)
|
|
117
|
-
@attributes[:language] = value
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
# string - Lead phone number
|
|
121
|
-
def phone_number
|
|
122
|
-
@attributes[:phone_number]
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
def phone_number=(value)
|
|
126
|
-
@attributes[:phone_number] = value
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# string - Lead state
|
|
130
|
-
def state
|
|
131
|
-
@attributes[:state]
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
def state=(value)
|
|
135
|
-
@attributes[:state] = value
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
# string - Lead zipcode
|
|
139
|
-
def zip
|
|
140
|
-
@attributes[:zip]
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
def zip=(value)
|
|
144
|
-
@attributes[:zip] = value
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
# string - Quality score of the lead
|
|
148
|
-
def lead_level
|
|
149
|
-
@attributes[:lead_level]
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
def lead_level=(value)
|
|
153
|
-
@attributes[:lead_level] = value
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
# string - Signup page split test group
|
|
157
|
-
def signup_page_split_test_group
|
|
158
|
-
@attributes[:signup_page_split_test_group]
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
def signup_page_split_test_group=(value)
|
|
162
|
-
@attributes[:signup_page_split_test_group] = value
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
# string
|
|
166
|
-
def recaptcha_token
|
|
167
|
-
@attributes[:recaptcha_token]
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
def recaptcha_token=(value)
|
|
171
|
-
@attributes[:recaptcha_token] = value
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
# string - Signup form name
|
|
175
|
-
def form_name
|
|
176
|
-
@attributes[:form_name]
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
def form_name=(value)
|
|
180
|
-
@attributes[:form_name] = value
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# string - Source of the lead
|
|
184
|
-
def lead_source
|
|
185
|
-
@attributes[:lead_source]
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
def lead_source=(value)
|
|
189
|
-
@attributes[:lead_source] = value
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
# string - Opportunity comment
|
|
193
|
-
def opportunity_comment
|
|
194
|
-
@attributes[:opportunity_comment]
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
def opportunity_comment=(value)
|
|
198
|
-
@attributes[:opportunity_comment] = value
|
|
199
|
-
end
|
|
200
|
-
|
|
201
|
-
# string - Type of opportunity to create
|
|
202
|
-
def opportunity_type
|
|
203
|
-
@attributes[:opportunity_type]
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
def opportunity_type=(value)
|
|
207
|
-
@attributes[:opportunity_type] = value
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
# string - Google Adwords Click ID
|
|
211
|
-
def gclid
|
|
212
|
-
@attributes[:gclid]
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
def gclid=(value)
|
|
216
|
-
@attributes[:gclid] = value
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
# string - Brand: `files`, `exavault` or `mover`
|
|
220
|
-
def original_brand
|
|
221
|
-
@attributes[:original_brand]
|
|
222
|
-
end
|
|
223
|
-
|
|
224
|
-
def original_brand=(value)
|
|
225
|
-
@attributes[:original_brand] = value
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
# string - Marketing tracking - campaign
|
|
229
|
-
def utm_campaign
|
|
230
|
-
@attributes[:utm_campaign]
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
def utm_campaign=(value)
|
|
234
|
-
@attributes[:utm_campaign] = value
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
# string - Marketing tracking - content
|
|
238
|
-
def utm_content
|
|
239
|
-
@attributes[:utm_content]
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
def utm_content=(value)
|
|
243
|
-
@attributes[:utm_content] = value
|
|
244
|
-
end
|
|
245
|
-
|
|
246
|
-
# string - Marketing tracking - domain
|
|
247
|
-
def utm_domain
|
|
248
|
-
@attributes[:utm_domain]
|
|
249
|
-
end
|
|
250
|
-
|
|
251
|
-
def utm_domain=(value)
|
|
252
|
-
@attributes[:utm_domain] = value
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
# string - Marketing tracking - medium
|
|
256
|
-
def utm_medium
|
|
257
|
-
@attributes[:utm_medium]
|
|
258
|
-
end
|
|
259
|
-
|
|
260
|
-
def utm_medium=(value)
|
|
261
|
-
@attributes[:utm_medium] = value
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
# string - Marketing tracking - source
|
|
265
|
-
def utm_source
|
|
266
|
-
@attributes[:utm_source]
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
def utm_source=(value)
|
|
270
|
-
@attributes[:utm_source] = value
|
|
271
|
-
end
|
|
272
|
-
|
|
273
|
-
# string - Marketing tracking - term
|
|
274
|
-
def utm_term
|
|
275
|
-
@attributes[:utm_term]
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
def utm_term=(value)
|
|
279
|
-
@attributes[:utm_term] = value
|
|
280
|
-
end
|
|
281
|
-
|
|
282
|
-
# string - Time zone, as returned by Javascript
|
|
283
|
-
def time_zone
|
|
284
|
-
@attributes[:time_zone]
|
|
285
|
-
end
|
|
286
|
-
|
|
287
|
-
def time_zone=(value)
|
|
288
|
-
@attributes[:time_zone] = value
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
# int64 - Time zone offset (integer from -12 to 12)
|
|
292
|
-
def time_zone_offset
|
|
293
|
-
@attributes[:time_zone_offset]
|
|
294
|
-
end
|
|
295
|
-
|
|
296
|
-
def time_zone_offset=(value)
|
|
297
|
-
@attributes[:time_zone_offset] = value
|
|
298
|
-
end
|
|
299
|
-
|
|
300
|
-
def save
|
|
301
|
-
if @attributes[:id]
|
|
302
|
-
raise NotImplementedError.new("The Lead object doesn't support updates.")
|
|
303
|
-
else
|
|
304
|
-
new_obj = Lead.create(@attributes, @options)
|
|
305
|
-
end
|
|
306
|
-
|
|
307
|
-
@attributes = new_obj.attributes
|
|
308
|
-
true
|
|
309
|
-
end
|
|
310
|
-
|
|
311
|
-
# Parameters:
|
|
312
|
-
# recaptcha_token - string
|
|
313
|
-
# name - string - Lead name
|
|
314
|
-
# address - string - Lead address
|
|
315
|
-
# address_2 - string - Lead address 2
|
|
316
|
-
# city - string - Lead city
|
|
317
|
-
# contact_name - string - Contact name at the company
|
|
318
|
-
# currency - string - Lead preferred currency
|
|
319
|
-
# email - string - Lead email address
|
|
320
|
-
# language - string - Lead preferred language
|
|
321
|
-
# phone_number - string - Lead phone number
|
|
322
|
-
# state - string - Lead state
|
|
323
|
-
# zip - string - Lead zipcode
|
|
324
|
-
# form_name - string - Signup form name
|
|
325
|
-
# lead_source - string - Source of the lead
|
|
326
|
-
# opportunity_comment - string - Opportunity comment
|
|
327
|
-
# opportunity_type - string - Type of opportunity to create
|
|
328
|
-
# gclid - string - Google Adwords Click ID
|
|
329
|
-
# original_brand - string - Brand: `files`, `exavault` or `mover`
|
|
330
|
-
# utm_campaign - string - Marketing tracking - campaign
|
|
331
|
-
# utm_content - string - Marketing tracking - content
|
|
332
|
-
# utm_domain - string - Marketing tracking - domain
|
|
333
|
-
# utm_medium - string - Marketing tracking - medium
|
|
334
|
-
# utm_source - string - Marketing tracking - source
|
|
335
|
-
# utm_term - string - Marketing tracking - term
|
|
336
|
-
# time_zone - string - Time zone, as returned by Javascript
|
|
337
|
-
# time_zone_offset - int64 - Time zone offset (integer from -12 to 12)
|
|
338
|
-
def self.create(params = {}, options = {})
|
|
339
|
-
raise InvalidParameterError.new("Bad parameter: recaptcha_token must be an String") if params[:recaptcha_token] and !params[:recaptcha_token].is_a?(String)
|
|
340
|
-
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
341
|
-
raise InvalidParameterError.new("Bad parameter: address must be an String") if params[:address] and !params[:address].is_a?(String)
|
|
342
|
-
raise InvalidParameterError.new("Bad parameter: address_2 must be an String") if params[:address_2] and !params[:address_2].is_a?(String)
|
|
343
|
-
raise InvalidParameterError.new("Bad parameter: city must be an String") if params[:city] and !params[:city].is_a?(String)
|
|
344
|
-
raise InvalidParameterError.new("Bad parameter: contact_name must be an String") if params[:contact_name] and !params[:contact_name].is_a?(String)
|
|
345
|
-
raise InvalidParameterError.new("Bad parameter: currency must be an String") if params[:currency] and !params[:currency].is_a?(String)
|
|
346
|
-
raise InvalidParameterError.new("Bad parameter: email must be an String") if params[:email] and !params[:email].is_a?(String)
|
|
347
|
-
raise InvalidParameterError.new("Bad parameter: language must be an String") if params[:language] and !params[:language].is_a?(String)
|
|
348
|
-
raise InvalidParameterError.new("Bad parameter: phone_number must be an String") if params[:phone_number] and !params[:phone_number].is_a?(String)
|
|
349
|
-
raise InvalidParameterError.new("Bad parameter: state must be an String") if params[:state] and !params[:state].is_a?(String)
|
|
350
|
-
raise InvalidParameterError.new("Bad parameter: zip must be an String") if params[:zip] and !params[:zip].is_a?(String)
|
|
351
|
-
raise InvalidParameterError.new("Bad parameter: form_name must be an String") if params[:form_name] and !params[:form_name].is_a?(String)
|
|
352
|
-
raise InvalidParameterError.new("Bad parameter: lead_source must be an String") if params[:lead_source] and !params[:lead_source].is_a?(String)
|
|
353
|
-
raise InvalidParameterError.new("Bad parameter: opportunity_comment must be an String") if params[:opportunity_comment] and !params[:opportunity_comment].is_a?(String)
|
|
354
|
-
raise InvalidParameterError.new("Bad parameter: opportunity_type must be an String") if params[:opportunity_type] and !params[:opportunity_type].is_a?(String)
|
|
355
|
-
raise InvalidParameterError.new("Bad parameter: gclid must be an String") if params[:gclid] and !params[:gclid].is_a?(String)
|
|
356
|
-
raise InvalidParameterError.new("Bad parameter: original_brand must be an String") if params[:original_brand] and !params[:original_brand].is_a?(String)
|
|
357
|
-
raise InvalidParameterError.new("Bad parameter: utm_campaign must be an String") if params[:utm_campaign] and !params[:utm_campaign].is_a?(String)
|
|
358
|
-
raise InvalidParameterError.new("Bad parameter: utm_content must be an String") if params[:utm_content] and !params[:utm_content].is_a?(String)
|
|
359
|
-
raise InvalidParameterError.new("Bad parameter: utm_domain must be an String") if params[:utm_domain] and !params[:utm_domain].is_a?(String)
|
|
360
|
-
raise InvalidParameterError.new("Bad parameter: utm_medium must be an String") if params[:utm_medium] and !params[:utm_medium].is_a?(String)
|
|
361
|
-
raise InvalidParameterError.new("Bad parameter: utm_source must be an String") if params[:utm_source] and !params[:utm_source].is_a?(String)
|
|
362
|
-
raise InvalidParameterError.new("Bad parameter: utm_term must be an String") if params[:utm_term] and !params[:utm_term].is_a?(String)
|
|
363
|
-
raise InvalidParameterError.new("Bad parameter: time_zone must be an String") if params[:time_zone] and !params[:time_zone].is_a?(String)
|
|
364
|
-
raise InvalidParameterError.new("Bad parameter: time_zone_offset must be an Integer") if params[:time_zone_offset] and !params[:time_zone_offset].is_a?(Integer)
|
|
365
|
-
|
|
366
|
-
response, options = Api.send_request("/leads", :post, params, options)
|
|
367
|
-
Lead.new(response.data, options)
|
|
368
|
-
end
|
|
369
|
-
|
|
370
|
-
# Parameters:
|
|
371
|
-
# code (required) - string - Lead lookup code.
|
|
372
|
-
# recaptcha_token - string
|
|
373
|
-
# name - string - Lead name
|
|
374
|
-
# address - string - Lead address
|
|
375
|
-
# address_2 - string - Lead address 2
|
|
376
|
-
# city - string - Lead city
|
|
377
|
-
# contact_name - string - Contact name at the company
|
|
378
|
-
# currency - string - Lead preferred currency
|
|
379
|
-
# email - string - Lead email address
|
|
380
|
-
# language - string - Lead preferred language
|
|
381
|
-
# phone_number - string - Lead phone number
|
|
382
|
-
# state - string - Lead state
|
|
383
|
-
# zip - string - Lead zipcode
|
|
384
|
-
# form_name - string - Signup form name
|
|
385
|
-
# lead_source - string - Source of the lead
|
|
386
|
-
# opportunity_comment - string - Opportunity comment
|
|
387
|
-
# opportunity_type - string - Type of opportunity to create
|
|
388
|
-
# gclid - string - Google Adwords Click ID
|
|
389
|
-
# original_brand - string - Brand: `files`, `exavault` or `mover`
|
|
390
|
-
# utm_campaign - string - Marketing tracking - campaign
|
|
391
|
-
# utm_content - string - Marketing tracking - content
|
|
392
|
-
# utm_domain - string - Marketing tracking - domain
|
|
393
|
-
# utm_medium - string - Marketing tracking - medium
|
|
394
|
-
# utm_source - string - Marketing tracking - source
|
|
395
|
-
# utm_term - string - Marketing tracking - term
|
|
396
|
-
# time_zone - string - Time zone, as returned by Javascript
|
|
397
|
-
# time_zone_offset - int64 - Time zone offset (integer from -12 to 12)
|
|
398
|
-
def self.update(code, params = {}, options = {})
|
|
399
|
-
params ||= {}
|
|
400
|
-
params[:code] = code
|
|
401
|
-
raise InvalidParameterError.new("Bad parameter: code must be an String") if params[:code] and !params[:code].is_a?(String)
|
|
402
|
-
raise InvalidParameterError.new("Bad parameter: recaptcha_token must be an String") if params[:recaptcha_token] and !params[:recaptcha_token].is_a?(String)
|
|
403
|
-
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
404
|
-
raise InvalidParameterError.new("Bad parameter: address must be an String") if params[:address] and !params[:address].is_a?(String)
|
|
405
|
-
raise InvalidParameterError.new("Bad parameter: address_2 must be an String") if params[:address_2] and !params[:address_2].is_a?(String)
|
|
406
|
-
raise InvalidParameterError.new("Bad parameter: city must be an String") if params[:city] and !params[:city].is_a?(String)
|
|
407
|
-
raise InvalidParameterError.new("Bad parameter: contact_name must be an String") if params[:contact_name] and !params[:contact_name].is_a?(String)
|
|
408
|
-
raise InvalidParameterError.new("Bad parameter: currency must be an String") if params[:currency] and !params[:currency].is_a?(String)
|
|
409
|
-
raise InvalidParameterError.new("Bad parameter: email must be an String") if params[:email] and !params[:email].is_a?(String)
|
|
410
|
-
raise InvalidParameterError.new("Bad parameter: language must be an String") if params[:language] and !params[:language].is_a?(String)
|
|
411
|
-
raise InvalidParameterError.new("Bad parameter: phone_number must be an String") if params[:phone_number] and !params[:phone_number].is_a?(String)
|
|
412
|
-
raise InvalidParameterError.new("Bad parameter: state must be an String") if params[:state] and !params[:state].is_a?(String)
|
|
413
|
-
raise InvalidParameterError.new("Bad parameter: zip must be an String") if params[:zip] and !params[:zip].is_a?(String)
|
|
414
|
-
raise InvalidParameterError.new("Bad parameter: form_name must be an String") if params[:form_name] and !params[:form_name].is_a?(String)
|
|
415
|
-
raise InvalidParameterError.new("Bad parameter: lead_source must be an String") if params[:lead_source] and !params[:lead_source].is_a?(String)
|
|
416
|
-
raise InvalidParameterError.new("Bad parameter: opportunity_comment must be an String") if params[:opportunity_comment] and !params[:opportunity_comment].is_a?(String)
|
|
417
|
-
raise InvalidParameterError.new("Bad parameter: opportunity_type must be an String") if params[:opportunity_type] and !params[:opportunity_type].is_a?(String)
|
|
418
|
-
raise InvalidParameterError.new("Bad parameter: gclid must be an String") if params[:gclid] and !params[:gclid].is_a?(String)
|
|
419
|
-
raise InvalidParameterError.new("Bad parameter: original_brand must be an String") if params[:original_brand] and !params[:original_brand].is_a?(String)
|
|
420
|
-
raise InvalidParameterError.new("Bad parameter: utm_campaign must be an String") if params[:utm_campaign] and !params[:utm_campaign].is_a?(String)
|
|
421
|
-
raise InvalidParameterError.new("Bad parameter: utm_content must be an String") if params[:utm_content] and !params[:utm_content].is_a?(String)
|
|
422
|
-
raise InvalidParameterError.new("Bad parameter: utm_domain must be an String") if params[:utm_domain] and !params[:utm_domain].is_a?(String)
|
|
423
|
-
raise InvalidParameterError.new("Bad parameter: utm_medium must be an String") if params[:utm_medium] and !params[:utm_medium].is_a?(String)
|
|
424
|
-
raise InvalidParameterError.new("Bad parameter: utm_source must be an String") if params[:utm_source] and !params[:utm_source].is_a?(String)
|
|
425
|
-
raise InvalidParameterError.new("Bad parameter: utm_term must be an String") if params[:utm_term] and !params[:utm_term].is_a?(String)
|
|
426
|
-
raise InvalidParameterError.new("Bad parameter: time_zone must be an String") if params[:time_zone] and !params[:time_zone].is_a?(String)
|
|
427
|
-
raise InvalidParameterError.new("Bad parameter: time_zone_offset must be an Integer") if params[:time_zone_offset] and !params[:time_zone_offset].is_a?(Integer)
|
|
428
|
-
raise MissingParameterError.new("Parameter missing: code") unless params[:code]
|
|
429
|
-
|
|
430
|
-
response, options = Api.send_request("/leads/#{params[:code]}", :patch, params, options)
|
|
431
|
-
Lead.new(response.data, options)
|
|
432
|
-
end
|
|
433
|
-
end
|
|
434
|
-
end
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Files
|
|
4
|
-
class MonitoringStat
|
|
5
|
-
attr_reader :options, :attributes
|
|
6
|
-
|
|
7
|
-
def initialize(attributes = {}, options = {})
|
|
8
|
-
@attributes = attributes || {}
|
|
9
|
-
@options = options || {}
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
# array(string)
|
|
13
|
-
def alerts
|
|
14
|
-
@attributes[:alerts]
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# object
|
|
18
|
-
def info
|
|
19
|
-
@attributes[:info]
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
# Parameters:
|
|
23
|
-
# 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.
|
|
24
|
-
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
25
|
-
def self.list(params = {}, options = {})
|
|
26
|
-
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
27
|
-
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
28
|
-
|
|
29
|
-
List.new(MonitoringStats, params) do
|
|
30
|
-
Api.send_request("/monitoring_stats", :get, params, options)
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def self.all(params = {}, options = {})
|
|
35
|
-
list(params, options)
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
def self.create_export(params = {}, options = {})
|
|
39
|
-
response, options = Api.send_request("/monitoring_stats/create_export", :post, params, options)
|
|
40
|
-
Export.new(response.data, options)
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Files
|
|
4
|
-
class MonitoringStats
|
|
5
|
-
attr_reader :options, :attributes
|
|
6
|
-
|
|
7
|
-
def initialize(attributes = {}, options = {})
|
|
8
|
-
@attributes = attributes || {}
|
|
9
|
-
@options = options || {}
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
# array(string)
|
|
13
|
-
def alerts
|
|
14
|
-
@attributes[:alerts]
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# object
|
|
18
|
-
def info
|
|
19
|
-
@attributes[:info]
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "bigdecimal"
|
|
4
|
-
|
|
5
|
-
module Files
|
|
6
|
-
class MoverPackage
|
|
7
|
-
attr_reader :options, :attributes
|
|
8
|
-
|
|
9
|
-
def initialize(attributes = {}, options = {})
|
|
10
|
-
@attributes = attributes || {}
|
|
11
|
-
@options = options || {}
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# int64 - Mover package ID
|
|
15
|
-
def id
|
|
16
|
-
@attributes[:id]
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
# int64 - Total prepaid bytes included in this package
|
|
20
|
-
def prepaid_bytes
|
|
21
|
-
@attributes[:prepaid_bytes]
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
# int64 - Number of days this package is valid for after purchase
|
|
25
|
-
def prepaid_expire_in_days
|
|
26
|
-
@attributes[:prepaid_expire_in_days]
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# decimal - Price of this mover package in the site's currency
|
|
30
|
-
def price
|
|
31
|
-
value = @attributes[:price]
|
|
32
|
-
return value if value.nil? || value.is_a?(BigDecimal)
|
|
33
|
-
|
|
34
|
-
BigDecimal(value.to_s)
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# Purchase a Mover package for the current site
|
|
38
|
-
def purchase(params = {})
|
|
39
|
-
params ||= {}
|
|
40
|
-
params[:id] = @attributes[:id]
|
|
41
|
-
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
42
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
43
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
44
|
-
|
|
45
|
-
Api.send_request("/mover_packages/#{@attributes[:id]}/purchase", :post, params, @options)
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
# Parameters:
|
|
49
|
-
# 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.
|
|
50
|
-
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
51
|
-
def self.list(params = {}, options = {})
|
|
52
|
-
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
53
|
-
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
54
|
-
|
|
55
|
-
List.new(MoverPackage, params) do
|
|
56
|
-
Api.send_request("/mover_packages", :get, params, options)
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
def self.all(params = {}, options = {})
|
|
61
|
-
list(params, options)
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
# Purchase a Mover package for the current site
|
|
65
|
-
def self.purchase(id, params = {}, options = {})
|
|
66
|
-
params ||= {}
|
|
67
|
-
params[:id] = id
|
|
68
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
69
|
-
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
70
|
-
|
|
71
|
-
response, options = Api.send_request("/mover_packages/#{params[:id]}/purchase", :post, params, options)
|
|
72
|
-
MoverPackage.new(response.data, options)
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
def self.create_export(params = {}, options = {})
|
|
76
|
-
response, options = Api.send_request("/mover_packages/create_export", :post, params, options)
|
|
77
|
-
Export.new(response.data, options)
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
end
|