Module: Chartmogul

Defined in:
lib/chartmogul.rb,
lib/chartmogul/base.rb,
lib/chartmogul/client.rb,
lib/chartmogul/metric.rb,
lib/chartmogul/import.rb,
lib/chartmogul/version.rb,
lib/chartmogul/response.rb,
lib/chartmogul/enrichment.rb,
lib/chartmogul/import/plan.rb,
lib/chartmogul/import/base.rb,
lib/chartmogul/metrics/base.rb,
lib/chartmogul/configuration.rb,
lib/chartmogul/import/invoice.rb,
lib/chartmogul/enrichment/tag.rb,
lib/chartmogul/import/customer.rb,
lib/chartmogul/enrichment/base.rb,
lib/chartmogul/metrics/customer.rb,
lib/chartmogul/metrics/activity.rb,
lib/chartmogul/import/data_source.rb,
lib/chartmogul/import/transaction.rb,
lib/chartmogul/import/subscription.rb,
lib/chartmogul/enrichment/customer.rb,
lib/chartmogul/metrics/subscription.rb,
lib/chartmogul/enrichment/attribute.rb,
lib/chartmogul/enrichment/custom_attribute.rb

Defined Under Namespace

Modules: Enrichment, Import, Metric Classes: Base, Client, Configuration, Response, ResponseObject

Constant Summary collapse

VERSION =
"0.1.0".freeze

Class Method Summary collapse

Class Method Details

.configurationObject


32
33
34
# File 'lib/chartmogul/configuration.rb', line 32

def self.configuration
  @configuration ||= Configuration.new
end

.configuration=(config) ⇒ Object


36
37
38
# File 'lib/chartmogul/configuration.rb', line 36

def self.configuration=(config)
  @configuration = config
end

.configure {|configuration| ... } ⇒ Object

Yields:


28
29
30
# File 'lib/chartmogul/configuration.rb', line 28

def self.configure
  yield configuration
end

.delete_resource(end_point, attributes = {}) ⇒ Object


58
59
60
# File 'lib/chartmogul/client.rb', line 58

def self.delete_resource(end_point, attributes = {})
  Client.new(end_point, :delete, attributes).execute
end

.get_resource(end_point, attributes = {}) ⇒ Object


42
43
44
# File 'lib/chartmogul/client.rb', line 42

def self.get_resource(end_point, attributes = {})
  Client.new(end_point, :get, headers: { params: attributes }).execute
end

.patch_resource(end_point, attributes) ⇒ Object


54
55
56
# File 'lib/chartmogul/client.rb', line 54

def self.patch_resource(end_point, attributes)
  Client.new(end_point, :patch, attributes).execute
end

.post_resource(end_point, attributes) ⇒ Object


46
47
48
# File 'lib/chartmogul/client.rb', line 46

def self.post_resource(end_point, attributes)
  Client.new(end_point, :post, attributes).execute
end

.put_resource(end_point, attributes) ⇒ Object


50
51
52
# File 'lib/chartmogul/client.rb', line 50

def self.put_resource(end_point, attributes)
  Client.new(end_point, :put, attributes).execute
end