bukku_rails 0.3.0 → 0.4.0

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: 565be27afe248599db5d33a723aaa9a5ad9c57bc25ffab1b7f8e0f9a91fb5bf5
4
- data.tar.gz: cccbcfb3e2dbdef04b6d851f9504b31f93e5c897e2a198a680a9a2f863e671c6
3
+ metadata.gz: 2b0900a75e1a3a94d686933e2afd5c22aa8d0b92e47b39ffc1ebaa4f7a2b8a93
4
+ data.tar.gz: 254fad26a47fd1e938f3934614166944345f74532cfcba2165df0d48007c3b1a
5
5
  SHA512:
6
- metadata.gz: 01d76b79443c4113cfe1bc605cffea51bf241b9d69f6a98c1b10185939164d8aa75ca39d68ab5ea53d84f63d007883109993fa4188b99a7dff7d9e08424f709f
7
- data.tar.gz: 0b017d34db3dbe0cfef610aadcf14e2e1dc7987b73aecb1ac179463000569b69fa1a3495f6663a6c68c945ade9242a6972741ee75eaaa37d04cc470d0eed5fe5
6
+ metadata.gz: eb421a6f712e9d7d57d58498fa01ee2c4d9959203d87c97db5d73d84e70f6a9170fde5632c8430248308b749494e6de44493fa705a79f44263a6229b1643bad2
7
+ data.tar.gz: ead17cee9580de8b13193b925ad054a98f0ff98fd3f74ea4d5240ae214c3e7728fb0b6bb1292f1081338869027d61d8291b2c899fe11fd4ad19c3e38077ca0af
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.4.0] - 2026-10-01
4
+
5
+ - Add Tags: `get_tags`, `get_tag(id)`, `create_tag(body:)`
6
+ - Add Tag Groups: `get_tag_groups`, `create_tag_group(body:)`
7
+
3
8
  ## [0.1.0] - 2025-12-02
4
9
 
5
10
  - Initial release
data/README.md CHANGED
@@ -87,7 +87,7 @@ Just like in Rails the methods follow the singular and plural expression. Method
87
87
  | POST | `create_bill(body:)` | `/purchases/bills` |
88
88
  | GET | `get_purchases_credit_notes(query-parameters)` | `/purchases/credit_notes` |
89
89
  | GET | `get_purchases_credit_note(id)` | `/purchases/credit_notes/:id` |
90
- | POST | `create_purchase_credit_note(body:)` | `/purchases/credit_note` |
90
+ | POST | `create_purchase_credit_note(body:)` | `/purchases/credit_notes` |
91
91
  | GET | `get_purchases_payments(query-parameters)` | `/purchases/payments` |
92
92
  | GET | `get_purchases_payment(id)` | `/purchases/payments/:id` |
93
93
  | POST | `create_purchases_payment(body:)` | `/purchases/payments` |
@@ -107,7 +107,7 @@ Just like in Rails the methods follow the singular and plural expression. Method
107
107
  | POST | `create_expense(body:)` | `/banking/expenses` |
108
108
  | GET | `get_transfers(query-parameters)` | `/banking/transfers` |
109
109
  | GET | `get_transfer(id)` | `/banking/transfers/:id` |
110
- | POST | `create_transfer(body:)` | `/banking/transfer` |
110
+ | POST | `create_transfer(body:)` | `/banking/transfers` |
111
111
 
112
112
  #### Contacts
113
113
 
@@ -144,6 +144,16 @@ Just like in Rails the methods follow the singular and plural expression. Method
144
144
  | GET | `get_account(id)` | `/accounts/:id` |
145
145
  | POST | `create_account(body:)` | `/accounts` |
146
146
 
147
+ #### Control Panel
148
+
149
+ | HTTP Method | Ruby Method | Endpoint |
150
+ |------------|-------------|----------|
151
+ | GET | `get_tags(query-parameters)` | `/tags` |
152
+ | GET | `get_tag(id)` | `/tags/:id` |
153
+ | POST | `create_tag(body:)` | `/tags` |
154
+ | GET | `get_tag_groups(query-parameters)` | `/tags/groups` |
155
+ | POST | `create_tag_group(body:)` | `/tags/groups` |
156
+
147
157
  #### Files
