Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/Support for other Sage Accounting API endpoints #3

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

ZainIftikhar7vals
Copy link

Updated GEM For Sage Accounting API V3.1 and Added Support for All other available API endpoints.

  • Added bank_accounts, contact_payments, contacts, payment_methods, sales_invoices, services, stock_items, stock_movements and tax_rates API endpoints and moved them under module V3.1 as for API V2 endpoints are different.
  • Access token can be renewed using refresh_token, modified get_access_token method to use application/x-www-form-urlencoded as content type while making request.

…es_invoices, services, stock_items, stock_movements and tax_rates API endpoints and moved them under module V3 as for API V2 endpoints are different
…token method to use application/x-www-form-urlencoded as content tpye while making request
@@ -47,6 +48,17 @@ def request(method, path, options)
end
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comment: by default auto_traversal is true hence index data will be loaded at once in memory

:request_host,
:auto_traversal,
:raw_response].freeze
VALID_OPTIONS_KEYS = %i[
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

segregate dynamic and static attributes if possible

…d while calling sales_invoices end point for a specfic invoice
…ested hash into correctly formatted "date strings", now this method will aslo check if hash value is an array then it will loop on each element and calls format_datelike_objects if and only if its an hash
…lso sent business_id in header of each request
…eneric ClientError exception for 4xx http status codes for which specfic exception class is not defined and raised ServerError for 5xx http status codes for which specfic exception class is not defined
…lue using is_a? used case statement defaul implementation
…ntains remaining data and load it, this procedure will be repeated recursively until all data is loaded
…heck before fetching next_link from response body
…ror":"invalid_grant","error_description":"the submitted refresh_token is invalid"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant