File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ public struct OrderData: Codable {
3333 public var total : String
3434 public let line_items : [ LineItems ]
3535 public let billing : BillingInformation
36+ public let shipping_lines : [ ShippingLine ]
37+ public let fee_lines : [ FeeLine ]
3638 public let customer_note : String
3739}
3840
@@ -45,3 +47,12 @@ public struct BillingInformation: Codable {
4547 public let first_name : String
4648 public let last_name : String
4749}
50+
51+ public struct ShippingLine : Codable {
52+ public let method_title : String
53+ public let total : String
54+ }
55+
56+ public struct FeeLine : Codable {
57+ public let amount : String
58+ }
Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ final class OrdersTests: XCTestCase {
3333 . startOrderCreation ( )
3434 . editOrderStatus ( )
3535 . addProduct ( byName: products [ 0 ] . name)
36- . addCustomerDetails ( name: " Mira " )
37- . addShipping ( amount: " 1.25 " , name: " Flat Rate " )
38- . addFee ( amount: " 2.34 " )
36+ . addCustomerDetails ( name: order . billing . first_name )
37+ . addShipping ( amount: order . shipping_lines [ 0 ] . total , name: order . shipping_lines [ 0 ] . method_title )
38+ . addFee ( amount: order . fee_lines [ 0 ] . amount )
3939 . addCustomerNote ( order. customer_note)
4040 . createOrder ( )
4141 }
You can’t perform that action at this time.
0 commit comments