id stringlengths 20 153 | type stringclasses 1
value | granularity stringclasses 14
values | content stringlengths 16 84.3k | metadata dict |
|---|---|---|---|---|
hyperswitch_method_api_models_CardDetailUpdate_apply | clm | method | // hyperswitch/crates/api_models/src/payment_methods.rs
// impl for CardDetailUpdate
pub fn apply(&self, card_data_from_locker: Card) -> CardDetail {
CardDetail {
card_number: card_data_from_locker.card_number,
card_exp_month: card_data_from_locker.card_exp_month,
card_exp_year: card_data_from_locker.card_exp_year,
card_holder_name: self
.card_holder_name
.clone()
.or(card_data_from_locker.name_on_card),
nick_name: self
.nick_name
.clone()
.or(card_data_from_locker.nick_name.map(masking::Secret::new)),
card_issuing_country: None,
card_network: None,
card_issuer: None,
card_type: None,
card_cvc: None,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "CardDetailUpdate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "apply",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ResponsePaymentMethodIntermediate_new | clm | method | // hyperswitch/crates/api_models/src/payment_methods.rs
// impl for ResponsePaymentMethodIntermediate
pub fn new(
pm_type: RequestPaymentMethodTypes,
connector: String,
merchant_connector_id: String,
pm: api_enums::PaymentMethod,
) -> Self {
Self {
payment_method_type: pm_type.payment_method_type,
payment_experience: pm_type.payment_experience,
card_networks: pm_type.card_networks,
payment_method: pm,
connector,
merchant_connector_id,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ResponsePaymentMethodIntermediate",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_RequestPaymentMethodTypes_get_payment_method_type | clm | method | // hyperswitch/crates/common_types/src/payment_methods.rs
// impl for RequestPaymentMethodTypes
pub fn get_payment_method_type(&self) -> Option<common_enums::PaymentMethodType> {
Some(self.payment_method_subtype)
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RequestPaymentMethodTypes",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_payment_method_type",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_RequestPaymentMethodTypes_get_payment_method_type | clm | method | // hyperswitch/crates/api_models/src/payment_methods.rs
// impl for RequestPaymentMethodTypes
pub fn get_payment_method_type(&self) -> Option<api_enums::PaymentMethodType> {
Some(self.payment_method_type)
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RequestPaymentMethodTypes",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_payment_method_type",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_PaymentMethodRecord_create_address | clm | method | // hyperswitch/crates/api_models/src/payment_methods.rs
// impl for PaymentMethodRecord
fn create_address(&self) -> Option<payments::AddressDetails> {
if self.billing_address_first_name.is_some()
&& self.billing_address_line1.is_some()
&& self.billing_address_zip.is_some()
&& self.billing_address_city.is_some()
&& self.billing_address_country.is_some()
{
Some(payments::AddressDetails {
city: self.billing_address_city.clone(),
country: self.billing_address_country,
line1: self.billing_address_line1.clone(),
line2: self.billing_address_line2.clone(),
state: self.billing_address_state.clone(),
line3: self.billing_address_line3.clone(),
zip: self.billing_address_zip.clone(),
first_name: self.billing_address_first_name.clone(),
last_name: self.billing_address_last_name.clone(),
origin_zip: None,
})
} else {
None
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "PaymentMethodRecord",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "create_address",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_PaymentMethodRecord_create_phone | clm | method | // hyperswitch/crates/api_models/src/payment_methods.rs
// impl for PaymentMethodRecord
fn create_phone(&self) -> Option<payments::PhoneDetails> {
if self.phone.is_some() || self.phone_country_code.is_some() {
Some(payments::PhoneDetails {
number: self.phone.clone(),
country_code: self.phone_country_code.clone(),
})
} else {
None
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "PaymentMethodRecord",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "create_phone",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_PaymentMethodRecord_create_billing | clm | method | // hyperswitch/crates/api_models/src/payment_methods.rs
// impl for PaymentMethodRecord
fn create_billing(&self) -> Option<payments::Address> {
let address = self.create_address();
let phone = self.create_phone();
if address.is_some() || phone.is_some() || self.email.is_some() {
Some(payments::Address {
address,
phone,
email: self.email.clone(),
})
} else {
None
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "PaymentMethodRecord",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "create_billing",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_Headers_as_map | clm | method | // hyperswitch/crates/api_models/src/proxy.rs
// impl for Headers
pub fn as_map(&self) -> &HashMap<String, String> {
&self.0
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "Headers",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "as_map",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_Headers_from_header_map | clm | method | // hyperswitch/crates/api_models/src/proxy.rs
// impl for Headers
pub fn from_header_map(headers: Option<&HeaderMap>) -> Self {
headers
.map(|h| {
let map = h
.iter()
.map(|(k, v)| (k.to_string(), v.to_str().unwrap_or("").to_string()))
.collect();
Self(map)
})
.unwrap_or_else(|| Self(HashMap::new()))
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "Headers",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "from_header_map",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_CoBadgedCardNetworks_get_card_networks | clm | method | // hyperswitch/crates/api_models/src/open_router.rs
// impl for CoBadgedCardNetworks
pub fn get_card_networks(&self) -> Vec<common_enums::CardNetwork> {
self.0.iter().map(|info| info.network.clone()).collect()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "CoBadgedCardNetworks",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_card_networks",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_CoBadgedCardNetworks_get_signature_network | clm | method | // hyperswitch/crates/api_models/src/open_router.rs
// impl for CoBadgedCardNetworks
pub fn get_signature_network(&self) -> Option<common_enums::CardNetwork> {
self.0
.iter()
.find(|info| info.network.is_signature_network())
.map(|info| info.network.clone())
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "CoBadgedCardNetworks",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_signature_network",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_DecisionEngineEliminationData_update | clm | method | // hyperswitch/crates/api_models/src/open_router.rs
// impl for DecisionEngineEliminationData
pub fn update(&mut self, new_config: Self) {
self.threshold = new_config.threshold;
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "DecisionEngineEliminationData",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "update",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_RefundResponse_get_refund_id_as_string | clm | method | // hyperswitch/crates/api_models/src/refunds.rs
// impl for RefundResponse
pub fn get_refund_id_as_string(&self) -> String {
self.id.get_string_repr().to_owned()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RefundResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_refund_id_as_string",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_RefundResponse_get_refund_id_as_string | clm | method | // hyperswitch/crates/api_models/src/refunds.rs
// impl for RefundResponse
pub fn get_refund_id_as_string(&self) -> String {
self.id.get_string_repr().to_owned()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RefundResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_refund_id_as_string",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_OrganizationNew_new | clm | method | // hyperswitch/crates/diesel_models/src/organization.rs
// impl for OrganizationNew
pub fn new(
id: id_type::OrganizationId,
organization_type: common_enums::OrganizationType,
organization_name: Option<String>,
) -> Self {
Self {
id,
organization_name,
organization_details: None,
metadata: None,
created_at: common_utils::date_time::now(),
modified_at: common_utils::date_time::now(),
version: common_types::consts::API_VERSION,
organization_type,
platform_merchant_id: None,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "OrganizationNew",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_OrganizationNew_new | clm | method | // hyperswitch/crates/api_models/src/organization.rs
// impl for OrganizationNew
pub fn new(org_type: OrganizationType, org_name: Option<String>) -> Self {
Self {
org_id: id_type::OrganizationId::default(),
org_type,
org_name,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "OrganizationNew",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_PayoutCreateRequest_get_customer_id | clm | method | // hyperswitch/crates/api_models/src/payouts.rs
// impl for PayoutCreateRequest
pub fn get_customer_id(&self) -> Option<&id_type::CustomerId> {
self.customer_id
.as_ref()
.or(self.customer.as_ref().map(|customer| &customer.id))
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "PayoutCreateRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_customer_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ymentsCreateIntentRequest {_t_feature_metadata_as_value(
| clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ymentsCreateIntentRequest {
b fn get_feature_metadata_as_value(
&self,
) -> common_utils::errors::CustomResult<
Option<pii::SecretSerdeValue>,
common_utils::errors::ParsingError,
> {
Ok(self
.feature_metadata
.as_ref()
.map(Encode::encode_to_value)
.transpose()?
.map(Secret::new))
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ymentsCreateIntentRequest {",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "t_feature_metadata_as_value(\n",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ymentsCreateIntentRequest {_t_connector_metadata_as_value(
| clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ymentsCreateIntentRequest {
b fn get_connector_metadata_as_value(
&self,
) -> common_utils::errors::CustomResult<
Option<pii::SecretSerdeValue>,
common_utils::errors::ParsingError,
> {
Ok(self
.connector_metadata
.as_ref()
.map(Encode::encode_to_value)
.transpose()?
.map(Secret::new))
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ymentsCreateIntentRequest {",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "t_connector_metadata_as_value(\n",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ymentsCreateIntentRequest {_t_allowed_payment_method_types_as_value(
| clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ymentsCreateIntentRequest {
b fn get_allowed_payment_method_types_as_value(
&self,
) -> common_utils::errors::CustomResult<
Option<pii::SecretSerdeValue>,
common_utils::errors::ParsingError,
> {
Ok(self
.allowed_payment_method_types
.as_ref()
.map(Encode::encode_to_value)
.transpose()?
.map(Secret::new))
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ymentsCreateIntentRequest {",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "t_allowed_payment_method_types_as_value(\n",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ymentsCreateIntentRequest {_t_order_details_as_value(
| clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ymentsCreateIntentRequest {
b fn get_order_details_as_value(
&self,
) -> common_utils::errors::CustomResult<
Option<Vec<pii::SecretSerdeValue>>,
common_utils::errors::ParsingError,
> {
self.order_details
.as_ref()
.map(|od| {
od.iter()
.map(|order| order.encode_to_value().map(Secret::new))
.collect::<Result<Vec<_>, _>>()
})
.transpose()
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ymentsCreateIntentRequest {",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "t_order_details_as_value(\n",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_entsUpdateIntentRequest {
_te_feature_metadata_and_active_attempt_with_api(
| clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for entsUpdateIntentRequest {
fn update_feature_metadata_and_active_attempt_with_api(
feature_metadata: FeatureMetadata,
set_active_attempt_id: api_enums::UpdateActiveAttempt,
) -> Self {
Self {
feature_metadata: Some(feature_metadata),
set_active_attempt_id: Some(set_active_attempt_id),
amount_details: None,
routing_algorithm_id: None,
capture_method: None,
authentication_type: None,
billing: None,
shipping: None,
customer_present: None,
description: None,
return_url: None,
setup_future_usage: None,
apply_mit_exemption: None,
statement_descriptor: None,
order_details: None,
allowed_payment_method_types: None,
metadata: None,
connector_metadata: None,
payment_link_config: None,
request_incremental_authorization: None,
session_expiry: None,
frm_metadata: None,
request_external_three_ds_authentication: None,
enable_partial_authorization: None,
}
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "entsUpdateIntentRequest {\n ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "te_feature_metadata_and_active_attempt_with_api(\n ",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_tails {
p_zero_auth_payment(currenc | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for tails {
p
ew_for_zero_auth_payment(currency: common_enums::Currency) -> Self {
Self {
order_amount: Amount::Zero,
currency,
shipping_cost: None,
order_tax_amount: None,
skip_external_tax_calculation: common_enums::TaxCalculationOverride::Skip,
skip_surcharge_calculation: common_enums::SurchargeCalculationOverride::Skip,
surcharge_amount: None,
tax_on_surcharge: None,
}
}
}
#[cf
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "tails {\n p",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "zero_auth_payment(currenc",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_{
pub fn _ail | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for {
pub fn
unt_details_setter: AmountDetailsSetter) -> Self {
Self {
order_amount: amount_details_setter.order_amount,
currency: amount_details_setter.currency,
shipping_cost: amount_details_setter.shipping_cost,
order_tax_amount: amount_details_setter.order_tax_amount,
skip_external_tax_calculation: amount_details_setter.skip_external_tax_calculation,
skip_surcharge_calculation: amount_details_setter.skip_surcharge_calculation,
surcharge_amount: amount_details_setter.surcharge_amount,
tax_on_surcharge: amount_details_setter.tax_on_surcharge,
}
}
pub fn or
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "{\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ail",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_{
pub fn _self) -> Amo | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for {
pub fn
mount(&self) -> Amount {
self.order_amount
}
pub fn cu
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "{\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "self) -> Amo",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_{
pub fn _) -> com | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for {
pub fn
y(&self) -> common_enums::Currency {
self.currency
}
pub fn sh
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "{\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": ") -> com",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_{
pub fn _tax_calculation(&self) -> com | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for {
pub fn
ternal_tax_calculation(&self) -> common_enums::TaxCalculationOverride {
self.skip_external_tax_calculation
}
pub fn sk
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "{\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "tax_calculation(&self) -> com",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_{
pub fn __calculation(&self) -> com | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for {
pub fn
rcharge_calculation(&self) -> common_enums::SurchargeCalculationOverride {
self.skip_surcharge_calculation
}
pub fn su
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "{\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "_calculation(&self) -> com",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_pdate {
pub fn _&self) -> Opt | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pdate {
pub fn
g_cost(&self) -> Option<MinorUnit> {
self.shipping_cost
}
pub fn or
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "pdate {\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "&self) -> Opt",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_pdate {
pub fn _nt(&self) -> Opt | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pdate {
pub fn
ge_amount(&self) -> Option<MinorUnit> {
self.surcharge_amount
}
pub fn ta
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "pdate {\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "nt(&self) -> Opt",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_pdate {
pub fn _ge(&self) -> Opt | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pdate {
pub fn
surcharge(&self) -> Option<MinorUnit> {
self.tax_on_surcharge
}
}
#[cfg(featu
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "pdate {\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ge(&self) -> Opt",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_pdate {
pub fn _self) -> Opt | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pdate {
pub fn
mount(&self) -> Option<Amount> {
self.order_amount
}
pub fn cu
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "pdate {\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "self) -> Opt",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_pdate {
pub fn _) -> Opt | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pdate {
pub fn
y(&self) -> Option<common_enums::Currency> {
self.currency
}
pub fn sh
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "pdate {\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": ") -> Opt",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_pdate {
pub fn _tax_calculation(&self) -> Opt | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pdate {
pub fn
ternal_tax_calculation(&self) -> Option<common_enums::TaxCalculationOverride> {
self.skip_external_tax_calculation
}
pub fn sk
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "pdate {\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "tax_calculation(&self) -> Opt",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_pdate {
pub fn __calculation(&self) -> Opt | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pdate {
pub fn
rcharge_calculation(&self) -> Option<common_enums::SurchargeCalculationOverride> {
self.skip_surcharge_calculation
}
pub fn su
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "pdate {\n pub fn ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "_calculation(&self) -> Opt",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_{
pub fn is_n_ation_call_required(&self) -> bool {
| clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for {
pub fn is_n
confirmation_call_required(&self) -> bool {
self.provider == Some(api_enums::CtpServiceProvider::Mastercard)
}
}
#[cfg(feature
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "{\n pub fn is_n",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ation_call_required(&self) -> bool {\n",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_tails {
pub fn is_s_&self) -> bool {
| clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for tails {
pub fn is_s
e_zero(&self) -> bool {
self.surcharge_amount == MinorUnit::new(0)
&& self.tax_amount.unwrap_or_default() == MinorUnit::new(0)
}
pub fn get_to
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "tails {\n pub fn is_s",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "&self) -> bool {\n",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_tails {
pub fn is_s_e_amount(&self) -> MinorUn | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for tails {
pub fn is_s
urcharge_amount(&self) -> MinorUnit {
self.surcharge_amount + self.tax_amount.unwrap_or_default()
}
pub fn get_s
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "tails {\n pub fn is_s",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "e_amount(&self) -> MinorUn",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_tails {
pub fn is_s_nt(&self) -> MinorUn | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for tails {
pub fn is_s
ge_amount(&self) -> MinorUnit {
self.surcharge_amount
}
pub fn get_t
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "tails {\n pub fn is_s",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "nt(&self) -> MinorUn",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_tails {
pub fn is_s_lf) -> Option< | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for tails {
pub fn is_s
unt(&self) -> Option<MinorUnit> {
self.tax_amount
}
}
#[cfg(feature
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "tails {\n pub fn is_s",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "lf) -> Option<",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ub fn is_n_tion_id_flow(&self) -> bool {
| clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ub fn is_n
transaction_id_flow(&self) -> bool {
matches!(
self.mandate_reference_id,
Some(MandateReferenceId::NetworkMandateId(_))
)
}
}
#[derive(Eq, P
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ub fn is_n",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "tion_id_flow(&self) -> bool {\n",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ferenceId {
pub fn new(_cto | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ferenceId {
pub fn new(
connector_mandate_id: Option<String>,
payment_method_id: Option<String>,
update_history: Option<Vec<UpdateHistory>>,
mandate_metadata: Option<pii::SecretSerdeValue>,
connector_mandate_request_reference_id: Option<String>,
) -> Self {
Self {
connector_mandate_id,
payment_method_id,
update_history,
mandate_metadata,
connector_mandate_request_reference_id,
}
}
pub fn get_c
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ferenceId {\n pub fn new(",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "cto",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ferenceId {
pub fn new(_ate_id(&self) -> Option< | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ferenceId {
pub fn new(
or_mandate_id(&self) -> Option<String> {
self.connector_mandate_id.clone()
}
pub fn get_pa
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ferenceId {\n pub fn new(",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ate_id(&self) -> Option<",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ferenceId {
pub fn new(__id(&self) -> Option< | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ferenceId {
pub fn new(
_method_id(&self) -> Option<String> {
self.payment_method_id.clone()
}
pub fn get_ma
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ferenceId {\n pub fn new(",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "_id(&self) -> Option<",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ferenceId {
pub fn new(_ta(&self) -> Option< | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ferenceId {
pub fn new(
_metadata(&self) -> Option<pii::SecretSerdeValue> {
self.mandate_metadata.clone()
}
pub fn get_co
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ferenceId {\n pub fn new(",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ta(&self) -> Option<",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ferenceId {
pub fn new(_ate_request_reference_id(&self) -> Option< | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ferenceId {
pub fn new(
or_mandate_request_reference_id(&self) -> Option<String> {
self.connector_mandate_request_reference_id.clone()
}
pub fn updat
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ferenceId {\n pub fn new(",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ate_request_reference_id(&self) -> Option<",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ferenceId {
pub fn new(_ut sel | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ferenceId {
pub fn new(
&mut self,
connector_mandate_id: Option<String>,
payment_method_id: Option<String>,
update_history: Option<Vec<UpdateHistory>>,
mandate_metadata: Option<pii::SecretSerdeValue>,
connector_mandate_request_reference_id: Option<String>,
) {
self.connector_mandate_id = connector_mandate_id.or(self.connector_mandate_id.clone());
self.payment_method_id = payment_method_id.or(self.payment_method_id.clone());
self.update_history = update_history.or(self.update_history.clone());
self.mandate_metadata = mandate_metadata.or(self.mandate_metadata.clone());
self.connector_mandate_request_reference_id = connector_mandate_request_reference_id
.or(self.connector_mandate_request_reference_id.clone());
}
}
#[derive(serde:
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ferenceId {\n pub fn new(",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ut sel",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ub fn new(_rin | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ub fn new(
_id: String) -> Self {
Self {
mandate_id: Some(mandate_id),
mandate_reference_id: None,
}
}
}
/// Passing th
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ub fn new(",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "rin",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_y_ad_ard_info(
&self,
| clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for y_ad
l_card_info(
&self,
additional_card_info: AdditionalCardInfo,
) -> Result<Self, error_stack::Report<ValidationError>> {
Ok(Self {
card_number: self.card_number.clone(),
card_exp_month: self.card_exp_month.clone(),
card_exp_year: self.card_exp_year.clone(),
card_holder_name: self.card_holder_name.clone(),
card_cvc: self.card_cvc.clone(),
card_issuer: self
.card_issuer
.clone()
.or(additional_card_info.card_issuer),
card_network: self
.card_network
.clone()
.or(additional_card_info.card_network.clone()),
card_type: self.card_type.clone().or(additional_card_info.card_type),
card_issuing_country: self
.card_issuing_country
.clone()
.or(additional_card_info.card_issuing_country),
bank_code: self.bank_code.clone().or(additional_card_info.bank_code),
nick_name: self.nick_name.clone(),
})
}
}
#[derive(Eq, P
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "y_ad",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ard_info(\n &self,\n ",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_{
pub fn appl_ayment_data(
&self,
| clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for {
pub fn appl
ional_payment_data(
&self,
additional_payment_data: AdditionalPaymentData,
) -> Result<Self, error_stack::Report<ValidationError>> {
if let AdditionalPaymentData::Card(additional_card_info) = additional_payment_data {
match self {
Self::Card(card) => Ok(Self::Card(
card.apply_additional_card_info(*additional_card_info)?,
)),
_ => Ok(self.to_owned()),
}
} else {
Ok(self.to_owned())
}
}
pub fn get_p
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "{\n pub fn appl",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ayment_data(\n &self,\n ",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_{
pub fn appl_(&self) -> Option< | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for {
pub fn appl
_method(&self) -> Option<api_enums::PaymentMethod> {
match self {
Self::Card(_) => Some(api_enums::PaymentMethod::Card),
Self::CardRedirect(_) => Some(api_enums::PaymentMethod::CardRedirect),
Self::Wallet(_) => Some(api_enums::PaymentMethod::Wallet),
Self::PayLater(_) => Some(api_enums::PaymentMethod::PayLater),
Self::BankRedirect(_) => Some(api_enums::PaymentMethod::BankRedirect),
Self::BankDebit(_) => Some(api_enums::PaymentMethod::BankDebit),
Self::BankTransfer(_) => Some(api_enums::PaymentMethod::BankTransfer),
Self::RealTimePayment(_) => Some(api_enums::PaymentMethod::RealTimePayment),
Self::Crypto(_) => Some(api_enums::PaymentMethod::Crypto),
Self::Reward => Some(api_enums::PaymentMethod::Reward),
Self::Upi(_) => Some(api_enums::PaymentMethod::Upi),
Self::Voucher(_) => Some(api_enums::PaymentMethod::Voucher),
Self::GiftCard(_) => Some(api_enums::PaymentMethod::GiftCard),
Self::OpenBanking(_) => Some(api_enums::PaymentMethod::OpenBanking),
Self::MobilePayment(_) => Some(api_enums::PaymentMethod::MobilePayment),
Self::CardToken(_) | Self::MandatePayment => None,
}
}
}
pub trait GetP
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "{\n pub fn appl",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "(&self) -> Option<",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ata {
pub fn get__d_info(&self) -> Option< | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ata {
pub fn get_
nal_card_info(&self) -> Option<AdditionalCardInfo> {
match self {
Self::Card(additional_card_info) => Some(*additional_card_info.clone()),
_ => None,
}
}
}
#[derive(Debug
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ata {\n pub fn get_",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "d_info(&self) -> Option<",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ify the_other: Option | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ify the
(self, other: Option<&Self>) -> Self {
let other_address_details = other.and_then(|address| address.address.as_ref());
Self {
address: self
.address
.map(|address| address.unify_address_details(other_address_details))
.or(other_address_details.cloned()),
email: self.email.or(other.and_then(|other| other.email.clone())),
phone: self.phone.or(other.and_then(|other| other.phone.clone())),
}
}
}
// used by custo
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ify the",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "other: Option",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ pub fn get_op_me(&self) -> Option<Se | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pub fn get_op
full_name(&self) -> Option<Secret<String>> {
match (self.first_name.as_ref(), self.last_name.as_ref()) {
(Some(first_name), Some(last_name)) => Some(Secret::new(format!(
"{} {}",
first_name.peek(),
last_name.peek()
))),
(Some(name), None) | (None, Some(name)) => Some(name.to_owned()),
_ => None,
}
}
pub fn unify_a
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": " pub fn get_op",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "me(&self) -> Option<Se",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ pub fn get_op_s(self, other: Option | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pub fn get_op
_details(self, other: Option<&Self>) -> Self {
if let Some(other) = other {
let (first_name, last_name) = if self
.first_name
.as_ref()
.is_some_and(|first_name| !first_name.is_empty_after_trim())
{
(self.first_name, self.last_name)
} else {
(other.first_name.clone(), other.last_name.clone())
};
Self {
first_name,
last_name,
city: self.city.or(other.city.clone()),
country: self.country.or(other.country),
line1: self.line1.or(other.line1.clone()),
line2: self.line2.or(other.line2.clone()),
line3: self.line3.or(other.line3.clone()),
zip: self.zip.or(other.zip.clone()),
state: self.state.or(other.state.clone()),
origin_zip: self.origin_zip.or(other.origin_zip.clone()),
}
} else {
self
}
}
}
pub struct Addre
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": " pub fn get_op",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "s(self, other: Option",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ pub fn find_attempt_in_at_ing_connector_transaction_id(
&self,
connect | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pub fn find_attempt_in_at
list_using_connector_transaction_id(
&self,
connector_transaction_id: &common_utils::types::ConnectorTransactionId,
) -> Option<PaymentAttemptResponse> {
self.payment_attempt_list.iter().find_map(|attempt| {
attempt
.connector_payment_id
.as_ref()
.filter(|txn_id| *txn_id == connector_transaction_id)
.map(|_| attempt.clone())
})
}
pub fn find_attempt_in_atte
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": " pub fn find_attempt_in_at",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ing_connector_transaction_id(\n &self,\n connect",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ pub fn find_attempt_in_at_ing_charge_id(
&self,
charge_ | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pub fn find_attempt_in_at
list_using_charge_id(
&self,
charge_id: String,
) -> Option<PaymentAttemptResponse> {
self.payment_attempt_list.iter().find_map(|attempt| {
attempt.feature_metadata.as_ref().and_then(|metadata| {
metadata.revenue_recovery.as_ref().and_then(|recovery| {
recovery
.charge_id
.as_ref()
.filter(|id| **id == charge_id)
.map(|_| attempt.clone())
})
})
})
}
}
#[derive(Debug, serde::Deser
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": " pub fn find_attempt_in_at",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ing_charge_id(\n &self,\n charge_",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ pub fn has_no_attempt_fil_ bool {
self.c | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pub fn has_no_attempt_fil
elf) -> bool {
self.connector.is_none()
&& self.payment_method.is_none()
&& self.payment_method_type.is_none()
&& self.authentication_type.is_none()
&& self.merchant_connector_id.is_none()
&& self.card_network.is_none()
&& self.card_discovery.is_none()
}
}
#[derive(Clone, Debug, serde
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": " pub fn has_no_attempt_fil",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": " bool {\n self.c",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_rom_value(
_SecretSerd | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for rom_value(
: pii::SecretSerdeValue,
) -> common_utils::errors::CustomResult<Self, common_utils::errors::ParsingError> {
value
.parse_value::<Self>("ConnectorMetadata")
.change_context(common_utils::errors::ParsingError::StructParseFailure(
"Metadata",
))
}
pub fn get_apple_pay_certif
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "rom_value(\n ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "SecretSerd",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_rom_value(
_ -> Option<(Secret<String> | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for rom_value(
s(self) -> Option<(Secret<String>, Secret<String>)> {
self.apple_pay.and_then(|applepay_metadata| {
applepay_metadata
.session_token_data
.map(|session_token_data| {
let SessionTokenInfo {
certificate,
certificate_keys,
..
} = session_token_data;
(certificate, certificate_keys)
})
})
}
}
#[derive(Debug, Clone, Parti
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "rom_value(\n ",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": " -> Option<(Secret<String>",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ry_count(&self)_> {
sel | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ry_count(&self)
ion<u16> {
self.revenue_recovery
.as_ref()
.map(|metadata| metadata.total_retry_count)
}
pub fn set_payment_revenue_rec
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ry_count(&self)",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "> {\n sel",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ry_count(&self)_a_using_api(
self,
payment_reve | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for ry_count(&self)
metadata_using_api(
self,
payment_revenue_recovery_metadata: PaymentRevenueRecoveryMetadata,
) -> Self {
Self {
redirect_response: self.redirect_response,
search_tags: self.search_tags,
apple_pay_recurring_details: self.apple_pay_recurring_details,
revenue_recovery: Some(payment_revenue_recovery_metadata),
}
}
}
/// additional data that might b
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ry_count(&self)",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "a_using_api(\n self,\n payment_reve",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ pub fn get_billing_connector_card_> Option<&BillingConnectorAddit | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for pub fn get_billing_connector_card
self) -> Option<&BillingConnectorAdditionalCardInfo> {
match self {
Self::Card(card_details) => Some(card_details),
}
}
}
#[cfg(feature = "v2")]
impl PaymentR
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": " pub fn get_billing_connector_card",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "> Option<&BillingConnectorAddit",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ fn set_payment_transmission_f_equest(
&mut self,
payment_con | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for fn set_payment_transmission_f
r_api_request(
&mut self,
payment_connector_transmission: PaymentConnectorTransmission,
) {
self.payment_connector_transmission = Some(payment_connector_transmission);
}
pub fn get_payment_token_for_api_re
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": " fn set_payment_transmission_f",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "equest(\n &mut self,\n payment_con",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ fn set_payment_transmission_f_ -> mandates::ProcessorPaymentTok | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for fn set_payment_transmission_f
(&self) -> mandates::ProcessorPaymentToken {
mandates::ProcessorPaymentToken {
processor_payment_token: self
.billing_connector_payment_details
.payment_processor_token
.clone(),
merchant_connector_id: Some(self.active_attempt_payment_connector_id.clone()),
}
}
pub fn get_merchant_connector_id_fo
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": " fn set_payment_transmission_f",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": " -> mandates::ProcessorPaymentTok",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ fn set_payment_transmission_f_t(&self) -> id_type::MerchantConnectorAcc | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for fn set_payment_transmission_f
_request(&self) -> id_type::MerchantConnectorAccountId {
self.active_attempt_payment_connector_id.clone()
}
pub fn get_connector_customer_id(&
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": " fn set_payment_transmission_f",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "t(&self) -> id_type::MerchantConnectorAcc",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ fn set_payment_transmission_f_ng {
self.billing | clm | method | // hyperswitch/crates/api_models/src/payments.rs
// impl for fn set_payment_transmission_f
-> String {
self.billing_connector_payment_details
.connector_customer_id
.to_owned()
}
}
#[derive(Debug, Clone, Serialize, De
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": " fn set_payment_transmission_f",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "ng {\n self.billing",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ClientSecret_new | clm | method | // hyperswitch/crates/api_models/src/subscription.rs
// impl for ClientSecret
pub fn new(secret: String) -> Self {
Self(secret)
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ClientSecret",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "new",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ClientSecret_as_str | clm | method | // hyperswitch/crates/api_models/src/subscription.rs
// impl for ClientSecret
pub fn as_str(&self) -> &str {
&self.0
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ClientSecret",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "as_str",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ClientSecret_as_string | clm | method | // hyperswitch/crates/api_models/src/subscription.rs
// impl for ClientSecret
pub fn as_string(&self) -> &String {
&self.0
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ClientSecret",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "as_string",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_CreateAndConfirmSubscriptionRequest_get_billing_address | clm | method | // hyperswitch/crates/api_models/src/subscription.rs
// impl for CreateAndConfirmSubscriptionRequest
pub fn get_billing_address(&self) -> Option<Address> {
self.payment_details
.payment_method_data
.as_ref()
.and_then(|data| data.billing.clone())
.or(self.billing.clone())
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "CreateAndConfirmSubscriptionRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_billing_address",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_FieldType_get_billing_variants | clm | method | // hyperswitch/crates/api_models/src/enums.rs
// impl for FieldType
pub fn get_billing_variants() -> Vec<Self> {
vec![
Self::UserBillingName,
Self::UserAddressLine1,
Self::UserAddressLine2,
Self::UserAddressCity,
Self::UserAddressPincode,
Self::UserAddressState,
Self::UserAddressCountry { options: vec![] },
]
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "FieldType",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_billing_variants",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_FieldType_get_shipping_variants | clm | method | // hyperswitch/crates/api_models/src/enums.rs
// impl for FieldType
pub fn get_shipping_variants() -> Vec<Self> {
vec![
Self::UserShippingName,
Self::UserShippingAddressLine1,
Self::UserShippingAddressLine2,
Self::UserShippingAddressCity,
Self::UserShippingAddressPincode,
Self::UserShippingAddressState,
Self::UserShippingAddressCountry { options: vec![] },
]
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "FieldType",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_shipping_variants",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ExternalVerifyTokenResponse_get_user_id | clm | method | // hyperswitch/crates/api_models/src/external_service_auth.rs
// impl for ExternalVerifyTokenResponse
pub fn get_user_id(&self) -> &str {
match self {
Self::Hypersense { user_id, .. } => user_id,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ExternalVerifyTokenResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_user_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_IncomingWebhookEvent_from_ucs_event_type | clm | method | // hyperswitch/crates/api_models/src/webhooks.rs
// impl for IncomingWebhookEvent
pub fn from_ucs_event_type(event_type: i32) -> Self {
match event_type {
0 => Self::EventNotSupported,
// Payment intent events
1 => Self::PaymentIntentFailure,
2 => Self::PaymentIntentSuccess,
3 => Self::PaymentIntentProcessing,
4 => Self::PaymentIntentPartiallyFunded,
5 => Self::PaymentIntentCancelled,
6 => Self::PaymentIntentCancelFailure,
7 => Self::PaymentIntentAuthorizationSuccess,
8 => Self::PaymentIntentAuthorizationFailure,
9 => Self::PaymentIntentCaptureSuccess,
10 => Self::PaymentIntentCaptureFailure,
11 => Self::PaymentIntentExpired,
12 => Self::PaymentActionRequired,
// Source events
13 => Self::SourceChargeable,
14 => Self::SourceTransactionCreated,
// Refund events
15 => Self::RefundFailure,
16 => Self::RefundSuccess,
// Dispute events
17 => Self::DisputeOpened,
18 => Self::DisputeExpired,
19 => Self::DisputeAccepted,
20 => Self::DisputeCancelled,
21 => Self::DisputeChallenged,
22 => Self::DisputeWon,
23 => Self::DisputeLost,
// Mandate events
24 => Self::MandateActive,
25 => Self::MandateRevoked,
// Miscellaneous events
26 => Self::EndpointVerification,
27 => Self::ExternalAuthenticationARes,
28 => Self::FrmApproved,
29 => Self::FrmRejected,
// Payout events
#[cfg(feature = "payouts")]
30 => Self::PayoutSuccess,
#[cfg(feature = "payouts")]
31 => Self::PayoutFailure,
#[cfg(feature = "payouts")]
32 => Self::PayoutProcessing,
#[cfg(feature = "payouts")]
33 => Self::PayoutCancelled,
#[cfg(feature = "payouts")]
34 => Self::PayoutCreated,
#[cfg(feature = "payouts")]
35 => Self::PayoutExpired,
#[cfg(feature = "payouts")]
36 => Self::PayoutReversed,
_ => Self::EventNotSupported,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "IncomingWebhookEvent",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "from_ucs_event_type",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_WebhookResponseTracker_get_payment_id | clm | method | // hyperswitch/crates/api_models/src/webhooks.rs
// impl for WebhookResponseTracker
pub fn get_payment_id(&self) -> Option<common_utils::id_type::GlobalPaymentId> {
match self {
Self::Payment { payment_id, .. }
| Self::Refund { payment_id, .. }
| Self::Dispute { payment_id, .. } => Some(payment_id.to_owned()),
Self::NoEffect | Self::Mandate { .. } => None,
#[cfg(feature = "payouts")]
Self::Payout { .. } => None,
Self::Relay { .. } => None,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "WebhookResponseTracker",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_payment_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_WebhookResponseTracker_get_payment_method_id | clm | method | // hyperswitch/crates/api_models/src/webhooks.rs
// impl for WebhookResponseTracker
pub fn get_payment_method_id(&self) -> Option<String> {
match self {
Self::PaymentMethod {
payment_method_id, ..
} => Some(payment_method_id.to_owned()),
Self::Payment { .. }
| Self::Refund { .. }
| Self::Dispute { .. }
| Self::NoEffect
| Self::Mandate { .. }
| Self::Relay { .. } => None,
#[cfg(feature = "payouts")]
Self::Payout { .. } => None,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "WebhookResponseTracker",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_payment_method_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ObjectReferenceId_get_connector_transaction_id_as_string | clm | method | // hyperswitch/crates/api_models/src/webhooks.rs
// impl for ObjectReferenceId
pub fn get_connector_transaction_id_as_string(
self,
) -> Result<String, common_utils::errors::ValidationError> {
match self {
Self::PaymentId(
payments::PaymentIdType::ConnectorTransactionId(id)
) => Ok(id),
Self::PaymentId(_)=>Err(
common_utils::errors::ValidationError::IncorrectValueProvided {
field_name: "ConnectorTransactionId variant of PaymentId is required but received otherr variant",
},
),
Self::RefundId(_) => Err(
common_utils::errors::ValidationError::IncorrectValueProvided {
field_name: "PaymentId is required but received RefundId",
},
),
Self::MandateId(_) => Err(
common_utils::errors::ValidationError::IncorrectValueProvided {
field_name: "PaymentId is required but received MandateId",
},
),
Self::ExternalAuthenticationID(_) => Err(
common_utils::errors::ValidationError::IncorrectValueProvided {
field_name: "PaymentId is required but received ExternalAuthenticationID",
},
),
#[cfg(feature = "payouts")]
Self::PayoutId(_) => Err(
common_utils::errors::ValidationError::IncorrectValueProvided {
field_name: "PaymentId is required but received PayoutId",
},
),
Self::InvoiceId(_) => Err(
common_utils::errors::ValidationError::IncorrectValueProvided {
field_name: "PaymentId is required but received InvoiceId",
},
),
Self::SubscriptionId(_) => Err(
common_utils::errors::ValidationError::IncorrectValueProvided {
field_name: "PaymentId is required but received SubscriptionId",
},
),
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ObjectReferenceId",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_connector_transaction_id_as_string",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_IncomingWebhookEvent_is_recovery_transaction_event | clm | method | // hyperswitch/crates/api_models/src/webhooks.rs
// impl for IncomingWebhookEvent
pub fn is_recovery_transaction_event(&self) -> bool {
matches!(
self,
Self::RecoveryPaymentFailure
| Self::RecoveryPaymentSuccess
| Self::RecoveryPaymentPending
)
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "IncomingWebhookEvent",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "is_recovery_transaction_event",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_AnalyticsRequest_requires_forex_functionality | clm | method | // hyperswitch/crates/api_models/src/analytics.rs
// impl for AnalyticsRequest
pub fn requires_forex_functionality(&self) -> bool {
self.payment_attempt
.as_ref()
.map(|req| req.metrics.iter().any(|metric| metric.is_forex_metric()))
.unwrap_or_default()
|| self
.payment_intent
.as_ref()
.map(|req| req.metrics.iter().any(|metric| metric.is_forex_metric()))
.unwrap_or_default()
|| self
.refund
.as_ref()
.map(|req| req.metrics.iter().any(|metric| metric.is_forex_metric()))
.unwrap_or_default()
|| self
.dispute
.as_ref()
.map(|req| req.metrics.iter().any(|metric| metric.is_forex_metric()))
.unwrap_or_default()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "AnalyticsRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "requires_forex_functionality",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_CustomerRequest_get_optional_email | clm | method | // hyperswitch/crates/api_models/src/customers.rs
// impl for CustomerRequest
pub fn get_optional_email(&self) -> Option<pii::Email> {
Some(self.email.clone())
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "CustomerRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_optional_email",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_CustomerRequest_get_optional_email | clm | method | // hyperswitch/crates/api_models/src/customers.rs
// impl for CustomerRequest
pub fn get_optional_email(&self) -> Option<pii::Email> {
Some(self.email.clone())
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "CustomerRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_optional_email",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_CustomerResponse_get_merchant_reference_id | clm | method | // hyperswitch/crates/api_models/src/customers.rs
// impl for CustomerResponse
pub fn get_merchant_reference_id(&self) -> Option<id_type::CustomerId> {
self.merchant_reference_id.clone()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "CustomerResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_merchant_reference_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_CustomerResponse_get_merchant_reference_id | clm | method | // hyperswitch/crates/api_models/src/customers.rs
// impl for CustomerResponse
pub fn get_merchant_reference_id(&self) -> Option<id_type::CustomerId> {
self.merchant_reference_id.clone()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "CustomerResponse",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_merchant_reference_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_CustomerUpdateRequest_get_address | clm | method | // hyperswitch/crates/api_models/src/customers.rs
// impl for CustomerUpdateRequest
pub fn get_address(&self) -> Option<payments::AddressDetails> {
self.address.clone()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "CustomerUpdateRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_address",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_CustomerUpdateRequest_get_default_customer_billing_address | clm | method | // hyperswitch/crates/api_models/src/customers.rs
// impl for CustomerUpdateRequest
pub fn get_default_customer_billing_address(&self) -> Option<payments::AddressDetails> {
self.default_billing_address.clone()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "CustomerUpdateRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_default_customer_billing_address",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_CustomerUpdateRequest_get_default_customer_shipping_address | clm | method | // hyperswitch/crates/api_models/src/customers.rs
// impl for CustomerUpdateRequest
pub fn get_default_customer_shipping_address(&self) -> Option<payments::AddressDetails> {
self.default_shipping_address.clone()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "CustomerUpdateRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_default_customer_shipping_address",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_AuthenticationEligibilityRequest_get_next_action_api | clm | method | // hyperswitch/crates/api_models/src/authentication.rs
// impl for AuthenticationEligibilityRequest
pub fn get_next_action_api(
&self,
base_url: String,
authentication_id: String,
) -> CustomResult<NextAction, errors::ParsingError> {
let url = format!("{base_url}/authentication/{authentication_id}/authenticate");
Ok(NextAction {
url: url::Url::parse(&url).change_context(errors::ParsingError::UrlParsingError)?,
http_method: common_utils::request::Method::Post,
})
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "AuthenticationEligibilityRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_next_action_api",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_AuthenticationEligibilityRequest_get_billing_address | clm | method | // hyperswitch/crates/api_models/src/authentication.rs
// impl for AuthenticationEligibilityRequest
pub fn get_billing_address(&self) -> Option<Address> {
self.billing.clone()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "AuthenticationEligibilityRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_billing_address",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_AuthenticationEligibilityRequest_get_shipping_address | clm | method | // hyperswitch/crates/api_models/src/authentication.rs
// impl for AuthenticationEligibilityRequest
pub fn get_shipping_address(&self) -> Option<Address> {
self.shipping.clone()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "AuthenticationEligibilityRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_shipping_address",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_AuthenticationEligibilityRequest_get_browser_information | clm | method | // hyperswitch/crates/api_models/src/authentication.rs
// impl for AuthenticationEligibilityRequest
pub fn get_browser_information(&self) -> Option<BrowserInformation> {
self.browser_information.clone()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "AuthenticationEligibilityRequest",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_browser_information",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_ConnectorSelection_get_connector_list | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for ConnectorSelection
pub fn get_connector_list(&self) -> Vec<RoutableConnectorChoice> {
match self {
Self::Priority(list) => list.clone(),
Self::VolumeSplit(splits) => {
splits.iter().map(|split| split.connector.clone()).collect()
}
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "ConnectorSelection",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_connector_list",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_StaticRoutingAlgorithm_should_validate_connectors_in_routing_config | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for StaticRoutingAlgorithm
pub fn should_validate_connectors_in_routing_config(&self) -> bool {
match self {
Self::Single(_) | Self::Priority(_) | Self::VolumeSplit(_) | Self::Advanced(_) => true,
Self::ThreeDsDecisionRule(_) => false,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "StaticRoutingAlgorithm",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "should_validate_connectors_in_routing_config",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_StaticRoutingAlgorithm_get_kind | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for StaticRoutingAlgorithm
pub fn get_kind(&self) -> RoutingAlgorithmKind {
match self {
Self::Single(_) => RoutingAlgorithmKind::Single,
Self::Priority(_) => RoutingAlgorithmKind::Priority,
Self::VolumeSplit(_) => RoutingAlgorithmKind::VolumeSplit,
Self::Advanced(_) => RoutingAlgorithmKind::Advanced,
Self::ThreeDsDecisionRule(_) => RoutingAlgorithmKind::ThreeDsDecisionRule,
}
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "StaticRoutingAlgorithm",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "get_kind",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_RoutingAlgorithmRef_update_conditional_config_id | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for RoutingAlgorithmRef
pub fn update_conditional_config_id(&mut self, ids: String) {
self.config_algo_id = Some(ids);
self.timestamp = common_utils::date_time::now_unix_timestamp();
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RoutingAlgorithmRef",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "update_conditional_config_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_RoutingAlgorithmRef_update_surcharge_config_id | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for RoutingAlgorithmRef
pub fn update_surcharge_config_id(&mut self, ids: String) {
self.surcharge_config_algo_id = Some(ids);
self.timestamp = common_utils::date_time::now_unix_timestamp();
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RoutingAlgorithmRef",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "update_surcharge_config_id",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_RoutingAlgorithmRef_parse_routing_algorithm | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for RoutingAlgorithmRef
pub fn parse_routing_algorithm(
value: Option<pii::SecretSerdeValue>,
) -> Result<Option<Self>, error_stack::Report<ParsingError>> {
value
.map(|val| val.parse_value::<Self>("RoutingAlgorithmRef"))
.transpose()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "RoutingAlgorithmRef",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "parse_routing_algorithm",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_DynamicRoutingAlgorithmRef_update_volume_split | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for DynamicRoutingAlgorithmRef
pub fn update_volume_split(&mut self, volume: Option<u8>) {
self.dynamic_routing_volume_split = volume
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "DynamicRoutingAlgorithmRef",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "update_volume_split",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_DynamicRoutingAlgorithmRef_update_merchant_creation_status_in_decision_engine | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for DynamicRoutingAlgorithmRef
pub fn update_merchant_creation_status_in_decision_engine(&mut self, is_created: bool) {
self.is_merchant_created_in_decision_engine = is_created;
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "DynamicRoutingAlgorithmRef",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "update_merchant_creation_status_in_decision_engine",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
hyperswitch_method_api_models_DynamicRoutingAlgorithmRef_is_success_rate_routing_enabled | clm | method | // hyperswitch/crates/api_models/src/routing.rs
// impl for DynamicRoutingAlgorithmRef
pub fn is_success_rate_routing_enabled(&self) -> bool {
self.success_based_algorithm
.as_ref()
.map(|success_based_routing| {
success_based_routing.enabled_feature
== DynamicRoutingFeatures::DynamicConnectorSelection
|| success_based_routing.enabled_feature == DynamicRoutingFeatures::Metrics
})
.unwrap_or_default()
}
| {
"chunk": null,
"crate": "api_models",
"enum_name": null,
"file_size": null,
"for_type": "DynamicRoutingAlgorithmRef",
"function_name": null,
"is_async": null,
"is_pub": null,
"lines": null,
"method_name": "is_success_rate_routing_enabled",
"num_enums": null,
"num_items": null,
"num_structs": null,
"repo": "hyperswitch",
"start_line": null,
"struct_name": null,
"total_crates": null,
"trait_name": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.