zoho_books 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/zoho_books/connection.rb +2 -0
- data/lib/zoho_books/contact.rb +0 -2
- data/lib/zoho_books/estimate.rb +27 -0
- data/lib/zoho_books/estimates/template.rb +12 -0
- data/lib/zoho_books/item.rb +0 -2
- data/lib/zoho_books/tax.rb +27 -0
- data/lib/zoho_books.rb +3 -1
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 50914272ab350678fb813567bd0874a2c31b6e2ada8172d4e9635ec3c583d21e
|
|
4
|
+
data.tar.gz: 4f57bffb652672d0eee31050bbce58bc63c27fcdbad5ba92c7b9cb3363a271f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99ab636fbf3388b19b602be15726b0636dad6800995a25021f14b1d31ea7571a0ff8d80abdad2653f90f3a43e1f6e279dfc80df6e76cdc3c6f9a25fb86ad724c
|
|
7
|
+
data.tar.gz: deb65b9772fc6dd360ab8efb25aae0bc96796121b364bbcc659862414e8363f5df8492c4a661c463b556a511f55c81698cd75d490531f9226ec3186a7dc13fee
|
data/lib/zoho_books/contact.rb
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'httparty'
|
|
3
|
+
|
|
4
|
+
module ZohoBooks
|
|
5
|
+
class Estimate
|
|
6
|
+
def self.list(opts = {})
|
|
7
|
+
query = opts.map { |k, v| "#{k}=#{v}" }.join('&')
|
|
8
|
+
ZohoBooks::Connection.get("#{BASE_URL}/estimates?organization_id=#{ZohoBooks.config.organization_id}&#{query}")
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def self.get(id, opts = {})
|
|
12
|
+
ZohoBooks::Connection.get("#{BASE_URL}/estimates/#{id}?organization_id=#{ZohoBooks.config.organization_id}")
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def self.create(body, opts = {})
|
|
16
|
+
ZohoBooks::Connection.post("#{BASE_URL}/estimates?organization_id=#{ZohoBooks.config.organization_id}", body.to_json)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def self.update(id, body, opts = {})
|
|
20
|
+
ZohoBooks::Connection.put("#{BASE_URL}/estimates/#{id}?organization_id=#{ZohoBooks.config.organization_id}", body.to_json)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.delete(id, opts = {})
|
|
24
|
+
ZohoBooks::Connection.delete("#{BASE_URL}/estimates/#{id}?organization_id=#{ZohoBooks.config.organization_id}")
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'httparty'
|
|
3
|
+
|
|
4
|
+
module ZohoBooks
|
|
5
|
+
module Estimates
|
|
6
|
+
class Template
|
|
7
|
+
def self.list
|
|
8
|
+
ZohoBooks::Connection.get("#{BASE_URL}/estimates/templates?organization_id=#{ZohoBooks.config.organization_id}")
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
data/lib/zoho_books/item.rb
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'httparty'
|
|
3
|
+
|
|
4
|
+
module ZohoBooks
|
|
5
|
+
class Tax
|
|
6
|
+
def self.list(opts = {})
|
|
7
|
+
query = opts.map { |k, v| "#{k}=#{v}" }.join('&')
|
|
8
|
+
ZohoBooks::Connection.get("#{BASE_URL}/settings/taxes?organization_id=#{ZohoBooks.config.organization_id}&#{query}")
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def self.get(id, opts = {})
|
|
12
|
+
ZohoBooks::Connection.get("#{BASE_URL}/settings/taxes/#{id}?organization_id=#{ZohoBooks.config.organization_id}")
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def self.create(body, opts = {})
|
|
16
|
+
ZohoBooks::Connection.post("#{BASE_URL}/settings/taxes?organization_id=#{ZohoBooks.config.organization_id}", body.to_json)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def self.update(id, body, opts = {})
|
|
20
|
+
ZohoBooks::Connection.put("#{BASE_URL}/settings/taxes/#{id}?organization_id=#{ZohoBooks.config.organization_id}", body.to_json)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.delete(id, opts = {})
|
|
24
|
+
ZohoBooks::Connection.delete("#{BASE_URL}/settings/taxes/#{id}?organization_id=#{ZohoBooks.config.organization_id}")
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
data/lib/zoho_books.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zoho_books
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- PapaLoup
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2023-10-
|
|
13
|
+
date: 2023-10-10 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: httparty
|
|
@@ -38,7 +38,10 @@ files:
|
|
|
38
38
|
- lib/zoho_books/connection.rb
|
|
39
39
|
- lib/zoho_books/contact.rb
|
|
40
40
|
- lib/zoho_books/error.rb
|
|
41
|
+
- lib/zoho_books/estimate.rb
|
|
42
|
+
- lib/zoho_books/estimates/template.rb
|
|
41
43
|
- lib/zoho_books/item.rb
|
|
44
|
+
- lib/zoho_books/tax.rb
|
|
42
45
|
homepage: https://rubygems.org/gems/zoho_books
|
|
43
46
|
licenses:
|
|
44
47
|
- MIT
|