Open APIs

 View Only
  • 1.  Ref Classes in API spec

    TM Forum Member
    Posted Aug 15, 2018 04:47
    In the swagger definition for Party Account.

    Party Account contains a Financial Account, and part of that is a reference

    "financialAccount": {
    "$ref": "#/definitions/FinancialAccountRef"
    },

    Defined as

    "FinancialAccountRef": {
    "type": "object",
    "description": "AccountReceivable reference. An account of money owed by a party to another entity in exchange for goods or services that have been delivered or used. An account receivable aggregates the amounts of one or more party accounts (billing or settlement) owned by a given party.",
    "properties": {
    "@referredType": {
    "type": "string",
    "description": "Generic attribute indicating the name of the class type of the referred resource entity."
    },
    "href": {
    "type": "string",
    "description": "Unique reference of the account"
    },
    "id": {
    "type": "string",
    "description": "Unique identifier of the account"
    },
    "name": {
    "type": "string",
    "description": "Name of the account"
    },
    "accountBalance": {
    "$ref": "#/definitions/AccountBalance"
    }
    }
    },

    The challenge here is the presence of the AccountBalance.  This is not an identifier of an account.  All other reference classes present only have identifiers in their reference.

    Is this intended? 
    Is it an anomaly? 
    Or is this a way of finding accounts based on current balance? 
    If so, how would we get to the right account as this would make it very possible to get multiple accounts with the same balance and balance type?

    ------------------------------
    Hugo Vaughan
    Crowd Frame Consulting Limited.
    ------------------------------


  • 2.  RE: Ref Classes in API spec

    TM Forum Member
    Posted Aug 18, 2018 15:13
    Hi Hugo
    The prime use of reference classes is (as their name) to reflect relationships between entities that are managed in different APIs. However there is a secondary use, which is to "pull in" key information from the related entities, according to the need foreseen by the designer of the API.
    In the example you give, the designer presumably felt that it was important that the account balance should be reflected in that.

    Having said that, in the spec document TMF666, there is no mention of the account balance, and reference from party account to financial account is described in the spec as:
    financialAccount - A financial account reference (FinancialAccountRef). AccountReceivable reference. An account of money owed by a party to another entity in exchange for goods or services that have been delivered or used. An account receivable aggregates the amounts of one or more party accounts (billing or settlement) owned by a given party.

    It is possible that there is a discrepancy between the spec and the swagger, this would be best taken up with the team lead for this API @mariano belaunde.

    ​​

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    ------------------------------



  • 3.  RE: Ref Classes in API spec

    TM Forum Member
    Posted Aug 20, 2018 03:07
    Thanks

    For now, I think we will use this as a way to segment accounts, accepting that the balances are dynamic and the segmentation should probably be done on balance history, not current balance.

    Much appreciated.

    ------------------------------
    Hugo Vaughan
    Crowd Frame Consulting Limited.
    ------------------------------