Skip to content

Commit de1570c

Browse files
Added new fields to models.
1 parent 0ae025e commit de1570c

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

connect/models/connection.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# This file is part of the Ingram Micro Cloud Blue Connect SDK.
44
# Copyright (c) 2019 Ingram Micro. All Rights Reserved.
55

6+
import datetime
7+
68
from .base import BaseModel
79
from .company import Company
810
from .hub import Hub
@@ -33,3 +35,11 @@ class Connection(BaseModel):
3335

3436
hub = None # type: Hub
3537
""" (:py:class:`.Hub`) Hub Reference. """
38+
39+
# Undocumented fields (they appear in PHP SDK)
40+
41+
status = None # type: str
42+
""" (str) Status. """
43+
44+
created_at = None # type: datetime.datetime
45+
""" (datetime.datetime) Creation date. """

connect/models/product.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ class Product(BaseModel):
6868
stats = None # type: Optional[ProductStats]
6969
""" (:py:class:``.ProductStats) Statistics of product use, depends on account of callee. """
7070

71+
# Undocumented fields (they appear in PHP SDK)
72+
73+
status = None # type: str
74+
""" (str) Product status. """
75+
7176
def get_templates(self, config=None):
7277
"""
7378
:param Config config: Configuration to use, or None for environment config.

connect/models/schemas.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ class ProductSchema(BaseSchema):
464464
owner = fields.Nested(CompanySchema)
465465
latest = fields.Bool()
466466
stats = fields.Nested(ProductStatsSchema)
467+
status = fields.Str()
467468

468469
@post_load
469470
def make_object(self, data):
@@ -531,6 +532,8 @@ class ConnectionSchema(BaseSchema):
531532
vendor = fields.Nested(CompanySchema, only=('id', 'name'))
532533
product = fields.Nested(ProductSchema)
533534
hub = fields.Nested(HubSchema)
535+
status = fields.Str()
536+
created_at = fields.DateTime()
534537

535538
@post_load
536539
def make_object(self, data):

connect/models/tier_config_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class TierConfigRequest(BaseModel):
5353
""" (str) TCR environment (test, prod or preview) """
5454

5555
assignee = None # type: Optional[User]
56-
""" (:py:class:`.User` | None) TCR environment. One of: test, prod, preview. """
56+
""" (:py:class:`.User` | None) User assigned to this TCR. """
5757

5858
template = None # type: Optional[Template]
5959
""" (:py:class:`.Template` | None) Template Object. This is filled only if TCR is approved. """

connect/resources/usage_automation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def _create_spreadsheet(usage_records):
148148
book = openpyxl.Workbook()
149149
sheet = book.active
150150
sheet.title = 'usage_records'
151-
sheet['A1'] = 'usage_record_id'
151+
sheet['A1'] = 'record_id'
152152
sheet['B1'] = 'item_search_criteria'
153153
sheet['C1'] = 'item_search_value'
154154
sheet['D1'] = 'quantity'

0 commit comments

Comments
 (0)