Class: Natero::Account
- Inherits:
-
Base
- Object
- Base
- Natero::Account
show all
- Defined in:
- lib/natero/account.rb
Constant Summary
Constants inherited
from Base
Base::BASE_URI, Base::REQUIRED_PARAMS, Base::VERSION_URI
Instance Attribute Summary
Attributes inherited from Base
#raw_response
Class Method Summary
collapse
Methods inherited from Base
endpoint, #initialize, json_data, json_headers, request_helper, #to_json
#serialize, #to_h, #unserialize
Constructor Details
This class inherits a constructor from Natero::Base
Class Method Details
.bulk_insert_modify(accounts) ⇒ Object
10
11
12
|
# File 'lib/natero/account.rb', line 10
def self.bulk_insert_modify(accounts)
post([], json_data(Natero.to_records_json(accounts)))
end
|
.deactivate_account(id) ⇒ Object
42
43
44
|
# File 'lib/natero/account.rb', line 42
def self.deactivate_account(id)
delete([id])
end
|
.delete_assigned_csm_reps(id, email) ⇒ Object
58
59
60
|
# File 'lib/natero/account.rb', line 58
def self.delete_assigned_csm_reps(id, email)
delete([id, 'assigned_csms', email])
end
|
.delete_dimension_labels(id, key) ⇒ Object
54
55
56
|
# File 'lib/natero/account.rb', line 54
def self.delete_dimension_labels(id, key)
delete([id, 'dimension_labels', key])
end
|
.delete_dimension_values(id, key) ⇒ Object
50
51
52
|
# File 'lib/natero/account.rb', line 50
def self.delete_dimension_values(id, key)
delete([id, 'dimension_values', key])
end
|
.delete_nps_history(id, timestamp) ⇒ Object
62
63
64
|
# File 'lib/natero/account.rb', line 62
def self.delete_nps_history(id, timestamp)
delete([id, 'nps_history', timestamp])
end
|
.delete_stage_history(id, name, timestamp) ⇒ Object
46
47
48
|
# File 'lib/natero/account.rb', line 46
def self.delete_stage_history(id, name, timestamp)
delete([id, 'stage_history', name, timestamp])
end
|
.endpoint_path ⇒ Object
66
67
68
|
# File 'lib/natero/account.rb', line 66
def self.endpoint_path
['accounts']
end
|
.modify(id, account) ⇒ Object
14
15
16
|
# File 'lib/natero/account.rb', line 14
def self.modify(id, account)
put([id], json_data(account.to_json))
end
|
.retrieve(id) ⇒ Object
6
7
8
|
# File 'lib/natero/account.rb', line 6
def self.retrieve(id)
get([id])
end
|
.retrieve_all ⇒ Object
2
3
4
|
# File 'lib/natero/account.rb', line 2
def self.retrieve_all
get
end
|
38
39
40
|
# File 'lib/natero/account.rb', line 38
def self.retrieve_contacts(id)
get([id, 'contacts'])
end
|
.retrieve_custom_metrics(id) ⇒ Object
18
19
20
|
# File 'lib/natero/account.rb', line 18
def self.retrieve_custom_metrics(id)
get([id, 'metrics'])
end
|
.retrieve_invoice_statements(id) ⇒ Object
22
23
24
|
# File 'lib/natero/account.rb', line 22
def self.retrieve_invoice_statements(id)
get([id, 'statements'])
end
|
.retrieve_product_users(id) ⇒ Object
34
35
36
|
# File 'lib/natero/account.rb', line 34
def self.retrieve_product_users(id)
get([id, 'users'])
end
|
.retrieve_subscription_history(id) ⇒ Object
26
27
28
|
# File 'lib/natero/account.rb', line 26
def self.retrieve_subscription_history(id)
get([id, 'subscriptions'])
end
|
.retrieve_support_tickets(id) ⇒ Object
30
31
32
|
# File 'lib/natero/account.rb', line 30
def self.retrieve_support_tickets(id)
get([id, 'support_tickets'])
end
|