Skip to content

Commit fd3af21

Browse files
author
Sharma Elanthiriayan
committed
Add files generated by running rake generate.
1 parent 1849f99 commit fd3af21

File tree

2 files changed

+60
-3
lines changed

2 files changed

+60
-3
lines changed

Fakes/Fakes/Networking.generated.swift

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ extension Order {
300300
shippingLines: .fake(),
301301
coupons: .fake(),
302302
refunds: .fake(),
303-
fees: .fake()
303+
fees: .fake(),
304+
tax: .fake()
304305
)
305306
}
306307
}
@@ -500,6 +501,23 @@ extension OrderStatusEnum {
500501
.pending
501502
}
502503
}
504+
extension OrderTaxLine {
505+
/// Returns a "ready to use" type filled with fake values.
506+
///
507+
public static func fake() -> OrderTaxLine {
508+
.init(
509+
taxID: .fake(),
510+
rateCode: .fake(),
511+
rateID: .fake(),
512+
label: .fake(),
513+
isCompoundTaxRate: .fake(),
514+
totalTax: .fake(),
515+
totalShippingTax: .fake(),
516+
ratePercent: .fake(),
517+
attributes: .fake()
518+
)
519+
}
520+
}
503521
extension PaymentGateway {
504522
/// Returns a "ready to use" type filled with fake values.
505523
///

Networking/Networking/Model/Copiable/Models+Copiable.generated.swift

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ extension Order {
179179
shippingLines: CopiableProp<[ShippingLine]> = .copy,
180180
coupons: CopiableProp<[OrderCouponLine]> = .copy,
181181
refunds: CopiableProp<[OrderRefundCondensed]> = .copy,
182-
fees: CopiableProp<[OrderFeeLine]> = .copy
182+
fees: CopiableProp<[OrderFeeLine]> = .copy,
183+
tax: CopiableProp<[OrderTaxLine]> = .copy
183184
) -> Order {
184185
let siteID = siteID ?? self.siteID
185186
let orderID = orderID ?? self.orderID
@@ -208,6 +209,7 @@ extension Order {
208209
let coupons = coupons ?? self.coupons
209210
let refunds = refunds ?? self.refunds
210211
let fees = fees ?? self.fees
212+
let tax = tax ?? self.tax
211213

212214
return Order(
213215
siteID: siteID,
@@ -236,7 +238,8 @@ extension Order {
236238
shippingLines: shippingLines,
237239
coupons: coupons,
238240
refunds: refunds,
239-
fees: fees
241+
fees: fees,
242+
tax: tax
240243
)
241244
}
242245
}
@@ -472,6 +475,42 @@ extension OrderStatsV4Totals {
472475
}
473476
}
474477

478+
extension OrderTaxLine {
479+
public func copy(
480+
taxID: CopiableProp<Int64> = .copy,
481+
rateCode: CopiableProp<String> = .copy,
482+
rateID: CopiableProp<Int64> = .copy,
483+
label: CopiableProp<String> = .copy,
484+
isCompoundTaxRate: CopiableProp<Bool> = .copy,
485+
totalTax: CopiableProp<String> = .copy,
486+
totalShippingTax: CopiableProp<String> = .copy,
487+
ratePercent: CopiableProp<Double> = .copy,
488+
attributes: CopiableProp<[OrderItemAttribute]> = .copy
489+
) -> OrderTaxLine {
490+
let taxID = taxID ?? self.taxID
491+
let rateCode = rateCode ?? self.rateCode
492+
let rateID = rateID ?? self.rateID
493+
let label = label ?? self.label
494+
let isCompoundTaxRate = isCompoundTaxRate ?? self.isCompoundTaxRate
495+
let totalTax = totalTax ?? self.totalTax
496+
let totalShippingTax = totalShippingTax ?? self.totalShippingTax
497+
let ratePercent = ratePercent ?? self.ratePercent
498+
let attributes = attributes ?? self.attributes
499+
500+
return OrderTaxLine(
501+
taxID: taxID,
502+
rateCode: rateCode,
503+
rateID: rateID,
504+
label: label,
505+
isCompoundTaxRate: isCompoundTaxRate,
506+
totalTax: totalTax,
507+
totalShippingTax: totalShippingTax,
508+
ratePercent: ratePercent,
509+
attributes: attributes
510+
)
511+
}
512+
}
513+
475514
extension PaymentGatewayAccount {
476515
public func copy(
477516
siteID: CopiableProp<Int64> = .copy,

0 commit comments

Comments
 (0)