recurly 4.57.0 → 4.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/CHANGELOG.md +23 -0
  4. data/GETTING_STARTED.md +1 -1
  5. data/lib/recurly/client/operations.rb +31 -1
  6. data/lib/recurly/requests/account_external_subscription.rb +14 -0
  7. data/lib/recurly/requests/billing_info_create.rb +5 -1
  8. data/lib/recurly/requests/coupon_bulk_create.rb +1 -1
  9. data/lib/recurly/requests/external_account_create.rb +1 -1
  10. data/lib/recurly/requests/external_account_update.rb +1 -1
  11. data/lib/recurly/requests/external_product_reference_base.rb +2 -2
  12. data/lib/recurly/requests/external_product_reference_connection_type.rb +10 -0
  13. data/lib/recurly/requests/external_product_reference_create.rb +2 -2
  14. data/lib/recurly/requests/external_product_reference_update.rb +18 -0
  15. data/lib/recurly/requests/external_subscription_create.rb +62 -0
  16. data/lib/recurly/requests/external_subscription_update.rb +58 -0
  17. data/lib/recurly/requests/invoice_create.rb +8 -0
  18. data/lib/recurly/requests/payment_gateway_references.rb +18 -0
  19. data/lib/recurly/requests/purchase_create.rb +12 -0
  20. data/lib/recurly/requests/subscription_change_create.rb +8 -0
  21. data/lib/recurly/requests/subscription_create.rb +8 -0
  22. data/lib/recurly/resources/billing_info.rb +4 -0
  23. data/lib/recurly/resources/business_entity_mini.rb +26 -0
  24. data/lib/recurly/resources/external_account.rb +1 -1
  25. data/lib/recurly/resources/payment_gateway_references.rb +18 -0
  26. data/lib/recurly/resources/payment_method.rb +5 -1
  27. data/lib/recurly/resources/subscription.rb +4 -0
  28. data/lib/recurly/resources/subscription_change.rb +4 -0
  29. data/lib/recurly/resources/transaction.rb +8 -0
  30. data/lib/recurly/version.rb +1 -1
  31. data/openapi/api.yaml +516 -19
  32. data/recurly.gemspec +2 -0
  33. metadata +28 -6
data/openapi/api.yaml CHANGED
@@ -6265,8 +6265,7 @@ paths:
6265
6265
  schema:
6266
6266
  "$ref": "#/components/schemas/UniqueCouponCodeParams"
6267
6267
  '400':
6268
- description: Invalid or unpermitted parameter; perhaps you tried to generate
6269
- more than 200 codes at a time?
6268
+ description: Invalid or unpermitted parameter.
6270
6269
  content:
6271
6270
  application/json:
6272
6271
  schema:
@@ -6348,6 +6347,7 @@ paths:
6348
6347
  - "$ref": "#/components/parameters/sort_dates"
6349
6348
  - "$ref": "#/components/parameters/filter_begin_time"
6350
6349
  - "$ref": "#/components/parameters/filter_end_time"
6350
+ - "$ref": "#/components/parameters/filter_redeemed"
6351
6351
  responses:
6352
6352
  '200':
6353
6353
  description: A list of unique coupon codes that were generated
@@ -8198,11 +8198,49 @@ paths:
8198
8198
  "$ref": "#/components/schemas/Error"
8199
8199
  x-code-samples: []
8200
8200
  "/external_subscriptions":
8201
+ post:
8202
+ tags:
8203
+ - external_subscriptions
8204
+ operationId: create_external_subscription
8205
+ summary: Create an external subscription
8206
+ requestBody:
8207
+ content:
8208
+ application/json:
8209
+ schema:
8210
+ "$ref": "#/components/schemas/ExternalSubscriptionCreate"
8211
+ required: true
8212
+ responses:
8213
+ '201':
8214
+ description: Returns the external subscription
8215
+ content:
8216
+ application/json:
8217
+ schema:
8218
+ "$ref": "#/components/schemas/ExternalSubscription"
8219
+ '400':
8220
+ description: Bad request; perhaps missing or invalid parameters.
8221
+ content:
8222
+ application/json:
8223
+ schema:
8224
+ "$ref": "#/components/schemas/Error"
8225
+ '404':
8226
+ description: External subscription cannot be completed for the specified
8227
+ reason.
8228
+ content:
8229
+ application/json:
8230
+ schema:
8231
+ "$ref": "#/components/schemas/Error"
8232
+ default:
8233
+ description: Unexpected error.
8234
+ content:
8235
+ application/json:
8236
+ schema:
8237
+ "$ref": "#/components/schemas/Error"
8238
+ x-code-samples: []
8201
8239
  get:
8202
8240
  tags:
8203
8241
  - external_subscriptions
8204
8242
  operationId: list_external_subscriptions
8205
- summary: List a site's external subscriptions
8243
+ summary: List the external subscriptions on a site
8206
8244
  description: See the [Pagination Guide](/developers/guides/pagination.html)
8207
8245
  to learn how to use pagination in the API and Client Libraries.
8208
8246
  parameters:
@@ -8228,9 +8266,9 @@ paths:
8228
8266
  "$ref": "#/components/schemas/Error"
8229
8267
  x-code-samples: []
8230
8268
  "/external_subscriptions/{external_subscription_id}":
8231
- parameters:
8232
- - "$ref": "#/components/parameters/external_subscription_id_fetch"
8233
8269
  get:
8270
+ parameters:
8271
+ - "$ref": "#/components/parameters/external_subscription_id_fetch"
8234
8272
  tags:
8235
8273
  - external_subscriptions
8236
8274
  operationId: get_external_subscription
@@ -8262,6 +8300,52 @@ paths:
8262
8300
  schema:
8263
8301
  "$ref": "#/components/schemas/Error"
8264
8302
  x-code-samples: []
8303
+ put:
8304
+ parameters:
8305
+ - "$ref": "#/components/parameters/external_subscription_id"
8306
+ tags:
8307
+ - external_subscriptions
8308
+ operationId: put_external_subscription
8309
+ summary: Update an external subscription
8310
+ requestBody:
8311
+ content:
8312
+ application/json:
8313
+ schema:
8314
+ "$ref": "#/components/schemas/ExternalSubscriptionUpdate"
8315
+ required: false
8316
+ responses:
8317
+ '200':
8318
+ description: Settings for an external subscription.
8319
+ content:
8320
+ application/json:
8321
+ schema:
8322
+ "$ref": "#/components/schemas/ExternalSubscription"
8323
+ '400':
8324
+ description: Bad request; perhaps missing or invalid parameters.
8325
+ content:
8326
+ application/json:
8327
+ schema:
8328
+ "$ref": "#/components/schemas/Error"
8329
+ '404':
8330
+ description: Incorrect site or external subscription ID.
8331
+ content:
8332
+ application/json:
8333
+ schema:
8334
+ "$ref": "#/components/schemas/Error"
8335
+ '422':
8336
+ description: Validation error with external resource connection or feature
8337
+ flag.
8338
+ content:
8339
+ application/json:
8340
+ schema:
8341
+ "$ref": "#/components/schemas/Error"
8342
+ default:
8343
+ description: Unexpected error.
8344
+ content:
8345
+ application/json:
8346
+ schema:
8347
+ "$ref": "#/components/schemas/Error"
8348
+ x-code-samples: []
8265
8349
  "/external_subscriptions/{external_subscription_id}/external_invoices":
8266
8350
  parameters:
8267
8351
  - "$ref": "#/components/parameters/external_subscription_id"
@@ -17100,6 +17184,13 @@ components:
17100
17184
  - `type=legacy`, only legacy invoices will be returned.
17101
17185
  schema:
17102
17186
  "$ref": "#/components/schemas/FilterInvoiceTypeEnum"
17187
+ filter_redeemed:
17188
+ name: redeemed
17189
+ in: query
17190
+ description: Filter unique coupon codes by redemption status. `true` for redeemed,
17191
+ `false` for not redeemed.
17192
+ schema:
17193
+ "$ref": "#/components/schemas/FilterRedeemedEnum"
17103
17194
  export_date:
17104
17195
  name: export_date
17105
17196
  in: path
@@ -18649,6 +18740,12 @@ components:
18649
18740
  description: The `backup_payment_method` field is used to indicate a billing
18650
18741
  info as a backup on the account that will be tried if the initial billing
18651
18742
  info used for an invoice is declined.
18743
+ payment_gateway_references:
18744
+ type: array
18745
+ description: Array of Payment Gateway References, each a reference to a
18746
+ third-party gateway object of varying types.
18747
+ items:
18748
+ "$ref": "#/components/schemas/PaymentGatewayReferences"
18652
18749
  created_at:
18653
18750
  type: string
18654
18751
  format: date-time
@@ -18731,9 +18828,21 @@ components:
18731
18828
  maxLength: 50
18732
18829
  gateway_code:
18733
18830
  type: string
18734
- title: An identifier for a specific payment gateway. Must be used in conjunction
18735
- with `gateway_token`.
18831
+ title: An identifier for a specific payment gateway.
18736
18832
  maxLength: 12
18833
+ payment_gateway_references:
18834
+ type: array
18835
+ description: Array of Payment Gateway References, each a reference to a
18836
+ third-party gateway object of varying types.
18837
+ items:
18838
+ "$ref": "#/components/schemas/PaymentGatewayReferences"
18839
+ properties:
18840
+ token:
18841
+ type: string
18842
+ maxLength: 50
18843
+ reference_type:
18844
+ type: string
18845
+ "$ref": "#/components/schemas/PaymentGatewayReferencesEnum"
18737
18846
  gateway_attributes:
18738
18847
  type: object
18739
18848
  description: Additional attributes to send to the gateway.
@@ -19198,9 +19307,9 @@ components:
19198
19307
  number_of_unique_codes:
19199
19308
  type: integer
19200
19309
  title: Number of unique codes
19201
- description: The quantity of unique coupon codes to generate
19310
+ description: The quantity of unique coupon codes to generate. A bulk coupon
19311
+ can have up to 100,000 unique codes (or your site's configured limit).
19202
19312
  minimum: 1
19203
- maximum: 200
19204
19313
  CouponMini:
19205
19314
  type: object
19206
19315
  properties:
@@ -20294,6 +20403,22 @@ components:
20294
20403
  title: Currency
20295
20404
  description: 3-letter ISO 4217 currency code.
20296
20405
  maxLength: 3
20406
+ business_entity_id:
20407
+ type: string
20408
+ title: Business Entity ID
20409
+ description: The `business_entity_id` is the value that represents a specific
20410
+ business entity for an end customer which will be assigned to the invoice.
20411
+ Available when the `Multiple Business Entities` feature is enabled. If
20412
+ both `business_entity_id` and `business_entity_code` are present, `business_entity_id`
20413
+ will be used.
20414
+ business_entity_code:
20415
+ type: string
20416
+ title: Business Entity Code
20417
+ description: The `business_entity_code` is the value that represents a specific
20418
+ business entity for an end customer which will be assigned to the invoice.
20419
+ Available when the `Multiple Business Entities` feature is enabled. If
20420
+ both `business_entity_id` and `business_entity_code` are present, `business_entity_id`
20421
+ will be used.
20297
20422
  collection_method:
20298
20423
  title: Collection method
20299
20424
  description: An automatic invoice means a corresponding transaction is run
@@ -21185,6 +21310,22 @@ components:
21185
21310
  - currency
21186
21311
  - unit_amount
21187
21312
  - type
21313
+ PaymentGatewayReferences:
21314
+ type: object
21315
+ title: Payment Gateway References Object
21316
+ description: Array of Payment Gateway References, each a reference to a third-party
21317
+ gateway object of varying types.
21318
+ properties:
21319
+ token:
21320
+ type: string
21321
+ title: Token
21322
+ description: Reference value used when the external token was created. If
21323
+ Stripe gateway is used, this value will need to be accompanied by its
21324
+ reference_type.
21325
+ reference_type:
21326
+ type: string
21327
+ title: Reference Type
21328
+ "$ref": "#/components/schemas/PaymentGatewayReferencesEnum"
21188
21329
  PlanMini:
21189
21330
  type: object
21190
21331
  title: Plan mini details
@@ -22820,6 +22961,13 @@ components:
22820
22961
  subscription.
22821
22962
  maxLength: 13
22822
22963
  readOnly: true
22964
+ business_entity_id:
22965
+ type: string
22966
+ title: Business Entity ID
22967
+ description: The ID of the business entity associated with the subscription.
22968
+ This will be `null` if the subscription relies on resolving the business
22969
+ entity during renewal.
22970
+ maxLength: 13
22823
22971
  started_with_gift:
22824
22972
  type: boolean
22825
22973
  default: false
@@ -23186,6 +23334,9 @@ components:
23186
23334
  invoice_collection:
23187
23335
  title: Invoice Collection
23188
23336
  "$ref": "#/components/schemas/InvoiceCollection"
23337
+ business_entity:
23338
+ title: Business Entity
23339
+ "$ref": "#/components/schemas/BusinessEntityMini"
23189
23340
  custom_fields:
23190
23341
  "$ref": "#/components/schemas/CustomFields"
23191
23342
  created_at:
@@ -23251,6 +23402,26 @@ components:
23251
23402
  maxLength: 50
23252
23403
  description: If you want to change to a new plan, you can provide the plan's
23253
23404
  code or id. If both are provided the `plan_id` will be used.
23405
+ business_entity_id:
23406
+ type: string
23407
+ title: Business Entity ID
23408
+ description: The `business_entity_id` is the value that represents a specific
23409
+ business entity for an end customer. When `business_entity_id` is used
23410
+ to assign a business entity to the subscription, all future billing events
23411
+ for the subscription will bill to the specified business entity. Available
23412
+ when the `Multiple Business Entities` feature is enabled. If both `business_entity_id`
23413
+ and `business_entity_code` are present, `business_entity_id` will be used.
23414
+ Only allowed if the `timeframe` is not `now`.
23415
+ business_entity_code:
23416
+ type: string
23417
+ title: Business Entity Code
23418
+ description: The `business_entity_code` is the value that represents a specific
23419
+ business entity for an end customer. When `business_entity_code` is used
23420
+ to assign a business entity to the subscription, all future billing events
23421
+ for the subscription will bill to the specified business entity. Available
23422
+ when the `Multiple Business Entities` feature is enabled. If both `business_entity_id`
23423
+ and `business_entity_code` are present, `business_entity_id` will be used.
23424
+ Only allowed if the `timeframe` is not `now`.
23254
23425
  unit_amount:
23255
23426
  type: number
23256
23427
  format: float
@@ -23399,6 +23570,24 @@ components:
23399
23570
  maxLength: 13
23400
23571
  description: You must provide either a `plan_code` or `plan_id`. If both
23401
23572
  are provided the `plan_id` will be used.
23573
+ business_entity_id:
23574
+ type: string
23575
+ title: Business Entity ID
23576
+ description: The `business_entity_id` is the value that represents a specific
23577
+ business entity for an end customer. When `business_entity_id` is used
23578
+ to assign a business entity to the subscription, all future billing events
23579
+ for the subscription will bill to the specified business entity. Available
23580
+ when the `Multiple Business Entities` feature is enabled. If both `business_entity_id`
23581
+ and `business_entity_code` are present, `business_entity_id` will be used.
23582
+ business_entity_code:
23583
+ type: string
23584
+ title: Business Entity Code
23585
+ description: The `business_entity_code` is the value that represents a specific
23586
+ business entity for an end customer. When `business_entity_code` is used
23587
+ to assign a business entity to the subscription, all future billing events
23588
+ for the subscription will bill to the specified business entity. Available
23589
+ when the `Multiple Business Entities` feature is enabled. If both `business_entity_id`
23590
+ and `business_entity_code` are present, `business_entity_id` will be used.
23402
23591
  account:
23403
23592
  "$ref": "#/components/schemas/AccountCreate"
23404
23593
  billing_info_id:
@@ -24023,8 +24212,12 @@ components:
24023
24212
  maxLength: 13
24024
24213
  account:
24025
24214
  "$ref": "#/components/schemas/AccountMini"
24215
+ indicator:
24216
+ "$ref": "#/components/schemas/TransactionIndicatorEnum"
24026
24217
  invoice:
24027
24218
  "$ref": "#/components/schemas/InvoiceMini"
24219
+ merchant_reason_code:
24220
+ "$ref": "#/components/schemas/TransactionMerchantReasonCodeEnum"
24028
24221
  voided_by_invoice:
24029
24222
  "$ref": "#/components/schemas/InvoiceMini"
24030
24223
  subscription_ids:
@@ -24511,6 +24704,24 @@ components:
24511
24704
  billing info to the subscription, all future billing events for the subscription
24512
24705
  will bill to the specified billing info. `billing_info_id` can ONLY be
24513
24706
  used for sites utilizing the Wallet feature.
24707
+ business_entity_id:
24708
+ type: string
24709
+ title: Business Entity ID
24710
+ description: The `business_entity_id` is the value that represents a specific
24711
+ business entity for an end customer. When `business_entity_id` is used
24712
+ to assign a business entity to the subscription, all future billing events
24713
+ for the subscription will bill to the specified business entity. Available
24714
+ when the `Multiple Business Entities` feature is enabled. If both `business_entity_id`
24715
+ and `business_entity_code` are present, `business_entity_id` will be used.
24716
+ business_entity_code:
24717
+ type: string
24718
+ title: Business Entity Code
24719
+ description: The `business_entity_code` is the value that represents a specific
24720
+ business entity for an end customer. When `business_entity_code` is used
24721
+ to assign a business entity to the subscription, all future billing events
24722
+ for the subscription will bill to the specified business entity. Available
24723
+ when the `Multiple Business Entities` feature is enabled. If both `business_entity_id`
24724
+ and `business_entity_code` are present, `business_entity_id` will be used.
24514
24725
  collection_method:
24515
24726
  title: Collection method
24516
24727
  description: Must be set to manual in order to preview a purchase for an
@@ -24552,6 +24763,17 @@ components:
24552
24763
  type: string
24553
24764
  title: Terms and conditions
24554
24765
  description: Terms and conditions to be put on the purchase invoice.
24766
+ transaction:
24767
+ type: object
24768
+ description: "(Transaction Data, Card on File) - Options for flagging transactions
24769
+ as Customer or Merchant Initiated Unscheduled."
24770
+ allOf:
24771
+ - type: object
24772
+ properties:
24773
+ indicator:
24774
+ "$ref": "#/components/schemas/Transaction/properties/indicator"
24775
+ merchant_reason_code:
24776
+ "$ref": "#/components/schemas/Transaction/properties/merchant_reason_code"
24555
24777
  customer_notes:
24556
24778
  type: string
24557
24779
  title: Customer notes
@@ -24807,6 +25029,38 @@ components:
24807
25029
  type: string
24808
25030
  format: date-time
24809
25031
  description: Time the object was last updated
25032
+ ExternalChargeCreate:
25033
+ type: object
25034
+ properties:
25035
+ currency:
25036
+ type: string
25037
+ title: Currency
25038
+ description: 3-letter ISO 4217 currency code.
25039
+ maxLength: 3
25040
+ unit_amount:
25041
+ type: string
25042
+ format: decimal
25043
+ quantity:
25044
+ type: integer
25045
+ description:
25046
+ type: string
25047
+ external_product_reference:
25048
+ "$ref": "#/components/schemas/ExternalProductReferenceCreate"
25049
+ required:
25050
+ - quantity
25051
+ - currency
25052
+ - unit_amount
25053
+ AccountExternalSubscription:
25054
+ allOf:
25055
+ - type: object
25056
+ properties:
25057
+ account_code:
25058
+ type: string
25059
+ description: The account code of a new or existing account to be used
25060
+ when creating the external subscription.
25061
+ maxLength: 50
25062
+ required:
25063
+ - account_code
24810
25064
  ExternalPaymentPhase:
24811
25065
  type: object
24812
25066
  description: Details of payments in the lifecycle of a subscription from an
@@ -24974,7 +25228,7 @@ components:
24974
25228
  Google Play Store.
24975
25229
  maxLength: 255
24976
25230
  external_connection_type:
24977
- "$ref": "#/components/schemas/ExternalProductReferenceConnectionTypeEnum"
25231
+ "$ref": "#/components/schemas/ExternalProductReferenceConnectionType"
24978
25232
  ExternalProductReferenceCollection:
24979
25233
  type: object
24980
25234
  properties:
@@ -25001,11 +25255,10 @@ components:
25001
25255
  ExternalProductReferenceUpdate:
25002
25256
  allOf:
25003
25257
  - "$ref": "#/components/schemas/ExternalProductReferenceBase"
25004
- ExternalProductReferenceConnectionTypeEnum:
25258
+ ExternalProductReferenceConnectionType:
25005
25259
  type: string
25006
- enum:
25007
- - apple_app_store
25008
- - google_play_store
25260
+ description: Represents the connection type. One of the connection types of
25261
+ your enabled App Connectors
25009
25262
  ExternalAccountList:
25010
25263
  type: object
25011
25264
  properties:
@@ -25031,7 +25284,8 @@ components:
25031
25284
  description: Represents the account code for the external account.
25032
25285
  external_connection_type:
25033
25286
  type: string
25034
- description: Represents the connection type. `AppleAppStore` or `GooglePlayStore`
25287
+ description: Represents the connection type. One of the connection types
25288
+ of your enabled App Connectors
25035
25289
  required:
25036
25290
  - external_account_code
25037
25291
  - external_connection_type
@@ -25043,7 +25297,8 @@ components:
25043
25297
  description: Represents the account code for the external account.
25044
25298
  external_connection_type:
25045
25299
  type: string
25046
- description: Represents the connection type. `AppleAppStore` or `GooglePlayStore`
25300
+ description: Represents the connection type. One of the connection types
25301
+ of your enabled App Connectors
25047
25302
  ExternalAccount:
25048
25303
  type: object
25049
25304
  title: External Account
@@ -25059,7 +25314,8 @@ components:
25059
25314
  description: Represents the account code for the external account.
25060
25315
  external_connection_type:
25061
25316
  type: string
25062
- description: Represents the connection type. `AppleAppStore` or `GooglePlayStore`
25317
+ description: Represents the connection type. One of the connection types
25318
+ of your enabled App Connectors
25063
25319
  created_at:
25064
25320
  type: string
25065
25321
  format: date-time
@@ -25217,6 +25473,91 @@ components:
25217
25473
  format: date-time
25218
25474
  title: Updated at
25219
25475
  description: When the external subscription was updated in Recurly.
25476
+ ExternalSubscriptionBase:
25477
+ type: object
25478
+ properties:
25479
+ external_id:
25480
+ type: string
25481
+ title: External Id
25482
+ description: Id of the subscription in the external system, i.e. Apple App
25483
+ Store or Google Play Store.
25484
+ last_purchased:
25485
+ type: string
25486
+ format: date-time
25487
+ title: Last purchased
25488
+ description: When a new billing event occurred on the external subscription
25489
+ in conjunction with a recent billing period, reactivation or upgrade/downgrade.
25490
+ auto_renew:
25491
+ type: boolean
25492
+ title: Auto-renew
25493
+ description: An indication of whether or not the external subscription will
25494
+ auto-renew at the expiration date.
25495
+ default: false
25496
+ state:
25497
+ type: string
25498
+ description: External subscriptions can be active, canceled, expired, past_due,
25499
+ voided, revoked, or paused.
25500
+ default: active
25501
+ app_identifier:
25502
+ type: string
25503
+ title: App identifier
25504
+ description: Identifier of the app that generated the external subscription.
25505
+ quantity:
25506
+ type: integer
25507
+ title: Quantity
25508
+ description: An indication of the quantity of a subscribed item's quantity.
25509
+ default: 1
25510
+ minimum: 0
25511
+ activated_at:
25512
+ type: string
25513
+ format: date-time
25514
+ title: Activated at
25515
+ description: When the external subscription was activated in the external
25516
+ platform.
25517
+ expires_at:
25518
+ type: string
25519
+ format: date-time
25520
+ title: Expires at
25521
+ description: When the external subscription expires in the external platform.
25522
+ trial_started_at:
25523
+ type: string
25524
+ format: date-time
25525
+ title: Trial started at
25526
+ description: When the external subscription trial period started in the
25527
+ external platform.
25528
+ trial_ends_at:
25529
+ type: string
25530
+ format: date-time
25531
+ title: Trial ends at
25532
+ description: When the external subscription trial period ends in the external
25533
+ platform.
25534
+ imported:
25535
+ type: boolean
25536
+ title: Import
25537
+ description: An indication of whether or not the external subscription was
25538
+ being created by a historical data import.
25539
+ default: false
25540
+ ExternalSubscriptionCreate:
25541
+ allOf:
25542
+ - type: object
25543
+ properties:
25544
+ account:
25545
+ "$ref": "#/components/schemas/AccountExternalSubscription"
25546
+ external_product_reference:
25547
+ "$ref": "#/components/schemas/ExternalProductReferenceCreate"
25548
+ - "$ref": "#/components/schemas/ExternalSubscriptionBase"
25549
+ required:
25550
+ - external_id
25551
+ - quantity
25552
+ - activated_at
25553
+ - expires_at
25554
+ ExternalSubscriptionUpdate:
25555
+ allOf:
25556
+ - type: object
25557
+ properties:
25558
+ external_product_reference:
25559
+ "$ref": "#/components/schemas/ExternalProductReferenceUpdate"
25560
+ - "$ref": "#/components/schemas/ExternalSubscriptionBase"
25220
25561
  ExternalSubscriptionList:
25221
25562
  type: object
25222
25563
  properties:
@@ -25282,6 +25623,86 @@ components:
25282
25623
  format: date-time
25283
25624
  title: Updated at
25284
25625
  description: When the external invoice was updated in Recurly.
25626
+ ExternalPaymentPhaseBase:
25627
+ type: object
25628
+ properties:
25629
+ started_at:
25630
+ type: string
25631
+ format: date-time
25632
+ title: Started At
25633
+ ends_at:
25634
+ type: string
25635
+ format: date-time
25636
+ title: Ends At
25637
+ starting_billing_period_index:
25638
+ type: integer
25639
+ title: Starting Billing Period Index
25640
+ ending_billing_period_index:
25641
+ type: integer
25642
+ title: Ending Billing Period Index
25643
+ offer_type:
25644
+ type: string
25645
+ title: Offer Type
25646
+ description: Type of discount offer given, e.g. "FREE_TRIAL"
25647
+ offer_name:
25648
+ type: string
25649
+ title: Offer Name
25650
+ description: Name of the discount offer given, e.g. "introductory"
25651
+ period_count:
25652
+ type: integer
25653
+ title: Period Count
25654
+ description: Number of billing periods
25655
+ period_length:
25656
+ type: string
25657
+ title: Period Length
25658
+ description: Billing cycle length
25659
+ amount:
25660
+ type: string
25661
+ format: decimal
25662
+ title: Amount
25663
+ minimum: 0
25664
+ description: Allows up to 9 decimal places
25665
+ currency:
25666
+ type: string
25667
+ title: Currency
25668
+ description: 3-letter ISO 4217 currency code.
25669
+ maxLength: 3
25670
+ ExternalInvoiceCreate:
25671
+ type: object
25672
+ properties:
25673
+ external_id:
25674
+ type: string
25675
+ description: An identifier which associates the external invoice to a corresponding
25676
+ object in an external platform.
25677
+ state:
25678
+ "$ref": "#/components/schemas/ExternalInvoiceStateEnum"
25679
+ total:
25680
+ type: string
25681
+ format: decimal
25682
+ currency:
25683
+ type: string
25684
+ title: Currency
25685
+ description: 3-letter ISO 4217 currency code.
25686
+ maxLength: 3
25687
+ purchased_at:
25688
+ type: string
25689
+ format: date-time
25690
+ description: When the invoice was created in the external platform.
25691
+ line_items:
25692
+ type: array
25693
+ items:
25694
+ "$ref": "#/components/schemas/ExternalChargeCreate"
25695
+ external_payment_phase:
25696
+ "$ref": "#/components/schemas/ExternalPaymentPhaseBase"
25697
+ external_payment_phase_id:
25698
+ type: string
25699
+ description: External payment phase ID, e.g. `a34ypb2ef9w1`.
25700
+ required:
25701
+ - external_id
25702
+ - state
25703
+ - total
25704
+ - currency
25705
+ - purchased_at
25285
25706
  ExternalInvoiceList:
25286
25707
  type: object
25287
25708
  properties:
@@ -25444,8 +25865,10 @@ components:
25444
25865
  cc_bin_country:
25445
25866
  type: string
25446
25867
  description: The 2-letter ISO 3166-1 alpha-2 country code associated with
25447
- the credit card BIN, if known by Recurly. Available on the BillingInfo
25448
- object only. Available when the BIN country lookup feature is enabled.
25868
+ the card's issuer, if known.
25869
+ funding_source:
25870
+ "$ref": "#/components/schemas/CardFundingSourceEnum"
25871
+ description: The funding source of the card, if known.
25449
25872
  gateway_code:
25450
25873
  type: string
25451
25874
  description: An identifier for a specific payment gateway.
@@ -25584,6 +26007,30 @@ components:
25584
26007
  format: date-time
25585
26008
  title: Last updated at
25586
26009
  readOnly: true
26010
+ BusinessEntityMini:
26011
+ type: object
26012
+ description: Business entity details
26013
+ properties:
26014
+ id:
26015
+ title: Business entity ID
26016
+ type: string
26017
+ maxLength: 13
26018
+ readOnly: true
26019
+ object:
26020
+ title: Object type
26021
+ type: string
26022
+ readOnly: true
26023
+ code:
26024
+ title: Business entity code
26025
+ type: string
26026
+ maxLength: 50
26027
+ description: The entity code of the business entity.
26028
+ name:
26029
+ type: string
26030
+ title: Name
26031
+ description: This name describes your business entity and will appear on
26032
+ the invoice.
26033
+ maxLength: 255
25587
26034
  GiftCardList:
25588
26035
  type: object
25589
26036
  properties:
@@ -26027,6 +26474,11 @@ components:
26027
26474
  - credit
26028
26475
  - legacy
26029
26476
  - non-legacy
26477
+ FilterRedeemedEnum:
26478
+ type: string
26479
+ enum:
26480
+ - true
26481
+ - false
26030
26482
  ChannelEnum:
26031
26483
  type: string
26032
26484
  enum:
@@ -26088,6 +26540,14 @@ components:
26088
26540
  enum:
26089
26541
  - email
26090
26542
  - post
26543
+ PaymentGatewayReferencesEnum:
26544
+ type: string
26545
+ description: The type of reference token. Required if token is passed in for
26546
+ Stripe Gateway.
26547
+ enum:
26548
+ - stripe_confirmation_token
26549
+ - stripe_customer
26550
+ - stripe_payment_method
26091
26551
  GatewayTransactionTypeEnum:
26092
26552
  type: string
26093
26553
  enum:
@@ -26561,6 +27021,14 @@ components:
26561
27021
  - Dankort
26562
27022
  - MasterCard
26563
27023
  - Visa
27024
+ CardFundingSourceEnum:
27025
+ type: string
27026
+ enum:
27027
+ - credit
27028
+ - debit
27029
+ - charge
27030
+ - prepaid
27031
+ - deferred_debit
26564
27032
  AccountTypeEnum:
26565
27033
  type: string
26566
27034
  enum:
@@ -26907,3 +27375,32 @@ components:
26907
27375
  enum:
26908
27376
  - destination
26909
27377
  - origin
27378
+ TransactionMerchantReasonCodeEnum:
27379
+ type: string
27380
+ default: none
27381
+ description: |
27382
+ This conditional parameter is useful for merchants in specific industries who need to submit one-time Merchant Initiated transactions in specific cases.
27383
+ Not all gateways support these methods, but will support a generic one-time Merchant Initiated transaction.
27384
+ Only use this if the initiator value is "merchant". Otherwise, it will be ignored.
27385
+ - Incremental: Send `incremental` with an additional purchase if the original authorization amount is not sufficient to cover the costs of your service or product. For example, if the customer adds goods or services or there are additional expenses.
27386
+ - No Show: Send `no_show` if you charge customers a fee due to an agreed-upon cancellation policy in your industry.
27387
+ - Resubmission: Send `resubmission` if you need to attempt collection on a declined transaction. You may also use the force collection behavior which has the same effect.
27388
+ - Service Extension: Send `service_extension` if you are in a service industry and the customer has increased/extended their service in some way. For example: adding a day onto a car rental agreement.
27389
+ - Split Shipment: Send `split_shipment` if you sell physical product and need to split up a shipment into multiple transactions when the customer is no longer in session.
27390
+ - Top Up: Send `top_up` if you process one-time transactions based on a pre-arranged agreement with your customer where there is a pre-arranged account balance that needs maintaining. For example, if the customer has agreed to maintain an account balance of 30.00 and their current balance is 20.00, the MIT amount would be at least 10.00 to meet that 30.00 threshold.
27391
+ enum:
27392
+ - incremental
27393
+ - no_show
27394
+ - resubmission
27395
+ - service_extension
27396
+ - split_shipment
27397
+ - top_up
27398
+ TransactionIndicatorEnum:
27399
+ type: string
27400
+ description: Must be sent for one-time transactions in order to provide context
27401
+ on which entity is submitting the transaction to ensure proper fraud checks
27402
+ are observed, such as 3DS. If the customer is in session, send `customer`.
27403
+ If this is a merchant initiated one-time transaction, send `merchant`.
27404
+ enum:
27405
+ - customer
27406
+ - merchant