import { factory } from 'factory-bot' import { datatype, date, internet, random } from 'faker' factory.define( 'google_in_app_notification', Object, { version: () => datatype.uuid(), packageName: () => random.word(), eventTimeMillis: () => new Date().valueOf(), subscriptionNotification: () => ({ version: datatype.uuid(), notificationType: datatype.number({ min: 1, max: 13 }), purchaseToken: datatype.uuid(), subscriptionId: datatype.uuid(), }), }, Object, ) factory.define( 'google_in_app_subscription', Object, { acknowledgementState: () => datatype.number(), autoRenewing: () => datatype.boolean(), autoResumeTimeMillis: () => date .future() .valueOf() .toString(), cancelReason: () => datatype.number(), cancelSurveyResult: () => ({ cancelSurveyReason: datatype.number(), userInputCancelReason: random.words(), }), countryCode: () => random.locale(), developerPayload: () => random.word(), emailAddress: () => internet.email(), expiryTimeMillis: () => date .future() .valueOf() .toString(), familyName: () => random.word(), givenName: () => random.word(), introductoryPriceInfo: () => ({ introductoryPriceAmountMicros: random.word(), introductoryPriceCurrencyCode: random.word(), introductoryPriceCycles: datatype.number(), introductoryPricePeriod: random.word(), }), kind: () => random.word(), linkedPurchaseToken: () => random.word(), orderId: () => random.word(), paymentState: () => datatype.number(), priceAmountMicros: () => random.word(), priceChange: () => ({ newPrice: { currency: random.word(), priceMicros: random.word(), }, state: random.words(), }), priceCurrencyCode: () => random.word(), profileId: () => random.word(), profileName: () => random.word(), purchaseType: () => datatype.number(), startTimeMillis: () => date .future() .valueOf() .toString(), userCancellationTimeMillis: () => date .future() .valueOf() .toString(), }, Object, ) export { factory }