Shopify / shopify_app

A Rails Engine for building Shopify Apps
MIT License
1.76k stars 687 forks source link

Gift Card API Masked CODE #365

Closed seedcms closed 7 years ago

seedcms commented 7 years ago

I'm having an issues getting the gift card masked_code. https://help.shopify.com/api/reference/gift_card

"A gift card is a an .... – only a masked code or last 4 digits can be retrieved."

But all the end points are not showing masked_code as a listed field option. I've tried specifiying it in the query as well.

@giftcards = ShopifyAPI::GiftCard.find(:all, :params => {:fields=>'balance,id,masked_code', :page=>page, :limit => pagesize})

What is the proper query to access the field

jamiemtdwyer commented 7 years ago

Hey there,

You should use the last_characters parameter in order to retrieve the last four characters of the gift card. Apologies for the misleading documentation, I will update it ASAP.

In the future, it would be preferable to open issues like this in shopify_api or the developer forums, this repository should be reserved for issues with the Rails app generator.

Thanks!