ezpay-invoice 0.0.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.
Files changed (37) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +3 -0
  4. data/Gemfile +9 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +381 -0
  7. data/Rakefile +6 -0
  8. data/bin/console +14 -0
  9. data/bin/setup +8 -0
  10. data/ezpay-invoice.gemspec +34 -0
  11. data/lib/ezpay-invoice/api/endpoints/allowance_invalid.rb +14 -0
  12. data/lib/ezpay-invoice/api/endpoints/allowance_issue.rb +14 -0
  13. data/lib/ezpay-invoice/api/endpoints/allowance_touch_issue.rb +14 -0
  14. data/lib/ezpay-invoice/api/endpoints/invoice_invalid.rb +14 -0
  15. data/lib/ezpay-invoice/api/endpoints/invoice_issue.rb +14 -0
  16. data/lib/ezpay-invoice/api/endpoints/invoice_search.rb +14 -0
  17. data/lib/ezpay-invoice/api/endpoints/invoice_touch_issue.rb +14 -0
  18. data/lib/ezpay-invoice/api/payloads/allowance_invalid.rb +11 -0
  19. data/lib/ezpay-invoice/api/payloads/allowance_issue.rb +23 -0
  20. data/lib/ezpay-invoice/api/payloads/allowance_touch_issue.rb +13 -0
  21. data/lib/ezpay-invoice/api/payloads/base.rb +13 -0
  22. data/lib/ezpay-invoice/api/payloads/invoice_invalid.rb +11 -0
  23. data/lib/ezpay-invoice/api/payloads/invoice_issue.rb +40 -0
  24. data/lib/ezpay-invoice/api/payloads/invoice_search.rb +15 -0
  25. data/lib/ezpay-invoice/api/payloads/invoice_touch_issue.rb +13 -0
  26. data/lib/ezpay-invoice/api/payloads.rb +8 -0
  27. data/lib/ezpay-invoice/api/properties/general.rb +14 -0
  28. data/lib/ezpay-invoice/api/properties/item.rb +42 -0
  29. data/lib/ezpay-invoice/api/properties.rb +2 -0
  30. data/lib/ezpay-invoice/client.rb +31 -0
  31. data/lib/ezpay-invoice/configurable.rb +35 -0
  32. data/lib/ezpay-invoice/exceptions.rb +13 -0
  33. data/lib/ezpay-invoice/request.rb +43 -0
  34. data/lib/ezpay-invoice/response.rb +37 -0
  35. data/lib/ezpay-invoice/version.rb +3 -0
  36. data/lib/ezpay-invoice.rb +10 -0
  37. metadata +143 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ec555b48c041b0df2d4a9907a5e6e737773963ac930c167200b25f76840e9539
4
+ data.tar.gz: 95972e938fd6ad07a0e1ea1c4f7b1dd3672e251f958650abdd6392e27689a49e
5
+ SHA512:
6
+ metadata.gz: 6b48f13eb270a8591e0b784b0991559625407f187fabeadc56bbce816f7b8a097ec458f2a28486f9dd125a0d45c2bb1f23e5bb6ad7bc02d1938e01ccaff238e3
7
+ data.tar.gz: c6a27d77b81fc795e7f7b8074fbf7ee20e18fb39d32969efb2ec3cd331eb52fe02a38011edfee3de263c538f5f06833076b504f845f2c28fde0e4a56577b86db
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ Gemfile.lock
10
+ *.gem
11
+
12
+ # rspec failure tracking
13
+ .rspec_status
14
+ .byebug_history
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in ezpay-invoice-sdk.gemspec
4
+ gemspec
5
+
6
+ gem "rake", "~> 12.0"
7
+ gem "rspec", "~> 3.0"
8
+
9
+ gem "byebug", "~> 11.1", :groups => [:development, :test]
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Whyayen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,381 @@
1
+ # Ezpay Invoice SDK (Unofficial)
2
+ Ruby SDK for Ezpay Invoice.
3
+
4
+ ## Table of Contents
5
+ - [Installation](#installation)
6
+ - [Usage](#usage)
7
+ - [Configuration](#configuration)
8
+ - [Global](#global)
9
+ - [Individual](#individual)
10
+ - [Must Know](#must-know)
11
+ - [Invoice Issue](#invoice-issue)
12
+ - [Invoice Touch Issue](#invoice-touch-issue)
13
+ - [Invoice Invalid](#invoice-invalid)
14
+ - [Allowance Issue](#allowance-issue)
15
+ - [Allowance Touch Issue](#allowance-touch-issue)
16
+ - [Allowance Invalid](#allowance-invalid)
17
+ - [Invoice Search](#invoice-search)
18
+ - [Ezpay Error](#ezpay-error)
19
+ - [Development](#development)
20
+ - [Contributing](#contributing)
21
+ - [License](#license)
22
+
23
+
24
+ ## Installation
25
+
26
+ Add this line to your application's Gemfile:
27
+
28
+ ```ruby
29
+ gem 'ezpay-invoice-sdk'
30
+ ```
31
+
32
+ And then execute:
33
+
34
+ $ bundle install
35
+
36
+ Or install it yourself as:
37
+
38
+ $ gem install ezpay-invoice-sdk
39
+
40
+ Access the library in Ruby:
41
+ ```ruby
42
+ require 'ezpay-invoice-sdk'
43
+ ```
44
+
45
+ ## Usage
46
+
47
+ ### Configuration
48
+ 使用前需先設定商店相關資料
49
+ | 欄位 | 型別 | 用途 | 預設 | 必填 |
50
+ | :--- | :--- | :--- | :--- | :---: |
51
+ | merchant_id | String | 商店代號 | nil | ✔️ |
52
+ | hash_key | String | API串接金鑰 Hash Key | nil | ✔️ |
53
+ | hash_iv | String | API串接金鑰 Hash IV | nil | ✔️ |
54
+ | mode | String | 測試環境或正式環境 | dev | |
55
+
56
+ 請注意:預設的環境為 **測試環境**,**如果要使用正式環境開立發票**,請將 `mode` 設定為 `prod`。
57
+
58
+ Ezpay 後台
59
+ - [測試環境](https://cinv.ezpay.com.tw/)
60
+ - [正式環境](https://inv.ezpay.com.tw/)
61
+
62
+ 此 SDK 目前僅實作電子發票開立、作廢、折讓、作廢折讓、查詢發票,並無字軌相關功能。
63
+
64
+ 詳細操作請參考 Ezpay 電子發票技術串接手冊
65
+ https://inv.ezpay.com.tw/dw_files/info_api/EZP_INVI_1_2_1.pdf
66
+
67
+ #### Global
68
+ 可以直接透過 `EzpayInvoice.setup` 設定商店資料,後面進行操作時預設會使用 `EzpayInvoice.config` 的設定進行 Ezpay 的操作
69
+
70
+ ```ruby
71
+ EzpayInvoice.setup do |config|
72
+ config.merchant_id = 'your_merchant_id'
73
+ config.hash_key = 'your_hash_key'
74
+ config.hash_iv = 'your_hash_iv'
75
+ config.mode = 'dev' # or prod, default value is dev
76
+ end
77
+ ```
78
+
79
+ Rails 的使用者可以建立一個 `config/initializers/ezpay_invoice.rb` 檔案,並進行設定:
80
+ ```ruby
81
+ EzpayInvoice.setup do |config|
82
+ config.merchant_id = 'merchant_id_from_yml_or_credential'
83
+ config.hash_key = 'your_hash_key_from_yml_or_credential'
84
+ config.hash_iv = 'your_hash_iv_from_yml_or_credential'
85
+ config.mode = Rails.env == 'production' ? 'prod' : 'dev'
86
+ end
87
+ ```
88
+
89
+ #### Individual
90
+ 如果同時有數家商店要各別開立發票的情況,可以通過建立 Client 時才設定商店資料
91
+
92
+ ```ruby
93
+ store1 = EzpayInvoice::Client.new({
94
+ merchant_id: 'your_merchant_id',
95
+ hash_key: 'your_hash_key',
96
+ hash_iv: 'your_hash_iv',
97
+ mode: 'prod' # default value is dev
98
+ })
99
+
100
+ store2 = EzpayInvoice::Client.new({
101
+ merchant_id: 'your_merchant_id2',
102
+ hash_key: 'your_hash_key2',
103
+ hash_iv: 'your_hash_iv2',
104
+ mode: 'prod' # default value is dev
105
+ })
106
+
107
+ # store1.invoice_issue({...}) 使用 store1 Client 進行開立發票
108
+ # store2.invoice_issue({...}) 使用 store2 Client 進行開立發票
109
+ ```
110
+
111
+ ### Must Know
112
+ 欄位皆與手冊上相同,差別在於 naming case 統一是 snake case,另外 item 相關欄位(`item_amt`, `item_name`)等會變成 Array 形態,在 SDK invoke API 時會自動轉換為字串並以 `|` 隔開各筆資料。
113
+
114
+ 建議搭配[官方手冊](https://inv.ezpay.com.tw/dw_files/info_api/EZP_INVI_1_2_1.pdf)看,`RespondType`、`Version`、`TimeStamp` 會預設帶入值,其餘欄位皆與手冊相同,SDK 並未自動預設帶入。
115
+
116
+ 非定義的欄位,自行填入會遭到忽略,例如:
117
+ ```ruby
118
+ client.issue_invoice({ a: 'x' })
119
+ ```
120
+ 此時 `a` 欄位並不會被送到 API,因此如果 API 改版,有新增或修改欄位時,就需要更新此 package 所定義的欄位。
121
+
122
+ 另外 `response.result` 會返回 `check_code` 欄位用以驗證 Response 是否為 Ezpay 回傳的資料,SDK 不會幫你做驗證,因為在一些方法缺乏欄位進行驗證,需自行驗證,驗證方式請參考手冊附件二。
123
+
124
+ ### Invoice Issue
125
+ `invoice_issue` 開立電子發票方法
126
+
127
+ | 欄位 | 型別 | 用途 | 預設 | 必填 |
128
+ | :--- | :--- | :--- | :--- | :---: |
129
+ | timestamp | Integer | 時間戳 | Time.now.to_i | |
130
+ | trans_num | String | ezPay 平台交易序號 | nil | |
131
+ | merchant_order_no | String | 自訂編號 | nil | ✔️ |
132
+ | status | String | 開立發票方式 | nil | ✔️ |
133
+ | create_status_time | Date | 預計開立日期 | nil | |
134
+ | category | String | 發票種類 | nil | ✔️ |
135
+ | buyer_name | String | 買受人名稱 | nil | ✔️ |
136
+ | buyer_ubn | String | 買受人統一編號 | nil | |
137
+ | buyer_address | String | 買受人地址 | nil | |
138
+ | buyer_email | String | 買受人電子信箱 | nil | |
139
+ | carrier_type | String | 載具類別 | nil | |
140
+ | carrier_num | String | 載具編號 | nil | |
141
+ | love_code | Integer | 捐贈碼 | nil | |
142
+ | print_flag | String | 索取紙本發票 | nil | ✔️ |
143
+ | kiosk_print_flag | String | 是否開放至合作超商 Kiosk 列印 | nil | |
144
+ | tax_type | String | 課稅別 | nil | ✔️ |
145
+ | tax_rate | Float | 稅率 | nil | ✔️ |
146
+ | customs_clearance | String | 報關標記 | nil | |
147
+ | amt | Integer | 銷售額合計 | nil | ✔️ |
148
+ | amt_sales | Integer | 銷售額 (課稅別應稅) | nil | |
149
+ | amt_zero | Integer | 銷售額 (課稅別零稅率) | nil | |
150
+ | amt_free | Integer | 銷售額 (課稅別免稅) | nil | |
151
+ | tax_amt | Integer | 稅額 | nil | ✔️ |
152
+ | total_amt | Integer | 發票金額 | nil | ✔️ |
153
+ | item_name | String Array | 商品名稱 | nil | ✔️ |
154
+ | item_count | Integer Array | 商品數量 | nil | ✔️ |
155
+ | item_unit | String Array | 商品單位 | nil | ✔️ |
156
+ | item_price | Integer Array | 商品單價 | nil | ✔️ |
157
+ | item_amt | Integer Array | 商品小計 | nil | ✔️ |
158
+ | item_tax_type | Integer Array | 商品課稅別 | nil | |
159
+ | comment | String | 備註 | nil | |
160
+
161
+ 使用範例
162
+ ```ruby
163
+ client = EzpayInvoice::Client.new
164
+ payload = {
165
+ merchant_order_no: 'G20220101012',
166
+ status: '1',
167
+ category: 'B2B',
168
+ buyer_name: '好人好事代表公司',
169
+ buyer_ubn: '11223344',
170
+ buyer_email: 'your_buyer@email.com',
171
+ print_flag: 'Y',
172
+ tax_type: '1',
173
+ tax_rate: 5,
174
+ amt: 8000,
175
+ tax_amt: 400,
176
+ total_amt: 8400,
177
+ item_name: ['廣告費', '商務車租賃'],
178
+ item_count: [1, 2],
179
+ item_unit: ['筆', '小時'],
180
+ item_price: [5000, 1500],
181
+ item_amt: [5000, 3000],
182
+ item_tax_type: [1, 1]
183
+ }
184
+ response = client.invoice_issue(payload)
185
+ response.status # => "SUCCESS"
186
+ response.message # => "發票開立成功"
187
+ response.result
188
+ # => {"check_code"=>"ABCS***********3", "merchant_id"=>"3******2", "merchant_order_no"=>"G20220101013", "invoice_number"=>"ZH10000009", "total_amt"=>8400, "invoice_trans_no"=>"22011614342665747", "random_num"=>"8198", "create_time"=>"2022-01-16 14:34:26", "bar_code"=>"11102ZH100000098198", "q_rcode_l"=>"ZH100000091110116819800001f40000020d01122334461385956p+gqDeGDbLTQM4XuD4sEvQ==:**********:2:2:1:廣告費:1:5000:商務車租賃:2:1500", "q_rcode_r"=>"**"}
189
+ ```
190
+
191
+ 如果過程中 Ezpay 有返回錯誤代碼,則會直接 `raise EzpayResponseError`,請參考 [Ezpay Error](#ezpay-error) 進行處理
192
+
193
+ ### Invoice Touch Issue
194
+ `invoice_touch_issue` 立即觸發等待開立、預約自動開立的發票
195
+
196
+ | 欄位 | 型別 | 用途 | 預設 | 必填 |
197
+ | :--- | :--- | :--- | :--- | :---: |
198
+ | timestamp | Integer | 時間戳 | Time.now.to_i | |
199
+ | trans_num | String | ezPay 平台交易序號 | nil | |
200
+ | invoice_trans_no | String | ezPay 電子發票開立序號 | nil | ✔️ |
201
+ | merchant_order_no | String | 自訂編號 | nil | ✔️ |
202
+ | total_amt | Integer | 發票金額 | nil | ✔️ |
203
+
204
+ 使用範例
205
+ ```ruby
206
+ payload = {
207
+ merchant_order_no: 'G20220101012',
208
+ invoice_trans_no: '22011614342665747',
209
+ total_amt: 8400
210
+ }
211
+ response = client.invoice_touch_issue(payload)
212
+ response.result
213
+ ```
214
+
215
+ ### Invoice Invalid
216
+ `invoice_valid` 作廢發票
217
+
218
+ | 欄位 | 型別 | 用途 | 預設 | 必填 |
219
+ | :--- | :--- | :--- | :--- | :---: |
220
+ | timestamp | Integer | 時間戳 | Time.now.to_i | |
221
+ | invoice_number | String | 發票號碼 | nil | ✔️ |
222
+ | invalid_reason | String | 作廢原因 | nil | ✔️ |
223
+
224
+
225
+ 使用範例
226
+ ```ruby
227
+ payload = {
228
+ invoice_number: 'ZH10000008',
229
+ invalid_reason: '退貨'
230
+ }
231
+
232
+ response = client.invoice_invalid(payload)
233
+ response.result
234
+ ```
235
+
236
+ ### Allowance Issue
237
+ `allowance_issue` 開立折讓方法
238
+
239
+ | 欄位 | 型別 | 用途 | 預設 | 必填 |
240
+ | :--- | :--- | :--- | :--- | :---: |
241
+ | timestamp | Integer | 時間戳 | Time.now.to_i | |
242
+ | invoice_no | String | 發票號碼 | nil | ✔️ |
243
+ | merchant_order_no | String | 自訂編號 | nil | ✔️ |
244
+ | item_name | String Array | 折讓商品名稱 | nil | ✔️ |
245
+ | item_count | Integer Array | 折讓商品數量 | nil | ✔️ |
246
+ | item_unit | String Array | 折讓商品單位 | nil | ✔️ |
247
+ | item_price | Integer Array | 折讓商品單價 | nil | ✔️ |
248
+ | item_amt | Integer Array | 折讓商品小計 | nil | ✔️ |
249
+ | tax_type_for_mixed | Integer | 折讓課稅別 | nil | |
250
+ | item_tax_amt | Integer Array | 折讓商品稅額 | nil | ✔️ |
251
+ | total_amt | Integer | 折讓總金額 | nil | ✔️ |
252
+ | buyer_email | String | 買受人電子信箱 | nil | |
253
+ | status | String | 確認折讓方式 | nil | ✔️ |
254
+
255
+ 使用範例
256
+ ```ruby
257
+ payload = {
258
+ invoice_no: 'ZH10000010',
259
+ merchant_order_no: 'G20220101014',
260
+ buyer_email: 'junjun.st.tw01@gmail.com',
261
+ item_name: ['廣告費', '商務車租賃'],
262
+ item_count: [1, 2],
263
+ item_unit: ['筆', '小時'],
264
+ item_price: [3000, 1500],
265
+ item_amt: [3000, 3000],
266
+ item_tax_amt: [150, 150],
267
+ tax_type_for_mixed: 1,
268
+ total_amt: 6300,
269
+ status: '1'
270
+ }
271
+
272
+ response = client.allowance_issue(payload)
273
+ response.result
274
+ ```
275
+
276
+ ### Allowance Touch Issue
277
+ `allowance_touch_issue` 觸發確認折讓或取消折讓方法
278
+
279
+ | 欄位 | 型別 | 用途 | 預設 | 必填 |
280
+ | :--- | :--- | :--- | :--- | :---: |
281
+ | timestamp | Integer | 時間戳 | Time.now.to_i | |
282
+ | allowance_status | String | 觸發折讓狀態 | nil | ✔️ |
283
+ | allowance_no | String | 折讓號 | nil | ✔️ |
284
+ | merchant_order_no | String | 自訂編號 | nil | ✔️ |
285
+ | total_amt | Integer | 折讓總金額 | nil | ✔️ |
286
+
287
+ 使用範例
288
+ ```ruby
289
+ payload = {
290
+ allowance_no: 'A220116015800106',
291
+ allowance_status: 'D',
292
+ merchant_order_no: 'G20220101014',
293
+ total_amt: 6300,
294
+ }
295
+
296
+ response = client.allowance_touch_issue(payload)
297
+ response.result
298
+ ```
299
+
300
+ ### Allowance Invalid
301
+ `allowance_invalid` 作廢折讓方法
302
+
303
+ | 欄位 | 型別 | 用途 | 預設 | 必填 |
304
+ | :--- | :--- | :--- | :--- | :---: |
305
+ | timestamp | Integer | 時間戳 | Time.now.to_i | |
306
+ | allowance_no | String | 折讓號 | nil | ✔️ |
307
+ | invalid_reason | String | 作廢原因 | nil | ✔️ |
308
+
309
+ 使用範例
310
+ ```ruby
311
+ payload = {
312
+ allowance_no: 'A220116015800106',
313
+ invalid_reason: '作廢折讓'
314
+ }
315
+
316
+ response = client.allowance_invalid(payload)
317
+ response.result
318
+ ```
319
+
320
+ ### Invoice Search
321
+ `invoice_search` 查詢發票方法
322
+
323
+ | 欄位 | 型別 | 用途 | 預設 | 必填 |
324
+ | :--- | :--- | :--- | :--- | :---: |
325
+ | timestamp | Integer | 時間戳 | Time.now.to_i | |
326
+ | search_type | String | 查詢方式 | nil | |
327
+ | merchant_order_no | String | 訂單編號 | nil | ✔️ |
328
+ | total_amt | String | 發票金額 | nil | ✔️ |
329
+ | invoice_number | String | 發票號碼 | nil | ✔️ |
330
+ | random_num | String | 發票防偽隨機碼 | nil | ✔️ |
331
+ | display_flag | String | 是否於本平台網頁 顯示發票查詢結果 | nil | |
332
+
333
+ 使用範例
334
+ ```ruby
335
+ payload = {
336
+ search_type: '0',
337
+ merchant_order_no: 'G20220101014',
338
+ invoice_number: 'ZH10000008',
339
+ total_amt: '8400',
340
+ random_num: '8856'
341
+ }
342
+
343
+ response = client.invoice_search(payload)
344
+ response.result
345
+ ```
346
+
347
+ ### Ezpay Error
348
+ 如果使用上述方法時,Ezpay API 端返回文件內所定義的錯誤,如:
349
+ | 錯誤代碼 | 錯誤原因 |
350
+ | :---: | :---: |
351
+ | KEY10002 | 資料解密錯誤 |
352
+ | KEY10004 | 資料不齊全 |
353
+
354
+ 更多錯誤代碼請參考[官方手冊](https://inv.ezpay.com.tw/dw_files/info_api/EZP_INVI_1_2_1.pdf)附件九
355
+
356
+ 如果接收到上述錯誤時,則會 raise 一個 `EzpayResponseError` 並將 `status` 與 `message` 存於 Exception 內,想 catch 特定錯誤進行處理時,可以參考下列 pseudo code:
357
+
358
+ ```ruby
359
+ begin
360
+ client.inovice_issue(payload)
361
+ rescue EzpayInvoice::EzpayResponseError => e
362
+ puts e.status
363
+ puts e.message
364
+ # 錯誤處理
365
+ end
366
+ ```
367
+
368
+ ## Development
369
+
370
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
371
+
372
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
373
+
374
+ ## Contributing
375
+
376
+ Bug reports and pull requests are welcome on GitHub at https://github.com/whyayen/ezpay-invoice-sdk.
377
+
378
+
379
+ ## License
380
+
381
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "ezpay-invoice"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,34 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'ezpay-invoice/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "ezpay-invoice"
7
+ spec.version = EzpayInvoice::VERSION
8
+ spec.authors = ["Whyayen"]
9
+ spec.email = ["c75a90@gmail.com"]
10
+
11
+ spec.add_dependency 'rest-client', '~> 2.1.0'
12
+ spec.add_dependency 'hashie', '~> 5.0.0'
13
+ spec.add_dependency 'addressable', '~> 2.8.0'
14
+ spec.add_dependency 'activesupport', ['>= 5.0.0', '<= 7.0.1']
15
+
16
+ spec.summary = %q{The unofficial Ezpay invoice ruby SDK.}
17
+ spec.description = %q{The package would be able to issue invoice, invalid invoice on Ezpay}
18
+ spec.homepage = "https://github.com/whyayen/ezpay-invoice-sdk"
19
+ spec.license = "MIT"
20
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
21
+
22
+ spec.metadata["homepage_uri"] = spec.homepage
23
+ spec.metadata["source_code_uri"] = "https://github.com/whyayen/ezpay-invoice-sdk"
24
+ spec.metadata["changelog_uri"] = "https://github.com/whyayen/ezpay-invoice-sdk"
25
+
26
+ # Specify which files should be added to the gem when it is released.
27
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
28
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
29
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
30
+ end
31
+ spec.bindir = "exe"
32
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
+ spec.require_paths = ["lib"]
34
+ end
@@ -0,0 +1,14 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Endpoints
4
+ module AllowanceInvalid
5
+ def allowance_invalid(payload = {})
6
+ post(
7
+ 'allowanceInvalid',
8
+ EzpayInvoice::Api::Payloads::AllowanceInvalid.new(payload)
9
+ )
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Endpoints
4
+ module AllowanceIssue
5
+ def allowance_issue(payload = {})
6
+ post(
7
+ 'allowance_issue',
8
+ EzpayInvoice::Api::Payloads::AllowanceIssue.new(payload)
9
+ )
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Endpoints
4
+ module AllowanceTouchIssue
5
+ def allowance_touch_issue(payload = {})
6
+ post(
7
+ 'allowance_touch_issue',
8
+ EzpayInvoice::Api::Payloads::AllowanceTouchIssue.new(payload)
9
+ )
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Endpoints
4
+ module InvoiceInvalid
5
+ def invoice_invalid(payload = {})
6
+ post(
7
+ 'invoice_invalid',
8
+ EzpayInvoice::Api::Payloads::InvoiceInvalid.new(payload)
9
+ )
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Endpoints
4
+ module InvoiceIssue
5
+ def invoice_issue(payload = {})
6
+ post(
7
+ 'invoice_issue',
8
+ EzpayInvoice::Api::Payloads::InvoiceIssue.new(payload)
9
+ )
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Endpoints
4
+ module InvoiceSearch
5
+ def invoice_search(payload = {})
6
+ post(
7
+ 'invoice_search',
8
+ EzpayInvoice::Api::Payloads::InvoiceSearch.new(payload)
9
+ )
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Endpoints
4
+ module InvoiceTouchIssue
5
+ def invoice_touch_issue(payload = {})
6
+ post(
7
+ 'invoice_touch_issue',
8
+ EzpayInvoice::Api::Payloads::InvoiceTouchIssue.new(payload)
9
+ )
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Payloads
4
+ class AllowanceInvalid < Base
5
+ property(:Version, from: :version, default: '1.0')
6
+ property(:AllowanceNo, from: :allowance_no, required: true)
7
+ property(:InvalidReason, from: :invalid_reason, required: true)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,23 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Payloads
4
+ class AllowanceIssue < Base
5
+ include EzpayInvoice::Api::Properties::Item
6
+
7
+ property(:Version, from: :version, default: '1.3')
8
+ property(:InvoiceNo, from: :invoice_no, required: true)
9
+ property(:MerchantOrderNo, from: :merchant_order_no, required: true)
10
+ property(:TaxTypeForMixed, from: :tax_type_for_mixed)
11
+ property(
12
+ :ItemTaxAmt,
13
+ from: :item_tax_amt,
14
+ with: ->(value) { value.join('|') },
15
+ required: true
16
+ )
17
+ property(:TotalAmt, from: :total_amt, required: true)
18
+ property(:BuyerEmail, from: :buyer_email)
19
+ property(:Status, from: :status, required: true)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,13 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Payloads
4
+ class AllowanceTouchIssue < Base
5
+ property(:Version, from: :version, default: '1.0')
6
+ property(:AllowanceStatus, from: :allowance_status, required: true)
7
+ property(:AllowanceNo, from: :allowance_no, required: true)
8
+ property(:MerchantOrderNo, from: :merchant_order_no, required: true)
9
+ property(:TotalAmt, from: :total_amt, required: true)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require 'hashie'
2
+
3
+ module EzpayInvoice
4
+ module Api
5
+ module Payloads
6
+ class Base < Hashie::Dash
7
+ include Hashie::Extensions::IgnoreUndeclared
8
+ include Hashie::Extensions::Dash::PropertyTranslation
9
+ include EzpayInvoice::Api::Properties::General
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Payloads
4
+ class InvoiceInvalid < Base
5
+ property(:Version, from: :version, default: '1.0')
6
+ property(:InvoiceNumber, from: :invoice_number, required: true)
7
+ property(:InvalidReason, from: :invalid_reason, required: true)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,40 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Payloads
4
+ class InvoiceIssue < Base
5
+ include EzpayInvoice::Api::Properties::Item
6
+
7
+ property(:Version, from: :version, default: '1.4')
8
+ property(:TransNum, from: :trans_num)
9
+ property(:MerchantOrderNo, from: :merchant_order_no, required: true)
10
+ property(:Status, from: :status, required: true)
11
+ property(:CreateStatusTime, from: :create_status_time)
12
+ property(:Category, from: :category, required: true)
13
+ property(:BuyerName, from: :buyer_name, required: true)
14
+ property(:BuyerUBN, from: :buyer_ubn)
15
+ property(:BuyerAddress, from: :buyer_address)
16
+ property(:BuyerEmail, from: :buyer_email)
17
+ property(:CarrierType, from: :carrier_type)
18
+ property(:CarrierNum, from: :carrier_num)
19
+ property(:LoveCode, from: :love_code)
20
+ property(:PrintFlag, from: :print_flag, required: true)
21
+ property(:KioskPrintFlag, from: :kiosk_print_flag)
22
+ property(:TaxType, from: :tax_type, required: true)
23
+ property(:TaxRate, from: :tax_rate, required: true)
24
+ property(:CustomsClearance, from: :customs_clearance)
25
+ property(:Amt, from: :amt, required: true)
26
+ property(:AmtSales, from: :amt_sales)
27
+ property(:AmtZero, from: :amt_zero)
28
+ property(:AmtFree, from: :amt_free)
29
+ property(:TaxAmt, from: :tax_amt, required: true)
30
+ property(:TotalAmt, from: :total_amt, required: true)
31
+ property(
32
+ :ItemTaxType,
33
+ from: :item_tax_type,
34
+ with: ->(value) { value.join('|') },
35
+ )
36
+ property(:Comment, from: :comment)
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,15 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Payloads
4
+ class InvoiceSearch < Base
5
+ property(:Version, from: :version, default: '1.3')
6
+ property(:SearchType, from: :search_type)
7
+ property(:MerchantOrderNo, from: :merchant_order_no, required: true)
8
+ property(:TotalAmt, from: :total_amt, required: true)
9
+ property(:InvoiceNumber, from: :invoice_number, required: true)
10
+ property(:RandomNum, from: :random_num, required: true)
11
+ property(:DisplayFlag, from: :display_flag)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Payloads
4
+ class InvoiceTouchIssue < Base
5
+ property(:Version, from: :version, default: '1.0')
6
+ property(:TransNum, from: :trans_num)
7
+ property(:MerchantOrderNo, from: :merchant_order_no, required: true)
8
+ property(:InvoiceTransNo, from: :invoice_trans_no, required: true)
9
+ property(:TotalAmt, from: :total_amt, required: true)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,8 @@
1
+ require_relative 'payloads/base'
2
+ require_relative 'payloads/invoice_issue'
3
+ require_relative 'payloads/invoice_touch_issue'
4
+ require_relative 'payloads/invoice_invalid'
5
+ require_relative 'payloads/invoice_search'
6
+ require_relative 'payloads/allowance_issue'
7
+ require_relative 'payloads/allowance_touch_issue'
8
+ require_relative 'payloads/allowance_invalid'
@@ -0,0 +1,14 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Properties
4
+ module General
5
+ def self.included(base)
6
+ base.class_eval do
7
+ property :RespondType, from: :respond_type, default: 'JSON'
8
+ property :TimeStamp, from: :timestamp, default: Time.now.to_i
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,42 @@
1
+ module EzpayInvoice
2
+ module Api
3
+ module Properties
4
+ module Item
5
+ def self.included(base)
6
+ base.class_eval do
7
+ property(
8
+ :ItemName,
9
+ from: :item_name,
10
+ with: ->(value) { value.join('|') },
11
+ required: true
12
+ )
13
+ property(
14
+ :ItemCount,
15
+ from: :item_count,
16
+ with: ->(value) { value.join('|') },
17
+ required: true
18
+ )
19
+ property(
20
+ :ItemUnit,
21
+ from: :item_unit,
22
+ with: ->(value) { value.join('|') },
23
+ required: true
24
+ )
25
+ property(
26
+ :ItemPrice,
27
+ from: :item_price,
28
+ with: ->(value) { value.join('|') },
29
+ required: true
30
+ )
31
+ property(
32
+ :ItemAmt,
33
+ from: :item_amt,
34
+ with: ->(value) { value.join('|') },
35
+ required: true
36
+ )
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,2 @@
1
+ require_relative 'properties/general'
2
+ require_relative 'properties/item'
@@ -0,0 +1,31 @@
1
+ require_relative 'request'
2
+ require_relative 'api/properties'
3
+ require_relative 'api/payloads'
4
+ require_relative 'api/endpoints/invoice_issue'
5
+ require_relative 'api/endpoints/invoice_touch_issue'
6
+ require_relative 'api/endpoints/invoice_invalid'
7
+ require_relative 'api/endpoints/invoice_search'
8
+ require_relative 'api/endpoints/allowance_issue'
9
+ require_relative 'api/endpoints/allowance_touch_issue'
10
+ require_relative 'api/endpoints/allowance_invalid'
11
+
12
+ module EzpayInvoice
13
+ class Client
14
+ include EzpayInvoice::Configurable
15
+ include EzpayInvoice::Request
16
+ include EzpayInvoice::Api::Endpoints::InvoiceIssue
17
+ include EzpayInvoice::Api::Endpoints::InvoiceTouchIssue
18
+ include EzpayInvoice::Api::Endpoints::InvoiceInvalid
19
+ include EzpayInvoice::Api::Endpoints::InvoiceSearch
20
+ include EzpayInvoice::Api::Endpoints::AllowanceIssue
21
+ include EzpayInvoice::Api::Endpoints::AllowanceTouchIssue
22
+ include EzpayInvoice::Api::Endpoints::AllowanceInvalid
23
+
24
+ def initialize(options = {})
25
+ EzpayInvoice::Configurable.attributes.each do |key|
26
+ value = options.key?(key) ? options[key] : EzpayInvoice.send(key)
27
+ instance_variable_set(:"@#{key}", value)
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,35 @@
1
+ module EzpayInvoice
2
+ module Configurable
3
+ attr_accessor :merchant_id, :hash_key, :hash_iv
4
+
5
+ MODES = ['dev', 'prod']
6
+
7
+ def mode
8
+ @mode ||= 'dev'
9
+ end
10
+
11
+ def mode=(_mode)
12
+ raise ArgumentError, "mode must be one of [#{MODES.join(', ')}]." if !MODES.include?(_mode)
13
+ @mode = _mode
14
+ end
15
+
16
+ def setup
17
+ block_given? ? yield(self) : self
18
+ end
19
+
20
+ def config
21
+ self
22
+ end
23
+
24
+ class << self
25
+ def attributes
26
+ @attributes ||= [
27
+ :merchant_id,
28
+ :hash_key,
29
+ :hash_iv,
30
+ :mode
31
+ ]
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,13 @@
1
+ module EzpayInvoice
2
+ class Error < StandardError; end
3
+ class CheckCodeInvalid < Error; end
4
+
5
+ class EzpayResponseError < StandardError
6
+ attr_reader :status
7
+
8
+ def initialize(message, status)
9
+ super(message)
10
+ @status = status
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,43 @@
1
+ require 'rest-client'
2
+ require 'addressable/uri'
3
+ require 'json'
4
+
5
+ require_relative 'response'
6
+
7
+ module EzpayInvoice
8
+ module Request
9
+ def post(path, data)
10
+ uri = Addressable::URI.new
11
+ uri.query_values = data
12
+ payload = {
13
+ 'MerchantID_' => @merchant_id,
14
+ 'PostData_' => encrypt(uri.query)
15
+ }
16
+ request(:post, path, payload)
17
+ end
18
+
19
+ private
20
+ def api_endpoint
21
+ subdomain = @mode == 'prod' ? 'inv' : 'cinv'
22
+ "https://#{subdomain}.ezpay.com.tw/Api/"
23
+ end
24
+
25
+ def request(method, path, payload)
26
+ response = RestClient::Request.execute(
27
+ method: method,
28
+ url: Addressable::URI.parse("#{api_endpoint}#{path}").normalize.to_str,
29
+ payload: payload
30
+ )
31
+
32
+ Response.new(response)
33
+ end
34
+
35
+ def encrypt(data)
36
+ aes = OpenSSL::Cipher.new('AES-256-CBC')
37
+ aes.encrypt
38
+ aes.key = @hash_key
39
+ aes.iv = @hash_iv
40
+ (aes.update(data) + aes.final).unpack("H*").first.upcase
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,37 @@
1
+ require 'digest'
2
+ require 'active_support/core_ext/hash/keys'
3
+ require 'active_support/core_ext/string/inflections'
4
+
5
+ module EzpayInvoice
6
+ class Response
7
+ attr_reader :body, :status, :message, :result
8
+
9
+ def initialize(rest_response)
10
+ response_hash = JSON.parse(rest_response.body)
11
+ raise EzpayResponseError.new(
12
+ response_hash['Message'],
13
+ response_hash['Status']
14
+ ) if response_hash['Status'] != 'SUCCESS'
15
+
16
+ @body = response_hash
17
+ @status = response_hash['Status']
18
+ @message = response_hash['Message']
19
+ @result = transform_keys(JSON.parse(response_hash['Result']))
20
+ parse_item_detail
21
+ end
22
+
23
+ private
24
+ def parse_item_detail
25
+ if @result.has_key?('item_detail')
26
+ item_detail = JSON.parse(@result['item_detail']).map { |item| transform_keys(item) }
27
+ @result['item_detail'] = item_detail
28
+ end
29
+ end
30
+
31
+ def transform_keys(hash)
32
+ hash.deep_transform_keys do |k|
33
+ k.to_s.underscore
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,3 @@
1
+ module EzpayInvoice
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,10 @@
1
+ require_relative 'ezpay-invoice/version'
2
+ require_relative 'ezpay-invoice/exceptions'
3
+ require_relative 'ezpay-invoice/configurable'
4
+ require_relative 'ezpay-invoice/client'
5
+
6
+ module EzpayInvoice
7
+ class << self
8
+ include EzpayInvoice::Configurable
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,143 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ezpay-invoice
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Whyayen
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-01-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rest-client
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.1.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: hashie
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 5.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 5.0.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: addressable
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 2.8.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 2.8.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: activesupport
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 5.0.0
62
+ - - "<="
63
+ - !ruby/object:Gem::Version
64
+ version: 7.0.1
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 5.0.0
72
+ - - "<="
73
+ - !ruby/object:Gem::Version
74
+ version: 7.0.1
75
+ description: The package would be able to issue invoice, invalid invoice on Ezpay
76
+ email:
77
+ - c75a90@gmail.com
78
+ executables: []
79
+ extensions: []
80
+ extra_rdoc_files: []
81
+ files:
82
+ - ".gitignore"
83
+ - ".rspec"
84
+ - Gemfile
85
+ - LICENSE.txt
86
+ - README.md
87
+ - Rakefile
88
+ - bin/console
89
+ - bin/setup
90
+ - ezpay-invoice.gemspec
91
+ - lib/ezpay-invoice.rb
92
+ - lib/ezpay-invoice/api/endpoints/allowance_invalid.rb
93
+ - lib/ezpay-invoice/api/endpoints/allowance_issue.rb
94
+ - lib/ezpay-invoice/api/endpoints/allowance_touch_issue.rb
95
+ - lib/ezpay-invoice/api/endpoints/invoice_invalid.rb
96
+ - lib/ezpay-invoice/api/endpoints/invoice_issue.rb
97
+ - lib/ezpay-invoice/api/endpoints/invoice_search.rb
98
+ - lib/ezpay-invoice/api/endpoints/invoice_touch_issue.rb
99
+ - lib/ezpay-invoice/api/payloads.rb
100
+ - lib/ezpay-invoice/api/payloads/allowance_invalid.rb
101
+ - lib/ezpay-invoice/api/payloads/allowance_issue.rb
102
+ - lib/ezpay-invoice/api/payloads/allowance_touch_issue.rb
103
+ - lib/ezpay-invoice/api/payloads/base.rb
104
+ - lib/ezpay-invoice/api/payloads/invoice_invalid.rb
105
+ - lib/ezpay-invoice/api/payloads/invoice_issue.rb
106
+ - lib/ezpay-invoice/api/payloads/invoice_search.rb
107
+ - lib/ezpay-invoice/api/payloads/invoice_touch_issue.rb
108
+ - lib/ezpay-invoice/api/properties.rb
109
+ - lib/ezpay-invoice/api/properties/general.rb
110
+ - lib/ezpay-invoice/api/properties/item.rb
111
+ - lib/ezpay-invoice/client.rb
112
+ - lib/ezpay-invoice/configurable.rb
113
+ - lib/ezpay-invoice/exceptions.rb
114
+ - lib/ezpay-invoice/request.rb
115
+ - lib/ezpay-invoice/response.rb
116
+ - lib/ezpay-invoice/version.rb
117
+ homepage: https://github.com/whyayen/ezpay-invoice-sdk
118
+ licenses:
119
+ - MIT
120
+ metadata:
121
+ homepage_uri: https://github.com/whyayen/ezpay-invoice-sdk
122
+ source_code_uri: https://github.com/whyayen/ezpay-invoice-sdk
123
+ changelog_uri: https://github.com/whyayen/ezpay-invoice-sdk
124
+ post_install_message:
125
+ rdoc_options: []
126
+ require_paths:
127
+ - lib
128
+ required_ruby_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 2.3.0
133
+ required_rubygems_version: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ requirements: []
139
+ rubygems_version: 3.1.2
140
+ signing_key:
141
+ specification_version: 4
142
+ summary: The unofficial Ezpay invoice ruby SDK.
143
+ test_files: []