Skip to content

Commit 35d4a4f

Browse files
committed
fix/cypress
1 parent 1cb1135 commit 35d4a4f

File tree

24 files changed

+79
-77
lines changed

24 files changed

+79
-77
lines changed

api-reference/v1/openapi_spec_v1.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19409,7 +19409,7 @@
1940919409
"description": "Unit of measure used for the item quantity.",
1941019410
"nullable": true
1941119411
},
19412-
"unit_price": {
19412+
"total_amount": {
1941319413
"type": "integer",
1941419414
"format": "int64",
1941519415
"description": "Cost price for the item.",
@@ -22544,7 +22544,7 @@
2254422544
],
2254522545
"nullable": true
2254622546
},
22547-
"customer_order_date": {
22547+
"order_date": {
2254822548
"type": "string",
2254922549
"format": "date-time",
2255022550
"description": "Date the payer placed the order.",
@@ -23012,7 +23012,7 @@
2301223012
],
2301323013
"nullable": true
2301423014
},
23015-
"customer_order_date": {
23015+
"order_date": {
2301623016
"type": "string",
2301723017
"format": "date-time",
2301823018
"description": "Date the payer placed the order.",
@@ -24366,7 +24366,7 @@
2436624366
],
2436724367
"nullable": true
2436824368
},
24369-
"customer_order_date": {
24369+
"order_date": {
2437024370
"type": "string",
2437124371
"format": "date-time",
2437224372
"description": "Date the payer placed the order.",
@@ -25589,7 +25589,7 @@
2558925589
],
2559025590
"nullable": true
2559125591
},
25592-
"customer_order_date": {
25592+
"order_date": {
2559325593
"type": "string",
2559425594
"format": "date-time",
2559525595
"description": "Date the payer placed the order.",

api-reference/v2/openapi_spec_v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15150,7 +15150,7 @@
1515015150
"description": "Unit of measure used for the item quantity.",
1515115151
"nullable": true
1515215152
},
15153-
"unit_price": {
15153+
"total_amount": {
1515415154
"type": "integer",
1515515155
"format": "int64",
1515615156
"description": "Cost price for the item.",

crates/api_models/src/payments.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ pub struct PaymentsRequest {
12111211

12121212
/// Date the payer placed the order.
12131213
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
1214-
pub customer_order_date: Option<PrimitiveDateTime>,
1214+
pub order_date: Option<PrimitiveDateTime>,
12151215
}
12161216

12171217
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
@@ -6649,9 +6649,9 @@ pub struct OrderDetailsWithAmount {
66496649
pub commodity_code: Option<String>,
66506650
/// Unit of measure used for the item quantity.
66516651
pub unit_of_measure: Option<String>,
6652-
/// Cost price for the item.
6652+
/// Total amount for the item.
66536653
#[schema(value_type = Option<i64>)]
6654-
pub unit_price: Option<MinorUnit>,
6654+
pub total_amount: Option<MinorUnit>, // total_amount,
66556655
/// Discount amount applied to this item.
66566656
#[schema(value_type = Option<i64>)]
66576657
pub unit_discount_amount: Option<MinorUnit>,

crates/diesel_models/src/payment_intent.rs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub struct PaymentIntent {
6969
pub discount_amount: Option<MinorUnit>,
7070
pub shipping_amount_tax: Option<MinorUnit>,
7171
pub duty_amount: Option<MinorUnit>,
72-
pub customer_order_date: Option<PrimitiveDateTime>,
72+
pub order_date: Option<PrimitiveDateTime>,
7373
pub merchant_reference_id: Option<common_utils::id_type::PaymentReferenceId>,
7474
pub billing_address: Option<Encryption>,
7575
pub shipping_address: Option<Encryption>,
@@ -168,7 +168,7 @@ pub struct PaymentIntent {
168168
pub discount_amount: Option<MinorUnit>,
169169
pub shipping_amount_tax: Option<MinorUnit>,
170170
pub duty_amount: Option<MinorUnit>,
171-
pub customer_order_date: Option<PrimitiveDateTime>,
171+
pub order_date: Option<PrimitiveDateTime>,
172172
}
173173

174174
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, diesel::AsExpression, PartialEq)]
@@ -372,7 +372,7 @@ pub struct PaymentIntentNew {
372372
pub discount_amount: Option<MinorUnit>,
373373
pub shipping_amount_tax: Option<MinorUnit>,
374374
pub duty_amount: Option<MinorUnit>,
375-
pub customer_order_date: Option<PrimitiveDateTime>,
375+
pub order_date: Option<PrimitiveDateTime>,
376376
}
377377

378378
#[cfg(feature = "v1")]
@@ -452,7 +452,7 @@ pub struct PaymentIntentNew {
452452
pub payment_channel: Option<common_enums::PaymentChannel>,
453453
pub tax_status: Option<common_enums::TaxStatus>,
454454
pub discount_amount: Option<MinorUnit>,
455-
pub customer_order_date: Option<PrimitiveDateTime>,
455+
pub order_date: Option<PrimitiveDateTime>,
456456
pub shipping_amount_tax: Option<MinorUnit>,
457457
pub duty_amount: Option<MinorUnit>,
458458
}
@@ -618,7 +618,7 @@ pub struct PaymentIntentUpdateFields {
618618
pub payment_channel: Option<common_enums::PaymentChannel>,
619619
pub tax_status: Option<common_enums::TaxStatus>,
620620
pub discount_amount: Option<MinorUnit>,
621-
pub customer_order_date: Option<PrimitiveDateTime>,
621+
pub order_date: Option<PrimitiveDateTime>,
622622
pub shipping_amount_tax: Option<MinorUnit>,
623623
pub duty_amount: Option<MinorUnit>,
624624
}
@@ -784,7 +784,7 @@ impl PaymentIntentUpdateInternal {
784784
discount_amount: source.discount_amount,
785785
shipping_amount_tax: source.shipping_amount_tax,
786786
duty_amount: source.duty_amount,
787-
customer_order_date: source.customer_order_date,
787+
order_date: source.order_date,
788788
}
789789
}
790790
}
@@ -836,7 +836,7 @@ pub struct PaymentIntentUpdateInternal {
836836
pub payment_channel: Option<common_enums::PaymentChannel>,
837837
pub tax_status: Option<common_enums::TaxStatus>,
838838
pub discount_amount: Option<MinorUnit>,
839-
pub customer_order_date: Option<PrimitiveDateTime>,
839+
pub order_date: Option<PrimitiveDateTime>,
840840
pub shipping_amount_tax: Option<MinorUnit>,
841841
pub duty_amount: Option<MinorUnit>,
842842
}
@@ -887,7 +887,7 @@ impl PaymentIntentUpdate {
887887
payment_channel,
888888
tax_status,
889889
discount_amount,
890-
customer_order_date,
890+
order_date,
891891
shipping_amount_tax,
892892
duty_amount,
893893
} = self.into();
@@ -942,7 +942,7 @@ impl PaymentIntentUpdate {
942942
payment_channel: payment_channel.or(source.payment_channel),
943943
tax_status: tax_status.or(source.tax_status),
944944
discount_amount: discount_amount.or(source.discount_amount),
945-
customer_order_date: customer_order_date.or(source.customer_order_date),
945+
order_date: order_date.or(source.order_date),
946946
shipping_amount_tax: shipping_amount_tax.or(source.shipping_amount_tax),
947947
duty_amount: duty_amount.or(source.duty_amount),
948948
..source
@@ -1000,7 +1000,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
10001000
payment_channel: None,
10011001
tax_status: None,
10021002
discount_amount: None,
1003-
customer_order_date: None,
1003+
order_date: None,
10041004
shipping_amount_tax: None,
10051005
duty_amount: None,
10061006
},
@@ -1048,7 +1048,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
10481048
payment_channel: value.payment_channel,
10491049
tax_status: value.tax_status,
10501050
discount_amount: value.discount_amount,
1051-
customer_order_date: value.customer_order_date,
1051+
order_date: value.order_date,
10521052
shipping_amount_tax: value.shipping_amount_tax,
10531053
duty_amount: value.duty_amount,
10541054
},
@@ -1103,7 +1103,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
11031103
payment_channel: None,
11041104
tax_status: None,
11051105
discount_amount: None,
1106-
customer_order_date: None,
1106+
order_date: None,
11071107
shipping_amount_tax: None,
11081108
duty_amount: None,
11091109
},
@@ -1154,7 +1154,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
11541154
payment_channel: None,
11551155
tax_status: None,
11561156
discount_amount: None,
1157-
customer_order_date: None,
1157+
order_date: None,
11581158
shipping_amount_tax: None,
11591159
duty_amount: None,
11601160
},
@@ -1206,7 +1206,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
12061206
payment_channel: None,
12071207
tax_status: None,
12081208
discount_amount: None,
1209-
customer_order_date: None,
1209+
order_date: None,
12101210
shipping_amount_tax: None,
12111211
duty_amount: None,
12121212
},
@@ -1265,7 +1265,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
12651265
payment_channel: None,
12661266
tax_status: None,
12671267
discount_amount: None,
1268-
customer_order_date: None,
1268+
order_date: None,
12691269
shipping_amount_tax: None,
12701270
duty_amount: None,
12711271
},
@@ -1316,7 +1316,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
13161316
payment_channel: None,
13171317
tax_status: None,
13181318
discount_amount: None,
1319-
customer_order_date: None,
1319+
order_date: None,
13201320
shipping_amount_tax: None,
13211321
duty_amount: None,
13221322
},
@@ -1368,7 +1368,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
13681368
payment_channel: None,
13691369
tax_status: None,
13701370
discount_amount: None,
1371-
customer_order_date: None,
1371+
order_date: None,
13721372
shipping_amount_tax: None,
13731373
duty_amount: None,
13741374
},
@@ -1419,7 +1419,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
14191419
payment_channel: None,
14201420
tax_status: None,
14211421
discount_amount: None,
1422-
customer_order_date: None,
1422+
order_date: None,
14231423
shipping_amount_tax: None,
14241424
duty_amount: None,
14251425
},
@@ -1470,7 +1470,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
14701470
payment_channel: None,
14711471
tax_status: None,
14721472
discount_amount: None,
1473-
customer_order_date: None,
1473+
order_date: None,
14741474
shipping_amount_tax: None,
14751475
duty_amount: None,
14761476
},
@@ -1520,7 +1520,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
15201520
payment_channel: None,
15211521
tax_status: None,
15221522
discount_amount: None,
1523-
customer_order_date: None,
1523+
order_date: None,
15241524
shipping_amount_tax: None,
15251525
duty_amount: None,
15261526
},
@@ -1567,7 +1567,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
15671567
payment_channel: None,
15681568
tax_status: None,
15691569
discount_amount: None,
1570-
customer_order_date: None,
1570+
order_date: None,
15711571
shipping_amount_tax: None,
15721572
duty_amount: None,
15731573
},
@@ -1616,7 +1616,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
16161616
payment_channel: None,
16171617
tax_status: None,
16181618
discount_amount: None,
1619-
customer_order_date: None,
1619+
order_date: None,
16201620
shipping_amount_tax: None,
16211621
duty_amount: None,
16221622
},
@@ -1665,7 +1665,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
16651665
payment_channel: None,
16661666
tax_status: None,
16671667
discount_amount: None,
1668-
customer_order_date: None,
1668+
order_date: None,
16691669
shipping_amount_tax: None,
16701670
duty_amount: None,
16711671
},
@@ -1712,7 +1712,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
17121712
payment_channel: None,
17131713
tax_status: None,
17141714
discount_amount: None,
1715-
customer_order_date: None,
1715+
order_date: None,
17161716
shipping_amount_tax: None,
17171717
duty_amount: None,
17181718
},
@@ -1764,7 +1764,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
17641764
payment_channel: None,
17651765
tax_status: None,
17661766
discount_amount: None,
1767-
customer_order_date: None,
1767+
order_date: None,
17681768
shipping_amount_tax: None,
17691769
duty_amount: None,
17701770
},

crates/diesel_models/src/schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ diesel::table! {
10771077
discount_amount -> Nullable<Int8>,
10781078
shipping_amount_tax -> Nullable<Int8>,
10791079
duty_amount -> Nullable<Int8>,
1080-
customer_order_date -> Nullable<Timestamp>,
1080+
order_date -> Nullable<Timestamp>,
10811081
}
10821082
}
10831083

crates/diesel_models/src/schema_v2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ diesel::table! {
10091009
discount_amount -> Nullable<Int8>,
10101010
shipping_amount_tax -> Nullable<Int8>,
10111011
duty_amount -> Nullable<Int8>,
1012-
customer_order_date -> Nullable<Timestamp>,
1012+
order_date -> Nullable<Timestamp>,
10131013
#[max_length = 64]
10141014
merchant_reference_id -> Nullable<Varchar>,
10151015
billing_address -> Nullable<Bytea>,

crates/diesel_models/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ pub struct OrderDetailsWithAmount {
4949
pub commodity_code: Option<String>,
5050
/// unit of measure of the product
5151
pub unit_of_measure: Option<String>,
52-
/// unit price of the product
53-
pub unit_price: Option<MinorUnit>,
52+
/// total amount of the product
53+
pub total_amount: Option<MinorUnit>,
5454
/// discount amount on the unit
5555
pub unit_discount_amount: Option<MinorUnit>,
5656
}

crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ fn get_enhanced_data(
708708
line_item_total_with_tax: order.total_tax_amount.map(|tax| tax + order.amount),
709709
item_discount_amount: order.unit_discount_amount,
710710
commodity_code: order.commodity_code.clone(),
711-
unit_cost: order.unit_price,
711+
unit_cost: Some(order.amount),
712712
})
713713
.collect()
714714
});

crates/hyperswitch_domain_models/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ impl ApiModelToDieselModelConvertor<ApiOrderDetailsWithAmount> for OrderDetailsW
406406
upc,
407407
commodity_code,
408408
unit_of_measure,
409-
unit_price,
409+
total_amount,
410410
unit_discount_amount,
411411
} = from;
412412
Self {
@@ -428,7 +428,7 @@ impl ApiModelToDieselModelConvertor<ApiOrderDetailsWithAmount> for OrderDetailsW
428428
upc,
429429
commodity_code,
430430
unit_of_measure,
431-
unit_price,
431+
total_amount,
432432
unit_discount_amount,
433433
}
434434
}
@@ -453,7 +453,7 @@ impl ApiModelToDieselModelConvertor<ApiOrderDetailsWithAmount> for OrderDetailsW
453453
upc,
454454
commodity_code,
455455
unit_of_measure,
456-
unit_price,
456+
total_amount,
457457
unit_discount_amount,
458458
} = self;
459459
ApiOrderDetailsWithAmount {
@@ -475,7 +475,7 @@ impl ApiModelToDieselModelConvertor<ApiOrderDetailsWithAmount> for OrderDetailsW
475475
upc,
476476
commodity_code,
477477
unit_of_measure,
478-
unit_price,
478+
total_amount,
479479
unit_discount_amount,
480480
}
481481
}

crates/hyperswitch_domain_models/src/payments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub struct PaymentIntent {
119119
pub payment_channel: Option<common_enums::PaymentChannel>,
120120
pub tax_status: Option<storage_enums::TaxStatus>,
121121
pub discount_amount: Option<MinorUnit>,
122-
pub customer_order_date: Option<PrimitiveDateTime>,
122+
pub order_date: Option<PrimitiveDateTime>,
123123
pub shipping_amount_tax: Option<MinorUnit>,
124124
pub duty_amount: Option<MinorUnit>,
125125
}

0 commit comments

Comments
 (0)