taylorbrooks / closeio

A Ruby wrapper for the Close.io API
http://developer.close.com
MIT License
45 stars 57 forks source link

How to Pass Sorting Options? #82

Open Petercopter opened 6 months ago

Petercopter commented 6 months ago

What's the syntax for passing sort options? https://developer.close.com/resources/advanced-filtering/#sorting

I'm trying this right now...

@client.list_opportunities(
            {
              status_type: 'active',
              sort: [
                direction: 'asc',
                field: {
                  object_type: 'opportunity',
                  field_name: 'lead_name'
                }
              ]
            }

Thank you for the gem! 👍 🎉