Module: Billimatic

Defined in:
lib/billimatic.rb,
lib/billimatic/http.rb,
lib/billimatic/client.rb,
lib/billimatic/request.rb,
lib/billimatic/version.rb,
lib/billimatic/response.rb,
lib/billimatic/exception.rb,
lib/billimatic/signature.rb,
lib/billimatic/url_helpers.rb,
lib/billimatic/configuration.rb,
lib/billimatic/entities/base.rb,
lib/billimatic/entities/plan.rb,
lib/billimatic/resources/base.rb,
lib/billimatic/resources/plan.rb,
lib/billimatic/entities/person.rb,
lib/billimatic/resources/hooks.rb,
lib/billimatic/entities/company.rb,
lib/billimatic/entities/invoice.rb,
lib/billimatic/entities/product.rb,
lib/billimatic/entities/service.rb,
lib/billimatic/entities/webhook.rb,
lib/billimatic/resources/person.rb,
lib/billimatic/entities/contract.rb,
lib/billimatic/entities/customer.rb,
lib/billimatic/resources/company.rb,
lib/billimatic/resources/invoice.rb,
lib/billimatic/resources/webhook.rb,
lib/billimatic/resources/contract.rb,
lib/billimatic/entities/receivable.rb,
lib/billimatic/entities/invoice_rule.rb,
lib/billimatic/entities/organization.rb,
lib/billimatic/entities/plan_feature.rb,
lib/billimatic/entities/service_item.rb,
lib/billimatic/entities/subscription.rb,
lib/billimatic/resources/invoice_rule.rb,
lib/billimatic/resources/organization.rb,
lib/billimatic/resources/service_item.rb,
lib/billimatic/resources/subscription.rb,
lib/billimatic/entities/email_template.rb,
lib/billimatic/resources/email_template.rb,
lib/billimatic/entities/invoice_template.rb,
lib/billimatic/resources/invoice_template.rb,
lib/billimatic/entities/address_information.rb,
lib/billimatic/entities/entity_service_item.rb,
lib/billimatic/entities/payment_information.rb

Defined Under Namespace

Modules: Entities, Resources Classes: Client, Configuration, Exception, Http, Request, Response, Signature, UrlHelpers

Constant Summary collapse

VERSION =
'1.0.1'
RequestTimeout =
Class.new(Exception)
RequestError =
Class.new(Exception)

Class Method Summary collapse

Class Method Details

.client(token) ⇒ Object


57
58
59
# File 'lib/billimatic.rb', line 57

def self.client(token)
  Client.new(token)
end

.configurationObject


49
50
51
# File 'lib/billimatic.rb', line 49

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

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

Yields:


53
54
55
# File 'lib/billimatic.rb', line 53

def self.configure
  yield(configuration) if block_given?
end

.signature(secret) ⇒ Object


65
66
67
# File 'lib/billimatic.rb', line 65

def self.signature(secret)
  Signature.new(secret)
end

.subscribe(event, callback) ⇒ Object


61
62
63
# File 'lib/billimatic.rb', line 61

def self.subscribe(event, callback)
  Wisper.subscribe(callback, on: event, with: :call)
end

.url_helpersObject


69
70
71
# File 'lib/billimatic.rb', line 69

def self.url_helpers
  UrlHelpers.instance
end