Note: Up to 64 characters are allowed before and 255 characters are allowed after the+@constraint:String {maxLength: 254} +public type Email string; + +# The account identifier for a PayPal account +@constraint:String {maxLength: 13, minLength: 13, pattern: re `^[2-9A-HJ-NP-Z]{13}$`} +public type AccountId string; + +# The response to a request to update the quantity of the product or service in a subscription. You can also use this method to switch the plan and update the `shipping_amount` and `shipping_address` values for the subscription. This type of update requires the buyer's consent +public type SubscriptionReviseResponse record { + *SubscriptionReviseRequest; + *SubscriptionReviseResponseAllOf2; +}; + +# The update pricing scheme request details +public type UpdatePricingSchemeRequest record { + # The billing cycle sequence + @constraint:Int {minValue: 1, maxValue: 99} + int billing_cycle_sequence; + PricingScheme pricing_scheme; +}; + +# The payment source definition. To be eligible to create subscription using debit or credit card, you will need to sign up here (https://www.paypal.com/bizsignup/entry/product/ppcp). Please note, its available only for non-3DS cards and for merchants in US and AU regions +public type PaymentSource record { + # The payment card to use to fund a payment. Can be a credit or debit card + Card card?; +}; + +# The card network or brand. Applies to credit, debit, gift, and payment cards +public type CardBrand "VISA"|"MASTERCARD"|"DISCOVER"|"AMEX"|"SOLO"|"JCB"|"STAR"|"DELTA"|"SWITCH"|"MAESTRO"|"CB_NATIONALE"|"CONFIGOGA"|"CONFIDIS"|"ELECTRON"|"CETELEM"|"CHINA_UNION_PAY"; + +# The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
Note: The regular expression provides guidance but does not reject all invalid dates.+@constraint:String {maxLength: 64, minLength: 20, pattern: re `^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$`} +public type DateTime string; + +public type TransactionAllOf2 record { + # The PayPal-generated transaction ID. + @constraint:String {maxLength: 50, minLength: 3} + string id?; + # The breakdown details for the amount. Includes the gross, tax, fee, and shipping amounts + AmountWithBreakdown amount_with_breakdown?; + # The name of the party + Name payer_name?; + # The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the+ EmailAddress payer_email?; + # The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
Note: The regular expression provides guidance but does not reject all invalid dates.+ DateTime time?; +}; + +# The name of the party +public type Name record { + # When the party is a person, the party's full name + @constraint:String {maxLength: 300} + string full_name?; + # The prefix, or title, to the party's name + @constraint:String {maxLength: 140} + string prefix?; + # When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname + @constraint:String {maxLength: 140} + string surname?; + # When the party is a person, the party's given, or first, name + @constraint:String {maxLength: 140} + string given_name?; + # When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name + @constraint:String {maxLength: 140} + string middle_name?; + # The suffix for the party's name + @constraint:String {maxLength: 140} + string suffix?; + # DEPRECATED. The party's alternate name. Can be a business name, nickname, or any other name that cannot be split into first, last name. Required when the party is a business + @constraint:String {maxLength: 300} + string alternate_full_name?; +}; + +# The [three-character ISO-4217 currency code](/docs/integration/direct/rest/currency-codes/) that identifies the currency +@constraint:String {maxLength: 3, minLength: 3} +public type CurrencyCode string; + +# The payment preferences for a subscription +public type PaymentPreferences record { + Money setup_fee?; + # The action to take on the subscription if the initial payment for the setup fails + "CONTINUE"|"CANCEL" setup_fee_failure_action = "CANCEL"; + # Indicates whether to automatically bill the outstanding amount in the next billing cycle + boolean auto_bill_outstanding = true; + # The maximum number of payment failures before a subscription is suspended. For example, if `payment_failure_threshold` is `2`, the subscription automatically updates to the `SUSPEND` state if two consecutive payments fail + @constraint:Int {minValue: 0, maxValue: 999} + int payment_failure_threshold = 0; +}; + +# Status of Authentication eligibility +public type Enrolled "Y"|"N"|"U"|"B"; + +# The list transactions for a subscription request details +public type TransactionsList record { + # An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links) + @constraint:Array {maxLength: 10, minLength: 1} + LinkDescription[] links?; + # The total number of pages + @constraint:Int {minValue: 0, maxValue: 100000000} + int total_pages?; + # An array of transactions + @constraint:Array {maxLength: 32767} + Transaction[] transactions?; + # The total number of items + @constraint:Int {minValue: 0, maxValue: 500000000} + int total_items?; +}; + +# The application context, which customizes the payer experience during the subscription approval process with PayPal +public type ApplicationContext record { + # Configures the label name to `Continue` or `Subscribe Now` for subscription consent experience + "CONTINUE"|"SUBSCRIBE_NOW" user_action = "SUBSCRIBE_NOW"; + # The URL where the customer is redirected after the customer approves the payment + @constraint:String {maxLength: 4000, minLength: 10} + string return_url; + # The label that overrides the business name in the PayPal account on the PayPal site + @constraint:String {maxLength: 127, minLength: 1} + string brand_name?; + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/docs/integration/direct/rest/country-codes/) + Language locale?; + # The URL where the customer is redirected after the customer cancels the payment + @constraint:String {maxLength: 4000, minLength: 10} + string cancel_url; + # The location from which the shipping address is derived + "GET_FROM_FILE"|"NO_SHIPPING"|"SET_PROVIDED_ADDRESS" shipping_preference = "GET_FROM_FILE"; + PaymentMethod payment_method?; +}; + +# The phone information +public type PhoneWithType record { + PhoneType phone_type?; + Phone phone_number; +}; + +# The details of the captured payment status +public type CaptureStatusDetails record { + # The reason why the captured payment status is `PENDING` or `DENIED` + "BUYER_COMPLAINT"|"CHARGEBACK"|"ECHECK"|"INTERNATIONAL_WITHDRAWAL"|"OTHER"|"PENDING_REVIEW"|"RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION"|"REFUNDED"|"TRANSACTION_APPROVED_AWAITING_FUNDING"|"UNILATERAL"|"VERIFICATION_REQUIRED" reason?; +}; + +# The subscriber response information +public type Subscriber record { + *Payer; + *SubscriberAllOf2; +}; + +# The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required +public type TaxInfo record { + # The customer's tax ID type + "BR_CPF"|"BR_CNPJ" tax_id_type; + # The customer's tax ID value + @constraint:String {maxLength: 14} + string tax_id; +}; + +# The pricing scheme details +public type PricingScheme record { + # An array of pricing tiers which are used for billing volume/tiered plans. pricing_model field has to be specified + @constraint:Array {maxLength: 32, minLength: 1} + PricingTier[] tiers?; + DateTime update_time?; + DateTime create_time?; + # The pricing model for tiered plan. The `tiers` parameter is required + "VOLUME"|"TIERED" pricing_model?; + Money fixed_price?; + # The version of the pricing scheme + @constraint:Int {minValue: 0, maxValue: 999} + int version?; +}; + +# The payment source used to fund the payment +public type PaymentSourceResponse record { + # The payment card used to fund the payment. Card can be a credit or debit card + CardResponseWithBillingAddress card?; +}; + +# An inline plan object to customise the subscription. You can override plan level default attributes by providing customised values for the subscription in this object +public type PlanOverride record { + PaymentPreferencesOverride payment_preferences?; + # An array of billing cycles for trial billing and regular billing. The subscription billing cycle definition has to adhere to the plan billing cycle definition + @constraint:Array {maxLength: 12, minLength: 1} + BillingCycleOverride[] billing_cycles?; + # The tax details + TaxesOverride taxes?; +}; + +# The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6) +@constraint:String {maxLength: 7, minLength: 7, pattern: re `^[0-9]{4}-(0[1-9]|1[0-2])$`} +public type DateYearMonth string; + +# The create subscription request details +public type SubscriptionRequestPost record { + Money shipping_amount?; + DateTime start_time?; + # The quantity of the product in the subscription + @constraint:String {maxLength: 32, minLength: 1, pattern: re `^([0-9]+|([0-9]+)?[.][0-9]+)$`} + string quantity?; + # The subscriber request information + SubscriberRequest subscriber?; + # The custom id for the subscription. Can be invoice id + @constraint:String {maxLength: 127, minLength: 1} + string custom_id?; + ApplicationContext application_context?; + # An inline plan object to customise the subscription. You can override plan level default attributes by providing customised values for the subscription in this object + PlanOverride plan?; + # The ID of the plan + @constraint:String {maxLength: 50, minLength: 3} + string plan_id; + # DEPRECATED. Indicates whether the subscription auto-renews after the billing cycles complete + # + # # Deprecated + @deprecated + boolean auto_renewal = false; +}; + +# Represents the Headers record for the operation: plans.create +public type PlansCreateHeaders record { + # The server stores keys for 72 hours + string PayPal\-Request\-Id?; + # The preferred server response upon successful completion of the request. Value is:
return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.return=representation. The server returns a complete resource representation, including the current state of the resource.Note: The regular expression provides guidance but does not reject all invalid dates.+ DateTime start_time?; + # The quantity of the product in the subscription. + @constraint:String {maxLength: 32, minLength: 1, pattern: re `^([0-9]+|([0-9]+)?[.][0-9]+)$`} + string quantity?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money shipping_amount?; + # The subscriber response information + Subscriber subscriber?; + # The billing details for the subscription. If the subscription was or is active, these fields are populated + SubscriptionBillingInfo billing_info?; + # The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.+ DateTime create_time?; + # The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.+ DateTime update_time?; + # The custom id for the subscription. Can be invoice id. + @constraint:String {maxLength: 127, minLength: 1} + string custom_id?; + # Indicates whether the subscription has overridden any plan attributes. + boolean plan_overridden?; + # The plan details + Plan plan?; + # An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). + LinkDescription[] links?; +}; + +# The billing cycle details +public type BillingCycle record { + # The order in which this cycle is to run among other billing cycles. For example, a trial billing cycle has a `sequence` of `1` while a regular billing cycle has a `sequence` of `2`, so that trial cycle runs before the regular cycle + @constraint:Int {minValue: 1, maxValue: 99} + int sequence; + # The tenure type of the billing cycle. In case of a plan having trial cycle, only 2 trial cycles are allowed per plan + "REGULAR"|"TRIAL" tenure_type; + # The number of times this billing cycle gets executed. Trial billing cycles can only be executed a finite number of times (value between
1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles)
+ @constraint:Int {minValue: 0, maxValue: 999}
+ int total_cycles = 1;
+ PricingScheme pricing_scheme?;
+ # The frequency of the billing cycle
+ Frequency frequency;
+};
+
+# Results of 3D Secure Authentication
+public type ThreeDSecureAuthenticationResponse record {
+ ParesStatus authentication_status?;
+ Enrolled enrollment_status?;
+};
+
+# The suspend subscription request details
+public type SubscriptionSuspendRequest record {
+ # The reason for suspenson of the subscription
+ @constraint:String {maxLength: 128, minLength: 1}
+ string reason;
+};
+
+# An array of JSON patch objects to apply partial updates to resources
+public type PatchRequest Patch[];
+
+# The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute)
+public type AddressPortable record {
+ CountryCode country_code;
+ # The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. Format for postal delivery. For example, `CA` and not `California`. Value, by country, is:Note: Up to 64 characters are allowed before and 255 characters are allowed after the+@constraint:String {maxLength: 254, minLength: 3, pattern: re `^.+@[^"\-].+$`} +public type EmailAddress string; + +# The payment card to use to fund a payment. Can be a credit or debit card +public type Card record { + # The primary account number (PAN) for the payment card + @constraint:String {maxLength: 19, minLength: 13} + string number; + # The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT` + @constraint:String {pattern: re `[0-9]{3,4}`} + string security_code?; + # The card holder's name as it appears on the card + @constraint:String {maxLength: 300} + string name?; + AddressPortable billing_address?; + # The PayPal-generated ID for the card + string id?; + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6) + DateYearMonth expiry; + CardBrand card_type?; + # The last digits of the payment card + @constraint:String {pattern: re `[0-9]{2,}`} + string last_digits?; +}; + +# Represents the Headers record for the operation: subscriptions.create +public type SubscriptionsCreateHeaders record { + # The server stores keys for 72 hours + string PayPal\-Request\-Id?; + # The preferred server response upon successful completion of the request. Value is:@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.return=representation. The server returns a complete resource representation, including the current state of the resource.move operation
+ string 'from?;
+ # The value to apply. The remove operation does not require a value
+ anydata value?;
+};
+
+# The details for the failed payment of the subscription
+public type FailedPaymentDetails record {
+ # The reason code for the payment failure
+ "PAYMENT_DENIED"|"INTERNAL_SERVER_ERROR"|"PAYEE_ACCOUNT_RESTRICTED"|"PAYER_ACCOUNT_RESTRICTED"|"PAYER_CANNOT_PAY"|"SENDING_LIMIT_EXCEEDED"|"TRANSACTION_RECEIVING_LIMIT_EXCEEDED"|"CURRENCY_MISMATCH" reason_code?;
+ # The currency and amount for a financial transaction, such as a balance or payment due
+ Money amount;
+ DateTime next_payment_retry_time?;
+ # The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.Note: The regular expression provides guidance but does not reject all invalid dates.+ DateTime time; +}; + +# The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information +public type LinkDescription record { + # The HTTP method required to make the related call + "GET"|"POST"|"PUT"|"DELETE"|"HEAD"|"CONNECT"|"OPTIONS"|"PATCH" method?; + # The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml) + string rel; + # The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call + string href; +}; + +# The shipping details +public type ShippingDetail record { + # The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute) + AddressPortable address?; + # The name of the party + Name name?; + # The method by which the payer wants to get their items from the payee e.g shipping, in-person pickup. Either type or options but not both may be present + "SHIPPING"|"PICKUP_IN_PERSON" 'type?; +}; + +# Represents the Queries record for the operation: subscriptions.transactions +public type SubscriptionsTransactionsQueries record { + # The start time of the range of transactions to list + @constraint:String {maxLength: 64, minLength: 20, pattern: re `^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$`} + string start_time; + # The end time of the range of transactions to list + @constraint:String {maxLength: 64, minLength: 20, pattern: re `^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$`} + string end_time; +}; + +# The tax details +public type TaxesOverride record { + # Indicates whether the tax was already included in the billing amount + boolean inclusive?; + # The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate as `19.99` + Percentage percentage?; +}; + +# Liability shift indicator. The outcome of the issuer's authentication +public type LiabilityShift "YES"|"NO"|"POSSIBLE"|"UNKNOWN"; + +# The breakdown details for the amount. Includes the gross, tax, fee, and shipping amounts +public type AmountWithBreakdown record { + Money shipping_amount?; + Money tax_amount?; + Money fee_amount?; + Money total_item_amount?; + Money gross_amount; + Money net_amount?; +}; + +# The currency and amount for a financial transaction, such as a balance or payment due +public type Money record { + # The value, which might be:
Note: The country code for Great Britain is+@constraint:String {maxLength: 2, minLength: 2, pattern: re `^([A-Z]{2}|C2)$`} +public type CountryCode string; + +# The pricing tier details +public type PricingTier record { + # The starting quantity for the tier + @constraint:String {maxLength: 32, minLength: 1, pattern: re `^([0-9]+|([0-9]+)?[.][0-9]+)$`} + string starting_quantity; + # The currency and amount for a financial transaction, such as a balance or payment due + Money amount; + # The ending quantity for the tier. Optional for the last tier + @constraint:String {maxLength: 32, minLength: 1, pattern: re `^([0-9]+|([0-9]+)?[.][0-9]+)$`} + string ending_quantity?; +}; + +# The customer who approves and pays for the order. The customer is also known as the payer +public type PayerBase record { + Email email_address?; + AccountId payer_id?; +}; + +public type SubscriberRequestAllOf2 record { + # The shipping details + ShippingDetail shipping_address?; + # The payment source definition. To be eligible to create subscription using debit or credit card, you will need to sign up here (https://www.paypal.com/bizsignup/entry/product/ppcp). Please note, its available only for non-3DS cards and for merchants in US and AU regions + PaymentSource payment_source?; +}; + +# The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate as `19.99` +@constraint:String {pattern: re `^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$`} +public type Percentage string; + +# The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third party and open source. Redundant with core fields.GBand notUKas used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
Craven House
+ @constraint:String {maxLength: 100}
+ string building_name?;
+ # The street number
+ @constraint:String {maxLength: 100}
+ string street_number?;
+ # The street type. For example, avenue, boulevard, road, or expressway
+ @constraint:String {maxLength: 100}
+ string street_type?;
+ # The first-order entity below a named building or location that represents the sub-premises. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment
+ @constraint:String {maxLength: 100}
+ string sub_building?;
+ # The delivery service. Post office box, bag number, or post office name
+ @constraint:String {maxLength: 100}
+ string delivery_service?;
+ # The street name. Just `Drury` in `Drury Lane`
+ @constraint:String {maxLength: 100}
+ string street_name?;
+};
+
+# Represents the Queries record for the operation: plans.list
+public type PlansListQueries record {
+ # Filters the response by a Product ID
+ @constraint:String {maxLength: 50, minLength: 6}
+ string product_id?;
+ # Filters the response by list of plan IDs. Filter supports upto 10 plan IDs
+ string plan_ids?;
+ # A non-zero integer which is the start index of the entire list of items to return in the response. The combination of `page=1` and `page_size=20` returns the first 20 items. The combination of `page=2` and `page_size=20` returns the next 20 items
+ @constraint:Int {minValue: 1, maxValue: 100000}
+ int page = 1;
+ # Indicates whether to show the total count in the response
+ boolean total_required = false;
+ # The number of items to return in the response
+ @constraint:Int {minValue: 1, maxValue: 20}
+ int page_size = 10;
+};
+
+# Represents the Headers record for the operation: plans.list
+public type PlansListHeaders record {
+ # The preferred server response upon successful completion of the request. Value is:return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.return=representation. The server returns a complete resource representation, including the current state of the resource.Note: The regular expression provides guidance but does not reject all invalid dates.+ DateTime time?; +}; + +# The subscription status details +public type SubscriptionStatus record { + # The reason or notes for the status of the subscription + @constraint:String {maxLength: 128, minLength: 1} + string status_change_note?; + # The status of the subscription + "APPROVAL_PENDING"|"APPROVED"|"ACTIVE"|"SUSPENDED"|"CANCELLED"|"EXPIRED" status?; + DateTime status_update_time?; +}; + +# The billing details for the subscription. If the subscription was or is active, these fields are populated +public type SubscriptionBillingInfo record { + DateTime final_payment_time?; + # The trial and regular billing executions + @constraint:Array {maxLength: 3} + CycleExecution[] cycle_executions?; + # The number of consecutive payment failures. Resets to `0` after a successful payment. If this reaches the `payment_failure_threshold` value, the subscription updates to the `SUSPENDED` state + @constraint:Int {minValue: 0, maxValue: 999} + int failed_payments_count; + DateTime next_billing_time?; + FailedPaymentDetails last_failed_payment?; + Money outstanding_balance; + LastPaymentDetails last_payment?; +}; + +# The list of plans with details +public type PlanCollection record { + # An array of plans + @constraint:Array {maxLength: 32767} + Plan[] plans?; + # An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links) + @constraint:Array {maxLength: 10, minLength: 1} + LinkDescription[] links?; + # The total number of pages + @constraint:Int {minValue: 0, maxValue: 100000000} + int total_pages?; + # The total number of items + @constraint:Int {minValue: 0, maxValue: 500000000} + int total_items?; +}; + +# The request to update the quantity of the product or service in a subscription. You can also use this method to switch the plan and update the `shipping_amount` and `shipping_address` values for the subscription. This type of update requires the buyer's consent +public type SubscriptionReviseRequest record { + Money shipping_amount?; + # The quantity of the product or service in the subscription + @constraint:String {maxLength: 32, minLength: 1, pattern: re `^([0-9]+|([0-9]+)?[.][0-9]+)$`} + string quantity?; + ApplicationContext application_context?; + ShippingDetail shipping_address?; + # An inline plan object to customise the subscription. You can override plan level default attributes by providing customised values for the subscription in this object + PlanOverride plan?; + # The unique PayPal-generated ID for the plan + @constraint:String {maxLength: 50, minLength: 3} + string plan_id?; +}; + +# The frequency of the billing cycle +public type Frequency record { + # The number of intervals after which a subscriber is billed. For example, if the `interval_unit` is `DAY` with an `interval_count` of `2`, the subscription is billed once every two days. The following table lists the maximum allowed values for the `interval_count` for each `interval_unit`:
Interval unit | Maximum interval count |
|---|---|
DAY | 365 |
WEEK | 52 |
MONTH | 12 |
YEAR | 1 |
1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles)
+ @constraint:Int {minValue: 0, maxValue: 999}
+ int total_cycles?;
+ PricingScheme pricing_scheme?;
+};
+
+# The regular and trial execution details for a billing cycle
+public type CycleExecution record {
+ # The order in which to run this cycle among other billing cycles
+ @constraint:Int {minValue: 0, maxValue: 99}
+ int sequence;
+ # For a finite billing cycle, cycles_remaining is the number of remaining cycles. For an infinite billing cycle, cycles_remaining is set as 0
+ @constraint:Int {minValue: 0, maxValue: 9999}
+ int cycles_remaining?;
+ # The type of the billing cycle
+ "REGULAR"|"TRIAL" tenure_type;
+ # The number of billing cycles that have completed
+ @constraint:Int {minValue: 0, maxValue: 9999}
+ int cycles_completed;
+ # The active pricing scheme version for the billing cycle
+ @constraint:Int {minValue: 1, maxValue: 99}
+ int current_pricing_scheme_version?;
+ # The number of times this billing cycle gets executed. Trial billing cycles can only be executed a finite number of times (value between 1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles)
+ @constraint:Int {minValue: 0, maxValue: 999}
+ int total_cycles?;
+};
diff --git a/ballerina/utils.bal b/ballerina/utils.bal
new file mode 100644
index 0000000..8269f00
--- /dev/null
+++ b/ballerina/utils.bal
@@ -0,0 +1,219 @@
+// AUTO-GENERATED FILE. DO NOT MODIFY.
+// This file is auto-generated by the Ballerina OpenAPI tool.
+
+// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com).
+//
+// WSO2 LLC. licenses this file to you under the Apache License,
+// Version 2.0 (the "License"); you may not use this file except
+// in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+import ballerina/http;
+import ballerina/url;
+
+type SimpleBasicType string|boolean|int|float|decimal;
+
+# Represents encoding mechanism details.
+type Encoding record {
+ # Defines how multiple values are delimited
+ string style = FORM;
+ # Specifies whether arrays and objects should generate as separate fields
+ boolean explode = true;
+ # Specifies the custom content type
+ string contentType?;
+ # Specifies the custom headers
+ map| Attribute or object | Operations |
|---|---|
description | replace |
payment_preferences.auto_bill_outstanding | replace |
taxes.percentage | replace |
payment_preferences.payment_failure_threshold | replace |
payment_preferences.setup_fee | replace |
payment_preferences.setup_fee_failure_action | replace |
name | replace |
ACTIVE or SUSPENDED status. You can override plan level default attributes by providing customised values for plan path in the patch request.| Attribute or object | Operations |
|---|---|
billing_info.outstanding_balance | replace |
custom_id | add,replace |
plan.billing_cycles[@sequence==n]. | add,replace |
plan.billing_cycles[@sequence==n]. | replace |
plan.billing_cycles[@sequence==n]. | replace |
plan.payment_preferences. | replace |
plan.payment_preferences. | replace |
plan.taxes.inclusive | add,replace |
plan.taxes.percentage | add,replace |
shipping_amount | add,replace |
start_time | replace |
subscriber.shipping_address | add,replace |
subscriber.payment_source (for subscriptions funded | replace |
1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles)",
+ "default" : 1,
+ "x-ballerina-name-ignore" : "totalCycles"
+ },
+ "pricing_scheme" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/PricingScheme"
+ } ],
+ "x-ballerina-name-ignore" : "pricingScheme"
+ },
+ "frequency" : {
+ "$ref" : "#/components/schemas/Frequency"
+ }
+ },
+ "description" : "The billing cycle details"
+ },
+ "InlineResponse42211" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Error422"
+ }, {
+ "$ref" : "#/components/schemas/SubscriptionsCapture422"
+ } ]
+ },
+ "InlineResponse42210" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Error422"
+ }, {
+ "$ref" : "#/components/schemas/SubscriptionsActivate422"
+ } ]
+ },
+ "INVALIDRESOURCEID1" : {
+ "title" : "INVALID_RESOURCE_ID",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_RESOURCE_ID" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Requested resource ID was not found." ]
+ }
+ }
+ },
+ "PaymentPreferencesOverride" : {
+ "title" : "Payment Preferences Override",
+ "type" : "object",
+ "properties" : {
+ "setup_fee" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Money"
+ } ],
+ "x-ballerina-name-ignore" : "setupFee"
+ },
+ "setup_fee_failure_action" : {
+ "maxLength" : 24,
+ "minLength" : 1,
+ "pattern" : "^[A-Z_]+$",
+ "type" : "string",
+ "description" : "The action to take on the subscription if the initial payment for the setup fails",
+ "enum" : [ "CONTINUE", "CANCEL" ],
+ "x-ballerina-name-ignore" : "setupFeeFailureAction"
+ },
+ "auto_bill_outstanding" : {
+ "type" : "boolean",
+ "description" : "Indicates whether to automatically bill the outstanding amount in the next billing cycle",
+ "x-ballerina-name-ignore" : "autoBillOutstanding"
+ },
+ "payment_failure_threshold" : {
+ "maximum" : 999,
+ "minimum" : 0,
+ "type" : "integer",
+ "description" : "The maximum number of payment failures before a subscription is suspended. For example, if `payment_failure_threshold` is `2`, the subscription automatically updates to the `SUSPEND` state if two consecutive payments fail",
+ "x-ballerina-name-ignore" : "paymentFailureThreshold"
+ }
+ },
+ "description" : "The payment preferences to override at subscription level"
+ },
+ "Subscriptionscreate422Details" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/USERACCOUNTCLOSED4"
+ }, {
+ "$ref" : "#/components/schemas/PLANSTATUSINVALID2"
+ }, {
+ "$ref" : "#/components/schemas/SUBSCRIPTIONCANNOTHAVEQUANTITY"
+ }, {
+ "$ref" : "#/components/schemas/CARDSUBSCRIPTIONSNOTENABLED"
+ }, {
+ "$ref" : "#/components/schemas/3DSCARDSNOTSUPPORTED"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDBILLINGCYCLESEQUENCE3"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDPRICINGSCHEME1"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDPRICINGTIERAMOUNT2"
+ }, {
+ "$ref" : "#/components/schemas/MISSINGPRICINGSCHEMETIERS2"
+ }, {
+ "$ref" : "#/components/schemas/OVERLAPPINGPRICINGSCHEMETIERS2"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDPRICINGMODEL2"
+ }, {
+ "$ref" : "#/components/schemas/FIXEDPRICENOTSUPPORTED2"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDPRICINGTIERQUANTITY2"
+ }, {
+ "$ref" : "#/components/schemas/CURRENCYMISMATCH2"
+ } ]
+ },
+ "UpdatePricingSchemesListRequest" : {
+ "title" : "Update Pricing Scheme Request",
+ "required" : [ "pricing_schemes" ],
+ "type" : "object",
+ "properties" : {
+ "pricing_schemes" : {
+ "maxItems" : 99,
+ "minItems" : 1,
+ "type" : "array",
+ "description" : "An array of pricing schemes",
+ "items" : {
+ "$ref" : "#/components/schemas/UpdatePricingSchemeRequest"
+ },
+ "x-ballerina-name-ignore" : "pricingSchemes"
+ }
+ },
+ "description" : "The update pricing scheme request details"
+ },
+ "DateNoTime" : {
+ "maxLength" : 10,
+ "minLength" : 10,
+ "pattern" : "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$",
+ "type" : "string",
+ "description" : "The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years",
+ "format" : "ppaas_date_notime_v2"
+ },
+ "CURRENCYNOTSUPPORTEDFORRECEIVER" : {
+ "title" : "CURRENCY_NOT_SUPPORTED_FOR_RECEIVER",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "CURRENCY_NOT_SUPPORTED_FOR_RECEIVER" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "This currency cannot be accepted for this recipient’s account." ]
+ }
+ }
+ },
+ "SubscriberRequest" : {
+ "title" : "Subscriber Request Information",
+ "type" : "object",
+ "description" : "The subscriber request information ",
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Payer"
+ }, {
+ "$ref" : "#/components/schemas/SubscriberRequestAllOf2"
+ } ]
+ },
+ "CaptureStatus" : {
+ "title" : "Capture Status",
+ "type" : "object",
+ "properties" : {
+ "status_details" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/CaptureStatusDetails"
+ } ],
+ "x-ballerina-name-ignore" : "statusDetails"
+ },
+ "status" : {
+ "type" : "string",
+ "description" : "The status of the captured payment",
+ "readOnly" : true,
+ "enum" : [ "COMPLETED", "DECLINED", "PARTIALLY_REFUNDED", "PENDING", "REFUNDED" ]
+ }
+ },
+ "description" : "The status of a captured payment"
+ },
+ "FailedPaymentDetails" : {
+ "title" : "Failed Payment Details",
+ "required" : [ "amount", "time" ],
+ "type" : "object",
+ "properties" : {
+ "reason_code" : {
+ "maxLength" : 120,
+ "minLength" : 1,
+ "pattern" : "^[A-Z_]+$",
+ "type" : "string",
+ "description" : "The reason code for the payment failure",
+ "readOnly" : true,
+ "enum" : [ "PAYMENT_DENIED", "INTERNAL_SERVER_ERROR", "PAYEE_ACCOUNT_RESTRICTED", "PAYER_ACCOUNT_RESTRICTED", "PAYER_CANNOT_PAY", "SENDING_LIMIT_EXCEEDED", "TRANSACTION_RECEIVING_LIMIT_EXCEEDED", "CURRENCY_MISMATCH" ],
+ "x-ballerina-name-ignore" : "reasonCode"
+ },
+ "amount" : {
+ "$ref" : "#/components/schemas/Money"
+ },
+ "next_payment_retry_time" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/DateTime"
+ } ],
+ "x-ballerina-name-ignore" : "nextPaymentRetryTime"
+ },
+ "time" : {
+ "$ref" : "#/components/schemas/DateTime"
+ }
+ },
+ "description" : "The details for the failed payment of the subscription"
+ },
+ "INVALIDBILLINGCYCLESEQUENCE1" : {
+ "title" : "INVALID_BILLING_CYCLE_SEQUENCE",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_BILLING_CYCLE_SEQUENCE" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Trial Billing cycle should precede regular billing cycle." ]
+ }
+ }
+ },
+ "CARDSUBSCRIPTIONSNOTENABLED1" : {
+ "title" : "CARD_SUBSCRIPTIONS_NOT_ENABLED",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "CARD_SUBSCRIPTIONS_NOT_ENABLED" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "The account is not setup to be able to process subscriptions funded by card payments. Please contact PayPal customer support." ]
+ }
+ }
+ },
+ "INVALIDBILLINGCYCLESEQUENCE2" : {
+ "title" : "INVALID_BILLING_CYCLE_SEQUENCE",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_BILLING_CYCLE_SEQUENCE" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "The provided billing cycle sequence is not available." ]
+ }
+ }
+ },
+ "PlansupdatePricingSchemes422Details" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/CURRENCYMISMATCH1"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDBILLINGCYCLESEQUENCE2"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDPRICINGSCHEME"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDPRICINGTIERAMOUNT1"
+ }, {
+ "$ref" : "#/components/schemas/MISSINGPRICINGSCHEMETIERS1"
+ }, {
+ "$ref" : "#/components/schemas/OVERLAPPINGPRICINGSCHEMETIERS1"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDPRICINGMODEL1"
+ }, {
+ "$ref" : "#/components/schemas/FIXEDPRICENOTSUPPORTED1"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDPRICINGTIERQUANTITY1"
+ }, {
+ "$ref" : "#/components/schemas/PRICINGSCHEMEUPDATENOTALLOWED"
+ } ]
+ },
+ "InlineResponse401" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Error401"
+ }, {
+ "$ref" : "#/components/schemas/Unauthorized"
+ } ]
+ },
+ "InlineResponse400" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Error400"
+ }, {
+ "$ref" : "#/components/schemas/BadRequest"
+ } ]
+ },
+ "ErrorDetails" : {
+ "title" : "Error Details",
+ "required" : [ "issue" ],
+ "type" : "object",
+ "properties" : {
+ "field" : {
+ "type" : "string",
+ "description" : "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors"
+ },
+ "issue" : {
+ "type" : "string",
+ "description" : "The unique, fine-grained application-level error code"
+ },
+ "description" : {
+ "type" : "string",
+ "description" : "The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value"
+ },
+ "location" : {
+ "$ref" : "#/components/schemas/ErrorLocation"
+ },
+ "value" : {
+ "type" : "string",
+ "description" : "The value of the field that caused the error"
+ }
+ },
+ "description" : "The error details. Required for client-side `4XX` errors"
+ },
+ "InlineResponse403" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Error403"
+ }, {
+ "$ref" : "#/components/schemas/Forbidden"
+ } ]
+ },
+ "INVALIDACCOUNTSTATUS" : {
+ "title" : "INVALID_ACCOUNT_STATUS",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_ACCOUNT_STATUS" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Account validations failed for the user." ]
+ }
+ }
+ },
+ "Subscriptionsrevise404Details" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/INVALIDRESOURCEID1"
+ } ]
+ },
+ "InlineResponse404" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Error404"
+ }, {
+ "$ref" : "#/components/schemas/NotFound"
+ } ]
+ },
+ "PlansPatch400" : {
+ "properties" : {
+ "details" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Planspatch400Details"
+ }
+ }
+ }
+ },
+ "Subscriptionsrevise400Details" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/INVALIDPARAMETERSYNTAX4"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDPARAMETERVALUE8"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDINTEGERMINVALUE3"
+ }, {
+ "$ref" : "#/components/schemas/INVALIDINTEGERMAXVALUE3"
+ }, {
+ "$ref" : "#/components/schemas/MISSINGREQUESTBODY2"
+ }, {
+ "$ref" : "#/components/schemas/MISSINGREQUIREDPARAMETER4"
+ } ]
+ },
+ "INVALIDBILLINGCYCLESEQUENCE3" : {
+ "title" : "INVALID_BILLING_CYCLE_SEQUENCE",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_BILLING_CYCLE_SEQUENCE" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "The provided billing cycle sequence is not available." ]
+ }
+ }
+ },
+ "INVALIDBILLINGCYCLESEQUENCE4" : {
+ "title" : "INVALID_BILLING_CYCLE_SEQUENCE",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_BILLING_CYCLE_SEQUENCE" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "The provided billing cycle sequence is not available." ]
+ }
+ }
+ },
+ "MULTIPLEFREETRIALBILLINGCYCLESNOTSUPPORTED" : {
+ "title" : "MULTIPLE_FREE_TRIAL_BILLING_CYCLES_NOT_SUPPORTED",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "MULTIPLE_FREE_TRIAL_BILLING_CYCLES_NOT_SUPPORTED" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Only one free trial billing cycle is allowed." ]
+ }
+ }
+ },
+ "404Details" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/INVALIDRESOURCEID"
+ } ]
+ },
+ "INVALIDPRICINGTIERAMOUNT1" : {
+ "title" : "INVALID_PRICING_TIER_AMOUNT",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_PRICING_TIER_AMOUNT" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Free tiers are not supported." ]
+ }
+ }
+ },
+ "SUBSCRIBERACCOUNTRESTRICTED" : {
+ "title" : "SUBSCRIBER_ACCOUNT_RESTRICTED",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "SUBSCRIBER_ACCOUNT_RESTRICTED" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Subscriber Account Restricted." ]
+ }
+ }
+ },
+ "AddressDetails" : {
+ "title" : "Address Details",
+ "type" : "object",
+ "properties" : {
+ "building_name" : {
+ "maxLength" : 100,
+ "type" : "string",
+ "description" : "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House",
+ "x-ballerina-name-ignore" : "buildingName"
+ },
+ "street_number" : {
+ "maxLength" : 100,
+ "type" : "string",
+ "description" : "The street number",
+ "x-ballerina-name-ignore" : "streetNumber"
+ },
+ "street_type" : {
+ "maxLength" : 100,
+ "type" : "string",
+ "description" : "The street type. For example, avenue, boulevard, road, or expressway",
+ "x-ballerina-name-ignore" : "streetType"
+ },
+ "sub_building" : {
+ "maxLength" : 100,
+ "type" : "string",
+ "description" : "The first-order entity below a named building or location that represents the sub-premises. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment",
+ "x-ballerina-name-ignore" : "subBuilding"
+ },
+ "delivery_service" : {
+ "maxLength" : 100,
+ "type" : "string",
+ "description" : "The delivery service. Post office box, bag number, or post office name",
+ "x-ballerina-name-ignore" : "deliveryService"
+ },
+ "street_name" : {
+ "maxLength" : 100,
+ "type" : "string",
+ "description" : "The street name. Just `Drury` in `Drury Lane`",
+ "x-ballerina-name-ignore" : "streetName"
+ }
+ },
+ "description" : "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third party and open source. Redundant with core fields.Interval unit | Maximum interval count |
|---|---|
DAY | 365 |
WEEK | 52 |
MONTH | 12 |
YEAR | 1 |
1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles)",
+ "x-ballerina-name-ignore" : "totalCycles"
+ },
+ "pricing_scheme" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/PricingScheme"
+ } ],
+ "x-ballerina-name-ignore" : "pricingScheme"
+ }
+ },
+ "description" : "The billing cycle details to override at subscription level. The subscription billing cycle definition has to adhere to the plan billing cycle definition"
+ },
+ "CycleExecution" : {
+ "title" : "Billing Cycle Execution Details",
+ "required" : [ "cycles_completed", "sequence", "tenure_type" ],
+ "type" : "object",
+ "properties" : {
+ "sequence" : {
+ "maximum" : 99,
+ "minimum" : 0,
+ "type" : "integer",
+ "description" : "The order in which to run this cycle among other billing cycles"
+ },
+ "cycles_remaining" : {
+ "maximum" : 9999,
+ "minimum" : 0,
+ "type" : "integer",
+ "description" : "For a finite billing cycle, cycles_remaining is the number of remaining cycles. For an infinite billing cycle, cycles_remaining is set as 0",
+ "readOnly" : true,
+ "x-ballerina-name-ignore" : "cyclesRemaining"
+ },
+ "tenure_type" : {
+ "maxLength" : 24,
+ "minLength" : 1,
+ "pattern" : "^[A-Z_]+$",
+ "type" : "string",
+ "description" : "The type of the billing cycle",
+ "readOnly" : true,
+ "enum" : [ "REGULAR", "TRIAL" ],
+ "x-ballerina-name-ignore" : "tenureType"
+ },
+ "cycles_completed" : {
+ "maximum" : 9999,
+ "minimum" : 0,
+ "type" : "integer",
+ "description" : "The number of billing cycles that have completed",
+ "readOnly" : true,
+ "x-ballerina-name-ignore" : "cyclesCompleted"
+ },
+ "current_pricing_scheme_version" : {
+ "maximum" : 99,
+ "minimum" : 1,
+ "type" : "integer",
+ "description" : "The active pricing scheme version for the billing cycle",
+ "readOnly" : true,
+ "x-ballerina-name-ignore" : "currentPricingSchemeVersion"
+ },
+ "total_cycles" : {
+ "maximum" : 999,
+ "minimum" : 0,
+ "type" : "integer",
+ "description" : "The number of times this billing cycle gets executed. Trial billing cycles can only be executed a finite number of times (value between 1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles)",
+ "readOnly" : true,
+ "x-ballerina-name-ignore" : "totalCycles"
+ }
+ },
+ "description" : "The regular and trial execution details for a billing cycle"
+ },
+ "INVALIDTRIALBILLINGTOTALCYCLES" : {
+ "title" : "INVALID_TRIAL_BILLING_TOTAL_CYCLES",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_TRIAL_BILLING_TOTAL_CYCLES" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Total cycles for trial billing must be greater than '0'." ]
+ }
+ }
+ },
+ "Email" : {
+ "maxLength" : 254,
+ "pattern" : "(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])",
+ "type" : "string",
+ "description" : "The internationalized email address.Note: Up to 64 characters are allowed before and 255 characters are allowed after the", + "format" : "merchant_common_email_address_v2" + }, + "AccountId" : { + "title" : "PayPal Account Identifier", + "maxLength" : 13, + "minLength" : 13, + "pattern" : "^[2-9A-HJ-NP-Z]{13}$", + "type" : "string", + "description" : "The account identifier for a PayPal account", + "format" : "ppaas_payer_id_v3" + }, + "Subscriptionsactivate422Details" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/USERACCOUNTCLOSED9" + }, { + "$ref" : "#/components/schemas/SUBSCRIPTIONSTATUSINVALID3" + }, { + "$ref" : "#/components/schemas/SUBSCRIPTIONCANNOTBEACTIVATED" + }, { + "$ref" : "#/components/schemas/SUBSCRIPTIONCANNOTBEACTIVATED1" + }, { + "$ref" : "#/components/schemas/SUBSCRIPTIONCANNOTBEACTIVATED2" + } ] + }, + "SubscriptionsCreate422" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Subscriptionscreate422Details" + } + } + } + }, + "INVALIDPRICINGTIERAMOUNT" : { + "title" : "INVALID_PRICING_TIER_AMOUNT", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PRICING_TIER_AMOUNT" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Free tiers are not supported." ] + } + } + }, + "Name" : { + "title" : "Name", + "type" : "object", + "properties" : { + "full_name" : { + "maxLength" : 300, + "type" : "string", + "description" : "When the party is a person, the party's full name", + "x-ballerina-name-ignore" : "fullName" + }, + "prefix" : { + "maxLength" : 140, + "type" : "string", + "description" : "The prefix, or title, to the party's name" + }, + "surname" : { + "maxLength" : 140, + "type" : "string", + "description" : "When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname" + }, + "given_name" : { + "maxLength" : 140, + "type" : "string", + "description" : "When the party is a person, the party's given, or first, name", + "x-ballerina-name-ignore" : "givenName" + }, + "middle_name" : { + "maxLength" : 140, + "type" : "string", + "description" : "When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name", + "x-ballerina-name-ignore" : "middleName" + }, + "suffix" : { + "maxLength" : 140, + "type" : "string", + "description" : "The suffix for the party's name" + }, + "alternate_full_name" : { + "maxLength" : 300, + "type" : "string", + "description" : "DEPRECATED. The party's alternate name. Can be a business name, nickname, or any other name that cannot be split into first, last name. Required when the party is a business", + "x-ballerina-name-ignore" : "alternateFullName" + } + }, + "description" : "The name of the party" + }, + "Enrolled" : { + "maxLength" : 255, + "minLength" : 1, + "pattern" : "^[0-9A-Z_]+$", + "type" : "string", + "description" : "Status of Authentication eligibility", + "enum" : [ "Y", "N", "U", "B" ] + }, + "BILLINGCYCLEEXECUTIONCOMPLETED" : { + "title" : "BILLING_CYCLE_EXECUTION_COMPLETED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "BILLING_CYCLE_EXECUTION_COMPLETED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Update cannot be performed on a billing cycle that has completed execution." ] + } + } + }, + "PaymentPreferences" : { + "title" : "Payment Preferences", + "type" : "object", + "properties" : { + "setup_fee" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Money" + } ], + "x-ballerina-name-ignore" : "setupFee" + }, + "setup_fee_failure_action" : { + "maxLength" : 24, + "minLength" : 1, + "pattern" : "^[A-Z_]+$", + "type" : "string", + "description" : "The action to take on the subscription if the initial payment for the setup fails", + "default" : "CANCEL", + "enum" : [ "CONTINUE", "CANCEL" ], + "x-ballerina-name-ignore" : "setupFeeFailureAction" + }, + "auto_bill_outstanding" : { + "type" : "boolean", + "description" : "Indicates whether to automatically bill the outstanding amount in the next billing cycle", + "default" : true, + "x-ballerina-name-ignore" : "autoBillOutstanding" + }, + "payment_failure_threshold" : { + "maximum" : 999, + "minimum" : 0, + "type" : "integer", + "description" : "The maximum number of payment failures before a subscription is suspended. For example, if `payment_failure_threshold` is `2`, the subscription automatically updates to the `SUSPEND` state if two consecutive payments fail", + "default" : 0, + "x-ballerina-name-ignore" : "paymentFailureThreshold" + } + }, + "description" : "The payment preferences for a subscription" + }, + "TransactionsList" : { + "title" : "List Transactions", + "type" : "object", + "properties" : { + "links" : { + "maxItems" : 10, + "minItems" : 1, + "type" : "array", + "description" : "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links)", + "readOnly" : true, + "items" : { + "$ref" : "#/components/schemas/LinkDescription" + } + }, + "total_pages" : { + "maximum" : 100000000, + "minimum" : 0, + "type" : "integer", + "description" : "The total number of pages", + "x-ballerina-name-ignore" : "totalPages" + }, + "transactions" : { + "maxItems" : 32767, + "minItems" : 0, + "type" : "array", + "description" : "An array of transactions", + "items" : { + "$ref" : "#/components/schemas/Transaction" + } + }, + "total_items" : { + "maximum" : 500000000, + "minimum" : 0, + "type" : "integer", + "description" : "The total number of items", + "x-ballerina-name-ignore" : "totalItems" + } + }, + "description" : "The list transactions for a subscription request details" + }, + "MULTIPLEREGULARBILLINGCYCLESNOTSUPPORTED" : { + "title" : "MULTIPLE_REGULAR_BILLING_CYCLES_NOT_SUPPORTED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MULTIPLE_REGULAR_BILLING_CYCLES_NOT_SUPPORTED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Only one regular billing cycle is allowed." ] + } + } + }, + "PlansPatch422" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Planspatch422Details" + } + } + } + }, + "ApplicationContext" : { + "title" : "Application Context", + "required" : [ "cancel_url", "return_url" ], + "type" : "object", + "properties" : { + "user_action" : { + "maxLength" : 24, + "minLength" : 1, + "pattern" : "^[A-Z_]+$", + "type" : "string", + "description" : "Configures the label name to `Continue` or `Subscribe Now` for subscription consent experience", + "default" : "SUBSCRIBE_NOW", + "enum" : [ "CONTINUE", "SUBSCRIBE_NOW" ], + "x-ballerina-name-ignore" : "userAction" + }, + "return_url" : { + "maxLength" : 4000, + "minLength" : 10, + "type" : "string", + "description" : "The URL where the customer is redirected after the customer approves the payment", + "format" : "uri", + "x-ballerina-name-ignore" : "returnUrl" + }, + "brand_name" : { + "maxLength" : 127, + "minLength" : 1, + "type" : "string", + "description" : "The label that overrides the business name in the PayPal account on the PayPal site", + "x-ballerina-name-ignore" : "brandName" + }, + "locale" : { + "$ref" : "#/components/schemas/Language" + }, + "cancel_url" : { + "maxLength" : 4000, + "minLength" : 10, + "type" : "string", + "description" : "The URL where the customer is redirected after the customer cancels the payment", + "format" : "uri", + "x-ballerina-name-ignore" : "cancelUrl" + }, + "shipping_preference" : { + "maxLength" : 24, + "minLength" : 1, + "pattern" : "^[A-Z_]+$", + "type" : "string", + "description" : "The location from which the shipping address is derived", + "default" : "GET_FROM_FILE", + "enum" : [ "GET_FROM_FILE", "NO_SHIPPING", "SET_PROVIDED_ADDRESS" ], + "x-ballerina-name-ignore" : "shippingPreference" + }, + "payment_method" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PaymentMethod" + } ], + "x-ballerina-name-ignore" : "paymentMethod" + } + }, + "description" : "The application context, which customizes the payer experience during the subscription approval process with PayPal" + }, + "Subscriber" : { + "title" : "Subscriber Response Information", + "type" : "object", + "description" : "The subscriber response information", + "allOf" : [ { + "$ref" : "#/components/schemas/Payer" + }, { + "$ref" : "#/components/schemas/SubscriberAllOf2" + } ] + }, + "AMOUNTGREATERTHANOUTSTANDINGBALANCE1" : { + "title" : "AMOUNT_GREATER_THAN_OUTSTANDING_BALANCE", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "AMOUNT_GREATER_THAN_OUTSTANDING_BALANCE" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The capture amount can not be greater than the current outstanding balance." ] + } + } + }, + "PaymentSourceResponse" : { + "title" : "Payment Source Response", + "type" : "object", + "properties" : { + "card" : { + "$ref" : "#/components/schemas/CardResponseWithBillingAddress" + } + }, + "description" : "The payment source used to fund the payment" + }, + "PlanOverride" : { + "title" : "Plan Override", + "type" : "object", + "properties" : { + "payment_preferences" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PaymentPreferencesOverride" + } ], + "x-ballerina-name-ignore" : "paymentPreferences" + }, + "billing_cycles" : { + "maxItems" : 12, + "minItems" : 1, + "type" : "array", + "description" : "An array of billing cycles for trial billing and regular billing. The subscription billing cycle definition has to adhere to the plan billing cycle definition", + "items" : { + "$ref" : "#/components/schemas/BillingCycleOverride" + }, + "x-ballerina-name-ignore" : "billingCycles" + }, + "taxes" : { + "$ref" : "#/components/schemas/TaxesOverride" + } + }, + "description" : "An inline plan object to customise the subscription. You can override plan level default attributes by providing customised values for the subscription in this object" + }, + "INVALIDINTEGERMINVALUE" : { + "title" : "INVALID_INTEGER_MIN_VALUE", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_INTEGER_MIN_VALUE" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The integer value of a field is too small." ] + } + } + }, + "Subscriptionssuspend400Details" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/INVALIDSTRINGMAXLENGTH4" + } ] + }, + "SubscriptionReviseResponseAllOf2" : { + "properties" : { + "plan_overridden" : { + "type" : "boolean", + "description" : "Indicates whether the subscription has overridden any plan attributes.", + "readOnly" : true + }, + "links" : { + "type" : "array", + "description" : "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", + "readOnly" : true, + "items" : { + "$ref" : "#/components/schemas/LinkDescription" + } + } + } + }, + "MISSINGREQUESTBODY2" : { + "title" : "MISSING_REQUEST_BODY", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_REQUEST_BODY" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Request body is missing." ] + } + } + }, + "MISSINGREQUESTBODY1" : { + "title" : "MISSING_REQUEST_BODY", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_REQUEST_BODY" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Request body is missing." ] + } + } + }, + "MISSINGREQUIREDPARAMETER" : { + "title" : "MISSING_REQUIRED_PARAMETER", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_REQUIRED_PARAMETER" ] + }, + "description" : { + "type" : "string", + "enum" : [ "A required field is missing." ] + } + } + }, + "ThreeDSecureAuthenticationResponse" : { + "title" : "The 3D Secure Authentication Response", + "type" : "object", + "properties" : { + "authentication_status" : { + "allOf" : [ { + "$ref" : "#/components/schemas/ParesStatus" + } ], + "x-ballerina-name-ignore" : "authenticationStatus" + }, + "enrollment_status" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Enrolled" + } ], + "x-ballerina-name-ignore" : "enrollmentStatus" + } + }, + "description" : "Results of 3D Secure Authentication" + }, + "403Details" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/PERMISSIONDENIED" + } ] + }, + "401Details" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/INVALIDACCOUNTSTATUS" + } ] + }, + "INVALIDPRICINGTIERQUANTITY" : { + "title" : "INVALID_PRICING_TIER_QUANTITY", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PRICING_TIER_QUANTITY" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Tier starting quantity must be less than ending quantity." ] + } + } + }, + "PRICINGSCHEMEUPDATENOTALLOWED" : { + "title" : "PRICING_SCHEME_UPDATE_NOT_ALLOWED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "PRICING_SCHEME_UPDATE_NOT_ALLOWED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Pricing scheme update is not allowed for the plan." ] + } + } + }, + "CURRENCYMISMATCH2" : { + "title" : "CURRENCY_MISMATCH", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "CURRENCY_MISMATCH" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The currency code is different from the plan's currency code." ] + } + } + }, + "CURRENCYMISMATCH1" : { + "title" : "CURRENCY_MISMATCH", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "CURRENCY_MISMATCH" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The currency code is different from the plan's currency code." ] + } + } + }, + "PatchRequest" : { + "title" : "Patch Request", + "type" : "array", + "description" : "An array of JSON patch objects to apply partial updates to resources", + "items" : { + "$ref" : "#/components/schemas/Patch" + } + }, + "CURRENCYMISMATCH5" : { + "title" : "CURRENCY_MISMATCH", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "CURRENCY_MISMATCH" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The currency code is different from the subscription's currency code." ] + } + } + }, + "CURRENCYMISMATCH4" : { + "title" : "CURRENCY_MISMATCH", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "CURRENCY_MISMATCH" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The currency code is different from the plan's currency code." ] + } + } + }, + "CURRENCYMISMATCH3" : { + "title" : "CURRENCY_MISMATCH", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "CURRENCY_MISMATCH" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The currency code is different from the subscription's currency code." ] + } + } + }, + "MISSINGREQUESTBODY3" : { + "title" : "MISSING_REQUEST_BODY", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_REQUEST_BODY" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Request body is missing." ] + } + } + }, + "InlineResponse4041" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error404" + }, { + "$ref" : "#/components/schemas/SubscriptionsRevise404" + } ] + }, + "Subscriptionscancel422Details" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/USERACCOUNTCLOSED8" + }, { + "$ref" : "#/components/schemas/SUBSCRIPTIONSTATUSINVALID2" + } ] + }, + "CardResponse" : { + "title" : "Card Response", + "type" : "object", + "properties" : { + "authentication_result" : { + "allOf" : [ { + "$ref" : "#/components/schemas/AuthenticationResponse" + } ], + "x-ballerina-name-ignore" : "authenticationResult" + }, + "type" : { + "type" : "string", + "description" : "The payment card type", + "readOnly" : true, + "enum" : [ "CREDIT", "DEBIT", "PREPAID", "UNKNOWN" ] + }, + "last_digits" : { + "pattern" : "[0-9]{2,}", + "type" : "string", + "description" : "The last digits of the payment card", + "readOnly" : true, + "x-ballerina-name-ignore" : "lastDigits" + }, + "brand" : { + "$ref" : "#/components/schemas/CardBrand" + } + }, + "description" : "The payment card to use to fund a payment. Card can be a credit or debit card" + }, + "PlanRequestPOST" : { + "title" : "Create Plan Request", + "required" : [ "billing_cycles", "name", "payment_preferences", "product_id" ], + "type" : "object", + "properties" : { + "quantity_supported" : { + "type" : "boolean", + "description" : "Indicates whether you can subscribe to this plan by providing a quantity for the goods or service", + "default" : false, + "x-ballerina-name-ignore" : "quantitySupported" + }, + "payment_preferences" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PaymentPreferences" + } ], + "x-ballerina-name-ignore" : "paymentPreferences" + }, + "product_id" : { + "maxLength" : 50, + "minLength" : 6, + "type" : "string", + "description" : "The ID of the product created through Catalog Products API", + "x-ballerina-name-ignore" : "productId" + }, + "name" : { + "maxLength" : 127, + "minLength" : 1, + "type" : "string", + "description" : "The plan name" + }, + "billing_cycles" : { + "maxItems" : 12, + "minItems" : 1, + "type" : "array", + "description" : "An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle", + "items" : { + "$ref" : "#/components/schemas/BillingCycle" + }, + "x-ballerina-name-ignore" : "billingCycles" + }, + "description" : { + "maxLength" : 127, + "minLength" : 1, + "type" : "string", + "description" : "The detailed description of the plan" + }, + "taxes" : { + "$ref" : "#/components/schemas/Taxes" + }, + "status" : { + "maxLength" : 24, + "minLength" : 1, + "pattern" : "^[A-Z_]+$", + "type" : "string", + "description" : "The initial state of the plan. Allowed input values are CREATED and ACTIVE", + "default" : "ACTIVE", + "enum" : [ "CREATED", "INACTIVE", "ACTIVE" ] + } + }, + "description" : "The create plan request details" + }, + "INVALIDINTEGERMAXVALUE2" : { + "title" : "INVALID_INTEGER_MAX_VALUE", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_INTEGER_MAX_VALUE" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The integer value of a field is too large." ] + } + } + }, + "Patch" : { + "title" : "Patch", + "required" : [ "op" ], + "type" : "object", + "properties" : { + "op" : { + "type" : "string", + "description" : "The operation", + "enum" : [ "add", "remove", "replace", "move", "copy", "test" ] + }, + "path" : { + "type" : "string", + "description" : "The JSON Pointer to the target document location at which to complete the operation" + }, + "from" : { + "type" : "string", + "description" : "The JSON Pointer to the target document location from which to move the value. Required for the@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
move operation"
+ },
+ "value" : {
+ "title" : "Patch Value",
+ "description" : "The value to apply. The remove operation does not require a value"
+ }
+ },
+ "description" : "The JSON patch object to apply partial updates to resources"
+ },
+ "INVALIDINTEGERMAXVALUE3" : {
+ "title" : "INVALID_INTEGER_MAX_VALUE",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_INTEGER_MAX_VALUE" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "The integer value of a field is too large." ]
+ }
+ }
+ },
+ "INVALIDINTEGERMAXVALUE1" : {
+ "title" : "INVALID_INTEGER_MAX_VALUE",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_INTEGER_MAX_VALUE" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "The integer value of a field is too large." ]
+ }
+ }
+ },
+ "SUBSCRIPTIONCANNOTHAVEQUANTITY" : {
+ "title" : "SUBSCRIPTION_CANNOT_HAVE_QUANTITY",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "SUBSCRIPTION_CANNOT_HAVE_QUANTITY" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Subscription can't have quantity as the plan does not support quantity." ]
+ }
+ }
+ },
+ "Subscriptionscancel400Details" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/INVALIDSTRINGMAXLENGTH5"
+ } ]
+ },
+ "INVALIDPARAMETERVALUE10" : {
+ "title" : "INVALID_PARAMETER_VALUE",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_PARAMETER_VALUE" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "The value of a field is invalid." ]
+ }
+ }
+ },
+ "LinkDescription" : {
+ "title" : "Link Description",
+ "required" : [ "href", "rel" ],
+ "type" : "object",
+ "properties" : {
+ "method" : {
+ "type" : "string",
+ "description" : "The HTTP method required to make the related call",
+ "enum" : [ "GET", "POST", "PUT", "DELETE", "HEAD", "CONNECT", "OPTIONS", "PATCH" ]
+ },
+ "rel" : {
+ "type" : "string",
+ "description" : "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)"
+ },
+ "href" : {
+ "type" : "string",
+ "description" : "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call"
+ }
+ },
+ "description" : "The request-related [HATEOAS link](/docs/api/reference/api-responses/#hateoas-links) information"
+ },
+ "SubscriptionsCreate400" : {
+ "properties" : {
+ "details" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Subscriptionscreate400Details"
+ }
+ }
+ }
+ },
+ "ShippingDetail" : {
+ "title" : "Shipping Details",
+ "type" : "object",
+ "properties" : {
+ "address" : {
+ "$ref" : "#/components/schemas/AddressPortable"
+ },
+ "name" : {
+ "$ref" : "#/components/schemas/Name"
+ },
+ "type" : {
+ "maxLength" : 255,
+ "minLength" : 1,
+ "pattern" : "^[0-9A-Z_]+$",
+ "type" : "string",
+ "description" : "The method by which the payer wants to get their items from the payee e.g shipping, in-person pickup. Either type or options but not both may be present",
+ "enum" : [ "SHIPPING", "PICKUP_IN_PERSON" ]
+ }
+ },
+ "description" : "The shipping details"
+ },
+ "INVALIDMETADATAINVOICEID" : {
+ "title" : "INVALID_METADATA_INVOICE_ID",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_METADATA_INVOICE_ID" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Invoice id cannot exceed 127 characters." ]
+ }
+ }
+ },
+ "INVALIDINTEGERMAXVALUE" : {
+ "title" : "INVALID_INTEGER_MAX_VALUE",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "INVALID_INTEGER_MAX_VALUE" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "The integer value of a field is too large." ]
+ }
+ }
+ },
+ "PLANSTATUSINVALID2" : {
+ "title" : "PLAN_STATUS_INVALID",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "PLAN_STATUS_INVALID" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Invalid plan status for subscription creation; plan status should be active." ]
+ }
+ }
+ },
+ "Subscriptionscapture422Details" : {
+ "anyOf" : [ {
+ "$ref" : "#/components/schemas/USERACCOUNTCLOSED10"
+ }, {
+ "$ref" : "#/components/schemas/SUBSCRIBERACCOUNTLOCKED"
+ }, {
+ "$ref" : "#/components/schemas/SUBSCRIBERACCOUNTCLOSED"
+ }, {
+ "$ref" : "#/components/schemas/SUBSCRIBERACCOUNTRESTRICTED"
+ }, {
+ "$ref" : "#/components/schemas/SUBSCRIPTIONSTATUSINVALID4"
+ }, {
+ "$ref" : "#/components/schemas/ZEROOUTSTANDINGBALANCE"
+ }, {
+ "$ref" : "#/components/schemas/CURRENCYMISMATCH5"
+ }, {
+ "$ref" : "#/components/schemas/AMOUNTGREATERTHANOUTSTANDINGBALANCE1"
+ } ]
+ },
+ "PlansCreate400" : {
+ "properties" : {
+ "details" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Planscreate400Details"
+ }
+ }
+ }
+ },
+ "PLANSTATUSINVALID1" : {
+ "title" : "PLAN_STATUS_INVALID",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "PLAN_STATUS_INVALID" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Invalid plan status for deactivate action; plan status should be active." ]
+ }
+ }
+ },
+ "LiabilityShift" : {
+ "maxLength" : 255,
+ "minLength" : 1,
+ "pattern" : "^[0-9A-Z_]+$",
+ "type" : "string",
+ "description" : "Liability shift indicator. The outcome of the issuer's authentication",
+ "enum" : [ "YES", "NO", "POSSIBLE", "UNKNOWN" ]
+ },
+ "AmountWithBreakdown" : {
+ "title" : "Amount with Breakdown",
+ "required" : [ "gross_amount" ],
+ "type" : "object",
+ "properties" : {
+ "shipping_amount" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Money"
+ } ],
+ "x-ballerina-name-ignore" : "shippingAmount"
+ },
+ "tax_amount" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Money"
+ } ],
+ "x-ballerina-name-ignore" : "taxAmount"
+ },
+ "fee_amount" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Money"
+ } ],
+ "x-ballerina-name-ignore" : "feeAmount"
+ },
+ "total_item_amount" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Money"
+ } ],
+ "x-ballerina-name-ignore" : "totalItemAmount"
+ },
+ "gross_amount" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Money"
+ } ],
+ "x-ballerina-name-ignore" : "grossAmount"
+ },
+ "net_amount" : {
+ "allOf" : [ {
+ "$ref" : "#/components/schemas/Money"
+ } ],
+ "x-ballerina-name-ignore" : "netAmount"
+ }
+ },
+ "description" : "The breakdown details for the amount. Includes the gross, tax, fee, and shipping amounts"
+ },
+ "SUBSCRIBERACCOUNTLOCKED" : {
+ "title" : "SUBSCRIBER_ACCOUNT_LOCKED",
+ "properties" : {
+ "issue" : {
+ "type" : "string",
+ "enum" : [ "SUBSCRIBER_ACCOUNT_LOCKED" ]
+ },
+ "description" : {
+ "type" : "string",
+ "enum" : [ "Subscriber Account Locked." ]
+ }
+ }
+ },
+ "Money" : {
+ "title" : "Money",
+ "required" : [ "currency_code", "value" ],
+ "type" : "object",
+ "properties" : {
+ "value" : {
+ "maxLength" : 32,
+ "pattern" : "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$",
+ "type" : "string",
+ "description" : "The value, which might be:Note: The regular expression provides guidance but does not reject all invalid dates.", + "format" : "ppaas_date_time_v3" + }, + "Unauthorized" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/401Details" + } + } + } + }, + "BadRequest" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/400Details" + } + } + } + }, + "MISSINGPRICINGSCHEMETIERS4" : { + "title" : "MISSING_PRICING_SCHEME_TIERS", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_PRICING_SCHEME_TIERS" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Tier(s) are missing for some quantities." ] + } + } + }, + "TaxInfo" : { + "title" : "Tax Information", + "required" : [ "tax_id", "tax_id_type" ], + "type" : "object", + "properties" : { + "tax_id_type" : { + "type" : "string", + "description" : "The customer's tax ID type", + "enum" : [ "BR_CPF", "BR_CNPJ" ], + "x-ballerina-name-ignore" : "taxIdType" + }, + "tax_id" : { + "maxLength" : 14, + "type" : "string", + "description" : "The customer's tax ID value", + "x-ballerina-name-ignore" : "taxId" + } + }, + "description" : "The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required" + }, + "MISSINGPRICINGSCHEMETIERS1" : { + "title" : "MISSING_PRICING_SCHEME_TIERS", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_PRICING_SCHEME_TIERS" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Tier(s) are missing for some quantities." ] + } + } + }, + "MISSINGPRICINGSCHEMETIERS3" : { + "title" : "MISSING_PRICING_SCHEME_TIERS", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_PRICING_SCHEME_TIERS" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Tier(s) are missing for some quantities." ] + } + } + }, + "INVALIDPARAMETERSYNTAX5" : { + "title" : "INVALID_PARAMETER_SYNTAX", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PARAMETER_SYNTAX" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The value of a field does not conform to the expected format." ] + } + } + }, + "SubscriptionRequestPost" : { + "title" : "Create Subscription Request", + "required" : [ "plan_id" ], + "type" : "object", + "properties" : { + "shipping_amount" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Money" + } ], + "x-ballerina-name-ignore" : "shippingAmount" + }, + "start_time" : { + "allOf" : [ { + "$ref" : "#/components/schemas/DateTime" + } ], + "x-ballerina-name-ignore" : "startTime" + }, + "quantity" : { + "maxLength" : 32, + "minLength" : 1, + "pattern" : "^([0-9]+|([0-9]+)?[.][0-9]+)$", + "type" : "string", + "description" : "The quantity of the product in the subscription" + }, + "subscriber" : { + "$ref" : "#/components/schemas/SubscriberRequest" + }, + "custom_id" : { + "maxLength" : 127, + "minLength" : 1, + "pattern" : "^[\\x20-\\x7E]+", + "type" : "string", + "description" : "The custom id for the subscription. Can be invoice id", + "x-ballerina-name-ignore" : "customId" + }, + "application_context" : { + "allOf" : [ { + "$ref" : "#/components/schemas/ApplicationContext" + } ], + "x-ballerina-name-ignore" : "applicationContext" + }, + "plan" : { + "$ref" : "#/components/schemas/PlanOverride" + }, + "plan_id" : { + "maxLength" : 50, + "minLength" : 3, + "type" : "string", + "description" : "The ID of the plan", + "x-ballerina-name-ignore" : "planId" + }, + "auto_renewal" : { + "type" : "boolean", + "description" : "DEPRECATED. Indicates whether the subscription auto-renews after the billing cycles complete", + "deprecated" : true, + "default" : false, + "x-ballerina-name-ignore" : "autoRenewal" + } + }, + "description" : "The create subscription request details" + }, + "MISSINGPRICINGSCHEMETIERS2" : { + "title" : "MISSING_PRICING_SCHEME_TIERS", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_PRICING_SCHEME_TIERS" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Tier(s) are missing for some quantities." ] + } + } + }, + "Subscription" : { + "title" : "Subscription", + "type" : "object", + "description" : "The subscription details", + "allOf" : [ { + "$ref" : "#/components/schemas/SubscriptionStatus" + }, { + "$ref" : "#/components/schemas/SubscriptionAllOf2" + } ] + }, + "Error500" : { + "title" : "Internal Server Error", + "type" : "object", + "properties" : { + "debug_id" : { + "type" : "string", + "description" : "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore" : "debugId" + }, + "name" : { + "type" : "string", + "enum" : [ "INTERNAL_SERVER_ERROR" ] + }, + "links" : { + "maxItems" : 10000, + "minItems" : 0, + "type" : "array", + "description" : "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items" : { + "$ref" : "#/components/schemas/ErrorLinkDescription" + } + }, + "message" : { + "type" : "string", + "enum" : [ "An internal server error occurred." ] + } + }, + "description" : "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server", + "example" : { + "name" : "INTERNAL_SERVER_ERROR", + "message" : "An internal server error occurred.", + "debug_id" : "90957fca61718", + "links" : [ { + "href" : "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel" : "information_link" + } ] + } + }, + "Subscriptionsactivate400Details" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/INVALIDSTRINGMAXLENGTH6" + } ] + }, + "INVALIDINTEGERMINVALUE3" : { + "title" : "INVALID_INTEGER_MIN_VALUE", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_INTEGER_MIN_VALUE" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The integer value of a field is too small." ] + } + } + }, + "INVALIDINTEGERMINVALUE2" : { + "title" : "INVALID_INTEGER_MIN_VALUE", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_INTEGER_MIN_VALUE" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The integer value of a field is too small." ] + } + } + }, + "CURRENCYMISMATCH" : { + "title" : "CURRENCY_MISMATCH", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "CURRENCY_MISMATCH" ] + }, + "description" : { + "type" : "string", + "enum" : [ "All currency codes in the request should be of similar value." ] + } + } + }, + "INVALIDPARAMETERSYNTAX3" : { + "title" : "INVALID_PARAMETER_SYNTAX", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PARAMETER_SYNTAX" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The value of a field does not conform to the expected format." ] + } + } + }, + "INVALIDPARAMETERSYNTAX4" : { + "title" : "INVALID_PARAMETER_SYNTAX", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PARAMETER_SYNTAX" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The value of a field does not conform to the expected format." ] + } + } + }, + "INVALIDPARAMETERSYNTAX1" : { + "title" : "INVALID_PARAMETER_SYNTAX", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PARAMETER_SYNTAX" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The value of a field does not conform to the expected format." ] + } + } + }, + "INVALIDINTEGERMINVALUE1" : { + "title" : "INVALID_INTEGER_MIN_VALUE", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_INTEGER_MIN_VALUE" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The integer value of a field is too small." ] + } + } + }, + "INVALIDPARAMETERSYNTAX2" : { + "title" : "INVALID_PARAMETER_SYNTAX", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PARAMETER_SYNTAX" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The value of a field does not conform to the expected format." ] + } + } + }, + "INVALIDRESOURCEID" : { + "title" : "INVALID_RESOURCE_ID", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_RESOURCE_ID" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Specified resource ID does not exist. Please check the resource ID and try again." ] + } + } + }, + "FIXEDPRICENOTSUPPORTED4" : { + "title" : "FIXED_PRICE_NOT_SUPPORTED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "FIXED_PRICE_NOT_SUPPORTED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Fixed price is not supported for tiered pricing schemes." ] + } + } + }, + "PLANPRODUCTNOTCOMPATIBLE" : { + "title" : "PLAN_PRODUCT_NOT_COMPATIBLE", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "PLAN_PRODUCT_NOT_COMPATIBLE" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The old and the new plans should be for the same product." ] + } + } + }, + "FIXEDPRICENOTSUPPORTED2" : { + "title" : "FIXED_PRICE_NOT_SUPPORTED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "FIXED_PRICE_NOT_SUPPORTED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Fixed price is not supported for tiered pricing schemes." ] + } + } + }, + "FIXEDPRICENOTSUPPORTED3" : { + "title" : "FIXED_PRICE_NOT_SUPPORTED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "FIXED_PRICE_NOT_SUPPORTED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Fixed price is not supported for tiered pricing schemes." ] + } + } + }, + "EmailAddress" : { + "maxLength" : 254, + "minLength" : 3, + "pattern" : "^.+@[^\"\\-].+$", + "type" : "string", + "description" : "The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the", + "format" : "ppaas_common_email_address_v2" + }, + "FIXEDPRICENOTSUPPORTED1" : { + "title" : "FIXED_PRICE_NOT_SUPPORTED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "FIXED_PRICE_NOT_SUPPORTED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Fixed price is not supported for tiered pricing schemes." ] + } + } + }, + "Card" : { + "title" : "Card", + "required" : [ "expiry", "number" ], + "type" : "object", + "properties" : { + "number" : { + "maxLength" : 19, + "minLength" : 13, + "type" : "string", + "description" : "The primary account number (PAN) for the payment card" + }, + "security_code" : { + "pattern" : "[0-9]{3,4}", + "type" : "string", + "description" : "The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`", + "x-ballerina-name-ignore" : "securityCode" + }, + "name" : { + "maxLength" : 300, + "type" : "string", + "description" : "The card holder's name as it appears on the card" + }, + "billing_address" : { + "allOf" : [ { + "$ref" : "#/components/schemas/AddressPortable" + } ], + "x-ballerina-name-ignore" : "billingAddress" + }, + "id" : { + "type" : "string", + "description" : "The PayPal-generated ID for the card", + "readOnly" : true + }, + "expiry" : { + "$ref" : "#/components/schemas/DateYearMonth" + }, + "card_type" : { + "allOf" : [ { + "$ref" : "#/components/schemas/CardBrand" + } ], + "x-ballerina-name-ignore" : "cardType" + }, + "last_digits" : { + "pattern" : "[0-9]{2,}", + "type" : "string", + "description" : "The last digits of the payment card", + "readOnly" : true, + "x-ballerina-name-ignore" : "lastDigits" + } + }, + "description" : "The payment card to use to fund a payment. Can be a credit or debit card" + }, + "InlineResponse4001" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error400" + }, { + "$ref" : "#/components/schemas/PlansCreate400" + } ] + }, + "InlineResponse4003" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error400" + }, { + "$ref" : "#/components/schemas/PlansUpdatePricingSchemes400" + } ] + }, + "InlineResponse4002" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error400" + }, { + "$ref" : "#/components/schemas/PlansPatch400" + } ] + }, + "InlineResponse4005" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error400" + }, { + "$ref" : "#/components/schemas/SubscriptionsPatch400" + } ] + }, + "InlineResponse4004" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error400" + }, { + "$ref" : "#/components/schemas/SubscriptionsCreate400" + } ] + }, + "InlineResponse4007" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error400" + }, { + "$ref" : "#/components/schemas/SubscriptionsSuspend400" + } ] + }, + "SubscriptionsPatch400" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Subscriptionspatch400Details" + } + } + } + }, + "InlineResponse4006" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error400" + }, { + "$ref" : "#/components/schemas/SubscriptionsRevise400" + } ] + }, + "InlineResponse4009" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error400" + }, { + "$ref" : "#/components/schemas/SubscriptionsActivate400" + } ] + }, + "InlineResponse4008" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error400" + }, { + "$ref" : "#/components/schemas/SubscriptionsCancel400" + } ] + }, + "Error404" : { + "title" : "Not found Error", + "type" : "object", + "properties" : { + "debug_id" : { + "type" : "string", + "description" : "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore" : "debugId" + }, + "name" : { + "type" : "string", + "enum" : [ "RESOURCE_NOT_FOUND" ] + }, + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ErrorDetails" + } + }, + "links" : { + "maxItems" : 10000, + "minItems" : 0, + "type" : "array", + "description" : "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items" : { + "$ref" : "#/components/schemas/ErrorLinkDescription" + } + }, + "message" : { + "type" : "string", + "enum" : [ "The specified resource does not exist." ] + } + }, + "description" : "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available" + }, + "MISSINGREQUIREDPARAMETER5" : { + "title" : "MISSING_REQUIRED_PARAMETER", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_REQUIRED_PARAMETER" ] + }, + "description" : { + "type" : "string", + "enum" : [ "A required field is missing." ] + } + } + }, + "Error409" : { + "title" : "Resource Conflict Error", + "type" : "object", + "properties" : { + "debug_id" : { + "type" : "string", + "description" : "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore" : "debugId" + }, + "name" : { + "type" : "string", + "enum" : [ "RESOURCE_CONFLICT" ] + }, + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ErrorDetails" + } + }, + "links" : { + "maxItems" : 10000, + "minItems" : 0, + "type" : "array", + "description" : "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items" : { + "$ref" : "#/components/schemas/ErrorLinkDescription" + } + }, + "message" : { + "type" : "string", + "enum" : [ "The server has detected a conflict while processing this request." ] + } + }, + "description" : "The server has detected a conflict while processing this request" + }, + "AMOUNTGREATERTHANOUTSTANDINGBALANCE" : { + "title" : "AMOUNT_GREATER_THAN_OUTSTANDING_BALANCE", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "AMOUNT_GREATER_THAN_OUTSTANDING_BALANCE" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The new outstanding balance cannot be greater than the current outstanding balance." ] + } + } + }, + "MISSINGREQUIREDPARAMETER4" : { + "title" : "MISSING_REQUIRED_PARAMETER", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_REQUIRED_PARAMETER" ] + }, + "description" : { + "type" : "string", + "enum" : [ "A required field is missing." ] + } + } + }, + "Subscriptionsrevise422Details" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/USERACCOUNTCLOSED6" + }, { + "$ref" : "#/components/schemas/PLANPRODUCTNOTCOMPATIBLE" + }, { + "$ref" : "#/components/schemas/INVALIDBILLINGCYCLESEQUENCE4" + }, { + "$ref" : "#/components/schemas/INVALIDPRICINGSCHEME2" + }, { + "$ref" : "#/components/schemas/INVALIDPRICINGTIERAMOUNT4" + }, { + "$ref" : "#/components/schemas/MISSINGPRICINGSCHEMETIERS4" + }, { + "$ref" : "#/components/schemas/OVERLAPPINGPRICINGSCHEMETIERS4" + }, { + "$ref" : "#/components/schemas/INVALIDPRICINGMODEL4" + }, { + "$ref" : "#/components/schemas/FIXEDPRICENOTSUPPORTED4" + }, { + "$ref" : "#/components/schemas/INVALIDPRICINGTIERQUANTITY4" + }, { + "$ref" : "#/components/schemas/CURRENCYMISMATCH4" + } ] + }, + "SubscriptionsCancel400" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Subscriptionscancel400Details" + } + } + } + }, + "MISSINGREQUIREDPARAMETER6" : { + "title" : "MISSING_REQUIRED_PARAMETER", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_REQUIRED_PARAMETER" ] + }, + "description" : { + "type" : "string", + "enum" : [ "A required field is missing." ] + } + } + }, + "INVALIDMETADATACUSTOMNOTE" : { + "title" : "INVALID_METADATA_CUSTOM_NOTE", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_METADATA_CUSTOM_NOTE" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Merchant custom note cannot exceed 255 characters." ] + } + } + }, + "MISSINGREQUIREDPARAMETER1" : { + "title" : "MISSING_REQUIRED_PARAMETER", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_REQUIRED_PARAMETER" ] + }, + "description" : { + "type" : "string", + "enum" : [ "A required field is missing." ] + } + } + }, + "MISSINGREQUIREDPARAMETER3" : { + "title" : "MISSING_REQUIRED_PARAMETER", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_REQUIRED_PARAMETER" ] + }, + "description" : { + "type" : "string", + "enum" : [ "A required field is missing." ] + } + } + }, + "MISSINGREQUIREDPARAMETER2" : { + "title" : "MISSING_REQUIRED_PARAMETER", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_REQUIRED_PARAMETER" ] + }, + "description" : { + "type" : "string", + "enum" : [ "A required field is missing." ] + } + } + }, + "Error400" : { + "title" : "Bad Request Error", + "type" : "object", + "properties" : { + "debug_id" : { + "type" : "string", + "description" : "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore" : "debugId" + }, + "name" : { + "type" : "string", + "enum" : [ "INVALID_REQUEST" ] + }, + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ErrorDetails" + } + }, + "links" : { + "maxItems" : 10000, + "minItems" : 0, + "type" : "array", + "description" : "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items" : { + "$ref" : "#/components/schemas/ErrorLinkDescription" + } + }, + "message" : { + "type" : "string", + "enum" : [ "Request is not well-formed, syntactically incorrect, or violates schema." ] + } + }, + "description" : "Request is not well-formed, syntactically incorrect, or violates schema" + }, + "Error401" : { + "title" : "Unauthorized Error", + "type" : "object", + "properties" : { + "debug_id" : { + "type" : "string", + "description" : "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore" : "debugId" + }, + "name" : { + "type" : "string", + "enum" : [ "AUTHENTICATION_FAILURE" ] + }, + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ErrorDetails" + } + }, + "links" : { + "maxItems" : 10000, + "minItems" : 0, + "type" : "array", + "description" : "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items" : { + "$ref" : "#/components/schemas/ErrorLinkDescription" + } + }, + "message" : { + "type" : "string", + "enum" : [ "Authentication failed due to missing authorization header, or invalid authentication credentials." ] + } + }, + "description" : "Authentication failed due to missing Authorization header, or invalid authentication credentials" + }, + "Error403" : { + "title" : "Not Authorized Error", + "type" : "object", + "properties" : { + "debug_id" : { + "type" : "string", + "description" : "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore" : "debugId" + }, + "name" : { + "type" : "string", + "enum" : [ "NOT_AUTHORIZED" ] + }, + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ErrorDetails" + } + }, + "links" : { + "maxItems" : 10000, + "minItems" : 0, + "type" : "array", + "description" : "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items" : { + "$ref" : "#/components/schemas/ErrorLinkDescription" + } + }, + "message" : { + "type" : "string", + "enum" : [ "Authorization failed due to insufficient permissions." ] + } + }, + "description" : "The client is not authorized to access this resource, although it may have valid credentials. " + }, + "Error415" : { + "title" : "Unsupported Media Type Error", + "type" : "object", + "properties" : { + "debug_id" : { + "type" : "string", + "description" : "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore" : "debugId" + }, + "name" : { + "type" : "string", + "enum" : [ "UNSUPPORTED_MEDIA_TYPE" ] + }, + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ErrorDetails" + } + }, + "links" : { + "maxItems" : 10000, + "minItems" : 0, + "type" : "array", + "description" : "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items" : { + "$ref" : "#/components/schemas/ErrorLinkDescription" + } + }, + "message" : { + "type" : "string", + "enum" : [ "The server does not support the request payload's media type." ] + } + }, + "description" : "The server does not support the request payload's media type" + }, + "PLANSTATUSINACTIVE" : { + "title" : "PLAN_STATUS_INACTIVE", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "PLAN_STATUS_INACTIVE" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Status update is the only patchable filed on an inactive plan." ] + } + } + }, + "Percentage" : { + "pattern" : "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$", + "type" : "string", + "description" : "The percentage, as a fixed-point, signed decimal number. For example, define a 19.99% interest rate as `19.99`", + "format" : "ppaas_common_percentage_v2" + }, + "Planspatch400Details" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/UNSUPPORTEDPATCHOPERATION" + }, { + "$ref" : "#/components/schemas/INVALIDPATCHPATH" + }, { + "$ref" : "#/components/schemas/INVALIDPATCHPATH1" + }, { + "$ref" : "#/components/schemas/INVALIDPARAMETERSYNTAX1" + }, { + "$ref" : "#/components/schemas/INVALIDPARAMETERVALUE2" + }, { + "$ref" : "#/components/schemas/INVALIDPARAMETERVALUE3" + } ] + }, + "Plan" : { + "title" : "Plan", + "type" : "object", + "properties" : { + "quantity_supported" : { + "type" : "boolean", + "description" : "Indicates whether you can subscribe to this plan by providing a quantity for the goods or service", + "default" : false, + "x-ballerina-name-ignore" : "quantitySupported" + }, + "update_time" : { + "allOf" : [ { + "$ref" : "#/components/schemas/DateTime" + } ], + "x-ballerina-name-ignore" : "updateTime" + }, + "create_time" : { + "allOf" : [ { + "$ref" : "#/components/schemas/DateTime" + } ], + "x-ballerina-name-ignore" : "createTime" + }, + "payment_preferences" : { + "allOf" : [ { + "$ref" : "#/components/schemas/PaymentPreferences" + } ], + "x-ballerina-name-ignore" : "paymentPreferences" + }, + "product_id" : { + "maxLength" : 50, + "minLength" : 6, + "type" : "string", + "description" : "The ID for the product", + "x-ballerina-name-ignore" : "productId" + }, + "name" : { + "maxLength" : 127, + "minLength" : 1, + "type" : "string", + "description" : "The plan name" + }, + "billing_cycles" : { + "maxItems" : 12, + "minItems" : 1, + "type" : "array", + "description" : "An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle", + "items" : { + "$ref" : "#/components/schemas/BillingCycle" + }, + "x-ballerina-name-ignore" : "billingCycles" + }, + "description" : { + "maxLength" : 127, + "minLength" : 1, + "type" : "string", + "description" : "The detailed description of the plan" + }, + "taxes" : { + "$ref" : "#/components/schemas/Taxes" + }, + "links" : { + "maxItems" : 10, + "minItems" : 1, + "type" : "array", + "description" : "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links)", + "readOnly" : true, + "items" : { + "$ref" : "#/components/schemas/LinkDescription" + } + }, + "id" : { + "maxLength" : 50, + "minLength" : 3, + "type" : "string", + "description" : "The unique PayPal-generated ID for the plan", + "readOnly" : true + }, + "status" : { + "maxLength" : 24, + "minLength" : 1, + "pattern" : "^[A-Z_]+$", + "type" : "string", + "description" : "The plan status", + "enum" : [ "CREATED", "INACTIVE", "ACTIVE" ] + } + }, + "description" : "The plan details" + }, + "AuthenticationResponse" : { + "title" : "Authentication Response", + "type" : "object", + "properties" : { + "liability_shift" : { + "allOf" : [ { + "$ref" : "#/components/schemas/LiabilityShift" + } ], + "x-ballerina-name-ignore" : "liabilityShift" + }, + "three_d_secure" : { + "allOf" : [ { + "$ref" : "#/components/schemas/ThreeDSecureAuthenticationResponse" + } ], + "x-ballerina-name-ignore" : "threeDSecure" + } + }, + "description" : "Results of Authentication such as 3D Secure" + }, + "USERACCOUNTCLOSED7" : { + "title" : "USER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "USER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "User account locked or closed." ] + } + } + }, + "USERACCOUNTCLOSED6" : { + "title" : "USER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "USER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "User account locked or closed." ] + } + } + }, + "SUBSCRIPTIONSTATUSINVALID4" : { + "title" : "SUBSCRIPTION_STATUS_INVALID", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "SUBSCRIPTION_STATUS_INVALID" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Invalid subscription status for capture action; subscription status should be active or suspended or expired." ] + } + } + }, + "USERACCOUNTCLOSED9" : { + "title" : "USER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "USER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "User account locked or closed." ] + } + } + }, + "USERACCOUNTCLOSED8" : { + "title" : "USER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "USER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "User account locked or closed." ] + } + } + }, + "SUBSCRIPTIONSTATUSINVALID1" : { + "title" : "SUBSCRIPTION_STATUS_INVALID", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "SUBSCRIPTION_STATUS_INVALID" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Invalid subscription status for suspend action; subscription status should be active." ] + } + } + }, + "SUBSCRIPTIONSTATUSINVALID3" : { + "title" : "SUBSCRIPTION_STATUS_INVALID", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "SUBSCRIPTION_STATUS_INVALID" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Invalid subscription status for activate action; subscription status should be suspended." ] + } + } + }, + "SUBSCRIPTIONSTATUSINVALID2" : { + "title" : "SUBSCRIPTION_STATUS_INVALID", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "SUBSCRIPTION_STATUS_INVALID" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Invalid subscription status for cancel action; subscription status should be active or suspended." ] + } + } + }, + "USERACCOUNTCLOSED1" : { + "title" : "USER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "USER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "User account locked or closed." ] + } + } + }, + "ZEROOUTSTANDINGBALANCE" : { + "title" : "ZERO_OUTSTANDING_BALANCE", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "ZERO_OUTSTANDING_BALANCE" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Current outstanding balance should be greater than zero." ] + } + } + }, + "USERACCOUNTCLOSED3" : { + "title" : "USER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "USER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "User account locked or closed." ] + } + } + }, + "USERACCOUNTCLOSED2" : { + "title" : "USER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "USER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "User account locked or closed." ] + } + } + }, + "3DSCARDSNOTSUPPORTED1" : { + "title" : "3DS_CARDS_NOT_SUPPORTED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "3DS_CARDS_NOT_SUPPORTED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Cards that require 3DS authentication not supported." ] + } + } + }, + "USERACCOUNTCLOSED" : { + "title" : "USER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "USER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "User account locked or closed." ] + } + } + }, + "USERACCOUNTCLOSED5" : { + "title" : "USER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "USER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "User account locked or closed." ] + } + } + }, + "USERACCOUNTCLOSED4" : { + "title" : "USER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "USER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "User account locked or closed." ] + } + } + }, + "SubscriptionReviseResponse" : { + "title" : "Update Product Quantity in Subscription Response", + "type" : "object", + "description" : "The response to a request to update the quantity of the product or service in a subscription. You can also use this method to switch the plan and update the `shipping_amount` and `shipping_address` values for the subscription. This type of update requires the buyer's consent", + "allOf" : [ { + "$ref" : "#/components/schemas/SubscriptionReviseRequest" + }, { + "$ref" : "#/components/schemas/SubscriptionReviseResponseAllOf2" + } ] + }, + "SubscriptionsCancel422" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Subscriptionscancel422Details" + } + } + } + }, + "InlineResponse422" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error422" + }, { + "$ref" : "#/components/schemas/UnprocessableEntity" + } ] + }, + "INVALIDPATCHPATH1" : { + "title" : "INVALID_PATCH_PATH", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PATCH_PATH" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Multiple operations on the same field are not allowed." ] + } + } + }, + "INVALIDPATCHPATH2" : { + "title" : "INVALID_PATCH_PATH", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PATCH_PATH" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The specified field cannot be patched." ] + } + } + }, + "INVALIDPATCHPATH3" : { + "title" : "INVALID_PATCH_PATH", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PATCH_PATH" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Multiple operations on the same field are not allowed." ] + } + } + }, + "SubscriptionsCapture400" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Subscriptionscapture400Details" + } + } + } + }, + "TransactionAllOf2" : { + "properties" : { + "id" : { + "maxLength" : 50, + "minLength" : 3, + "type" : "string", + "description" : "The PayPal-generated transaction ID.", + "readOnly" : true + }, + "amount_with_breakdown" : { + "$ref" : "#/components/schemas/AmountWithBreakdown" + }, + "payer_name" : { + "$ref" : "#/components/schemas/Name" + }, + "payer_email" : { + "$ref" : "#/components/schemas/EmailAddress" + }, + "time" : { + "$ref" : "#/components/schemas/DateTime" + } + } + }, + "OVERLAPPINGPRICINGSCHEMETIERS" : { + "title" : "OVERLAPPING_PRICING_SCHEME_TIERS", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "OVERLAPPING_PRICING_SCHEME_TIERS" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The specified quantity overlaps with multiple pricing tiers." ] + } + } + }, + "3DSCARDSNOTSUPPORTED" : { + "title" : "3DS_CARDS_NOT_SUPPORTED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "3DS_CARDS_NOT_SUPPORTED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Cards that require 3DS authentication not supported." ] + } + } + }, + "CaptureStatusDetails" : { + "title" : "Capture Status Details", + "type" : "object", + "properties" : { + "reason" : { + "type" : "string", + "description" : "The reason why the captured payment status is `PENDING` or `DENIED`", + "enum" : [ "BUYER_COMPLAINT", "CHARGEBACK", "ECHECK", "INTERNATIONAL_WITHDRAWAL", "OTHER", "PENDING_REVIEW", "RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION", "REFUNDED", "TRANSACTION_APPROVED_AWAITING_FUNDING", "UNILATERAL", "VERIFICATION_REQUIRED" ] + } + }, + "description" : "The details of the captured payment status" + }, + "ErrorDefault" : { + "description" : "The default error response", + "oneOf" : [ { + "$ref" : "#/components/schemas/Error400" + }, { + "$ref" : "#/components/schemas/Error401" + }, { + "$ref" : "#/components/schemas/Error403" + }, { + "$ref" : "#/components/schemas/Error404" + }, { + "$ref" : "#/components/schemas/Error409" + }, { + "$ref" : "#/components/schemas/Error415" + }, { + "$ref" : "#/components/schemas/Error422" + }, { + "$ref" : "#/components/schemas/Error500" + }, { + "$ref" : "#/components/schemas/Error503" + } ] + }, + "MISSINGPRICINGSCHEMETIERS" : { + "title" : "MISSING_PRICING_SCHEME_TIERS", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_PRICING_SCHEME_TIERS" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Tier(s) are missing for some quantities." ] + } + } + }, + "DateYearMonth" : { + "maxLength" : 7, + "minLength" : 7, + "pattern" : "^[0-9]{4}-(0[1-9]|1[0-2])$", + "type" : "string", + "description" : "The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)" + }, + "Error422" : { + "title" : "Unprocessable Entity Error", + "type" : "object", + "properties" : { + "debug_id" : { + "type" : "string", + "description" : "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore" : "debugId" + }, + "name" : { + "type" : "string", + "enum" : [ "UNPROCESSABLE_ENTITY" ] + }, + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ErrorDetails" + } + }, + "links" : { + "maxItems" : 10000, + "minItems" : 0, + "type" : "array", + "description" : "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items" : { + "$ref" : "#/components/schemas/ErrorLinkDescription" + } + }, + "message" : { + "type" : "string", + "enum" : [ "The requested action could not be performed, semantically incorrect, or failed business validation." ] + } + }, + "description" : "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request" + }, + "MISSINGREQUESTBODY" : { + "title" : "MISSING_REQUEST_BODY", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MISSING_REQUEST_BODY" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Request body is missing." ] + } + } + }, + "Subscriptionspatch422Details" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/USERACCOUNTCLOSED5" + }, { + "$ref" : "#/components/schemas/SUBSCRIPTIONSTATUSINVALID" + }, { + "$ref" : "#/components/schemas/CARDSUBSCRIPTIONSNOTENABLED1" + }, { + "$ref" : "#/components/schemas/3DSCARDSNOTSUPPORTED1" + }, { + "$ref" : "#/components/schemas/BILLINGCYCLEEXECUTIONCOMPLETED" + }, { + "$ref" : "#/components/schemas/AMOUNTGREATERTHANOUTSTANDINGBALANCE" + }, { + "$ref" : "#/components/schemas/INVALIDBILLINGTOTALCYCLES" + }, { + "$ref" : "#/components/schemas/INVALIDPRICINGTIERAMOUNT3" + }, { + "$ref" : "#/components/schemas/MISSINGPRICINGSCHEMETIERS3" + }, { + "$ref" : "#/components/schemas/OVERLAPPINGPRICINGSCHEMETIERS3" + }, { + "$ref" : "#/components/schemas/INVALIDPRICINGMODEL3" + }, { + "$ref" : "#/components/schemas/FIXEDPRICENOTSUPPORTED3" + }, { + "$ref" : "#/components/schemas/INVALIDPRICINGTIERQUANTITY3" + }, { + "$ref" : "#/components/schemas/INVALIDSTARTTIME" + }, { + "$ref" : "#/components/schemas/CURRENCYMISMATCH3" + } ] + }, + "Payer" : { + "title" : "Customer", + "type" : "object", + "description" : "The customer who approves and pays for the order. The customer is also known as the payer", + "format" : "payer_v1", + "allOf" : [ { + "$ref" : "#/components/schemas/PayerBase" + }, { + "$ref" : "#/components/schemas/PayerAllOf2" + } ] + }, + "PlansActivate422" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Plansactivate422Details" + } + } + } + }, + "USERACCOUNTCLOSED10" : { + "title" : "USER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "USER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "User account locked or closed." ] + } + } + }, + "INVALIDSTRINGMAXLENGTH1" : { + "title" : "INVALID_STRING_MAX_LENGTH", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_STRING_MAX_LENGTH" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The value of a field is too long." ] + } + } + }, + "PlansDeactivate422" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Plansdeactivate422Details" + } + } + } + }, + "Subscriptionscreate400Details" : { + "anyOf" : [ { + "$ref" : "#/components/schemas/INVALIDPARAMETERSYNTAX2" + }, { + "$ref" : "#/components/schemas/INVALIDSTRINGMAXLENGTH1" + }, { + "$ref" : "#/components/schemas/INVALIDPARAMETERVALUE5" + }, { + "$ref" : "#/components/schemas/INVALIDINTEGERMINVALUE1" + }, { + "$ref" : "#/components/schemas/INVALIDINTEGERMAXVALUE1" + }, { + "$ref" : "#/components/schemas/INVALIDPARAMETERVALUE6" + }, { + "$ref" : "#/components/schemas/MISSINGREQUESTBODY" + }, { + "$ref" : "#/components/schemas/MISSINGREQUIREDPARAMETER2" + }, { + "$ref" : "#/components/schemas/INVALIDSTRINGMAXLENGTH2" + } ] + }, + "PlansUpdatePricingSchemes400" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PlansupdatePricingSchemes400Details" + } + } + } + }, + "SUBSCRIPTIONCANNOTBEACTIVATED" : { + "title" : "SUBSCRIPTION_CANNOT_BE_ACTIVATED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "SUBSCRIPTION_CANNOT_BE_ACTIVATED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Subscription cannot be activated after payment failure threshold has reached." ] + } + } + }, + "SubscriptionSuspendRequest" : { + "title" : "Suspend Subscription", + "required" : [ "reason" ], + "type" : "object", + "properties" : { + "reason" : { + "maxLength" : 128, + "minLength" : 1, + "type" : "string", + "description" : "The reason for suspenson of the subscription" + } + }, + "description" : "The suspend subscription request details" + }, + "AddressPortable" : { + "title" : "Portable Postal Address (Medium-Grained)", + "required" : [ "country_code" ], + "type" : "object", + "properties" : { + "country_code" : { + "allOf" : [ { + "$ref" : "#/components/schemas/CountryCode" + } ], + "x-ballerina-name-ignore" : "countryCode" + }, + "admin_area_1" : { + "maxLength" : 300, + "type" : "string", + "description" : "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. Format for postal delivery. For example, `CA` and not `California`. Value, by country, is:@sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@sign exists.
Note: The country code for Great Britain is", + "format" : "ppaas_common_country_code_v2" + }, + "UNSUPPORTEDPATCHOPERATION" : { + "title" : "UNSUPPORTED_PATCH_OPERATION", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "UNSUPPORTED_PATCH_OPERATION" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The specified patch operation not supported for this field." ] + } + } + }, + "INVALIDPRICINGMODEL2" : { + "title" : "INVALID_PRICING_MODEL", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PRICING_MODEL" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The specified pricing model is not supported for trial billing cycle." ] + } + } + }, + "INVALIDPRICINGMODEL3" : { + "title" : "INVALID_PRICING_MODEL", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PRICING_MODEL" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The specified pricing model is not supported for trial billing cycle." ] + } + } + }, + "INVALIDPRICINGMODEL4" : { + "title" : "INVALID_PRICING_MODEL", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PRICING_MODEL" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The specified pricing model is not supported for trial billing cycle." ] + } + } + }, + "MORETHANTWOTRIALBILLINGCYCLENOTSUPPORTED" : { + "title" : "MORE_THAN_TWO_TRIAL_BILLING_CYCLE_NOT_SUPPORTED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "MORE_THAN_TWO_TRIAL_BILLING_CYCLE_NOT_SUPPORTED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Only two trial billing cycles are allowed." ] + } + } + }, + "INVALIDPRICINGMODEL1" : { + "title" : "INVALID_PRICING_MODEL", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_PRICING_MODEL" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The specified pricing model is not supported for trial billing cycle." ] + } + } + }, + "SubscriptionCaptureRequest" : { + "title" : "Charge Amount from Subscriber", + "required" : [ "amount", "capture_type", "note" ], + "type" : "object", + "properties" : { + "note" : { + "maxLength" : 128, + "minLength" : 1, + "type" : "string", + "description" : "The reason or note for the subscription charge" + }, + "amount" : { + "$ref" : "#/components/schemas/Money" + }, + "capture_type" : { + "maxLength" : 24, + "minLength" : 1, + "pattern" : "^[A-Z_]+$", + "type" : "string", + "description" : "The type of capture", + "enum" : [ "OUTSTANDING_BALANCE" ], + "x-ballerina-name-ignore" : "captureType" + } + }, + "description" : "The charge amount from the subscriber" + }, + "CardResponseWithBillingAddressAllOf2" : { + "properties" : { + "name" : { + "maxLength" : 300, + "minLength" : 2, + "type" : "string", + "description" : "The card holder's name as it appears on the card." + }, + "billing_address" : { + "$ref" : "#/components/schemas/AddressPortable" + }, + "expiry" : { + "$ref" : "#/components/schemas/DateYearMonth" + }, + "currency_code" : { + "$ref" : "#/components/schemas/CurrencyCode" + } + } + }, + "SUBSCRIBERACCOUNTCLOSED" : { + "title" : "SUBSCRIBER_ACCOUNT_CLOSED", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "SUBSCRIBER_ACCOUNT_CLOSED" ] + }, + "description" : { + "type" : "string", + "enum" : [ "Subscriber Account Closed." ] + } + } + }, + "SubscriptionsActivate422" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Subscriptionsactivate422Details" + } + } + } + }, + "INVALIDSTARTTIME" : { + "title" : "INVALID_START_TIME", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_START_TIME" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The start time cannot be updated for a subscription that has been activated." ] + } + } + }, + "SubscriptionStatus" : { + "title" : "Subscription Status", + "type" : "object", + "properties" : { + "status_change_note" : { + "maxLength" : 128, + "minLength" : 1, + "type" : "string", + "description" : "The reason or notes for the status of the subscription", + "x-ballerina-name-ignore" : "statusChangeNote" + }, + "status" : { + "maxLength" : 24, + "minLength" : 1, + "pattern" : "^[A-Z_]+$", + "type" : "string", + "description" : "The status of the subscription", + "enum" : [ "APPROVAL_PENDING", "APPROVED", "ACTIVE", "SUSPENDED", "CANCELLED", "EXPIRED" ] + }, + "status_update_time" : { + "allOf" : [ { + "$ref" : "#/components/schemas/DateTime" + } ], + "x-ballerina-name-ignore" : "statusUpdateTime" + } + }, + "description" : "The subscription status details" + }, + "InlineResponse4221" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error422" + }, { + "$ref" : "#/components/schemas/PlansPatch422" + } ] + }, + "INVALIDSTRINGMINLENGTH" : { + "title" : "INVALID_STRING_MIN_LENGTH", + "properties" : { + "issue" : { + "type" : "string", + "enum" : [ "INVALID_STRING_MIN_LENGTH" ] + }, + "description" : { + "type" : "string", + "enum" : [ "The value of a field is too short." ] + } + } + }, + "InlineResponse4224" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error422" + }, { + "$ref" : "#/components/schemas/PlansUpdatePricingSchemes422" + } ] + }, + "InlineResponse4225" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error422" + }, { + "$ref" : "#/components/schemas/SubscriptionsCreate422" + } ] + }, + "InlineResponse4222" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error422" + }, { + "$ref" : "#/components/schemas/PlansActivate422" + } ] + }, + "InlineResponse4223" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error422" + }, { + "$ref" : "#/components/schemas/PlansDeactivate422" + } ] + }, + "InlineResponse4228" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error422" + }, { + "$ref" : "#/components/schemas/SubscriptionsSuspend422" + } ] + }, + "SubscriptionsRevise422" : { + "properties" : { + "details" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Subscriptionsrevise422Details" + } + } + } + }, + "InlineResponse4229" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error422" + }, { + "$ref" : "#/components/schemas/SubscriptionsCancel422" + } ] + }, + "InlineResponse4226" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error422" + }, { + "$ref" : "#/components/schemas/SubscriptionsPatch422" + } ] + }, + "InlineResponse4227" : { + "allOf" : [ { + "$ref" : "#/components/schemas/Error422" + }, { + "$ref" : "#/components/schemas/SubscriptionsRevise422" + } ] + } + }, + "responses" : { + "default" : { + "description" : "The default response.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorDefault" + } + } + } + } + }, + "parameters" : { + "prefer" : { + "name" : "Prefer", + "in" : "header", + "description" : "The preferred server response upon successful completion of the request. Value is:GBand notUKas used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.return=representation. The server returns a complete resource representation, including the current state of the resource.