Skip to content

Commit

Permalink
chore: fix migration and openapi_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshayaFoiger committed Jan 23, 2025
1 parent 53e6ef3 commit 044a4b2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6768,7 +6768,7 @@
],
"properties": {
"AdyenSplitPayment": {
"$ref": "#/components/schemas/domain_types.AdyenSplitData"
"$ref": "#/components/schemas/AdyenSplitData"
}
}
}
Expand Down Expand Up @@ -20518,7 +20518,7 @@
],
"properties": {
"adyen_split_payment": {
"$ref": "#/components/schemas/domain_types.AdyenSplitData"
"$ref": "#/components/schemas/AdyenSplitData"
}
}
}
Expand All @@ -20545,7 +20545,7 @@
],
"properties": {
"adyen_split_refund": {
"$ref": "#/components/schemas/domain_types.AdyenSplitData"
"$ref": "#/components/schemas/AdyenSplitData"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -9421,7 +9421,7 @@
],
"properties": {
"AdyenSplitPayment": {
"$ref": "#/components/schemas/domain_types.AdyenSplitData"
"$ref": "#/components/schemas/AdyenSplitData"
}
}
}
Expand Down Expand Up @@ -25064,7 +25064,7 @@
],
"properties": {
"adyen_split_payment": {
"$ref": "#/components/schemas/domain_types.AdyenSplitData"
"$ref": "#/components/schemas/AdyenSplitData"
}
}
}
Expand All @@ -25091,7 +25091,7 @@
],
"properties": {
"adyen_split_refund": {
"$ref": "#/components/schemas/domain_types.AdyenSplitData"
"$ref": "#/components/schemas/AdyenSplitData"
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions crates/common_types/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
use std::collections::HashMap;

use common_enums::enums;
use crate::domain::AdyenSplitData;
use common_utils::{errors, impl_to_sql_from_sql_json, types::MinorUnit};
use diesel::{sql_types::Jsonb, AsExpression, FromSqlRow};
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

use crate::domain as domain_types;

#[derive(
Serialize, Deserialize, Debug, Clone, PartialEq, Eq, FromSqlRow, AsExpression, ToSchema,
)]
Expand All @@ -21,7 +20,7 @@ pub enum SplitPaymentsRequest {
/// StripeSplitPayment
StripeSplitPayment(StripeSplitPaymentRequest),
/// AdyenSplitPayment
AdyenSplitPayment(domain_types::AdyenSplitData),
AdyenSplitPayment(AdyenSplitData),
}
impl_to_sql_from_sql_json!(SplitPaymentsRequest);

Expand Down Expand Up @@ -103,7 +102,7 @@ pub enum ConnectorChargeResponseData {
/// StripeChargeResponseData
StripeSplitPayment(StripeChargeResponseData),
/// AdyenChargeResponseData
AdyenSplitPayment(domain_types::AdyenSplitData),
AdyenSplitPayment(AdyenSplitData),
}

impl_to_sql_from_sql_json!(ConnectorChargeResponseData);
3 changes: 2 additions & 1 deletion crates/common_types/src/refunds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use common_utils::impl_to_sql_from_sql_json;
use diesel::{sql_types::Jsonb, AsExpression, FromSqlRow};
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
use crate::domain::AdyenSplitData;

#[derive(
Serialize, Deserialize, Debug, Clone, PartialEq, Eq, FromSqlRow, AsExpression, ToSchema,
Expand All @@ -16,7 +17,7 @@ pub enum SplitRefund {
/// StripeSplitRefundRequest
StripeSplitRefund(StripeSplitRefundRequest),
/// AdyenSplitRefundRequest
AdyenSplitRefund(crate::domain::AdyenSplitData),
AdyenSplitRefund(AdyenSplitData),
}
impl_to_sql_from_sql_json!(SplitRefund);

Expand Down
1 change: 1 addition & 0 deletions crates/diesel_models/src/schema_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,7 @@ diesel::table! {
shipping_cost -> Nullable<Int8>,
order_tax_amount -> Nullable<Int8>,
connector_mandate_detail -> Nullable<Jsonb>,
charges -> Nullable<Jsonb>,
}
}

Expand Down

0 comments on commit 044a4b2

Please sign in to comment.