cetustek 0.4.0 → 0.5.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: 5134abbcc8b7229469df2b15f6efa704828f745e499f2609e04251bca8ed90c0
4
- data.tar.gz: 50312823ef3166581b9518d97955ce8f839a80ad25e3a1f155fd48ea102a919d
3
+ metadata.gz: 2914b87b1c342a5309f39629998f26cf081179b02c064177f44628c0d1853329
4
+ data.tar.gz: e65afdb10fcfa7c358f7eaa7f953169f0265b6f69e56b624b75e5fe4ea1fc61e
5
5
  SHA512:
6
- metadata.gz: b35ecc731affbcf77b48d858de62eae3e2e9dfe8f5bc328af30af2d6d9b27e51abe03de5633eedac8fc60106b9b50647b1c5b1a640c70e965b8a2267ff856685
7
- data.tar.gz: 5192ff08c159704e14548beb39bfb132acb4bd929308ada3f882edbd18132fe1123997030792897102c77402e5a1aa7c11ea48a8015f967609b3121ee006a263
6
+ metadata.gz: 5fe69cd1d22f538861b5dde8124133db53f618b059fc6cb5f7ed6cbe85c0f894c6c4aefb7eb1fda410d883a98f4f910f049a5e9aa0687b5108f7a407f16b209c
7
+ data.tar.gz: 0b64ceeeda241d5f7780e8b7ced545f2309657f3dd3dfcce7b7d631658ed6b1144b2481cd510920ed08ce863970e448c65d9ec485950a41c6ea57eddbeff5f14
data/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.0] - 2026-06-30
9
+
10
+ ### Added
11
+ - `Cetustek::PayWay` constants for the 付款方式 codes (spec AVM-26-03 Table 4):
12
+ `CASH`/`ATM`/`CREDIT_CARD`/`CVS`/`OTHER`/`E_PAYMENT` plus `APPLE_PAY`, `LINE_PAY`,
13
+ `GOOGLE_PAY`, `JKO_PAY`, `TAIWAN_PAY`, etc. Convenience only — `payment_type` still
14
+ accepts any raw value, so new platform codes need no gem update.
15
+
8
16
  ## [0.4.0] - 2026-06-29
9
17
 
10
18
  ### Added
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Cetustek
2
2
 
3
+ [![Gem Version](https://img.shields.io/gem/v/cetustek)](https://rubygems.org/gems/cetustek)
3
4
  [![RSpec Tests](https://github.com/7a6163/cetustek/actions/workflows/rspec.yml/badge.svg)](https://github.com/7a6163/cetustek/actions/workflows/rspec.yml)
4
5
  [![codecov](https://codecov.io/gh/7a6163/cetustek/graph/badge.svg?token=N951Y9SE15)](https://codecov.io/gh/7a6163/cetustek)
5
6
 
@@ -115,6 +116,24 @@ Cetustek::Models::InvoiceData.new(
115
116
  )
116
117
  ```
117
118
 
119
+ ### Payment method (`payment_type` / PayWay)
120
+
121
+ `payment_type` accepts any raw code, or use `Cetustek::PayWay` for readability
122
+ (`payment_type: Cetustek::PayWay::LINE_PAY`):
123
+
124
+ | Constant | Code | | Constant | Code |
125
+ |----------|------|-|----------|------|
126
+ | `CASH` | 1 | | `GOOGLE_PAY` | `G` |
127
+ | `ATM` | 2 | | `JKO_PAY` | `J` |
128
+ | `CREDIT_CARD` | 3 | | `LINE_PAY` | `L` |
129
+ | `CVS` | 4 | | `PI_WALLET` | `P` |
130
+ | `OTHER` | 5 | | `SAMSUNG_PAY` | `S` |
131
+ | `E_PAYMENT` | 6 | | `TAIWAN_PAY` | `T` |
132
+ | `APPLE_PAY` | `A` | | `EASY_WALLET` | `U` |
133
+ | `AFTEE` | `E` | | `PX_PAY` | `W` |
134
+ | | | | `QUAN_PAY` | `X` |
135
+ | | | | `COIN_CARD` | `Z` |
136
+
118
137
  ### Discounts and fees
119
138
 
120
139
  The gem is a faithful wrapper of the API's invoice detail format, so it has no
@@ -11,6 +11,30 @@ module Cetustek
11
11
  MIXED = 9 # 混合(應稅、零稅率與免稅,限收銀機類型發票)
12
12
  end
13
13
 
14
+ # PayWay (付款方式) codes for CreateInvoiceV3, spec AVM-26-03 Table 4.
15
+ # Codes are mixed: 1-6 are integers, A-Z are strings. Convenience constants
16
+ # only — InvoiceData#payment_type still accepts any raw value.
17
+ module PayWay
18
+ CASH = 1 # 現金
19
+ ATM = 2 # ATM
20
+ CREDIT_CARD = 3 # 信用卡
21
+ CVS = 4 # 超商代收
22
+ OTHER = 5 # 其他
23
+ E_PAYMENT = 6 # 電子支付
24
+ APPLE_PAY = 'A' # Apple Pay
25
+ AFTEE = 'E' # 先享後付 Aftee
26
+ GOOGLE_PAY = 'G' # Google Pay
27
+ JKO_PAY = 'J' # 街口支付
28
+ LINE_PAY = 'L' # Line Pay
29
+ PI_WALLET = 'P' # Pi 拍錢包、慢點付
30
+ SAMSUNG_PAY = 'S' # Samsung Pay
31
+ TAIWAN_PAY = 'T' # 台灣 Pay
32
+ EASY_WALLET = 'U' # 悠遊付
33
+ PX_PAY = 'W' # 全盈+PAY
34
+ QUAN_PAY = 'X' # 全支付
35
+ COIN_CARD = 'Z' # 銀角零卡
36
+ end
37
+
14
38
  module Models
15
39
  class InvoiceData
16
40
  DEFAULT_TAX_RATE = 0.05
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cetustek
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cetustek
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zac