Skip to content

Commit

Permalink
Add function addInvoiceLineItems
Browse files Browse the repository at this point in the history
  • Loading branch information
SudiptoChoudhury committed Jul 13, 2019
1 parent 38c1a07 commit 3861257
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,8 @@
### 0.1.7
- Update getPlans function

### 0.2.1 - update Api Forge
### 0.2.1
- update Api Forge

### 0.2.2
- Add items to a pending invoice (addInvoiceLineItems)
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ $resultJson = $subscriptions->addCustomer(['display_name'=> 'Sudipto Choudhury',
`setInvoicePaymentDate(array)`<br/> \[POST\] /invoices/{invoice_id}/paymentdate | `invoice_id`<br/>`payment_expected_date`<br/>`stop_reminder_until_payment_expected_date` | *Update expected payment date fop the invoice. Reminders won't be sent till the date specified*<br/>**Placeholders to replace** : <br/> `invoice_id` |
`voidInvoice(array)`<br/>[ \[POST\] /invoices/{invoice_id}/void ](https://www.zoho.com/subscriptions/api/v1/#Invoices_Convert_to_void) | `invoice_id` | *Making an invoice as void*<br/>**Placeholders to replace** : <br/> `invoice_id`<br/>[API DOC](https://www.zoho.com/subscriptions/api/v1/#Invoices_Convert_to_void) |
`addInvoiceCredits(array)`<br/> \[POST\] /invoices/{invoice_id}/credits | `invoice_id`<br/>`apply_creditnotes` | *Use the customer's open credits to the invoice*<br/>**PlaceHolders to be replaced :**<br/> `invoice_id`<br/> |
`addInvoiceLineItems(array)`<br/> \[POST\] /invoices/{invoice_id}/lineitems | `invoice_id`<br/>`invoice_items` | *Add items to a pending invoice*<br/>**Placeholders to replace** : <br/> `invoice_id`<br/>[API DOC](https://www.zoho.com/subscriptions/api/v1/#Invoices_Add_items_to_a_pending_invoice) |
`getPricebooks()`<br/> \[GET\] /pricebooks | \[none\] | *Retreiving list of all pricebooks* |
`deleteOrganization(array)`<br/> \[DELETE\] /organizations/{organization_id} | `organization_id` | *Deleting a particular Organization*<br/>**PlaceHolders to be replaced :**<br/> `organization_id` |
`getOrganizations()`<br/> \[GET\] /organizations | \[none\] | *Retieving Details of all Organizations* |
`getOrganizations()`<br/> \[GET\] /organizations | \[none\] | *Retrieving Details of all Organizations* |
1 change: 1 addition & 0 deletions src/zoho/subscriptions/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
* @method array setInvoicePaymentDate(array $parameters) Update expected payment date fop the invoice. Reminders won't be sent till the date specified
* @method array voidInvoice(array $parameters) Making an invoice as void
* @method array addInvoiceCredits(array $parameters) Use the customer's open credits to the invoice
* @method array addInvoiceLineItems(array $parameters) Add items to a pending invoice
* @method array getPricebooks() Retreiving list of all pricebooks
* @method array deleteOrganization(array $parameters) Deleting a particular Organization
* @method array getOrganizations() Retieving Details of all Organizations
Expand Down
1 change: 1 addition & 0 deletions src/zoho/subscriptions/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ protected function readApiName($params = [])
'_setSubscriptionOnline' => 'setSubscriptionOffline',
'_addSubscriptionLineItem' => 'addSubscriptionAddonLineItem',
'_cancelSubscriptionNow' => 'cancelSubscription',
'addInvoiceInvoiceItems' => 'addInvoiceLineItems',
];

$apiName = $overwriteMatches[$apiName] ?? $overwriteMatches[strtolower($apiName)] ?? $apiName;
Expand Down
40 changes: 40 additions & 0 deletions src/zoho/subscriptions/config/postman.json
Original file line number Diff line number Diff line change
Expand Up @@ -6634,6 +6634,46 @@
"description": "*Use the customer's open credits to the invoice*\n\n**PlaceHolders to be replaced :**\n\n\t`invoice_id`\n\t\n[API DOC]()\n\n[HELP DOC]()"
},
"response": []
},
{
"name": "Add items to a pending invoice",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "X-com-zoho-subscriptions-organizationid",
"value": "{{organizationid}}"
},
{
"key": "Authorization",
"value": "Zoho-authtoken {{authtoken}}"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"invoice_items\": \"Line Items\"\n}"
},
"url": {
"raw": "https://{{domain-url}}/api/v1/invoices/{invoice_id}/lineitems",
"protocol": "https",
"host": [
"{{domain-url}}"
],
"path": [
"api",
"v1",
"invoices",
"{invoice_id}",
"lineitems"
]
},
"description": "*Add items to a pending invoice*\n\n**Placeholders to replace** : \n\n\t`invoice_id`\n\n[API DOC](https://www.zoho.com/subscriptions/api/v1/#Invoices_Add_items_to_a_pending_invoice)\n\n[HELP DOC]()"
},
"response": []
}
]
},
Expand Down
13 changes: 13 additions & 0 deletions src/zoho/subscriptions/config/subscriptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2917,6 +2917,19 @@
}
}
},
"addInvoiceLineItems": {
"httpMethod": "POST",
"uri": "invoices/{invoice_id}/lineitems",
"responseModel": "getResponse",
"parameters": {
"invoice_id": {
"location": "uri"
},
"invoice_items": {
"location": "json"
}
}
},
"getPricebooks": {
"httpMethod": "GET",
"uri": "pricebooks",
Expand Down
1 change: 1 addition & 0 deletions src/zoho/subscriptions/config/subscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
* @method array setInvoicePaymentDate(array $parameters) Update expected payment date fop the invoice. Reminders won't be sent till the date specified
* @method array voidInvoice(array $parameters) Making an invoice as void
* @method array addInvoiceCredits(array $parameters) Use the customer's open credits to the invoice
* @method array addInvoiceLineItems(array $parameters) Add items to a pending invoice
* @method array getPricebooks() Retreiving list of all pricebooks
* @method array deleteOrganization(array $parameters) Deleting a particular Organization
* @method array getOrganizations() Retieving Details of all Organizations
Expand Down
3 changes: 2 additions & 1 deletion subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
`setInvoicePaymentDate(array)`<br/> \[POST\] /invoices/{invoice_id}/paymentdate | `invoice_id`<br/>`payment_expected_date`<br/>`stop_reminder_until_payment_expected_date` | *Update expected payment date fop the invoice. Reminders won't be sent till the date specified*<br/>**Placeholders to replace** : <br/> `invoice_id` |
`voidInvoice(array)`<br/>[ \[POST\] /invoices/{invoice_id}/void ](https://www.zoho.com/subscriptions/api/v1/#Invoices_Convert_to_void) | `invoice_id` | *Making an invoice as void*<br/>**Placeholders to replace** : <br/> `invoice_id`<br/>[API DOC](https://www.zoho.com/subscriptions/api/v1/#Invoices_Convert_to_void) |
`addInvoiceCredits(array)`<br/> \[POST\] /invoices/{invoice_id}/credits | `invoice_id`<br/>`apply_creditnotes` | *Use the customer's open credits to the invoice*<br/>**PlaceHolders to be replaced :**<br/> `invoice_id`<br/> |
`addInvoiceLineItems(array)`<br/> \[POST\] /invoices/{invoice_id}/lineitems | `invoice_id`<br/>`invoice_items` | *Add items to a pending invoice*<br/>**Placeholders to replace** : <br/> `invoice_id`<br/>[API DOC](https://www.zoho.com/subscriptions/api/v1/#Invoices_Add_items_to_a_pending_invoice) |
`getPricebooks()`<br/> \[GET\] /pricebooks | \[none\] | *Retreiving list of all pricebooks* |
`deleteOrganization(array)`<br/> \[DELETE\] /organizations/{organization_id} | `organization_id` | *Deleting a particular Organization*<br/>**PlaceHolders to be replaced :**<br/> `organization_id` |
`getOrganizations()`<br/> \[GET\] /organizations | \[none\] | *Retieving Details of all Organizations* |
`getOrganizations()`<br/> \[GET\] /organizations | \[none\] | *Retrieving Details of all Organizations* |

0 comments on commit 3861257

Please sign in to comment.