Module: BitsyClient
- Defined in:
- lib/bitsy_client.rb,
lib/bitsy_client/version.rb,
lib/bitsy_client/models/payment_depot.rb,
lib/bitsy_client/models/resource_base.rb
Defined Under Namespace
Classes: PaymentDepot, ResourceBase
Constant Summary
collapse
- API_VERSION =
"v1"
- VERSION =
"0.2.0"
Class Method Summary
collapse
Class Method Details
12
13
14
|
# File 'lib/bitsy_client.rb', line 12
def self.configure
yield self if block_given?
end
|
.site=(val) ⇒ Object
16
17
18
19
|
# File 'lib/bitsy_client.rb', line 16
def self.site=(val)
@@site = (val.split("/") << API_VERSION).join("/")
ResourceBase.site = @@site
end
|
.sync ⇒ Object
21
22
23
24
|
# File 'lib/bitsy_client.rb', line 21
def self.sync
uri = URI.parse("#{self.site}/syncs")
Net::HTTP.post_form(uri, {})
end
|
.truncate ⇒ Object
26
27
28
29
|
# File 'lib/bitsy_client.rb', line 26
def self.truncate
uri = URI.parse("#{self.site}/truncations")
Net::HTTP.post_form(uri, {})
end
|