recurly 3.0.0.beta.2 → 3.0.0.beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.md +1 -1
  4. data/lib/recurly/client.rb +39 -37
  5. data/lib/recurly/client/adapter.rb +46 -0
  6. data/lib/recurly/client/operations.rb +626 -170
  7. data/lib/recurly/errors.rb +1 -1
  8. data/lib/recurly/requests/{create_account.rb → account_create.rb} +5 -1
  9. data/lib/recurly/requests/{account_updatable.rb → account_update.rb} +5 -1
  10. data/lib/recurly/requests/add_on_create.rb +2 -2
  11. data/lib/recurly/requests/add_on_update.rb +2 -2
  12. data/lib/recurly/requests/coupon_bulk_create.rb +10 -0
  13. data/lib/recurly/requests/{create_coupon.rb → coupon_create.rb} +3 -3
  14. data/lib/recurly/requests/coupon_redemption_create.rb +14 -0
  15. data/lib/recurly/requests/{update_coupon.rb → coupon_update.rb} +1 -1
  16. data/lib/recurly/requests/invoice_refund.rb +2 -2
  17. data/lib/recurly/requests/line_item_refund.rb +18 -0
  18. data/lib/recurly/requests/plan_create.rb +8 -4
  19. data/lib/recurly/requests/plan_update.rb +8 -12
  20. data/lib/recurly/requests/subscription_add_on_create.rb +0 -4
  21. data/lib/recurly/requests/subscription_create.rb +21 -9
  22. data/lib/recurly/requests/subscription_pause.rb +10 -0
  23. data/lib/recurly/requests/subscription_update.rb +16 -4
  24. data/lib/recurly/resources/account.rb +4 -0
  25. data/lib/recurly/resources/account_acquisition.rb +2 -2
  26. data/lib/recurly/resources/account_balance.rb +2 -2
  27. data/lib/recurly/resources/add_on.rb +2 -2
  28. data/lib/recurly/resources/coupon.rb +2 -2
  29. data/lib/recurly/resources/coupon_discount.rb +2 -2
  30. data/lib/recurly/resources/coupon_redemption_mini.rb +2 -2
  31. data/lib/recurly/resources/credit_payment.rb +6 -6
  32. data/lib/recurly/resources/custom_field.rb +14 -0
  33. data/lib/recurly/resources/custom_field_definition.rb +46 -0
  34. data/lib/recurly/resources/error.rb +2 -2
  35. data/lib/recurly/resources/error_may_have_transaction.rb +2 -2
  36. data/lib/recurly/resources/invoice.rb +4 -4
  37. data/lib/recurly/resources/line_item.rb +3 -3
  38. data/lib/recurly/resources/line_item_list.rb +22 -0
  39. data/lib/recurly/resources/plan.rb +6 -2
  40. data/lib/recurly/resources/subscription.rb +37 -5
  41. data/lib/recurly/resources/subscription_add_on.rb +2 -2
  42. data/lib/recurly/resources/subscription_change.rb +2 -2
  43. data/lib/recurly/resources/transaction.rb +6 -6
  44. data/lib/recurly/version.rb +1 -1
  45. data/recurly.gemspec +1 -0
  46. metadata +28 -21
  47. data/bin/bundle +0 -105
  48. data/bin/coderay +0 -29
  49. data/bin/console +0 -14
  50. data/bin/htmldiff +0 -29
  51. data/bin/ldiff +0 -29
  52. data/bin/pry +0 -29
  53. data/bin/rake +0 -29
  54. data/bin/rspec +0 -29
  55. data/bin/setup +0 -8
  56. data/bin/yard +0 -29
  57. data/bin/yardoc +0 -29
  58. data/bin/yri +0 -29
  59. data/lib/recurly/requests/account_create_only.rb +0 -18
  60. data/lib/recurly/requests/coupon_create_only.rb +0 -66
  61. data/lib/recurly/requests/coupon_updatable.rb +0 -30
@@ -18,7 +18,7 @@ module Recurly
18
18
  end
19
19
 
20
20
  def initialize(response, error)
21
- super("#{self.class.name}: #{error.message}")
21
+ super(error.message)
22
22
  @response = response
23
23
  @recurly_error = error
24
24
  end
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Requests
3
- class CreateAccount < Request
3
+ class AccountCreate < Request
4
4
 
5
5
  # @!attribute acquisition
6
6
  # @return [AccountAcquisitionUpdatable]
@@ -26,6 +26,10 @@ module Recurly
26
26
  # @return [String]
27
27
  define_attribute :company, String
28
28
 
29
+ # @!attribute custom_fields
30
+ # @return [Array[CustomField]]
31
+ define_attribute :custom_fields, Array, {:item_type => :CustomField}
32
+
29
33
  # @!attribute email
30
34
  # @return [String] The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
31
35
  define_attribute :email, String
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Requests
3
- class AccountUpdatable < Request
3
+ class AccountUpdate < Request
4
4
 
5
5
  # @!attribute address
6
6
  # @return [Address]
@@ -18,6 +18,10 @@ module Recurly
18
18
  # @return [String]
19
19
  define_attribute :company, String
20
20
 
21
+ # @!attribute custom_fields
22
+ # @return [Array[CustomField]]
23
+ define_attribute :custom_fields, Array, {:item_type => :CustomField}
24
+
21
25
  # @!attribute email
22
26
  # @return [String] The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
23
27
  define_attribute :email, String
@@ -11,8 +11,8 @@ module Recurly
11
11
  define_attribute :code, String
12
12
 
13
13
  # @!attribute currencies
14
- # @return [Array[String]] Add-on pricing
15
- define_attribute :currencies, Array, {:item_type => String}
14
+ # @return [Array[Hash]] Add-on pricing
15
+ define_attribute :currencies, Array, {:item_type => Hash}
16
16
 
17
17
  # @!attribute default_quantity
18
18
  # @return [Integer] Default quantity for the hosted pages.
@@ -11,8 +11,8 @@ module Recurly
11
11
  define_attribute :code, String
12
12
 
13
13
  # @!attribute currencies
14
- # @return [Array[String]] Add-on pricing
15
- define_attribute :currencies, Array, {:item_type => String}
14
+ # @return [Array[Hash]] Add-on pricing
15
+ define_attribute :currencies, Array, {:item_type => Hash}
16
16
 
17
17
  # @!attribute default_quantity
18
18
  # @return [Integer] Default quantity for the hosted pages.
@@ -0,0 +1,10 @@
1
+ module Recurly
2
+ module Requests
3
+ class CouponBulkCreate < Request
4
+
5
+ # @!attribute number_of_unique_codes
6
+ # @return [Integer] The quantity of unique coupon codes to generate
7
+ define_attribute :number_of_unique_codes, Integer
8
+ end
9
+ end
10
+ end
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Requests
3
- class CreateCoupon < Request
3
+ class CouponCreate < Request
4
4
 
5
5
  # @!attribute applies_to_all_plans
6
6
  # @return [Boolean] The coupon is valid for all plans if true. If false then `plans` and `plans_names` will list the applicable plans.
@@ -19,8 +19,8 @@ module Recurly
19
19
  define_attribute :coupon_type, String, {:enum => ["single_code", "bulk"]}
20
20
 
21
21
  # @!attribute currencies
22
- # @return [Array[String]] Fixed discount currencies by currency. Required if the coupon type is `fixed`. This parameter should contain the coupon discount values
23
- define_attribute :currencies, Array, {:item_type => String}
22
+ # @return [Array[Hash]] Fixed discount currencies by currency. Required if the coupon type is `fixed`. This parameter should contain the coupon discount values
23
+ define_attribute :currencies, Array, {:item_type => Hash}
24
24
 
25
25
  # @!attribute discount_percent
26
26
  # @return [Integer] The percent of the price discounted by the coupon. Required if `discount_type` is `percent`.
@@ -0,0 +1,14 @@
1
+ module Recurly
2
+ module Requests
3
+ class CouponRedemptionCreate < Request
4
+
5
+ # @!attribute coupon_id
6
+ # @return [String] Coupon ID
7
+ define_attribute :coupon_id, String
8
+
9
+ # @!attribute currency
10
+ # @return [String] 3-letter ISO 4217 currency code.
11
+ define_attribute :currency, String
12
+ end
13
+ end
14
+ end
@@ -1,6 +1,6 @@
1
1
  module Recurly
2
2
  module Requests
3
- class UpdateCoupon < Request
3
+ class CouponUpdate < Request
4
4
 
5
5
  # @!attribute hosted_description
6
6
  # @return [String] This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page.
@@ -15,8 +15,8 @@ module Recurly
15
15
  define_attribute :external_refund, Hash
16
16
 
17
17
  # @!attribute line_items
18
- # @return [Array[String]] The line items to be refunded. This is required when `type=line_items`.
19
- define_attribute :line_items, Array, {:item_type => String}
18
+ # @return [Array[LineItemRefund]] The line items to be refunded. This is required when `type=line_items`.
19
+ define_attribute :line_items, Array, {:item_type => :LineItemRefund}
20
20
 
21
21
  # @!attribute refund_method
22
22
  # @return [String] Indicates how the invoice should be refunded when both a credit and transaction are present on the invoice: - `transaction_first` – Refunds the transaction first, then any amount is issued as credit back to the account. Default value when Credit Invoices feature is enabled. - `credit_first` – Issues credit back to the account first, then refunds any remaining amount back to the transaction. Default value when Credit Invoices feature is not enabled. - `all_credit` – Issues credit to the account for the entire amount of the refund. Only available when the Credit Invoices feature is enabled. - `all_transaction` – Refunds the entire amount back to transactions, using transactions from previous invoices if necessary. Only available when the Credit Invoices feature is enabled.
@@ -0,0 +1,18 @@
1
+ module Recurly
2
+ module Requests
3
+ class LineItemRefund < Request
4
+
5
+ # @!attribute id
6
+ # @return [String] Line item ID
7
+ define_attribute :id, String
8
+
9
+ # @!attribute prorate
10
+ # @return [Boolean] Set to `true` if the line item should be prorated; set to `false` if not. This can only be used on line items that have a start and end date.
11
+ define_attribute :prorate, :Boolean
12
+
13
+ # @!attribute quantity
14
+ # @return [Integer] Line item quantity to be refunded.
15
+ define_attribute :quantity, Integer
16
+ end
17
+ end
18
+ end
@@ -7,16 +7,20 @@ module Recurly
7
7
  define_attribute :accounting_code, String
8
8
 
9
9
  # @!attribute add_ons
10
- # @return [Array[String]] Add Ons
11
- define_attribute :add_ons, Array, {:item_type => String}
10
+ # @return [Array[AddOnCreate]] Add Ons
11
+ define_attribute :add_ons, Array, {:item_type => :AddOnCreate}
12
+
13
+ # @!attribute auto_renew
14
+ # @return [Boolean] Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself.
15
+ define_attribute :auto_renew, :Boolean
12
16
 
13
17
  # @!attribute code
14
18
  # @return [String] Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
15
19
  define_attribute :code, String
16
20
 
17
21
  # @!attribute currencies
18
- # @return [Array[String]] Pricing
19
- define_attribute :currencies, Array, {:item_type => String}
22
+ # @return [Array[Hash]] Pricing
23
+ define_attribute :currencies, Array, {:item_type => Hash}
20
24
 
21
25
  # @!attribute description
22
26
  # @return [String] Optional description, not displayed.
@@ -7,16 +7,20 @@ module Recurly
7
7
  define_attribute :accounting_code, String
8
8
 
9
9
  # @!attribute add_ons
10
- # @return [Array[String]] Add Ons
11
- define_attribute :add_ons, Array, {:item_type => String}
10
+ # @return [Array[AddOnCreate]] Add Ons
11
+ define_attribute :add_ons, Array, {:item_type => :AddOnCreate}
12
+
13
+ # @!attribute auto_renew
14
+ # @return [Boolean] Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself.
15
+ define_attribute :auto_renew, :Boolean
12
16
 
13
17
  # @!attribute code
14
18
  # @return [String] Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
15
19
  define_attribute :code, String
16
20
 
17
21
  # @!attribute currencies
18
- # @return [Array[String]] Pricing
19
- define_attribute :currencies, Array, {:item_type => String}
22
+ # @return [Array[Hash]] Pricing
23
+ define_attribute :currencies, Array, {:item_type => Hash}
20
24
 
21
25
  # @!attribute description
22
26
  # @return [String] Optional description, not displayed.
@@ -30,14 +34,6 @@ module Recurly
30
34
  # @return [String] Plan ID
31
35
  define_attribute :id, String, {:read_only => true}
32
36
 
33
- # @!attribute interval_length
34
- # @return [Integer] Length of the plan's billing interval in `interval_unit`.
35
- define_attribute :interval_length, Integer
36
-
37
- # @!attribute interval_unit
38
- # @return [String] Unit for the plan's billing interval.
39
- define_attribute :interval_unit, String, {:enum => ["days", "months"]}
40
-
41
37
  # @!attribute name
42
38
  # @return [String] This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
43
39
  define_attribute :name, String
@@ -6,10 +6,6 @@ module Recurly
6
6
  # @return [String] Add-on code
7
7
  define_attribute :code, String
8
8
 
9
- # @!attribute id
10
- # @return [String] Id of an existing subscription add on.
11
- define_attribute :id, String
12
-
13
9
  # @!attribute quantity
14
10
  # @return [Integer] Optionally override the default quantity.
15
11
  define_attribute :quantity, Integer
@@ -3,12 +3,16 @@ module Recurly
3
3
  class SubscriptionCreate < Request
4
4
 
5
5
  # @!attribute account
6
- # @return [Hash] Account
7
- define_attribute :account, Hash
6
+ # @return [AccountCreate]
7
+ define_attribute :account, :AccountCreate
8
8
 
9
9
  # @!attribute add_ons
10
- # @return [Array[String]] Add-ons
11
- define_attribute :add_ons, Array, {:item_type => String}
10
+ # @return [Array[SubscriptionAddOnCreate]] Add-ons
11
+ define_attribute :add_ons, Array, {:item_type => :SubscriptionAddOnCreate}
12
+
13
+ # @!attribute auto_renew
14
+ # @return [Boolean] Whether the subscription renews at the end of its term.
15
+ define_attribute :auto_renew, :Boolean
12
16
 
13
17
  # @!attribute collection_method
14
18
  # @return [String] Collection method
@@ -26,18 +30,22 @@ module Recurly
26
30
  # @return [String] 3-letter ISO 4217 currency code.
27
31
  define_attribute :currency, String
28
32
 
33
+ # @!attribute custom_fields
34
+ # @return [Array[CustomField]]
35
+ define_attribute :custom_fields, Array, {:item_type => :CustomField}
36
+
29
37
  # @!attribute customer_notes
30
38
  # @return [String] This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals.
31
39
  define_attribute :customer_notes, String
32
40
 
33
- # @!attribute first_renewal_date
34
- # @return [DateTime] If set,indicates when the first renewal should occur. Subsequent renewals will be offset from this date. The first invoice will be prorated appropriately so that the customer only pays for the portion of the first billing period for which the subscription applies. Useful for forcing a subscription to renew on the first of the month.
35
- define_attribute :first_renewal_date, DateTime
36
-
37
41
  # @!attribute net_terms
38
42
  # @return [Integer] Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
39
43
  define_attribute :net_terms, Integer
40
44
 
45
+ # @!attribute next_bill_date
46
+ # @return [DateTime] If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. The initial invoice will be prorated for the period between the subscription's activation date and the billing period end date. Subsequent periods will be based off the plan interval. For a subscription with a trial period, this will change when the trial expires.
47
+ define_attribute :next_bill_date, DateTime
48
+
41
49
  # @!attribute plan_code
42
50
  # @return [String] Plan code
43
51
  define_attribute :plan_code, String
@@ -54,6 +62,10 @@ module Recurly
54
62
  # @return [Integer] Optionally override the default quantity of 1.
55
63
  define_attribute :quantity, Integer
56
64
 
65
+ # @!attribute renewal_billing_cycles
66
+ # @return [Integer] If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
67
+ define_attribute :renewal_billing_cycles, Integer
68
+
57
69
  # @!attribute shipping_address
58
70
  # @return [Hash] Create a shipping address on the account and assign it to the subscription.
59
71
  define_attribute :shipping_address, Hash
@@ -71,7 +83,7 @@ module Recurly
71
83
  define_attribute :terms_and_conditions, String
72
84
 
73
85
  # @!attribute total_billing_cycles
74
- # @return [Integer] Renews the subscription for a specified number of total cycles, then automatically cancels. Defaults to the subscription renewing indefinitely.
86
+ # @return [Integer] The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire.
75
87
  define_attribute :total_billing_cycles, Integer
76
88
 
77
89
  # @!attribute trial_ends_at
@@ -0,0 +1,10 @@
1
+ module Recurly
2
+ module Requests
3
+ class SubscriptionPause < Request
4
+
5
+ # @!attribute remaining_pause_cycles
6
+ # @return [Integer] Number of billing cycles to pause the subscriptions.
7
+ define_attribute :remaining_pause_cycles, Integer
8
+ end
9
+ end
10
+ end
@@ -2,10 +2,18 @@ module Recurly
2
2
  module Requests
3
3
  class SubscriptionUpdate < Request
4
4
 
5
+ # @!attribute auto_renew
6
+ # @return [Boolean] Whether the subscription renews at the end of its term.
7
+ define_attribute :auto_renew, :Boolean
8
+
5
9
  # @!attribute collection_method
6
10
  # @return [String] Change collection method
7
11
  define_attribute :collection_method, String, {:enum => ["automatic", "manual"]}
8
12
 
13
+ # @!attribute custom_fields
14
+ # @return [Array[CustomField]]
15
+ define_attribute :custom_fields, Array, {:item_type => :CustomField}
16
+
9
17
  # @!attribute customer_notes
10
18
  # @return [String] Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals.
11
19
  define_attribute :customer_notes, String
@@ -14,18 +22,22 @@ module Recurly
14
22
  # @return [Integer] Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
15
23
  define_attribute :net_terms, Integer
16
24
 
17
- # @!attribute next_renewal_at
18
- # @return [DateTime] For an active subscription, this will change the next renewal date. For a subscription in a trial period, modifying the renewal date will change when the trial expires.
19
- define_attribute :next_renewal_at, DateTime
25
+ # @!attribute next_bill_date
26
+ # @return [DateTime] If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. For a subscription in a trial period, this will change when the trial expires.
27
+ define_attribute :next_bill_date, DateTime
20
28
 
21
29
  # @!attribute po_number
22
30
  # @return [String] For manual invoicing, this identifies the PO number associated with the subscription.
23
31
  define_attribute :po_number, String
24
32
 
25
33
  # @!attribute remaining_billing_cycles
26
- # @return [Integer] Renews the subscription for a specified number of cycles, then automatically cancels.
34
+ # @return [Integer] The remaining billing cycles in the current term.
27
35
  define_attribute :remaining_billing_cycles, Integer
28
36
 
37
+ # @!attribute renewal_billing_cycles
38
+ # @return [Integer] If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
39
+ define_attribute :renewal_billing_cycles, Integer
40
+
29
41
  # @!attribute shipping_address
30
42
  # @return [Hash] Create a shipping address on the account and assign it to the subscription. If this and `shipping_address_id` are both present, `shipping_address_id` will take precedence."
31
43
  define_attribute :shipping_address, Hash
@@ -26,6 +26,10 @@ module Recurly
26
26
  # @return [DateTime] When the account was created.
27
27
  define_attribute :created_at, DateTime, {:read_only => true}
28
28
 
29
+ # @!attribute custom_fields
30
+ # @return [Array[CustomField]]
31
+ define_attribute :custom_fields, Array, {:item_type => :CustomField}
32
+
29
33
  # @!attribute [r] deleted_at
30
34
  # @return [DateTime] If present, when the account was last marked inactive.
31
35
  define_attribute :deleted_at, DateTime, {:read_only => true}
@@ -3,8 +3,8 @@ module Recurly
3
3
  class AccountAcquisition < Resource
4
4
 
5
5
  # @!attribute account
6
- # @return [Account]
7
- define_attribute :account, :Account
6
+ # @return [AccountMini]
7
+ define_attribute :account, :AccountMini
8
8
 
9
9
  # @!attribute campaign
10
10
  # @return [String] An arbitrary identifier for the marketing campaign that led to the acquisition of this account.
@@ -3,8 +3,8 @@ module Recurly
3
3
  class AccountBalance < Resource
4
4
 
5
5
  # @!attribute account
6
- # @return [Account]
7
- define_attribute :account, :Account
6
+ # @return [AccountMini]
7
+ define_attribute :account, :AccountMini
8
8
 
9
9
  # @!attribute balances
10
10
  # @return [Hash] Account balance
@@ -15,8 +15,8 @@ module Recurly
15
15
  define_attribute :created_at, DateTime, {:read_only => true}
16
16
 
17
17
  # @!attribute currencies
18
- # @return [Array[String]] Add-on pricing
19
- define_attribute :currencies, Array, {:item_type => String}
18
+ # @return [Array[Hash]] Add-on pricing
19
+ define_attribute :currencies, Array, {:item_type => Hash}
20
20
 
21
21
  # @!attribute default_quantity
22
22
  # @return [Integer] Default quantity for the hosted pages.
@@ -71,8 +71,8 @@ module Recurly
71
71
  define_attribute :object, String, {:read_only => true}
72
72
 
73
73
  # @!attribute plans
74
- # @return [Array[String]] Plans
75
- define_attribute :plans, Array, {:item_type => String}
74
+ # @return [Array[PlanMini]] Plans
75
+ define_attribute :plans, Array, {:item_type => :PlanMini}
76
76
 
77
77
  # @!attribute plans_names
78
78
  # @return [Array[String]] TODO
@@ -3,8 +3,8 @@ module Recurly
3
3
  class CouponDiscount < Resource
4
4
 
5
5
  # @!attribute currencies
6
- # @return [Array[String]] This is only present when `type=fixed`.
7
- define_attribute :currencies, Array, {:item_type => String}
6
+ # @return [Array[Hash]] This is only present when `type=fixed`.
7
+ define_attribute :currencies, Array, {:item_type => Hash}
8
8
 
9
9
  # @!attribute percent
10
10
  # @return [Integer] This is only present when `type=percent`.
@@ -3,8 +3,8 @@ module Recurly
3
3
  class CouponRedemptionMini < Resource
4
4
 
5
5
  # @!attribute coupon
6
- # @return [Coupon]
7
- define_attribute :coupon, :Coupon
6
+ # @return [CouponMini]
7
+ define_attribute :coupon, :CouponMini
8
8
 
9
9
  # @!attribute [r] created_at
10
10
  # @return [DateTime] Created at
@@ -3,8 +3,8 @@ module Recurly
3
3
  class CreditPayment < Resource
4
4
 
5
5
  # @!attribute account
6
- # @return [Account]
7
- define_attribute :account, :Account
6
+ # @return [AccountMini]
7
+ define_attribute :account, :AccountMini
8
8
 
9
9
  # @!attribute action
10
10
  # @return [String] The action for which the credit was created.
@@ -15,8 +15,8 @@ module Recurly
15
15
  define_attribute :amount, Float
16
16
 
17
17
  # @!attribute applied_to_invoice
18
- # @return [Invoice]
19
- define_attribute :applied_to_invoice, :Invoice
18
+ # @return [InvoiceMini]
19
+ define_attribute :applied_to_invoice, :InvoiceMini
20
20
 
21
21
  # @!attribute [r] created_at
22
22
  # @return [DateTime] Created at
@@ -39,8 +39,8 @@ module Recurly
39
39
  define_attribute :original_credit_payment_id, String
40
40
 
41
41
  # @!attribute original_invoice
42
- # @return [Invoice]
43
- define_attribute :original_invoice, :Invoice
42
+ # @return [InvoiceMini]
43
+ define_attribute :original_invoice, :InvoiceMini
44
44
 
45
45
  # @!attribute refund_transaction
46
46
  # @return [Transaction]