zoho_books 0.0.7.1 → 0.0.7.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83991e8d0cb0386e456b3a11b18d91023993a9ddf91d6cdc7fb07477a1534d4c
4
- data.tar.gz: def07a59b6a3e4e00b1843fdddc349bad1ddcc949f812ee55b3633ca2d905e4b
3
+ metadata.gz: 766e7bea493b0b9616512f830f7258a5800d4429e850e48450e5871e887cb016
4
+ data.tar.gz: 00a4c47693b40e197f5cda077f75b41ea4b92af1dfded2bed9bad2fc3d082d52
5
5
  SHA512:
6
- metadata.gz: e2fd505779ab8858a83c9ebd7b38032e9f9c535074a9de68b07873d5a881bc2f210bb4d8920626fc215b6f18c5ffb40f68e56312b4a5e8326d02c19089484b97
7
- data.tar.gz: '002508ab668c8431f053de17bba7126f527ad3046515fc6e539c6fabc88a50b72f83d652a8f2e7fed8771e918a79e46c08698598d2dc91edb19515bc7ce67687'
6
+ metadata.gz: c9f73789fa91ac06390b98462ed37da27945615959135c9296b20c16cf7dbc26e9c438b41f88b8c8bac62c1025d7d17807103b7667f8285ad8b2fe844b9e2b01
7
+ data.tar.gz: 0c67a8029c50efb3f50a124a6929dff865bcebe7cd40755edf12f7c957aae5b5f345a1d32ae82ee7487516d5d35125c3a6dd62ac43c6fc6e8e0dfeca8acfbccc
@@ -10,7 +10,8 @@ module ZohoBooks
10
10
  end
11
11
 
12
12
  def self.get(id, _opts = {})
13
- ZohoBooks::Connection.get("#{BASE_URL}/invoices/#{id}?organization_id=#{ZohoBooks.config.organization_id}")
13
+ query = _opts.map { |k, v| "#{k}=#{v}" }.join('&')
14
+ ZohoBooks::Connection.get("#{BASE_URL}/invoices/#{id}?organization_id=#{ZohoBooks.config.organization_id}&#{query}")
14
15
  end
15
16
 
16
17
  def self.create(body, _opts = {})
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'httparty'
4
+
5
+ module ZohoBooks
6
+ class Payment
7
+ def self.create(body, _opts = {})
8
+ ZohoBooks::Connection.post("#{BASE_URL}/customerpayments?organization_id=#{ZohoBooks.config.organization_id}", body.to_json)
9
+ end
10
+ end
11
+ end
data/lib/zoho_books.rb CHANGED
@@ -13,3 +13,4 @@ require 'zoho_books/estimate'
13
13
  require 'zoho_books/estimates/template'
14
14
  require 'zoho_books/tax'
15
15
  require 'zoho_books/invoice'
16
+ require 'zoho_books/payment'
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.7.1
4
+ version: 0.0.7.3
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-20 00:00:00.000000000 Z
13
+ date: 2023-11-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -42,6 +42,7 @@ files:
42
42
  - lib/zoho_books/estimates/template.rb
43
43
  - lib/zoho_books/invoice.rb
44
44
  - lib/zoho_books/item.rb
45
+ - lib/zoho_books/payment.rb
45
46
  - lib/zoho_books/tax.rb
46
47
  homepage: https://rubygems.org/gems/zoho_books
47
48
  licenses: