// flynt-disable renamed-field-breaking-change, field-type-breaking-change

syntax = "proto3";

package com.wixpress.appservice.api.upstream.com.wixpress.billing.settings.spi;

import "wix/api/annotations.proto";
import "wix/spi/definitions.proto";
import "wix/api/validations.proto";


message BillingSettingsConfig {
    option (.wix.api.decomposite_of) = "com.wix.billing.settings.spi.BillingSettingsConfig";
  // name of the subscription type was it appears in relevant screens in Billing Platform
  string subscription_type = 1 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 200, (.wix.api.translatable) = {type: SHORT_TEXT}];
  // whether subscriptions end date can be updated
  bool allow_subscription_extension = 2;
  // whether subscription can be canceled not only immediately, but also at end of billing cycle by turning off auto-renew
  bool allow_auto_renew_off = 3;
  // whether changes can be made to the payment schedule and under what conditions.
  PaymentDateModification payment_date_modification = 4;
}


message PaymentDateModification {
    option (.wix.api.decomposite_of) = "com.wix.billing.settings.spi.PaymentDateModification";
  // Indicates whether the merchant can modify the payment date.
  // A value of true permits changes, while false means the payment date cannot be altered.
  bool allowed = 1; 
  // Specifies if adjustments to the price are enabled when the payment date is modified.
  // If true, changing the date to an earlier one results in proration,
  // while changing it to a later date incurs an extra charge.
  // Irrelevant if allowed is false.
  bool price_adjustment_enabled = 2;
}