Skip to content

Commit

Permalink
Merge pull request #208 from recurly/v3-v2019-10-10-1659465266
Browse files Browse the repository at this point in the history
Generated Latest Changes for v2019-10-10
  • Loading branch information
csampson authored Aug 3, 2022
2 parents 137d868 + 6ae1f51 commit f684156
Show file tree
Hide file tree
Showing 18 changed files with 611 additions and 7 deletions.
127 changes: 126 additions & 1 deletion openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17259,7 +17259,7 @@ components:
title: Field value
description: Any values that resemble a credit card number or security code
(CVV/CVC) will be rejected.
maxLength: 100
maxLength: 255
required:
- name
- value
Expand Down Expand Up @@ -18828,6 +18828,22 @@ components:
renew its term at renewal. If `auto_renew` is `false`, then a subscription
will expire at the end of its term. `auto_renew` can be overridden on
the subscription record itself.
pricing_model:
title: Pricing Model
type: string
enum:
- fixed
- ramp
default: fixed
description: |
A fixed pricing model has the same price for each billing period.
A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on
a specified cadence of billing periods. The price change could be an increase or decrease.
ramp_intervals:
type: array
title: Ramp Intervals
items:
"$ref": "#/components/schemas/PlanRampInterval"
accounting_code:
type: string
title: Plan accounting code
Expand Down Expand Up @@ -19006,6 +19022,22 @@ components:
renew its term at renewal. If `auto_renew` is `false`, then a subscription
will expire at the end of its term. `auto_renew` can be overridden on
the subscription record itself.
pricing_model:
title: Pricing Model
type: string
enum:
- fixed
- ramp
default: fixed
description: |
A fixed pricing model has the same price for each billing period.
A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on
a specified cadence of billing periods. The price change could be an increase or decrease.
ramp_intervals:
type: array
title: Ramp Intervals
items:
"$ref": "#/components/schemas/PlanRampInterval"
revenue_schedule_type:
type: string
title: Revenue schedule type
Expand Down Expand Up @@ -19137,6 +19169,7 @@ components:
type: number
format: float
title: Unit price
description: This field should not be sent when the pricing model is 'ramp'.
minimum: 0
maximum: 1000000
tax_inclusive:
Expand Down Expand Up @@ -19214,6 +19247,11 @@ components:
renew its term at renewal. If `auto_renew` is `false`, then a subscription
will expire at the end of its term. `auto_renew` can be overridden on
the subscription record itself.
ramp_intervals:
type: array
title: Ramp Intervals
items:
"$ref": "#/components/schemas/PlanRampInterval"
revenue_schedule_type:
type: string
title: Revenue schedule type
Expand Down Expand Up @@ -19291,6 +19329,19 @@ components:
a non-default dunning campaign should be assigned to this plan. For sites
without multiple dunning campaigns enabled, the default dunning campaign
will always be used.
PlanRampInterval:
type: object
title: Plan Ramp Interval
properties:
starting_billing_cycle:
type: integer
description: Represents the first billing cycle of a ramp.
default: 1
currencies:
type: array
description: Represents the price for the ramp interval.
items:
"$ref": "#/components/schemas/PlanRampPricing"
AddOnPricing:
type: object
properties:
Expand All @@ -19314,6 +19365,24 @@ components:
required:
- currency
- unit_amount
PlanRampPricing:
type: object
properties:
currency:
type: string
title: Currency
description: 3-letter ISO 4217 currency code.
maxLength: 3
unit_amount:
type: number
format: float
title: Unit price
description: Represents the price for the Ramp Interval.
minimum: 0
maximum: 1000000
required:
- currency
- unit_amount
Pricing:
type: object
properties:
Expand Down Expand Up @@ -19899,6 +19968,13 @@ components:
default: true
title: Auto renew
description: Whether the subscription renews at the end of its term.
ramp_intervals:
type: array
title: Ramp Intervals
description: The ramp intervals representing the pricing schedule for the
subscription.
items:
"$ref": "#/components/schemas/SubscriptionRampIntervalResponse"
paused_at:
type: string
format: date-time
Expand Down Expand Up @@ -20362,6 +20438,13 @@ components:
readOnly: true
billing_info:
"$ref": "#/components/schemas/SubscriptionChangeBillingInfo"
ramp_intervals:
type: array
title: Ramp Intervals
description: The ramp intervals representing the pricing schedule for the
subscription.
items:
"$ref": "#/components/schemas/SubscriptionRampIntervalResponse"
SubscriptionChangeBillingInfo:
type: object
description: Accept nested attributes for three_d_secure_action_result_token_id
Expand Down Expand Up @@ -20501,6 +20584,12 @@ components:
- moto
billing_info:
"$ref": "#/components/schemas/SubscriptionChangeBillingInfoCreate"
ramp_intervals:
type: array
title: Ramp Intervals
description: The new set of ramp intervals for the subscription.
items:
"$ref": "#/components/schemas/SubscriptionRampInterval"
SubscriptionChangePreview:
type: object
allOf:
Expand Down Expand Up @@ -20652,6 +20741,12 @@ components:
default: true
title: Auto renew
description: Whether the subscription renews at the end of its term.
ramp_intervals:
type: array
title: Ramp Intervals
description: The new set of ramp intervals for the subscription.
items:
"$ref": "#/components/schemas/SubscriptionRampInterval"
revenue_schedule_type:
type: string
title: Revenue schedule type
Expand Down Expand Up @@ -20803,6 +20898,12 @@ components:
- evenly
- at_range_end
- at_range_start
ramp_intervals:
type: array
title: Ramp Intervals
description: The new set of ramp intervals for the subscription.
items:
"$ref": "#/components/schemas/SubscriptionRampInterval"
required:
- plan_code
SubscriptionUpdate:
Expand Down Expand Up @@ -20986,6 +21087,30 @@ components:
format: float
title: Assigns the subscription's shipping cost. If this is greater than
zero then a `method_id` or `method_code` is required.
SubscriptionRampInterval:
type: object
title: Subscription Ramp Interval
properties:
starting_billing_cycle:
type: integer
description: Represents how many billing cycles are included in a ramp interval.
default: 1
unit_amount:
type: integer
description: Represents the price for the ramp interval.
SubscriptionRampIntervalResponse:
type: object
title: Subscription Ramp Interval
properties:
starting_billing_cycle:
type: integer
description: Represents how many billing cycles are included in a ramp interval.
remaining_billing_cycles:
type: integer
description: Represents how many billing cycles are left in a ramp interval.
unit_amount:
type: integer
description: Represents the price for the ramp interval.
TaxInfo:
type: object
title: Tax info
Expand Down
42 changes: 42 additions & 0 deletions src/main/java/com/recurly/v3/requests/PlanCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,20 @@ public class PlanCreate extends Request {
@Expose
private String name;

/**
* A fixed pricing model has the same price for each billing period. A ramp pricing model defines
* a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing
* periods. The price change could be an increase or decrease.
*/
@SerializedName("pricing_model")
@Expose
private String pricingModel;

/** Ramp Intervals */
@SerializedName("ramp_intervals")
@Expose
private List<PlanRampInterval> rampIntervals;

/** Revenue schedule type */
@SerializedName("revenue_schedule_type")
@Expose
Expand Down Expand Up @@ -375,6 +389,34 @@ public void setName(final String name) {
this.name = name;
}

/**
* A fixed pricing model has the same price for each billing period. A ramp pricing model defines
* a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing
* periods. The price change could be an increase or decrease.
*/
public String getPricingModel() {
return this.pricingModel;
}

/**
* @param pricingModel A fixed pricing model has the same price for each billing period. A ramp
* pricing model defines a set of Ramp Intervals, where a subscription changes price on a
* specified cadence of billing periods. The price change could be an increase or decrease.
*/
public void setPricingModel(final String pricingModel) {
this.pricingModel = pricingModel;
}

/** Ramp Intervals */
public List<PlanRampInterval> getRampIntervals() {
return this.rampIntervals;
}

/** @param rampIntervals Ramp Intervals */
public void setRampIntervals(final List<PlanRampInterval> rampIntervals) {
this.rampIntervals = rampIntervals;
}

/** Revenue schedule type */
public String getRevenueScheduleType() {
return this.revenueScheduleType;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/recurly/v3/requests/PlanPricing.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class PlanPricing extends Request {
@Expose
private Boolean taxInclusive;

/** Unit price */
/** This field should not be sent when the pricing model is 'ramp'. */
@SerializedName("unit_amount")
@Expose
private Float unitAmount;
Expand Down Expand Up @@ -75,12 +75,12 @@ public void setTaxInclusive(final Boolean taxInclusive) {
this.taxInclusive = taxInclusive;
}

/** Unit price */
/** This field should not be sent when the pricing model is 'ramp'. */
public Float getUnitAmount() {
return this.unitAmount;
}

/** @param unitAmount Unit price */
/** @param unitAmount This field should not be sent when the pricing model is 'ramp'. */
public void setUnitAmount(final Float unitAmount) {
this.unitAmount = unitAmount;
}
Expand Down
45 changes: 45 additions & 0 deletions src/main/java/com/recurly/v3/requests/PlanRampInterval.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
* make by hand will be lost. If you wish to make a change to this file, please create a Github
* issue explaining the changes you need and we will usher them to the appropriate places.
*/
package com.recurly.v3.requests;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.recurly.v3.Request;
import com.recurly.v3.resources.*;
import java.util.List;

public class PlanRampInterval extends Request {

/** Represents the price for the ramp interval. */
@SerializedName("currencies")
@Expose
private List<PlanRampPricing> currencies;

/** Represents the first billing cycle of a ramp. */
@SerializedName("starting_billing_cycle")
@Expose
private Integer startingBillingCycle;

/** Represents the price for the ramp interval. */
public List<PlanRampPricing> getCurrencies() {
return this.currencies;
}

/** @param currencies Represents the price for the ramp interval. */
public void setCurrencies(final List<PlanRampPricing> currencies) {
this.currencies = currencies;
}

/** Represents the first billing cycle of a ramp. */
public Integer getStartingBillingCycle() {
return this.startingBillingCycle;
}

/** @param startingBillingCycle Represents the first billing cycle of a ramp. */
public void setStartingBillingCycle(final Integer startingBillingCycle) {
this.startingBillingCycle = startingBillingCycle;
}
}
44 changes: 44 additions & 0 deletions src/main/java/com/recurly/v3/requests/PlanRampPricing.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
* make by hand will be lost. If you wish to make a change to this file, please create a Github
* issue explaining the changes you need and we will usher them to the appropriate places.
*/
package com.recurly.v3.requests;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.recurly.v3.Request;
import com.recurly.v3.resources.*;

public class PlanRampPricing extends Request {

/** 3-letter ISO 4217 currency code. */
@SerializedName("currency")
@Expose
private String currency;

/** Represents the price for the Ramp Interval. */
@SerializedName("unit_amount")
@Expose
private Float unitAmount;

/** 3-letter ISO 4217 currency code. */
public String getCurrency() {
return this.currency;
}

/** @param currency 3-letter ISO 4217 currency code. */
public void setCurrency(final String currency) {
this.currency = currency;
}

/** Represents the price for the Ramp Interval. */
public Float getUnitAmount() {
return this.unitAmount;
}

/** @param unitAmount Represents the price for the Ramp Interval. */
public void setUnitAmount(final Float unitAmount) {
this.unitAmount = unitAmount;
}
}
Loading

0 comments on commit f684156

Please sign in to comment.