Add interface to access 'PaymentOptions'

This commit is contained in:
2023-11-22 16:27:41 +01:00
parent cd77e380ef
commit 3a2e521345
4 changed files with 31 additions and 16 deletions

View File

@@ -169,7 +169,8 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json)
else if (strcmp(inner_obj_name, "pop_min_price") == 0) PaymentOption.pop_min_price = k->value.GetDouble();
else if (strcmp(inner_obj_name, "pop_carry_over") == 0) PaymentOption.pop_carry_over = k->value.GetInt();
else if (strcmp(inner_obj_name, "pop_daily_card_price") == 0) PaymentOption.pop_daily_card_price = k->value.GetInt();
break;
this->currentPaymentOptions = PaymentOption;
break;
case MemberType::DurationType:
if (strcmp(inner_obj_name, "pun_id") == 0) Duration.pun_id = k->value.GetInt();
else if (strcmp(inner_obj_name, "pun_label") == 0) Duration.pun_label = k->value.GetString();
@@ -259,3 +260,10 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json)
return false;
}
}
const ATBPaymentOption & Configuration::getPaymentOptions()
{
return this->currentPaymentOptions;
}