├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.md │ └── question-or-other.md └── workflows │ ├── ci.yml │ └── release.yml ├── .gitignore ├── CREDITS ├── LICENSE-2.0.txt ├── README.md ├── pom.xml ├── scripts ├── build ├── check-deps ├── install-deps └── test └── src ├── main └── java │ └── com │ └── ning │ └── billing │ └── recurly │ ├── ConnectionErrorException.java │ ├── PaginationUtils.java │ ├── QueryParams.java │ ├── RecurlyAPIException.java │ ├── RecurlyClient.java │ ├── RecurlyJs.java │ ├── TransactionErrorException.java │ ├── model │ ├── AbstractAddOn.java │ ├── AbstractSubscription.java │ ├── AbstractTransaction.java │ ├── Account.java │ ├── AccountAcquisition.java │ ├── AccountBalance.java │ ├── AccountNote.java │ ├── AccountNotes.java │ ├── Accounts.java │ ├── AcquisitionChannel.java │ ├── AddOn.java │ ├── AddOns.java │ ├── AddonPercentageTier.java │ ├── AddonPercentageTiers.java │ ├── Address.java │ ├── Adjustment.java │ ├── AdjustmentRefund.java │ ├── Adjustments.java │ ├── BillingInfo.java │ ├── BillingInfoVerification.java │ ├── BillingInfos.java │ ├── BusinessEntities.java │ ├── BusinessEntity.java │ ├── Coupon.java │ ├── Coupons.java │ ├── CreditInvoices.java │ ├── CreditPayment.java │ ├── CreditPayments.java │ ├── CurrencyPercentageTier.java │ ├── CurrencyPercentageTiers.java │ ├── CustomField.java │ ├── CustomFieldDefinition.java │ ├── CustomFieldDefinitions.java │ ├── CustomFields.java │ ├── CustomerPermission.java │ ├── Delivery.java │ ├── DunningCampaign.java │ ├── DunningCampaignBulkUpdate.java │ ├── DunningCampaigns.java │ ├── DunningCycle.java │ ├── DunningCycles.java │ ├── DunningInterval.java │ ├── DunningIntervals.java │ ├── Entitlement.java │ ├── Entitlements.java │ ├── Errors.java │ ├── ExternalAccount.java │ ├── ExternalAccounts.java │ ├── ExternalCharge.java │ ├── ExternalInvoice.java │ ├── ExternalInvoices.java │ ├── ExternalPaymentPhase.java │ ├── ExternalPaymentPhases.java │ ├── ExternalProduct.java │ ├── ExternalProductReference.java │ ├── ExternalProductReferences.java │ ├── ExternalProducts.java │ ├── ExternalSubscription.java │ ├── ExternalSubscriptions.java │ ├── GatewayAttributes.java │ ├── GeneralLedgerAccount.java │ ├── GeneralLedgerAccounts.java │ ├── GiftCard.java │ ├── GiftCards.java │ ├── Invoice.java │ ├── InvoiceCollection.java │ ├── InvoiceDisplayAddress.java │ ├── InvoiceRefund.java │ ├── InvoiceState.java │ ├── InvoiceTemplate.java │ ├── InvoiceTemplates.java │ ├── Invoices.java │ ├── Item.java │ ├── ItemCode.java │ ├── ItemCodeSerializer.java │ ├── ItemCodes.java │ ├── ItemCodesSerializer.java │ ├── Items.java │ ├── LineItem.java │ ├── LineItems.java │ ├── MeasuredUnit.java │ ├── MeasuredUnits.java │ ├── PercentageTier.java │ ├── PercentageTiers.java │ ├── PerformanceObligation.java │ ├── PerformanceObligations.java │ ├── Plan.java │ ├── PlanCode.java │ ├── PlanCodeSerializer.java │ ├── PlanCodes.java │ ├── PlanCodesSerializer.java │ ├── PlanRampInterval.java │ ├── PlanRampIntervals.java │ ├── Plans.java │ ├── PricingModel.java │ ├── ProrationSettings.java │ ├── Purchase.java │ ├── RecurlyAPIError.java │ ├── RecurlyError.java │ ├── RecurlyErrors.java │ ├── RecurlyObject.java │ ├── RecurlyObjects.java │ ├── RecurlyUnitCurrency.java │ ├── Redemption.java │ ├── Redemptions.java │ ├── RefundMethod.java │ ├── RefundOption.java │ ├── ResponseMetadata.java │ ├── RevenueScheduleType.java │ ├── ShippingAddress.java │ ├── ShippingAddresses.java │ ├── ShippingFee.java │ ├── ShippingFees.java │ ├── ShippingMethod.java │ ├── ShippingMethods.java │ ├── Subscription.java │ ├── SubscriptionAddOn.java │ ├── SubscriptionAddOns.java │ ├── SubscriptionNotes.java │ ├── SubscriptionRampInterval.java │ ├── SubscriptionRampIntervals.java │ ├── SubscriptionState.java │ ├── SubscriptionUpdate.java │ ├── Subscriptions.java │ ├── TaxAddress.java │ ├── TaxDetail.java │ ├── Tier.java │ ├── Tiers.java │ ├── Transaction.java │ ├── TransactionDetails.java │ ├── TransactionError.java │ ├── TransactionState.java │ ├── TransactionType.java │ ├── Transactions.java │ ├── Usage.java │ ├── UsageCalculationType.java │ ├── UsageTimeframeType.java │ ├── Usages.java │ ├── jackson │ │ ├── RecurlyObjectsSerializer.java │ │ └── RecurlyXmlSerializerProvider.java │ └── push │ │ ├── Notification.java │ │ ├── account │ │ ├── AccountNotification.java │ │ ├── BillingInfoUpdateFailedNotification.java │ │ ├── BillingInfoUpdatedNotification.java │ │ ├── CanceledAccountNotification.java │ │ ├── DeletedShippingAddressNotification.java │ │ ├── NewAccountNotification.java │ │ ├── NewShippingAddressNotification.java │ │ ├── UpdatedAccountNotification.java │ │ └── UpdatedShippingAddressNotification.java │ │ ├── creditpayment │ │ ├── CreditPaymentNotification.java │ │ ├── NewCreditPaymentNotification.java │ │ └── VoidedCreditPaymentNotification.java │ │ ├── giftcard │ │ ├── CanceledGiftCardNotification.java │ │ ├── GiftCardNotification.java │ │ ├── PurchasedGiftCardNotification.java │ │ ├── RedeemedGiftCardNotification.java │ │ ├── RegeneratedGiftCardNotification.java │ │ ├── UpdatedBalanceGiftCardNotification.java │ │ └── UpdatedGiftCardNotification.java │ │ ├── invoice │ │ ├── ClosedCreditInvoiceNotification.java │ │ ├── ClosedInvoiceNotification.java │ │ ├── FailedChargeInvoiceNotification.java │ │ ├── InvoiceNotification.java │ │ ├── NewChargeInvoiceNotification.java │ │ ├── NewCreditInvoiceNotification.java │ │ ├── NewDunningEventNotification.java │ │ ├── NewInvoiceNotification.java │ │ ├── OpenCreditInvoiceNotification.java │ │ ├── PaidChargeInvoiceNotification.java │ │ ├── PastDueChargeInvoiceNotification.java │ │ ├── PastDueInvoiceNotification.java │ │ ├── ProcessingChargeInvoiceNotification.java │ │ ├── ProcessingCreditInvoiceNotification.java │ │ ├── ProcessingInvoiceNotification.java │ │ ├── PushInvoice.java │ │ ├── ReopenedChargeInvoiceNotification.java │ │ ├── ReopenedCreditInvoiceNotification.java │ │ ├── UpdatedChargeInvoiceNotification.java │ │ ├── UpdatedCreditInvoiceNotification.java │ │ ├── UpdatedInvoiceNotification.java │ │ └── VoidedCreditInvoiceNotification.java │ │ ├── item │ │ ├── DeactivatedItemNotification.java │ │ ├── ItemNotification.java │ │ ├── NewItemNotification.java │ │ ├── ReactivatedItemNotification.java │ │ └── UpdatedItemNotification.java │ │ ├── payment │ │ ├── FailedPaymentNotification.java │ │ ├── FraudInfoUpdatedNotification.java │ │ ├── PaymentNotification.java │ │ ├── ProcessingPaymentNotification.java │ │ ├── PushTransaction.java │ │ ├── ScheduledPaymentNotification.java │ │ ├── SuccessfulPaymentNotification.java │ │ ├── SuccessfulRefundNotification.java │ │ ├── TransactionAuthorizedNotification.java │ │ ├── TransactionStatusUpdatedNotification.java │ │ └── VoidPaymentNotification.java │ │ ├── subscription │ │ ├── CanceledSubscriptionNotification.java │ │ ├── ExpiredSubscriptionNotification.java │ │ ├── LowBalanceGiftCardNotification.java │ │ ├── NewSubscriptionNotification.java │ │ ├── PausedSubscriptionRenewalNotification.java │ │ ├── PushSubscription.java │ │ ├── ReactivatedAccountNotification.java │ │ ├── RenewedSubscriptionNotification.java │ │ ├── ScheduledSubscriptionPauseNotification.java │ │ ├── SubscriptionNotification.java │ │ ├── SubscriptionPausedCanceledNotification.java │ │ ├── SubscriptionPausedModifiedNotification.java │ │ ├── SubscriptionPausedNotification.java │ │ ├── SubscriptionResumedNotification.java │ │ └── UpdatedSubscriptionNotification.java │ │ └── usage │ │ ├── NewUsageNotification.java │ │ └── UsageNotification.java │ └── util │ └── http │ └── SslUtils.java └── test └── java └── com └── ning └── billing └── recurly ├── TestPaginationUtils.java ├── TestRecurlyClient.java ├── TestRecurlyClientUserAgent.java ├── TestRecurlyJs.java ├── TestUtils.java └── model ├── TestAccount.java ├── TestAccountAcquisition.java ├── TestAccountBalance.java ├── TestAccountEntitlements.java ├── TestAccountExternalSubscriptions.java ├── TestAccountNotes.java ├── TestAccounts.java ├── TestAddOns.java ├── TestAddOnsPercentageTiered.java ├── TestAddOnsTiered.java ├── TestAddOnsWithRevRec.java ├── TestAddress.java ├── TestAdjustements.java ├── TestAdjustment.java ├── TestBillingInfo.java ├── TestBusinessEntities.java ├── TestBusinessEntity.java ├── TestCoupon.java ├── TestCoupons.java ├── TestCustomField.java ├── TestCustomFieldDefinition.java ├── TestCustomFieldDefinitions.java ├── TestDelivery.java ├── TestErrors.java ├── TestExternalAccount.java ├── TestExternalAccounts.java ├── TestExternalInvoice.java ├── TestExternalInvoices.java ├── TestExternalPaymentPhase.java ├── TestExternalPaymentPhases.java ├── TestExternalProduct.java ├── TestExternalProductReference.java ├── TestExternalProductReferences.java ├── TestExternalProducts.java ├── TestExternalSubscription.java ├── TestExternalSubscriptions.java ├── TestGeneralLedgerAccount.java ├── TestGeneralLedgerAccounts.java ├── TestGiftCard.java ├── TestGiftCards.java ├── TestInvoice.java ├── TestInvoiceCollection.java ├── TestInvoiceTemplates.java ├── TestInvoices.java ├── TestItem.java ├── TestItemBackedAddOns.java ├── TestItemWithRevRec.java ├── TestItems.java ├── TestMeasuredUnit.java ├── TestMeasuredUnits.java ├── TestModelBase.java ├── TestPerformanceObligation.java ├── TestPerformanceObligations.java ├── TestPlan.java ├── TestPlans.java ├── TestPurchase.java ├── TestPurchaseWithRevRec.java ├── TestRecurlyObject.java ├── TestRedemption.java ├── TestRedemptions.java ├── TestRevenueScheduleType.java ├── TestShippingMethod.java ├── TestShippingMethods.java ├── TestSubscription.java ├── TestSubscriptionAddOnWithPercentageTiers.java ├── TestSubscriptionUpdate.java ├── TestSubscriptions.java ├── TestTransaction.java ├── TestUsage.java ├── TestUsages.java ├── TestXmlMapper.java └── push ├── TestNotification.java ├── TestVoidNotification.java └── invoice ├── TestCloseInvoiceNotification.java ├── TestNewInvoiceNotification.java ├── TestPastDueInvoiceNotification.java └── TestProcessingInvoiceNotification.java /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug? 6 | assignees: '' 7 | 8 | --- 9 | 10 | _Warning_: Github issues are not an official support channel for Recurly. If you have an urgent request we suggest you contact us through an official channel: support@recurly.com or https://recurly.zendesk.com 11 | 12 | **Describe the bug** 13 | 14 | A clear and concise description of what the bug is. 15 | 16 | **To Reproduce** 17 | 18 | Steps to reproduce the behavior. 19 | 20 | If possible, please provide example code which we can run to reproduce the bug. 21 | The faster we can reproduce the bug, the faster we can help you. 22 | 23 | **Expected behavior** 24 | 25 | A clear and concise description of what you expected to happen. 26 | 27 | **Your Environment** 28 | 29 | - Which version of this library are you using? 30 | - Which version of java are you using? 31 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question-or-other.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question or Other 3 | about: A question or feature request 4 | title: '' 5 | labels: question 6 | assignees: '' 7 | 8 | --- 9 | 10 | _Warning_: Github issues are not an official support channel for Recurly. If you have an urgent request we suggest you contact us through an official channel: support@recurly.com or https://recurly.zendesk.com 11 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | - push 5 | 6 | jobs: 7 | tests: 8 | runs-on: ubuntu-latest 9 | timeout-minutes: 10 10 | strategy: 11 | fail-fast: true 12 | steps: 13 | - name: Checkout recurly-java-library 14 | uses: actions/checkout@v2 15 | - name: Set Java to version 8 16 | uses: actions/setup-java@v2 17 | with: 18 | distribution: adopt 19 | java-version: 8 20 | - name: Run tests 21 | env: 22 | API_KEY: ${{ secrets.API_KEY }} 23 | SUBDOMAIN: ${{ secrets.SUBDOMAIN }} 24 | run: | 25 | mvn clean test -Ptravis -Dkillbill.payment.recurly.apiKey=$API_KEY -Dkillbill.payment.recurly.subDomain=$SUBDOMAIN 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Temp files and IDE files 2 | *.*# 3 | .vscode 4 | .idea 5 | .vscode 6 | *.iml 7 | *.ipr 8 | *.iws 9 | # Compiled files 10 | *.class 11 | target 12 | # Dir for stuff i don't want to commit 13 | utils/ 14 | # Package Files # 15 | *.jar 16 | *.war 17 | *.ear 18 | *.*~ 19 | pom.xml.releaseBackup 20 | release.properties 21 | test-output/* 22 | .settings/* 23 | .project 24 | .classpath 25 | bin 26 | 27 | .DS_Store 28 | 29 | src/main/resources/com/ning/billing/recurly/git.properties 30 | 31 | dependency-reduced-pom.xml 32 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- 1 | Many thanks to the various contributors! 2 | 3 | N: Didier Bathily 4 | E: didier.bathily@njin.fr 5 | D: Subscription update 6 | D: Push notifications 7 | S: France 8 | 9 | N: Kristian Foster 10 | E: kristian.foster@gmail.com 11 | D: Various API additions 12 | D: Multiple Currency support 13 | D: Lots of unit tests (awesome) 14 | S: UK 15 | 16 | N: Charlie Gerrior 17 | E: charlie@recurly.com 18 | D: Subscription previews 19 | D: Account invoices 20 | S: San Francisco, CA 21 | S: USA 22 | 23 | N: Nicolas Guerrier 24 | E: nicolas.guerrier@prediseo.com 25 | D: Account adjustments 26 | S: Montpellier 27 | S: France 28 | 29 | N: Joel Hegg 30 | E: joel@decide.com 31 | D: Support for the Recurly.js fetch API 32 | 33 | N: Pierre-Alexandre Meyer 34 | E: pierre@mouraf.org 35 | D: Frenchy in the Silicon Valley 36 | S: San Francisco, CA 37 | S: USA 38 | 39 | N: Ronnie Rap 40 | E: info@rap-solutions.nl 41 | D: Invoice adjustments 42 | 43 | N: Omri Spector 44 | E: omri.spector@gmail.com 45 | D: Subscription support 46 | S: Israel 47 | 48 | N: Lebid Yuriy 49 | E: ylebid@gmail.com 50 | D: Coupons 51 | -------------------------------------------------------------------------------- /scripts/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | mvn clean install 5 | -------------------------------------------------------------------------------- /scripts/check-deps: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | function check_for_command { 5 | if ! hash eval "$1" 2>/dev/null; then 6 | echo "✖ Could not find '$1'" 7 | exit 1 8 | fi 9 | echo "✓ Found $1" 10 | } 11 | 12 | check_for_command "java" 13 | check_for_command "mvn" 14 | -------------------------------------------------------------------------------- /scripts/install-deps: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if ! hash brew 2>/dev/null; then 5 | echo "✖ Homebrew not found. Please install: https://brew.sh/" 6 | exit 1 7 | else 8 | echo "✓ Found homebrew" 9 | fi 10 | 11 | if ! hash mvn 2>/dev/null; then 12 | read -p "✖ 'mvn' not found. Would you like to install it? [Y/n] " -n 1 -r 13 | echo 14 | if [[ $REPLY =~ ^[Yy]$ ]] 15 | then 16 | brew install maven 17 | else 18 | exit 1 19 | fi 20 | else 21 | echo "✓ Found mvn" 22 | fi 23 | -------------------------------------------------------------------------------- /scripts/test: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # subdomain and key could come from travis 5 | # or the command line arguments 6 | SUB=$1 7 | KEY=$2 8 | TEST=$3 9 | COMMAND="mvn clean test" 10 | 11 | # If the first argument is "travis" 12 | # Set the travis profile and get key and 13 | # subdomain from the travis environment 14 | if [ "$1" = "travis" ]; then 15 | COMMAND+=" -Ptravis" 16 | SUB=$SUBDOMAIN 17 | KEY=$API_KEY 18 | 19 | # PRs from the community only run unit tests because the SUB and KEY are null for them 20 | if [ -z $KEY ]; then 21 | COMMAND="mvn clean test" 22 | fi 23 | 24 | elif [ -n "$SUB" ]; then 25 | COMMAND+=" -Pintegration -Drecurly.debug=true" 26 | fi 27 | 28 | if [ -n "$SUB" ] && [ -n "$KEY" ]; then 29 | COMMAND+=" -Dkillbill.payment.recurly.apiKey=$KEY -Dkillbill.payment.recurly.subDomain=$SUB" 30 | fi 31 | 32 | if [ -n "$TEST" ]; then 33 | COMMAND+=" -Dtest=TestRecurlyClient#$TEST" 34 | fi 35 | 36 | set -o xtrace 37 | eval $COMMAND 38 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/ConnectionErrorException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly; 19 | 20 | import com.ning.billing.recurly.model.Errors; 21 | 22 | public class ConnectionErrorException extends RuntimeException { 23 | 24 | public ConnectionErrorException(Throwable cause) { 25 | super(cause); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/PaginationUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly; 19 | 20 | import java.util.regex.Matcher; 21 | import java.util.regex.Pattern; 22 | 23 | public abstract class PaginationUtils { 24 | 25 | public static String[] getLinks(final String linkHeader) { 26 | String start = null; 27 | String next = null; 28 | 29 | final Pattern pattern = Pattern.compile("\\<([^>]+)\\>; rel=\\\"([^\"]+)\\\""); 30 | final Matcher matcher = pattern.matcher(linkHeader); 31 | while (matcher.find()) { 32 | if ("start".equals(matcher.group(2))) { 33 | start = matcher.group(1); 34 | } else if ("next".equals(matcher.group(2))) { 35 | next = matcher.group(1); 36 | } 37 | } 38 | 39 | return new String[]{start, next}; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/RecurlyAPIException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly; 19 | 20 | import com.ning.billing.recurly.model.RecurlyAPIError; 21 | 22 | public class RecurlyAPIException extends RuntimeException { 23 | 24 | private final RecurlyAPIError recurlyError; 25 | 26 | public RecurlyAPIException(final RecurlyAPIError recurlyError) { 27 | super(recurlyError == null ? "Unspecified API Error" : recurlyError.toString()); 28 | this.recurlyError = recurlyError; 29 | } 30 | 31 | public RecurlyAPIError getRecurlyError() { 32 | return recurlyError; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/TransactionErrorException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly; 19 | 20 | import com.ning.billing.recurly.model.Errors; 21 | 22 | // TODO RuntimeException for now as it's unclear which API calls can return such errors 23 | public class TransactionErrorException extends RuntimeException { 24 | 25 | private final Errors errors; 26 | 27 | public TransactionErrorException(final Errors errors) { 28 | super(errors.toString()); 29 | this.errors = errors; 30 | } 31 | 32 | public Errors getErrors() { 33 | return errors; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/AccountNotes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "notes") 27 | public class AccountNotes extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String ACCOUNT_NOTES_RESOURCE = "/notes"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "note"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final AccountNote value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public AccountNotes getStart() { 44 | return getStart(AccountNotes.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public AccountNotes getNext() { 50 | return getNext(AccountNotes.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/Accounts.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "accounts") 27 | public class Accounts extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String ACCOUNTS_RESOURCE = "/accounts"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "account"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final Account value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public Accounts getStart() { 44 | return getStart(Accounts.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public Accounts getNext() { 50 | return getNext(Accounts.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/AcquisitionChannel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlEnum; 20 | import javax.xml.bind.annotation.XmlEnumValue; 21 | 22 | // see AccountAcquisition docs: https://dev.recurly.com/docs/create-account-acquisition 23 | @XmlEnum(String.class) 24 | public enum AcquisitionChannel { 25 | @XmlEnumValue("referral") 26 | REFERAL, 27 | @XmlEnumValue("social_media") 28 | SOCIAL_MEDIA, 29 | @XmlEnumValue("email") 30 | EMAIL, 31 | @XmlEnumValue("paid_search") 32 | PAID_SEARCH, 33 | @XmlEnumValue("organic_search") 34 | ORGANIC_SEARCH, 35 | @XmlEnumValue("direct_traffic") 36 | DIRECT_TRAFFIC, 37 | @XmlEnumValue("marketing_content") 38 | MARKETING_CONTENT, 39 | @XmlEnumValue("blog") 40 | BLOG, 41 | @XmlEnumValue("events") 42 | EVENTS, 43 | @XmlEnumValue("outbound_sales") 44 | OUTBOUND_SALES, 45 | @XmlEnumValue("advertising") 46 | ADVERTISING, 47 | @XmlEnumValue("public_relations") 48 | PUBLIC_RELATIONS, 49 | @XmlEnumValue("other") 50 | OTHER; 51 | } -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/AddOns.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "add_ons") 27 | public class AddOns extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String ADDONS_RESOURCE = "/add_ons"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "add_on"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final AddOn value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public AddOns getStart() { 44 | return getStart(AddOns.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public AddOns getNext() { 50 | return getNext(AddOns.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/AddonPercentageTiers.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "tiers") 27 | public class AddonPercentageTiers extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | private static final String PROPERTY_NAME = "tier"; 31 | 32 | @JsonSetter(value = PROPERTY_NAME) 33 | @Override 34 | public void setRecurlyObject(final AddonPercentageTier value) { 35 | super.setRecurlyObject(value); 36 | } 37 | 38 | @JsonIgnore 39 | @Override 40 | public AddonPercentageTiers getStart() { 41 | return getStart(AddonPercentageTiers.class); 42 | } 43 | 44 | @JsonIgnore 45 | @Override 46 | public AddonPercentageTiers getNext() { 47 | return getNext(AddonPercentageTiers.class); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/BillingInfos.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "billing_infos") 27 | public class BillingInfos extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String BILLING_INFOS_RESOURCE = "/billing_infos"; 31 | 32 | @XmlTransient 33 | public static final String PROPERTY_NAME = "billing_info"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final BillingInfo value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public BillingInfos getStart() { 44 | return getStart(BillingInfos.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public BillingInfos getNext() { 50 | return getNext(BillingInfos.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/BusinessEntities.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import com.fasterxml.jackson.annotation.JsonIgnore; 20 | import com.fasterxml.jackson.annotation.JsonSetter; 21 | import javax.xml.bind.annotation.XmlRootElement; 22 | import javax.xml.bind.annotation.XmlTransient; 23 | 24 | @XmlRootElement(name = "business_entities") 25 | public class BusinessEntities extends RecurlyObjects { 26 | 27 | @XmlTransient 28 | public static final String BUSINESS_ENTITIES_RESOURCE = "/business_entities"; 29 | 30 | @XmlTransient 31 | private static final String PROPERTY_NAME = "business_entity"; 32 | 33 | @JsonSetter(value = PROPERTY_NAME) 34 | @Override 35 | public void setRecurlyObject(final BusinessEntity value) { 36 | super.setRecurlyObject(value); 37 | } 38 | 39 | @JsonIgnore 40 | @Override 41 | public BusinessEntities getStart() { 42 | return getStart(BusinessEntities.class); 43 | } 44 | 45 | @JsonIgnore 46 | @Override 47 | public BusinessEntities getNext() { 48 | return getNext(BusinessEntities.class); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/Coupons.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "coupons") 27 | public class Coupons extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String COUPONS_RESOURCE = "/coupons"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "coupon"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final Coupon value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public Coupons getStart() { 44 | return getStart(Coupons.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public Coupons getNext() { 50 | return getNext(Coupons.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/CreditInvoices.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import com.fasterxml.jackson.annotation.JsonIgnore; 21 | import com.fasterxml.jackson.annotation.JsonSetter; 22 | 23 | import javax.xml.bind.annotation.XmlRootElement; 24 | import javax.xml.bind.annotation.XmlTransient; 25 | 26 | @XmlRootElement(name = "credit_invoices") 27 | public class CreditInvoices extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | private static final String PROPERTY_NAME = "credit_invoice"; 31 | 32 | @JsonSetter(value = PROPERTY_NAME) 33 | @Override 34 | public void setRecurlyObject(final Invoice value) { 35 | super.setRecurlyObject(value); 36 | } 37 | 38 | @JsonIgnore 39 | @Override 40 | public CreditInvoices getStart() { 41 | return getStart(CreditInvoices.class); 42 | } 43 | 44 | @JsonIgnore 45 | @Override 46 | public CreditInvoices getNext() { 47 | return getNext(CreditInvoices.class); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/CreditPayments.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import com.fasterxml.jackson.annotation.JsonIgnore; 21 | import com.fasterxml.jackson.annotation.JsonSetter; 22 | 23 | import javax.xml.bind.annotation.XmlRootElement; 24 | import javax.xml.bind.annotation.XmlTransient; 25 | 26 | @XmlRootElement(name = "credit_payments") 27 | public class CreditPayments extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String CREDIT_PAYMENTS_RESOURCE = "/credit_payments"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "credit_payment"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final CreditPayment value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public CreditPayments getStart() { 44 | return getStart(CreditPayments.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public CreditPayments getNext() { 50 | return getNext(CreditPayments.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/CurrencyPercentageTiers.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "percentage_tiers") 27 | public class CurrencyPercentageTiers extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | private static final String PROPERTY_NAME = "percentage_tier"; 31 | 32 | @JsonSetter(value = PROPERTY_NAME) 33 | @Override 34 | public void setRecurlyObject(final CurrencyPercentageTier value) { 35 | super.setRecurlyObject(value); 36 | } 37 | 38 | @JsonIgnore 39 | @Override 40 | public CurrencyPercentageTiers getStart() { 41 | return getStart(CurrencyPercentageTiers.class); 42 | } 43 | 44 | @JsonIgnore 45 | @Override 46 | public CurrencyPercentageTiers getNext() { 47 | return getNext(CurrencyPercentageTiers.class); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/CustomFields.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "custom_fields") 27 | public class CustomFields extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | private static final String PROPERTY_NAME = "custom_field"; 31 | 32 | @JsonSetter(value = PROPERTY_NAME) 33 | @Override 34 | public void setRecurlyObject(final CustomField value) { 35 | super.setRecurlyObject(value); 36 | } 37 | 38 | @JsonIgnore 39 | @Override 40 | public CustomFields getStart() { 41 | return getStart(CustomFields.class); 42 | } 43 | 44 | @JsonIgnore 45 | @Override 46 | public CustomFields getNext() { 47 | return getNext(CustomFields.class); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/CustomerPermission.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlElement; 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "customer_permission") 23 | public class CustomerPermission extends RecurlyObject { 24 | 25 | @XmlElement(name = "id") 26 | private String id; 27 | 28 | @XmlElement(name = "code") 29 | private String code; 30 | 31 | @XmlElement(name = "name") 32 | private String name; 33 | 34 | @XmlElement(name = "description") 35 | private String description; 36 | 37 | public String getId() { 38 | return this.id; 39 | } 40 | 41 | public void setId(final Object id) { 42 | this.id = stringOrNull(id); 43 | } 44 | 45 | public String getCode() { 46 | return this.code; 47 | } 48 | 49 | public void setCode(final Object code) { 50 | this.code = stringOrNull(code); 51 | } 52 | 53 | public String getName() { 54 | return this.name; 55 | } 56 | 57 | public void setName(final Object name) { 58 | this.name = stringOrNull(name); 59 | } 60 | 61 | public String getDescription() { 62 | return this.description; 63 | } 64 | 65 | public void setDescription(final Object description) { 66 | this.description = stringOrNull(description); 67 | } 68 | } -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/DunningCampaignBulkUpdate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlElement; 20 | import javax.xml.bind.annotation.XmlElementWrapper; 21 | import javax.xml.bind.annotation.XmlRootElement; 22 | 23 | @XmlRootElement(name = "dunning_campaign") 24 | public class DunningCampaignBulkUpdate extends RecurlyObject { 25 | 26 | @XmlElement(name = "plan_code") 27 | @XmlElementWrapper(name = "plan_codes") 28 | private PlanCodes planCodes; 29 | 30 | public PlanCodes getPlanCodes() { 31 | return planCodes; 32 | } 33 | 34 | public void setPlanCodes(final PlanCodes planCodes) { 35 | this.planCodes = planCodes; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/DunningCampaigns.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import com.fasterxml.jackson.annotation.JsonIgnore; 21 | import com.fasterxml.jackson.annotation.JsonSetter; 22 | 23 | import javax.xml.bind.annotation.XmlRootElement; 24 | import javax.xml.bind.annotation.XmlTransient; 25 | 26 | @XmlRootElement(name = "dunning_campaigns") 27 | public class DunningCampaigns extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String DUNNING_CAMPAIGNS_RESOURCE = "/dunning_campaigns"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "dunning_campaign"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final DunningCampaign value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public DunningCampaigns getStart() { 44 | return getStart(DunningCampaigns.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public DunningCampaigns getNext() { 50 | return getNext(DunningCampaigns.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/DunningCycles.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import com.fasterxml.jackson.annotation.JsonIgnore; 21 | import com.fasterxml.jackson.annotation.JsonSetter; 22 | 23 | import javax.xml.bind.annotation.XmlRootElement; 24 | import javax.xml.bind.annotation.XmlTransient; 25 | 26 | @XmlRootElement(name = "dunning_cycles") 27 | public class DunningCycles extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | private static final String PROPERTY_NAME = "dunning_cycle"; 31 | 32 | @JsonSetter(value = PROPERTY_NAME) 33 | @Override 34 | public void setRecurlyObject(final DunningCycle value) { 35 | super.setRecurlyObject(value); 36 | } 37 | 38 | @JsonIgnore 39 | @Override 40 | public DunningCycles getStart() { 41 | return getStart(DunningCycles.class); 42 | } 43 | 44 | @JsonIgnore 45 | @Override 46 | public DunningCycles getNext() { 47 | return getNext(DunningCycles.class); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/DunningInterval.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlElement; 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "interval") 23 | public class DunningInterval extends RecurlyObject { 24 | 25 | @XmlElement(name = "days") 26 | private Integer days; 27 | 28 | @XmlElement(name = "email_template") 29 | private String emailTemplate; 30 | 31 | public Integer getDays() { 32 | return days; 33 | } 34 | 35 | public void setDays(Integer days) { 36 | this.days = days; 37 | } 38 | 39 | public String getEmailTemplate() { 40 | return emailTemplate; 41 | } 42 | 43 | public void setEmailTemplate(String emailTemplate) { 44 | this.emailTemplate = emailTemplate; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/DunningIntervals.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import com.fasterxml.jackson.annotation.JsonIgnore; 20 | import com.fasterxml.jackson.annotation.JsonSetter; 21 | 22 | import javax.xml.bind.annotation.XmlRootElement; 23 | import javax.xml.bind.annotation.XmlTransient; 24 | 25 | @XmlRootElement(name = "intervals") 26 | public class DunningIntervals extends RecurlyObjects { 27 | 28 | @XmlTransient 29 | private static final String PROPERTY_NAME = "interval"; 30 | 31 | @JsonSetter(value = PROPERTY_NAME) 32 | @Override 33 | public void setRecurlyObject(final DunningInterval value) { 34 | super.setRecurlyObject(value); 35 | } 36 | 37 | @JsonIgnore 38 | @Override 39 | public DunningIntervals getStart() { 40 | return getStart(DunningIntervals.class); 41 | } 42 | 43 | @JsonIgnore 44 | @Override 45 | public DunningIntervals getNext() { 46 | return getNext(DunningIntervals.class); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/ExternalAccounts.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlRootElement; 20 | import javax.xml.bind.annotation.XmlTransient; 21 | 22 | import com.fasterxml.jackson.annotation.JsonIgnore; 23 | import com.fasterxml.jackson.annotation.JsonSetter; 24 | 25 | @XmlRootElement(name = "external_accounts") 26 | public class ExternalAccounts extends RecurlyObjects { 27 | 28 | @XmlTransient 29 | public static final String EXTERNAL_ACCOUNTS_RESOURCE = "/external_accounts"; 30 | 31 | @XmlTransient 32 | public static final String PROPERTY_NAME = "external_account"; 33 | 34 | @JsonSetter(value = PROPERTY_NAME) 35 | @Override 36 | public void setRecurlyObject(final ExternalAccount value) { 37 | super.setRecurlyObject(value); 38 | } 39 | 40 | @JsonIgnore 41 | @Override 42 | public ExternalAccounts getStart() { 43 | return getStart(ExternalAccounts.class); 44 | } 45 | 46 | @JsonIgnore 47 | @Override 48 | public ExternalAccounts getNext() { 49 | return getNext(ExternalAccounts.class); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/ExternalInvoices.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlRootElement; 20 | import javax.xml.bind.annotation.XmlTransient; 21 | 22 | import com.fasterxml.jackson.annotation.JsonIgnore; 23 | import com.fasterxml.jackson.annotation.JsonSetter; 24 | 25 | @XmlRootElement(name = "external_invoices") 26 | public class ExternalInvoices extends RecurlyObjects { 27 | 28 | @XmlTransient 29 | public static final String EXTERNAL_INVOICES_RESOURCE = "/external_invoices"; 30 | 31 | @XmlTransient 32 | public static final String PROPERTY_NAME = "external_invoice"; 33 | 34 | @JsonSetter(value = PROPERTY_NAME) 35 | @Override 36 | public void setRecurlyObject(final ExternalInvoice value) { 37 | super.setRecurlyObject(value); 38 | } 39 | 40 | @JsonIgnore 41 | @Override 42 | public ExternalInvoices getStart() { 43 | return getStart(ExternalInvoices.class); 44 | } 45 | 46 | @JsonIgnore 47 | @Override 48 | public ExternalInvoices getNext() { 49 | return getNext(ExternalInvoices.class); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/ExternalPaymentPhases.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlRootElement; 20 | import javax.xml.bind.annotation.XmlTransient; 21 | 22 | import com.fasterxml.jackson.annotation.JsonIgnore; 23 | import com.fasterxml.jackson.annotation.JsonSetter; 24 | 25 | @XmlRootElement(name = "external_payment_phases") 26 | public class ExternalPaymentPhases extends RecurlyObjects { 27 | 28 | @XmlTransient 29 | public static final String EXTERNAL_PAYMENT_PHASES_RESOURCE = "/external_payment_phases"; 30 | 31 | @XmlTransient 32 | public static final String PROPERTY_NAME = "external_payment_phase"; 33 | 34 | @JsonSetter(value = PROPERTY_NAME) 35 | @Override 36 | public void setRecurlyObject(final ExternalPaymentPhase value) { 37 | super.setRecurlyObject(value); 38 | } 39 | 40 | @JsonIgnore 41 | @Override 42 | public ExternalPaymentPhases getStart() { 43 | return getStart(ExternalPaymentPhases.class); 44 | } 45 | 46 | @JsonIgnore 47 | @Override 48 | public ExternalPaymentPhases getNext() { 49 | return getNext(ExternalPaymentPhases.class); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/ExternalProductReferences.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import com.fasterxml.jackson.annotation.JsonIgnore; 20 | import com.fasterxml.jackson.annotation.JsonSetter; 21 | import javax.xml.bind.annotation.XmlRootElement; 22 | import javax.xml.bind.annotation.XmlTransient; 23 | 24 | @XmlRootElement(name = "external_product_references") 25 | public class ExternalProductReferences extends RecurlyObjects { 26 | 27 | @XmlTransient 28 | public static final String EXTERNAL_PRODUCT_REFERENCES_RESOURCE = "/external_product_references"; 29 | 30 | @XmlTransient 31 | private static final String PROPERTY_NAME = "external_product_reference"; 32 | 33 | @JsonSetter(value = PROPERTY_NAME) 34 | @Override 35 | public void setRecurlyObject(final ExternalProductReference value) { 36 | super.setRecurlyObject(value); 37 | } 38 | 39 | @JsonIgnore 40 | @Override 41 | public ExternalProductReferences getStart() { 42 | return getStart(ExternalProductReferences.class); 43 | } 44 | 45 | @JsonIgnore 46 | @Override 47 | public ExternalProductReferences getNext() { 48 | return getNext(ExternalProductReferences.class); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/ExternalProducts.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import com.fasterxml.jackson.annotation.JsonIgnore; 20 | import com.fasterxml.jackson.annotation.JsonSetter; 21 | import javax.xml.bind.annotation.XmlRootElement; 22 | import javax.xml.bind.annotation.XmlTransient; 23 | 24 | @XmlRootElement(name = "external_products") 25 | public class ExternalProducts extends RecurlyObjects { 26 | 27 | @XmlTransient 28 | public static final String EXTERNAL_PRODUCTS_RESOURCE = "/external_products"; 29 | 30 | @XmlTransient 31 | private static final String PROPERTY_NAME = "external_product"; 32 | 33 | @JsonSetter(value = PROPERTY_NAME) 34 | @Override 35 | public void setRecurlyObject(final ExternalProduct value) { 36 | super.setRecurlyObject(value); 37 | } 38 | 39 | @JsonIgnore 40 | @Override 41 | public ExternalProducts getStart() { 42 | return getStart(ExternalProducts.class); 43 | } 44 | 45 | @JsonIgnore 46 | @Override 47 | public ExternalProducts getNext() { 48 | return getNext(ExternalProducts.class); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/GeneralLedgerAccounts.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "general_ledger_accounts") 27 | public class GeneralLedgerAccounts extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String GENERAL_LEDGER_ACCOUNTS_RESOURCE = "/general_ledger_accounts"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "general_ledger_account"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final GeneralLedgerAccount value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public GeneralLedgerAccounts getStart() { 44 | return getStart(GeneralLedgerAccounts.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public GeneralLedgerAccounts getNext() { 50 | return getNext(GeneralLedgerAccounts.class); 51 | } 52 | } -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/GiftCards.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "gift_cards") 27 | public class GiftCards extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String GIFT_CARDS_RESOURCE = "/gift_cards"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "gift_card"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final GiftCard value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | public GiftCards getStart() { 43 | return getStart(GiftCards.class); 44 | } 45 | 46 | @JsonIgnore 47 | public GiftCards getNext() { 48 | return getNext(GiftCards.class); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/InvoiceState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | // see Invoice pagination: https://dev.recurly.com/docs/list-invoices 20 | public enum InvoiceState { 21 | OPEN("open"), 22 | FAILED("failed"), 23 | COLLECTED("collected"), 24 | PAST_DUE("past_due"), 25 | PENDING("pending"), 26 | PAID("paid"), 27 | CLOSED("closed"), 28 | VOIDED("voided"), 29 | PROCESSING("processing"); 30 | 31 | 32 | private final String type; 33 | 34 | private InvoiceState(final String type) { 35 | this.type = type; 36 | } 37 | 38 | public String getType() { 39 | return type; 40 | } 41 | } -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/InvoiceTemplates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import com.fasterxml.jackson.annotation.JsonIgnore; 21 | import com.fasterxml.jackson.annotation.JsonSetter; 22 | 23 | import javax.xml.bind.annotation.XmlRootElement; 24 | import javax.xml.bind.annotation.XmlTransient; 25 | 26 | @XmlRootElement(name = "invoice_templates") 27 | public class InvoiceTemplates extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String INVOICE_TEMPLATES_RESOURCE = "/invoice_templates"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "invoice_template"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final InvoiceTemplate value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public InvoiceTemplates getStart() { 44 | return getStart(InvoiceTemplates.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public InvoiceTemplates getNext() { 50 | return getNext(InvoiceTemplates.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/Invoices.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "invoices") 27 | public class Invoices extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String INVOICES_RESOURCE = "/invoices"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "invoice"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final Invoice value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public Invoices getStart() { 44 | return getStart(Invoices.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public Invoices getNext() { 50 | return getNext(Invoices.class); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/ItemCodeSerializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The Billing Project, LLC 3 | * 4 | * The Billing Project licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model; 18 | 19 | import com.fasterxml.jackson.core.JsonGenerationException; 20 | import com.fasterxml.jackson.core.JsonGenerator; 21 | import com.fasterxml.jackson.databind.SerializerProvider; 22 | import com.fasterxml.jackson.databind.ser.std.StdSerializer; 23 | 24 | import java.io.IOException; 25 | 26 | public class ItemCodeSerializer extends StdSerializer { 27 | 28 | public ItemCodeSerializer() { 29 | this(null); 30 | } 31 | 32 | public ItemCodeSerializer(final Class t) { 33 | super(t); 34 | } 35 | 36 | @Override 37 | public void serialize(final ItemCode value, final JsonGenerator jgen, final SerializerProvider provider) throws IOException, JsonGenerationException { 38 | jgen.writeObject(value.getName()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/ItemCodes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The Billing Project, LLC 3 | * 4 | * The Billing Project licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model; 18 | 19 | import com.fasterxml.jackson.annotation.JsonIgnore; 20 | import com.fasterxml.jackson.annotation.JsonSetter; 21 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 22 | 23 | import javax.xml.bind.annotation.XmlRootElement; 24 | import javax.xml.bind.annotation.XmlTransient; 25 | 26 | @JsonSerialize(using = ItemCodesSerializer.class) 27 | @XmlRootElement(name = "item_codes") 28 | public class ItemCodes extends RecurlyObjects { 29 | 30 | @XmlTransient 31 | private static final String PROPERTY_NAME = "item_code"; 32 | 33 | @JsonSetter(value = PROPERTY_NAME) 34 | @Override 35 | public void setRecurlyObject(final ItemCode value) { 36 | super.setRecurlyObject(value); 37 | } 38 | 39 | @JsonIgnore 40 | @Override 41 | public ItemCodes getStart() { 42 | return getStart(ItemCodes.class); 43 | } 44 | 45 | @JsonIgnore 46 | @Override 47 | public ItemCodes getNext() { 48 | return getNext(ItemCodes.class); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/ItemCodesSerializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The Billing Project, LLC 3 | * 4 | * The Billing Project licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model; 18 | 19 | import com.fasterxml.jackson.core.JsonGenerationException; 20 | import com.fasterxml.jackson.core.JsonGenerator; 21 | import com.fasterxml.jackson.databind.SerializerProvider; 22 | import com.fasterxml.jackson.databind.ser.std.StdSerializer; 23 | 24 | import java.io.IOException; 25 | 26 | public class ItemCodesSerializer extends StdSerializer { 27 | 28 | public ItemCodesSerializer() { 29 | this(null); 30 | } 31 | 32 | public ItemCodesSerializer(final Class t) { 33 | super(t); 34 | } 35 | 36 | @Override 37 | public void serialize(final ItemCodes value, final JsonGenerator jgen, final SerializerProvider provider) throws IOException, JsonGenerationException { 38 | for (final ItemCode itemCode : value) { 39 | jgen.writeObject(itemCode); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/Items.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "items") 27 | public class Items extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String ITEMS_RESOURCE = "/items"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "item"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final Item value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public Items getStart() { 44 | return getStart(Items.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public Items getNext() { 50 | return getNext(Items.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/LineItems.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlRootElement; 20 | import javax.xml.bind.annotation.XmlTransient; 21 | 22 | import com.fasterxml.jackson.annotation.JsonIgnore; 23 | import com.fasterxml.jackson.annotation.JsonSetter; 24 | 25 | @XmlRootElement(name = "line_items") 26 | public class LineItems extends RecurlyObjects { 27 | 28 | @XmlTransient 29 | public static final String PROPERTY_NAME = "external_charge"; 30 | 31 | @JsonSetter(value = PROPERTY_NAME) 32 | @Override 33 | public void setRecurlyObject(final ExternalCharge value) { 34 | super.setRecurlyObject(value); 35 | } 36 | 37 | @JsonIgnore 38 | @Override 39 | public LineItems getStart() { 40 | return getStart(LineItems.class); 41 | } 42 | 43 | @JsonIgnore 44 | @Override 45 | public LineItems getNext() { 46 | return getNext(LineItems.class); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/MeasuredUnits.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import com.fasterxml.jackson.annotation.JsonIgnore; 21 | import com.fasterxml.jackson.annotation.JsonSetter; 22 | 23 | import javax.xml.bind.annotation.XmlRootElement; 24 | import javax.xml.bind.annotation.XmlTransient; 25 | 26 | @XmlRootElement(name = "measured_units") 27 | public class MeasuredUnits extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String MEASURED_UNITS_RESOURCE = "/measured_units"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "measured_unit"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final MeasuredUnit value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public MeasuredUnits getStart() { 44 | return getStart(MeasuredUnits.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public MeasuredUnits getNext() { 50 | return getNext(MeasuredUnits.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/PercentageTiers.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "percentage_tiers") 27 | public class PercentageTiers extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | private static final String PROPERTY_NAME = "percentage_tier"; 31 | 32 | @JsonSetter(value = PROPERTY_NAME) 33 | @Override 34 | public void setRecurlyObject(final PercentageTier value) { 35 | super.setRecurlyObject(value); 36 | } 37 | 38 | @JsonIgnore 39 | @Override 40 | public PercentageTiers getStart() { 41 | return getStart(PercentageTiers.class); 42 | } 43 | 44 | @JsonIgnore 45 | @Override 46 | public PercentageTiers getNext() { 47 | return getNext(PercentageTiers.class); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/PerformanceObligations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "performance_obligations") 27 | public class PerformanceObligations extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String PERFORMANCE_OBLIGATIONS_RESOURCE = "/performance_obligations"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "performance_obligation"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final PerformanceObligation value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public PerformanceObligations getStart() { 44 | return getStart(PerformanceObligations.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public PerformanceObligations getNext() { 50 | return getNext(PerformanceObligations.class); 51 | } 52 | } -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/PlanCodeSerializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The Billing Project, LLC 3 | * 4 | * The Billing Project licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model; 18 | 19 | import com.fasterxml.jackson.core.JsonGenerationException; 20 | import com.fasterxml.jackson.core.JsonGenerator; 21 | import com.fasterxml.jackson.databind.SerializerProvider; 22 | import com.fasterxml.jackson.databind.ser.std.StdSerializer; 23 | 24 | import java.io.IOException; 25 | 26 | public class PlanCodeSerializer extends StdSerializer { 27 | 28 | public PlanCodeSerializer() { 29 | this(null); 30 | } 31 | 32 | public PlanCodeSerializer(final Class t) { 33 | super(t); 34 | } 35 | 36 | @Override 37 | public void serialize(final PlanCode value, final JsonGenerator jgen, final SerializerProvider provider) throws IOException, JsonGenerationException { 38 | jgen.writeObject(value.getName()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/PlanCodes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The Billing Project, LLC 3 | * 4 | * The Billing Project licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model; 18 | 19 | import com.fasterxml.jackson.annotation.JsonIgnore; 20 | import com.fasterxml.jackson.annotation.JsonSetter; 21 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 22 | 23 | import javax.xml.bind.annotation.XmlRootElement; 24 | import javax.xml.bind.annotation.XmlTransient; 25 | 26 | @JsonSerialize(using = PlanCodesSerializer.class) 27 | @XmlRootElement(name = "plan_codes") 28 | public class PlanCodes extends RecurlyObjects { 29 | 30 | @XmlTransient 31 | private static final String PROPERTY_NAME = "plan_code"; 32 | 33 | @JsonSetter(value = PROPERTY_NAME) 34 | @Override 35 | public void setRecurlyObject(final PlanCode value) { 36 | super.setRecurlyObject(value); 37 | } 38 | 39 | @JsonIgnore 40 | @Override 41 | public PlanCodes getStart() { 42 | return getStart(PlanCodes.class); 43 | } 44 | 45 | @JsonIgnore 46 | @Override 47 | public PlanCodes getNext() { 48 | return getNext(PlanCodes.class); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/PlanCodesSerializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 The Billing Project, LLC 3 | * 4 | * The Billing Project licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model; 18 | 19 | import com.fasterxml.jackson.core.JsonGenerationException; 20 | import com.fasterxml.jackson.core.JsonGenerator; 21 | import com.fasterxml.jackson.databind.SerializerProvider; 22 | import com.fasterxml.jackson.databind.ser.std.StdSerializer; 23 | 24 | import java.io.IOException; 25 | 26 | public class PlanCodesSerializer extends StdSerializer { 27 | 28 | public PlanCodesSerializer() { 29 | this(null); 30 | } 31 | 32 | public PlanCodesSerializer(final Class t) { 33 | super(t); 34 | } 35 | 36 | @Override 37 | public void serialize(final PlanCodes value, final JsonGenerator jgen, final SerializerProvider provider) throws IOException, JsonGenerationException { 38 | for (final PlanCode planCode : value) { 39 | jgen.writeObject(planCode); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/PlanRampIntervals.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlRootElement; 20 | import javax.xml.bind.annotation.XmlTransient; 21 | 22 | import com.fasterxml.jackson.annotation.JsonIgnore; 23 | import com.fasterxml.jackson.annotation.JsonSetter; 24 | 25 | @XmlRootElement(name = "ramp_intervals") 26 | public class PlanRampIntervals extends RecurlyObjects { 27 | 28 | @XmlTransient 29 | private static final String PROPERTY_NAME = "ramp_interval"; 30 | 31 | @JsonSetter(value = PROPERTY_NAME) 32 | @Override 33 | public void setRecurlyObject(final PlanRampInterval value) { 34 | super.setRecurlyObject(value); 35 | } 36 | 37 | @JsonIgnore 38 | @Override 39 | public PlanRampIntervals getStart() { 40 | return getStart(PlanRampIntervals.class); 41 | } 42 | 43 | @JsonIgnore 44 | @Override 45 | public PlanRampIntervals getNext() { 46 | return getNext(PlanRampIntervals.class); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/Plans.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "plans") 27 | public class Plans extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String PLANS_RESOURCE = "/plans"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "plan"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final Plan value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public Plans getStart() { 44 | return getStart(Plans.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public Plans getNext() { 50 | return getNext(Plans.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/PricingModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlEnum; 20 | import javax.xml.bind.annotation.XmlEnumValue; 21 | 22 | @XmlEnum(String.class) 23 | public enum PricingModel { 24 | @XmlEnumValue("fixed") 25 | FIXED, 26 | @XmlEnumValue("ramp") 27 | RAMP 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/RecurlyErrors.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "errors") 27 | public class RecurlyErrors extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | private static final String PROPERTY_NAME = "error"; 31 | 32 | @JsonSetter(value = PROPERTY_NAME) 33 | @Override 34 | public void setRecurlyObject(final RecurlyError value) { 35 | super.setRecurlyObject(value); 36 | } 37 | 38 | @JsonIgnore 39 | @Override 40 | public RecurlyErrors getStart() { 41 | return getStart(RecurlyErrors.class); 42 | } 43 | 44 | @JsonIgnore 45 | @Override 46 | public RecurlyErrors getNext() { 47 | return getNext(RecurlyErrors.class); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/Redemptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "redemptions") 27 | public class Redemptions extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String REDEMPTIONS_RESOURCE = "/redemptions"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "redemption"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final Redemption value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public Redemptions getStart() { 44 | return getStart(Redemptions.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public Redemptions getNext() { 50 | return getNext(Redemptions.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/RefundMethod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | /** 21 | * The order in which to apply an invoice refund 22 | */ 23 | public enum RefundMethod { 24 | transaction_first, credit_first, all_transaction, all_credit 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/RefundOption.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | /** 21 | * Refund options for subscription changes. 22 | */ 23 | public enum RefundOption { 24 | partial, full, none 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/RevenueScheduleType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlEnum; 20 | import javax.xml.bind.annotation.XmlEnumValue; 21 | 22 | @XmlEnum(String.class) 23 | public enum RevenueScheduleType { 24 | @XmlEnumValue("never") 25 | NEVER, 26 | @XmlEnumValue("evenly") 27 | EVENLY, 28 | @XmlEnumValue("at_invoice") 29 | AT_INVOICE, 30 | @XmlEnumValue("at_range_end") 31 | AT_RANGE_END, 32 | @XmlEnumValue("at_range_start") 33 | AT_RANGE_START 34 | } -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/ShippingAddresses.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "shipping_addresses") 27 | public class ShippingAddresses extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String SHIPPING_ADDRESSES_RESOURCE = "/shipping_addresses"; 31 | 32 | @XmlTransient 33 | public static final String PROPERTY_NAME = "shipping_address"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final ShippingAddress value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public ShippingAddresses getStart() { 44 | return getStart(ShippingAddresses.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public ShippingAddresses getNext() { 50 | return getNext(ShippingAddresses.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/ShippingFees.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import com.fasterxml.jackson.annotation.JsonIgnore; 21 | import com.fasterxml.jackson.annotation.JsonSetter; 22 | 23 | import javax.xml.bind.annotation.XmlRootElement; 24 | import javax.xml.bind.annotation.XmlTransient; 25 | 26 | @XmlRootElement(name = "shipping_fees") 27 | public class ShippingFees extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | private static final String PROPERTY_NAME = "shipping_fee"; 31 | 32 | @JsonSetter(value = PROPERTY_NAME) 33 | @Override 34 | public void setRecurlyObject(final ShippingFee value) { 35 | super.setRecurlyObject(value); 36 | } 37 | 38 | @JsonIgnore 39 | @Override 40 | public ShippingFees getStart() { 41 | return getStart(ShippingFees.class); 42 | } 43 | 44 | @JsonIgnore 45 | @Override 46 | public ShippingFees getNext() { 47 | return getNext(ShippingFees.class); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/ShippingMethods.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "shipping_methods") 27 | public class ShippingMethods extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String SHIPPING_METHODS_RESOURCE = "/shipping_methods"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "shipping_method"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final ShippingMethod value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public ShippingMethods getStart() { 44 | return getStart(ShippingMethods.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public ShippingMethods getNext() { 50 | return getNext(ShippingMethods.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/SubscriptionAddOns.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "subscription_add_on") 27 | public class SubscriptionAddOns extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String ADDONS_RESOURCE = "/addons"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "subscription_add_on"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final SubscriptionAddOn value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public SubscriptionAddOns getStart() { 44 | return getStart(SubscriptionAddOns.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public SubscriptionAddOns getNext() { 50 | return getNext(SubscriptionAddOns.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/SubscriptionRampIntervals.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlRootElement; 20 | import javax.xml.bind.annotation.XmlTransient; 21 | 22 | import com.fasterxml.jackson.annotation.JsonIgnore; 23 | import com.fasterxml.jackson.annotation.JsonSetter; 24 | 25 | @XmlRootElement(name = "ramp_intervals") 26 | public class SubscriptionRampIntervals extends RecurlyObjects { 27 | 28 | @XmlTransient 29 | private static final String PROPERTY_NAME = "ramp_interval"; 30 | 31 | @JsonSetter(value = PROPERTY_NAME) 32 | @Override 33 | public void setRecurlyObject(final SubscriptionRampInterval value) { 34 | super.setRecurlyObject(value); 35 | } 36 | 37 | @JsonIgnore 38 | @Override 39 | public SubscriptionRampIntervals getStart() { 40 | return getStart(SubscriptionRampIntervals.class); 41 | } 42 | 43 | @JsonIgnore 44 | @Override 45 | public SubscriptionRampIntervals getNext() { 46 | return getNext(SubscriptionRampIntervals.class); 47 | } 48 | 49 | @JsonIgnore 50 | @Override 51 | public String toString() { 52 | final StringBuilder sb = new StringBuilder(); 53 | for (int i = 0; i < super.size(); i++ ) { 54 | sb.append(super.get(i)); 55 | } 56 | return sb.toString(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/SubscriptionState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | // see Subscription pagination: https://dev.recurly.com/docs/list-subscriptions 20 | public enum SubscriptionState { 21 | ACTIVE("active"), 22 | CANCELED("canceled"), 23 | PAUSED("paused"), 24 | EXPIRED("expired"), 25 | FUTURE("future"), 26 | IN_TRIAL("in_trial"), 27 | LIVE("live"), 28 | PAST_DUE("past_due"); 29 | 30 | private final String type; 31 | 32 | private SubscriptionState(final String type) { 33 | this.type = type; 34 | } 35 | 36 | public String getType() { 37 | return type; 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/Subscriptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "subscriptions") 27 | public class Subscriptions extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String SUBSCRIPTIONS_RESOURCE = "/subscriptions"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "subscription"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final Subscription value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public Subscriptions getStart() { 44 | return getStart(Subscriptions.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public Subscriptions getNext() { 50 | return getNext(Subscriptions.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/Tiers.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "tiers") 27 | public class Tiers extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | private static final String PROPERTY_NAME = "tier"; 31 | 32 | @JsonSetter(value = PROPERTY_NAME) 33 | @Override 34 | public void setRecurlyObject(final Tier value) { 35 | super.setRecurlyObject(value); 36 | } 37 | 38 | @JsonIgnore 39 | @Override 40 | public Tiers getStart() { 41 | return getStart(Tiers.class); 42 | } 43 | 44 | @JsonIgnore 45 | @Override 46 | public Tiers getNext() { 47 | return getNext(Tiers.class); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/TransactionState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | 20 | // see Transaction pagination: https://dev.recurly.com/docs/list-transactions 21 | public enum TransactionState { 22 | SUCCESSFUL("successful"), 23 | FAILED("failed"), 24 | VOIDED("voided"); 25 | 26 | private final String type; 27 | 28 | private TransactionState(final String type) { 29 | this.type = type; 30 | } 31 | 32 | public String getType() { 33 | return type; 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/TransactionType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | 20 | // see Transaction pagination: https://dev.recurly.com/docs/list-transactions 21 | public enum TransactionType { 22 | AUTHORIZATION("authorization"), 23 | PURCHASE("purchase"), 24 | REFUND("refund"); 25 | 26 | private final String type; 27 | 28 | private TransactionType(final String type) { 29 | this.type = type; 30 | } 31 | 32 | public String getType() { 33 | return type; 34 | } 35 | } -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/Transactions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | import javax.xml.bind.annotation.XmlTransient; 22 | 23 | import com.fasterxml.jackson.annotation.JsonIgnore; 24 | import com.fasterxml.jackson.annotation.JsonSetter; 25 | 26 | @XmlRootElement(name = "transaction") 27 | public class Transactions extends RecurlyObjects { 28 | 29 | @XmlTransient 30 | public static final String TRANSACTIONS_RESOURCE = "/transactions"; 31 | 32 | @XmlTransient 33 | private static final String PROPERTY_NAME = "transaction"; 34 | 35 | @JsonSetter(value = PROPERTY_NAME) 36 | @Override 37 | public void setRecurlyObject(final Transaction value) { 38 | super.setRecurlyObject(value); 39 | } 40 | 41 | @JsonIgnore 42 | @Override 43 | public Transactions getStart() { 44 | return getStart(Transactions.class); 45 | } 46 | 47 | @JsonIgnore 48 | @Override 49 | public Transactions getNext() { 50 | return getNext(Transactions.class); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/UsageCalculationType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import javax.xml.bind.annotation.XmlEnum; 21 | import javax.xml.bind.annotation.XmlEnumValue; 22 | 23 | 24 | @XmlEnum(String.class) 25 | public enum UsageCalculationType { 26 | @XmlEnumValue("cumulative") 27 | CUMULATIVE, 28 | @XmlEnumValue("last_in_period") 29 | LAST_IN_PERIOD 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/UsageTimeframeType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | package com.ning.billing.recurly.model; 18 | 19 | import javax.xml.bind.annotation.XmlEnum; 20 | import javax.xml.bind.annotation.XmlEnumValue; 21 | 22 | @XmlEnum(String.class) 23 | public enum UsageTimeframeType { 24 | @XmlEnumValue("billing_period") 25 | BILLING_PERIOD, 26 | @XmlEnumValue("subscription_term") 27 | SUBSCRIPTION_TERM, 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/Usages.java: -------------------------------------------------------------------------------- 1 | package com.ning.billing.recurly.model; 2 | 3 | /* 4 | * Copyright 2010-2014 Ning, Inc. 5 | * Copyright 2014-2015 The Billing Project, LLC 6 | * 7 | * The Billing Project licenses this file to you under the Apache License, version 2.0 8 | * (the "License"); you may not use this file except in compliance with the 9 | * License. You may obtain a copy of the License at: 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 15 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 16 | * License for the specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | 21 | import javax.xml.bind.annotation.XmlRootElement; 22 | import javax.xml.bind.annotation.XmlTransient; 23 | 24 | import com.fasterxml.jackson.annotation.JsonIgnore; 25 | import com.fasterxml.jackson.annotation.JsonSetter; 26 | 27 | @XmlRootElement(name = "usages") 28 | public class Usages extends RecurlyObjects { 29 | 30 | @XmlTransient 31 | public static final String USAGES_RESOURCE = "/usage"; 32 | 33 | @XmlTransient 34 | private static final String PROPERTY_NAME = "usage"; 35 | 36 | @JsonSetter(value = PROPERTY_NAME) 37 | @Override 38 | public void setRecurlyObject(final Usage value) { 39 | super.setRecurlyObject(value); 40 | } 41 | 42 | @JsonIgnore 43 | @Override 44 | public Usages getStart() { 45 | return getStart(Usages.class); 46 | } 47 | 48 | @JsonIgnore 49 | @Override 50 | public Usages getNext() { 51 | return getNext(Usages.class); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/account/AccountNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.account; 19 | 20 | import javax.xml.bind.annotation.XmlElement; 21 | 22 | import com.ning.billing.recurly.model.Account; 23 | import com.ning.billing.recurly.model.push.Notification; 24 | 25 | public abstract class AccountNotification extends Notification { 26 | 27 | @XmlElement(name = "account") 28 | private Account account; 29 | 30 | public Account getAccount() { 31 | return account; 32 | } 33 | 34 | public void setAccount(final Account account) { 35 | this.account = account; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/account/BillingInfoUpdateFailedNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.account; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "billing_info_update_failed_notification") 23 | public class BillingInfoUpdateFailedNotification extends AccountNotification { 24 | 25 | public static BillingInfoUpdateFailedNotification read(final String payload) { 26 | return read(payload, BillingInfoUpdateFailedNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/account/BillingInfoUpdatedNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.account; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "billing_info_updated_notification") 23 | public class BillingInfoUpdatedNotification extends AccountNotification { 24 | 25 | public static BillingInfoUpdatedNotification read(final String payload) { 26 | return read(payload, BillingInfoUpdatedNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/account/CanceledAccountNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.account; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "canceled_account_notification") 23 | public class CanceledAccountNotification extends AccountNotification { 24 | 25 | public static CanceledAccountNotification read(final String payload) { 26 | return read(payload, CanceledAccountNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/account/DeletedShippingAddressNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.account; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "deleted_shipping_address_notification") 23 | public class DeletedShippingAddressNotification extends AccountNotification { 24 | 25 | public static DeletedShippingAddressNotification read(final String payload) { 26 | return read(payload, DeletedShippingAddressNotification.class); 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/account/NewAccountNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.account; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "new_account_notification") 23 | public class NewAccountNotification extends AccountNotification { 24 | 25 | public static NewAccountNotification read(final String payload) { 26 | return read(payload, NewAccountNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/account/NewShippingAddressNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.account; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "new_shipping_address_notification") 23 | public class NewShippingAddressNotification extends AccountNotification { 24 | 25 | public static NewShippingAddressNotification read(final String payload) { 26 | return read(payload, NewShippingAddressNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/account/UpdatedAccountNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.account; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "updated_account_notification") 23 | public class UpdatedAccountNotification extends AccountNotification { 24 | 25 | public static UpdatedAccountNotification read(final String payload) { 26 | return read(payload, UpdatedAccountNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/account/UpdatedShippingAddressNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.account; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "updated_shipping_address_notification") 23 | public class UpdatedShippingAddressNotification extends AccountNotification { 24 | 25 | public static UpdatedShippingAddressNotification read(final String payload) { 26 | return read(payload, UpdatedShippingAddressNotification.class); 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/creditpayment/CreditPaymentNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.creditpayment; 19 | 20 | import javax.xml.bind.annotation.XmlElement; 21 | 22 | import com.ning.billing.recurly.model.push.account.AccountNotification; 23 | import com.ning.billing.recurly.model.CreditPayment; 24 | 25 | public abstract class CreditPaymentNotification extends AccountNotification { 26 | 27 | @XmlElement(name = "credit_payment") 28 | private CreditPayment creditPayment; 29 | 30 | public CreditPayment getCreditPayment() { 31 | return creditPayment; 32 | } 33 | 34 | public void setCreditPayment(final CreditPayment creditPayment) { 35 | this.creditPayment = creditPayment; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/creditpayment/NewCreditPaymentNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.creditpayment; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "new_credit_payment_notification") 23 | public class NewCreditPaymentNotification extends CreditPaymentNotification { 24 | 25 | public static NewCreditPaymentNotification read(final String payload) { 26 | return read(payload, NewCreditPaymentNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/creditpayment/VoidedCreditPaymentNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.creditpayment; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "voided_credit_payment_notification") 23 | public class VoidedCreditPaymentNotification extends CreditPaymentNotification { 24 | 25 | public static VoidedCreditPaymentNotification read(final String payload) { 26 | return read(payload, VoidedCreditPaymentNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/giftcard/CanceledGiftCardNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.giftcard; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "canceled_gift_card_notification") 23 | public class CanceledGiftCardNotification extends GiftCardNotification { 24 | 25 | public static CanceledGiftCardNotification read(final String payload) { 26 | return read(payload, CanceledGiftCardNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/giftcard/GiftCardNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.giftcard; 19 | 20 | import javax.xml.bind.annotation.XmlElement; 21 | 22 | import com.ning.billing.recurly.model.push.account.AccountNotification; 23 | import com.ning.billing.recurly.model.GiftCard; 24 | 25 | public abstract class GiftCardNotification extends AccountNotification { 26 | 27 | @XmlElement(name = "gift_card") 28 | private GiftCard giftCard; 29 | 30 | public GiftCard getGiftCard() { 31 | return giftCard; 32 | } 33 | 34 | public void setGiftCard(final GiftCard giftCard) { 35 | this.giftCard = giftCard; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/giftcard/PurchasedGiftCardNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.giftcard; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "purchased_gift_card_notification") 23 | public class PurchasedGiftCardNotification extends GiftCardNotification { 24 | 25 | public static PurchasedGiftCardNotification read(final String payload) { 26 | return read(payload, PurchasedGiftCardNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/giftcard/RedeemedGiftCardNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.giftcard; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "redeemed_gift_card_notification") 23 | public class RedeemedGiftCardNotification extends GiftCardNotification { 24 | 25 | public static RedeemedGiftCardNotification read(final String payload) { 26 | return read(payload, RedeemedGiftCardNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/giftcard/RegeneratedGiftCardNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.giftcard; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "regenerated_gift_card_notification") 23 | public class RegeneratedGiftCardNotification extends GiftCardNotification { 24 | 25 | public static RegeneratedGiftCardNotification read(final String payload) { 26 | return read(payload, RegeneratedGiftCardNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/giftcard/UpdatedBalanceGiftCardNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.giftcard; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "updated_balance_gift_card_notification") 23 | public class UpdatedBalanceGiftCardNotification extends GiftCardNotification { 24 | 25 | public static UpdatedBalanceGiftCardNotification read(final String payload) { 26 | return read(payload, UpdatedBalanceGiftCardNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/giftcard/UpdatedGiftCardNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.giftcard; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "updated_gift_card_notification") 23 | public class UpdatedGiftCardNotification extends GiftCardNotification { 24 | 25 | public static UpdatedGiftCardNotification read(final String payload) { 26 | return read(payload, UpdatedGiftCardNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/ClosedCreditInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "closed_credit_invoice_notification") 23 | public class ClosedCreditInvoiceNotification extends InvoiceNotification { 24 | 25 | public static ClosedCreditInvoiceNotification read(final String payload) { 26 | return read(payload, ClosedCreditInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/ClosedInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "closed_invoice_notification") 23 | public class ClosedInvoiceNotification extends InvoiceNotification { 24 | 25 | public static ClosedInvoiceNotification read(final String payload) { 26 | return read(payload, ClosedInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/FailedChargeInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "failed_charge_invoice_notification") 23 | public class FailedChargeInvoiceNotification extends InvoiceNotification { 24 | 25 | public static FailedChargeInvoiceNotification read(final String payload) { 26 | return read(payload, FailedChargeInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/InvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | import com.ning.billing.recurly.model.push.account.AccountNotification; 20 | 21 | import javax.xml.bind.annotation.XmlElement; 22 | 23 | public abstract class InvoiceNotification extends AccountNotification { 24 | 25 | @XmlElement(name = "invoice") 26 | private PushInvoice invoice; 27 | 28 | public PushInvoice getInvoice() { 29 | return invoice; 30 | } 31 | 32 | public void setInvoice(PushInvoice invoice) { 33 | this.invoice = invoice; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/NewChargeInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "new_charge_invoice_notification") 23 | public class NewChargeInvoiceNotification extends InvoiceNotification { 24 | 25 | public static NewChargeInvoiceNotification read(final String payload) { 26 | return read(payload, NewChargeInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/NewCreditInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "new_credit_invoice_notification") 23 | public class NewCreditInvoiceNotification extends InvoiceNotification { 24 | 25 | public static NewCreditInvoiceNotification read(final String payload) { 26 | return read(payload, NewCreditInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/NewDunningEventNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "new_dunning_event_notification") 23 | public class NewDunningEventNotification extends InvoiceNotification { 24 | 25 | public static NewDunningEventNotification read(final String payload) { 26 | return read(payload, NewDunningEventNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/NewInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "new_invoice_notification") 23 | public class NewInvoiceNotification extends InvoiceNotification { 24 | 25 | public static NewInvoiceNotification read(final String payload) { 26 | return read(payload, NewInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/OpenCreditInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "open_credit_invoice_notification") 23 | public class OpenCreditInvoiceNotification extends InvoiceNotification { 24 | 25 | public static OpenCreditInvoiceNotification read(final String payload) { 26 | return read(payload, OpenCreditInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/PaidChargeInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "paid_charge_invoice_notification") 23 | public class PaidChargeInvoiceNotification extends InvoiceNotification { 24 | 25 | public static PaidChargeInvoiceNotification read(final String payload) { 26 | return read(payload, PaidChargeInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/PastDueChargeInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "past_due_charge_invoice_notification") 23 | public class PastDueChargeInvoiceNotification extends InvoiceNotification { 24 | 25 | public static PastDueChargeInvoiceNotification read(final String payload) { 26 | return read(payload, PastDueChargeInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/PastDueInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "past_due_invoice_notification") 23 | public class PastDueInvoiceNotification extends InvoiceNotification { 24 | 25 | public static PastDueInvoiceNotification read(final String payload) { 26 | return read(payload, PastDueInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/ProcessingChargeInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "processing_charge_invoice_notification") 23 | public class ProcessingChargeInvoiceNotification extends InvoiceNotification { 24 | 25 | public static ProcessingChargeInvoiceNotification read(final String payload) { 26 | return read(payload, ProcessingChargeInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/ProcessingCreditInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "processing_credit_invoice_notification") 23 | public class ProcessingCreditInvoiceNotification extends InvoiceNotification { 24 | 25 | public static ProcessingCreditInvoiceNotification read(final String payload) { 26 | return read(payload, ProcessingCreditInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/ProcessingInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "processing_invoice_notification") 23 | public class ProcessingInvoiceNotification extends InvoiceNotification { 24 | 25 | public static ProcessingInvoiceNotification read(final String payload) { 26 | return read(payload, ProcessingInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/ReopenedChargeInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "reopened_charge_invoice_notification") 23 | public class ReopenedChargeInvoiceNotification extends InvoiceNotification { 24 | 25 | public static ReopenedChargeInvoiceNotification read(final String payload) { 26 | return read(payload, ReopenedChargeInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/ReopenedCreditInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "reopened_credit_invoice_notification") 23 | public class ReopenedCreditInvoiceNotification extends InvoiceNotification { 24 | 25 | public static ReopenedCreditInvoiceNotification read(final String payload) { 26 | return read(payload, ReopenedCreditInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/UpdatedChargeInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "updated_charge_invoice_notification") 23 | public class UpdatedChargeInvoiceNotification extends InvoiceNotification { 24 | 25 | public static UpdatedChargeInvoiceNotification read(final String payload) { 26 | return read(payload, UpdatedChargeInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/UpdatedCreditInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "updated_credit_invoice_notification") 23 | public class UpdatedCreditInvoiceNotification extends InvoiceNotification { 24 | 25 | public static UpdatedCreditInvoiceNotification read(final String payload) { 26 | return read(payload, UpdatedCreditInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/UpdatedInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "updated_invoice_notification") 23 | public class UpdatedInvoiceNotification extends InvoiceNotification { 24 | 25 | public static UpdatedInvoiceNotification read(final String payload) { 26 | return read(payload, UpdatedInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/invoice/VoidedCreditInvoiceNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2013 Ning, Inc. 3 | * 4 | * Ning licenses this file to you under the Apache License, version 2.0 5 | * (the "License"); you may not use this file except in compliance with the 6 | * License. You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations 14 | * under the License. 15 | */ 16 | 17 | package com.ning.billing.recurly.model.push.invoice; 18 | 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "voided_credit_invoice_notification") 23 | public class VoidedCreditInvoiceNotification extends InvoiceNotification { 24 | 25 | public static VoidedCreditInvoiceNotification read(final String payload) { 26 | return read(payload, VoidedCreditInvoiceNotification.class); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/item/DeactivatedItemNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.item; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "deactivated_item_notification") 23 | public class DeactivatedItemNotification extends ItemNotification { 24 | public static DeactivatedItemNotification read(final String payload) { 25 | return read(payload, DeactivatedItemNotification.class); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/item/ItemNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.item; 19 | 20 | import javax.xml.bind.annotation.XmlElement; 21 | 22 | import com.ning.billing.recurly.model.Item; 23 | import com.ning.billing.recurly.model.push.Notification; 24 | 25 | public class ItemNotification extends Notification { 26 | 27 | @XmlElement(name = "item") 28 | private Item item; 29 | 30 | public Item getItem() { 31 | return item; 32 | } 33 | 34 | public void setItem(final Item item) { 35 | this.item = item; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/item/NewItemNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.item; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "new_item_notification") 23 | public class NewItemNotification extends ItemNotification { 24 | public static NewItemNotification read(final String payload) { 25 | return read(payload, NewItemNotification.class); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/item/ReactivatedItemNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.item; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "reactivated_item_notification") 23 | public class ReactivatedItemNotification extends ItemNotification { 24 | public static ReactivatedItemNotification read(final String payload) { 25 | return read(payload, ReactivatedItemNotification.class); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/item/UpdatedItemNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.item; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "updated_item_notification") 23 | public class UpdatedItemNotification extends ItemNotification { 24 | public static UpdatedItemNotification read(final String payload) { 25 | return read(payload, UpdatedItemNotification.class); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/payment/FailedPaymentNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.payment; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "failed_payment_notification") 23 | public class FailedPaymentNotification extends PaymentNotification { 24 | 25 | public static FailedPaymentNotification read(final String payload) { 26 | return read(payload, FailedPaymentNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/payment/FraudInfoUpdatedNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.payment; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "fraud_info_updated_notification") 23 | public class FraudInfoUpdatedNotification extends PaymentNotification { 24 | 25 | public static FraudInfoUpdatedNotification read(final String payload) { 26 | return read(payload, FraudInfoUpdatedNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/payment/PaymentNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.payment; 19 | 20 | import javax.xml.bind.annotation.XmlElement; 21 | 22 | import com.ning.billing.recurly.model.push.account.AccountNotification; 23 | 24 | public abstract class PaymentNotification extends AccountNotification { 25 | 26 | @XmlElement(name = "transaction") 27 | private PushTransaction transaction; 28 | 29 | public PushTransaction getTransaction() { 30 | return transaction; 31 | } 32 | 33 | public void setTransaction(final PushTransaction transaction) { 34 | this.transaction = transaction; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/payment/ProcessingPaymentNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.payment; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "processing_payment_notification") 23 | public class ProcessingPaymentNotification extends PaymentNotification { 24 | 25 | public static ProcessingPaymentNotification read(final String payload) { 26 | return read(payload, ProcessingPaymentNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/payment/ScheduledPaymentNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.payment; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "scheduled_payment_notification") 23 | public class ScheduledPaymentNotification extends PaymentNotification { 24 | 25 | public static ScheduledPaymentNotification read(final String payload) { 26 | return read(payload, ScheduledPaymentNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/payment/SuccessfulPaymentNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.payment; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "successful_payment_notification") 23 | public class SuccessfulPaymentNotification extends PaymentNotification { 24 | 25 | public static SuccessfulPaymentNotification read(final String payload) { 26 | return read(payload, SuccessfulPaymentNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/payment/SuccessfulRefundNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.payment; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "successful_refund_notification") 23 | public class SuccessfulRefundNotification extends PaymentNotification { 24 | 25 | public static SuccessfulRefundNotification read(final String payload) { 26 | return read(payload, SuccessfulRefundNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/payment/TransactionAuthorizedNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.payment; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "transaction_authorized_notification") 23 | public class TransactionAuthorizedNotification extends PaymentNotification { 24 | 25 | public static TransactionAuthorizedNotification read(final String payload) { 26 | return read(payload, TransactionAuthorizedNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/payment/TransactionStatusUpdatedNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.payment; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "transaction_status_updated_notification") 23 | public class TransactionStatusUpdatedNotification extends PaymentNotification { 24 | 25 | public static TransactionStatusUpdatedNotification read(final String payload) { 26 | return read(payload, TransactionStatusUpdatedNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/payment/VoidPaymentNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.payment; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "void_payment_notification") 23 | public class VoidPaymentNotification extends PaymentNotification { 24 | 25 | public static VoidPaymentNotification read(final String payload) { 26 | return read(payload, VoidPaymentNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/CanceledSubscriptionNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "canceled_subscription_notification") 23 | public class CanceledSubscriptionNotification extends SubscriptionNotification { 24 | 25 | public static CanceledSubscriptionNotification read(final String payload) { 26 | return read(payload, CanceledSubscriptionNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/ExpiredSubscriptionNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "expired_subscription_notification") 23 | public class ExpiredSubscriptionNotification extends SubscriptionNotification { 24 | 25 | public static ExpiredSubscriptionNotification read(final String payload) { 26 | return read(payload, ExpiredSubscriptionNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/LowBalanceGiftCardNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "low_balance_gift_card_notification") 23 | public class LowBalanceGiftCardNotification extends SubscriptionNotification { 24 | public static LowBalanceGiftCardNotification read(final String payload) { 25 | return read(payload, LowBalanceGiftCardNotification.class); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/NewSubscriptionNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "new_subscription_notification") 23 | public class NewSubscriptionNotification extends SubscriptionNotification { 24 | 25 | public static NewSubscriptionNotification read(final String payload) { 26 | return read(payload, NewSubscriptionNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/PausedSubscriptionRenewalNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "paused_subscription_renewal_notification") 23 | public class PausedSubscriptionRenewalNotification extends SubscriptionNotification { 24 | 25 | public static PausedSubscriptionRenewalNotification read(final String payload) { 26 | return read(payload, PausedSubscriptionRenewalNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/ReactivatedAccountNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "reactivated_account_notification") 23 | public class ReactivatedAccountNotification extends SubscriptionNotification { 24 | 25 | public static ReactivatedAccountNotification read(final String payload) { 26 | return read(payload, ReactivatedAccountNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/RenewedSubscriptionNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "renewed_subscription_notification") 23 | public class RenewedSubscriptionNotification extends SubscriptionNotification { 24 | 25 | public static RenewedSubscriptionNotification read(final String payload) { 26 | return read(payload, RenewedSubscriptionNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/ScheduledSubscriptionPauseNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "scheduled_subscription_pause_notification") 23 | public class ScheduledSubscriptionPauseNotification extends SubscriptionNotification { 24 | 25 | public static ScheduledSubscriptionPauseNotification read(final String payload) { 26 | return read(payload, ScheduledSubscriptionPauseNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/SubscriptionNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlElement; 21 | 22 | import com.ning.billing.recurly.model.push.account.AccountNotification; 23 | 24 | public abstract class SubscriptionNotification extends AccountNotification { 25 | 26 | @XmlElement(name = "subscription") 27 | private PushSubscription subscription; 28 | 29 | public PushSubscription getSubscription() { 30 | return subscription; 31 | } 32 | 33 | public void setSubscription(final PushSubscription subscription) { 34 | this.subscription = subscription; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/SubscriptionPausedCanceledNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "subscription_pause_canceled_notification") 23 | public class SubscriptionPausedCanceledNotification extends SubscriptionNotification { 24 | 25 | public static SubscriptionPausedCanceledNotification read(final String payload) { 26 | return read(payload, SubscriptionPausedCanceledNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/SubscriptionPausedModifiedNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "subscription_pause_modified_notification") 23 | public class SubscriptionPausedModifiedNotification extends SubscriptionNotification { 24 | 25 | public static SubscriptionPausedModifiedNotification read(final String payload) { 26 | return read(payload, SubscriptionPausedModifiedNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/SubscriptionPausedNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "subscription_paused_notification") 23 | public class SubscriptionPausedNotification extends SubscriptionNotification { 24 | 25 | public static SubscriptionPausedNotification read(final String payload) { 26 | return read(payload, SubscriptionPausedNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/SubscriptionResumedNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "subscription_resumed_notification") 23 | public class SubscriptionResumedNotification extends SubscriptionNotification { 24 | 25 | public static SubscriptionResumedNotification read(final String payload) { 26 | return read(payload, SubscriptionResumedNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/subscription/UpdatedSubscriptionNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.subscription; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "updated_subscription_notification") 23 | public class UpdatedSubscriptionNotification extends SubscriptionNotification { 24 | 25 | public static UpdatedSubscriptionNotification read(final String payload) { 26 | return read(payload, UpdatedSubscriptionNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/usage/NewUsageNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.usage; 19 | 20 | import javax.xml.bind.annotation.XmlRootElement; 21 | 22 | @XmlRootElement(name = "new_usage_notification") 23 | public class NewUsageNotification extends UsageNotification { 24 | 25 | public static NewUsageNotification read(final String payload) { 26 | return read(payload, NewUsageNotification.class); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/model/push/usage/UsageNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model.push.usage; 19 | 20 | import javax.xml.bind.annotation.XmlElement; 21 | 22 | import com.ning.billing.recurly.model.Usage; 23 | import com.ning.billing.recurly.model.push.account.AccountNotification; 24 | 25 | public abstract class UsageNotification extends AccountNotification { 26 | 27 | @XmlElement(name = "usage") 28 | private Usage usage; 29 | 30 | public Usage getUsage() { 31 | return usage; 32 | } 33 | 34 | public void setUsage(final Usage usage) { 35 | this.usage = usage; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/ning/billing/recurly/util/http/SslUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Groupon, Inc 3 | * Copyright 2014 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.util.http; 19 | 20 | 21 | import java.security.KeyManagementException; 22 | import java.security.NoSuchAlgorithmException; 23 | import javax.net.ssl.SSLContext; 24 | 25 | public class SslUtils { 26 | 27 | private static final String TLS_PROTOCOL_KEY = "killbill.payment.recurly.tlsProtocol"; 28 | private static final String TLS_PROTOCOL_DEFAULT = "TLSv1.2"; 29 | private SSLContext context; 30 | 31 | private static class SingletonHolder { 32 | public static final SslUtils instance = new SslUtils(); 33 | } 34 | 35 | public static SslUtils getInstance() { 36 | return SingletonHolder.instance; 37 | } 38 | 39 | public SSLContext getSSLContext() throws NoSuchAlgorithmException, KeyManagementException { 40 | if (context != null) return this.context; 41 | 42 | final String protocol = System.getProperty(TLS_PROTOCOL_KEY, TLS_PROTOCOL_DEFAULT); 43 | context = SSLContext.getInstance(protocol); 44 | context.init(null, null, null); 45 | 46 | return context; 47 | } 48 | } -------------------------------------------------------------------------------- /src/test/java/com/ning/billing/recurly/TestPaginationUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly; 19 | 20 | import org.testng.Assert; 21 | import org.testng.annotations.Test; 22 | 23 | public class TestPaginationUtils { 24 | 25 | @Test(groups = "fast") 26 | public void testParserNext() throws Exception { 27 | final String linkHeader = "; rel=\"next\""; 28 | final String[] links = PaginationUtils.getLinks(linkHeader); 29 | Assert.assertNull(links[0]); 30 | Assert.assertEquals(links[1], "https://your-subdomain.recurly.com/v2/accounts?cursor=1304958672"); 31 | } 32 | 33 | @Test(groups = "fast") 34 | public void testParserAll() throws Exception { 35 | final String linkHeader = "; rel=\"start\",\n" + 36 | " ; rel=\"next\""; 37 | final String[] links = PaginationUtils.getLinks(linkHeader); 38 | Assert.assertEquals(links[0], "https://your-subdomain.recurly.com/v2/transactions"); 39 | Assert.assertEquals(links[1], "https://your-subdomain.recurly.com/v2/transactions?cursor=1318388868"); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/test/java/com/ning/billing/recurly/model/TestAddress.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import com.ning.billing.recurly.TestUtils; 21 | import org.joda.time.DateTime; 22 | import org.testng.Assert; 23 | import org.testng.annotations.Test; 24 | 25 | import static org.testng.Assert.assertEquals; 26 | import static org.testng.Assert.assertNotEquals; 27 | 28 | public class TestAddress extends TestModelBase { 29 | 30 | @Test(groups = "fast") 31 | public void testHashCodeAndEquality() throws Exception { 32 | // create addresses of the same value but difference references 33 | Address address = TestUtils.createRandomAddress(0); 34 | Address otherAddress = TestUtils.createRandomAddress(0); 35 | 36 | assertNotEquals(System.identityHashCode(address), System.identityHashCode(otherAddress)); 37 | assertEquals(address.hashCode(), otherAddress.hashCode()); 38 | assertEquals(address, otherAddress); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/test/java/com/ning/billing/recurly/model/TestCustomField.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import com.ning.billing.recurly.TestUtils; 21 | import org.testng.Assert; 22 | import org.testng.annotations.Test; 23 | 24 | import static org.testng.Assert.assertEquals; 25 | import static org.testng.Assert.assertNotEquals; 26 | 27 | public class TestCustomField extends TestModelBase { 28 | 29 | @Test(groups = "fast") 30 | public void testHashCodeAndEquality() throws Exception { 31 | // create addresses of the same value but difference references 32 | CustomField field = TestUtils.createRandomCustomField("field_name", 0); 33 | CustomField otherField = TestUtils.createRandomCustomField("field_name", 0); 34 | 35 | assertNotEquals(System.identityHashCode(field), System.identityHashCode(otherField)); 36 | assertEquals(field.hashCode(), otherField.hashCode()); 37 | assertEquals(field, otherField); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/test/java/com/ning/billing/recurly/model/TestModelBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2014 Ning, Inc. 3 | * Copyright 2014-2015 The Billing Project, LLC 4 | * 5 | * The Billing Project licenses this file to you under the Apache License, version 2.0 6 | * (the "License"); you may not use this file except in compliance with the 7 | * License. You may obtain a copy of the License at: 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 | * License for the specific language governing permissions and limitations 15 | * under the License. 16 | */ 17 | 18 | package com.ning.billing.recurly.model; 19 | 20 | import org.testng.annotations.BeforeMethod; 21 | 22 | import com.fasterxml.jackson.dataformat.xml.XmlMapper; 23 | 24 | public abstract class TestModelBase { 25 | 26 | protected XmlMapper xmlMapper; 27 | 28 | @BeforeMethod(alwaysRun = true) 29 | public void setUp() throws Exception { 30 | xmlMapper = RecurlyObject.newXmlMapper(); 31 | } 32 | } 33 | --------------------------------------------------------------------------------