bukku_rails 0.2.2 → 0.3.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 +4 -4
- data/README.md +8 -6
- data/lib/bukku.rb +2 -2
- data/lib/bukku_rails/version.rb +1 -1
- data/lib/bukku_test.rb +3 -3
- data/lib/client.rb +3 -2
- 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: 36d08d91675a4c29f50674fb3116b717ec5f9a9f605d11823b1c851fb78a15e9
|
|
4
|
+
data.tar.gz: 3de8d96557a0de06fb5c32aa9acbbf2481950503269444374a65efed7bd08c72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f23d58a50ee544681bfc961fa195d7706312cdd88bc9a08dd0b151208d78ac0e4ed6ff7c319de2f1810c07533befee1afd587d64861ae1035b07b8ccee5456c
|
|
7
|
+
data.tar.gz: caaee0c21c1003d44e83ea6a15953145bfe196fea59e79eae6ec0be0d0c0956a150267e6e67f5687180f3308cb9b3d1e1ba68c9d90d0e14a5ed938fb679af44f
|
data/README.md
CHANGED
|
@@ -36,13 +36,15 @@ Note: Bukku offers 2 type of access:
|
|
|
36
36
|
|
|
37
37
|
**Bukku Rails** provides usage for both access, under 2 different classes:
|
|
38
38
|
|
|
39
|
-
1. *Staging* use the `BukkuTest` class, like so
|
|
39
|
+
1. *Staging* use the `BukkuTest` class, like so
|
|
40
|
+
`client = BukkuTest.new(domain: "sub-domain", token: "api-token-from-bukku-fyi")`
|
|
40
41
|
|
|
41
|
-
2. *Production* use `Bukku` class, like so
|
|
42
|
+
2. *Production* use `Bukku` class, like so
|
|
43
|
+
`client = Bukku.new(domain: "sub-domain", token: "api-token-from-bukku-my")`
|
|
42
44
|
|
|
43
45
|
### Available Methods
|
|
44
46
|
|
|
45
|
-
Just like in Rails the methods follow the singular and plural expression. Methods
|
|
47
|
+
Just like in Rails the methods follow the singular and plural expression. Methods that might return multiple records are plural expression methods. While methods that returns or create a single records are singular methods. So be careful where you put your ***s***'s 😁
|
|
46
48
|
|
|
47
49
|
#### Sales
|
|
48
50
|
|
|
@@ -85,7 +87,7 @@ Just like in Rails the methods follow the singular and plural expression. Method
|
|
|
85
87
|
| POST | `create_bill(body:)` | `/purchases/bills` |
|
|
86
88
|
| GET | `get_purchases_credit_notes(query-parameters)` | `/purchases/credit_notes` |
|
|
87
89
|
| GET | `get_purchases_credit_note(id)` | `/purchases/credit_notes/:id` |
|
|
88
|
-
| POST | `create_purchase_credit_note(body:)` | `/purchases/
|
|
90
|
+
| POST | `create_purchase_credit_note(body:)` | `/purchases/credit_notes` |
|
|
89
91
|
| GET | `get_purchases_payments(query-parameters)` | `/purchases/payments` |
|
|
90
92
|
| GET | `get_purchases_payment(id)` | `/purchases/payments/:id` |
|
|
91
93
|
| POST | `create_purchases_payment(body:)` | `/purchases/payments` |
|
|
@@ -105,7 +107,7 @@ Just like in Rails the methods follow the singular and plural expression. Method
|
|
|
105
107
|
| POST | `create_expense(body:)` | `/banking/expenses` |
|
|
106
108
|
| GET | `get_transfers(query-parameters)` | `/banking/transfers` |
|
|
107
109
|
| GET | `get_transfer(id)` | `/banking/transfers/:id` |
|
|
108
|
-
| POST | `create_transfer(body:)` | `/banking/
|
|
110
|
+
| POST | `create_transfer(body:)` | `/banking/transfers` |
|
|
109
111
|
|
|
110
112
|
#### Contacts
|
|
111
113
|
|
|
@@ -152,7 +154,7 @@ Just like in Rails the methods follow the singular and plural expression. Method
|
|
|
152
154
|
|
|
153
155
|
To use the gem you will need to initialize a client first. Either choose a Bukku's Staging or Production server to test your app.
|
|
154
156
|
|
|
155
|
-
For Staging at <https://api.bukku.
|
|
157
|
+
For Staging at <https://api.staging.bukku.dev>
|
|
156
158
|
|
|
157
159
|
```ruby
|
|
158
160
|
client = BukkuTest.new(
|
data/lib/bukku.rb
CHANGED
|
@@ -148,7 +148,7 @@ class Bukku < Client
|
|
|
148
148
|
end
|
|
149
149
|
|
|
150
150
|
def create_purchase_credit_note(body:)
|
|
151
|
-
post '/purchases/
|
|
151
|
+
post '/purchases/credit_notes', body: body
|
|
152
152
|
end
|
|
153
153
|
|
|
154
154
|
# Payment
|
|
@@ -214,7 +214,7 @@ class Bukku < Client
|
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
def create_transfer(body:)
|
|
217
|
-
post '/banking/
|
|
217
|
+
post '/banking/transfers', body: body
|
|
218
218
|
end
|
|
219
219
|
|
|
220
220
|
## CONTACT
|
data/lib/bukku_rails/version.rb
CHANGED
data/lib/bukku_test.rb
CHANGED
|
@@ -4,7 +4,7 @@ class BukkuTest < Client
|
|
|
4
4
|
# respond = access.<method>
|
|
5
5
|
|
|
6
6
|
# Testing URL
|
|
7
|
-
BASE_URI = 'https://api.bukku.
|
|
7
|
+
BASE_URI = 'https://api.staging.bukku.dev'
|
|
8
8
|
|
|
9
9
|
## SALES
|
|
10
10
|
# Quotation
|
|
@@ -148,7 +148,7 @@ class BukkuTest < Client
|
|
|
148
148
|
end
|
|
149
149
|
|
|
150
150
|
def create_purchase_credit_note(body:)
|
|
151
|
-
post '/purchases/
|
|
151
|
+
post '/purchases/credit_notes', body: body
|
|
152
152
|
end
|
|
153
153
|
|
|
154
154
|
# Payment
|
|
@@ -214,7 +214,7 @@ class BukkuTest < Client
|
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
def create_transfer(body:)
|
|
217
|
-
post '/banking/
|
|
217
|
+
post '/banking/transfers', body: body
|
|
218
218
|
end
|
|
219
219
|
|
|
220
220
|
## CONTACT
|
data/lib/client.rb
CHANGED
|
@@ -49,7 +49,7 @@ class Client
|
|
|
49
49
|
http.use_ssl = uri.instance_of?(URI::HTTPS)
|
|
50
50
|
|
|
51
51
|
# Add the 2 lines below because development keeps on failing SSL CRL checks
|
|
52
|
-
# Check this article for explanation:
|
|
52
|
+
# Check this article for explanation:
|
|
53
53
|
# https://dev.to/madhuhari188/how-we-solved-unable-to-get-certificate-crl-in-rails-a-debugging-story-2pna
|
|
54
54
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
|
55
55
|
http.verify_callback = ->(_preverify_ok, _store_ctx) { true }
|
|
@@ -58,7 +58,7 @@ class Client
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def make_request(klass, path, query: {}, body: {})
|
|
61
|
-
# Uncomment below for debuging purpose to see
|
|
61
|
+
# Uncomment below for debuging purpose to see payload that was sent.
|
|
62
62
|
# build_http(uri).set_debug_output($stdout)
|
|
63
63
|
|
|
64
64
|
uri = URI("#{base_uri}#{path}")
|
|
@@ -90,5 +90,6 @@ class Client
|
|
|
90
90
|
raise Error, "#{response.code}: #{response.body}"
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
|
+
|
|
93
94
|
class Error < StandardError; end
|
|
94
95
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bukku_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Muzaffar Ariff
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Use Rails conventions to call Bukku API requests.
|
|
14
14
|
email:
|