Class: Freshbooks::API::Callback

Inherits:
Client
  • Object
show all
Defined in:
lib/freshbooks/api/callback.rb

Overview

Instance Attribute Summary

Attributes inherited from Client

#api_url, #token

Instance Method Summary collapse

Methods inherited from Client

#call, #hash_to_raw_xml, #initialize, #options, #parse, #post, #to_request, #underscore

Methods included from CRUD

#create, #delete, #get, #list, #update

Methods included from Methods

#callbacks, #categories, #clients, #contractors, #currencies, #default_terms, #email_templates, #estimates, #expenses, #gateways, #invoices, #items, #languages, #payments, #projects, #receipts, #recurring, #reports, #staff, #systems, #tasks, #taxes, #time_entries

Constructor Details

This class inherits a constructor from Freshbooks::Client

Instance Method Details

#resend_token(params = {}) ⇒ Object

Resends a verification code to an unverified callback.

Parameters:

  • params (Hash) (defaults to: {})

    a hash of params to resend a callback token


17
18
19
# File 'lib/freshbooks/api/callback.rb', line 17

def resend_token(params = {})
  call('callback.resendToken', params)
end

#verify(params = {}) ⇒ Object

Verifies a callback using a unique verification code.

Parameters:

  • params (Hash) (defaults to: {})

    a hash of params to verify a callback


10
11
12
# File 'lib/freshbooks/api/callback.rb', line 10

def verify(params = {})
  call('callback.verify', callback: params)
end