-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: subscription proration policy prefix, offering attach/detach pro…
…duct (#940) (#4) BREAKING CHANGE: Co-authored-by: Rostyk <[email protected]>
- Loading branch information
1 parent
cc18715
commit bd6365d
Showing
2 changed files
with
134 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* Subscription Proration Policies | ||
* Description: Subscription Proration Policies. | ||
* DOCS: TODO: add docs when ready | ||
*/ | ||
import { | ||
Identifiable, | ||
CrudQueryableResource | ||
} from './core' | ||
|
||
/** | ||
* Core Subscription Proration Policies Base Interface | ||
* For custom flows, extend this interface | ||
* DOCS: TODO: add docs when ready | ||
*/ | ||
export interface SubscriptionProrationPolicyBase { | ||
type: 'subscription_proration_policy' | ||
attributes: { | ||
name: string | ||
rounding: 'up' | 'down' | 'nearest' | ||
external_ref?: string | ||
} | ||
} | ||
|
||
export interface SubscriptionProrationPolicy extends Identifiable, SubscriptionProrationPolicyBase { | ||
meta: { | ||
owner: 'store' | 'organization' | ||
timestamps: { | ||
updated_at: string | ||
created_at: string | ||
} | ||
} | ||
} | ||
|
||
export type SubscriptionProrationPolicyCreate = SubscriptionProrationPolicyBase | ||
export type SubscriptionProrationPolicyUpdate = Identifiable & Omit<SubscriptionProrationPolicyBase, 'attributes'> & {attributes: Partial<SubscriptionProrationPolicy['attributes']>} | ||
|
||
/** | ||
* Subscription Proration Policies Endpoints | ||
* DOCS: TODO: add docs when ready | ||
*/ | ||
export interface SubscriptionProrationPoliciesEndpoint | ||
extends CrudQueryableResource< | ||
SubscriptionProrationPolicy, | ||
SubscriptionProrationPolicyCreate, | ||
SubscriptionProrationPolicyUpdate, | ||
never, | ||
never, | ||
never | ||
> { | ||
endpoint: 'proration-policies' | ||
} |