Unit Tests and Functional Tests for Invoicing

- Updated Unit Tests for PPModels used by Invoicing
- Updated Functional Tests
- Updated Samples for quick changes.
This commit is contained in:
japatel
2014-11-19 15:21:18 -06:00
parent ef4797a94c
commit 026802443d
41 changed files with 3795 additions and 7 deletions

View File

@@ -0,0 +1,35 @@
{
"operationId": "invoice.cancel",
"title": "Cancel an invoice",
"description": "Cancel an invoice",
"runnable": true,
"user": {
"scopes": []
},
"credentials": {
"oauth": {
"clientId": "",
"clientSecret": "",
"path": ""
},
"login": {},
"openIdConnect": {}
},
"request": {
"path": "v1/invoicing/invoices/INV2-WW57-VFCD-X5H4-XTUP/cancel",
"method": "POST",
"headers": {
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
},
"body": {
"subject": "Past due",
"note": "Canceling invoice",
"send_to_merchant": true,
"send_to_payer": true
}
},
"response": {
"headers": {},
"status": ""
}
}

View File

@@ -0,0 +1,150 @@
{
"operationId": "invoice.create",
"title": "Create an invoice",
"description": "Create an invoice",
"runnable": true,
"user": {
"scopes": [
"https://uri.paypal.com/services/invoicing"
]
},
"credentials": {
"oauth": {
"clientId": "stage2managed",
"clientSecret": "secret",
"path": "/v1/oauth2/token"
},
"login": {},
"openIdConnect": {}
},
"request": {
"path": "v1/invoicing/invoices/",
"method": "POST",
"headers": {
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
},
"body": {"merchant_info": {
"email": "jaypatel512-facilitator@hotmail.com",
"first_name": "Dennis",
"last_name": "Doctor",
"business_name": "Medical Professionals, LLC",
"phone": {
"country_code": "001",
"national_number": "5032141716"
},
"address": {
"line1": "1234 Main St.",
"city": "Portland",
"state": "OR",
"postal_code": "97217",
"country_code": "US"
}
},
"billing_info": [
{
"email": "example@example.com"
}
],
"items": [
{
"name": "Sutures",
"quantity": 100,
"unit_price": {
"currency": "USD",
"value": "5.00"
}
}
],
"note": "Medical Invoice 16 Jul, 2013 PST",
"payment_term": {
"term_type": "NET_45"
},
"shipping_info": {
"first_name": "Sally",
"last_name": "Patient",
"business_name": "Not applicable",
"phone": {
"country_code": "001",
"national_number": "5039871234"
},
"address": {
"line1": "1234 Main St.",
"city": "Portland",
"state": "OR",
"postal_code": "97217",
"country_code": "US"
}
}
}
},
"response": {
"status": "201 Created",
"headers": {},
"body": {
"id": "INV2-RF6D-L66T-D7H2-CRU7",
"number": "ABCD4971",
"status": "DRAFT",
"merchant_info": {
"email": "ppaas_default@paypal.com",
"first_name": "Dennis",
"last_name": "Doctor",
"business_name": "Medical Professionals, LLC",
"phone": {
"country_code": "1",
"national_number": "5032141234"
},
"address": {
"line1": "1234 Main St.",
"city": "Portland",
"state": "OR",
"postal_code": "97217",
"country_code": "US"
}
},
"billing_info": [
{
"email": "email@example.com"
}
],
"shipping_info": {
"first_name": "Sally",
"last_name": "Patient",
"business_name": "Not applicable",
"phone": {
"country_code": "1",
"national_number": "5039871234"
},
"address": {
"line1": "1234 Broad St.",
"city": "Portland",
"state": "OR",
"postal_code": "97216",
"country_code": "US"
}
},
"items": [
{
"name": "Sutures",
"quantity": 100,
"unit_price": {
"currency": "USD",
"value": "5.00"
}
}
],
"invoice_date": "2014-02-27 PST",
"payment_term": {
"term_type": "NET_45",
"due_date": "2015-04-13 PDT"
},
"tax_calculated_after_discount": false,
"tax_inclusive": false,
"note": "Medical Invoice 16 Jul, 2013 PST",
"total_amount": {
"currency": "USD",
"value": "500.00"
}
}
}
}

View File

@@ -0,0 +1,31 @@
{
"description": "Delete an invoice",
"title": "Delete an invoice",
"runnable": true,
"operationId": "invoice.delete",
"user": {
"scopes": []
},
"credentials": {
"oauth": {
"clientId": "",
"clientSecret": "",
"path": ""
},
"login": {},
"openIdConnect": {}
},
"request": {
"path": "v1/invoicing/invoices/INV2-92MG-CNXV-ND7G-P3D2",
"method": "DELETE",
"headers": {
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
},
"body": {}
},
"response": {
"status": "",
"headers": {},
"body": {}
}
}

View File

@@ -0,0 +1,98 @@
{
"description": "Get the invoice resource for the given identifier.",
"title": "Get invoice details",
"runnable": true,
"operationId": "invoice.get",
"user": {
"scopes": []
},
"credentials": {
"oauth": {
"clientId": "",
"clientSecret": "",
"path": ""
},
"login": {},
"openIdConnect": {}
},
"request": {
"path": "v1/invoicing/invoices/INV2-RF6D-L66T-D7H2-CRU7",
"method": "GET",
"headers": {
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
},
"body": {}
},
"response": {
"status": "",
"headers": {},
"body": {
"id": "INV2-RF6D-L66T-D7H2-CRU7",
"number": "0002",
"status": "DRAFT",
"merchant_info": {
"email": "ppaas_default@paypal.com",
"first_name": "Dennis",
"last_name": "Doctor",
"business_name": "Medical Professionals, LLC",
"phone": {
"country_code": "1",
"national_number": "5032141716"
},
"address": {
"line1": "1234 Main St.",
"city": "Portland",
"state": "OR",
"postal_code": "97217",
"country_code": "US"
}
},
"billing_info": [
{
"email": "example@example.com"
}
],
"shipping_info": {
"first_name": "Sally",
"last_name": "Patient",
"business_name": "Not applicable",
"phone": {
"country_code": "1",
"national_number": "5039871234"
},
"address": {
"line1": "1234 Broad St.",
"city": "Portland",
"state": "OR",
"postal_code": "97216",
"country_code": "US"
}
},
"items": [
{
"name": "Sutures",
"quantity": 100,
"unit_price": {
"currency": "USD",
"value": "5.00"
}
}
],
"invoice_date": "2014-03-24 PDT",
"payment_term": {
"term_type": "NET_45",
"due_date": "2014-05-08 PDT"
},
"tax_calculated_after_discount": false,
"tax_inclusive": false,
"note": "Medical Invoice 16 Jul, 2013 PST",
"total_amount": {
"currency": "USD",
"value": "500.00"
},
"metadata": {
"created_date": "2014-03-24 12:11:52 PDT"
}
}
}
}

View File

@@ -0,0 +1,148 @@
{
"description": "get all invoices",
"title": "get all invoices",
"runnable": true,
"operationId": "invoice.get_all",
"user": {
"scopes": []
},
"credentials": {
"oauth": {
"clientId": "",
"clientSecret": "",
"path": ""
},
"login": {},
"openIdConnect": {}
},
"request": {
"path": "v1/invoicing/invoices?page=0&page_size=10&total_count_required=true",
"method": "GET",
"headers": {
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
},
"body": {}
},
"response": {
"status": "",
"headers": {},
"body": {
"total_count": 5,
"invoices": [
{
"id": "INV2-2NB5-UJ7A-YSUJ-ABCD",
"number": "9879878979003791",
"status": "DRAFT",
"merchant_info": {
"email": "sample@sample.com"
},
"billing_info": [
{
"email": "example@example.com"
}
],
"shipping_info": {
"email": "example@example.com",
"first_name": "Sally",
"last_name": "Patient",
"business_name": "Not applicable"
},
"invoice_date": "2014-02-27 PST",
"note": "Medical Invoice 16 Jul, 2013 PST",
"total_amount": {
"currency": "USD",
"value": "0.00"
},
"metadata": {
"created_date": "2014-02-27 23:55:58 PST"
}
},
{
"id": "INV2-5AYC-UE5K-XXEG-ABCD",
"number": "9879878979003790",
"status": "DRAFT",
"merchant_info": {
"email": "sample@sample.com"
},
"billing_info": [
{
"email": "example@example.com"
}
],
"shipping_info": {
"email": "example@example.com",
"first_name": "Sally",
"last_name": "Patient",
"business_name": "Not applicable"
},
"invoice_date": "2014-02-27 PST",
"note": "Medical Invoice 16 Jul, 2013 PST",
"total_amount": {
"currency": "USD",
"value": "0.00"
},
"metadata": {
"created_date": "2014-02-27 19:41:56 PST"
}
},
{
"id": "INV2-C4QH-KEKM-C5QE-ABCD",
"number": "9879878979003789",
"status": "DRAFT",
"merchant_info": {
"email": "sample@sample.com"
},
"billing_info": [
{
"email": "example@example.com"
}
],
"shipping_info": {
"email": "example@example.com",
"first_name": "Sally",
"last_name": "Patient",
"business_name": "Not applicable"
},
"invoice_date": "2014-02-27 PST",
"note": "Medical Invoice 16 Jul, 2013 PST",
"total_amount": {
"currency": "USD",
"value": "0.00"
},
"metadata": {
"created_date": "2014-02-27 15:34:11 PST"
}
},
{
"id": "INV2-RF6D-L66T-D7H2-CRU7",
"number": "9879878979003788",
"status": "DRAFT",
"merchant_info": {
"email": "sample@sample.com"
},
"billing_info": [
{
"email": "example@example.com"
}
],
"shipping_info": {
"email": "example@example.com",
"first_name": "Sally",
"last_name": "Patient",
"business_name": "Not applicable"
},
"invoice_date": "2014-02-27 PST",
"note": "Medical Invoice 16 Jul, 2013 PST",
"total_amount": {
"currency": "USD",
"value": "12.00"
},
"metadata": {
"created_date": "2014-02-27 15:34:01 PST"
}
}
]
}
}
}

View File

@@ -0,0 +1,33 @@
{
"description": "Generates QR code for the Invoice URL identified by invoice_id.",
"title": "Get QR code",
"runnable": true,
"operationId": "invoice.qr_code",
"user": {
"scopes": []
},
"credentials": {
"oauth": {
"clientId": "",
"clientSecret": "",
"path": ""
},
"login": {},
"openIdConnect": {}
},
"request": {
"path": "v1/invoicing/invoices/INV2-S6FG-ZZCK-VXMM-8KKP/qr-code",
"method": "GET",
"headers": {
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
},
"body": {}
},
"response": {
"status": "",
"headers": {},
"body": {
"image": "iVBORw0KGgoAA......XUDM"
}
}
}

View File

@@ -0,0 +1,21 @@
{
"description": "Record a payment for an invoice.",
"title": "Record a payment for an invoice.",
"runnable": true,
"operationId": "invoice.record-payment",
"request": {
"path": "v1/invoicing/invoices/INV2-T4UQ-VW4W-K7N7-XM2R/record-payment",
"method": "POST",
"headers": {},
"body": {
"method": "CASH",
"date": "2014-07-06 03:30:00 PST",
"note": "Cash received."
}
},
"response": {
"status": "",
"headers": {},
"body": {}
}
}

View File

@@ -0,0 +1,20 @@
{
"description": "Record a refund for an invoice.",
"title": "Record a refund for an invoice.",
"runnable": true,
"operationId": "invoice.record-refund",
"request": {
"path": "v1/invoicing/invoices/INV2-T4UQ-VW4W-K7N7-XM2R/record-refund",
"method": "POST",
"headers": {},
"body": {
"date" : "2013-11-10 14:00:00 PST",
"note" : "Refunded by cash!"
}
},
"response": {
"status": "",
"headers": {},
"body": {}
}
}

View File

@@ -0,0 +1,35 @@
{
"description": "Reminds the payer to pay the invoice.",
"title": "Reminds the payer to pay the invoice.",
"runnable": true,
"operationId": "invoice.remind",
"user": {
"scopes": []
},
"credentials": {
"oauth": {
"clientId": "",
"clientSecret": "",
"path": ""
},
"login": {},
"openIdConnect": {}
},
"request": {
"path": "v1/invoicing/invoices/INV2-T4UQ-VW4W-K7N7-XM2R/remind",
"method": "POST",
"headers": {
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
},
"body": {
"subject": "Past due",
"note": "Please pay soon",
"send_to_merchant": true
}
},
"response": {
"status": "",
"headers": {},
"body": {}
}
}

View File

@@ -0,0 +1,67 @@
{
"description": "Search for invoice resources.",
"title": "Search for invoice resources.",
"runnable": true,
"operationId": "invoice.search",
"user": {
"scopes": []
},
"credentials": {
"oauth": {
"clientId": "",
"clientSecret": "",
"path": ""
},
"login": {},
"openIdConnect": {}
},
"request": {
"path": "v1/invoicing/search/",
"method": "POST",
"headers": {
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
},
"body": {
"page": 0,
"page_size": 3,
"total_count_required": true
}
},
"response": {
"status": "",
"headers": {},
"body": {
"total_count": 1,
"invoices": [
{
"id": "INV2-RF6D-L66T-D7H2-CRU7",
"number": "0001",
"status": "SENT",
"merchant_info": {
"email": "dennis@sample.com"
},
"billing_info": [
{
"email": "sally-patient@example.com"
}
],
"shipping_info": {
"email": "sally-patient@example.com"
},
"invoice_date": "2012-05-09 PST",
"payment_term": {
"due_date": "2012-05-24 PST"
},
"total_amount": {
"currency": "USD",
"value": "250"
},
"metadata": {
"created_date": "2012-05-09 04:48:57 PST"
}
}
]
}
}
}

View File

@@ -0,0 +1,31 @@
{
"description": "Sends a legitimate invoice to the payer.",
"title": "Sends a legitimate invoice to the payer.",
"runnable": true,
"operationId": "invoice.send",
"user": {
"scopes": []
},
"credentials": {
"oauth": {
"clientId": "",
"clientSecret": "",
"path": ""
},
"login": {},
"openIdConnect": {}
},
"request": {
"path": "v1/invoicing/invoices/INV2-EHNV-LJ5S-A7DZ-V6NJ/send",
"method": "POST",
"headers": {
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
},
"body": {}
},
"response": {
"status": "",
"headers": {},
"body": {}
}
}

View File

@@ -0,0 +1,148 @@
{
"description": "Full update of the invoice resource for the given identifier.",
"title": "Full update of the invoice resource for the given identifier.",
"runnable": true,
"operationId": "invoice.update",
"user": {
"scopes": []
},
"credentials": {
"oauth": {
"clientId": "",
"clientSecret": "",
"path": ""
},
"login": {},
"openIdConnect": {}
},
"request": {
"path": "v1/invoicing/invoices/INV2-8UZ6-Q3DK-VZXV-SXQB",
"method": "PUT",
"headers": {
"X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}"
},
"body": {
"merchant_info": {
"email": "ppaas_default@paypal.com",
"first_name": "Dennis",
"last_name": "Doctor",
"business_name": "Medical Professionals, LLC",
"phone": {
"country_code": "001",
"national_number": "5032141716"
},
"address": {
"line1": "1234 Main St.",
"city": "Portland",
"state": "OR",
"postal_code": "97217",
"country_code": "US"
}
},
"billing_info": [
{
"email": "example@example.com"
}
],
"items": [
{
"name": "Sutures",
"quantity": 100,
"unit_price": {
"currency": "USD",
"value": "5"
}
}
],
"note": "Medical Invoice 16 Jul, 2013 PST",
"payment_term": {
"term_type": "NET_45"
},
"shipping_info": {
"first_name": "Sally",
"last_name": "Patient",
"business_name": "Not applicable",
"phone": {
"country_code": "001",
"national_number": "5039871234"
},
"address": {
"line1": "1234 Broad St.",
"city": "Portland",
"state": "OR",
"postal_code": "97216",
"country_code": "US"
}
}
}
},
"response": {
"status": "",
"headers": {},
"body": {
"id": "INV2-8UZ6-Q3DK-VZXV-SXQB",
"number": "0014",
"status": "DRAFT",
"merchant_info": {
"email": "ppaas_default@paypal.com",
"first_name": "Dennis",
"last_name": "Doctor",
"business_name": "Medical Professionals, LLC",
"phone": {
"country_code": "1",
"national_number": "5032141716"
},
"address": {
"line1": "1234 Main St.",
"city": "Portland",
"state": "OR",
"postal_code": "97217",
"country_code": "US"
}
},
"billing_info": [
{
"email": "example@example.com"
}
],
"shipping_info": {
"first_name": "Sally",
"last_name": "Patient",
"business_name": "Not applicable",
"phone": {
"country_code": "1",
"national_number": "5039871234"
},
"address": {
"line1": "1234 Broad St.",
"city": "Portland",
"state": "OR",
"postal_code": "97216",
"country_code": "US"
}
},
"items": [
{
"name": "Sutures",
"quantity": 100,
"unit_price": {
"currency": "USD",
"value": "5.00"
}
}
],
"invoice_date": "2014-03-24 PDT",
"payment_term": {
"term_type": "NET_45",
"due_date": "2014-05-08 PDT"
},
"tax_calculated_after_discount": false,
"tax_inclusive": false,
"note": "Medical Invoice 16 Jul, 2013 PST",
"total_amount": {
"currency": "USD",
"value": "500.00"
}
}
}
}