conexa 0.0.6 → 0.0.8
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 +4 -4
- data/CHANGELOG.md +68 -26
- data/Gemfile +0 -2
- data/Gemfile.lock +9 -41
- data/README.md +297 -533
- data/README_pt-BR.md +7 -7
- data/REFERENCE.md +1152 -0
- data/docs/postman-collection.json +30785 -0
- data/lib/conexa/authenticator.rb +2 -0
- data/lib/conexa/model.rb +53 -2
- data/lib/conexa/object.rb +17 -0
- data/lib/conexa/resources/address.rb +16 -0
- data/lib/conexa/resources/auth.rb +38 -0
- data/lib/conexa/resources/charge.rb +82 -7
- data/lib/conexa/resources/contract.rb +58 -3
- data/lib/conexa/resources/credit_card.rb +2 -0
- data/lib/conexa/resources/customer.rb +93 -1
- data/lib/conexa/resources/invoicing_method.rb +2 -0
- data/lib/conexa/resources/person.rb +0 -14
- data/lib/conexa/resources/recurring_sale.rb +2 -0
- data/lib/conexa/resources/sale.rb +75 -1
- data/lib/conexa/version.rb +1 -1
- data/lib/conexa.rb +1 -0
- data/scripts/extract_fixtures.rb +35 -0
- metadata +8 -8
- data/.tool-versions +0 -1
- data/lib/conexa/resources/addres.rb +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '050626980d9f896ca2c70ed30a27c1cfda7d0d30c89e25c90e86422d122fb1af'
|
|
4
|
+
data.tar.gz: 43134221ca4dd8f38bc3f8a62bfffe2807d1565e949e2adf72d446fa14db01cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 298ef626afb7783dff6d66161e20ff4b28b30b0d81761ce3f5debf187f1d60e0d01814004d3372ad6531b5e40e22e110af471522bbc577e3c0baac63dfb17014
|
|
7
|
+
data.tar.gz: 768fbc470c103074ff5b768bf78ba6ed47385c4d06a7cadba7aed395947da92c73756c8f72c06e66be15520974c7f0c2e8438dfc567181cc83357416cad251d5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## 0.0.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.0.8] - 2026-02-19
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- `Auth.login` usava `Request.post` (inclui header Authorization) ao invés de `Request.auth`
|
|
14
|
+
- `Model#primary_key_name` retornava nomes incorretos para classes compostas (ex: `creditcard_id` ao invés de `credit_card_id`)
|
|
15
|
+
- `Model.destroy(id)` falhava para resources com `primary_key_attribute` definido
|
|
16
|
+
- `Model#destroy` retornava Hash interno ao invés de `self`
|
|
17
|
+
- `Person` tinha `find`, `all` e `find_by` desnecessariamente desabilitados (a API suporta todos os endpoints CRUD)
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- Testes de autenticação com cassettes VCR (13 specs)
|
|
21
|
+
- Testes de integração WebMock para Sale, RecurringSale, Plan, Product, Bill, Supplier, Company, CreditCard, Person e InvoicingMethod
|
|
22
|
+
- Total de testes: 407 specs
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
- `REFERENCE.md` reescrito com documentação completa de todos os endpoints baseada na collection Postman
|
|
26
|
+
- nokogiri atualizado para 1.19.1
|
|
27
|
+
|
|
28
|
+
## [0.0.7] - 2026-02-12
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- REFERENCE.md - Complete API reference optimized for LLMs/AI agents
|
|
32
|
+
- Comprehensive test suite (330+ specs)
|
|
33
|
+
- `Model.primary_key_attribute` DSL for cleaner resource definitions
|
|
34
|
+
- YARD documentation for all resource attributes (`@!attribute` directives)
|
|
35
|
+
- Documentation for `method_missing` behavior in ConexaObject
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- **Convention**: Use `snake_case` for all Ruby code (gem auto-converts to camelCase for API)
|
|
39
|
+
- README updated with snake_case examples and "Convention" section
|
|
40
|
+
- Resource methods now use snake_case with camelCase aliases for backwards compatibility
|
|
41
|
+
- `customer.customer_id` (primary) / `customer.customerId` (alias)
|
|
42
|
+
- Simplified resources using `method_missing` for attribute access (-280 lines)
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
- Resource attribute methods now correctly access snake_case keys in `@attributes`
|
|
46
|
+
- Compound-named models (RecurringSale, CreditCard, InvoicingMethod) now have correct primary keys
|
|
47
|
+
- Array attributes (`phones`, `emails_message`, etc.) return `[]` instead of `nil` when empty
|
|
48
|
+
|
|
49
|
+
## [0.0.6] - 2026-02-11
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
- `Result#empty?` now correctly delegates to data array
|
|
53
|
+
- `Util.camelize_hash` guards against nil values
|
|
54
|
+
|
|
55
|
+
## [0.0.5] - 2026-01-15
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
- Initial release with core resources
|
|
59
|
+
- Customer, Contract, Sale, Charge, Bill resources
|
|
60
|
+
- RecurringSale with end functionality
|
|
61
|
+
- Charge with settle and PIX methods
|
|
62
|
+
- Pagination support
|
|
63
|
+
|
|
64
|
+
[Unreleased]: https://github.com/guilhermegazzinelli/conexa-ruby/compare/v0.0.8...HEAD
|
|
65
|
+
[0.0.8]: https://github.com/guilhermegazzinelli/conexa-ruby/compare/v0.0.7...v0.0.8
|
|
66
|
+
[0.0.7]: https://github.com/guilhermegazzinelli/conexa-ruby/compare/v0.0.6...v0.0.7
|
|
67
|
+
[0.0.6]: https://github.com/guilhermegazzinelli/conexa-ruby/compare/v0.0.5...v0.0.6
|
|
68
|
+
[0.0.5]: https://github.com/guilhermegazzinelli/conexa-ruby/releases/tag/v0.0.5
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
conexa (0.0.
|
|
4
|
+
conexa (0.0.8)
|
|
5
5
|
jwt
|
|
6
6
|
multi_json
|
|
7
7
|
rest-client
|
|
@@ -23,9 +23,7 @@ GEM
|
|
|
23
23
|
addressable (2.8.7)
|
|
24
24
|
public_suffix (>= 2.0.2, < 7.0)
|
|
25
25
|
ast (2.4.2)
|
|
26
|
-
backport (1.2.0)
|
|
27
26
|
base64 (0.2.0)
|
|
28
|
-
benchmark (0.3.0)
|
|
29
27
|
bigdecimal (3.1.8)
|
|
30
28
|
byebug (11.1.3)
|
|
31
29
|
concurrent-ruby (1.3.4)
|
|
@@ -39,14 +37,13 @@ GEM
|
|
|
39
37
|
diff-lcs (1.5.1)
|
|
40
38
|
domain_name (0.6.20240107)
|
|
41
39
|
drb (2.2.1)
|
|
42
|
-
e2mmap (0.1.0)
|
|
43
40
|
factory_bot (6.5.0)
|
|
44
41
|
activesupport (>= 5.0.0)
|
|
45
42
|
faker (3.5.1)
|
|
46
43
|
i18n (>= 1.8.11, < 2)
|
|
47
44
|
hashdiff (1.1.1)
|
|
48
45
|
http-accept (1.7.0)
|
|
49
|
-
http-cookie (1.0
|
|
46
|
+
http-cookie (1.1.0)
|
|
50
47
|
domain_name (~> 0.5)
|
|
51
48
|
i18n (1.14.6)
|
|
52
49
|
concurrent-ruby (~> 1.0)
|
|
@@ -54,26 +51,19 @@ GEM
|
|
|
54
51
|
irb (1.14.1)
|
|
55
52
|
rdoc (>= 4.0.0)
|
|
56
53
|
reline (>= 0.4.2)
|
|
57
|
-
jaro_winkler (1.6.0)
|
|
58
54
|
json (2.7.2)
|
|
59
|
-
jwt (
|
|
55
|
+
jwt (3.1.2)
|
|
60
56
|
base64
|
|
61
|
-
kramdown (2.4.0)
|
|
62
|
-
rexml
|
|
63
|
-
kramdown-parser-gfm (1.1.0)
|
|
64
|
-
kramdown (~> 2.0)
|
|
65
57
|
language_server-protocol (3.17.0.3)
|
|
66
58
|
lint_roller (1.1.0)
|
|
67
59
|
logger (1.6.1)
|
|
68
|
-
mime-types (3.
|
|
60
|
+
mime-types (3.7.0)
|
|
69
61
|
logger
|
|
70
|
-
mime-types-data (~> 3.
|
|
71
|
-
mime-types-data (3.
|
|
62
|
+
mime-types-data (~> 3.2025, >= 3.2025.0507)
|
|
63
|
+
mime-types-data (3.2026.0203)
|
|
72
64
|
minitest (5.25.1)
|
|
73
|
-
multi_json (1.
|
|
65
|
+
multi_json (1.19.1)
|
|
74
66
|
netrc (0.11.0)
|
|
75
|
-
nokogiri (1.16.7-x86_64-linux)
|
|
76
|
-
racc (~> 1.4)
|
|
77
67
|
parallel (1.26.3)
|
|
78
68
|
parser (3.3.5.0)
|
|
79
69
|
ast (~> 2.4.1)
|
|
@@ -84,7 +74,6 @@ GEM
|
|
|
84
74
|
racc (1.8.1)
|
|
85
75
|
rainbow (3.1.1)
|
|
86
76
|
rake (13.2.1)
|
|
87
|
-
rbs (2.8.4)
|
|
88
77
|
rdoc (6.7.0)
|
|
89
78
|
psych (>= 4.0.0)
|
|
90
79
|
regexp_parser (2.9.2)
|
|
@@ -95,8 +84,6 @@ GEM
|
|
|
95
84
|
http-cookie (>= 1.0.2, < 2.0)
|
|
96
85
|
mime-types (>= 1.16, < 4.0)
|
|
97
86
|
netrc (~> 0.8)
|
|
98
|
-
reverse_markdown (2.1.1)
|
|
99
|
-
nokogiri
|
|
100
87
|
rexml (3.3.8)
|
|
101
88
|
rspec (3.13.0)
|
|
102
89
|
rspec-core (~> 3.13.0)
|
|
@@ -128,22 +115,6 @@ GEM
|
|
|
128
115
|
rubocop-ast (>= 1.31.1, < 2.0)
|
|
129
116
|
ruby-progressbar (1.13.0)
|
|
130
117
|
securerandom (0.3.1)
|
|
131
|
-
solargraph (0.50.0)
|
|
132
|
-
backport (~> 1.2)
|
|
133
|
-
benchmark
|
|
134
|
-
bundler (~> 2.0)
|
|
135
|
-
diff-lcs (~> 1.4)
|
|
136
|
-
e2mmap
|
|
137
|
-
jaro_winkler (~> 1.5)
|
|
138
|
-
kramdown (~> 2.3)
|
|
139
|
-
kramdown-parser-gfm (~> 1.1)
|
|
140
|
-
parser (~> 3.0)
|
|
141
|
-
rbs (~> 2.0)
|
|
142
|
-
reverse_markdown (~> 2.0)
|
|
143
|
-
rubocop (~> 1.38)
|
|
144
|
-
thor (~> 1.0)
|
|
145
|
-
tilt (~> 2.0)
|
|
146
|
-
yard (~> 0.9, >= 0.9.24)
|
|
147
118
|
standard (1.41.1)
|
|
148
119
|
language_server-protocol (~> 3.17.0.2)
|
|
149
120
|
lint_roller (~> 1.0)
|
|
@@ -157,8 +128,6 @@ GEM
|
|
|
157
128
|
lint_roller (~> 1.1)
|
|
158
129
|
rubocop-performance (~> 1.22.0)
|
|
159
130
|
stringio (3.1.1)
|
|
160
|
-
thor (1.3.2)
|
|
161
|
-
tilt (2.4.0)
|
|
162
131
|
tzinfo (2.0.6)
|
|
163
132
|
concurrent-ruby (~> 1.0)
|
|
164
133
|
unicode-display_width (2.6.0)
|
|
@@ -168,10 +137,10 @@ GEM
|
|
|
168
137
|
addressable (>= 2.8.0)
|
|
169
138
|
crack (>= 0.3.2)
|
|
170
139
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
171
|
-
yard (0.9.37)
|
|
172
140
|
|
|
173
141
|
PLATFORMS
|
|
174
|
-
|
|
142
|
+
ruby
|
|
143
|
+
x86_64-linux-gnu
|
|
175
144
|
|
|
176
145
|
DEPENDENCIES
|
|
177
146
|
byebug
|
|
@@ -182,7 +151,6 @@ DEPENDENCIES
|
|
|
182
151
|
rake (~> 13.0)
|
|
183
152
|
rspec (~> 3.0)
|
|
184
153
|
rubocop (~> 1.21)
|
|
185
|
-
solargraph
|
|
186
154
|
standard
|
|
187
155
|
vcr
|
|
188
156
|
webmock
|