Class: ChargeBee::Alert

Inherits:
Model
  • Object
show all
Defined in:
lib/chargebee/models/alert.rb

Defined Under Namespace

Classes: FilterCondition, Threshold

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

construct, #init_dependant, #init_dependant_list, #initialize, #inspect, #load, #method_missing, #replace_white_space_with_underscore, #respond_to_missing?, #to_s, uri_path

Constructor Details

This class inherits a constructor from ChargeBee::Model

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ChargeBee::Model

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def created_at
  @created_at
end

#currency_codeObject

Returns the value of attribute currency_code.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def currency_code
  @currency_code
end

#descriptionObject

Returns the value of attribute description.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def description
  @description
end

#filter_conditionsObject

Returns the value of attribute filter_conditions.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def filter_conditions
  @filter_conditions
end

#idObject

Returns the value of attribute id.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def id
  @id
end

#metaObject

Returns the value of attribute meta.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def meta
  @meta
end

#metered_feature_idObject

Returns the value of attribute metered_feature_id.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def metered_feature_id
  @metered_feature_id
end

#nameObject

Returns the value of attribute name.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def name
  @name
end

#statusObject

Returns the value of attribute status.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def status
  @status
end

#subscription_idObject

Returns the value of attribute subscription_id.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def subscription_id
  @subscription_id
end

#thresholdObject

Returns the value of attribute threshold.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def threshold
  @threshold
end

#typeObject

Returns the value of attribute type.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def type
  @type
end

#updated_atObject

Returns the value of attribute updated_at.



12
13
14
# File 'lib/chargebee/models/alert.rb', line 12

def updated_at
  @updated_at
end

Class Method Details

.application_alerts_for_subscription(id, params = {}, env = nil, headers = {}) ⇒ Object



59
60
61
62
63
64
# File 'lib/chargebee/models/alert.rb', line 59

def self.application_alerts_for_subscription(id, params={}, env=nil, headers={})
  jsonKeys = { 
  }
  options = {}
  Request.send('get', uri_path("subscriptions",id.to_s,"applicable_alerts"), params, env, headers,nil, false, jsonKeys, options, "alert", "applicationAlertsForSubscription")
end

.create(params, env = nil, headers = {}) ⇒ Object

OPERATIONS



18
19
20
21
22
23
24
25
# File 'lib/chargebee/models/alert.rb', line 18

def self.create(params, env=nil, headers={})
  jsonKeys = { 
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("alerts"), params, env, headers,nil, false, jsonKeys, options, "alert", "create")
end

.delete(id, env = nil, headers = {}) ⇒ Object



50
51
52
53
54
55
56
57
# File 'lib/chargebee/models/alert.rb', line 50

def self.delete(id, env=nil, headers={})
  jsonKeys = { 
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("alerts",id.to_s,"delete"), {}, env, headers,nil, false, jsonKeys, options, "alert", "delete")
end

.list(params = {}, env = nil, headers = {}) ⇒ Object



34
35
36
37
38
39
# File 'lib/chargebee/models/alert.rb', line 34

def self.list(params={}, env=nil, headers={})
  jsonKeys = { 
  }
  options = {}
  Request.send_list_request('get', uri_path("alerts"), params, env, headers,nil, false, jsonKeys, options, "alert", "list")
end

.retrieve(id, env = nil, headers = {}) ⇒ Object



27
28
29
30
31
32
# File 'lib/chargebee/models/alert.rb', line 27

def self.retrieve(id, env=nil, headers={})
  jsonKeys = { 
  }
  options = {}
  Request.send('get', uri_path("alerts",id.to_s), {}, env, headers,nil, false, jsonKeys, options, "alert", "retrieve")
end

.update(id, params = {}, env = nil, headers = {}) ⇒ Object



41
42
43
44
45
46
47
48
# File 'lib/chargebee/models/alert.rb', line 41

def self.update(id, params={}, env=nil, headers={})
  jsonKeys = { 
  }
  options = {
      :isIdempotent => true
    }
  Request.send('post', uri_path("alerts",id.to_s), params, env, headers,nil, false, jsonKeys, options, "alert", "update")
end