bukku_rails 0.1.0 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ed6bf94470a82481cf4506e9fa920743bbbb0b54623e964a07e41de1a78a107
4
- data.tar.gz: f8db6a422b83fb3ee350ad36f9f4ab469e9f6aaa577523175ab4f040200da021
3
+ metadata.gz: a006616b833583b37331723b5905afbb2db5d1486a43e7d737e7163aa9146db2
4
+ data.tar.gz: '08b80379615978eb56a083e2bc6bdd6d886d5e7fc3f18734e07b47af78a09f31'
5
5
  SHA512:
6
- metadata.gz: 9043be0a8e7b4c69ee501a6da75ab2ed04b560a12032ff282ab13baf8ed174417c5ab71aa6d5093e46b46107619f7b39c5423383fc5f98f8f2c037d940af1edf
7
- data.tar.gz: d05253cf61d9c6b4c8d5a8dc57bb65e652d14e8cbcdc29924672f893b5a8c1eb888363ace0d4ae534928713175bfd11762523cba13d3303e50dd1190e9eac58e
6
+ metadata.gz: 71aae60f0f3f73cac249a5596be4fac6b2e983a0bc96fc03230af12a5f2c18de534021d6908bdc13016b8ef95735acf7035ed105b94f2d2daaf9eb4a265e6b7f
7
+ data.tar.gz: 1b4bea76f7e23fd4f2b87188faa5c5285f86c31e189b9af60c7e39ebce38001f9dd9137ff72bf4fa064a7e69526efa823e30af527acf9ab231d5a13e19706ff6
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # BukkuRails
2
2
 
3
- Use Rails methods to interact with your data in [Bukku](https://bukku.my/) accounting software.
3
+ Use Rails methods to interact with your data in [Bukku](https://bukku.my/) accounting software.
4
4
 
5
- Take a look at [Bukku's API](https://developers.bukku.my) to know what data you can extract from Bukku.
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 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.
8
8
 
9
9
  ## Installation
10
10
 
@@ -14,36 +14,17 @@ Add the gen into your Gemfile like so:
14
14
 
15
15
  ## Usage
16
16
 
17
- You will need 2 things - your **subdomain** and **API Token**.
17
+ You will need 2 things - your **subdomain** and **API Token**.
18
18
 
19
- You can get these after you login into your Bukku account, Control Panel -> Integrations -> Turn ON API Access.
19
+ You can get these after you login into your Bukku account, Control Panel -> Integrations -> Turn ON API Access.
20
20
 
21
- Note: Bukku offers 2 type of access - Staging and Production. You can [email Bukku](mailto:dev@bukku.my) for a Staging account which will be great to test your Rails app if it is extracting the correct data from Bukku. Once you are satisfied you can then use access the Production server where your actual data lives.
21
+ Note: Bukku offers 2 type of access - Staging and Production. You can [email Bukku](mailto:dev@bukku.my) for a Staging account which will be a great way to test your Rails app to see if it is extracting the correct data from Bukku's staging server (exactly the same app but at their staging server). Once you are satisfied you can then use access the Production server where your actual data lives.
22
22
 
23
- **Bukku Rails** provides usage for both access. For Staging use the `BukkuTest` class and actual production simply use `Bukku` class. Then you can use any of the methods listed in the table below:
24
-
25
- ### Setup
26
- For Staging
27
- ```ruby
28
- # Initialize the client
29
- client = BukkuTest.new(
30
- token: "your_bukku_api_token",
31
- domain: "your_company_subdomain"
32
- )
33
- ```
34
-
35
- For Production
36
- ```ruby
37
- # Initialize the client
38
- client = Bukku.new(
39
- token: "your_bukku_api_token",
40
- domain: "your_company_subdomain"
41
- )
42
- ```
23
+ **Bukku Rails** provides usage for both access. For Staging use the `BukkuTest` class and actual Production simply use `Bukku` class. Then you can use any of the methods listed in the table below:
43
24
 
44
25
  ### Available Methods
45
26
 
46
- Just like in Rails the methods follow the singular and plural expression. Methods with arguments are normally plural, while methods without arguments are singular methods calls.
27
+ Just like in Rails the methods follow the singular and plural expression. Methods with arguments are normally plural, while methods without arguments are singular methods calls.
47
28
 
48
29
  #### Sales
49
30
 
@@ -114,30 +95,52 @@ Just like in Rails the methods follow the singular and plural expression. Method
114
95
 
115
96
  | HTTP Method | Ruby Method | Endpoint |
116
97
  |------------|-------------|----------|
117
- | GET | `journal_entries(**kwargs)` | `/journal_entries` |
118
- | GET | `journal_entry(id)` | `/journal_entries/:id` |
119
- | GET | `accounts` | `/accounts` |
120
- | GET | `account(id)` | `/accounts/:id` |
98
+ | GET | `get_journal_entries(**kwargs)` | `/journal_entries` |
99
+ | GET | `get_journal_entry(id)` | `/journal_entries/:id` |
100
+ | GET | `get_accounts` | `/accounts` |
101
+ | GET | `get_account(id)` | `/accounts/:id` |
121
102
 
122
103
  ### Examples
123
104
 
105
+ 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.
106
+
107
+ For Staging at <https://api.bukku.fyi>
108
+
109
+ ```ruby
110
+ client = BukkuTest.new(
111
+ token: "your_bukku_api_token",
112
+ domain: "your_company_subdomain"
113
+ )
114
+ ```
115
+
116
+ For Production at <https://api.bukku.my>
117
+
118
+ ```ruby
119
+ client = Bukku.new(
120
+ token: "your_bukku_api_token",
121
+ domain: "your_company_subdomain"
122
+ )
123
+ ```
124
+
124
125
  **Fetch all invoices:**
126
+
125
127
  ```ruby
126
128
  invoices = client.get_invoices
127
129
  ```
128
130
 
129
131
  **Fetch invoices with date filters or parameters:**
130
132
  To know more on what Query Parameters is acceptable head to [Bukku API page](https://developers.bukku.my)
133
+
131
134
  ```ruby
132
135
  invoices = client.get_invoices(date_from: "2025-11-01", date_to: "2025-11-30")
133
136
  ```
134
137
 
135
138
  **Fetch a specific invoice:**
139
+
136
140
  ```ruby
137
141
  invoice = client.get_invoice(123)
138
142
  ```
139
143
 
140
-
141
144
  ## Contributing
142
145
 
143
146
  Bug reports and pull requests are welcome on GitHub at <https://github.com/stopar/bukku_rails>.
data/lib/bukku.rb CHANGED
@@ -193,20 +193,20 @@ class Bukku < Client
193
193
 
194
194
  ## ACCOUNTING
195
195
  # Journal Entries
196
- def journal_entries(**kwargs)
196
+ def get_journal_entries(**kwargs)
197
197
  get '/journal_entries', query: kwargs
198
198
  end
199
199
 
200
- def journal_entry(id)
200
+ def get_journal_entry(id)
201
201
  get "/journal_entries/#{id}"
202
202
  end
203
203
 
204
204
  # Account
205
- def accounts
205
+ def get_accounts
206
206
  get '/accounts'
207
207
  end
208
208
 
209
- def account(id)
209
+ def get_account(id)
210
210
  get "/accounts/#{id}"
211
211
  end
212
212
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BukkuRails
4
- VERSION = "0.1.0"
4
+ VERSION = '0.1.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.1.0
4
+ version: 0.1.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: 2025-12-03 00:00:00.000000000 Z
11
+ date: 2025-12-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Use Rails conventions to call Bukku API requests.
14
14
  email: