Class: HighLevel::Resources::Snapshots
- Defined in:
- lib/high_level/resources/snapshots.rb
Instance Method Summary collapse
-
#create_snapshot_share_link(body:, company_id: nil, **_opts) ⇒ Object
Create Snapshot Share Link.
-
#get_custom_snapshots(company_id: nil, **_opts) ⇒ Object
Get Snapshots.
-
#get_latest_snapshot_push(snapshot_id:, location_id:, company_id: nil, **_opts) ⇒ Object
Get Last Snapshot Push.
-
#get_snapshot_push(snapshot_id:, company_id: nil, from: nil, to: nil, last_doc: nil, limit: nil, **_opts) ⇒ Object
Get Snapshot Push between Dates.
Methods inherited from Base
Constructor Details
This class inherits a constructor from HighLevel::Resources::Base
Instance Method Details
#create_snapshot_share_link(body:, company_id: nil, **_opts) ⇒ Object
Create Snapshot Share Link
Create a share link for snapshot
24 25 26 27 28 29 30 31 32 |
# File 'lib/high_level/resources/snapshots.rb', line 24 def create_snapshot_share_link(body:, company_id: nil, **_opts) request( method: :post, path: "/snapshots/share/link", security: ["Agency-Access"], params: { "companyId" => company_id }.compact, body: body ) end |
#get_custom_snapshots(company_id: nil, **_opts) ⇒ Object
Get Snapshots
Get a list of all own and imported Snapshots
12 13 14 15 16 17 18 19 |
# File 'lib/high_level/resources/snapshots.rb', line 12 def get_custom_snapshots(company_id: nil, **_opts) request( method: :get, path: "/snapshots/", security: ["Agency-Access"], params: { "companyId" => company_id }.compact ) end |
#get_latest_snapshot_push(snapshot_id:, location_id:, company_id: nil, **_opts) ⇒ Object
Get Last Snapshot Push
Get Latest Snapshot Push Status for a location id
49 50 51 52 53 54 55 56 |
# File 'lib/high_level/resources/snapshots.rb', line 49 def get_latest_snapshot_push(snapshot_id:, location_id:, company_id: nil, **_opts) request( method: :get, path: "/snapshots/snapshot-status/#{snapshot_id}/location/#{location_id}", security: ["Agency-Access"], params: { "companyId" => company_id }.compact ) end |
#get_snapshot_push(snapshot_id:, company_id: nil, from: nil, to: nil, last_doc: nil, limit: nil, **_opts) ⇒ Object
Get Snapshot Push between Dates
Get list of sub-accounts snapshot pushed in time period
37 38 39 40 41 42 43 44 |
# File 'lib/high_level/resources/snapshots.rb', line 37 def get_snapshot_push(snapshot_id:, company_id: nil, from: nil, to: nil, last_doc: nil, limit: nil, **_opts) request( method: :get, path: "/snapshots/snapshot-status/#{snapshot_id}", security: ["Agency-Access"], params: { "companyId" => company_id, "from" => from, "to" => to, "lastDoc" => last_doc, "limit" => limit }.compact ) end |