recurly 3.0.0.beta.4 → 3.0.0.beta.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +3 -1
  4. data/Gemfile +1 -1
  5. data/README.md +1 -1
  6. data/lib/recurly.rb +6 -2
  7. data/lib/recurly/client.rb +31 -26
  8. data/lib/recurly/client/adapter.rb +4 -2
  9. data/lib/recurly/client/operations.rb +118 -8
  10. data/lib/recurly/errors.rb +1 -1
  11. data/lib/recurly/pager.rb +3 -3
  12. data/lib/recurly/requests/account_acquisition_updatable.rb +1 -1
  13. data/lib/recurly/requests/account_create.rb +2 -2
  14. data/lib/recurly/requests/account_purchase.rb +86 -0
  15. data/lib/recurly/requests/account_update.rb +2 -2
  16. data/lib/recurly/requests/add_on_create.rb +3 -3
  17. data/lib/recurly/requests/add_on_update.rb +3 -3
  18. data/lib/recurly/requests/coupon_create.rb +6 -6
  19. data/lib/recurly/requests/external_refund.rb +1 -1
  20. data/lib/recurly/requests/invoice_create.rb +2 -2
  21. data/lib/recurly/requests/invoice_refund.rb +2 -2
  22. data/lib/recurly/requests/line_item_create.rb +3 -3
  23. data/lib/recurly/requests/plan_create.rb +3 -3
  24. data/lib/recurly/requests/plan_update.rb +4 -4
  25. data/lib/recurly/requests/purchase_create.rb +74 -0
  26. data/lib/recurly/requests/shipping_address_update.rb +2 -2
  27. data/lib/recurly/requests/subscription_change_create.rb +2 -2
  28. data/lib/recurly/requests/subscription_create.rb +1 -1
  29. data/lib/recurly/requests/subscription_purchase.rb +58 -0
  30. data/lib/recurly/requests/subscription_shipping_purchase.rb +22 -0
  31. data/lib/recurly/requests/subscription_update.rb +2 -2
  32. data/lib/recurly/resources/account.rb +18 -18
  33. data/lib/recurly/resources/account_acquisition.rb +9 -9
  34. data/lib/recurly/resources/account_balance.rb +2 -2
  35. data/lib/recurly/resources/account_mini.rb +4 -4
  36. data/lib/recurly/resources/account_note.rb +6 -6
  37. data/lib/recurly/resources/add_on.rb +15 -15
  38. data/lib/recurly/resources/add_on_mini.rb +4 -4
  39. data/lib/recurly/resources/billing_info.rb +16 -16
  40. data/lib/recurly/resources/billing_info_payment_method.rb +1 -1
  41. data/lib/recurly/resources/coupon.rb +16 -16
  42. data/lib/recurly/resources/coupon_discount.rb +1 -1
  43. data/lib/recurly/resources/coupon_discount_trial.rb +1 -1
  44. data/lib/recurly/resources/coupon_mini.rb +6 -6
  45. data/lib/recurly/resources/coupon_redemption.rb +12 -12
  46. data/lib/recurly/resources/coupon_redemption_mini.rb +7 -7
  47. data/lib/recurly/resources/credit_payment.rb +7 -7
  48. data/lib/recurly/resources/custom_field_definition.rb +12 -12
  49. data/lib/recurly/resources/error.rb +1 -1
  50. data/lib/recurly/resources/error_may_have_transaction.rb +1 -1
  51. data/lib/recurly/resources/fraud_info.rb +1 -1
  52. data/lib/recurly/resources/invoice.rb +12 -12
  53. data/lib/recurly/resources/invoice_mini.rb +2 -2
  54. data/lib/recurly/resources/line_item.rb +6 -6
  55. data/lib/recurly/resources/plan.rb +15 -15
  56. data/lib/recurly/resources/plan_mini.rb +4 -4
  57. data/lib/recurly/resources/settings.rb +6 -6
  58. data/lib/recurly/resources/shipping_address.rb +8 -8
  59. data/lib/recurly/resources/site.rb +16 -16
  60. data/lib/recurly/resources/subscription.rb +2 -2
  61. data/lib/recurly/resources/subscription_change.rb +8 -8
  62. data/lib/recurly/resources/transaction.rb +8 -8
  63. data/lib/recurly/resources/transaction_payment_method.rb +2 -2
  64. data/lib/recurly/resources/unique_coupon_code.rb +11 -11
  65. data/lib/recurly/resources/user.rb +8 -8
  66. data/lib/recurly/schema.rb +5 -6
  67. data/lib/recurly/schema/json_deserializer.rb +5 -4
  68. data/lib/recurly/schema/json_parser.rb +4 -4
  69. data/lib/recurly/schema/request_caster.rb +4 -4
  70. data/lib/recurly/schema/schema_factory.rb +1 -1
  71. data/lib/recurly/schema/schema_validator.rb +1 -2
  72. data/lib/recurly/version.rb +1 -1
  73. data/recurly.gemspec +12 -11
  74. data/scripts/format +6 -0
  75. data/scripts/test +12 -1
  76. metadata +22 -5
  77. data/scripts/check-deps +0 -28
  78. data/scripts/install-deps +0 -44
@@ -8,7 +8,7 @@ module Recurly
8
8
 
9
9
  # @!attribute card_type
10
10
  # @return [String] Visa, MasterCard, American Express, Discover, JCB, etc.
11
- define_attribute :card_type, String, { :enum => ["American Express", "Dankort", "Diners Club", "Discover", "Forbrugsforeningen", "JCB", "Laser", "Maestro", "MasterCard", "Test Card", "Unknown", "Visa"] }
11
+ define_attribute :card_type, String
12
12
 
13
13
  # @!attribute exp_month
14
14
  # @return [Integer] Expiration month.
@@ -20,11 +20,11 @@ module Recurly
20
20
 
21
21
  # @!attribute coupon_type
22
22
  # @return [String] Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint.
23
- define_attribute :coupon_type, String, { :enum => ["single_code", "bulk"] }
23
+ define_attribute :coupon_type, String
24
24
 
25
- # @!attribute [r] created_at
25
+ # @!attribute created_at
26
26
  # @return [DateTime] Created at
27
- define_attribute :created_at, DateTime, { :read_only => true }
27
+ define_attribute :created_at, DateTime
28
28
 
29
29
  # @!attribute discount
30
30
  # @return [CouponDiscount]
@@ -32,7 +32,7 @@ module Recurly
32
32
 
33
33
  # @!attribute duration
34
34
  # @return [String] - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes.
35
- define_attribute :duration, String, { :enum => ["forever", "single_use", "temporal"] }
35
+ define_attribute :duration, String
36
36
 
37
37
  # @!attribute expired_at
38
38
  # @return [DateTime] The date and time the coupon was expired early or reached its `max_redemptions`.
@@ -44,15 +44,15 @@ module Recurly
44
44
 
45
45
  # @!attribute free_trial_unit
46
46
  # @return [String] Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for.
47
- define_attribute :free_trial_unit, String, { :enum => ["day", "week", "month"] }
47
+ define_attribute :free_trial_unit, String
48
48
 
49
49
  # @!attribute hosted_page_description
50
50
  # @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.
51
51
  define_attribute :hosted_page_description, String
52
52
 
53
- # @!attribute [r] id
53
+ # @!attribute id
54
54
  # @return [String] Coupon ID
55
- define_attribute :id, String, { :read_only => true }
55
+ define_attribute :id, String
56
56
 
57
57
  # @!attribute invoice_description
58
58
  # @return [String] Description of the coupon on the invoice.
@@ -70,9 +70,9 @@ module Recurly
70
70
  # @return [String] The internal name for the coupon.
71
71
  define_attribute :name, String
72
72
 
73
- # @!attribute [r] object
73
+ # @!attribute object
74
74
  # @return [String] Object type
75
- define_attribute :object, String, { :read_only => true }
75
+ define_attribute :object, String
76
76
 
77
77
  # @!attribute plans
78
78
  # @return [Array[PlanMini]] Plans
@@ -88,11 +88,11 @@ module Recurly
88
88
 
89
89
  # @!attribute redemption_resource
90
90
  # @return [String] Whether the discount is for all eligible charges on the account, or only a specific subscription.
91
- define_attribute :redemption_resource, String, { :enum => ["account", "subscription"] }
91
+ define_attribute :redemption_resource, String
92
92
 
93
93
  # @!attribute state
94
94
  # @return [String] Indicates if the coupon is redeemable, and if it is not, why.
95
- define_attribute :state, String, { :enum => ["redeemable", "maxed_out", "expired"] }
95
+ define_attribute :state, String
96
96
 
97
97
  # @!attribute temporal_amount
98
98
  # @return [Integer] If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for.
@@ -100,19 +100,19 @@ module Recurly
100
100
 
101
101
  # @!attribute temporal_unit
102
102
  # @return [String] If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for.
103
- define_attribute :temporal_unit, String, { :enum => ["day", "week", "month", "year"] }
103
+ define_attribute :temporal_unit, String
104
104
 
105
105
  # @!attribute unique_code_template
106
106
  # @return [String] On a bulk coupon, the template from which unique coupon codes are generated.
107
107
  define_attribute :unique_code_template, String
108
108
 
109
- # @!attribute [r] unique_coupon_codes_count
109
+ # @!attribute unique_coupon_codes_count
110
110
  # @return [Integer] When this number reaches `max_redemptions` the coupon will no longer be redeemable.
111
- define_attribute :unique_coupon_codes_count, Integer, { :read_only => true }
111
+ define_attribute :unique_coupon_codes_count, Integer
112
112
 
113
- # @!attribute [r] updated_at
113
+ # @!attribute updated_at
114
114
  # @return [DateTime] Last updated at
115
- define_attribute :updated_at, DateTime, { :read_only => true }
115
+ define_attribute :updated_at, DateTime
116
116
  end
117
117
  end
118
118
  end
@@ -20,7 +20,7 @@ module Recurly
20
20
 
21
21
  # @!attribute type
22
22
  # @return [String]
23
- define_attribute :type, String, { :enum => ["percent", "fixed", "free_trial"] }
23
+ define_attribute :type, String
24
24
  end
25
25
  end
26
26
  end
@@ -12,7 +12,7 @@ module Recurly
12
12
 
13
13
  # @!attribute unit
14
14
  # @return [String] Temporal unit of the free trial
15
- define_attribute :unit, String, { :enum => ["day", "week", "month"] }
15
+ define_attribute :unit, String
16
16
  end
17
17
  end
18
18
  end
@@ -12,7 +12,7 @@ module Recurly
12
12
 
13
13
  # @!attribute coupon_type
14
14
  # @return [String] Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint.
15
- define_attribute :coupon_type, String, { :enum => ["single_code", "bulk"] }
15
+ define_attribute :coupon_type, String
16
16
 
17
17
  # @!attribute discount
18
18
  # @return [CouponDiscount]
@@ -22,21 +22,21 @@ module Recurly
22
22
  # @return [DateTime] The date and time the coupon was expired early or reached its `max_redemptions`.
23
23
  define_attribute :expired_at, DateTime
24
24
 
25
- # @!attribute [r] id
25
+ # @!attribute id
26
26
  # @return [String] Coupon ID
27
- define_attribute :id, String, { :read_only => true }
27
+ define_attribute :id, String
28
28
 
29
29
  # @!attribute name
30
30
  # @return [String] The internal name for the coupon.
31
31
  define_attribute :name, String
32
32
 
33
- # @!attribute [r] object
33
+ # @!attribute object
34
34
  # @return [String] Object type
35
- define_attribute :object, String, { :read_only => true }
35
+ define_attribute :object, String
36
36
 
37
37
  # @!attribute state
38
38
  # @return [String] Indicates if the coupon is redeemable, and if it is not, why.
39
- define_attribute :state, String, { :enum => ["redeemable", "maxed_out", "expired"] }
39
+ define_attribute :state, String
40
40
  end
41
41
  end
42
42
  end
@@ -6,17 +6,17 @@ module Recurly
6
6
  module Resources
7
7
  class CouponRedemption < Resource
8
8
 
9
- # @!attribute account_id
10
- # @return [String] The Account ID on which the coupon was applied.
11
- define_attribute :account_id, String
9
+ # @!attribute account
10
+ # @return [AccountMini] The Account on which the coupon was applied.
11
+ define_attribute :account, :AccountMini
12
12
 
13
13
  # @!attribute coupon
14
14
  # @return [Coupon]
15
15
  define_attribute :coupon, :Coupon
16
16
 
