sale 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 312a98d959d5067f7a8fc7fbe56d1691ff5ba2d8
4
- data.tar.gz: 4e053b4c611549eb2fa7481b2233923b62b7f460
3
+ metadata.gz: 399692ef18897373a6e31332f4066c6b7ede71f9
4
+ data.tar.gz: 829d0fd556792d43efac505df5a38404d3f54b2b
5
5
  SHA512:
6
- metadata.gz: a3562c9ab1d2e86adfc57078ee8e6b5e5df549431e84f815369440fd68f02a074b85b632f611bf02eae000d03e4873930f273819ea1eae8975657c97ef257408
7
- data.tar.gz: '064964f9154ba0851097d2686341c783762c789cad6ae8eb2c1ec90fc14e3a60467206cf92499e7028f92931bd5e394514633330a254f7d47b6060ce47310a30'
6
+ metadata.gz: 4603a425c49361f3e7242c72c43adaa04f6714ffef50c7016357161477a16b0e90df5a84044218293eab355c1d698d5ce9aadd67b2dd5a9f89689eac60b905dd
7
+ data.tar.gz: 2e98c6d402eb22b481108aa588badbbfcf5540ff0dbf289f2e3c3351bc59f2a3e7a56df8560f0b9575a6d8ba170a51cbb877c41c5c2eadc0fdf25617d7dab7d3
@@ -35,11 +35,11 @@ class Bsale::Root < Bsale::APIBase
35
35
  end
36
36
 
37
37
  def buyers
38
- Buyers.new(self)
38
+ Bsale::Buyers.new(self)
39
39
  end
40
40
 
41
41
  def invoices
42
- Invoices.new(self)
42
+ Bsale::Invoices.new(self)
43
43
  end
44
44
 
45
45
  end
@@ -3,7 +3,7 @@ require_relative './base'
3
3
  class Bsale::Buyers
4
4
 
5
5
  def initialize(root)
6
- @client = client
6
+ @client = root
7
7
  end
8
8
 
9
9
  class BuyerNotFoundError < Bsale::InvalidResponseError; end
@@ -30,15 +30,12 @@ class Bsale::Invoices
30
30
  body[:officeId] = officeId if officeId
31
31
  body[:priceListId] = priceListId if priceListId
32
32
 
33
- # facturas require clientId, unlike boletas
34
- if [33, 34].include?(codeSii.to_i)
35
- if clientId
36
- body[:clientId] = clientId
37
- elsif client
38
- body[:client] = client
39
- else
40
- raise 'clientId or client required'
41
- end
33
+ if clientId
34
+ body[:clientId] = clientId
35
+ elsif client
36
+ body[:client] = client
37
+ elsif [33, 34].include?(codeSii.to_i) # facturas requiren clientId
38
+ raise 'clientId or client required'
42
39
  end
43
40
 
44
41
  body[:details] = details if details
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "sale"
6
- s.version = '0.1.0'
6
+ s.version = '0.1.1'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ['Tomás Pollak']
9
9
  s.email = ['tomas@bootic.net']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sale
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomás Pollak