DataONEorg / bookkeeper

Bookkeeper keeps track of DataONE product subscriptions and quotas for researchers using the extended services.
Other
1 stars 2 forks source link

Only first item processed in multi-item order #69

Closed gothub closed 3 years ago

gothub commented 3 years ago

The following order object was used to create a multi-item order:

{
    "object": "order",
    "customer": 4,
    "status": "created",
    "amount": 1,
    "items": [{
        "object": "order_item",
        "amount": 5,
        "name": "Delinquent user portal # 1",
        "type": "sku",
        "parent": 2,
        "quantity": 1
        },
      {
        "object": "order_item",
        "name": "Delinquent user storage # 1",
        "amount": 200000,
        "type": "sku",
        "parent": 5,
        "quantity": 1
      }
    ],
    "name": "Delinquent user #1",
    "subject":"membership-A9B9217B-7023-4704-BE19-251866B60E09 ",
    "seriesId": "38617AE5-A35C-4E1F-9F14-F601677B0053"
}

When this order was paid, only the first item was processed, resulting in the following quota:

 id | object | quotatype | softlimit | hardlimit | totalusage |  unit  | orderid |                     subject                     |         name
----+--------+-----------+-----------+-----------+------------+--------+---------+-------------------------------------------------+----------------------
 10 | quota  | portal    |         5 |         5 |            | portal |       7 | membership-EF2C028D-2168-495A-8B15-2177D0F18DB4 |

Should there be a second quota for repository_storage?

gothub commented 3 years ago

The problem was pilot error, I tried again and a multi-order item was processed correctly.