17
- # @!attribute [r] created_at
17
+ # @!attribute created_at
18
18
  # @return [DateTime] Created at
19
- define_attribute :created_at, DateTime, { :read_only => true }
19
+ define_attribute :created_at, DateTime
20
20
 
21
21
  # @!attribute currency
22
22
  # @return [String] 3-letter ISO 4217 currency code.
@@ -26,13 +26,13 @@ module Recurly
26
26
  # @return [String] The amount that was discounted upon the application of the coupon, formatted with the currency.
27
27
  define_attribute :discounted, String
28
28
 
29
- # @!attribute [r] id
29
+ # @!attribute id
30
30
  # @return [String] Coupon Redemption ID
31
- define_attribute :id, String, { :read_only => true }
31
+ define_attribute :id, String
32
32
 
33
- # @!attribute [r] object
33
+ # @!attribute object
34
34
  # @return [String] Will always be `coupon`.
35
- define_attribute :object, String, { :read_only => true }
35
+ define_attribute :object, String
36
36
 
37
37
  # @!attribute removed_at
38
38
  # @return [DateTime] The date and time the redemption was removed from the account (un-redeemed).
@@ -40,11 +40,11 @@ module Recurly
40
40
 
41
41
  # @!attribute state
42
42
  # @return [String] Coupon Redemption state
43
- define_attribute :state, String, { :enum => ["active", "inactive"] }
43
+ define_attribute :state, String
44
44
 
45
- # @!attribute [r] updated_at
45
+ # @!attribute updated_at
46
46
  # @return [DateTime] Last updated at
47
- define_attribute :updated_at, DateTime, { :read_only => true }
47
+ define_attribute :updated_at, DateTime
48
48
  end
49
49
  end
50
50
  end
@@ -10,25 +10,25 @@ module Recurly
10
10
  # @return [CouponMini]
11
11
  define_attribute :coupon, :CouponMini
12
12
 
13
- # @!attribute [r] created_at
13
+ # @!attribute created_at
14
14
  # @return [DateTime] Created at
15
- define_attribute :created_at, DateTime, { :read_only => true }
15
+ define_attribute :created_at, DateTime
16
16
 
17
17
  # @!attribute discounted
18
18
  # @return [String] The amount that was discounted upon the application of the coupon, formatted with the currency.
19
19
  define_attribute :discounted, String
20
20
 
21
- # @!attribute [r] id
21
+ # @!attribute id
22
22
  # @return [String] Coupon Redemption ID
23
- define_attribute :id, String, { :read_only => true }
23
+ define_attribute :id, String
24
24
 
25
- # @!attribute [r] object
25
+ # @!attribute object
26
26
  # @return [String] Will always be `coupon`.
27
- define_attribute :object, String, { :read_only => true }
27
+ define_attribute :object, String
28
28
 
29
29
  # @!attribute state
30
30
  # @return [String] Invoice state
31
- define_attribute :state, String, { :enum => ["active", "inactive"] }
31
+ define_attribute :state, String
32
32
  end
33
33
  end
34
34
  end
@@ -12,7 +12,7 @@ module Recurly
12
12
 
13
13
  # @!attribute action
14
14
  # @return [String] The action for which the credit was created.
15
- define_attribute :action, String, { :enum => ["payment", "refund", "reduction", "write_off"] }
15
+ define_attribute :action, String
16
16
 
17
17
  # @!attribute amount
18
18
  # @return [Float] Total credit payment amount applied to the charge invoice.
@@ -22,9 +22,9 @@ module Recurly
22
22
  # @return [InvoiceMini]
23
23
  define_attribute :applied_to_invoice, :InvoiceMini
24
24
 
25
- # @!attribute [r] created_at
25
+ # @!attribute created_at
26
26
  # @return [DateTime] Created at
27
- define_attribute :created_at, DateTime, { :read_only => true }
27
+ define_attribute :created_at, DateTime
28
28
 
29
29
  # @!attribute currency
30
30
  # @return [String] 3-letter ISO 4217 currency code.
@@ -50,17 +50,17 @@ module Recurly
50
50
  # @return [Transaction]
51
51
  define_attribute :refund_transaction, :Transaction
52
52
 
53
- # @!attribute [r] updated_at
53
+ # @!attribute updated_at
54
54
  # @return [DateTime] Last updated at
55
- define_attribute :updated_at, DateTime, { :read_only => true }
55
+ define_attribute :updated_at, DateTime
56
56
 
57
57
  # @!attribute uuid
58
58
  # @return [String] The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
59
59
  define_attribute :uuid, String
60
60
 
61
- # @!attribute [r] voided_at
61
+ # @!attribute voided_at
62
62
  # @return [DateTime] Voided at
63
- define_attribute :voided_at, DateTime, { :read_only => true }
63
+ define_attribute :voided_at, DateTime
64
64
  end
65
65
  end
66
66
  end
@@ -6,45 +6,45 @@ module Recurly
6
6
  module Resources
7
7
  class CustomFieldDefinition < Resource
8
8
 
9
- # @!attribute [r] created_at
9
+ # @!attribute created_at
10
10
  # @return [DateTime] Created at
11
- define_attribute :created_at, DateTime, { :read_only => true }
11
+ define_attribute :created_at, DateTime
12
12
 
13
- # @!attribute [r] deleted_at
13
+ # @!attribute deleted_at
14
14
  # @return [DateTime] Definitions are initially soft deleted, and once all the values are removed from the accouts or subscriptions, will be hard deleted an no longer visible.
15
- define_attribute :deleted_at, DateTime, { :read_only => true }
15
+ define_attribute :deleted_at, DateTime
16
16
 
17
17
  # @!attribute display_name
18
18
  # @return [String] Used to label the field when viewing and editing the field in Recurly's admin UI.
19
19
  define_attribute :display_name, String
20
20
 
21
- # @!attribute [r] id
21
+ # @!attribute id
22
22
  # @return [String] Custom field definition ID
23
- define_attribute :id, String, { :read_only => true }
23
+ define_attribute :id, String
24
24
 
25
25
  # @!attribute name
26
26
  # @return [String] Used by the API to identify the field or reading and writing. The name can only be used once per Recurly object type.
27
27
  define_attribute :name, String
28
28
 
29
- # @!attribute [r] object
29
+ # @!attribute object
30
30
  # @return [String] Object type
31
- define_attribute :object, String, { :read_only => true }
31
+ define_attribute :object, String
32
32
 
33
33
  # @!attribute related_type
34
34
  # @return [String] Related Recurly object type
35
- define_attribute :related_type, String, { :enum => ["account", "subscription"] }
35
+ define_attribute :related_type, String
36
36
 
37
37
  # @!attribute tooltip
38
38
  # @return [String] Displayed as a tooltip when editing the field in the Recurly admin UI.
39
39
  define_attribute :tooltip, String
40
40
 
41
- # @!attribute [r] updated_at
41
+ # @!attribute updated_at
42
42
  # @return [DateTime] Last updated at
43
- define_attribute :updated_at, DateTime, { :read_only => true }
43
+ define_attribute :updated_at, DateTime
44
44
 
45
45
  # @!attribute user_access
46
46
  # @return [String] The access control applied inside Recurly's admin UI: - `api_only` - No one will be able to view or edit this field's data via the admin UI. - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI.
47
- define_attribute :user_access, String, { :enum => ["api_only", "read_only", "write"] }
47
+ define_attribute :user_access, String
48
48
  end
49
49
  end
50
50
  end
@@ -16,7 +16,7 @@ module Recurly
16
16
 
17
17
  # @!attribute type
18
18
  # @return [String] Type
19
- define_attribute :type, String, { :enum => ["bad_request", "internal_server_error", "immutable_subscription", "invalid_api_key", "invalid_api_version", "invalid_content_type", "invalid_permissions", "invalid_token", "not_found", "simultaneous_request", "transaction", "unauthorized", "unavailable_in_api_version", "unknown_api_version", "validation", "missing_feature"] }
19
+ define_attribute :type, String
20
20
  end
21
21
  end
22
22
  end
@@ -20,7 +20,7 @@ module Recurly
20
20
 
21
21
  # @!attribute type
22
22
  # @return [String] Type
23
- define_attribute :type, String, { :enum => ["bad_request", "internal_server_error", "immutable_subscription", "invalid_api_key", "invalid_api_version", "invalid_content_type", "invalid_permissions", "invalid_token", "not_found", "simultaneous_request", "transaction", "unauthorized", "unavailable_in_api_version", "unknown_api_version", "validation", "missing_feature"] }
23
+ define_attribute :type, String
24
24
  end
