bukku_rails 0.2.1 → 0.2.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +57 -3
  3. data/lib/bukku_rails/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c67f4ffcd9e8bb2bba1d68c241003ba09ade70e0e7b5006a01373d047b4cf5e9
4
- data.tar.gz: aa4ae29f71918a76fcdab8ac286752dd5b8f4ad9ae79fb4089b2da95c5f5e4bf
3
+ metadata.gz: ae7834af9fb6e0e658c7983ec8470965dd05895d5e9fb812287abf2138b7cf0b
4
+ data.tar.gz: 372206b437586da2dc52d54ecf05c9c3e20df6129115551bb5d537c6fa2ba121
5
5
  SHA512:
6
- metadata.gz: cacbd80c9079264a39ac0426777de2d9110e974599768585685066f6cc04e2acec4fb371562b49759d6ff91385d91f3f05132b96c2b3580139aa69782dc1a868
7
- data.tar.gz: 034b19b90d92d54f5f6361b8ba977b39a4c00d5a727fcb970e2cab6191fda237f87d9d29513bea1f51a5d976d053c676a21721643429a820b7e646af0064c922
6
+ metadata.gz: 34272757719187e556d86f660a2079ea01b2727740fefa86dad212189f0e58557238d141e6ecb8e27dbe4d15665ae83b5210cca645788a7a9263c7bf109a4716
7
+ data.tar.gz: 2439395811ac766fe33cac66a6c7632c50fadea7f50322f477510c415847ec8653e075aa9dbb75a5d9afaae1bd57d8254da30e9e577bc41c43aa69d62c0cfca3
data/README.md CHANGED
@@ -4,7 +4,7 @@ Use Rails methods to interact with your data in [Bukku](https://bukku.my/) accou
4
4
 
5
5
  Take a look at [Bukku's API](https://developers.bukku.my) to know what data you can extract from Bukku.
6
6
 
7
- > As of December 2, 2025, the gem only handles **GET** request. If you require other request, fork the gem and write it and then send us a Pull Request.
7
+ > As of February 2026, the gem handles **GET**, **POST**, and **file upload** requests.
8
8
 
9
9
  ## Installation
10
10
 
@@ -50,18 +50,25 @@ Just like in Rails the methods follow the singular and plural expression. Method
50
50
  |------------|-------------|----------|
51
51
  | GET | `get_sales_quotes(query-parameters)` | `/sales/quotes` |
52
52
  | GET | `get_sales_quote(id)` | `/sales/quotes/:id` |
53
+ | POST | `create_quote(body:)` | `/sales/quotes` |
53
54
  | GET | `get_sales_orders(query-parameters)` | `/sales/orders` |
54
55
  | GET | `get_sales_order(id)` | `/sales/orders/:id` |
56
+ | POST | `create_sales_order(body:)` | `/sales/orders` |
55
57
  | GET | `get_delivery_orders(query-parameters)` | `/sales/delivery_orders` |
56
58
  | GET | `get_delivery_order(id)` | `/sales/delivery_orders/:id` |
59
+ | POST | `create_delivery_order(body:)` | `/sales/delivery_orders` |
57
60
  | GET | `get_invoices(query-parameters)` | `/sales/invoices` |
58
61
  | GET | `get_invoice(id)` | `/sales/invoices/:id` |
62
+ | POST | `create_invoice(body:)` | `/sales/invoices` |
59
63
  | GET | `get_sales_credit_notes(query-parameters)` | `/sales/credit_notes` |
60
64
  | GET | `get_sales_credit_note(id)` | `/sales/credit_notes/:id` |
65
+ | POST | `create_credit_note(body:)` | `/sales/credit_notes` |
61
66
  | GET | `get_sales_payments(query-parameters)` | `/sales/payments` |
62
67
  | GET | `get_sales_payment(id)` | `/sales/payments/:id` |
68
+ | POST | `create_payment(body:)` | `/sales/payments` |
63
69
  | GET | `get_sales_refunds(query-parameters)` | `/sales/refunds` |
64
70
  | GET | `get_sales_refund(id)` | `/sales/refunds/:id` |
71
+ | POST | `create_refund(body:)` | `/sales/refunds` |
65
72
 
66
73
  #### Purchases
67
74
 
@@ -69,16 +76,22 @@ Just like in Rails the methods follow the singular and plural expression. Method
69
76
  |------------|-------------|----------|
70
77
  | GET | `get_purchase_orders(query-parameters)` | `/purchases/orders` |
71
78
  | GET | `get_purchase_order(id)` | `/purchases/orders/:id` |
79
+ | POST | `create_purchase_order(body:)` | `/purchases/orders` |
72
80
  | GET | `get_received_notes(query-parameters)` | `/purchases/goods_received_notes` |
73
81
  | GET | `get_received_note(id)` | `/purchases/goods_received_notes/:id` |
82
+ | POST | `create_received_note(body:)` | `/purchases/goods_received_notes` |
74
83
  | GET | `get_bills(query-parameters)` | `/purchases/bills` |
75
84
  | GET | `get_bill(id)` | `/purchases/bills/:id` |
85
+ | POST | `create_bill(body:)` | `/purchases/bills` |
76
86
  | GET | `get_purchases_credit_notes(query-parameters)` | `/purchases/credit_notes` |
77
87
  | GET | `get_purchases_credit_note(id)` | `/purchases/credit_notes/:id` |
88
+ | POST | `create_purchase_credit_note(body:)` | `/purchases/credit_note` |
78
89
  | GET | `get_purchases_payments(query-parameters)` | `/purchases/payments` |
79
- | GET | `get_purchases_payments(id)` | `/purchases/payments/:id` |
90
+ | GET | `get_purchases_payment(id)` | `/purchases/payments/:id` |
91
+ | POST | `create_purchases_payment(body:)` | `/purchases/payments` |
80
92
  | GET | `get_purchases_refunds(query-parameters)` | `/purchases/refunds` |
81
93
  | GET | `get_purchases_refund(id)` | `/purchases/refunds/:id` |
94
+ | POST | `create_purchases_refund(body:)` | `/purchases/refunds` |
82
95
 
83
96
  #### Banking
84
97
 
@@ -86,10 +99,13 @@ Just like in Rails the methods follow the singular and plural expression. Method
86
99
  |------------|-------------|----------|
87
100
  | GET | `get_banking_incomes(query-parameters)` | `/banking/incomes` |
88
101
  | GET | `get_banking_income(id)` | `/banking/incomes/:id` |
102
+ | POST | `create_banking_income(body:)` | `/banking/incomes` |
89
103
  | GET | `get_banking_expenses(query-parameters)` | `/banking/expenses` |
90
104
  | GET | `get_banking_expense(id)` | `/banking/expenses/:id` |
105
+ | POST | `create_expense(body:)` | `/banking/expenses` |
91
106
  | GET | `get_transfers(query-parameters)` | `/banking/transfers` |
92
107
  | GET | `get_transfer(id)` | `/banking/transfers/:id` |
108
+ | POST | `create_transfer(body:)` | `/banking/transfer` |
93
109
 
94
110
  #### Contacts
95
111
 
@@ -97,8 +113,10 @@ Just like in Rails the methods follow the singular and plural expression. Method
97
113
  |------------|-------------|----------|
98
114
  | GET | `get_contacts(query-parameters)` | `/contacts` |
99
115
  | GET | `get_contact(id)` | `/contacts/:id` |
116
+ | POST | `create_contact(body:)` | `/contacts` |
100
117
  | GET | `get_contact_groups(query-parameters)` | `/contacts/groups` |
101
118
  | GET | `get_contact_group(id)` | `/contacts/groups/:id` |
119
+ | POST | `create_group(body:)` | `/contacts/groups` |
102
120
 
103
121
  #### Products
104
122
 
@@ -106,8 +124,12 @@ Just like in Rails the methods follow the singular and plural expression. Method
106
124
  |------------|-------------|----------|
107
125
  | GET | `get_products(query-parameters)` | `/products` |
108
126
  | GET | `get_product(id)` | `/products/:id` |
127
+ | POST | `create_product(body:)` | `/products` |
128
+ | GET | `get_bundle(id)` | `/products/bundles/:id` |
129
+ | POST | `create_bundle(body:)` | `/products/bundles` |
109
130
  | GET | `get_product_groups(query-parameters)` | `/products/groups` |
110
131
  | GET | `get_product_group(id)` | `/products/groups/:id` |
132
+ | POST | `create_product_group(body:)` | `/products/groups` |
111
133
 
112
134
  #### Accounting
113
135
 
@@ -115,8 +137,16 @@ Just like in Rails the methods follow the singular and plural expression. Method
115
137
  |------------|-------------|----------|
116
138
  | GET | `get_journal_entries(query-parameters)` | `/journal_entries` |
117
139
  | GET | `get_journal_entry(id)` | `/journal_entries/:id` |
140
+ | POST | `create_journal_entry(body:)` | `/journal_entries` |
118
141
  | GET | `get_accounts(query-parameters)` | `/accounts` |
119
142
  | GET | `get_account(id)` | `/accounts/:id` |
143
+ | POST | `create_account(body:)` | `/accounts` |
144
+
145
+ #### Files
146
+
147
+ | HTTP Method | Ruby Method | Endpoint |
148
+ |------------|-------------|----------|
149
+ | POST | `upload_file(file_data:, filename:, mime_type:)` | `/files` |
120
150
 
121
151
  ### Examples
122
152
 
@@ -159,10 +189,34 @@ invoices = client.get_invoices(date_from: "2025-11-01", date_to: "2025-11-30")
159
189
  invoice = client.get_invoice(123)
160
190
  ```
161
191
 
192
+ **Creating a new contact (or supplier)**:
193
+
194
+ ```ruby
195
+ body = {
196
+ entity_type: "MALAYSIAN_COMPANY",
197
+ legal_name: invoice.supplier_name,
198
+ types: ["supplier"]
199
+ }
200
+
201
+ contact = client.create_contact(body: body)
202
+ ```
203
+
204
+ **File upload:**
205
+
206
+ ```ruby
207
+
208
+ file_data = File.read("invoice.pdf")
209
+ filename = "invoice.pdf"
210
+ mime_type = "application/pdf"
211
+
212
+ client.upload_file(file_data: file_data, filename: filename, mime_type: mime_type)
213
+
214
+ ```
215
+
162
216
  ## Contributing
163
217
 
164
218
  Bug reports and pull requests are welcome on GitHub at <https://github.com/stopar/bukku_rails>.
165
219
 
166
220
  ## License
167
221
 
168
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
222
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BukkuRails
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  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.2.1
4
+ version: 0.2.2
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-02-26 00:00:00.000000000 Z
11
+ date: 2026-02-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Use Rails conventions to call Bukku API requests.
14
14
  email: