inv = {
  "EmployeeName": "Grace Guan",
  "CurrencyCode": "USD",
  "InvoiceNumber": "2020 Feb CEC",
  "DataSource": "MAN",
  "LedgerCode": "SAP B1",
  "CountryCode": "US",
  "Name": "20200229_Robert Rhee _2020 Feb CEC",
  "Description": nil,
  "OB10TransactionId": nil,
  "OB10BuyerId": nil,
  "BuyerCostCenter": nil,
  "CheckNumber": "10430",
  "PaymentTermsDays": "30",
  "PaymentMethod": "CHECK",
  "PaymentAdjustmentNotes": nil,
  "ReceiptConfirmationType": "NONE",
  "IsInvoiceConfirmed": "false",
  "NotesToVendor": nil,
  "DiscountTerms": nil,
  "ApprovalStatus": "R_APPR",
  "SubmittedByDelegate": "false",
  "ApprovedByDelegate": "false",
  "IsAssigned": "true",
  "CreatedByUsername": "gguan@syntactx.com",
  "AssignedByUsername": nil,
  "PaymentRequestCreatedByTestUser": "false",
  "PaymentRequestDeletedBy": nil,
  "IsPaymentRequestDeleted": "false",
  "IsTestTransaction": "false",
  "IsPaymentRequestDuplicate": "false",
  "UserCreationDate": "2020-03-05 21:32:06.0",
  "InvoiceDate": "2020-02-29 00:00:00.0",
  "PostingDate": nil,
  "FirstSubmitDate": "2020-03-05 21:34:52.0",
  "LastSubmitDate": "2020-03-05 21:34:52.0",
  "PaymentDueDate": "2020-02-29 00:00:00.0",
  "WorkflowCompleteDate": "2020-03-11 23:39:34.0",
  "ExtractDate": "2020-03-11 23:39:34.0",
  "PaidDate": "2020-03-12 07:01:38.0",
  "FirstApprovalDate": "2020-03-09 21:40:34.0",
  "AssignedDate": nil,
  "DeletedDate": nil,
  "InvoiceReceivedDate": nil,
  "PaymentStatus": "R_PAID",
  "InvoiceAmount": "1520.00000000",
  "CalculatedAmount": "1520.00000000",
  "TotalApprovedAmount": "1520.00000000",
  "ShippingAmount": "0.00000000",
  "TaxAmount": "0.00000000",
  "LineItemTotalAmount": "1520.00000000",
  "PaidAmount": "1520.00000000",
  "DiscountPercentage": nil,
  "LineItemVatAmount": "0.00000000",
  "DeliverySlipNumber": nil,
  "PurchaseOrderNumber": nil,
  "OrgUnit1": nil,
  "OrgUnit2": nil,
  "OrgUnit3": nil,
  "OrgUnit4": nil,
  "OrgUnit5": nil,
  "OrgUnit6": nil,
  "Custom1": nil,
  "Custom2": nil,
  "Custom3": nil,
  "Custom4": nil,
  "Custom5": nil,
  "Custom6": nil,
  "Custom7": "SynNA",
  "Custom8": "SFT001",
  "Custom9": "IC01",
  "Custom10": "10043",
  "Custom11": nil,
  "Custom12": nil,
  "Custom13": nil,
  "Custom14": nil,
  "Custom15": nil,
  "Custom16": "SynNA-1",
  "Custom17": nil,
  "Custom18": nil,
  "Custom19": nil,
  "Custom20": nil,
  "Custom21": nil,
  "Custom22": nil,
  "Custom23": nil,
  "Custom24": nil,
  "AmountWithoutVat": "1520.00000000",
  "VatAmountOne": "0.00000000",
  "VatAmountTwo": "0.00000000",
  "VatAmountThree": "0.00000000",
  "VatAmountFour": "0.00000000",
  "VatRateOne": nil,
  "VatRateTwo": nil,
  "VatRateThree": nil,
  "VatRateFour": nil,
  "TaxCode": nil,
  "ProvincialTaxId": nil,
  "VendorTaxId": nil,
  "ExternalPolicyId": "DFLT",
  "TaxCode2": nil,
  "TaxCode3": nil,
  "TaxCode4": nil,
  "VendorRemitAddress": {
    "Name": "Robert Rhee, MD",
    "DiscountTerms": nil,
    "AddressCode": "SynNA",
    "VendorCode": "S100208",
    "Address1": "10 Park Avenue",
    "Address2": nil,
    "Address3": nil,
    "City": "New York",
    "State": "NY",
    "PostalCode": "10016",
    "CountryCode": "US",
  },
  "VendorShipFromAddress": nil,
  "CompanyBillToAddress": nil,
  "CompanyShipToAddress": nil,
  "LineItems": {
    "LineItem": [
      {
        "LineItemId": "0D4CA212BB5DAC4AB0B0B426E691F61F",
        "ExpenseTypeCode": "2011",
        "RequestLineItemNumber": "5",
        "Quantity": "4.00000000",
        "Description": "PQB1001 - PQ Bypass DETOUR II Safety",
        "AllocationStatus": "NONE",
        "ShipToPostalCode": nil,
        "ShipFromPostalCode": nil,
        "LineItemIsTestUser": nil,
        "PurchaseOrderNumber": nil,
        "MatchedPurchaseOrderLineItemId": nil,
        "IsMatched": "false",
        "SupplierPartId": nil,
        "UnitOfMeasure": nil,
        "UnitPrice": "40.00000000",
        "TotalPrice": "160.00000000",
        "RequestedLineItemAmount": "160.00000000",
        "ApprovedLineItemAmount": "160.00000000",
        "Tax": nil,
        "AmountWithoutVat": "160.00000000",
        "VatAmount": "0.00000000",
        "VatAmountTwo": "0.00000000",
        "VatAmountThree": "0.00000000",
        "VatAmountFour": "0.00000000",
        "VatRate": nil,
        "VatRateTwo": nil,
        "VatRateThree": nil,
        "VatRateFour": nil,
        "TaxCode": nil,
        "TaxCode2": nil,
        "TaxCode3": nil,
        "TaxCode4": nil,
        "DeliverySlipNumber": nil,
        "Custom1": nil,
        "Custom2": nil,
        "Custom3": nil,
        "Custom4": nil,
        "Custom5": nil,
        "Custom6": nil,
        "Custom7": "SynNA",
        "Custom8": "SFT001",
        "Custom9": "C100067",
        "Custom10": "PQB1001",
        "Custom11": nil,
        "Custom12": nil,
        "Custom13": nil,
        "Custom14": nil,
        "Custom15": nil,
        "Custom16": nil,
        "Custom17": nil,
        "Custom18": nil,
        "Custom19": nil,
        "Custom20": nil,
        "Allocations": {
          "Allocation": [
            {
              "Percentage": "100.00000000",
              "AllocationAccountCode": "600010",
              "IsTestUser": nil,
              "Custom1": nil,
              "Custom2": nil,
              "Custom3": nil,
              "Custom4": nil,
              "Custom5": nil,
              "Custom6": nil,
              "Custom7": "SynNA",
              "Custom8": "SFT001",
              "Custom9": "C100067",
              "Custom10": "PQB1001",
              "Custom11": nil,
              "Custom12": nil,
              "Custom13": nil,
              "Custom14": nil,
              "Custom15": nil,
              "Custom16": nil,
              "Custom17": nil,
              "Custom18": nil,
              "Custom19": nil,
              "Custom20": nil,
            },
          ],
        },
        "MatchedPurchaseOrderReceipts": {
          "MatchedPurchaseOrderReceipt": [],
        },
      },
      {
        "LineItemId": "2443A19B645ED848A9B7D402D2046199",
        "ExpenseTypeCode": "2011",
        "RequestLineItemNumber": "2",
        "Quantity": "4.00000000",
        "Description": "10031 - IN.PACT Global CEC",
        "AllocationStatus": "NONE",
        "ShipToPostalCode": nil,
        "ShipFromPostalCode": nil,
        "LineItemIsTestUser": nil,
        "PurchaseOrderNumber": nil,
        "MatchedPurchaseOrderLineItemId": nil,
        "IsMatched": "false",
        "SupplierPartId": nil,
        "UnitOfMeasure": nil,
        "UnitPrice": "40.00000000",
        "TotalPrice": "160.00000000",
        "RequestedLineItemAmount": "160.00000000",
        "ApprovedLineItemAmount": "160.00000000",
        "Tax": nil,
        "AmountWithoutVat": "160.00000000",
        "VatAmount": "0.00000000",
        "VatAmountTwo": "0.00000000",
        "VatAmountThree": "0.00000000",
        "VatAmountFour": "0.00000000",
        "VatRate": nil,
        "VatRateTwo": nil,
        "VatRateThree": nil,
        "VatRateFour": nil,
        "TaxCode": nil,
        "TaxCode2": nil,
        "TaxCode3": nil,
        "TaxCode4": nil,
        "DeliverySlipNumber": nil,
        "Custom1": nil,
        "Custom2": nil,
        "Custom3": nil,
        "Custom4": nil,
        "Custom5": nil,
        "Custom6": nil,
        "Custom7": "SynNA",
        "Custom8": "SFT001",
        "Custom9": "C100018",
        "Custom10": "10031",
        "Custom11": nil,
        "Custom12": nil,
        "Custom13": nil,
        "Custom14": nil,
        "Custom15": nil,
        "Custom16": nil,
        "Custom17": nil,
        "Custom18": nil,
        "Custom19": nil,
        "Custom20": nil,
        "Allocations": {
          "Allocation": [
            {
              "Percentage": "100.00000000",
              "AllocationAccountCode": "600010",
              "IsTestUser": nil,
              "Custom1": nil,
              "Custom2": nil,
              "Custom3": nil,
              "Custom4": nil,
              "Custom5": nil,
              "Custom6": nil,
              "Custom7": "SynNA",
              "Custom8": "SFT001",
              "Custom9": "C100018",
              "Custom10": "10031",
              "Custom11": nil,
              "Custom12": nil,
              "Custom13": nil,
              "Custom14": nil,
              "Custom15": nil,
              "Custom16": nil,
              "Custom17": nil,
              "Custom18": nil,
              "Custom19": nil,
              "Custom20": nil,
            },
          ],
        },
        "MatchedPurchaseOrderReceipts": {
          "MatchedPurchaseOrderReceipt": [],
        },
      },
      {
        "LineItemId": "A1B0E26A05C2E04095CA8E557D6133C9",
        "ExpenseTypeCode": "2011",
        "RequestLineItemNumber": "3",
        "Quantity": "14.00000000",
        "Description": "END1014 - Nellix (Evas 1)",
        "AllocationStatus": "NONE",
        "ShipToPostalCode": nil,
        "ShipFromPostalCode": nil,
        "LineItemIsTestUser": nil,
        "PurchaseOrderNumber": nil,
        "MatchedPurchaseOrderLineItemId": nil,
        "IsMatched": "false",
        "SupplierPartId": nil,
        "UnitOfMeasure": nil,
        "UnitPrice": "40.00000000",
        "TotalPrice": "560.00000000",
        "RequestedLineItemAmount": "560.00000000",
        "ApprovedLineItemAmount": "560.00000000",
        "Tax": nil,
        "AmountWithoutVat": "560.00000000",
        "VatAmount": "0.00000000",
        "VatAmountTwo": "0.00000000",
        "VatAmountThree": "0.00000000",
        "VatAmountFour": "0.00000000",
        "VatRate": nil,
        "VatRateTwo": nil,
        "VatRateThree": nil,
        "VatRateFour": nil,
        "TaxCode": nil,
        "TaxCode2": nil,
        "TaxCode3": nil,
        "TaxCode4": nil,
        "DeliverySlipNumber": nil,
        "Custom1": nil,
        "Custom2": nil,
        "Custom3": nil,
        "Custom4": nil,
        "Custom5": nil,
        "Custom6": nil,
        "Custom7": "SynNA",
        "Custom8": "SFT001",
        "Custom9": "C100012",
        "Custom10": "END1014",
        "Custom11": nil,
        "Custom12": nil,
        "Custom13": nil,
        "Custom14": nil,
        "Custom15": nil,
        "Custom16": nil,
        "Custom17": nil,
        "Custom18": nil,
        "Custom19": nil,
        "Custom20": nil,
        "Allocations": {
          "Allocation": [
            {
              "Percentage": "100.00000000",
              "AllocationAccountCode": "600010",
              "IsTestUser": nil,
              "Custom1": nil,
              "Custom2": nil,
              "Custom3": nil,
              "Custom4": nil,
              "Custom5": nil,
              "Custom6": nil,
              "Custom7": "SynNA",
              "Custom8": "SFT001",
              "Custom9": "C100012",
              "Custom10": "END1014",
              "Custom11": nil,
              "Custom12": nil,
              "Custom13": nil,
              "Custom14": nil,
              "Custom15": nil,
              "Custom16": nil,
              "Custom17": nil,
              "Custom18": nil,
              "Custom19": nil,
              "Custom20": nil,
            },
          ],
        },
        "MatchedPurchaseOrderReceipts": {
          "MatchedPurchaseOrderReceipt": [],
        },
      },
      {
        "LineItemId": "717029BA9EB91A4C9D6B6420D0E2BC5E",
        "ExpenseTypeCode": "2011",
        "RequestLineItemNumber": "4",
        "Quantity": "14.00000000",
        "Description": "MED1026 - Medtronic INPACT AV Access CEC",
        "AllocationStatus": "NONE",
        "ShipToPostalCode": nil,
        "ShipFromPostalCode": nil,
        "LineItemIsTestUser": nil,
        "PurchaseOrderNumber": nil,
        "MatchedPurchaseOrderLineItemId": nil,
        "IsMatched": "false",
        "SupplierPartId": nil,
        "UnitOfMeasure": nil,
        "UnitPrice": "40.00000000",
        "TotalPrice": "560.00000000",
        "RequestedLineItemAmount": "560.00000000",
        "ApprovedLineItemAmount": "560.00000000",
        "Tax": nil,
        "AmountWithoutVat": "560.00000000",
        "VatAmount": "0.00000000",
        "VatAmountTwo": "0.00000000",
        "VatAmountThree": "0.00000000",
        "VatAmountFour": "0.00000000",
        "VatRate": nil,
        "VatRateTwo": nil,
        "VatRateThree": nil,
        "VatRateFour": nil,
        "TaxCode": nil,
        "TaxCode2": nil,
        "TaxCode3": nil,
        "TaxCode4": nil,
        "DeliverySlipNumber": nil,
        "Custom1": nil,
        "Custom2": nil,
        "Custom3": nil,
        "Custom4": nil,
        "Custom5": nil,
        "Custom6": nil,
        "Custom7": "SynNA",
        "Custom8": "SFT001",
        "Custom9": "C100017",
        "Custom10": "MED1026",
        "Custom11": nil,
        "Custom12": nil,
        "Custom13": nil,
        "Custom14": nil,
        "Custom15": nil,
        "Custom16": nil,
        "Custom17": nil,
        "Custom18": nil,
        "Custom19": nil,
        "Custom20": nil,
        "Allocations": {
          "Allocation": [
            {
              "Percentage": "100.00000000",
              "AllocationAccountCode": "600010",
              "IsTestUser": nil,
              "Custom1": nil,
              "Custom2": nil,
              "Custom3": nil,
              "Custom4": nil,
              "Custom5": nil,
              "Custom6": nil,
              "Custom7": "SynNA",
              "Custom8": "SFT001",
              "Custom9": "C100017",
              "Custom10": "MED1026",
              "Custom11": nil,
              "Custom12": nil,
              "Custom13": nil,
              "Custom14": nil,
              "Custom15": nil,
              "Custom16": nil,
              "Custom17": nil,
              "Custom18": nil,
              "Custom19": nil,
              "Custom20": nil,
            },
          ],
        },
        "MatchedPurchaseOrderReceipts": {
          "MatchedPurchaseOrderReceipt": [],
        },
      },
      {
        "LineItemId": "B18BF930129F684392101406418AC34C",
        "ExpenseTypeCode": "2011",
        "RequestLineItemNumber": "1",
        "Quantity": "2.00000000",
        "Description": "10029 - MONA LSA CEC",
        "AllocationStatus": "NONE",
        "ShipToPostalCode": nil,
        "ShipFromPostalCode": nil,
        "LineItemIsTestUser": nil,
        "PurchaseOrderNumber": nil,
        "MatchedPurchaseOrderLineItemId": nil,
        "IsMatched": "false",
        "SupplierPartId": nil,
        "UnitOfMeasure": nil,
        "UnitPrice": "40.00000000",
        "TotalPrice": "80.00000000",
        "RequestedLineItemAmount": "80.00000000",
        "ApprovedLineItemAmount": "80.00000000",
        "Tax": nil,
        "AmountWithoutVat": "80.00000000",
        "VatAmount": "0.00000000",
        "VatAmountTwo": "0.00000000",
        "VatAmountThree": "0.00000000",
        "VatAmountFour": "0.00000000",
        "VatRate": nil,
        "VatRateTwo": nil,
        "VatRateThree": nil,
        "VatRateFour": nil,
        "TaxCode": nil,
        "TaxCode2": nil,
        "TaxCode3": nil,
        "TaxCode4": nil,
        "DeliverySlipNumber": nil,
        "Custom1": nil,
        "Custom2": nil,
        "Custom3": nil,
        "Custom4": nil,
        "Custom5": nil,
        "Custom6": nil,
        "Custom7": "SynNA",
        "Custom8": "SFT001",
        "Custom9": "C100017",
        "Custom10": "10029",
        "Custom11": nil,
        "Custom12": nil,
        "Custom13": nil,
        "Custom14": nil,
        "Custom15": nil,
        "Custom16": nil,
        "Custom17": nil,
        "Custom18": nil,
        "Custom19": nil,
        "Custom20": nil,
        "Allocations": {
          "Allocation": [
            {
              "Percentage": "100.00000000",
              "AllocationAccountCode": "600010",
              "IsTestUser": nil,
              "Custom1": nil,
              "Custom2": nil,
              "Custom3": nil,
              "Custom4": nil,
              "Custom5": nil,
              "Custom6": nil,
              "Custom7": "SynNA",
              "Custom8": "SFT001",
              "Custom9": "C100017",
              "Custom10": "10029",
              "Custom11": nil,
              "Custom12": nil,
              "Custom13": nil,
              "Custom14": nil,
              "Custom15": nil,
              "Custom16": nil,
              "Custom17": nil,
              "Custom18": nil,
              "Custom19": nil,
              "Custom20": nil,
            },
          ],
        },
        "MatchedPurchaseOrderReceipts": {
          "MatchedPurchaseOrderReceipt": [],
        },
      },
    ],
  },
  "ID": "7A549062EA1D47A8939C",
  "URI": "https://us.api.concursolutions.com/api/v3.0/invoice/paymentrequest/PaymentRequest/7A549062EA1D47A8939C",
}

p inv.flatten.join.class
