zoho_books 0.0.7.5 → 0.0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9bc470280669c75462a3f68a79beb2509e6d977b096769e1ffd18593215204c
4
- data.tar.gz: 05fee8dff70d647e5ed28fefc5a1214251c8f992b6d2c9319fa88cdccea57e06
3
+ metadata.gz: 79421c4d03ccd34a3f432588ca683e7fdf6293837367c5b38e62bdad8db4a3d7
4
+ data.tar.gz: 062d84d3147e2f9f74cce73aec394b762c01081fed46ca6fc09dc00872d08255
5
5
  SHA512:
6
- metadata.gz: 6d9d883889fabacac8491560a07431dc5969a5211cbca85b206dc3b60fc7ae7b40050578da050182da96781973c7042dc18cae06fddb4122d066e7ce17d5b30a
7
- data.tar.gz: f69404a90d41577fc8e1a92269ffba0afbe27faee2164cf09c7aacc38bf847e40880d2a02aee49cf27845bb2157336e8bf872a230186fd04aeb3c80c26d6f3c2
6
+ metadata.gz: f9d1a7acef2169bb7199d4f928ef4af0e334ab507ea580e52f0bc3239469622f0efdf415a675a0f69e50aba4826034a2a22f7baf1b0249ca09b478c9ac2591c1
7
+ data.tar.gz: 32313219e7e4786476c666c162a6b3b27873da81aaf141863e8ff49c1d8478d2ba5530121dd065e8c6092d2a7c3fa7fd4c7a96dc5daf12653a7248229e9dab38
@@ -6,8 +6,8 @@ module ZohoBooks
6
6
  BASE_URL = 'https://www.zohoapis.eu/books/v3'
7
7
 
8
8
  class Connection
9
- def self.get(url)
10
- response = HTTParty.get(url, headers:)
9
+ def self.get(url, stream_body = false)
10
+ response = HTTParty.get(url, headers:, stream_body:)
11
11
 
12
12
  return ZohoBooks::Error.new(response.code, response['error']) if response.code != 200
13
13
 
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ZohoBooks
4
+ module Invoices
5
+ class Pdf
6
+ def self.get(invoice_ids)
7
+ ZohoBooks::Connection.get("#{BASE_URL}/invoices/pdf?organization_id=#{ZohoBooks.config.organization_id}&invoice_ids=#{invoice_ids.join(',')}", true)
8
+ end
9
+ end
10
+ end
11
+ end
data/lib/zoho_books.rb CHANGED
@@ -14,5 +14,6 @@ require 'zoho_books/estimates/template'
14
14
  require 'zoho_books/tax'
15
15
  require 'zoho_books/invoice'
16
16
  require 'zoho_books/invoices/status'
17
+ require 'zoho_books/invoices/pdf'
17
18
  require 'zoho_books/payment'
18
19
  require 'zoho_books/credit_note'
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.5
4
+ version: 0.0.7.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-11-29 00:00:00.000000000 Z
13
+ date: 2024-07-29 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/estimate.rb
43
43
  - lib/zoho_books/estimates/template.rb
44
44
  - lib/zoho_books/invoice.rb
45
+ - lib/zoho_books/invoices/pdf.rb
45
46
  - lib/zoho_books/invoices/status.rb
46
47
  - lib/zoho_books/item.rb
47
48
  - lib/zoho_books/payment.rb
@@ -65,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
66
  - !ruby/object:Gem::Version
66
67
  version: '0'
67
68
  requirements: []
68
- rubygems_version: 3.4.10
69
+ rubygems_version: 3.4.19
69
70
  signing_key:
70
71
  specification_version: 4
71
72
  summary: Zoho Books API wrapper