Class: ChargeBee::UsageEvent

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

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, #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

#deduplication_idObject

Returns the value of attribute deduplication_id.



4
5
6
# File 'lib/chargebee/models/usage_event.rb', line 4

def deduplication_id
  @deduplication_id
end

#propertiesObject

Returns the value of attribute properties.



4
5
6
# File 'lib/chargebee/models/usage_event.rb', line 4

def properties
  @properties
end

#subscription_idObject

Returns the value of attribute subscription_id.



4
5
6
# File 'lib/chargebee/models/usage_event.rb', line 4

def subscription_id
  @subscription_id
end

#usage_timestampObject

Returns the value of attribute usage_timestamp.



4
5
6
# File 'lib/chargebee/models/usage_event.rb', line 4

def usage_timestamp
  @usage_timestamp
end

Class Method Details

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



16
17
18
19
20
21
# File 'lib/chargebee/models/usage_event.rb', line 16

def self.batch_ingest(params, env=nil, headers={})
  jsonKeys = { 
      :properties => 1,
  }
  Request.send('post', uri_path("batch","usage_events"), params, env, headers, "ingest", true, jsonKeys)
end

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

OPERATIONS




9
10
11
12
13
14
# File 'lib/chargebee/models/usage_event.rb', line 9

def self.create(params, env=nil, headers={})
  jsonKeys = { 
      :properties => 0,
  }
  Request.send('post', uri_path("usage_events"), params, env, headers, "ingest", true, jsonKeys)
end