Skip to content

Commit 3861257

Browse files
author
SudiptoChoudhury
committed
Add function addInvoiceLineItems
1 parent 38c1a07 commit 3861257

File tree

8 files changed

+65
-3
lines changed

8 files changed

+65
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,8 @@
4848
### 0.1.7
4949
- Update getPlans function
5050

51-
### 0.2.1 - update Api Forge
51+
### 0.2.1
52+
- update Api Forge
53+
54+
### 0.2.2
55+
- Add items to a pending invoice (addInvoiceLineItems)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ $resultJson = $subscriptions->addCustomer(['display_name'=> 'Sudipto Choudhury',
248248
`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` |
249249
`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) |
250250
`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/> |
251+
`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) |
251252
`getPricebooks()`<br/> \[GET\] /pricebooks | \[none\] | *Retreiving list of all pricebooks* |
252253
`deleteOrganization(array)`<br/> \[DELETE\] /organizations/{organization_id} | `organization_id` | *Deleting a particular Organization*<br/>**PlaceHolders to be replaced :**<br/> `organization_id` |
253-
`getOrganizations()`<br/> \[GET\] /organizations | \[none\] | *Retieving Details of all Organizations* |
254+
`getOrganizations()`<br/> \[GET\] /organizations | \[none\] | *Retrieving Details of all Organizations* |

src/zoho/subscriptions/Api.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
* @method array setInvoicePaymentDate(array $parameters) Update expected payment date fop the invoice. Reminders won't be sent till the date specified
175175
* @method array voidInvoice(array $parameters) Making an invoice as void
176176
* @method array addInvoiceCredits(array $parameters) Use the customer's open credits to the invoice
177+
* @method array addInvoiceLineItems(array $parameters) Add items to a pending invoice
177178
* @method array getPricebooks() Retreiving list of all pricebooks
178179
* @method array deleteOrganization(array $parameters) Deleting a particular Organization
179180
* @method array getOrganizations() Retieving Details of all Organizations

src/zoho/subscriptions/Import.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ protected function readApiName($params = [])
6060
'_setSubscriptionOnline' => 'setSubscriptionOffline',
6161
'_addSubscriptionLineItem' => 'addSubscriptionAddonLineItem',
6262
'_cancelSubscriptionNow' => 'cancelSubscription',
63+
'addInvoiceInvoiceItems' => 'addInvoiceLineItems',
6364
];
6465

6566
$apiName = $overwriteMatches[$apiName] ?? $overwriteMatches[strtolower($apiName)] ?? $apiName;

src/zoho/subscriptions/config/postman.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6634,6 +6634,46 @@
66346634
"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]()"
66356635
},
66366636
"response": []
6637+
},
6638+
{
6639+
"name": "Add items to a pending invoice",
6640+
"request": {
6641+
"method": "POST",
6642+
"header": [
6643+
{
6644+
"key": "Content-Type",
6645+
"value": "application/json"
6646+
},
6647+
{
6648+
"key": "X-com-zoho-subscriptions-organizationid",
6649+
"value": "{{organizationid}}"
6650+
},
6651+
{
6652+
"key": "Authorization",
6653+
"value": "Zoho-authtoken {{authtoken}}"
6654+
}
6655+
],
6656+
"body": {
6657+
"mode": "raw",
6658+
"raw": "{\n \"invoice_items\": \"Line Items\"\n}"
6659+
},
6660+
"url": {
6661+
"raw": "https://{{domain-url}}/api/v1/invoices/{invoice_id}/lineitems",
6662+
"protocol": "https",
6663+
"host": [
6664+
"{{domain-url}}"
6665+
],
6666+
"path": [
6667+
"api",
6668+
"v1",
6669+
"invoices",
6670+
"{invoice_id}",
6671+
"lineitems"
6672+
]
6673+
},
6674+
"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]()"
6675+
},
6676+
"response": []
66376677
}
66386678
]
66396679
},

src/zoho/subscriptions/config/subscriptions.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2917,6 +2917,19 @@
29172917
}
29182918
}
29192919
},
2920+
"addInvoiceLineItems": {
2921+
"httpMethod": "POST",
2922+
"uri": "invoices/{invoice_id}/lineitems",
2923+
"responseModel": "getResponse",
2924+
"parameters": {
2925+
"invoice_id": {
2926+
"location": "uri"
2927+
},
2928+
"invoice_items": {
2929+
"location": "json"
2930+
}
2931+
}
2932+
},
29202933
"getPricebooks": {
29212934
"httpMethod": "GET",
29222935
"uri": "pricebooks",

src/zoho/subscriptions/config/subscriptions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
* @method array setInvoicePaymentDate(array $parameters) Update expected payment date fop the invoice. Reminders won't be sent till the date specified
168168
* @method array voidInvoice(array $parameters) Making an invoice as void
169169
* @method array addInvoiceCredits(array $parameters) Use the customer's open credits to the invoice
170+
* @method array addInvoiceLineItems(array $parameters) Add items to a pending invoice
170171
* @method array getPricebooks() Retreiving list of all pricebooks
171172
* @method array deleteOrganization(array $parameters) Deleting a particular Organization
172173
* @method array getOrganizations() Retieving Details of all Organizations

subscriptions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
`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` |
173173
`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) |
174174
`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/> |
175+
`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) |
175176
`getPricebooks()`<br/> \[GET\] /pricebooks | \[none\] | *Retreiving list of all pricebooks* |
176177
`deleteOrganization(array)`<br/> \[DELETE\] /organizations/{organization_id} | `organization_id` | *Deleting a particular Organization*<br/>**PlaceHolders to be replaced :**<br/> `organization_id` |
177-
`getOrganizations()`<br/> \[GET\] /organizations | \[none\] | *Retieving Details of all Organizations* |
178+
`getOrganizations()`<br/> \[GET\] /organizations | \[none\] | *Retrieving Details of all Organizations* |

0 commit comments

Comments
 (0)