Skip to content

Commit

Permalink
Pr purch endpoints (#88)
Browse files Browse the repository at this point in the history
* Merged changed for new credit endpoints

* added handling for endpoints SupplierPayment, DebitSettlement, DebitRefund
  • Loading branch information
timrichardson authored Sep 30, 2023
1 parent 9d9c5cf commit 455d43e
Show file tree
Hide file tree
Showing 2 changed files with 343 additions and 105 deletions.
56 changes: 50 additions & 6 deletions myob/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@
(DELETE, '', 'sale customer payment'),
]
},
'Sale/CreditRefund/': {
'name': 'credit_refunds',
'methods': [
(ALL, '', 'sale credit refund'),
(GET, '', 'sale credit refund'),
(POST, '', 'sale credit refund'),
(DELETE, '', 'sale credit refund'),
]
},
'Sale/CreditSettlement/': {
'name': 'credit_settlements',
'methods': [
(ALL, '', 'sale credit settlement'),
(GET, '', 'sale credit settlement'),
(POST, '', 'sale credit settlement'),
(DELETE, '', 'sale credit settlement'),
]
},
'Sale/Invoice/': {
'name': 'invoices',
'methods': [
Expand All @@ -45,6 +63,7 @@
(CRUD, 'Service/', 'service type sale invoice'),
]
},

'Sale/Order/': {
'name': 'orders',
'methods': [
Expand Down Expand Up @@ -86,22 +105,47 @@
(CRUD, 'Adjustment/', 'inventory adjustment')
]
},
'Purchase/Bill/': {
'name': 'purchase_bills',
'methods': [
(ALL, '', 'purchase bill type'),
(CRUD, 'Item/', 'item type purchase bill'),
(CRUD, 'Service/', 'service type purchase bill'),
(CRUD, 'Miscellaneous/', 'miscellaneous type purchase bill'),
]
},
'Purchase/DebitRefund/': {
'name': 'debit_refunds',
'methods': [
(ALL, '', 'purchase debit refund'),
(GET, '', 'purchase debit refund'),
(POST, '', 'purchase debit refund'),
(DELETE, '', 'purchase debit refund'),
]
},
'Purchase/DebitSettlement/': {
'name': 'debit_settlements',
'methods': [
(ALL, '', 'purchase debit settlement'),
(GET, '', 'purchase debit settlement'),
(POST, '', 'purchase debit settlement'),
(DELETE, '', 'purchase debit settlement'),
]
},
'Purchase/Order/': {
'name': 'purchase_orders',
'methods': [
(ALL, '', 'purchase order type'),
(CRUD, 'Item/', 'item type purchase order'),
]
},
'Purchase/Bill/': {
'name': 'purchase_bills',
'Purchase/SupplierPayment/': {
'name': 'supplier_payments',
'methods': [
(ALL, '', 'purchase bill type'),
(CRUD, 'Item/', 'item type purchase bill'),
(CRUD, 'Service/', 'service type purchase bill'),
(CRUD, 'Miscellaneous/', 'miscellaneous type purchase bill'),
(CRUD, '', 'purchase supplier payment'),
]
},

'Company/': {
'name': 'company',
'methods': [
Expand Down
Loading

0 comments on commit 455d43e

Please sign in to comment.