braintree 2.80.1 → 2.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/lib/braintree.rb +4 -1
  3. data/lib/braintree/account_updater_daily_report.rb +1 -1
  4. data/lib/braintree/ach_mandate.rb +2 -1
  5. data/lib/braintree/address.rb +16 -3
  6. data/lib/braintree/amex_express_checkout_card.rb +14 -2
  7. data/lib/braintree/android_pay_card.rb +16 -3
  8. data/lib/braintree/apple_pay_card.rb +15 -3
  9. data/lib/braintree/bin_data.rb +9 -2
  10. data/lib/braintree/coinbase_account.rb +10 -1
  11. data/lib/braintree/connected_merchant_paypal_status_changed.rb +3 -1
  12. data/lib/braintree/connected_merchant_status_transitioned.rb +3 -1
  13. data/lib/braintree/credentials_parser.rb +5 -1
  14. data/lib/braintree/credit_card.rb +25 -10
  15. data/lib/braintree/credit_card_verification.rb +32 -14
  16. data/lib/braintree/customer.rb +24 -11
  17. data/lib/braintree/descriptor.rb +3 -1
  18. data/lib/braintree/disbursement.rb +9 -1
  19. data/lib/braintree/dispute.rb +1 -6
  20. data/lib/braintree/dispute/transaction_details.rb +2 -1
  21. data/lib/braintree/document_upload.rb +6 -7
  22. data/lib/braintree/error_codes.rb +30 -0
  23. data/lib/braintree/error_result.rb +8 -1
  24. data/lib/braintree/europe_bank_account.rb +3 -1
  25. data/lib/braintree/facilitated_details.rb +3 -1
  26. data/lib/braintree/facilitator_details.rb +2 -1
  27. data/lib/braintree/gateway.rb +4 -0
  28. data/lib/braintree/granted_payment_instrument_update.rb +5 -1
  29. data/lib/braintree/ideal_payment.rb +15 -2
  30. data/lib/braintree/masterpass_card.rb +26 -11
  31. data/lib/braintree/merchant.rb +8 -1
  32. data/lib/braintree/merchant_account.rb +8 -3
  33. data/lib/braintree/merchant_account/address_details.rb +4 -1
  34. data/lib/braintree/merchant_account/business_details.rb +4 -1
  35. data/lib/braintree/merchant_account/funding_details.rb +6 -1
  36. data/lib/braintree/merchant_account/individual_details.rb +7 -2
  37. data/lib/braintree/oauth_credentials.rb +4 -1
  38. data/lib/braintree/paginated_result.rb +3 -1
  39. data/lib/braintree/payment_method_nonce.rb +5 -1
  40. data/lib/braintree/paypal_account.rb +8 -1
  41. data/lib/braintree/plan.rb +4 -4
  42. data/lib/braintree/risk_data.rb +3 -1
  43. data/lib/braintree/settlement_batch_summary.rb +1 -0
  44. data/lib/braintree/subscription.rb +27 -17
  45. data/lib/braintree/subscription/status_details.rb +8 -1
  46. data/lib/braintree/successful_result.rb +19 -1
  47. data/lib/braintree/three_d_secure_info.rb +5 -1
  48. data/lib/braintree/transaction.rb +54 -48
  49. data/lib/braintree/transaction/address_details.rb +13 -4
  50. data/lib/braintree/transaction/amex_express_checkout_details.rb +9 -2
  51. data/lib/braintree/transaction/android_pay_details.rb +10 -3
  52. data/lib/braintree/transaction/apple_pay_details.rb +7 -2
  53. data/lib/braintree/transaction/coinbase_details.rb +4 -1
  54. data/lib/braintree/transaction/credit_card_details.rb +40 -6
  55. data/lib/braintree/transaction/customer_details.rb +8 -1
  56. data/lib/braintree/transaction/disbursement_details.rb +5 -1
  57. data/lib/braintree/transaction/ideal_payment_details.rb +5 -1
  58. data/lib/braintree/transaction/masterpass_card_details.rb +18 -4
  59. data/lib/braintree/transaction/paypal_details.rb +18 -4
  60. data/lib/braintree/transaction/status_details.rb +5 -1
  61. data/lib/braintree/transaction/subscription_details.rb +2 -1
  62. data/lib/braintree/transaction/us_bank_account_details.rb +8 -1
  63. data/lib/braintree/transaction/venmo_account_details.rb +5 -1
  64. data/lib/braintree/transaction/visa_checkout_card_details.rb +19 -4
  65. data/lib/braintree/transaction_gateway.rb +1 -0
  66. data/lib/braintree/transaction_line_item.rb +34 -0
  67. data/lib/braintree/transaction_line_item_gateway.rb +19 -0
  68. data/lib/braintree/unknown_payment_method.rb +2 -1
  69. data/lib/braintree/us_bank_account.rb +9 -1
  70. data/lib/braintree/util.rb +14 -0
  71. data/lib/braintree/validation_error.rb +3 -1
  72. data/lib/braintree/venmo_account.rb +10 -3
  73. data/lib/braintree/version.rb +2 -2
  74. data/lib/braintree/visa_checkout_card.rb +27 -11
  75. data/lib/braintree/webhook_notification.rb +9 -9
  76. data/spec/httpsd.pid +1 -0
  77. data/spec/integration/braintree/apple_pay_spec.rb +2 -31
  78. data/spec/integration/braintree/http_spec.rb +1 -1
  79. data/spec/integration/braintree/transaction_spec.rb +1142 -0
  80. metadata +205 -207
  81. data/README.rdoc +0 -102
@@ -3,7 +3,8 @@ module Braintree
3
3
  class TransactionDetails # :nodoc:
4
4
  include BaseModule
5
5
 
6
- attr_reader :amount, :id
6
+ attr_reader :amount
7
+ attr_reader :id
7
8
 
8
9
  def initialize(attributes)
9
10
  set_instance_variables_from_hash attributes unless attributes.nil?
@@ -1,6 +1,7 @@
1
1
  module Braintree
2
2
  class DocumentUpload
3
3
  include BaseModule
4
+ include Braintree::Util::IdEquality
4
5
 
5
6
  module Kind
6
7
  IdentityDocument = "identity_document"
@@ -8,7 +9,11 @@ module Braintree
8
9
  PayoutInvoiceDocument = "payout_invoice_document"
9
10
  end
10
11
 
11
- attr_reader :id, :kind, :content_type, :name, :size
12
+ attr_reader :content_type
13
+ attr_reader :id
14
+ attr_reader :kind
15
+ attr_reader :name
16
+ attr_reader :size
12
17
 
13
18
  def self.create(attributes)
14
19
  Configuration.gateway.document_upload.create(attributes)
@@ -18,12 +23,6 @@ module Braintree
18
23
  set_instance_variables_from_hash(attributes)
19
24
  end
20
25
 
21
- # True if <tt>other</tt> has the same id.
22
- def ==(other)
23
- return false unless other.is_a?(DocumentUpload)
24
- id == other.id
25
- end
26
-
27
26
  class << self
28
27
  protected :new
29
28
  def _new(*args) # :nodoc:
@@ -310,6 +310,8 @@ module Braintree
310
310
  FinalAuthSubmitForSettlementForDifferentAmount = "95601"
311
311
  HasAlreadyBeenRefunded = "91512"
312
312
  IdealPaymentNotComplete = "815141"
313
+ TooManyLineItems = "915157"
314
+ LineItemsExpected = "915158"
313
315
  DiscountAmountFormatIsInvalid = "915159"
314
316
  DiscountAmountCannotBeNegative = "915160"
315
317
  DiscountAmountIsTooLarge = "915161"
@@ -418,6 +420,34 @@ module Braintree
418
420
  end
419
421
  end
420
422
 
423
+ module TransactionLineItem
424
+ CommodityCodeIsTooLong = "95801"
425
+ DescriptionIsTooLong = "95803"
426
+ DiscountAmountFormatIsInvalid = "95804"
427
+ DiscountAmountIsTooLarge = "95805"
428
+ DiscountAmountMustBeGreaterThanZero = "95806"
429
+ KindIsInvalid = "95807"
430
+ KindIsRequired = "95808"
431
+ NameIsRequired = "95822"
432
+ NameIsTooLong = "95823"
433
+ ProductCodeIsTooLong = "95809"
434
+ QuantityFormatIsInvalid = "95810"
435
+ QuantityIsRequired = "95811"
436
+ QuantityIsTooLarge = "95812"
437
+ TotalAmountFormatIsInvalid = "95813"
438
+ TotalAmountIsRequired = "95814"
439
+ TotalAmountIsTooLarge = "95815"
440
+ TotalAmountMustBeGreaterThanZero = "95816"
441
+ UnitAmountFormatIsInvalid = "95817"
442
+ UnitAmountIsRequired = "95818"
443
+ UnitAmountIsTooLarge = "95819"
444
+ UnitAmountMustBeGreaterThanZero = "95820"
445
+ UnitOfMeasureIsTooLong = "95821"
446
+ UnitTaxAmountFormatIsInvalid = "95824"
447
+ UnitTaxAmountIsTooLarge = "95825"
448
+ UnitTaxAmountMustBeGreaterThanZero = "95826"
449
+ end
450
+
421
451
  module Merchant
422
452
  CountryCannotBeBlank = "83603"
423
453
  CountryCodeAlpha2IsInvalid = "93607"
@@ -1,7 +1,14 @@
1
1
  module Braintree
2
2
  class ErrorResult
3
3
 
4
- attr_reader :credit_card_verification, :merchant_account, :transaction, :subscription, :errors, :params, :message, :verification
4
+ attr_reader :credit_card_verification
5
+ attr_reader :errors
6
+ attr_reader :merchant_account
7
+ attr_reader :message
8
+ attr_reader :params
9
+ attr_reader :subscription
10
+ attr_reader :transaction
11
+ attr_reader :verification
5
12
 
6
13
  def initialize(gateway, data) # :nodoc:
7
14
  @gateway = gateway
@@ -7,7 +7,9 @@ module Braintree
7
7
  Consumer = 'consumer'
8
8
  end
9
9
 
10
- attr_reader :token, :image_url, :customer_id
10
+ attr_reader :customer_id
11
+ attr_reader :image_url
12
+ attr_reader :token
11
13
 
12
14
  def initialize(gateway, attributes) # :nodoc:
13
15
  @gateway = gateway
@@ -2,7 +2,9 @@ module Braintree
2
2
  class FacilitatedDetails # :nodoc:
3
3
  include BaseModule
4
4
 
5
- attr_reader :merchant_id, :merchant_name, :payment_method_nonce
5
+ attr_reader :merchant_id
6
+ attr_reader :merchant_name
7
+ attr_reader :payment_method_nonce
6
8
 
7
9
  def initialize(attributes)
8
10
  set_instance_variables_from_hash attributes unless attributes.nil?
@@ -2,7 +2,8 @@ module Braintree
2
2
  class FacilitatorDetails # :nodoc:
3
3
  include BaseModule
4
4
 
5
- attr_reader :oauth_application_client_id, :oauth_application_name
5
+ attr_reader :oauth_application_client_id
6
+ attr_reader :oauth_application_name
6
7
 
7
8
  def initialize(attributes)
8
9
  set_instance_variables_from_hash attributes unless attributes.nil?
@@ -104,6 +104,10 @@ module Braintree
104
104
  TransactionGateway.new(self)
105
105
  end
106
106
 
107
+ def transaction_line_item
108
+ TransactionLineItemGateway.new(self)
109
+ end
110
+
107
111
  def testing
108
112
  TestingGateway.new(self)
109
113
  end
@@ -2,7 +2,11 @@ module Braintree
2
2
  class GrantedPaymentInstrumentUpdate
3
3
  include BaseModule
4
4
 
5
- attr_reader :grant_owner_merchant_id, :grant_recipient_merchant_id, :payment_method_nonce, :token, :updated_fields
5
+ attr_reader :grant_owner_merchant_id
6
+ attr_reader :grant_recipient_merchant_id
7
+ attr_reader :payment_method_nonce
8
+ attr_reader :token
9
+ attr_reader :updated_fields
6
10
 
7
11
  def initialize(attributes)
8
12
  set_instance_variables_from_hash(attributes)
@@ -2,7 +2,15 @@ module Braintree
2
2
  class IdealPayment
3
3
  include BaseModule
4
4
 
5
- attr_reader :id, :ideal_transaction_id, :currency, :amount, :status, :order_id, :issuer, :approval_url, :iban_bank_account
5
+ attr_reader :amount
6
+ attr_reader :approval_url
7
+ attr_reader :currency
8
+ attr_reader :iban_bank_account
9
+ attr_reader :id
10
+ attr_reader :ideal_transaction_id
11
+ attr_reader :issuer
12
+ attr_reader :order_id
13
+ attr_reader :status
6
14
 
7
15
  def initialize(gateway, attributes) # :nodoc:
8
16
  @gateway = gateway
@@ -36,7 +44,12 @@ module Braintree
36
44
 
37
45
  class IbanBankAccount
38
46
  include BaseModule
39
- attr_reader :account_holder_name, :bic, :masked_iban, :iban_account_number_last_4, :iban_country, :description
47
+ attr_reader :account_holder_name
48
+ attr_reader :bic
49
+ attr_reader :description
50
+ attr_reader :iban_account_number_last_4
51
+ attr_reader :iban_country
52
+ attr_reader :masked_iban
40
53
 
41
54
  def initialize(attributes) # :nodoc:
42
55
  set_instance_variables_from_hash(attributes)
@@ -1,13 +1,33 @@
1
1
  module Braintree
2
2
  class MasterpassCard
3
3
  include BaseModule # :nodoc:
4
+ include Braintree::Util::TokenEquality
4
5
 
5
- attr_reader :billing_address, :bin, :card_type, :cardholder_name,
6
- :commercial, :country_of_issuance, :created_at, :customer_id,
7
- :customer_location, :debit, :durbin_regulated, :expiration_month,
8
- :expiration_year, :healthcare, :issuing_bank, :last_4, :payroll,
9
- :prepaid, :product_id, :subscriptions, :token, :unique_number_identifier,
10
- :updated_at, :image_url, :verification
6
+ attr_reader :billing_address
7
+ attr_reader :bin
8
+ attr_reader :card_type
9
+ attr_reader :cardholder_name
10
+ attr_reader :commercial
11
+ attr_reader :country_of_issuance
12
+ attr_reader :created_at
13
+ attr_reader :customer_id
14
+ attr_reader :customer_location
15
+ attr_reader :debit
16
+ attr_reader :durbin_regulated
17
+ attr_reader :expiration_month
18
+ attr_reader :expiration_year
19
+ attr_reader :healthcare
20
+ attr_reader :image_url
21
+ attr_reader :issuing_bank
22
+ attr_reader :last_4
23
+ attr_reader :payroll
24
+ attr_reader :prepaid
25
+ attr_reader :product_id
26
+ attr_reader :subscriptions
27
+ attr_reader :token
28
+ attr_reader :unique_number_identifier
29
+ attr_reader :updated_at
30
+ attr_reader :verification
11
31
 
12
32
  def initialize(gateway, attributes) # :nodoc:
13
33
  @gateway = gateway
@@ -35,11 +55,6 @@ module Braintree
35
55
  @expired
36
56
  end
37
57
 
38
- def ==(other)
39
- return false unless other.is_a?(MasterpassCard)
40
- token == other.token
41
- end
42
-
43
58
  def inspect # :nodoc:
44
59
  first = [:token]
45
60
  order = first + (self.class._attributes - first)
@@ -2,7 +2,14 @@ module Braintree
2
2
  class Merchant
3
3
  include BaseModule # :nodoc:
4
4
 
5
- attr_reader :id, :email, :company_name, :country_code_alpha2, :country_code_alpha3, :country_code_numeric, :country_name, :merchant_accounts
5
+ attr_reader :company_name
6
+ attr_reader :country_code_alpha2
7
+ attr_reader :country_code_alpha3
8
+ attr_reader :country_code_numeric
9
+ attr_reader :country_name
10
+ attr_reader :email
11
+ attr_reader :id
12
+ attr_reader :merchant_accounts
6
13
 
7
14
  def initialize(gateway, attributes) # :nodoc:
8
15
  @merchant_accounts = attributes.delete(:merchant_accounts).map do |merchant_account|
@@ -18,9 +18,14 @@ module Braintree
18
18
  include Braintree::MerchantAccount::FundingDestination
19
19
  end
20
20
 
21
- attr_reader :status, :id, :master_merchant_account,
22
- :individual_details, :business_details, :funding_details,
23
- :currency_iso_code, :default
21
+ attr_reader :business_details
22
+ attr_reader :currency_iso_code
23
+ attr_reader :default
24
+ attr_reader :funding_details
25
+ attr_reader :id
26
+ attr_reader :individual_details
27
+ attr_reader :master_merchant_account
28
+ attr_reader :status
24
29
 
25
30
  alias_method :default?, :default
26
31
 
@@ -3,7 +3,10 @@ module Braintree
3
3
  class AddressDetails
4
4
  include BaseModule
5
5
 
6
- attr_reader :street_address, :locality, :region, :postal_code
6
+ attr_reader :locality
7
+ attr_reader :postal_code
8
+ attr_reader :region
9
+ attr_reader :street_address
7
10
 
8
11
  def initialize(attributes)
9
12
  set_instance_variables_from_hash attributes unless attributes.nil?
@@ -3,7 +3,10 @@ module Braintree
3
3
  class BusinessDetails
4
4
  include BaseModule
5
5
 
6
- attr_reader :dba_name, :legal_name, :tax_id, :address_details
6
+ attr_reader :address_details
7
+ attr_reader :dba_name
8
+ attr_reader :legal_name
9
+ attr_reader :tax_id
7
10
 
8
11
  def initialize(attributes)
9
12
  set_instance_variables_from_hash attributes unless attributes.nil?
@@ -3,7 +3,12 @@ module Braintree
3
3
  class FundingDetails
4
4
  include BaseModule
5
5
 
6
- attr_reader :account_number_last_4, :destination, :email, :mobile_phone, :routing_number, :descriptor
6
+ attr_reader :account_number_last_4
7
+ attr_reader :descriptor
8
+ attr_reader :destination
9
+ attr_reader :email
10
+ attr_reader :mobile_phone
11
+ attr_reader :routing_number
7
12
 
8
13
  def initialize(attributes)
9
14
  set_instance_variables_from_hash attributes unless attributes.nil?
@@ -3,8 +3,13 @@ module Braintree
3
3
  class IndividualDetails
4
4
  include BaseModule
5
5
 
6
- attr_reader :first_name, :last_name, :email, :phone, :date_of_birth, :ssn_last_4,
7
- :address_details
6
+ attr_reader :address_details
7
+ attr_reader :date_of_birth
8
+ attr_reader :email
9
+ attr_reader :first_name
10
+ attr_reader :last_name
11
+ attr_reader :phone
12
+ attr_reader :ssn_last_4
8
13
 
9
14
  def initialize(attributes)
10
15
  set_instance_variables_from_hash attributes unless attributes.nil?
@@ -2,7 +2,10 @@ module Braintree
2
2
  class OAuthCredentials
3
3
  include BaseModule # :nodoc:
4
4
 
5
- attr_reader :access_token, :refresh_token, :expires_at, :token_type
5
+ attr_reader :access_token
6
+ attr_reader :expires_at
7
+ attr_reader :refresh_token
8
+ attr_reader :token_type
6
9
 
7
10
  def initialize(attributes) # :nodoc:
8
11
  set_instance_variables_from_hash(attributes)
@@ -2,7 +2,9 @@ module Braintree
2
2
  class PaginatedResult
3
3
  include BaseModule
4
4
 
5
- attr_reader :total_items, :current_page, :page_size
5
+ attr_reader :current_page
6
+ attr_reader :page_size
7
+ attr_reader :total_items
6
8
 
7
9
  def initialize(total_items, page_size, current_page) # :nodoc:
8
10
  @total_items = total_items
@@ -10,7 +10,11 @@ module Braintree
10
10
  Configuration.gateway.payment_method_nonce.find(payment_method_nonce)
11
11
  end
12
12
 
13
- attr_reader :nonce, :three_d_secure_info, :type, :details, :bin_data
13
+ attr_reader :bin_data
14
+ attr_reader :details
15
+ attr_reader :nonce
16
+ attr_reader :three_d_secure_info
17
+ attr_reader :type
14
18
 
15
19
  def initialize(gateway, attributes) # :nodoc:
16
20
  @gateway = gateway
@@ -2,7 +2,14 @@ module Braintree
2
2
  class PayPalAccount
3
3
  include BaseModule
4
4
 
5
- attr_reader :email, :token, :image_url, :created_at, :updated_at, :subscriptions, :billing_agreement_id, :customer_id
5
+ attr_reader :billing_agreement_id
6
+ attr_reader :created_at
7
+ attr_reader :customer_id
8
+ attr_reader :email
9
+ attr_reader :image_url
10
+ attr_reader :subscriptions
11
+ attr_reader :token
12
+ attr_reader :updated_at
6
13
 
7
14
  def initialize(gateway, attributes) # :nodoc:
8
15
  @gateway = gateway
@@ -2,22 +2,22 @@ module Braintree
2
2
  class Plan
3
3
  include BaseModule
4
4
 
5
- attr_reader :id
6
- attr_reader :merchant_id
5
+ attr_reader :add_ons
7
6
  attr_reader :billing_day_of_month
8
7
  attr_reader :billing_frequency
8
+ attr_reader :created_at
9
9
  attr_reader :currency_iso_code
10
10
  attr_reader :description
11
11
  attr_reader :discounts
12
+ attr_reader :id
13
+ attr_reader :merchant_id
12
14
  attr_reader :name
13
15
  attr_reader :number_of_billing_cycles
14
16
  attr_reader :price
15
17
  attr_reader :trial_duration
16
18
  attr_reader :trial_duration_unit
17
19
  attr_reader :trial_period
18
- attr_reader :created_at
19
20
  attr_reader :updated_at
20
- attr_reader :add_ons
21
21
 
22
22
  def self.all
23
23
  Configuration.gateway.plan.all
@@ -2,7 +2,9 @@ module Braintree
2
2
  class RiskData # :nodoc:
3
3
  include BaseModule
4
4
 
5
- attr_reader :id, :decision, :device_data_captured
5
+ attr_reader :decision
6
+ attr_reader :device_data_captured
7
+ attr_reader :id
6
8
 
7
9
  def initialize(attributes)
8
10
  set_instance_variables_from_hash attributes unless attributes.nil?
@@ -1,6 +1,7 @@
1
1
  module Braintree
2
2
  class SettlementBatchSummary
3
3
  include BaseModule
4
+
4
5
  attr_reader :records
5
6
 
6
7
  def self.generate(settlement_date, group_by_custom_field = nil)
@@ -1,6 +1,7 @@
1
1
  module Braintree
2
2
  class Subscription
3
3
  include BaseModule
4
+ include Braintree::Util::IdEquality
4
5
 
5
6
  module Source
6
7
  Api = "api"
@@ -24,20 +25,35 @@ module Braintree
24
25
  Month = "month"
25
26
  end
26
27
 
27
- attr_reader :days_past_due, :price, :plan_id, :id, :status, :payment_method_token, :merchant_account_id
28
- attr_reader :first_billing_date, :next_billing_date, :billing_period_start_date, :billing_period_end_date
29
- attr_reader :paid_through_date, :balance
30
- attr_reader :trial_period, :trial_duration, :trial_duration_unit
28
+ attr_reader :add_ons
29
+ attr_reader :balance
30
+ attr_reader :billing_day_of_month
31
+ attr_reader :billing_period_end_date
32
+ attr_reader :billing_period_start_date
33
+ attr_reader :created_at
34
+ attr_reader :current_billing_cycle
35
+ attr_reader :days_past_due
36
+ attr_reader :description
37
+ attr_reader :descriptor
38
+ attr_reader :discounts
31
39
  attr_reader :failure_count
32
- attr_reader :transactions
40
+ attr_reader :first_billing_date
41
+ attr_reader :id
42
+ attr_reader :merchant_account_id
43
+ attr_reader :next_billing_date
33
44
  attr_reader :next_billing_period_amount
34
- attr_reader :number_of_billing_cycles, :billing_day_of_month
35
- attr_reader :add_ons, :discounts
36
- attr_reader :descriptor
37
- attr_reader :description
38
- attr_reader :current_billing_cycle
39
- attr_reader :updated_at, :created_at
45
+ attr_reader :number_of_billing_cycles
46
+ attr_reader :paid_through_date
47
+ attr_reader :payment_method_token
48
+ attr_reader :plan_id
49
+ attr_reader :price
50
+ attr_reader :status
40
51
  attr_reader :status_history
52
+ attr_reader :transactions
53
+ attr_reader :trial_duration
54
+ attr_reader :trial_duration_unit
55
+ attr_reader :trial_period
56
+ attr_reader :updated_at
41
57
 
42
58
  def self.cancel(subscription_id)
43
59
  Configuration.gateway.subscription.cancel(subscription_id)
@@ -92,12 +108,6 @@ module Braintree
92
108
  @never_expires
93
109
  end
94
110
 
95
- # True if <tt>other</tt> has the same id.
96
- def ==(other)
97
- return false unless other.is_a?(Subscription)
98
- id == other.id
99
- end
100
-
101
111
  class << self
102
112
  protected :new
103
113
  def _new(*args) # :nodoc: