dovuofficial / guardian-php-sdk

Configuration based Guardian policy consumption and management for dovu platform
MIT License
0 stars 0 forks source link

Add policy token id fetch #3

Closed mattsmithies closed 2 years ago

mattsmithies commented 2 years ago

Why should we care?

We need a simple call to fetch the token id from the policy so that we can inject it into an instance of a ProjectPolicy, when carbon is sold on the marketplace we have a direct reference to the token ID for any transfers.

Additions

This is the new call on the SDK, it returns the same object from the API where the data payload has a single field of "policy_token_id", you can see how to access these items from the attached tests and scripts.

$sdk->policies->token($policy_id)