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

customer_payments doesn't have POST method #57

Closed
HHry0918 opened this issue Jun 4, 2021 · 9 comments
Closed

customer_payments doesn't have POST method #57

HHry0918 opened this issue Jun 4, 2021 · 9 comments

Comments

@HHry0918
Copy link
Contributor

HHry0918 commented Jun 4, 2021

I was looking through the source code and see that there is no POST method for customer_payments. I was wondering if there is a way to do this manually?

@jarekwg
Copy link
Member

jarekwg commented Jun 5, 2021

Good spot!
Would you like to add it?

pymyob/myob/endpoints.py

Lines 31 to 36 in c6d7799

'Sale/CustomerPayment/': {
'name': 'customer_payments',
'methods': [
(ALL, '', 'sale customer payment type')
]
},

According to the docs
https://developer.myob.com/api/accountright/v2/sale/customerpayment/
we should also support:

(GET, '', 'sale customer payment'),
(POST, '', 'sale customer payment'),
(DELETE, '', 'sale customer payment'),

Bit of a non-standard endpoint, this one.

Also, should update the existing ALL one to not say type at the end, just 'sale customer payment'.

Cheers,

@HHry0918
Copy link
Contributor Author

HHry0918 commented Jun 6, 2021

I actually add CRUD on my computer for a quick fix for demonstration purpose so I'll push the correct version later

@HHry0918 HHry0918 closed this as completed Jun 6, 2021
@jarekwg
Copy link
Member

jarekwg commented Jun 6, 2021

Can leave the issue open until it's addressed.

@jarekwg jarekwg reopened this Jun 6, 2021
@HHry0918
Copy link
Contributor Author

HHry0918 commented Jun 7, 2021

I have pushed the new code

@jarekwg
Copy link
Member

jarekwg commented Jun 7, 2021

Where?

@HHry0918
Copy link
Contributor Author

HHry0918 commented Jun 7, 2021

Oh, I must not have pushed to this repo. Sorry about that, this is the 1st time I contributed to an open-source repo

@HHry0918
Copy link
Contributor Author

HHry0918 commented Jun 7, 2021

I accidentally fork this repo into my own repo and the pushed wasn't directing to this repo. Silly me

@jarekwg
Copy link
Member

jarekwg commented Jun 7, 2021

That's the right way to do it -- you fork the repo, push your changes, then open a PR here, where you propose for the changes in your fork to be merged here.

@jarekwg
Copy link
Member

jarekwg commented Aug 2, 2021

Resolved in #64

@jarekwg jarekwg closed this as completed Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants