recurly 3.0.0.beta.3 → 3.0.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +5 -5
  2. data/.ruby-version +1 -0
  3. data/.travis.yml +3 -1
  4. data/README.md +9 -2
  5. data/lib/recurly/client.rb +42 -13
  6. data/lib/recurly/client/adapter.rb +9 -18
  7. data/lib/recurly/client/operations.rb +1179 -78
  8. data/lib/recurly/errors/api_errors.rb +4 -0
  9. data/lib/recurly/errors/network_errors.rb +1 -1
  10. data/lib/recurly/pager.rb +5 -1
  11. data/lib/recurly/requests/account_acquisition_cost.rb +18 -0
  12. data/lib/recurly/requests/account_acquisition_updatable.rb +5 -1
  13. data/lib/recurly/requests/account_create.rb +23 -3
  14. data/lib/recurly/requests/account_update.rb +22 -2
  15. data/lib/recurly/requests/add_on_create.rb +7 -3
  16. data/lib/recurly/requests/add_on_pricing.rb +18 -0
  17. data/lib/recurly/requests/add_on_update.rb +7 -3
  18. data/lib/recurly/requests/address.rb +4 -0
  19. data/lib/recurly/requests/billing_info_create.rb +4 -0
  20. data/lib/recurly/requests/coupon_bulk_create.rb +4 -0
  21. data/lib/recurly/requests/coupon_create.rb +13 -9
  22. data/lib/recurly/requests/coupon_pricing.rb +18 -0
  23. data/lib/recurly/requests/coupon_redemption_create.rb +4 -0
  24. data/lib/recurly/requests/coupon_update.rb +4 -0
  25. data/lib/recurly/requests/external_refund.rb +22 -0
  26. data/lib/recurly/requests/invoice_address.rb +54 -0
  27. data/lib/recurly/requests/invoice_create.rb +6 -2
  28. data/lib/recurly/requests/invoice_refund.rb +7 -3
  29. data/lib/recurly/requests/invoice_updatable.rb +34 -0
  30. data/lib/recurly/requests/line_item_create.rb +6 -2
  31. data/lib/recurly/requests/line_item_refund.rb +4 -0
  32. data/lib/recurly/requests/plan_create.rb +11 -7
  33. data/lib/recurly/requests/plan_hosted_pages.rb +26 -0
  34. data/lib/recurly/requests/plan_pricing.rb +22 -0
  35. data/lib/recurly/requests/plan_update.rb +11 -7
  36. data/lib/recurly/requests/shipping_address_create.rb +4 -0
  37. data/lib/recurly/requests/shipping_address_update.rb +5 -1
  38. data/lib/recurly/requests/subscription_add_on_create.rb +8 -0
  39. data/lib/recurly/requests/subscription_change_create.rb +13 -5
  40. data/lib/recurly/requests/subscription_create.rb +11 -7
  41. data/lib/recurly/requests/subscription_pause.rb +4 -0
  42. data/lib/recurly/requests/subscription_update.rb +8 -4
  43. data/lib/recurly/resource.rb +6 -6
  44. data/lib/recurly/resources/account.rb +27 -11
  45. data/lib/recurly/resources/account_acquisition.rb +9 -5
  46. data/lib/recurly/resources/account_acquisition_cost.rb +18 -0
  47. data/lib/recurly/resources/account_balance.rb +7 -3
  48. data/lib/recurly/resources/account_balance_amount.rb +18 -0
  49. data/lib/recurly/resources/account_mini.rb +18 -2
  50. data/lib/recurly/resources/account_note.rb +7 -3
  51. data/lib/recurly/resources/add_on.rb +13 -9
  52. data/lib/recurly/resources/add_on_mini.rb +6 -2
  53. data/lib/recurly/resources/add_on_pricing.rb +18 -0
  54. data/lib/recurly/resources/address.rb +4 -0
  55. data/lib/recurly/resources/billing_info.rb +12 -8
  56. data/lib/recurly/resources/billing_info_payment_method.rb +34 -0
  57. data/lib/recurly/resources/billing_info_updated_by.rb +18 -0
  58. data/lib/recurly/resources/coupon.rb +21 -13
  59. data/lib/recurly/resources/coupon_discount.rb +7 -3
  60. data/lib/recurly/resources/coupon_discount_pricing.rb +18 -0
  61. data/lib/recurly/resources/coupon_discount_trial.rb +18 -0
  62. data/lib/recurly/resources/coupon_mini.rb +8 -4
  63. data/lib/recurly/resources/coupon_redemption.rb +9 -5
  64. data/lib/recurly/resources/coupon_redemption_mini.rb +8 -4
  65. data/lib/recurly/resources/credit_payment.rb +8 -4
  66. data/lib/recurly/resources/custom_field.rb +4 -0
  67. data/lib/recurly/resources/custom_field_definition.rb +11 -7
  68. data/lib/recurly/resources/error.rb +6 -2
  69. data/lib/recurly/resources/error_may_have_transaction.rb +6 -2
  70. data/lib/recurly/resources/fraud_info.rb +22 -0
  71. data/lib/recurly/resources/invoice.rb +17 -13
  72. data/lib/recurly/resources/invoice_address.rb +54 -0
  73. data/lib/recurly/resources/invoice_collection.rb +5 -1
  74. data/lib/recurly/resources/invoice_mini.rb +6 -2
  75. data/lib/recurly/resources/line_item.rb +13 -5
  76. data/lib/recurly/resources/line_item_list.rb +5 -1
  77. data/lib/recurly/resources/plan.rb +16 -12
  78. data/lib/recurly/resources/plan_hosted_pages.rb +26 -0
  79. data/lib/recurly/resources/plan_mini.rb +6 -2
  80. data/lib/recurly/resources/plan_pricing.rb +22 -0
  81. data/lib/recurly/resources/settings.rb +7 -3
  82. data/lib/recurly/resources/shipping_address.rb +8 -4
  83. data/lib/recurly/resources/site.rb +16 -8
  84. data/lib/recurly/resources/subscription.rb +9 -5
  85. data/lib/recurly/resources/subscription_add_on.rb +4 -0
  86. data/lib/recurly/resources/subscription_change.rb +9 -5
  87. data/lib/recurly/resources/tax_info.rb +4 -0
  88. data/lib/recurly/resources/transaction.rb +16 -8
  89. data/lib/recurly/resources/transaction_payment_gateway.rb +26 -0
  90. data/lib/recurly/resources/transaction_payment_method.rb +34 -0
  91. data/lib/recurly/resources/unique_coupon_code.rb +10 -6
  92. data/lib/recurly/resources/user.rb +8 -4
  93. data/lib/recurly/schema/json_deserializer.rb +18 -20
  94. data/lib/recurly/schema/request_caster.rb +1 -1
  95. data/lib/recurly/schema/schema_validator.rb +31 -8
  96. data/lib/recurly/version.rb +1 -1
  97. data/recurly.gemspec +1 -1
  98. data/scripts/check-deps +28 -0
  99. data/scripts/install-deps +44 -0
  100. metadata +37 -7
@@ -1,3 +1,7 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
1
5
  module Recurly
2
6
  module Resources
3
7
  class PlanMini < Resource
@@ -8,7 +12,7 @@ module Recurly
8
12
 
9
13
  # @!attribute [r] id
10
14
  # @return [String] Plan ID
11
- define_attribute :id, String, {:read_only => true}
15
+ define_attribute :id, String, { :read_only => true }
12
16
 
13
17
  # @!attribute name
14
18
  # @return [String] This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
@@ -16,7 +20,7 @@ module Recurly
16
20
 
17
21
  # @!attribute [r] object
18
22
  # @return [String] Object type
19
- define_attribute :object, String, {:read_only => true}
23
+ define_attribute :object, String, { :read_only => true }
20
24
  end
21
25
  end
22
26
  end
@@ -0,0 +1,22 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Resources
7
+ class PlanPricing < Resource
8
+
9
+ # @!attribute currency
10
+ # @return [String] 3-letter ISO 4217 currency code.
11
+ define_attribute :currency, String
12
+
13
+ # @!attribute setup_fee
14
+ # @return [Float] Amount of one-time setup fee automatically charged at the beginning of a subscription billing cycle. For subscription plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not increase with the quantity of a subscription plan.
15
+ define_attribute :setup_fee, Float
16
+
17
+ # @!attribute unit_amount
18
+ # @return [Float] Unit price
19
+ define_attribute :unit_amount, Float
20
+ end
21
+ end
22
+ end
@@ -1,18 +1,22 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
1
5
  module Recurly
2
6
  module Resources
3
7
  class Settings < Resource
4
8
 
5
9
  # @!attribute [r] accepted_currencies
6
10
  # @return [Array[String]]
7
- define_attribute :accepted_currencies, Array, {:item_type => String, :read_only => true}
11
+ define_attribute :accepted_currencies, Array, { :item_type => String, :read_only => true }
8
12
 
9
13
  # @!attribute [r] billing_address_requirement
10
14
  # @return [String] - full: Full Address (Street, City, State, Postal Code and Country) - streetzip: Street and Postal Code only - zip: Postal Code only - none: No Address
11
- define_attribute :billing_address_requirement, String, {:read_only => true, :enum => ["full", "streetzip", "zip", "none"]}
15
+ define_attribute :billing_address_requirement, String, { :read_only => true, :enum => ["full", "streetzip", "zip", "none"] }
12
16
 
13
17
  # @!attribute [r] default_currency
14
18
  # @return [String] The default 3-letter ISO 4217 currency code.
15
- define_attribute :default_currency, String, {:read_only => true}
19
+ define_attribute :default_currency, String, { :read_only => true }
16
20
  end
17
21
  end
18
22
  end
@@ -1,10 +1,14 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
1
5
  module Recurly
2
6
  module Resources
3
7
  class ShippingAddress < Resource
4
8
 
5
9
  # @!attribute [r] account_id
6
10
  # @return [String] Account ID
7
- define_attribute :account_id, String, {:read_only => true}
11
+ define_attribute :account_id, String, { :read_only => true }
8
12
 
9
13
  # @!attribute city
10
14
  # @return [String]
@@ -20,7 +24,7 @@ module Recurly
20
24
 
21
25
  # @!attribute [r] created_at
22
26
  # @return [DateTime] Created at
23
- define_attribute :created_at, DateTime, {:read_only => true}
27
+ define_attribute :created_at, DateTime, { :read_only => true }
24
28
 
25
29
  # @!attribute email
26
30
  # @return [String]
@@ -32,7 +36,7 @@ module Recurly
32
36
 
33
37
  # @!attribute [r] id
34
38
  # @return [String] Shipping Address ID
35
- define_attribute :id, String, {:read_only => true}
39
+ define_attribute :id, String, { :read_only => true }
36
40
 
37
41
  # @!attribute last_name
38
42
  # @return [String]
@@ -64,7 +68,7 @@ module Recurly
64
68
 
65
69
  # @!attribute [r] updated_at
66
70
  # @return [DateTime] Updated at
67
- define_attribute :updated_at, DateTime, {:read_only => true}
71
+ define_attribute :updated_at, DateTime, { :read_only => true }
68
72
 
69
73
  # @!attribute vat_number
70
74
  # @return [String]
@@ -1,3 +1,7 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
1
5
  module Recurly
2
6
  module Resources
3
7
  class Site < Resource
@@ -8,27 +12,31 @@ module Recurly
8
12
 
9
13
  # @!attribute [r] created_at
10
14
  # @return [DateTime] Created at
11
- define_attribute :created_at, DateTime, {:read_only => true}
15
+ define_attribute :created_at, DateTime, { :read_only => true }
12
16
 
13
17
  # @!attribute [r] deleted_at
14
18
  # @return [DateTime] Deleted at
15
- define_attribute :deleted_at, DateTime, {:read_only => true}
19
+ define_attribute :deleted_at, DateTime, { :read_only => true }
16
20
 
17
21
  # @!attribute features
18
22
  # @return [Array[String]] A list of features enabled for the site.
19
- define_attribute :features, Array, {:item_type => String}
23
+ define_attribute :features, Array, { :item_type => String }
20
24
 
21
25
  # @!attribute [r] id
22
26
  # @return [String] Site ID
23
- define_attribute :id, String, {:read_only => true}
27
+ define_attribute :id, String, { :read_only => true }
24
28
 
25
29
  # @!attribute [r] mode
26
30
  # @return [String] Mode
27
- define_attribute :mode, String, {:read_only => true, :enum => ["development", "production", "sandbox"]}
31
+ define_attribute :mode, String, { :read_only => true, :enum => ["development", "production", "sandbox"] }
28
32
 
29
33
  # @!attribute [r] object
30
34
  # @return [String] Object type
31
- define_attribute :object, String, {:read_only => true}
35
+ define_attribute :object, String, { :read_only => true }
36
+
37
+ # @!attribute [r] public_api_key
38
+ # @return [String] This value is used to configure RecurlyJS to submit tokenized billing information.
39
+ define_attribute :public_api_key, String, { :read_only => true }
32
40
 
33
41
  # @!attribute settings
34
42
  # @return [Settings]
@@ -36,11 +44,11 @@ module Recurly
36
44
 
37
45
  # @!attribute [r] subdomain
38
46
  # @return [String]
39
- define_attribute :subdomain, String, {:read_only => true}
47
+ define_attribute :subdomain, String, { :read_only => true }
40
48
 
41
49
  # @!attribute [r] updated_at
42
50
  # @return [DateTime] Updated at
43
- define_attribute :updated_at, DateTime, {:read_only => true}
51
+ define_attribute :updated_at, DateTime, { :read_only => true }
44
52
  end
45
53
  end
46
54
  end
@@ -1,3 +1,7 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
1
5
  module Recurly
2
6
  module Resources
3
7
  class Subscription < Resource
@@ -12,7 +16,7 @@ module Recurly
12
16
 
13
17
  # @!attribute add_ons
14
18
  # @return [Array[SubscriptionAddOn]] Add-ons
15
- define_attribute :add_ons, Array, {:item_type => :SubscriptionAddOn}
19
+ define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
16
20
 
17
21
  # @!attribute add_ons_total
18
22
  # @return [Float] Total price of add-ons
@@ -32,11 +36,11 @@ module Recurly
32
36
 
33
37
  # @!attribute collection_method
34
38
  # @return [String] Collection method
35
- define_attribute :collection_method, String, {:enum => ["automatic", "manual"]}
39
+ define_attribute :collection_method, String, { :enum => ["automatic", "manual"] }
36
40
 
37
41
  # @!attribute coupon_redemptions
38
42
  # @return [Array[CouponRedemptionMini]] Coupon redemptions
39
- define_attribute :coupon_redemptions, Array, {:item_type => :CouponRedemptionMini}
43
+ define_attribute :coupon_redemptions, Array, { :item_type => :CouponRedemptionMini }
40
44
 
41
45
  # @!attribute created_at
42
46
  # @return [DateTime] Created at
@@ -64,7 +68,7 @@ module Recurly
64
68
 
65
69
  # @!attribute custom_fields
66
70
  # @return [Array[CustomField]]
67
- define_attribute :custom_fields, Array, {:item_type => :CustomField}
71
+ define_attribute :custom_fields, Array, { :item_type => :CustomField }
68
72
 
69
73
  # @!attribute customer_notes
70
74
  # @return [String] Customer notes
@@ -128,7 +132,7 @@ module Recurly
128
132
 
129
133
  # @!attribute state
130
134
  # @return [String] State
131
- define_attribute :state, String, {:enum => ["active", "canceled", "expired", "failed", "future", "paused"]}
135
+ define_attribute :state, String, { :enum => ["active", "canceled", "expired", "failed", "future", "paused"] }
132
136
 
133
137
  # @!attribute subtotal
134
138
  # @return [Float] Estimated total, before tax.
@@ -1,3 +1,7 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
1
5
  module Recurly
2
6
  module Resources
3
7
  class SubscriptionAddOn < Resource
@@ -1,10 +1,14 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
1
5
  module Recurly
2
6
  module Resources
3
7
  class SubscriptionChange < Resource
4
8
 
5
9
  # @!attribute [r] activate_at
6
10
  # @return [DateTime] Activated at
7
- define_attribute :activate_at, DateTime, {:read_only => true}
11
+ define_attribute :activate_at, DateTime, { :read_only => true }
8
12
 
9
13
  # @!attribute activated
10
14
  # @return [Boolean] Returns `true` if the subscription change is activated.
@@ -12,15 +16,15 @@ module Recurly
12
16
 
13
17
  # @!attribute add_ons
14
18
  # @return [Array[SubscriptionAddOn]] These add-ons will be used when the subscription renews.
15
- define_attribute :add_ons, Array, {:item_type => :SubscriptionAddOn}
19
+ define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
16
20
 
17
21
  # @!attribute [r] created_at
18
22
  # @return [DateTime] Created at
19
- define_attribute :created_at, DateTime, {:read_only => true}
23
+ define_attribute :created_at, DateTime, { :read_only => true }
20
24
 
21
25
  # @!attribute [r] deleted_at
22
26
  # @return [DateTime] Deleted at
23
- define_attribute :deleted_at, DateTime, {:read_only => true}
27
+ define_attribute :deleted_at, DateTime, { :read_only => true }
24
28
 
25
29
  # @!attribute id
26
30
  # @return [String] The ID of the Subscription Change.
@@ -48,7 +52,7 @@ module Recurly
48
52
 
49
53
  # @!attribute [r] updated_at
50
54
  # @return [DateTime] Updated at
51
- define_attribute :updated_at, DateTime, {:read_only => true}
55
+ define_attribute :updated_at, DateTime, { :read_only => true }
52
56
  end
53
57
  end
54
58
  end
@@ -1,3 +1,7 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
1
5
  module Recurly
2
6
  module Resources
3
7
  class TaxInfo < Resource
@@ -1,3 +1,7 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
1
5
  module Recurly
2
6
  module Resources
3
7
  class Transaction < Resource
@@ -12,7 +16,7 @@ module Recurly
12
16
 
13
17
  # @!attribute avs_check
14
18
  # @return [String] When processed, result from checking the overall AVS on the transaction.
15
- define_attribute :avs_check, String, {:enum => ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]}
19
+ define_attribute :avs_check, String, { :enum => ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] }
16
20
 
17
21
  # @!attribute billing_address
18
22
  # @return [Address]
@@ -22,6 +26,10 @@ module Recurly
22
26
  # @return [DateTime] Collected at, or if not collected yet, the time the transaction was created.
23
27
  define_attribute :collected_at, DateTime
24
28
 
29
+ # @!attribute collection_method
30
+ # @return [String] The method by which the payment was collected.
31
+ define_attribute :collection_method, String, { :enum => ["automatic", "manual"] }
32
+
25
33
  # @!attribute created_at
26
34
  # @return [DateTime] Created at
27
35
  define_attribute :created_at, DateTime
@@ -40,7 +48,7 @@ module Recurly
40
48
 
41
49
  # @!attribute cvv_check
42
50
  # @return [String] When processed, result from checking the CVV/CVC value on the transaction.
43
- define_attribute :cvv_check, String, {:enum => ["D", "I", "M", "N", "P", "S", "U", "X"]}
51
+ define_attribute :cvv_check, String, { :enum => ["D", "I", "M", "N", "P", "S", "U", "X"] }
44
52
 
45
53
  # @!attribute gateway_approval_code
46
54
  # @return [String] Transaction approval code from the payment gateway.
@@ -88,7 +96,7 @@ module Recurly
88
96
 
89
97
  # @!attribute origin
90
98
  # @return [String] Describes how the transaction was triggered.
91
- define_attribute :origin, String, {:enum => ["api", "hpp", "merchant", "recurly_admin", "recurlyjs", "recurring", "transparent", "force_collect", "refunded_externally", "chargeback"]}
99
+ define_attribute :origin, String, { :enum => ["api", "hpp", "merchant", "recurly_admin", "recurlyjs", "recurring", "transparent", "force_collect", "refunded_externally", "chargeback"] }
92
100
 
93
101
  # @!attribute original_transaction_id
94
102
  # @return [String] If this transaction is a refund (`type=refund`), this will be the ID of the original transaction on the invoice being refunded.
@@ -99,7 +107,7 @@ module Recurly
99
107
  define_attribute :payment_gateway, Hash
100
108
 
101
109
  # @!attribute payment_method
102
- # @return [Hash] Payment method (TODO: this overlaps with BillinInfo’s payment_method but only documents credit cards)
110
+ # @return [Hash] Payment method (TODO: this overlaps with BillingInfo’s payment_method but only documents credit cards)
103
111
  define_attribute :payment_method, Hash
104
112
 
105
113
  # @!attribute refunded
@@ -108,7 +116,7 @@ module Recurly
108
116
 
109
117
  # @!attribute status
110
118
  # @return [String] The current transaction status. Note that the status may change, e.g. a `pending` transaction may become `declined` or `success` may later become `void`.
111
- define_attribute :status, String, {:enum => ["pending", "scheduled", "processing", "success", "void", "declined", "error", "chargeback"]}
119
+ define_attribute :status, String, { :enum => ["pending", "scheduled", "processing", "success", "void", "declined", "error", "chargeback"] }
112
120
 
113
121
  # @!attribute status_code
114
122
  # @return [String] Status code
@@ -120,15 +128,15 @@ module Recurly
120
128
 
121
129
  # @!attribute subscription_ids
122
130
  # @return [Array[String]] If the transaction is charging or refunding for one or more subscriptions, these are their IDs.
123
- define_attribute :subscription_ids, Array, {:item_type => String}
131
+ define_attribute :subscription_ids, Array, { :item_type => String }
124
132
 
125
133
  # @!attribute success
126
134
  # @return [Boolean] Did this transaction complete successfully?
127
135
  define_attribute :success, :Boolean
128
136
 
129
137
  # @!attribute type
130
- # @return [String] Transaction type
131
- define_attribute :type, String, {:enum => ["authorization", "capture", "purchase", "refund", "verify"]}
138
+ # @return [String] - `authorization` – verifies billing information and places a hold on money in the customer's account. - `capture` – captures funds held by an authorization and completes a purchase. - `purchase` – combines the authorization and capture in one transaction. - `refund` – returns all or a portion of the money collected in a previous transaction to the customer. - `verify` – a $0 or $1 transaction used to verify billing information which is immediately voided.
139
+ define_attribute :type, String, { :enum => ["authorization", "capture", "purchase", "refund", "verify"] }
132
140
 
133
141
  # @!attribute uuid
134
142
  # @return [String] The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
@@ -0,0 +1,26 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Resources
7
+ class TransactionPaymentGateway < Resource
8
+
9
+ # @!attribute id
10
+ # @return [String]
11
+ define_attribute :id, String
12
+
13
+ # @!attribute name
14
+ # @return [String]
15
+ define_attribute :name, String
16
+
17
+ # @!attribute object
18
+ # @return [String] Object type
19
+ define_attribute :object, String
20
+
21
+ # @!attribute type
22
+ # @return [String]
23
+ define_attribute :type, String
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,34 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Resources
7
+ class TransactionPaymentMethod < Resource
8
+
9
+ # @!attribute card_type
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"] }
12
+
13
+ # @!attribute exp_month
14
+ # @return [Integer] Expiration month.
15
+ define_attribute :exp_month, Integer
16
+
17
+ # @!attribute exp_year
18
+ # @return [Integer] Expiration year.
19
+ define_attribute :exp_year, Integer
20
+
21
+ # @!attribute first_six
22
+ # @return [String] Credit card number's first six digits.
23
+ define_attribute :first_six, String
24
+
25
+ # @!attribute last_four
26
+ # @return [String] Credit card number's last four digits.
27
+ define_attribute :last_four, String
28
+
29
+ # @!attribute object
30
+ # @return [String]
31
+ define_attribute :object, String, { :enum => ["credit_card", "paypal", "amazon", "roku", "ach", "apple_pay", "sepadirectdebit", "eft", "wire_transfer", "money_order", "check", "other"] }
32
+ end
33
+ end
34
+ end
@@ -1,3 +1,7 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
1
5
  module Recurly
2
6
  module Resources
3
7
  class UniqueCouponCode < Resource
@@ -8,7 +12,7 @@ module Recurly
8
12
 
9
13
  # @!attribute [r] created_at
10
14
  # @return [DateTime] Created at
11
- define_attribute :created_at, DateTime, {:read_only => true}
15
+ define_attribute :created_at, DateTime, { :read_only => true }
12
16
 
13
17
  # @!attribute expired_at
14
18
  # @return [DateTime] The date and time the coupon was expired early or reached its `max_redemptions`.
@@ -16,23 +20,23 @@ module Recurly
16
20
 
17
21
  # @!attribute [r] id
18
22
  # @return [String] Unique Coupon Code ID
19
- define_attribute :id, String, {:read_only => true}
23
+ define_attribute :id, String, { :read_only => true }
20
24
 
21
25
  # @!attribute [r] object
22
26
  # @return [String] Object type
23
- define_attribute :object, String, {:read_only => true}
27
+ define_attribute :object, String, { :read_only => true }
24
28
 
25
29
  # @!attribute [r] redeemed_at
26
30
  # @return [DateTime] The date and time the unique coupon code was redeemed.
27
- define_attribute :redeemed_at, DateTime, {:read_only => true}
31
+ define_attribute :redeemed_at, DateTime, { :read_only => true }
28
32
 
29
33
  # @!attribute state
30
34
  # @return [String] Indicates if the unique coupon code is redeemable or why not.
31
- define_attribute :state, String, {:enum => ["redeemable", "maxed_out", "expired", "inactive"]}
35
+ define_attribute :state, String, { :enum => ["redeemable", "maxed_out", "expired", "inactive"] }
32
36
 
33
37
  # @!attribute [r] updated_at
34
38
  # @return [DateTime] Updated at
35
- define_attribute :updated_at, DateTime, {:read_only => true}
39
+ define_attribute :updated_at, DateTime, { :read_only => true }
36
40
  end
37
41
  end
38
42
  end