npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@one-view/pd-oneview-order-modification-types

v0.0.51

Published

Oneview backend for order modification and refund

Downloads

3

Readme

FORMAT: 1A HOST: https://api.pd-oneview.net/order-modification

pd-oneview-order-modification

Oneview backend for order modification and refund

Cancel Order [/v1/orders/{orderCode}/cancel{?geid}]

  • Parameters
    • orderCode (required, string, vsba-nhas)
    • geid: FP_SG (string, optional) - global entity id

cancel order [POST]

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Attributes (CancelOrderParams)

  • Response 200 (application/json)

    • Attributes (CancelResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 401 (application/json)

    • Attributes (Error)
  • Response 403 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Refund [/v1/orders/{orderCode}/refund{?geid}]

  • Parameters

    • orderCode (required, string, vsba-nhas)
    • geid: FP_SG (GlobalEntityId, optional) - global entity id
  • Attributes (RefundResponse)

refund [POST]

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Attributes (RefundParams)

  • Response 200 (application/json)

    • Attributes (RefundResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 401 (application/json)

    • Attributes (Error)
  • Response 403 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 429 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Compensation Value [/v1/orders/{orderCode}/compensation{?geid,ccr}]

  • Parameters
    • orderCode (required, string, vsba-nhas)
    • geid: FP_SG (GlobalEntityId, optional) - global entity id
    • ccr: 2A.1 (string, required) - ccr Code

get compensation value [GET]

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Response 200 (application/json)

    • Attributes (CompensationValueResponse)
  • Response 400 (application/json)

    • Attributes
      • errors (array[error_object], fixed-type)
  • Response 404 (application/json)

    • Attributes
      • errors (array[error_object], fixed-type)
  • Response 500 (application/json)

    • Attributes (Error)

create compensation [POST]

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Attributes (CreateCompensationParams)

  • Response 200 (application/json)

    • Attributes (CreateCompensationResponse)
  • Response 400 (application/json)

    • Attributes
      • errors (array[error_object], fixed-type)
  • Response 404 (application/json)

    • Attributes
      • errors (array[error_object], fixed-type)
  • Response 429 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Get Compensation Eligibility [/v1/orders/{orderCode}/check-compensation{?geid,ccr,nocache}]

  • Parameters

    • orderCode (required, string, vsba-nhas)
    • geid: FP_SG (string, required) - global entity id
    • ccr: 2A.1 (string, required) - ccr Code
    • nocache (boolean, optional) - nocache parameter
  • Attributes (CheckCompensationResponse)

get value [GET]

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Response 200 (application/json)

    • Attributes (CheckCompensationResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Get Refund Mapping [/v1/refund/mapping{?geid}]

  • Parameters
    • geid: FP_SG (string, required) - global entity id

get value [GET]

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Response 200 (application/json)

    • Attributes (RefundMappingResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Get Credit Payment Type Validation [/v1/refund/credit/validate{?geid,paymentType}]

  • Parameters
    • geid: FP_SG (string, required) - global entity id
    • paymentType: credit card (string, required) - payment type to be validated

get value [GET]

  • Request

    • Headers

        Authorization: bearer token
        X-Contact-Id: case-id
  • Response 200 (application/json)

    • Attributes (CreditRefundValidationResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

item removal vendor blacklist [/v1/vendors/item-removal-blacklist]

create vendor blacklist [POST]

  • Request

    • Headers

        Authorization: bearer token
  • Attributes (VendorBlacklistOpsRequest)

  • Response 201 (application/json)

    • Attributes (VendorBlacklistOpsResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

delete vendor blacklist [DELETE]

  • Request

    • Headers

        Authorization: bearer token
  • Attributes (VendorBlacklistOpsRequest)

  • Response 200 (application/json)

    • Attributes (VendorBlacklistOpsResponse)
  • Response 400 (application/json)

    • Attributes (Error)
  • Response 404 (application/json)

    • Attributes (Error)
  • Response 500 (application/json)

    • Attributes (Error)

Data Structures

int32 (number)

int64 (number)

error_object (object)

  • status (string)
  • title (string)
  • code (string)

Error (object)

  • errors (array[error_object], fixed-type)

CancelOrderParams

  • reason (string, required) - Reason for requesting an order cancellation
  • paymentType (string, required) - payment type that customer has used to create an order
  • compensationFee (number, required) - amount to be compensated
  • orderAmount (number, optional) - amount order to be refunded
  • refundType (RefundType, optional) - refund type will be use if paymentType is not cash_on_delivery (following partial refund flow)
  • creditSource (CreditSource, optional) - type of CreditSource that customer want to use to refund their order
  • accountDetail (string, optional) - account detail of credit source
  • missingItems (array[string], optional, fixed-type) - become required when refundType is cash_on_delivery

CancelResponse

  • data
    • voucherCode (string, optional) - voucher code
    • refundId (string, optional) - refund ticket id

RefundResponse

  • data (RefundData, required) - refund response

RefundData

  • refund
    • id (string, optional) - refund ticket id
    • voucherCode (string, optional) - voucher code
  • missingItems
    • id (string, required) - missing items id

RefundParams

  • refundType (RefundType, required) - refund type
  • orderAmount (number, required) - amount of refund
  • compensationFee (number, required) - amount to be compensated
  • creditSource (CreditSource, optional) - source of credit
  • accountDetail (string, optional) - account detail of credit source
  • vendorName : jolibee (string, required) - vendor name
  • vendorID : vsba-nhas (string, required) - vendor id
  • agentName : julie (string, required) - reporting agent name
  • missingItems (array[string], fixed-type, required) - list of missing items
  • paymentType (string, optional) - payment type that customer has used to create an order; required if refundType is credit
  • removedItems (array[MissingItem], fixed-type, required) - list of missing items

RefundParamsV2

  • refundType (RefundType, required) - refund type
  • orderAmount (number, required) - amount of refund
  • compensationFee (number, required) - amount to be compensated
  • creditSource (CreditSource, optional) - source of credit
  • accountDetail (string, optional) - account detail of credit source
  • vendorName : jolibee (string, required) - vendor name
  • vendorID : vsba-nhas (string, required) - vendor id
  • agentName : julie (string, required) - reporting agent name
  • paymentType (string, optional) - payment type that customer has used to create an order; required if refundType is credit
  • missingItems (array[MissingItem], fixed-type, required) - list of missing items
  • otherMissingItems (string, optional) - other missing items note

MissingItem

  • id (string, required) - item id
  • lineItemID (string, required) - line item id
  • name (string, required) - item name
  • quantity (int32, required) - quantity of item
  • toppings (array[MissingToppings], fixed-type, optional) - list of item toppings ids
  • unitPrice (number) - unit price of item
  • parentProductID (string) - The ID of parent product of the item

MissingToppings

  • id (string, required) - topping id
  • name (string) - topping name
  • quantity (int32) - quantity of item
  • unitPrice (number) - unit price of item

CreateCompensationParams

  • ticketId (string, required) - ticket id to be referenced
  • amount (number, required) - total amount of compensation will be issued

CreateCompensationResponse

  • voucherCode (string, required) - voucher code that has been issued

CancelReason (enum)

  • ORDER_MODIFICATION_NOT_POSSIBLE
  • MISTAKE_ERROR
  • DUPLICATE_ORDER
  • LATE_DELIVERY
  • UNABLE_TO_FIND
  • FOOD_QUALITY_SPILLAGE
  • NEVER_DELIVERED
  • WRONG_ORDER_ITEMS_DELIVERED
  • VOUCHER_NOT_APPLIED
  • DELIVERY_ETA_TOO_LONG

CreditSource (enum)

  • online_payment
  • online_banking
  • cash_on_delivery
  • paypal
  • apple_pay
  • gcash
  • paylah

RefundType (enum)

  • voucher
  • credit
  • wallet
  • payment source

CommentType (enum)

  • automatic
  • manual

RefundWidgetValueResponse

  • data (CompensationValue, required) - compensation value response

CompensationValueResponse

  • data (CompensationValue, required) - compensation value response

CompensationValue

  • value (number, required) - value of compensation
  • default (number) - default value of compensation
  • maxValue (number) - max value of compensation
  • minValue (number) - minimum value of compensation
  • granularity (number) - granularity of compensation value
  • isEditable (boolean) - whether value editable or not
  • isFallbackValue (boolean) - whether value is a fallback or not
  • ccrTranslation (string) - translation of the given CCR

CheckCompensationResponse

  • eligible (boolean, required) - is order eligible for compensation
  • reason (string) - reason of eligibility status

RefundMappingResponse

RefundCalculationResponse

  • list (array[RefundCalculation], fixed-type, required) - list of refund calculation

RefundCalculation

  • geid : FP_SG (string, required) - global entity ID
  • minimumValue : 4 (number, required) - minimum refund value
  • granularity : 0.5 (number, required) - granularity of refund value
  • compensation : 0.10 (number, required) - compensation value

CreditRefundValidationResponse

  • pspValid (boolean, required) - is payment type valid

VendorBlacklistOpsRequest

  • geid : FP_SG (string, required) - global entity ID
  • code : vsba-nhas (string, required) - vendor code, will be used for item removal logic as object identity
  • name : jolibee (string) - vendor name
  • globalID : 33dsafa (string) - vendor global id
  • id : 123421 (string) - vendor id
  • verticalType : restaurant (string) - vendor vertical type

VendorBlacklistOpsResponse

  • success : true (string) - status of the operation