lib |
7y Gemfile |
7y Gemfile.lock |
7y LICENSE.txt |
7y README.md |
7y Rakefile |
7y field_edge_api.gemspec |
A Ruby wrapper for the Field Edge REST API.
Add this line to your application's Gemfile:
gem 'field_edge_api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install field_edge_api
Before you can make calls to FieldEdgeApi you must configure the library with a valid partner_key & company_key or a valid OAuth access token.
There are two ways to configure the gem. You can pass a hash of configuration options when you create a client, or you can use a configure block.
Using an OAuth access token:
client = FieldEdgeApi.client(access_token: "YOUR_ACCESS_TOKEN_HERE")
Using a Basic access authentication:
FieldEdgeApi.configure do |config| config.partner_key = "YOUR_PARTNER KEY_HERE" config.company_key = "YOUR_COMPANY KEY_HERE" end
Using OAuth access token
FieldEdgeApi.configure do |config| config.access_token = 'ACCESS_TOKEN' end
Create FieldEdgeApi client
client = FieldEdgeApi.client
get all the customers
client.customers
get specific customer details
client.customer('CUSTOMER_ID')
Use offset for pagination
client.customers(offset: 1)
filter customers by date
client.customers(afterLastModifiedDate: '2017-01-20T05:00:00Z')
get all the transactions
client.transactions
get specific transaction details
client.transaction('TRANSACTION_ID')
User offset for pagination
client.transactions(offset: 1)
filter transactions by date
client.transactions(afterTransactionDate: '2017-01-20T05:00:00Z')
get all the agreements
client.agreements
get specific agreement details
client.agreement('AGREEMENT_ID')
User offset for pagination
client.agreements(offset: 1)
filter agreements by date
client.agreements(afterOriginalContractDate: '2017-01-20T05:00:00Z')
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)