148
158
 
149
159
  | HTTP Method | Ruby Method | Endpoint |
@@ -154,7 +164,7 @@ Just like in Rails the methods follow the singular and plural expression. Method
154
164
 
155
165
  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.
156
166
 
157
- For Staging at <https://api.bukku.fyi>
167
+ For Staging at <https://api.staging.bukku.dev>
158
168
 
159
169
  ```ruby
160
170
  client = BukkuTest.new(
@@ -203,6 +213,17 @@ body = {
203
213
  contact = client.create_contact(body: body)
204
214
  ```
205
215
 
216
+ **Creating a tag:**
217
+ Every tag belongs to a tag group, so create (or look up) the group first.
218
+
219
+ ```ruby
220
+ group = client.create_tag_group(body: { name: "Branch" })
221
+ tag = client.create_tag(body: { name: "Kuala Lumpur", tag_group_id: group["tag_group"]["id"] })
222
+
223
+ # Existing groups, each with its tags under "children"
224
+ client.get_tag_groups
225
+ ```
226
+
206
227
  **File upload:**
207
228
 
208
229
  ```ruby
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/credit_note', body: body
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/transfer', body: body
217
+ post '/banking/transfers', body: body
218
218
  end
219
219
 
220
220
  ## CONTACT
@@ -307,6 +307,29 @@ class Bukku < Client
307
307
  post '/accounts', body: body
308
308
  end
309
309
 
310
+ ## CONTROL PANEL
311
+ # Tags
312
+ def get_tags(**kwargs)
313
+ get '/tags', query: kwargs
314
+ end
315
+
316
+ def get_tag(id)
317
+ get "/tags/#{id}"
318
+ end
319
+
320
+ def create_tag(body:)
321
+ post '/tags', body: body
322
+ end
323
+
324
+ # Tag Groups
325
+ def get_tag_groups(**kwargs)
326
+ get '/tags/groups', query: kwargs
327
+ end
328
+
329
+ def create_tag_group(body:)
330
+ post '/tags/groups', body: body
331
+ end
332
+
310
333
  # Files
311
334
  def upload_file(file_data:, filename:, mime_type:)
312
335
  upload '/files', file_data: file_data, filename: filename, mime_type: mime_type
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BukkuRails
4
- VERSION = '0.3.0'
4
+ VERSION = '0.4.0'
5
5
  end
data/lib/bukku_test.rb CHANGED
@@ -148,7 +148,7 @@ class BukkuTest < Client
148
148
  end
149
149
 
150
150
  def create_purchase_credit_note(body:)
151
- post '/purchases/credit_note', body: body
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/transfer', body: body
217
+ post '/banking/transfers', body: body
218
218
  end
219
219
 
220
220
  ## CONTACT
@@ -307,6 +307,29 @@ class BukkuTest < Client
307
307
  post '/accounts', body: body
308
308
  end
309
309
 
310
+ ## CONTROL PANEL
311
+ # Tags
312
+ def get_tags(**kwargs)
313
+ get '/tags', query: kwargs
314
+ end
315
+
316
+ def get_tag(id)
317
+ get "/tags/#{id}"
318
+ end
319
+
320
+ def create_tag(body:)
321
+ post '/tags', body: body
322
+ end
323
+
324
+ # Tag Groups
325
+ def get_tag_groups(**kwargs)
326
+ get '/tags/groups', query: kwargs
327
+ end
328
+
329
+ def create_tag_group(body:)
330
+ post '/tags/groups', body: body
331
+ end
332
+
310
333
  # Files
311
334
  def upload_file(file_data:, filename:, mime_type:)
312
335
  upload '/files', file_data: file_data, filename: filename, mime_type: mime_type
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.3.0
4
+ version: 0.4.0
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-05-12 00:00:00.000000000 Z
11
+ date: 2026-10-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Use Rails conventions to call Bukku API requests.
14
14
  email: