// prop value enum
func (m *CreateAggregatingSubscriptionRequest) validateDurationPeriodEnum(path, location string, value string) error {
	if createAggregatingSubscriptionRequestTypeDurationPeriodPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["minutes","days","months","years"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			createAggregatingSubscriptionRequestTypeDurationPeriodPropEnum = append(createAggregatingSubscriptionRequestTypeDurationPeriodPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, createAggregatingSubscriptionRequestTypeDurationPeriodPropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *ProductRatePlan) validateTaxStatusEnum(path, location string, value string) error {
	if productRatePlanTypeTaxStatusPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["inclusive","exclusive"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			productRatePlanTypeTaxStatusPropEnum = append(productRatePlanTypeTaxStatusPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, productRatePlanTypeTaxStatusPropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *PricingComponentTier) validatePricingTypeEnum(path, location string, value string) error {
	if pricingComponentTierTypePricingTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["unit","fixed"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			pricingComponentTierTypePricingTypePropEnum = append(pricingComponentTierTypePricingTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, pricingComponentTierTypePricingTypePropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *ProductRatePlan) validateInvoiceIssueTypeEnum(path, location string, value string) error {
	if productRatePlanTypeInvoiceIssueTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["Immediate","Delayed","Manual"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			productRatePlanTypeInvoiceIssueTypePropEnum = append(productRatePlanTypeInvoiceIssueTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, productRatePlanTypeInvoiceIssueTypePropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *ProductRatePlan) validateProRataModeEnum(path, location string, value string) error {
	if productRatePlanTypeProRataModePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["None","WithCoupon","WithoutCoupon","Full"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			productRatePlanTypeProRataModePropEnum = append(productRatePlanTypeProRataModePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, productRatePlanTypeProRataModePropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #6
0
// prop value enum
func (m *TimeRequest) validateExecutionStrategyEnum(path, location string, value string) error {
	if timeRequestTypeExecutionStrategyPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["SingleAttempt","FollowDunning","None"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			timeRequestTypeExecutionStrategyPropEnum = append(timeRequestTypeExecutionStrategyPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, timeRequestTypeExecutionStrategyPropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *LocationDto) validateLocationTypeEnum(path, location string, value string) error {
	if locationDtoTypeLocationTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["HUB","DEPOT","DPD_DEPOT","LOAD_POINT","SERVICE_POINT","UNDEF","CUSTOMER_LOCATION","SLINGA","DISTRIBUTION_PARTNER","IPS_LOCATION","POSTAL_SERVICE_TERMINAL","DELIVERY_POINT"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			locationDtoTypeLocationTypePropEnum = append(locationDtoTypeLocationTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, locationDtoTypeLocationTypePropEnum); err != nil {
		return err
	}
	return nil
}
// property enum
func (m *StripeAuthCaptureRequest) validateGatewayEnum(path, location string, value string) error {
	if stripeAuthCaptureRequestTypeGatewayPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["Balanced","Braintree","Cybersource","Paypal","Stripe","AuthorizeNet","Spreedly","SagePay","TrustCommerce","Payvision","Kash"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			stripeAuthCaptureRequestTypeGatewayPropEnum = append(stripeAuthCaptureRequestTypeGatewayPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, stripeAuthCaptureRequestTypeGatewayPropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #9
0
// prop value enum
func (m *Subscription) validateManagedByEnum(path, location string, value string) error {
	if subscriptionTypeManagedByPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["BillForward","Stripe"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			subscriptionTypeManagedByPropEnum = append(subscriptionTypeManagedByPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, subscriptionTypeManagedByPropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #10
0
// prop value enum
func (m *InvoiceLine) validateTypeEnum(path, location string, value string) error {
	if invoiceLineTypeTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["PricingComponent","Coupon","Migration","AggregatedInvoice"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			invoiceLineTypeTypePropEnum = append(invoiceLineTypeTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, invoiceLineTypeTypePropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *ItemFreeTextDto) validateTypeEnum(path, location string, value string) error {
	if itemFreeTextDtoTypeTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["ICN","SIC","UNDEF"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			itemFreeTextDtoTypeTypePropEnum = append(itemFreeTextDtoTypeTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, itemFreeTextDtoTypeTypePropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #12
0
// prop value enum
func (m *InvoiceLine) validatePricingComponentTypeEnum(path, location string, value string) error {
	if invoiceLineTypePricingComponentTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["setup","subscription","arrears","usage"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			invoiceLineTypePricingComponentTypePropEnum = append(invoiceLineTypePricingComponentTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, invoiceLineTypePricingComponentTypePropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #13
0
// prop value enum
func (m *InvoiceLine) validateChargeTypeEnum(path, location string, value string) error {
	if invoiceLineTypeChargeTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["Credit","Debit"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			invoiceLineTypeChargeTypePropEnum = append(invoiceLineTypeChargeTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, invoiceLineTypeChargeTypePropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *CreateAggregatingSubscriptionRequest) validateProductTypeEnum(path, location string, value string) error {
	if createAggregatingSubscriptionRequestTypeProductTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["nonrecurring","recurring"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			createAggregatingSubscriptionRequestTypeProductTypePropEnum = append(createAggregatingSubscriptionRequestTypeProductTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, createAggregatingSubscriptionRequestTypeProductTypePropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #15
0
// prop value enum
func (m *WeightDto) validateUnitEnum(path, location string, value string) error {
	if weightDtoTypeUnitPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["g","kg"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			weightDtoTypeUnitPropEnum = append(weightDtoTypeUnitPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, weightDtoTypeUnitPropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #16
0
// prop value enum
func (m *Subscription) validateStateEnum(path, location string, value string) error {
	if subscriptionTypeStatePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["Trial","Provisioned","Paid","AwaitingPayment","Cancelled","Failed","Expired"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			subscriptionTypeStatePropEnum = append(subscriptionTypeStatePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, subscriptionTypeStatePropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #17
0
// prop value enum
func (m *TaskCard) validateStatusEnum(path, location string, value string) error {
	if taskCardTypeStatusPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["open","closed","ignored","rejected"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			taskCardTypeStatusPropEnum = append(taskCardTypeStatusPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, taskCardTypeStatusPropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #18
0
// prop value enum
func (m *Subscription) validateTypeEnum(path, location string, value string) error {
	if subscriptionTypeTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["Subscription","FixedTerm","Trial"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			subscriptionTypeTypePropEnum = append(subscriptionTypeTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, subscriptionTypeTypePropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *InvoicePayment) validateGatewayEnum(path, location string, value string) error {
	if invoicePaymentTypeGatewayPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["cybersource_token","card_vault","paypal_simple","locustworld","free","coupon","credit_note","stripe","braintree","balanced","paypal","billforward_test","offline","trial","stripeACH","authorizeNet","spreedly","sagePay","trustCommerce","payvision","kash"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			invoicePaymentTypeGatewayPropEnum = append(invoicePaymentTypeGatewayPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, invoicePaymentTypeGatewayPropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #20
0
// prop value enum
func (m *NewPrototypeDelegate) validateKindEnum(path, location string, value string) error {
	if newPrototypeDelegateTypeKindPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["user","team"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			newPrototypeDelegateTypeKindPropEnum = append(newPrototypeDelegateTypeKindPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, newPrototypeDelegateTypeKindPropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *ProductRatePlan) validateFailedPaymentBehaviourEnum(path, location string, value string) error {
	if productRatePlanTypeFailedPaymentBehaviourPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["CancelSubscription","None"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			productRatePlanTypeFailedPaymentBehaviourPropEnum = append(productRatePlanTypeFailedPaymentBehaviourPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, productRatePlanTypeFailedPaymentBehaviourPropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #22
0
// prop value enum
func (m *DunningLine) validateTypeEnum(path, location string, value string) error {
	if dunningLineTypeTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["Invoice","Notification"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			dunningLineTypeTypePropEnum = append(dunningLineTypeTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, dunningLineTypeTypePropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *ProductRatePlan) validateMigrationBehaviourEnum(path, location string, value string) error {
	if productRatePlanTypeMigrationBehaviourPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["NoCharge","CreditAccount"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			productRatePlanTypeMigrationBehaviourPropEnum = append(productRatePlanTypeMigrationBehaviourPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, productRatePlanTypeMigrationBehaviourPropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #24
0
// prop value enum
func (m *TeamPermission) validateRoleEnum(path, location string, value string) error {
	if teamPermissionTypeRolePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["read","write","admin"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			teamPermissionTypeRolePropEnum = append(teamPermissionTypeRolePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, teamPermissionTypeRolePropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *ProductRatePlan) validateProductTypeEnum(path, location string, value string) error {
	if productRatePlanTypeProductTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["nonrecurring","recurring"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			productRatePlanTypeProductTypePropEnum = append(productRatePlanTypeProductTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, productRatePlanTypeProductTypePropEnum); err != nil {
		return err
	}
	return nil
}
Exemple #26
0
// prop value enum
func (m *AccountDto) validateAccountTypeEnum(path, location string, value string) error {
	if accountDtoTypeAccountTypePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["BANKACCOUNT","UNDEF","BANKGIRO","PLUSGIRO","IBAN"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			accountDtoTypeAccountTypePropEnum = append(accountDtoTypeAccountTypePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, accountDtoTypeAccountTypePropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *ProductRatePlan) validateTrialPeriodEnum(path, location string, value string) error {
	if productRatePlanTypeTrialPeriodPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["none","minutes","days","months"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			productRatePlanTypeTrialPeriodPropEnum = append(productRatePlanTypeTrialPeriodPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, productRatePlanTypeTrialPeriodPropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *DistanceDto) validateUnitEnum(path, location string, value string) error {
	if distanceDtoTypeUnitPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["mm","cm","dm","m"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			distanceDtoTypeUnitPropEnum = append(distanceDtoTypeUnitPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, distanceDtoTypeUnitPropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *ShipmentDto) validateStatusEnum(path, location string, value string) error {
	if shipmentDtoTypeStatusPropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["CREATED","AVAILABLE_FOR_DELIVERY","DELAYED","DELIVERED","DELIVERY_IMPOSSIBLE","DELIVERY_REFUSED","EXPECTED_DELAY","INFORMED","EN_ROUTE","OTHER","RETURNED","STOPPED","SPLIT"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			shipmentDtoTypeStatusPropEnum = append(shipmentDtoTypeStatusPropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, shipmentDtoTypeStatusPropEnum); err != nil {
		return err
	}
	return nil
}
// prop value enum
func (m *APIErrorDescription) validateTitleEnum(path, location string, value string) error {
	if apiErrorDescriptionTypeTitlePropEnum == nil {
		var res []string
		if err := json.Unmarshal([]byte(`["downstream_issue","exceeds_license","expired_token","external_service_timeout","fresh_login_required","insufficient_scope","invalid_request","invalid_response","invalid_token","not_found"]`), &res); err != nil {
			return err
		}
		for _, v := range res {
			apiErrorDescriptionTypeTitlePropEnum = append(apiErrorDescriptionTypeTitlePropEnum, v)
		}
	}
	if err := validate.Enum(path, location, value, apiErrorDescriptionTypeTitlePropEnum); err != nil {
		return err
	}
	return nil
}