zoho_books 0.0.7.4 → 0.0.7.5

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: 4c9ff8052084c2a615195079da65d686f4d791ec4602d3c57d84c80f37e8f99c
4
- data.tar.gz: a7fa9c18e1b69b2e70e4d8c17bd56c9a8be772e252e265f2965599497ec85203
3
+ metadata.gz: b9bc470280669c75462a3f68a79beb2509e6d977b096769e1ffd18593215204c
4
+ data.tar.gz: 05fee8dff70d647e5ed28fefc5a1214251c8f992b6d2c9319fa88cdccea57e06
5
5
  SHA512:
6
- metadata.gz: d8e353ce5f4acd04808922137f72f8c954dd3cd58f2ec2840dc2e9c4270864b86a85fd31b64efb0eb7bf41a055e3b6712dbb1f9e8f3e34d2def7561b3e4ee8e2
7
- data.tar.gz: c00ea75bd3015b915aeca4cad650754cf105316dbd0d94fceec5d720eb6423fd2fb7e618307647d3202a444a6ca00c85dfbf4a44d1689f4725efef16fa2f4e36
6
+ metadata.gz: 6d9d883889fabacac8491560a07431dc5969a5211cbca85b206dc3b60fc7ae7b40050578da050182da96781973c7042dc18cae06fddb4122d066e7ce17d5b30a
7
+ data.tar.gz: f69404a90d41577fc8e1a92269ffba0afbe27faee2164cf09c7aacc38bf847e40880d2a02aee49cf27845bb2157336e8bf872a230186fd04aeb3c80c26d6f3c2
@@ -17,7 +17,7 @@ module ZohoBooks
17
17
  def self.post(url, body)
18
18
  response = HTTParty.post(url, body:, headers:)
19
19
 
20
- return render_error(response) if response.code != 201
20
+ return render_error(response) unless [200, 201].include?(response.code)
21
21
 
22
22
  response
23
23
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ZohoBooks
4
+ module Invoices
5
+ class Status
6
+ def self.update(id)
7
+ ZohoBooks::Connection.post("#{BASE_URL}/invoices/#{id}/status/sent?organization_id=#{ZohoBooks.config.organization_id}", {}.to_json)
8
+ end
9
+ end
10
+ end
11
+ end
data/lib/zoho_books.rb CHANGED
@@ -13,5 +13,6 @@ 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/invoices/status'
16
17
  require 'zoho_books/payment'
17
18
  require 'zoho_books/credit_note'
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zoho_books
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7.4
4
+ version: 0.0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - PapaLoup
8
8
  - Raphtml
9
9
  - theobcl
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-11-10 00:00:00.000000000 Z
13
+ date: 2023-11-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/status.rb
45
46
  - lib/zoho_books/item.rb
46
47
  - lib/zoho_books/payment.rb
47
48
  - lib/zoho_books/tax.rb
@@ -49,7 +50,7 @@ homepage: https://rubygems.org/gems/zoho_books
49
50
  licenses:
50
51
  - MIT
51
52
  metadata: {}
52
- post_install_message:
53
+ post_install_message:
53
54
  rdoc_options: []
54
55
  require_paths:
55
56
  - lib
@@ -64,8 +65,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
65
  - !ruby/object:Gem::Version
65
66
  version: '0'
66
67
  requirements: []
67
- rubygems_version: 3.1.6
68
- signing_key:
68
+ rubygems_version: 3.4.10
69
+ signing_key:
69
70
  specification_version: 4
70
71
  summary: Zoho Books API wrapper
71
72
  test_files: []