File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
Yosemite/Yosemite/Stores/Order Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,19 @@ enum OrderFactory {
3333 shippingLines: [ ] ,
3434 coupons: [ ] ,
3535 refunds: [ ] ,
36- fees: [ . init( feeID: 0 ,
37- name: " Simple Payments " ,
38- taxClass: " " ,
39- taxStatus: taxable ? . taxable : . none,
40- total: amount,
41- totalTax: " " ,
42- taxes: [ ] ,
43- attributes: [ ] ) ] )
36+ fees: [ simplePaymentFee ( feeID: 0 , amount: amount, taxable: taxable) ] )
37+ }
38+
39+ /// Creates a fee line suitable to be used within a simple payments order.
40+ ///
41+ static func simplePaymentFee( feeID: Int64 , amount: String , taxable: Bool ) -> OrderFeeLine {
42+ . init( feeID: feeID,
43+ name: " Simple Payments " ,
44+ taxClass: " " ,
45+ taxStatus: taxable ? . taxable : . none,
46+ total: amount,
47+ totalTax: " " ,
48+ taxes: [ ] ,
49+ attributes: [ ] )
4450 }
4551}
You can’t perform that action at this time.
0 commit comments