private static OfflineData createOfflineData ( DateTime transactionTime , long transactionMicroAmount , String transactionCurrency , String conversionName , List < UserIdentifier > userIdentifiers ) { StoreSalesTransaction storeSalesTransaction = new StoreSalesTransaction ( ) ; // For times use the format yyyyMMdd HHmmss [tz]. // For details, see // https://developers.google.com/adwords/api/docs/appendix/codes-formats#date-and-time-formats storeSalesTransaction . setTransactionTime ( transactionTime . toString ( "yyyyMMdd HHmmss ZZZ" ) ) ; storeSalesTransaction . setConversionName ( conversionName ) ; storeSalesTransaction . setUserIdentifiers ( userIdentifiers . toArray ( new UserIdentifier [ userIdentifiers . size ( ) ] ) ) ; Money money = new Money ( ) ; money . setMicroAmount ( transactionMicroAmount ) ; MoneyWithCurrency moneyWithCurrency = new MoneyWithCurrency ( ) ; moneyWithCurrency . setMoney ( money ) ; moneyWithCurrency . setCurrencyCode ( transactionCurrency ) ; storeSalesTransaction . setTransactionAmount ( moneyWithCurrency ) ; OfflineData offlineData = new OfflineData ( ) ; offlineData . setStoreSalesTransaction ( storeSalesTransaction ) ; return offlineData ; }
Returns a new offline data object with the specified values .