Class: Frame::Billing
Constant Summary
collapse
- OBJECT_NAME =
"billing"
- DEPRECATED_METHODS =
%i[customer_report event_report events_report subscription_report].freeze
Instance Attribute Summary
Attributes inherited from FrameObject
#id, #original_values
Class Method Summary
collapse
-
.create_billing_credit(params = {}, opts = {}) ⇒ Object
-
.create_billing_invoice(params = {}, opts = {}) ⇒ Object
-
.create_metering(params = {}, opts = {}) ⇒ Object
-
.create_metering_event(params = {}, opts = {}) ⇒ Object
-
.customer_report(params = {}, opts = {}) ⇒ Object
deprecated
Deprecated.
Use get_customer_report instead. Removed at v2.
-
.event_report(event_name, params = {}, opts = {}) ⇒ Object
deprecated
Deprecated.
Use get_event_report instead. Removed at v2.
-
.events_report(params = {}, opts = {}) ⇒ Object
deprecated
Deprecated.
Use get_events_report instead. Removed at v2.
-
.get_billing_credit(id, opts = {}) ⇒ Object
-
.get_customer_report(params = {}, opts = {}) ⇒ Object
-
.get_event_report(event_name, params = {}, opts = {}) ⇒ Object
-
.get_events_report(params = {}, opts = {}) ⇒ Object
-
.get_metering(id, opts = {}) ⇒ Object
-
.get_metering_event(id, opts = {}) ⇒ Object
-
.get_subscription_report(params = {}, opts = {}) ⇒ Object
-
.object_name ⇒ Object
-
.subscription_report(params = {}, opts = {}) ⇒ Object
deprecated
Deprecated.
Use get_subscription_report instead. Removed at v2.
-
.threshold_progress_report(params = {}, opts = {}) ⇒ Object
-
.update_metering(id, params = {}, opts = {}) ⇒ Object
-
.update_metering_event(id, params = {}, opts = {}) ⇒ Object
Methods inherited from APIResource
class_name, #refresh, resource_url, #resource_url, retrieve
included
Methods inherited from FrameObject
#[], #[]=, construct_from, #each, #initialize, #initialize_from, #inspect, #keys, #serialize_params, #to_hash, #to_s, #update_attributes, #values
Class Method Details
.create_billing_credit(params = {}, opts = {}) ⇒ Object
41
42
43
|
# File 'lib/frame/resources/billing.rb', line 41
def self.create_billing_credit(params = {}, opts = {})
request_object(:post, "/v1/billing/billing_credit", params, opts)
end
|
.create_billing_invoice(params = {}, opts = {}) ⇒ Object
37
38
39
|
# File 'lib/frame/resources/billing.rb', line 37
def self.create_billing_invoice(params = {}, opts = {})
request_object(:post, "/v1/billing/billing_invoice", params, opts)
end
|
.create_metering(params = {}, opts = {}) ⇒ Object
13
14
15
|
# File 'lib/frame/resources/billing.rb', line 13
def self.create_metering(params = {}, opts = {})
request_object(:post, "/v1/billing/metering", params, opts)
end
|
.create_metering_event(params = {}, opts = {}) ⇒ Object
25
26
27
|
# File 'lib/frame/resources/billing.rb', line 25
def self.create_metering_event(params = {}, opts = {})
request_object(:post, "/v1/billing/metering_events", params, opts)
end
|
.customer_report(params = {}, opts = {}) ⇒ Object
Deprecated. Use get_customer_report instead. Removed at v2.
54
55
56
|
# File 'lib/frame/resources/billing.rb', line 54
def self.customer_report(params = {}, opts = {})
request_object(:get, "/v1/billing/report/customer", params, opts)
end
|
.event_report(event_name, params = {}, opts = {}) ⇒ Object
Deprecated. Use get_event_report instead. Removed at v2.
63
64
65
|
# File 'lib/frame/resources/billing.rb', line 63
def self.event_report(event_name, params = {}, opts = {})
request_object(:get, "/v1/billing/report/event/#{CGI.escape(event_name)}", params, opts)
end
|
.events_report(params = {}, opts = {}) ⇒ Object
Deprecated. Use get_events_report instead. Removed at v2.
72
73
74
|
# File 'lib/frame/resources/billing.rb', line 72
def self.events_report(params = {}, opts = {})
request_object(:get, "/v1/billing/report/events", params, opts)
end
|
.get_billing_credit(id, opts = {}) ⇒ Object
45
46
47
|
# File 'lib/frame/resources/billing.rb', line 45
def self.get_billing_credit(id, opts = {})
request_object(:get, "/v1/billing/billing_credit/#{CGI.escape(id)}", {}, opts)
end
|
.get_customer_report(params = {}, opts = {}) ⇒ Object
49
50
51
|
# File 'lib/frame/resources/billing.rb', line 49
def self.get_customer_report(params = {}, opts = {})
request_object(:get, "/v1/billing/report/customer", params, opts)
end
|
.get_event_report(event_name, params = {}, opts = {}) ⇒ Object
58
59
60
|
# File 'lib/frame/resources/billing.rb', line 58
def self.get_event_report(event_name, params = {}, opts = {})
request_object(:get, "/v1/billing/report/event/#{CGI.escape(event_name)}", params, opts)
end
|
.get_events_report(params = {}, opts = {}) ⇒ Object
67
68
69
|
# File 'lib/frame/resources/billing.rb', line 67
def self.get_events_report(params = {}, opts = {})
request_object(:get, "/v1/billing/report/events", params, opts)
end
|
.get_metering(id, opts = {}) ⇒ Object
17
18
19
|
# File 'lib/frame/resources/billing.rb', line 17
def self.get_metering(id, opts = {})
request_object(:get, "/v1/billing/metering/#{CGI.escape(id)}", {}, opts)
end
|
.get_metering_event(id, opts = {}) ⇒ Object
29
30
31
|
# File 'lib/frame/resources/billing.rb', line 29
def self.get_metering_event(id, opts = {})
request_object(:get, "/v1/billing/metering_events/#{CGI.escape(id)}", {}, opts)
end
|
.get_subscription_report(params = {}, opts = {}) ⇒ Object
76
77
78
|
# File 'lib/frame/resources/billing.rb', line 76
def self.get_subscription_report(params = {}, opts = {})
request_object(:get, "/v1/billing/report/subscription", params, opts)
end
|
.object_name ⇒ Object
7
8
9
|
# File 'lib/frame/resources/billing.rb', line 7
def self.object_name
OBJECT_NAME
end
|
.subscription_report(params = {}, opts = {}) ⇒ Object
Deprecated. Use get_subscription_report instead. Removed at v2.
81
82
83
|
# File 'lib/frame/resources/billing.rb', line 81
def self.subscription_report(params = {}, opts = {})
request_object(:get, "/v1/billing/report/subscription", params, opts)
end
|
.threshold_progress_report(params = {}, opts = {}) ⇒ Object
85
86
87
|
# File 'lib/frame/resources/billing.rb', line 85
def self.threshold_progress_report(params = {}, opts = {})
request_object(:get, "/v1/billing/report/threshold_progress", params, opts)
end
|
.update_metering(id, params = {}, opts = {}) ⇒ Object
21
22
23
|
# File 'lib/frame/resources/billing.rb', line 21
def self.update_metering(id, params = {}, opts = {})
request_object(:patch, "/v1/billing/metering/#{CGI.escape(id)}", params, opts)
end
|
.update_metering_event(id, params = {}, opts = {}) ⇒ Object
33
34
35
|
# File 'lib/frame/resources/billing.rb', line 33
def self.update_metering_event(id, params = {}, opts = {})
request_object(:patch, "/v1/billing/metering_events/#{CGI.escape(id)}", params, opts)
end
|