Project

General

Profile

Specification » History » Version 18

Soh Keong, 06/10/2024 09:59 AM

1 1 Soh Keong
{{toc}}
2
3
h1. Specification
4
5
h1. Programming Guide
6
7
h2. Jar version 
8
9
|_. version |_. Description                                |
10
| 1.0       | Init                                         |
11
12
h2. Jar File Download
13
14
"Jar":
15
"Properties":
16
17
h3. Classes
18
19
* *my.aisino.einvoice.bean* 
20
* *my.aisino.einvoice.bean.transaction* 
21
* *my.aisino.einvoice.constant* 
22
* *my.aisino.einvoice.service* 
23
* *my.aisino.einvoice.util* 
24
25
h3. properties file
26
27
* *service.properties*
28
29
# *merchant.id*       -
30
31
h2. Aisino Service
32
33
<pre>
34
my.aisino.einvoice.service.TransactionService service = new my.aisino.einvoice.service.TransactionService();
35
</pre>
36
37 8 Soh Keong
h3. submitEInvoice
38 1 Soh Keong
39
<pre>
40 13 Soh Keong
InvoiceSubmissionResponseBean responseBean = service.submitEInvoice(Connection conn, List<InvoiceSubmissionRequestBean> beanList);
41 1 Soh Keong
</pre>
42
43 10 Soh Keong
<pre>
44
CommonConstant = my.aisino.einvoice.constant.CommonConstant
45
</pre>
46
47 1 Soh Keong
# *conn*           - Database connection.
48 13 Soh Keong
# *beanList*       - InvoiceSubmissionRequestBean List.
49 1 Soh Keong
> * *orderId*
50 10 Soh Keong
> * *orderDate*     - Format(yyyy-MM-dd)
51
> * *orderTime*     - Format(HH:mm:ssZ)
52 11 Soh Keong
> * *orderTypeCode* - CommonConstant.INVOICE_TYPE_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/e-invoice-types/)
53 10 Soh Keong
> * *currencyCode*  - CommonConstant.CURRENCY_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/currencies/)
54 1 Soh Keong
> * *totalExcludingTax* 
55
> * *totalIncludingTax* 
56
> * *totalPayableAmount* 
57
58 14 Soh Keong
> * *supplierBean*
59
> ** *addressBean* 
60
> *** *country*  - CommonConstant.COUNTRY_* (https://sdk.myinvois.hasil.gov.my/codes/countries/)
61
> *** *state*    - CommonConstant.STATE_* (https://sdk.myinvois.hasil.gov.my/codes/state-codes/)
62
> *** *city*     - Max length : 50
63
> *** *postal*   - Max length : 50
64
> *** *address1* - Max length : 150
65
> *** *address2* - Max length : 150
66
> *** *address3* - Max length : 150
67
> ** *contactNumber* - Max length : 20
68
> ** *name*          - Max length : 300
69
> ** *registrationBean*
70 17 Soh Keong
> *** *tin*      
71
> *** *idType*     
72
> *** *idValue* 
73 14 Soh Keong
> *** *sst*      (Optional)
74
75 1 Soh Keong
> * *buyerBean* 
76 14 Soh Keong
> ** *addressBean* 
77 11 Soh Keong
> *** *country*  - CommonConstant.COUNTRY_* (https://sdk.myinvois.hasil.gov.my/codes/countries/)
78 10 Soh Keong
> *** *state*    - CommonConstant.STATE_* (https://sdk.myinvois.hasil.gov.my/codes/state-codes/)
79
> *** *city*     - Max length : 50
80
> *** *address1* - Max length : 150
81
> *** *address2* - Max length : 150
82
> *** *address3* - Max length : 150
83 1 Soh Keong
> ** *contactNumber* - Max length : 20
84 10 Soh Keong
> ** *name*          - Max length : 300
85 14 Soh Keong
> ** *registrationBean*
86 18 Soh Keong
> *** *tin*      
87
> *** *idType*     
88
> *** *idValue* 
89 2 Soh Keong
> *** *sst*      (Optional)
90 6 Soh Keong
91 11 Soh Keong
> * *productList*
92
> ** *productName*        - Max length : 300
93
> ** *productCode*        - Max length :  18
94 6 Soh Keong
> ** *measurement*        - CommonConstant.MEASUREMENT_* (https://sdk.myinvois.hasil.gov.my/codes/unit-types/)
95
> ** *quantity*  (Optional) 
96
> ** *totalExcludingTax*
97 11 Soh Keong
> ** *unitPrice*
98
> ** *subtotal*
99
> ** *classificationList* 
100 6 Soh Keong
> *** *code*              - CommonConstant.CLASSIFICATION_CODE_* (https://sdk.myinvois.hasil.gov.my/codes/classification-codes/)
101
> *** *group*             - CommonConstant.CLASSIFICATION_GROUP_* 
102
> ** *taxTotalBean*
103 12 Soh Keong
> *** *totalTaxAmount*
104 8 Soh Keong
> *** *taxSubTotalList*
105 1 Soh Keong
> **** *taxType*          - CommonConstant.TAX_TYPE_* (https://sdk.myinvois.hasil.gov.my/codes/tax-types/)
106
> **** *percent*          (Optional)
107 8 Soh Keong
> **** *perUnitAmount*    (Optional)
108 14 Soh Keong
> **** *measurement*      (Optional) - CommonConstant.MEASUREMENT_* (https://sdk.myinvois.hasil.gov.my/codes/unit-types/)
109 16 Soh Keong
> **** *quantity*         (Optional)
110 3 Soh Keong
> **** *netAmount*        (Optional)
111
> **** *tax*
112 6 Soh Keong
113
> * *taxTotalBean*
114
> ** *totalTaxAmount*
115 1 Soh Keong
> ** *taxSubTotalList*
116
> *** *taxType*
117 6 Soh Keong
> *** *percent*
118
> *** *perUnitAmount*
119 14 Soh Keong
> *** *measurement*
120
> *** *quantity*
121 1 Soh Keong
> *** *netAmount*
122
> *** *tax*
123
124
  3. *responseBean*
125
126
> * *submissionUid*
127
> * *acceptedDocumentList*
128
> ** *orderId*
129
> ** *uuid*
130
> * *rejectedDocumentList*
131
> ** *orderId*
132
> ** *errorList*
133 4 Soh Keong
> *** *code*
134 8 Soh Keong
> *** *message*
135
136
137 10 Soh Keong
h3. queryEInvoice
138 8 Soh Keong
139
<pre>
140 10 Soh Keong
InvoiceInquiryResponseBean responseBean = service.queryEInvoice(Connection conn, InvoiceInquiryRequestBean bean);
141 8 Soh Keong
</pre>
142
143
# *conn*           - Database connection.
144 9 Soh Keong
# *bean*           - Object.
145
> * *documentNum*
146
> * *submissionUid*
147
> * *invoiceUuid*
148
> * *invoiceTypeCode*
149
> * *buyerTin*
150
> * *buyerName*
151 15 Soh Keong
> * *supplierTin*
152
> * *supplierName*
153 9 Soh Keong
> * *totalAmountFrom*
154
> * *totalAmountTo*
155
> * *invoiceStatus*
156
> * *confirmStatusCode*
157
> * *issuedDateFrom*
158
> * *issuedDateTo*
159
> * *pageIndex* (Mandatory)
160
> * *pageSize* (Mandatory)
161
162
  3. *responseBean*
163
164
> * *page*
165
> ** *pageCount*
166
> ** *pageNo*
167
> ** *pageSize*
168
> ** *totalSize*
169
170
> * *recordList*
171
> ** *buyerTin*
172
> ** *confirmStatusCode*
173
> ** *currency*
174 1 Soh Keong
> ** *description*
175
> ** *documentNum*
176
> ** *excludingTaxAmount*
177
> ** *includingTaxAmount*
178
> ** *invoiceId*
179
> ** *invoiceStatus*
180
> ** *invoiceTypeCode*
181
> ** *invoiceUuid*
182
> ** *issuedDate*
183
> ** *nowTime*
184
> ** *operationDate*
185
> ** *operator*
186
> ** *pageIndex*
187
> ** *pageNo*
188
> ** *pageSize*
189 15 Soh Keong
> ** *supplierTin*
190
> ** *supplierName*
191 1 Soh Keong
> ** *submissionUid*
192 9 Soh Keong
> ** *transactionId*
193 10 Soh Keong
194
h3. cancelEInvoice
195
196
<pre>
197
InvoiceCancelResponseBean responseBean = service.cancelEInvoice(InvoiceCancelRequestBean bean);
198
</pre>
199
200
# *conn*           - Database connection.
201
# *bean*           - Object.
202 12 Soh Keong
> * *cancelCode*   - CommonConstant.CANCEL_CODE_* 
203
> * *cancelReason* - (Mandatory for CommonConstant.CANCEL_CODE_OTHERS) 
204 10 Soh Keong
> * *invoiceIds* - List of Integer
205
206
  3. *responseBean*
207
208
> * *success* - true / false