Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Latest commit

 

History

History
230 lines (128 loc) · 6.29 KB

CouponsApi.md

File metadata and controls

230 lines (128 loc) · 6.29 KB

\CouponsApi

All URIs are relative to https://api.getlago.com/api/v1

Method HTTP request Description
apply_coupon POST /applied_coupons Apply a coupon to a customer
create_coupon POST /coupons Create a new coupon
destroy_coupon DELETE /coupons/{code} Delete a coupon
find_all_applied_coupons GET /applied_coupons Find Applied Coupons
find_all_coupons GET /coupons Find Coupons
find_coupon GET /coupons/{code} Find coupon by code
update_coupon PUT /coupons/{code} Update an existing coupon

apply_coupon

crate::models::AppliedCoupon apply_coupon(applied_coupon_input) Apply a coupon to a customer

Apply a coupon to a customer

Parameters

Name Type Description Required Notes
applied_coupon_input AppliedCouponInput Apply coupon payload [required]

Return type

crate::models::AppliedCoupon

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_coupon

crate::models::Coupon create_coupon(coupon_input) Create a new coupon

Create a new coupon

Parameters

Name Type Description Required Notes
coupon_input CouponInput Coupon payload [required]

Return type

crate::models::Coupon

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

destroy_coupon

crate::models::Coupon destroy_coupon(code) Delete a coupon

Delete a coupon

Parameters

Name Type Description Required Notes
code String Code of the existing coupon [required]

Return type

crate::models::Coupon

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_all_applied_coupons

crate::models::AppliedCouponsPaginated find_all_applied_coupons(page, per_page, status, external_customer_id) Find Applied Coupons

Find all applied coupons

Parameters

Name Type Description Required Notes
page Option<i32> Number of page
per_page Option<i32> Number of records per page
status Option<String> Applied coupon status
external_customer_id Option<String> External customer ID

Return type

crate::models::AppliedCouponsPaginated

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_all_coupons

crate::models::CouponsPaginated find_all_coupons(page, per_page) Find Coupons

Find all coupons in certain organisation

Parameters

Name Type Description Required Notes
page Option<i32> Number of page
per_page Option<i32> Number of records per page

Return type

crate::models::CouponsPaginated

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_coupon

crate::models::Coupon find_coupon(code) Find coupon by code

Return a single coupon

Parameters

Name Type Description Required Notes
code String Code of the existing coupon [required]

Return type

crate::models::Coupon

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_coupon

crate::models::Coupon update_coupon(code, coupon_input) Update an existing coupon

Update an existing coupon by code

Parameters

Name Type Description Required Notes
code String Code of the existing coupon [required]
coupon_input CouponInput Update an existing coupon [required]

Return type

crate::models::Coupon

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]