braintree 2.80.1 → 2.81.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/braintree.rb +4 -1
- data/lib/braintree/account_updater_daily_report.rb +1 -1
- data/lib/braintree/ach_mandate.rb +2 -1
- data/lib/braintree/address.rb +16 -3
- data/lib/braintree/amex_express_checkout_card.rb +14 -2
- data/lib/braintree/android_pay_card.rb +16 -3
- data/lib/braintree/apple_pay_card.rb +15 -3
- data/lib/braintree/bin_data.rb +9 -2
- data/lib/braintree/coinbase_account.rb +10 -1
- data/lib/braintree/connected_merchant_paypal_status_changed.rb +3 -1
- data/lib/braintree/connected_merchant_status_transitioned.rb +3 -1
- data/lib/braintree/credentials_parser.rb +5 -1
- data/lib/braintree/credit_card.rb +25 -10
- data/lib/braintree/credit_card_verification.rb +32 -14
- data/lib/braintree/customer.rb +24 -11
- data/lib/braintree/descriptor.rb +3 -1
- data/lib/braintree/disbursement.rb +9 -1
- data/lib/braintree/dispute.rb +1 -6
- data/lib/braintree/dispute/transaction_details.rb +2 -1
- data/lib/braintree/document_upload.rb +6 -7
- data/lib/braintree/error_codes.rb +30 -0
- data/lib/braintree/error_result.rb +8 -1
- data/lib/braintree/europe_bank_account.rb +3 -1
- data/lib/braintree/facilitated_details.rb +3 -1
- data/lib/braintree/facilitator_details.rb +2 -1
- data/lib/braintree/gateway.rb +4 -0
- data/lib/braintree/granted_payment_instrument_update.rb +5 -1
- data/lib/braintree/ideal_payment.rb +15 -2
- data/lib/braintree/masterpass_card.rb +26 -11
- data/lib/braintree/merchant.rb +8 -1
- data/lib/braintree/merchant_account.rb +8 -3
- data/lib/braintree/merchant_account/address_details.rb +4 -1
- data/lib/braintree/merchant_account/business_details.rb +4 -1
- data/lib/braintree/merchant_account/funding_details.rb +6 -1
- data/lib/braintree/merchant_account/individual_details.rb +7 -2
- data/lib/braintree/oauth_credentials.rb +4 -1
- data/lib/braintree/paginated_result.rb +3 -1
- data/lib/braintree/payment_method_nonce.rb +5 -1
- data/lib/braintree/paypal_account.rb +8 -1
- data/lib/braintree/plan.rb +4 -4
- data/lib/braintree/risk_data.rb +3 -1
- data/lib/braintree/settlement_batch_summary.rb +1 -0
- data/lib/braintree/subscription.rb +27 -17
- data/lib/braintree/subscription/status_details.rb +8 -1
- data/lib/braintree/successful_result.rb +19 -1
- data/lib/braintree/three_d_secure_info.rb +5 -1
- data/lib/braintree/transaction.rb +54 -48
- data/lib/braintree/transaction/address_details.rb +13 -4
- data/lib/braintree/transaction/amex_express_checkout_details.rb +9 -2
- data/lib/braintree/transaction/android_pay_details.rb +10 -3
- data/lib/braintree/transaction/apple_pay_details.rb +7 -2
- data/lib/braintree/transaction/coinbase_details.rb +4 -1
- data/lib/braintree/transaction/credit_card_details.rb +40 -6
- data/lib/braintree/transaction/customer_details.rb +8 -1
- data/lib/braintree/transaction/disbursement_details.rb +5 -1
- data/lib/braintree/transaction/ideal_payment_details.rb +5 -1
- data/lib/braintree/transaction/masterpass_card_details.rb +18 -4
- data/lib/braintree/transaction/paypal_details.rb +18 -4
- data/lib/braintree/transaction/status_details.rb +5 -1
- data/lib/braintree/transaction/subscription_details.rb +2 -1
- data/lib/braintree/transaction/us_bank_account_details.rb +8 -1
- data/lib/braintree/transaction/venmo_account_details.rb +5 -1
- data/lib/braintree/transaction/visa_checkout_card_details.rb +19 -4
- data/lib/braintree/transaction_gateway.rb +1 -0
- data/lib/braintree/transaction_line_item.rb +34 -0
- data/lib/braintree/transaction_line_item_gateway.rb +19 -0
- data/lib/braintree/unknown_payment_method.rb +2 -1
- data/lib/braintree/us_bank_account.rb +9 -1
- data/lib/braintree/util.rb +14 -0
- data/lib/braintree/validation_error.rb +3 -1
- data/lib/braintree/venmo_account.rb +10 -3
- data/lib/braintree/version.rb +2 -2
- data/lib/braintree/visa_checkout_card.rb +27 -11
- data/lib/braintree/webhook_notification.rb +9 -9
- data/spec/httpsd.pid +1 -0
- data/spec/integration/braintree/apple_pay_spec.rb +2 -31
- data/spec/integration/braintree/http_spec.rb +1 -1
- data/spec/integration/braintree/transaction_spec.rb +1142 -0
- metadata +205 -207
- data/README.rdoc +0 -102
@@ -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 :
|
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
|
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
|
@@ -2,7 +2,9 @@ module Braintree
|
|
2
2
|
class FacilitatedDetails # :nodoc:
|
3
3
|
include BaseModule
|
4
4
|
|
5
|
-
attr_reader :merchant_id
|
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
|
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?
|
data/lib/braintree/gateway.rb
CHANGED
@@ -2,7 +2,11 @@ module Braintree
|
|
2
2
|
class GrantedPaymentInstrumentUpdate
|
3
3
|
include BaseModule
|
4
4
|
|
5
|
-
attr_reader :grant_owner_merchant_id
|
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 :
|
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
|
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
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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)
|
data/lib/braintree/merchant.rb
CHANGED
@@ -2,7 +2,14 @@ module Braintree
|
|
2
2
|
class Merchant
|
3
3
|
include BaseModule # :nodoc:
|
4
4
|
|
5
|
-
attr_reader :
|
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 :
|
22
|
-
|
23
|
-
|
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 :
|
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 :
|
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
|
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 :
|
7
|
-
|
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
|
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 :
|
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 :
|
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 :
|
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
|
data/lib/braintree/plan.rb
CHANGED
@@ -2,22 +2,22 @@ module Braintree
|
|
2
2
|
class Plan
|
3
3
|
include BaseModule
|
4
4
|
|
5
|
-
attr_reader :
|
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
|
data/lib/braintree/risk_data.rb
CHANGED
@@ -2,7 +2,9 @@ module Braintree
|
|
2
2
|
class RiskData # :nodoc:
|
3
3
|
include BaseModule
|
4
4
|
|
5
|
-
attr_reader :
|
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 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 :
|
28
|
-
attr_reader :
|
29
|
-
attr_reader :
|
30
|
-
attr_reader :
|
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 :
|
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
|
35
|
-
attr_reader :
|
36
|
-
attr_reader :
|
37
|
-
attr_reader :
|
38
|
-
attr_reader :
|
39
|
-
attr_reader :
|
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:
|