Skip to content

Commit

Permalink
in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
p-zielinski committed Nov 24, 2023
1 parent 359b491 commit deae34e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 92 deletions.
139 changes: 48 additions & 91 deletions reference/OpenAPI.json
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@
}
},
"customer": {
"$ref": "#/components/schemas/CustomerRequest",
"$ref": "#/components/schemas/Customer",
"description": "This is an object containing information about the customer."
},
"customer_id": {
Expand Down Expand Up @@ -745,7 +745,7 @@
"customer": {
"anyOf": [
{
"$ref": "#/components/schemas/CustomerResponse",
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals",
"description": "This is an object containing information about the customer."
},
{
Expand Down Expand Up @@ -860,7 +860,7 @@
"description": "Request schema model for validating a voucher using **POST** `/vouchers/{code}/validate`.",
"properties": {
"customer": {
"$ref": "#/components/schemas/CustomerRequest",
"$ref": "#/components/schemas/Customer",
"description": "Customer's information."
},
"order": {
Expand Down Expand Up @@ -899,7 +899,7 @@
"description": "Request schema model for validating a voucher using **POST** `/vouchers/{code}/validate`.",
"properties": {
"customer": {
"$ref": "#/components/schemas/CustomerRequest",
"$ref": "#/components/schemas/Customer",
"description": "Customer's information."
},
"order": {
Expand Down Expand Up @@ -937,7 +937,7 @@
}
},
"customer": {
"$ref": "#/components/schemas/CustomerRequest",
"$ref": "#/components/schemas/Customer",
"description": "This is an object containing information about the customer."
},
"customer_id": {
Expand Down Expand Up @@ -1006,7 +1006,7 @@
"description": "Request schema model for validating a voucher using **POST** `/vouchers/{code}/validate`.",
"properties": {
"customer": {
"$ref": "#/components/schemas/CustomerRequest",
"$ref": "#/components/schemas/Customer",
"description": "Customer's information."
},
"order": {
Expand Down Expand Up @@ -1044,7 +1044,7 @@
}
},
"customer": {
"$ref": "#/components/schemas/CustomerRequest",
"$ref": "#/components/schemas/Customer",
"description": "This is an object containing information about the customer."
},
"customer_id": {
Expand Down Expand Up @@ -1117,15 +1117,15 @@
"title": "Referrer Request",
"allOf": [
{
"$ref": "#/components/schemas/CustomerRequest"
"$ref": "#/components/schemas/Customer"
}
]
},
"ReferrerResponse": {
"title": "Referrer Response",
"allOf": [
{
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
}
]
},
Expand Down Expand Up @@ -1210,7 +1210,7 @@
"title": "Customers Create Request Body",
"allOf": [
{
"$ref": "#/components/schemas/CustomerRequest"
"$ref": "#/components/schemas/Customer"
}
]
},
Expand All @@ -1226,12 +1226,12 @@
"title": "Customers Update Request Body",
"allOf": [
{
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
}
]
},
"CustomerRequest": {
"title": "Customer Request",
"Customer": {
"title": "Customer",
"allOf": [
{
"type": "object",
Expand Down Expand Up @@ -1277,12 +1277,12 @@
"title": "Customers Create Response Body",
"allOf": [
{
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
}
]
},
"CustomerResponse": {
"title": "Customer Response",
"CustomerWithSummaryLoyaltyReferrals": {
"title": "Customer With Summary Loyalty Referrals",
"allOf": [
{
"type": "object",
Expand Down Expand Up @@ -11037,7 +11037,7 @@
},
"customer": {
"description": "Contains information about the customer to whom the publication was directed.",
"$ref": "#/components/schemas/CustomerRequest"
"$ref": "#/components/schemas/Customer"
},
"metadata": {
"type": "object",
Expand Down Expand Up @@ -11194,7 +11194,7 @@
"description": "The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. "
},
"customer": {
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
},
"vouchers_id": {
"type": "array",
Expand Down Expand Up @@ -11368,7 +11368,7 @@
"description": "Status of the publication attempt."
},
"customer": {
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
},
"vouchers_id": {
"type": "array",
Expand Down Expand Up @@ -14570,7 +14570,7 @@
"description": "Order information."
},
"customer": {
"$ref": "#/components/schemas/CustomerRequest",
"$ref": "#/components/schemas/Customer",
"description": "Customer's information."
},
"session": {
Expand Down Expand Up @@ -21178,7 +21178,7 @@
"description": "Customer's `source_id`."
},
"customer": {
"$ref": "#/components/schemas/CustomerRequest"
"$ref": "#/components/schemas/Customer"
},
"order": {
"$ref": "#/components/schemas/OrderRequest"
Expand Down Expand Up @@ -25601,7 +25601,7 @@
"type": "array",
"description": "Contains array of customer objects.",
"items": {
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
}
},
"total": {
Expand All @@ -25621,7 +25621,7 @@
"description": "Retrieve customer details.",
"allOf": [
{
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
}
]
},
Expand Down Expand Up @@ -26278,7 +26278,7 @@
"type": "object",
"properties": {
"customer": {
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
},
"unconfirmed_customer": {
"type": "object",
Expand All @@ -26297,7 +26297,7 @@
"type": "object",
"properties": {
"customer": {
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
}
}
},
Expand All @@ -26307,7 +26307,7 @@
"type": "object",
"properties": {
"customer": {
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
}
}
},
Expand All @@ -26317,7 +26317,7 @@
"type": "object",
"properties": {
"customer": {
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
}
}
},
Expand Down Expand Up @@ -26358,7 +26358,7 @@
"type": "object",
"properties": {
"customer": {
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
}
},
"additionalProperties": true,
Expand All @@ -26372,7 +26372,7 @@
"type": "object",
"properties": {
"customer": {
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
},
"segment": {
"$ref": "#/components/schemas/SimpleSegment"
Expand All @@ -26389,7 +26389,7 @@
"type": "object",
"properties": {
"customer": {
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
},
"segment": {
"$ref": "#/components/schemas/SimpleSegment"
Expand Down Expand Up @@ -29409,9 +29409,13 @@
"description": "The event name."
},
"customer": {
"type": "object",
"description": "A simple customer object",
"$ref": "#/components/schemas/SimpleCustomerResponse"
"title": "A Simple Customer Object",
"allOf": [
{
"$ref": "#/components/schemas/SimpleCustomer"
}
],
"required": ["object"]
},
"referral": {
"type": "object",
Expand Down Expand Up @@ -29464,7 +29468,7 @@
},
"customer": {
"nullable": true,
"$ref": "#/components/schemas/CustomerResponse"
"$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
},
"assignment_id": {
"type": "string",
Expand Down Expand Up @@ -29744,7 +29748,7 @@
"maxLength": 300
},
"customer": {
"$ref": "#/components/schemas/CustomerRequest",
"$ref": "#/components/schemas/Customer",
"description": "Customer's information."
},
"referral": {
Expand Down Expand Up @@ -29807,9 +29811,13 @@
"description": "The event name."
},
"customer": {
"type": "object",
"description": "A simple customer object",
"$ref": "#/components/schemas/SimpleCustomerResponse"
"title": "A Simple Customer Object",
"allOf": [
{
"$ref": "#/components/schemas/SimpleCustomer"
}
],
"required": ["object"]
},
"referral": {
"type": "null",
Expand Down Expand Up @@ -33530,7 +33538,7 @@
"description": "Request body schema for checking eligibility of a qualification`.",
"properties": {
"customer": {
"$ref": "#/components/schemas/CustomerRequest",
"$ref": "#/components/schemas/Customer",
"description": "Customer's information."
},
"order": {
Expand Down Expand Up @@ -39653,57 +39661,6 @@
"filter"
]
},
"SimpleCustomerResponse": {
"type": "object",
"description": "This is an object representing a customer. \n\nThis entity allows you to:\n* store customer details in Voucherify\n* link <!-- [redemptions](OpenAPI.json/components/schemas/7_obj_redemption_object) -->[redemptions](ref:list-redemptions) and <!-- [validations](OpenAPI.json/components/schemas/6_obj_validation_object) -->[validations](ref:validate-voucher) to a particular customer\n* build customer segments and use them in validation rules. ",
"title": "Customer Object",
"examples": [
{
"id": "cust_4vMj8Twr5nBzvTrNCgipMb6M",
"source_id": "08dd9b5a",
"name": "Bob Smith",
"email": "[email protected]",
"metadata": {
"age": 24,
"loyalty_customer": "true",
"acquisition_channel": "Facebook"
},
"object": "customer"
}
],
"x-tags": [
"EVENTS API"
],
"properties": {
"id": {
"type": "string",
"description": "The unique ID of a customer that is assigned by Voucherify.",
"example": "cust_CSnYd37MXmrbS19XCrghjBsv"
},
"source_id": {
"type": "string",
"description": "The merchant’s customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service."
},
"name": {
"type": "string",
"description": "Customer's first and last name."
},
"email": {
"type": "string",
"description": "Customer's email address."
},
"metadata": {
"type": "object",
"description": "A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. "
},
"object": {
"type": "string",
"description": "The type of object represented by the JSON. This object stores information about the customer.",
"default": "customer"
}
},
"required": ["object"]
},
"InapplicableToResultList": {
"title": "Inapplicable To Result List",
"type": "object",
Expand Down Expand Up @@ -49459,7 +49416,7 @@
"style": "deepObject",
"explode": true,
"schema": {
"$ref": "#/components/schemas/CustomerRequest"
"$ref": "#/components/schemas/Customer"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/md-tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const mdTables: [string, string?][] = [
],
["EarningRule", "LOYALTIES-API-Earning-Rule-Object.md"],
["LoyaltyTier", "LOYALTIES-API-Loyalty-Tier-Object.md"],
["CustomerResponse", "CUSTOMERS-API-Customer-Object.md"],
["CustomerWithSummaryLoyaltyReferrals", "CUSTOMERS-API-Customer-Object.md"],
["CustomerActivity", "CUSTOMERS-API-Customer-Activity-Object.md"],
["OrderResponse", "ORDERS-API-Order-Object.md"],
["ProductResponse", "PRODUCTS-API-Product-Object.md"],
Expand Down

0 comments on commit deae34e

Please sign in to comment.