25
25
  end
26
26
  end
@@ -8,7 +8,7 @@ module Recurly
8
8
 
9
9
  # @!attribute decision
10
10
  # @return [String] Kount decision
11
- define_attribute :decision, String, { :enum => ["approve", "review", "decline", "escalate"] }
11
+ define_attribute :decision, String
12
12
 
13
13
  # @!attribute risk_rules_triggered
14
14
  # @return [Hash] Kount rules
@@ -24,11 +24,11 @@ module Recurly
24
24
 
25
25
  # @!attribute collection_method
26
26
  # @return [String] An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment.
27
- define_attribute :collection_method, String, { :enum => ["automatic", "manual"] }
27
+ define_attribute :collection_method, String
28
28
 
29
- # @!attribute [r] created_at
29
+ # @!attribute created_at
30
30
  # @return [DateTime] Created at
31
- define_attribute :created_at, DateTime, { :read_only => true }
31
+ define_attribute :created_at, DateTime
32
32
 
33
33
  # @!attribute credit_payments
34
34
  # @return [Array[CreditPayment]] Credit payments
@@ -50,9 +50,9 @@ module Recurly
50
50
  # @return [DateTime] Date invoice is due. This is the date the net terms are reached.
51
51
  define_attribute :due_at, DateTime
52
52
 
53
- # @!attribute [r] id
53
+ # @!attribute id
54
54
  # @return [String] Invoice ID
55
- define_attribute :id, String, { :read_only => true }
55
+ define_attribute :id, String
56
56
 
57
57
  # @!attribute line_items
58
58
  # @return [LineItemList]
@@ -66,13 +66,13 @@ module Recurly
66
66
  # @return [String] If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.
67
67
  define_attribute :number, String
68
68
 
69
- # @!attribute [r] object
69
+ # @!attribute object
70
70
  # @return [String] Object type
71
- define_attribute :object, String, { :read_only => true }
71
+ define_attribute :object, String
72
72
 
73
73
  # @!attribute origin
74
74
  # @return [String] The event that created the invoice.
75
- define_attribute :origin, String, { :enum => ["purchase", "line_item_refund", "open_amount_refund", "renewal", "immediate_change", "termination", "credit", "gift_card", "write_off"] }
75
+ define_attribute :origin, String
76
76
 
77
77
  # @!attribute paid
78
78
  # @return [Float] The total amount of successful payments transaction on this invoice.
@@ -92,7 +92,7 @@ module Recurly
92
92
 
93
93
  # @!attribute state
94
94
  # @return [String] Invoice state
95
- define_attribute :state, String, { :enum => ["pending", "processing", "past_due", "paid", "failed"] }
95
+ define_attribute :state, String
96
96
 
97
97
  # @!attribute subscription_ids
98
98
  # @return [Array[String]] If the invoice is charging or refunding for one or more subscriptions, these are their IDs.
@@ -124,11 +124,11 @@ module Recurly
124
124
 
125
125
  # @!attribute type
126
126
  # @return [String] Invoices are either charge, credit, or legacy invoices.
127
- define_attribute :type, String, { :enum => ["charge", "credit", "legacy"] }
127
+ define_attribute :type, String
128
128
 
129
- # @!attribute [r] updated_at
129
+ # @!attribute updated_at
130
130
  # @return [DateTime] Last updated at
131
- define_attribute :updated_at, DateTime, { :read_only => true }
131
+ define_attribute :updated_at, DateTime
132
132
 
133
133
  # @!attribute vat_number
134
134
  # @return [String] VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method.
@@ -20,11 +20,11 @@ module Recurly
20
20
 
21
21
  # @!attribute state
22
22
  # @return [String] Invoice state
23
- define_attribute :state, String, { :enum => ["pending", "processing", "past_due", "paid", "failed"] }
23
+ define_attribute :state, String
24
24
 
25
25
  # @!attribute type
26
26
  # @return [String] Invoice type
27
- define_attribute :type, String, { :enum => ["charge", "credit", "legacy"] }
27
+ define_attribute :type, String
28
28
  end
29
29
  end
30
30
  end