func (m *NewPrototypeDelegate) validateKindEnum(path, location string, value string) error { if newPrototypeDelegateKindEnum == nil { var res []string if err := json.Unmarshal([]byte(`["user","team"]`), &res); err != nil { return err } for _, v := range res { newPrototypeDelegateKindEnum = append(newPrototypeDelegateKindEnum, v) } } return validate.Enum(path, location, value, newPrototypeDelegateKindEnum) }
func (m *TokenPermission) validateRoleEnum(path, location string, value string) error { if tokenPermissionRoleEnum == nil { var res []string if err := json.Unmarshal([]byte(`["read","write","admin"]`), &res); err != nil { return err } for _, v := range res { tokenPermissionRoleEnum = append(tokenPermissionRoleEnum, v) } } return validate.Enum(path, location, value, tokenPermissionRoleEnum) }
func (m *TeamDescription) validateRoleEnum(path, location string, value string) error { if teamDescriptionRoleEnum == nil { var res []string if err := json.Unmarshal([]byte(`["member","creator","admin"]`), &res); err != nil { return err } for _, v := range res { teamDescriptionRoleEnum = append(teamDescriptionRoleEnum, v) } } return validate.Enum(path, location, value, teamDescriptionRoleEnum) }
func (m *DiffEntry) validateChangeTypeEnum(path, location string, value string) error { if diffEntryChangeTypeEnum == nil { var res []string if err := json.Unmarshal([]byte(`["ADD","MODIFY","DELETE","RENAME","COPY"]`), &res); err != nil { return err } for _, v := range res { diffEntryChangeTypeEnum = append(diffEntryChangeTypeEnum, v) } } return validate.Enum(path, location, value, diffEntryChangeTypeEnum) }
func (m *ChangeVisibility) validateVisibilityEnum(path, location string, value string) error { if changeVisibilityVisibilityEnum == nil { var res []string if err := json.Unmarshal([]byte(`["public","private"]`), &res); err != nil { return err } for _, v := range res { changeVisibilityVisibilityEnum = append(changeVisibilityVisibilityEnum, v) } } return validate.Enum(path, location, value, changeVisibilityVisibilityEnum) }
func (m *NewPrototype) validateRoleEnum(path, location string, value string) error { if newPrototypeRoleEnum == nil { var res []string if err := json.Unmarshal([]byte(`["read","write","admin"]`), &res); err != nil { return err } for _, v := range res { newPrototypeRoleEnum = append(newPrototypeRoleEnum, v) } } return validate.Enum(path, location, value, newPrototypeRoleEnum) }
func (m *Notification) validateDomainEnum(path, location string, value string) error { if notificationDomainEnum == nil { var res []string if err := json.Unmarshal([]byte(`["Notification","Organization","OrganizationGateway","Product","User","Subscription","Profile","ProductRatePlan","Client","Invoice","PricingComponentValue","Account","PricingComponentValueChange","PricingComponentTier","PricingComponent","PricingCalculation","Coupon","CouponDiscount","CouponDefinition","CouponInstance","CouponModifier","CouponRule","CouponBookDefinition","CouponBook","InvoiceLine","Webhook","WebhookSubscription","SubscriptionCancellation","NotificationSnapshot","InvoicePayment","Payment","PaymentMethod","PaymentMethodSubscriptionLink","DunningLine","CybersourceToken","Card","Alias","PaypalSimplePaymentReconciliation","FreePaymentReconciliation","LocustworldPaymentReconciliation","CouponInstanceExistingValue","TaxLine","TaxationStrategy","TaxationLink","Address","AmendmentPriceNTime","Authority","UnitOfMeasure","SearchResult","Amendment","AuditLog","Password","Username","FixedTermDefinition","FixedTerm","Refund","CreditNote","Receipt","AmendmentCompoundConstituent","APIConfiguration","StripeToken","BraintreeToken","BalancedToken","AuthorizeNetToken","PaypalToken","SpreedlyToken","SagePayToken","TrustCommerceToken","PayVisionToken","SagePayOutstandingTransaction","SagePayEnabledCardType","SagePayTransaction","GatewayRevenue","Migration","AdhocSubscription","SubscriptionCharge","ComponentChange","Verification","UsageRoundingStrategies","PricingComponentValueMigrationChargeAmendmentMapping","AmendmentDiscardAmendment","EntityTime","AggregatingComponent","PricingComponentMigrationValue","MetadataKeyValue","Metadata","AggregationLink","BFPermission","Role","PermissionLink","PayVisionTransaction","KashToken","DataSynchronizationJob","DataSynchronizationJobError","DataSynchronizationConfiguration","DataSynchronizationAppConfiguration","AggregationChildrenResponse","InvoiceLinePayment","EmailSubscription","EmailProvider","TimeResponse","Email","RevenueAttribution","Unknown"]`), &res); err != nil { return err } for _, v := range res { notificationDomainEnum = append(notificationDomainEnum, v) } } if err := validate.Enum(path, location, value, notificationDomainEnum); err != nil { return err } return nil }
func (m *Notification) validateActionEnum(path, location string, value string) error { if notificationActionEnum == nil { var res []string if err := json.Unmarshal([]byte(`["Accept","Active","AwaitingPayment","AwaitingRefund","Cancelled","Completed","Created","Error","Expiring","Expired","Failed","Migrated","NeedsAmendments","Paid","Pending","Provisioned","Refunded","Reject","Trial","Unknown","Unpaid","Updated","Voided","PaymentFailed"]`), &res); err != nil { return err } for _, v := range res { notificationActionEnum = append(notificationActionEnum, v) } } if err := validate.Enum(path, location, value, notificationActionEnum); err != nil { return err } return nil }
func (m *ProductRatePlan) validateProRataModeEnum(path, location string, value string) error { if productRatePlanProRataModeEnum == nil { var res []string if err := json.Unmarshal([]byte(`["None","WithCoupon","WithoutCoupon","Full"]`), &res); err != nil { return err } for _, v := range res { productRatePlanProRataModeEnum = append(productRatePlanProRataModeEnum, v) } } if err := validate.Enum(path, location, value, productRatePlanProRataModeEnum); err != nil { return err } return nil }
func (m *PullRequestActivity) validateActionEnum(path, location string, value string) error { if pullRequestActivityActionEnum == nil { var res []string if err := json.Unmarshal([]byte(`["COMMENTED","OPENED","MERGED","APPROVED"]`), &res); err != nil { return err } for _, v := range res { pullRequestActivityActionEnum = append(pullRequestActivityActionEnum, v) } } if err := validate.Enum(path, location, value, pullRequestActivityActionEnum); err != nil { return err } return nil }
func (m *PaymentMethod) validateStateEnum(path, location string, value string) error { if paymentMethodStateEnum == nil { var res []string if err := json.Unmarshal([]byte(`["Pending","Active","Expiring","Expired"]`), &res); err != nil { return err } for _, v := range res { paymentMethodStateEnum = append(paymentMethodStateEnum, v) } } if err := validate.Enum(path, location, value, paymentMethodStateEnum); err != nil { return err } return nil }
func (m *Order) validateStatusEnum(path, location string, value string) error { if orderStatusEnum == nil { var res []string if err := json.Unmarshal([]byte(`["placed","approved","delivered"]`), &res); err != nil { return err } for _, v := range res { orderStatusEnum = append(orderStatusEnum, v) } } if err := validate.Enum(path, location, value, orderStatusEnum); err != nil { return err } return nil }
func (m *CreateAggregatingSubscriptionRequest) validateProductTypeEnum(path, location string, value string) error { if createAggregatingSubscriptionRequestProductTypeEnum == nil { var res []string if err := json.Unmarshal([]byte(`["nonrecurring","recurring"]`), &res); err != nil { return err } for _, v := range res { createAggregatingSubscriptionRequestProductTypeEnum = append(createAggregatingSubscriptionRequestProductTypeEnum, v) } } if err := validate.Enum(path, location, value, createAggregatingSubscriptionRequestProductTypeEnum); err != nil { return err } return nil }
func (m *CreateAggregatingSubscriptionRequest) validateDurationPeriodEnum(path, location string, value string) error { if createAggregatingSubscriptionRequestDurationPeriodEnum == nil { var res []string if err := json.Unmarshal([]byte(`["minutes","days","months","years"]`), &res); err != nil { return err } for _, v := range res { createAggregatingSubscriptionRequestDurationPeriodEnum = append(createAggregatingSubscriptionRequestDurationPeriodEnum, v) } } if err := validate.Enum(path, location, value, createAggregatingSubscriptionRequestDurationPeriodEnum); err != nil { return err } return nil }
func (m *Invoice) validateTypeEnum(path, location string, value string) error { if invoiceTypeEnum == nil { var res []string if err := json.Unmarshal([]byte(`["Subscription","Trial","Charge","FinalArrears","Amendment","Aggregated"]`), &res); err != nil { return err } for _, v := range res { invoiceTypeEnum = append(invoiceTypeEnum, v) } } if err := validate.Enum(path, location, value, invoiceTypeEnum); err != nil { return err } return nil }
func (m *Invoice) validateStateEnum(path, location string, value string) error { if invoiceStateEnum == nil { var res []string if err := json.Unmarshal([]byte(`["Paid","Unpaid","Pending","Voided"]`), &res); err != nil { return err } for _, v := range res { invoiceStateEnum = append(invoiceStateEnum, v) } } if err := validate.Enum(path, location, value, invoiceStateEnum); err != nil { return err } return nil }
func (m *Invoice) validateManagedByEnum(path, location string, value string) error { if invoiceManagedByEnum == nil { var res []string if err := json.Unmarshal([]byte(`["BillForward","Stripe"]`), &res); err != nil { return err } for _, v := range res { invoiceManagedByEnum = append(invoiceManagedByEnum, v) } } if err := validate.Enum(path, location, value, invoiceManagedByEnum); err != nil { return err } return nil }
func (m *Notification) validateStateEnum(path, location string, value string) error { if notificationStateEnum == nil { var res []string if err := json.Unmarshal([]byte(`["Unsent","Sending","Sent"]`), &res); err != nil { return err } for _, v := range res { notificationStateEnum = append(notificationStateEnum, v) } } if err := validate.Enum(path, location, value, notificationStateEnum); err != nil { return err } return nil }
func (m *MutableBillingEntity) validatePlatformEnum(path, location string, value string) error { if mutableBillingEntityPlatformEnum == nil { var res []string if err := json.Unmarshal([]byte(`["Salesforce"]`), &res); err != nil { return err } for _, v := range res { mutableBillingEntityPlatformEnum = append(mutableBillingEntityPlatformEnum, v) } } if err := validate.Enum(path, location, value, mutableBillingEntityPlatformEnum); err != nil { return err } return nil }
func (m *Product) validateProductTypeEnum(path, location string, value string) error { if productProductTypeEnum == nil { var res []string if err := json.Unmarshal([]byte(`["nonrecurring","recurring"]`), &res); err != nil { return err } for _, v := range res { productProductTypeEnum = append(productProductTypeEnum, v) } } if err := validate.Enum(path, location, value, productProductTypeEnum); err != nil { return err } return nil }
func (m *BFError) validateErrorTypeEnum(path, location string, value string) error { if bFErrorErrorTypeEnum == nil { var res []string if err := json.Unmarshal([]byte(`["BFError","ServerError","ValidationError","UnserializationException","Oauth","PermissionsError","PreconditionFailed","NotImplemented","InvocationError","NoSuchEntity","InconsistentState","StripeOperationFailure","BraintreeOperationFailure","BraintreeValidationError","SagePayOperationFailure","TokenizationAuthCaptureFailure","TokenizationPreAuthFailure","CouponException","CouponUniqueCodesRequestException","CouponUniqueCodesResponseException","RemoveCouponException","AddCouponCodeToSubscriptionRequestException","GatewayAuthenticationError","GatewayAuthorizationError","GatewayResourceNotFoundError","GatewayProtocolVersionError","GatewayInternalError","GatewayDownTemporarilyError","GatewayUnexpectedError","GatewayUnhandledError","GatewaySDKUnhandledError"]`), &res); err != nil { return err } for _, v := range res { bFErrorErrorTypeEnum = append(bFErrorErrorTypeEnum, v) } } if err := validate.Enum(path, location, value, bFErrorErrorTypeEnum); err != nil { return err } return nil }
func (m *Product) validateTrialPeriodEnum(path, location string, value string) error { if productTrialPeriodEnum == nil { var res []string if err := json.Unmarshal([]byte(`["none","minutes","days","months"]`), &res); err != nil { return err } for _, v := range res { productTrialPeriodEnum = append(productTrialPeriodEnum, v) } } if err := validate.Enum(path, location, value, productTrialPeriodEnum); err != nil { return err } return nil }
func (m *PaymentMethod) validateGatewayEnum(path, location string, value string) error { if paymentMethodGatewayEnum == 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 { paymentMethodGatewayEnum = append(paymentMethodGatewayEnum, v) } } if err := validate.Enum(path, location, value, paymentMethodGatewayEnum); err != nil { return err } return nil }
func (m *CreateSubscriptionRequest) validateStateEnum(path, location string, value string) error { if createSubscriptionRequestStateEnum == 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 { createSubscriptionRequestStateEnum = append(createSubscriptionRequestStateEnum, v) } } if err := validate.Enum(path, location, value, createSubscriptionRequestStateEnum); err != nil { return err } return nil }
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 }
func (m *ProductRatePlan) validateTaxStatusEnum(path, location string, value string) error { if productRatePlanTaxStatusEnum == nil { var res []string if err := json.Unmarshal([]byte(`["inclusive","exclusive"]`), &res); err != nil { return err } for _, v := range res { productRatePlanTaxStatusEnum = append(productRatePlanTaxStatusEnum, v) } } if err := validate.Enum(path, location, value, productRatePlanTaxStatusEnum); err != nil { return err } return nil }
func (m *CreateSubscriptionRequest) validateBillingEntityEnum(path, location string, value string) error { if createSubscriptionRequestBillingEntityEnum == nil { var res []string if err := json.Unmarshal([]byte(`["Notification","Organization","OrganizationGateway","Product","User","Subscription","Profile","ProductRatePlan","Client","Invoice","PricingComponentValue","Account","PricingComponentValueChange","PricingComponentTier","PricingComponent","PricingCalculation","CouponDefinition","CouponInstance","CouponModifier","CouponRule","CouponBookDefinition","CouponBook","InvoiceLine","Webhook","SubscriptionCancellation","NotificationSnapshot","InvoicePayment","InvoiceLinePayment","Payment","PaymentMethod","PaymentMethodSubscriptionLink","DunningLine","CybersourceToken","Card","Alias","PaypalSimplePaymentReconciliation","FreePaymentReconciliation","LocustworldPaymentReconciliation","CouponInstanceExistingValue","TaxLine","TaxationStrategy","TaxationLink","Address","AmendmentPriceNTime","Authority","UnitOfMeasure","SearchResult","Amendment","AuditLog","Password","Username","FixedTermDefinition","FixedTerm","Refund","CreditNote","Receipt","AmendmentCompoundConstituent","APIConfiguration","StripeToken","BraintreeToken","BalancedToken","PaypalToken","AuthorizeNetToken","SpreedlyToken","GatewayRevenue","AmendmentDiscardAmendment","CancellationAmendment","CompoundAmendment","CompoundAmendmentConstituent","FixedTermExpiryAmendment","InvoiceNextExecutionAttemptAmendment","PricingComponentValueAmendment","BraintreeMerchantAccount","WebhookSubscription","Migration","CassResult","CassPaymentResult","CassProductRatePlanResult","CassChurnResult","CassUpgradeResult","SubscriptionCharge","CassPaymentPProductResult","ProductPaymentsArgs","StripeACHToken","UsageAmount","UsageSession","Usage","UsagePeriod","Period","OfflinePayment","CreditNotePayment","CardVaultPayment","FreePayment","BraintreePayment","BalancedPayment","CybersourcePayment","PaypalPayment","PaypalSimplePayment","LocustWorldPayment","StripeOnlyPayment","ProductPaymentsResult","StripeACHPayment","AuthorizeNetPayment","CompoundUsageSession","CompoundUsage","UsageRoundingStrategies","BillforwardManagedPaymentsResult","PricingComponentValueMigrationChargeAmendmentMapping","SubscriptionLTVResult","AccountLTVResult","ProductRatePlanPaymentsResult","DebtsResult","AccountPaymentsResult","ComponentChange","QuoteRequest","Quote","CouponCharge","CouponInstanceInvoiceLink","Coupon","CouponDiscount","CouponUniqueCodesRequest","CouponUniqueCodesResponse","GetCouponsResponse","AddCouponCodeRequest","AddCouponCodeResponse","RemoveCouponFromSubscriptionRequest","TokenizationPreAuth","StripeTokenizationPreAuth","BraintreeTokenizationPreAuth","SpreedlyTokenizationPreAuth","SagePayTokenizationPreAuth","PayVisionTokenizationPreAuth","TokenizationPreAuthRequest","AuthCaptureRequest","StripeACHBankAccountVerification","PasswordReset","PricingRequest","AddTaxationStrategyRequest","AddPaymentMethodRequest","APIRequest","SagePayToken","SagePayNotificationRequest","SagePayNotificationResponse","SagePayOutstandingTransaction","SagePayEnabledCardType","TrustCommerceToken","SagePayTransaction","PricingComponentValueResponse","MigrationResponse","TimeResponse","EntityTime","Email","AggregationLink","BFPermission","Role","PermissionLink","PayVisionToken","PayVisionTransaction","KashToken","EmailProvider","DataSynchronizationJob","DataSynchronizationJobError","DataSynchronizationConfiguration","DataSynchronizationAppConfiguration","AggregationChildrenResponse","MetadataKeyValue","Metadata","AggregatingComponent","PricingComponentMigrationValue","InvoiceRecalculationAmendment","IssueInvoiceAmendment","EmailSubscription","RevenueAttribution"]`), &res); err != nil { return err } for _, v := range res { createSubscriptionRequestBillingEntityEnum = append(createSubscriptionRequestBillingEntityEnum, v) } } if err := validate.Enum(path, location, value, createSubscriptionRequestBillingEntityEnum); err != nil { return err } return nil }
func (m *Author) validateRoleEnum(path, location string, value string) error { if authorRoleEnum == nil { var res []string if err := json.Unmarshal([]byte(`["AUTHOR"]`), &res); err != nil { return err } for _, v := range res { authorRoleEnum = append(authorRoleEnum, v) } } if err := validate.Enum(path, location, value, authorRoleEnum); err != nil { return err } return nil }
func (m *CreateSubscriptionRequest) validateTypeEnum(path, location string, value string) error { if createSubscriptionRequestTypeEnum == nil { var res []string if err := json.Unmarshal([]byte(`["Subscription","FixedTerm","Trial"]`), &res); err != nil { return err } for _, v := range res { createSubscriptionRequestTypeEnum = append(createSubscriptionRequestTypeEnum, v) } } if err := validate.Enum(path, location, value, createSubscriptionRequestTypeEnum); err != nil { return err } return nil }
func (m *ProductRatePlan) validateMigrationBehaviourEnum(path, location string, value string) error { if productRatePlanMigrationBehaviourEnum == nil { var res []string if err := json.Unmarshal([]byte(`["NoCharge","CreditAccount"]`), &res); err != nil { return err } for _, v := range res { productRatePlanMigrationBehaviourEnum = append(productRatePlanMigrationBehaviourEnum, v) } } if err := validate.Enum(path, location, value, productRatePlanMigrationBehaviourEnum); err != nil { return err } return nil }