Friday 31 July 2015

Google Wallet Offers Expiry Dates

I've been working with Google Wallet API for the last week and it's been interesting, but also a little frustrating.

 If you're reading this then you've probably come to the realisation that setting up Google Wallet Offers is not a simple task, especially when compared to setting up Apple's Passbook Coupons.

I'm on the last leg of this project now and one of the final tasks is to roll expiry dates into the Google Offers I've created.

There's a handy snippet of code found at https://developers.google.com/wallet/objects/offers/tutorial which suggests it should be no big deal...

$validTimeInterval = new Google_TimeInterval();
$startDateTime = new Google_DateTime();
$startDateTime->setDate('2013-06-12T23:20:50.52Z');
$validTimeInterval->setStart($startDateTime);
$endDateTime = new Google_DateTime();
$endDateTime->setDate('2013-12-12T23:20:50.52Z');
$validTimeInterval->setEnd($endDateTime);

and then during the Offer creation:

$offerObject->setValidTimeInterval($validTimeInterval);


Unfortunately there's a little wrinkle there - the Google_TimeInterval and Google_DateTime classes were not included in any of the API libraries I couldn't find, and I couldn't find anything useful about where to get them.


Solution:

What you should be looking for is Google_Service_Walletobjects_TimeInterval and Google_Service_Walletobjects_DateTime so your code will be like this:

$validTimeInterval = new Google_Service_Walletobjects_TimeInterval();
$startDateTime = new Google_Service_Walletobjects_DateTime();
$startDateTime->setDate('2013-06-12T23:20:50.52Z');
$validTimeInterval->setStart($startDateTime);
$endDateTime = new Google_Service_Walletobjects_DateTime();
$endDateTime->setDate('2013-12-12T23:20:50.52Z');
$validTimeInterval->setEnd($endDateTime);

161 comments:

  1. Superb i really enjoyed very much with this article here. Really its a amazing article i had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.

    Digital Marketing Company in Chennnai

    ReplyDelete
  2. This blog is really informative. I gained more knowledge by reading your post. Thanks for providing us the useful information with us. Your blog is really helpful for me in attaining my knowledge in a right way.

    Seo Training in Chennai

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. Good one, very informative.. thanks for sharing your views and ideas.. it is very useful to me.. thanks once again.


    Android Training in chennai|
    IOS Training in chennai

    ReplyDelete
  5. This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
    Oracle training in Chennai

    Java training in Chennai | Java training in Annanagar

    Java training in Chennai | Java training institute in Chennai | Java course in Chennai

    Java training in Chennai | Java training institute in Chennai | Java course in Chennai

    ReplyDelete
  6. Thank you for sharing such great information with us. I really appreciate everything that you’ve done here and am glad to know that you really care about the world that we live in
    Python training in bangalore
    Python course in pune
    Python training in bangalore

    ReplyDelete
  7. This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.

    rpa training in chennai
    rpa training in bangalore
    rpa course in bangalore
    best rpa training in bangalore
    rpa online training

    ReplyDelete
  8. Very good information provided, Thanks a lot for sharing such useful information.

    bizreviews
    Education

    ReplyDelete
  9. Wonderful article! This was very depth and comprehensive blog. Thank to you for your sharing with us and keep continuous...
    RPA Training in Bangalore
    Robotics Courses in Bangalore
    Automation Courses in Bangalore
    RPA Courses in Bangalore
    Robotics Classes in Bangalore

    ReplyDelete
  10. I wish to say that this post is amazing, nice written and include approximately all important infos. I would like to see more posts like this
    Regards,
    Python Training in Chennai | Python Programming Classes | Python Classes in Chennai

    ReplyDelete
  11. Great post! I hope more unique tips about this topic and I am always following your blog. Please keeping more updates...
    R Training Institute in Chennai | R Programming Training in Chennai

    ReplyDelete
  12. This comment has been removed by the author.

    ReplyDelete
  13. Wow, what an awesome spot to spend hours and hours! It's beautiful and I'm also surprised that you had it all to yourselves! Kindly follow the links too Best HIV Treatment in India
    Top HIV Hospital in India
    HIV AIDS Treatment in Mumbai
    HIV Specialist in Bangalore
    HIV Positive Treatment in India
    Medicine for AIDS in India

    ReplyDelete
  14. ඔබගේ ලිපිය කියවීමට ඉතා සතුටුයි. බෙදාගැනීම සඳහා ස්තූතියි.

    cửa lưới chống muỗi

    lưới chống chuột

    cửa lưới dạng xếp

    cửa lưới tự cuốn

    ReplyDelete
  15. Si el agua cae al lago, desaparecerá( phụ kiện tủ bếp ). Pero si cae a la hoja de( phụ kiện tủ áo ) loto, brillará como una joya. Caer igual pero( thùng gạo thông minh ) estar con alguien es importante.

    ReplyDelete
  16. it is very much useful for me to understand many concepts and helped me a lot.

    DevOps Training in Chennai
    Splunk Training in Chennai

    ReplyDelete
  17. Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live.
    javascript training in chennai | javascript training institute in chennai | javascript course in chennai | javascript certification in chennai | best javascript training in chennai

    ReplyDelete
  18. Permainan ini merupakan permainan paling di cari untuk kategori permainan yang menggunakan kartu Domino. Mengapa demikian
    asikqq
    dewaqq
    sumoqq
    interqq
    pionpoker
    bandar ceme
    hobiqq
    paito warna
    forum prediksi

    ReplyDelete
  19. Nice Presentation and its hopefull words..
    if you want a cheap web hostinng in web
    cheap web hosting company chennai

    ReplyDelete
  20. I Got Job in my dream company with decent 12 Lacks Per Annum salary, I have learned this world most demanding course out there in the current IT Market from the data science training in pune Providers who helped me a lot to achieve my dreams comes true. Really worth trying Instant Approval Blog Comments Sites

    ReplyDelete
  21. Thanks For sharing a nice post about AWS Training Course.It is very helpful and AWS useful for us.aws training in bangalore

    ReplyDelete
  22. Hey Nice Blog!! Thanks For Sharing!!! Wonderful blog & good post. It is really very helpful to me, waiting for a more new post. Keep Blogging!Here is the best angular training online with free Bundle videos .

    contact No :- 9885022027.

    ReplyDelete
  23. This is really an awesome post, thanks for it. Keep adding more information to this.openspan training in bangalore

    ReplyDelete
  24. Enjoyed reading the article above, really explains everything in detail, the article is very interesting and effective. Thank you and good luck…

    Start your journey with Database Developer Training in Bangalore and get hands-on Experience with 100% Placement assistance from experts Trainers @Bangalore Training Academy Located in BTM Layout Bangalore.

    ReplyDelete
  25. Enjoyed reading the article above, really explains everything in detail, the article is very interesting and effective. Thank you and good luck.

    Best SAP EWM Training in Bangalore - Learn from best Real Time Experts Institutes in Bangalore with certified experts & get 100% assistance.

    ReplyDelete
  26. I can’t imagine that’s a great post. Thanks for sharing.

    Learn DevOps from the Industry Experts we bridge the gap between the need of the industry. eTechno Soft Solutions provide the Best DevOps Training in Bangalore .

    ReplyDelete
  27. Thanks for sharing valuable information...

    Selenium Training in Bangalore | Selenium Courses | Selenium Training Institutes - RIA Institute of Technology
    - Best Selenium Training in Bangalore - Placement oriented Selenium Training Institutes in Bangalore.
    Learn Selenium Testing Training from expert Trainers.

    ReplyDelete
  28. Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
    top workday online training
    best workday studio online training
    workday studio online training

    ReplyDelete

  29. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog,i want to share some Information about splunk videos . keep updates regularly..

    ReplyDelete
  30. I think you did an awesome job explaining it. Sure beats having to research it on my own. Thanks
    Maharaja Surajmal Brij University BCOM 1st, 2nd & Final Year Time Table 2020

    ReplyDelete
  31. This post is really nice and informative. The explanation given is really comprehensive and useful.

    aws course in bangalore
    aws videos

    ReplyDelete
  32. I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.

    oracle erp tutorial

    ReplyDelete
  33. Nice informations. Thank you so much for sharing this information.
    python course in coimbatore

    data science course in coimbatore

    android training institutes in coimbatore

    amazon web services training in coimbatore

    big data training in coimbatore

    RPA Course in coimbatore

    artificial intelligence training in coimbatore

    ReplyDelete
  34. Thank you so much for sharing this messages.
    artificial intelligence training in coimbatore

    DevOps Training institute in coimbatore

    Devops Certification in coimbatore

    Blue prism training in coimbatore

    RPA Course in coimbatore

    C and C++ training in coimbatore

    Robotic process automation training in coimbatore

    ReplyDelete
  35. Thank you so much for sharing this messages.
    artificial intelligence training in coimbatore

    DevOps Training institute in coimbatore

    Devops Certification in coimbatore

    Blue prism training in coimbatore

    RPA Course in coimbatore

    C and C++ training in coimbatore

    Robotic process automation training in coimbatore

    ReplyDelete
  36. This is a great article thanks for sharing this informative information. I will visit your blog regularly for some latest post.I also would like to share some COVID 19 Customised Awareness Vinly Stickers Printing Online.

    ReplyDelete
  37. С сумкой для девушек всё не так просто. Для дамы на первое место выходит то, как глядится атрибут. Девушка принимает решение растранжирить свое время, чтобы присмотреться к оригинальной для себя сумочке в гардеробчике, но несмотря ни на что произвести первое впечатление на друзей. В сумочке дамы можно обнаружить резинки для волос, невидимки, ключи, ценные бумаги. Каталог случаться гораздо больше, всё упираеться от объема облюбованного реквизита. В гардеробе женщины параллельно много сумок разных форм, расцветок и стилей. Для посещения на работу или учёбу леди выбирает среднюю сумку или клатч, для аудиенции с родственниками утрам. Интересно, что девушке редко даруют сумку. Аксессуары леди выбирает себе сама, а когда есть нужда, то предъявляет друзьям то, что она предпочитает в атрибуте требующего сувенира. Подарки и неожиданные приобретения здесь будут ненужны. Покупка инной аксессуара – это ответственное дело, но черезмерно приятное. Поэтому делайте это как можно чаще тут сумки екатеринбург .

    ReplyDelete
  38. Потрясающе волшебные, а также поразительно точные онлайн гадания для предсказания нашего дня грядущего - это исключительно то, с чем вы познакомитесь на сайте онлайн гаданий. Гадание ангелов является действенным быстрым и действенным инструментом для получения нужных сведений из ментального поля земли.

    ReplyDelete
  39. Excellent Blog! I would Thanks for sharing this wonderful content. It is very useful to us. I gained many unknown information, the way you have clearly explained is really fantastic. Keep posting such useful information.I really appreciate your article. the post has excellent tips which are useful. Nice post. Thanks for sharing! I want people to know just how good this information is in your article.
    Java training in Chennai

    Java Online training in Chennai

    Java Course in Chennai

    Best JAVA Training Institutes in Chennai

    Java training in Bangalore

    Java training in Hyderabad

    Java Training in Coimbatore

    Java Training

    Java Online Training

    ReplyDelete
  40. This blog is really informative. I gained more knowledge by reading your post. Thanks for providing us the useful information with us. Your blog is really helpful for me in attaining my knowledge in a right way.


    angular js training in chennai

    angular training in chennai

    angular js online training in chennai

    angular js training in bangalore

    angular js training in hyderabad

    angular js training in coimbatore

    angular js training

    angular js online training

    ReplyDelete
  41. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...

    AWS training in Chennai

    AWS Online Training in Chennai

    AWS training in Bangalore

    AWS training in Hyderabad

    AWS training in Coimbatore

    AWS training

    ReplyDelete
  42. This is the exact information I am been searching for, Thanks for sharing the required infos with the clear update and required points.
    acte reviews

    acte velachery reviews

    acte tambaram reviews

    acte anna nagar reviews

    acte porur reviews

    acte omr reviews

    acte chennai reviews

    acte student reviews

    ReplyDelete
  43. It helps the retailer to manage data and create a psychological picture of the customer to learn their sore points. Therefore, this trick used by the retailer tends to influence the customer easily. data science course syllabus

    ReplyDelete
  44. then you've never been in sales or are just completely not paying attention!).  How many thought Tom Hopkins (see above)?  Maybe not a sales guru, Salesforce interview questions and answers

    ReplyDelete
  45. Кафельная плитка Decovita очень хорошо подойдет к каждому интерьеру. Оптимальный выбор настенного покрытия способен украсить какую угодно перегородку или ванную комнату. Керамическая плитка делится на два вида - для пола и настенная. Различают покрытие по компактности, консистенции добавок и толщине. Отдельным видом представлена плитка из керогранита.

    ReplyDelete
  46. And for making these decisions, managers need stats, trends and facts. Therefore, the importance of data science training can't be denied. data science course syllabus

    ReplyDelete
  47. Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share.
    data science course in India

    ReplyDelete
  48. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites!
    Artificial Intelligence Course

    ReplyDelete
  49. Feeling good to read such a informative blog, mostly i eagerly search for this kind of blog. I really found your blog informative and unique, waiting for your new blog to read.
    Digital marketing Service in Delhi
    SMM Services
    PPC Services in Delhi
    Website Design & Development Packages
    SEO Services Packages
    Local SEO services
    E-mail marketing services
    YouTube plans

    ReplyDelete
  50. Great,usefull

    https://www.acte.in/digital-marketing-training-in-bangalore

    https://www.acte.in/digital-marketing-training-in-hyderabad

    ReplyDelete
  51. Amazing Post. The choice of words is very unique. Interesting idea. Looking forward for your next post.
    DevOps Training in Chennai

    DevOps Course in Chennai

    ReplyDelete
  52. Nice & Informative Blog !
    If you are looking for the best accounting software that can help you manage your business operations. call us at QuickBooks Phone Number 1-(855) 550-7546.

    ReplyDelete
  53. Hey!! Great work. You have a very informative blog .You are doing well. Keep it up. We will also provide Quickbooks Subscription Error to alter Quickbook’s issues. If you have any issues regarding Quickbooks dial +1-8555-756-1077 for getting instant help.

    ReplyDelete
  54. Hey! Excellent work. Being a QuickBooks user, if you are struggling with any issue, then dial QuickBooks Phone Number (877)948-5867. Our team at QuickBooks will provide you with the best technical solutions for QuickBooks problems.

    ReplyDelete
  55. Nice Blog !
    QuickBooks is an accounting software that helps you manage and handle all the accounting operations at the same time.However, many times, you may come across errors like QuickBooks Error 1926 while working on this software.To get instant assistance for QuickBooks issues, Our team offers 24 hours of service to our clients.

    ReplyDelete
  56. Great writeup! Thanks so much for putting in the work and sharing with everyone.In case if you face any techincal issue in QuickBooks, you can contact Us:

    QuickBooks Customer Service


    ReplyDelete
  57. Great writeup! Thanks so much for putting in the work and sharing with everyone.In case if you face any techincal issue in QuickBooks, you can contact Us:

    QuickBooks Customer Service


    ReplyDelete
  58. Great writeup! Thanks so much for putting in the work and sharing with everyone.In case if you face any techincal issue in QuickBooks, you can contact Us:

    QuickBooks Customer Service


    ReplyDelete

  59. Wonderful post and more informative!keep sharing Like this!
    Linux Online Course
    Linux Online Training

    ReplyDelete
  60. Nice Blog, i really want to read more about this topic, please keep posted regularly.
    If you face any Error in QuickBooks then immediately contactQuickbooks Error Support

    ReplyDelete
  61. Hii awesome Article,
    The great information and useful article its really helpful. Thanks for sharing nice information. Golden Triangle Tour Package India

    ReplyDelete

  62. Hey! Mind-blowing blog. Keep writing such beautiful blogs. In case you are struggling with issues on QuickBooks software, dial QuickBooks Support Phone Number . The team, on the other end, will assist you with the best technical services.

    ReplyDelete
  63. A round of applause for your mind blowing article. Much thanks to you, Fantastic.

    ReplyDelete
  64. Ucuz, kaliteli ve organik sosyal medya hizmetleri satın almak için Ravje Medyayı tercih edebilir ve sosyal medya hesaplarını hızla büyütebilirsin. Ravje Medya ile sosyal medya hesaplarını organik ve gerçek kişiler ile geliştirebilir, kişisel ya da ticari hesapların için Ravje Medyayı tercih edebilirsin. Ravje Medya internet sitesine giriş yapmak için hemen tıkla: https://www.ravje.com

    İnstagram takipçi satın almak için Ravje Medya hizmetlerini tercih edebilir, güvenilir ve gerçek takipçilere Ravje Medya ile ulaşabilirsin. İnstagram takipçi satın almak artık Ravje Medya ile oldukça güvenilir. Hemen instagram takipçi satın almak için Ravje Medyanın ilgili sayfasını ziyaret et: instagram takipçi satın al

    Tiktok takipçi satın al istiyorsan tercihini Ravje Medya yap! Ravje Medya uzman kadrosu ve profesyonel ekibi ile sizlere Tiktok takipçi satın alma hizmetide sunmaktadır. Tiktok takipçi satın almak için hemen tıkla: tiktok takipçi satın al

    ReplyDelete
  65. Hey! Lovely blog. Your blog contains all the details and information related to the topic. In case you are a QuickBooks user, here is good news for you. You may encounter any error like QuickBooks Error, visit at QuickBooks Customer Service Number for quick help.

    ReplyDelete
  66. Hey! Mind-blowing blog. Keep writing such beautiful blogs. In case you are struggling with issues on QuickBooks software, dial QuickBooks Phone Number (855)626-4606. The team, on the other end, will assist you with the best technical services.

    ReplyDelete
  67. Great writing, never read such an informative blog and enjoy it. Thanks. Keep up the good work. We look forward to further reading.

    salon at home near me
    home salon services near me
    Waxing Salon At home in Noida
    beauty services at home near me

    ReplyDelete
  68. Hello!!
    Nice Blog,Good content. We provide a best Quickbooks Customer Serviceyou can contact us at.+1 888-471-2380,PA.

    ReplyDelete
  69. This comment has been removed by the author.

    ReplyDelete
  70. Thank For Sharing valuable information !! If you are having any issues with your software which offers Quickbooks Customer Support and is always available 24 hours a day to serve you with all your QuickBooks questions.

    ReplyDelete
  71. Nice Blog! ! QuickBooks provide solutions for any Quickbooks issues.contact Quickbooks Support +1 717-844-9353 to Get answers to all of your Quickbooks questions

    ReplyDelete
  72. Hey! Mind-blowing blog.. We will also provide
    Quickbooks customer service +17735165910 f or instant help.

    ReplyDelete
  73. Nice inspiring post. Your information is for me .visit my website at
    Quickbooks customer service+12677734333 For any financial help service

    ReplyDelete
  74. By dialling Quickbooks customer service you can find out more Informations About Quickbooks Software that could perform for your business accounting task

    ReplyDelete
  75. Very Good Information ! I like your Blog Quickbooks is an easy to use, Contact them for help at Quickbooks customer service

    ReplyDelete
  76. If you're looking for managing business Financial Task you reach us at Quickbooks Customer Support 211 Reid St, Elizabeth, NJ 07201, United States

    ReplyDelete
  77. QuickBooks- Accounting software is very popular If you are looking for help with QuickBooks, then call them at Quickbooks Customer Support

    ReplyDelete
  78. If you want to Quick Response From QuickBooksSoftware then you can Call at Quickbooks Customer Service+1 855-675-3194

    ReplyDelete
  79. http://www.rockfishsec.com/2015/05/gpu-password-cracking-with-amazon-ec2.html?sc=1696939283534#c9012660210970882828

    ReplyDelete
  80. Your ability to weave together data, narrative, and visual elements creates a multidimensional experience that's both informative and captivating.

    Marble Tiles Installation in Sharjah

    ReplyDelete
  81. https://icingdesignsonline.blogspot.com/2013/01/happy-birthday-to-you-my-sweet-friend.html?showComment=1632398177723#c6352145932701016228 medical staffing group
    http://www.akhbaroka.co.vu/2015/11/blog-post.html?showComment=1632398346084#c7015274223204329518 medical staff agency
    http://games.staynalive.com/2012/04/kinect-star-wars-good-and-bad-of-newest.html?showComment=1632398382281#c1375060337409629793 Reliable Healthcare Staffing

    ReplyDelete
  82. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharng this information,this is useful to me. Instagram Marketing Company In India

    ReplyDelete