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 which suggests it should be no big deal...

$validTimeInterval = new Google_TimeInterval();
$startDateTime = new Google_DateTime();
$endDateTime = new Google_DateTime();

and then during the Offer creation:


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.


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();
$endDateTime = new Google_Service_Walletobjects_DateTime();


  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

  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

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

  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

  5. Good and nice information, thanks for sharing your views and ideas.. keep rocks and updating

    Java Training in chennai

    Software Testing Training in chennai

  6. 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

  7. 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

  8. 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

  9. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
    Best Devops Training in pune
    excel advanced excel training in bangalore
    Devops Training in Chennai

  10. Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.
    Best AWS Training in Chennai | Amazon Web Services Training in Chennai
    AWS Training in Bangalore | Amazon Web Services Training in Bangalore
    Amazon Web Services Training in Pune | Best AWS Training in Pune

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


  12. This information is impressive; I am inspired with your post. Keep posting like this, This is very useful.Thank you so much. Waiting for more blogs like this.
    Airport management courses in chennai
    airline management courses in chennai
    aircraft maintenance course in chennai
    diploma in airport management in chennai

  13. 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

  14. I didn’t have enough good honest and conscientious people in my life so I was so scared to play all sorts of online games, slot machines, gamblingg But thank God, I got exactly on this site super top rated online casinos ere, everything is honest and the conclusions are quick and everything is beautiful and clear


  15. بسم الله الرحمن الرحيم نحن فى شركة الكمال نقوم بجميع عزل الخزانات المياه سواء كانت مياة الشرب او

    مياه الغسيل كما اننا يوجد لدين خدمة تسليك المجارى بافضل الطرق
    شركة عزل خزانات بالطائف
    شركة عزل خزانات بجازان
    شركة عزل خزانات بحائل
    والسلامة عليكم ورحمة الله وبركاته

  16. Алюминиевый профиль светодиодной ленты лучшее что я находил это в компании Ekodio, супер ребята рекоммендую.