Skip to content

Commit

Permalink
Merge pull request #92 from jamalsoueidan/order-endpoints
Browse files Browse the repository at this point in the history
Order endpoints
  • Loading branch information
jamalsoueidan authored Dec 9, 2023
2 parents 810ebb7 + 0a1ce92 commit e60f698
Show file tree
Hide file tree
Showing 23 changed files with 726 additions and 122 deletions.
20 changes: 20 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,22 @@ components:
CustomerBookingListResponse:
$ref: paths/customer/booking/list/response.yaml

# Order
CustomerOrder:
$ref: paths/customer/order/_types/order.yaml
CustomerOrderCustomer:
$ref: paths/customer/order/_types/customer.yaml
CustomerOrderLineItem:
$ref: paths/customer/order/_types/line-item.yaml
CustomerOrderRefund:
$ref: paths/customer/order/_types/refund.yaml
CustomerOrderFulfillment:
$ref: paths/customer/order/_types/fulfillment.yaml
CustomerOrderGetResponse:
$ref: paths/customer/order/get/response.yaml
CustomerOrderListResponse:
$ref: paths/customer/order/list/response.yaml

# Customer
CustomerProductList:
$ref: paths/customer/_types/product.yaml
Expand Down Expand Up @@ -298,6 +314,10 @@ paths:
$ref: "paths/customer/booking/get/index.yaml"
/customer/{customerId}/bookings:
$ref: "paths/customer/booking/list/index.yaml"
/customer/{customerId}/orders/{year}/{month}:
$ref: "paths/customer/order/list/index.yaml"
/customer/{customerId}/lineItemId/{lineItemId}:
$ref: "paths/customer/order/get/index.yaml"

# schedule
/customer/{customerId}/schedule:
Expand Down
38 changes: 38 additions & 0 deletions openapi/paths/customer/order/_types/address.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
type: object
properties:
first_name:
type: string
address1:
type: string
phone:
type: string
city:
type: string
zip:
type: string
province:
type: string
nullable: true
country:
type: string
last_name:
type: string
address2:
type: string
nullable: true
company:
type: string
nullable: true
latitude:
type: number
nullable: true
longitude:
type: number
nullable: true
name:
type: string
country_code:
type: string
province_code:
type: string
nullable: true
19 changes: 19 additions & 0 deletions openapi/paths/customer/order/_types/client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
type: object
properties:
accept_language:
type: string
nullable: true
browser_height:
type: number
nullable: true
browser_ip:
type: string
browser_width:
type: number
nullable: true
session_hash:
type: string
nullable: true
user_agent:
type: string
nullable: true
81 changes: 81 additions & 0 deletions openapi/paths/customer/order/_types/customer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
type: object
properties:
id:
type: number
email:
type: string
nullable: true
accepts_marketing:
type: boolean
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
first_name:
type: string
last_name:
type: string
state:
type: string
note:
type: string
nullable: true
verified_email:
type: boolean
multipass_identifier:
type: string
nullable: true
tax_exempt:
type: boolean
phone:
type: string
nullable: true
email_marketing_consent:
type: boolean
nullable: true
sms_marketing_consent:
type: object
properties:
state:
type: string
opt_in_level:
type: string
consent_updated_at:
type: string
format: date-time
consent_collected_from:
type: string
nullable: true
tags:
type: string
currency:
type: string
accepts_marketing_updated_at:
type: string
marketing_opt_in_level:
type: string
nullable: true
tax_exemptions:
type: array
items:
type: string
admin_graphql_api_id:
type: string
default_address:
$ref: address.yaml
nullable: true
required:
- id
- accepts_marketing
- created_at
- updated_at
- first_name
- last_name
- state
- verified_email
- tax_exempt
- tags
- currency
- admin_graphql_api_id
12 changes: 12 additions & 0 deletions openapi/paths/customer/order/_types/discount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type: object
properties:
code:
type: string
amount:
type: string
type:
type: string
required:
- code
- amount
- type
56 changes: 56 additions & 0 deletions openapi/paths/customer/order/_types/fulfillment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
type: object
properties:
id:
type: number
admin_graphql_api_id:
type: string
created_at:
type: string
format: date-time
location_id:
type: number
name:
type: string
order_id:
type: number
service:
type: string
shipment_status:
type: string
nullable: true
status:
type: string
tracking_company:
type: string
nullable: true
tracking_number:
type: string
nullable: true
tracking_numbers:
type: array
items:
type: string
tracking_url:
type: string
nullable: true
tracking_urls:
type: array
items:
type: string
updated_at:
type: string
format: date-time
line_items:
type: array
items:
$ref: simple-line-item.yaml
required:
- id
- admin_graphql_api_id
- created_at
- location_id
- name
- order_id
- service
- status
- line_items
77 changes: 77 additions & 0 deletions openapi/paths/customer/order/_types/line-item.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
type: object
properties:
id:
type: number
admin_graphql_api_id:
type: string
fulfillable_quantity:
type: number
fulfillment_service:
type: string
fulfillment_status:
type: string
nullable: true
gift_card:
type: boolean
grams:
type: number
name:
type: string
price:
type: string
price_set:
$ref: money.yaml
product_exists:
type: boolean
product_id:
type: number
nullable: true
properties:
type: array
items:
$ref: property.yaml
quantity:
type: number
requires_shipping:
type: boolean
sku:
type: string
nullable: true
taxable:
type: boolean
title:
type: string
total_discount:
type: string
total_discount_set:
$ref: money.yaml
variant_id:
type: number
nullable: true
variant_inventory_management:
type: string
nullable: true
variant_title:
type: string
nullable: true
vendor:
type: string
nullable: true
required:
- id
- admin_graphql_api_id
- fulfillable_quantity
- fulfillment_service
- gift_card
- grams
- name
- price
- properties
- price_set
- product_exists
- quantity
- requires_shipping
- taxable
- title
- total_discount
- total_discount_set
25 changes: 25 additions & 0 deletions openapi/paths/customer/order/_types/money.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
type: object
properties:
shop_money:
type: object
properties:
amount:
type: string
currency_code:
type: string
required:
- amount
- currency_code
presentment_money:
type: object
properties:
amount:
type: string
currency_code:
type: string
required:
- amount
- currency_code
required:
- shop_money
- presentment_money
Loading

0 comments on commit e60f698

Please sign in to comment.