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

Payment services #439

Merged
merged 3 commits into from
Nov 17, 2018
Merged

Payment services #439

merged 3 commits into from
Nov 17, 2018

Conversation

jono-booth
Copy link
Contributor

The payment services end points are not in the public documentation as they are specific to a Partner Applications. You only receive these docs when you become a partner. I chatted to the guys from Xero and they were happy for me to add this to Xeroizer.

Work completed:

  • Payment services model
  • Fetch payment services for branding theme
  • Assign a payment service to a branding theme

Notes:
You cannot POST child records to Branding Themes.
The endpoints are:
GET /BrandingThemes/{BrandingThemeID}/PaymentServices
POST /BrandingThemes/{BrandingThemeID}/PaymentServices

I had to override the relationship helpers in the BrandingTheme model to get this to work. I am interested to know if there is a better way to do this.

@payment_services ||= @application.http_get(@application.client, payment_services_endpoint(id))
end

def add_payment_service(id:,payment_service_id:)
Copy link
Collaborator

Choose a reason for hiding this comment

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

formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@CloCkWeRX could you give me an example of proper formatting for named params please. Would this suffice?

def add_payment_service(id:, payment_service_id:)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure would :)

Copy link
Collaborator

@CloCkWeRX CloCkWeRX left a comment

Choose a reason for hiding this comment

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

I like it overall

@CloCkWeRX CloCkWeRX modified the milestones: 2.18.0+, 2.19.0 Nov 11, 2018
README.md Show resolved Hide resolved
@CloCkWeRX CloCkWeRX merged commit 6a41076 into waynerobinson:master Nov 17, 2018
@CloCkWeRX
Copy link
Collaborator

Nice work!

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.

2 participants