Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
676 lars 1
<?php
2
 
3
namespace Srmklive\PayPal\Tests\Mocks\Responses;
4
 
5
use GuzzleHttp\Utils;
6
 
7
trait InvoicesSearch
8
{
9
    /**
10
     * @return array
11
     */
12
    private function mockSearchInvoicesResponse(): array
13
    {
14
        return Utils::jsonDecode('{
15
  "total_items": 6,
16
  "total_pages": 1,
17
  "items": [
18
    {
19
      "id": "INV2-Z56S-5LLA-Q52L-CPZ5",
20
      "status": "DRAFT",
21
      "detail": {
22
        "invoice_number": "#123",
23
        "reference": "deal-ref",
24
        "invoice_date": "2018-11-12",
25
        "currency_code": "USD",
26
        "note": "Thank you for your business.",
27
        "term": "No refunds after 30 days.",
28
        "memo": "This is a long contract",
29
        "payment_term": {
30
          "term_type": "NET_10",
31
          "due_date": "2018-11-22"
32
        },
33
        "metadata": {
34
          "create_time": "2018-11-12T08:00:20Z",
35
          "recipient_view_url": "https://www.api.paypal.com/invoice/p#Z56S5LLAQ52LCPZ5",
36
          "invoicer_view_url": "https://www.api.paypal.com/invoice/details/INV2-Z56S-5LLA-Q52L-CPZ5"
37
        }
38
      },
39
      "invoicer": {
40
        "email_address": "merchant@example.com"
41
      },
42
      "primary_recipients": [
43
        {
44
          "billing_info": {
45
            "email_address": "bill-me@example.com"
46
          }
47
        }
48
      ],
49
      "amount": {
50
        "currency_code": "USD",
51
        "value": "74.21"
52
      },
53
      "links": [
54
        {
55
          "href": "https://api.paypal.com/v2/invoicing/invoices/INV2-Z56S-5LLA-Q52L-CPZ5",
56
          "rel": "self",
57
          "method": "GET"
58
        }
59
      ]
60
    }
61
  ],
62
  "links": [
63
    {
64
      "href": "https://api.paypal.com/v2/invoicing/invoices?page=2&page_size=10&total_required=true",
65
      "rel": "next",
66
      "method": "POST"
67
    }
68
  ]
69
}', true);
70
    }
71
}