solidus_bling 3.2.3 → 3.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -54
- data/app/models/solidus_bling/order.rb +3 -0
- data/lib/solidus_bling/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ba2bd997458b89796885c592bfc4b9c51f42636dcdd0983c26083fb26bbcf63
|
4
|
+
data.tar.gz: 22e9ec23279ae6549f26fb1d562589bd08bf9fe7fd0ea887f3965c6804be4b4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbefa4a49f2e24145ca22a67a56bef12c475802b0a9bf1c41a6b40778ae006cb321f902857cab23e358ebe5ce5ba744e3cca84f8a090aae9e268916b7771bcd7
|
7
|
+
data.tar.gz: c676680192ac8eeabb6f307c593f679e802b80f50458568ff35c3ca8f1cf38d44c1ec77041fe56c7bb782c89a5a66db22bd6cdbffba51a11b8499a2d85c3f17e
|
data/README.md
CHANGED
@@ -1,10 +1,5 @@
|
|
1
1
|
# Solidus Bling
|
2
2
|
|
3
|
-
[![CircleCI](https://circleci.com/gh/solidusio-contrib/solidus_bling.svg?style=shield)](https://circleci.com/gh/solidusio-contrib/solidus_bling)
|
4
|
-
[![codecov](https://codecov.io/gh/solidusio-contrib/solidus_bling/branch/master/graph/badge.svg)](https://codecov.io/gh/solidusio-contrib/solidus_bling)
|
5
|
-
|
6
|
-
<!-- Explain what your extension does. -->
|
7
|
-
|
8
3
|
## Installation
|
9
4
|
|
10
5
|
Add solidus_bling to your Gemfile:
|
@@ -19,55 +14,6 @@ Bundle your dependencies and run the installation generator:
|
|
19
14
|
bin/rails generate solidus_bling:install
|
20
15
|
```
|
21
16
|
|
22
|
-
## Usage
|
23
|
-
|
24
|
-
<!-- Explain how to use your extension once it's been installed. -->
|
25
|
-
|
26
|
-
## Development
|
27
|
-
|
28
|
-
### Testing the extension
|
29
|
-
|
30
|
-
First bundle your dependencies, then run `bin/rake`. `bin/rake` will default to building the dummy
|
31
|
-
app if it does not exist, then it will run specs. The dummy app can be regenerated by using
|
32
|
-
`bin/rake extension:test_app`.
|
33
|
-
|
34
|
-
```shell
|
35
|
-
bin/rake
|
36
|
-
```
|
37
|
-
|
38
|
-
To run [Rubocop](https://github.com/bbatsov/rubocop) static code analysis run
|
39
|
-
|
40
|
-
```shell
|
41
|
-
bundle exec rubocop
|
42
|
-
```
|
43
|
-
|
44
|
-
When testing your application's integration with this extension you may use its factories.
|
45
|
-
You can load Solidus core factories along with this extension's factories using this statement:
|
46
|
-
|
47
|
-
```ruby
|
48
|
-
SolidusDevSupport::TestingSupport::Factories.load_for(SolidusBling::Engine)
|
49
|
-
```
|
50
|
-
|
51
|
-
### Running the sandbox
|
52
|
-
|
53
|
-
To run this extension in a sandboxed Solidus application, you can run `bin/sandbox`. The path for
|
54
|
-
the sandbox app is `./sandbox` and `bin/rails` will forward any Rails commands to
|
55
|
-
`sandbox/bin/rails`.
|
56
|
-
|
57
|
-
Here's an example:
|
58
|
-
|
59
|
-
```
|
60
|
-
$ bin/rails server
|
61
|
-
=> Booting Puma
|
62
|
-
=> Rails 6.0.2.1 application starting in development
|
63
|
-
* Listening on tcp://127.0.0.1:3000
|
64
|
-
Use Ctrl-C to stop
|
65
|
-
```
|
66
|
-
|
67
|
-
### Releasing new versions
|
68
|
-
|
69
|
-
Please refer to the [dedicated page](https://github.com/solidusio/solidus/wiki/How-to-release-extensions) in the Solidus wiki.
|
70
|
-
|
71
17
|
## License
|
72
18
|
|
73
19
|
Copyright (c) 2023 Hamilton Tumenas Borges, released under the New BSD License.
|
@@ -17,6 +17,8 @@ module SolidusBling
|
|
17
17
|
|
18
18
|
bling_order = BlingApi::Order.new(
|
19
19
|
id_contato: contato.id,
|
20
|
+
pessoa_juridica: @order.tax_id.length > 14,
|
21
|
+
numero_documento: @order.tax_id,
|
20
22
|
items: items,
|
21
23
|
parcelas: parcelas,
|
22
24
|
numero_loja: @order.number,
|
@@ -49,6 +51,7 @@ module SolidusBling
|
|
49
51
|
contato = BlingApi::Customer.new(
|
50
52
|
pessoa_juridica: @order.tax_id.length > 14,
|
51
53
|
numero_documento: @order.tax_id,
|
54
|
+
cod_contribuinte: @order.tax_id.length > 14 ? nil : "9",
|
52
55
|
**build_customer
|
53
56
|
).create
|
54
57
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_bling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hamilton Tumenas Borges
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|