braintree 4.15.0 → 4.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/lib/braintree/account_updater_daily_report.rb +3 -3
  3. data/lib/braintree/ach_mandate.rb +1 -1
  4. data/lib/braintree/add_on_gateway.rb +1 -1
  5. data/lib/braintree/address.rb +4 -4
  6. data/lib/braintree/address_gateway.rb +5 -5
  7. data/lib/braintree/advanced_search.rb +10 -10
  8. data/lib/braintree/apple_pay.rb +3 -3
  9. data/lib/braintree/apple_pay_card.rb +3 -3
  10. data/lib/braintree/apple_pay_options.rb +3 -3
  11. data/lib/braintree/authorization_adjustment.rb +3 -3
  12. data/lib/braintree/base_module.rb +1 -1
  13. data/lib/braintree/bin_data.rb +2 -2
  14. data/lib/braintree/client_token_gateway.rb +1 -1
  15. data/lib/braintree/configuration.rb +22 -22
  16. data/lib/braintree/connected_merchant_paypal_status_changed.rb +1 -1
  17. data/lib/braintree/connected_merchant_status_transitioned.rb +1 -1
  18. data/lib/braintree/credit_card.rb +9 -9
  19. data/lib/braintree/credit_card_gateway.rb +8 -8
  20. data/lib/braintree/credit_card_verification.rb +3 -3
  21. data/lib/braintree/credit_card_verification_gateway.rb +28 -11
  22. data/lib/braintree/credit_card_verification_search.rb +1 -1
  23. data/lib/braintree/customer.rb +5 -9
  24. data/lib/braintree/customer_gateway.rb +7 -7
  25. data/lib/braintree/customer_search.rb +1 -1
  26. data/lib/braintree/descriptor.rb +1 -1
  27. data/lib/braintree/digest.rb +1 -1
  28. data/lib/braintree/disbursement.rb +5 -5
  29. data/lib/braintree/discount_gateway.rb +1 -1
  30. data/lib/braintree/dispute/evidence.rb +1 -1
  31. data/lib/braintree/dispute/paypal_message.rb +1 -1
  32. data/lib/braintree/dispute/status_history.rb +1 -1
  33. data/lib/braintree/dispute/transaction.rb +1 -1
  34. data/lib/braintree/dispute/transaction_details.rb +1 -1
  35. data/lib/braintree/dispute.rb +3 -3
  36. data/lib/braintree/dispute_gateway.rb +1 -1
  37. data/lib/braintree/dispute_search.rb +1 -1
  38. data/lib/braintree/document_upload.rb +2 -2
  39. data/lib/braintree/document_upload_gateway.rb +3 -3
  40. data/lib/braintree/enriched_customer_data.rb +2 -2
  41. data/lib/braintree/error_codes.rb +4 -0
  42. data/lib/braintree/error_result.rb +2 -3
  43. data/lib/braintree/errors.rb +3 -3
  44. data/lib/braintree/exceptions.rb +1 -2
  45. data/lib/braintree/exchange_rate.rb +2 -2
  46. data/lib/braintree/exchange_rate_quote.rb +3 -3
  47. data/lib/braintree/exchange_rate_quote_gateway.rb +1 -1
  48. data/lib/braintree/exchange_rate_quote_input.rb +3 -3
  49. data/lib/braintree/exchange_rate_quote_request.rb +3 -3
  50. data/lib/braintree/exchange_rate_quote_response.rb +3 -3
  51. data/lib/braintree/facilitated_details.rb +1 -1
  52. data/lib/braintree/facilitator_details.rb +1 -1
  53. data/lib/braintree/google_pay_card.rb +3 -3
  54. data/lib/braintree/granted_payment_instrument_update.rb +1 -1
  55. data/lib/braintree/graphql_client.rb +1 -1
  56. data/lib/braintree/http.rb +5 -5
  57. data/lib/braintree/local_payment_completed.rb +2 -2
  58. data/lib/braintree/local_payment_expired.rb +2 -2
  59. data/lib/braintree/local_payment_funded.rb +2 -2
  60. data/lib/braintree/local_payment_reversed.rb +2 -2
  61. data/lib/braintree/merchant.rb +3 -3
  62. data/lib/braintree/merchant_account.rb +2 -2
  63. data/lib/braintree/merchant_account_gateway.rb +9 -9
  64. data/lib/braintree/meta_checkout_card.rb +89 -0
  65. data/lib/braintree/meta_checkout_token.rb +88 -0
  66. data/lib/braintree/modification.rb +3 -3
  67. data/lib/braintree/oauth_credentials.rb +3 -3
  68. data/lib/braintree/paginated_collection.rb +2 -2
  69. data/lib/braintree/paginated_result.rb +1 -1
  70. data/lib/braintree/payment_instrument_type.rb +2 -0
  71. data/lib/braintree/payment_method_customer_data_updated_metadata.rb +2 -2
  72. data/lib/braintree/payment_method_gateway.rb +8 -7
  73. data/lib/braintree/payment_method_nonce.rb +4 -4
  74. data/lib/braintree/payment_method_nonce_details.rb +1 -1
  75. data/lib/braintree/payment_method_nonce_details_payer_info.rb +1 -1
  76. data/lib/braintree/payment_method_nonce_gateway.rb +1 -1
  77. data/lib/braintree/paypal_account.rb +1 -2
  78. data/lib/braintree/paypal_account_gateway.rb +5 -5
  79. data/lib/braintree/plan.rb +1 -1
  80. data/lib/braintree/plan_gateway.rb +2 -2
  81. data/lib/braintree/resource_collection.rb +2 -2
  82. data/lib/braintree/revoked_payment_method_metadata.rb +1 -1
  83. data/lib/braintree/risk_data.rb +1 -1
  84. data/lib/braintree/samsung_pay_card.rb +5 -5
  85. data/lib/braintree/sepa_direct_debit_account.rb +2 -2
  86. data/lib/braintree/sepa_direct_debit_account_nonce_details.rb +1 -1
  87. data/lib/braintree/settlement_batch_summary_gateway.rb +1 -1
  88. data/lib/braintree/sha256_digest.rb +1 -1
  89. data/lib/braintree/subscription/status_details.rb +1 -1
  90. data/lib/braintree/subscription.rb +2 -2
  91. data/lib/braintree/subscription_gateway.rb +6 -6
  92. data/lib/braintree/subscription_search.rb +1 -1
  93. data/lib/braintree/successful_result.rb +2 -2
  94. data/lib/braintree/test/credit_card.rb +7 -10
  95. data/lib/braintree/test/merchant_account.rb +1 -1
  96. data/lib/braintree/test/nonce.rb +3 -0
  97. data/lib/braintree/test/transaction_amounts.rb +2 -3
  98. data/lib/braintree/testing_gateway.rb +1 -1
  99. data/lib/braintree/three_d_secure_info.rb +1 -1
  100. data/lib/braintree/transaction/address_details.rb +2 -1
  101. data/lib/braintree/transaction/credit_card_details.rb +1 -1
  102. data/lib/braintree/transaction/customer_details.rb +1 -1
  103. data/lib/braintree/transaction/disbursement_details.rb +1 -1
  104. data/lib/braintree/transaction/meta_checkout_card_details.rb +52 -0
  105. data/lib/braintree/transaction/meta_checkout_token_details.rb +54 -0
  106. data/lib/braintree/transaction/package_details.rb +16 -0
  107. data/lib/braintree/transaction/samsung_pay_card_details.rb +1 -1
  108. data/lib/braintree/transaction/sepa_direct_debit_account_details.rb +1 -1
  109. data/lib/braintree/transaction/status_details.rb +1 -1
  110. data/lib/braintree/transaction/subscription_details.rb +1 -1
  111. data/lib/braintree/transaction/us_bank_account_details.rb +1 -1
  112. data/lib/braintree/transaction/visa_checkout_card_details.rb +1 -1
  113. data/lib/braintree/transaction.rb +32 -16
  114. data/lib/braintree/transaction_gateway.rb +30 -13
  115. data/lib/braintree/transaction_line_item.rb +13 -10
  116. data/lib/braintree/transaction_line_item_gateway.rb +1 -1
  117. data/lib/braintree/transaction_review.rb +1 -1
  118. data/lib/braintree/transaction_search.rb +1 -1
  119. data/lib/braintree/unknown_payment_method.rb +1 -1
  120. data/lib/braintree/us_bank_account.rb +2 -2
  121. data/lib/braintree/us_bank_account_verification.rb +23 -15
  122. data/lib/braintree/us_bank_account_verification_search.rb +1 -1
  123. data/lib/braintree/util.rb +3 -3
  124. data/lib/braintree/validation_error.rb +1 -1
  125. data/lib/braintree/validation_error_collection.rb +3 -3
  126. data/lib/braintree/venmo_account.rb +3 -3
  127. data/lib/braintree/venmo_profile_data.rb +6 -4
  128. data/lib/braintree/version.rb +1 -1
  129. data/lib/braintree/visa_checkout_card.rb +7 -7
  130. data/lib/braintree/webhook_notification.rb +2 -2
  131. data/lib/braintree/webhook_notification_gateway.rb +4 -4
  132. data/lib/braintree/webhook_testing.rb +1 -1
  133. data/lib/braintree/webhook_testing_gateway.rb +1 -1
  134. data/lib/braintree/xml/generator.rb +1 -1
  135. data/lib/braintree/xml/libxml.rb +1 -1
  136. data/lib/braintree/xml/parser.rb +3 -3
  137. data/lib/braintree/xml/rexml.rb +2 -2
  138. data/lib/braintree/xml.rb +1 -1
  139. data/lib/braintree.rb +5 -1
  140. data/spec/integration/braintree/client_api/spec_helper.rb +2 -2
  141. data/spec/integration/braintree/credit_card_spec.rb +4 -5
  142. data/spec/integration/braintree/credit_card_verification_spec.rb +46 -1
  143. data/spec/integration/braintree/customer_spec.rb +4 -4
  144. data/spec/integration/braintree/dispute_search_spec.rb +0 -1
  145. data/spec/integration/braintree/package_tracking_spec.rb +111 -0
  146. data/spec/integration/braintree/payment_method_nonce_spec.rb +20 -0
  147. data/spec/integration/braintree/payment_method_spec.rb +2 -2
  148. data/spec/integration/braintree/payment_method_us_bank_account_spec.rb +72 -0
  149. data/spec/integration/braintree/transaction_line_item_spec.rb +6 -0
  150. data/spec/integration/braintree/transaction_search_spec.rb +27 -0
  151. data/spec/integration/braintree/transaction_spec.rb +299 -89
  152. data/spec/unit/braintree/base_module_spec.rb +1 -1
  153. data/spec/unit/braintree/credit_card_verification_gateway_spec.rb +13 -8
  154. data/spec/unit/braintree/enriched_customer_data_spec.rb +9 -0
  155. data/spec/unit/braintree/http_spec.rb +1 -1
  156. data/spec/unit/braintree/meta_checkout_card_details_spec.rb +60 -0
  157. data/spec/unit/braintree/meta_checkout_card_spec.rb +60 -0
  158. data/spec/unit/braintree/meta_checkout_token_details_spec.rb +63 -0
  159. data/spec/unit/braintree/meta_checkout_token_spec.rb +63 -0
  160. data/spec/unit/braintree/package_tracking_spec.rb +74 -0
  161. data/spec/unit/braintree/transaction_gateway_spec.rb +32 -3
  162. data/spec/unit/braintree/us_bank_account_verification_spec.rb +5 -0
  163. data/spec/unit/braintree/venmo_profile_data_spec.rb +11 -0
  164. metadata +13 -2
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class PlanGateway # :nodoc:
2
+ class PlanGateway
3
3
  include BaseModule
4
4
 
5
5
  def initialize(gateway)
@@ -102,7 +102,7 @@ module Braintree
102
102
  ]
103
103
  end
104
104
 
105
- def _do_create(path, params) # :nodoc:
105
+ def _do_create(path, params)
106
106
  response = @config.http.post("#{@config.base_merchant_path}#{path}", params)
107
107
  if response[:plan]
108
108
  SuccessfulResult.new(:plan => Plan._new(@gateway, response[:plan]))
@@ -1,10 +1,10 @@
1
1
  module Braintree
2
- class ResourceCollection # :nodoc:
2
+ class ResourceCollection
3
3
  include Enumerable
4
4
 
5
5
  attr_reader :ids
6
6
 
7
- def initialize(response, &block) # :nodoc:
7
+ def initialize(response, &block)
8
8
  @ids = Util.extract_attribute_as_array(response[:search_results], :ids)
9
9
  @page_size = response[:search_results][:page_size]
10
10
  @paging_block = block
@@ -14,7 +14,7 @@ module Braintree
14
14
 
15
15
  class << self
16
16
  protected :new
17
- def _new(*args) # :nodoc:
17
+ def _new(*args)
18
18
  self.new(*args)
19
19
  end
20
20
  end
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class RiskData # :nodoc:
2
+ class RiskData
3
3
  include BaseModule
4
4
 
5
5
  attr_reader :customer_device_id
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class SamsungPayCard
3
- include BaseModule # :nodoc:
3
+ include BaseModule
4
4
  include Braintree::Util::TokenEquality
5
5
 
6
6
  attr_reader :billing_address
@@ -29,7 +29,7 @@ module Braintree
29
29
  attr_reader :unique_number_identifier
30
30
  attr_reader :updated_at
31
31
 
32
- def initialize(gateway, attributes) # :nodoc:
32
+ def initialize(gateway, attributes)
33
33
  @gateway = gateway
34
34
  set_instance_variables_from_hash(attributes)
35
35
  @billing_address = attributes[:billing_address] ? Address._new(@gateway, attributes[:billing_address]) : nil
@@ -49,7 +49,7 @@ module Braintree
49
49
  @expired
50
50
  end
51
51
 
52
- def inspect # :nodoc:
52
+ def inspect
53
53
  first = [:token]
54
54
  order = first + (self.class._attributes - first)
55
55
  nice_attributes = order.map do |attr|
@@ -66,7 +66,7 @@ module Braintree
66
66
  protected :new
67
67
  end
68
68
 
69
- def self._attributes # :nodoc:
69
+ def self._attributes
70
70
  [
71
71
  :billing_address, :bin, :cardholder_name, :card_type, :created_at, :customer_id,
72
72
  :customer_location, :expiration_month, :expiration_year,
@@ -76,7 +76,7 @@ module Braintree
76
76
  ]
77
77
  end
78
78
 
79
- def self._new(*args) # :nodoc:
79
+ def self._new(*args)
80
80
  self.new(*args)
81
81
  end
82
82
  end
@@ -17,7 +17,7 @@ module Braintree
17
17
  attr_reader :updated_at
18
18
  attr_reader :view_mandate_url
19
19
 
20
- def initialize(gateway, attributes) # :nodoc:
20
+ def initialize(gateway, attributes)
21
21
  @gateway = gateway
22
22
  @subscriptions = (@subscriptions || []).map { |subscription_hash| Subscription._new(@gateway, subscription_hash) }
23
23
  set_instance_variables_from_hash(attributes)
@@ -31,7 +31,7 @@ module Braintree
31
31
  protected :new
32
32
  end
33
33
 
34
- def self._new(*args) # :nodoc:
34
+ def self._new(*args)
35
35
  self.new(*args)
36
36
  end
37
37
 
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class SepaDirectDebitAccountNonceDetails# :nodoc:
2
+ class SepaDirectDebitAccountNonceDetails
3
3
  include BaseModule
4
4
 
5
5
  attr_reader :bank_reference_token
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class SettlementBatchSummaryGateway # :nodoc
2
+ class SettlementBatchSummaryGateway
3
3
  include BaseModule
4
4
 
5
5
  def initialize(gateway)
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- module SHA256Digest # :nodoc:
2
+ module SHA256Digest
3
3
  def self.hexdigest(private_key, string)
4
4
  _hmac(private_key, string)
5
5
  end
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class Subscription
3
- class StatusDetails # :nodoc:
3
+ class StatusDetails
4
4
  include BaseModule
5
5
 
6
6
  attr_reader :balance
@@ -91,7 +91,7 @@ module Braintree
91
91
  Configuration.gateway.subscription.update!(*args)
92
92
  end
93
93
 
94
- def initialize(gateway, attributes) # :nodoc:
94
+ def initialize(gateway, attributes)
95
95
  @gateway = gateway
96
96
  set_instance_variables_from_hash(attributes)
97
97
  @balance = Util.to_big_decimal(balance)
@@ -114,7 +114,7 @@ module Braintree
114
114
 
115
115
  class << self
116
116
  protected :new
117
- def _new(*args) # :nodoc:
117
+ def _new(*args)
118
118
  self.new(*args)
119
119
  end
120
120
  end
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class SubscriptionGateway # :nodoc:
2
+ class SubscriptionGateway
3
3
  include BaseModule
4
4
 
5
5
  def initialize(gateway)
@@ -70,7 +70,7 @@ module Braintree
70
70
  return_object_or_raise(:subscription) { update(*args) }
71
71
  end
72
72
 
73
- def self._create_signature # :nodoc:
73
+ def self._create_signature
74
74
  [
75
75
  :billing_day_of_month,
76
76
  :first_billing_date,
@@ -94,7 +94,7 @@ module Braintree
94
94
  ] + _add_on_discount_signature
95
95
  end
96
96
 
97
- def self._update_signature # :nodoc:
97
+ def self._update_signature
98
98
  [
99
99
  :id,
100
100
  :merchant_account_id,
@@ -114,7 +114,7 @@ module Braintree
114
114
  ] + _add_on_discount_signature
115
115
  end
116
116
 
117
- def self._add_on_discount_signature # :nodoc:
117
+ def self._add_on_discount_signature
118
118
  [
119
119
  {
120
120
  :add_ons => [
@@ -133,7 +133,7 @@ module Braintree
133
133
  ]
134
134
  end
135
135
 
136
- def _do_create(path, params) # :nodoc:
136
+ def _do_create(path, params)
137
137
  response = @config.http.post("#{@config.base_merchant_path}#{path}", params)
138
138
  if response[:subscription]
139
139
  SuccessfulResult.new(:subscription => Subscription._new(@gateway, response[:subscription]))
@@ -144,7 +144,7 @@ module Braintree
144
144
  end
145
145
  end
146
146
 
147
- def _fetch_subscriptions(search, ids) # :nodoc:
147
+ def _fetch_subscriptions(search, ids)
148
148
  search.ids.in ids
149
149
  response = @config.http.post("#{@config.base_merchant_path}/subscriptions/advanced_search", {:search => search.to_hash})
150
150
  attributes = response[:subscriptions]
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class SubscriptionSearch < AdvancedSearch # :nodoc:
2
+ class SubscriptionSearch < AdvancedSearch
3
3
  multiple_value_field :in_trial_period
4
4
  multiple_value_field :ids
5
5
  text_fields :id, :transaction_id
@@ -25,7 +25,7 @@ module Braintree
25
25
  attr_reader :transaction
26
26
  attr_reader :us_bank_account_verification
27
27
 
28
- def initialize(attributes = {}) # :nodoc:
28
+ def initialize(attributes = {})
29
29
  @attrs = attributes.keys
30
30
  attributes.each do |key, value|
31
31
  instance_variable_set("@#{key}", value)
@@ -33,7 +33,7 @@ module Braintree
33
33
  @credit_card_verification = @verification
34
34
  end
35
35
 
36
- def inspect # :nodoc:
36
+ def inspect
37
37
  inspected_attributes = @attrs.map { |attr| "#{attr}:#{send(attr).inspect}" }
38
38
  "#<#{self.class} #{inspected_attributes.join(" ")}>"
39
39
  end
@@ -1,8 +1,5 @@
1
1
  module Braintree
2
- module Test # :nodoc:
3
- # The constants contained in the Braintree::Test::CreditCardNumbers module provide
4
- # credit card numbers that should be used when working in the sandbox environment. The sandbox
5
- # will not accept any credit card numbers other than the ones listed below.
2
+ module Test
6
3
  module CreditCardNumbers
7
4
  module CardTypeIndicators
8
5
  Prepaid = "4111111111111210"
@@ -18,16 +15,16 @@ module Braintree
18
15
  end
19
16
 
20
17
  AmExes = %w[378282246310005 371449635398431 378734493671000]
21
- CarteBlanches = %w[30569309025904] # :nodoc:
22
- DinersClubs = %w[38520000023237] # :nodoc:
18
+ CarteBlanches = %w[30569309025904]
19
+ DinersClubs = %w[38520000023237]
23
20
 
24
21
  Discover = "6011111111111117"
25
22
  Discovers = %w[6011111111111117 6011000990139424]
26
- JCBs = %w[3530111333300000 3566002020360505] # :nodoc:
23
+ JCBs = %w[3530111333300000 3566002020360505]
27
24
 
28
- Maestro = "6304000000000000" # :nodoc:
25
+ Maestro = "6304000000000000"
29
26
  MasterCard = "5555555555554444"
30
- MasterCardInternational = "5105105105105100" # :nodoc:
27
+ MasterCardInternational = "5105105105105100"
31
28
 
32
29
  MasterCards = %w[5105105105105100 5555555555554444]
33
30
 
@@ -37,7 +34,7 @@ module Braintree
37
34
 
38
35
  Visa = "4012888888881881"
39
36
  VisaCountryOfIssuanceIE = "4023490000000008"
40
- VisaInternational = "4009348888881881" # :nodoc:
37
+ VisaInternational = "4009348888881881"
41
38
  VisaPrepaid = "4500600000000061"
42
39
 
43
40
  Fraud = "4000111111111511"
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- module Test # :nodoc:
2
+ module Test
3
3
  module MerchantAccount
4
4
  Approve = "approve_me"
5
5
 
@@ -18,6 +18,8 @@ module Braintree
18
18
  GooglePayVisa = "fake-android-pay-visa-nonce"
19
19
  GooglePayMasterCard = "fake-android-pay-mastercard-nonce"
20
20
  GooglePayAmEx = "fake-android-pay-amex-nonce"
21
+ MetaCheckoutCard = "fake-meta-checkout-card-nonce"
22
+ MetaCheckoutToken = "fake-meta-checkout-token-nonce"
21
23
  VenmoAccount = "fake-venmo-account-nonce"
22
24
  VenmoAccountTokenIssuanceError = "fake-token-issuance-error-venmo-account-nonce"
23
25
  ThreeDSecureVisaFullAuthentication = "fake-three-d-secure-visa-full-authentication-nonce"
@@ -72,6 +74,7 @@ module Braintree
72
74
  SamsungPayMasterCard = "tokensam_fake_mastercard"
73
75
  SamsungPayVisa = "tokensam_fake_visa"
74
76
  SepaDirectDebit = "fake-sepa-direct-debit-nonce"
77
+ UsBankAccount = "fake-us-bank-account-nonce"
75
78
  end
76
79
  end
77
80
  end
@@ -1,7 +1,6 @@
1
1
  module Braintree
2
- module Test # :nodoc:
3
- # The constants in this module can be used to create transactions with
4
- # the desired status in the sandbox environment.
2
+ module Test
3
+ # NEXT_MAJOR_VERSION are these even being used anymore? Can we remove this class??
5
4
  module TransactionAmounts
6
5
  Authorize = "1000.00"
7
6
  Decline = "2000.00"
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class TestingGateway # :nodoc:
2
+ class TestingGateway
3
3
 
4
4
  def initialize(gateway)
5
5
  @gateway = gateway
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class ThreeDSecureInfo # :nodoc:
2
+ class ThreeDSecureInfo
3
3
  include BaseModule
4
4
 
5
5
  attr_reader :acs_transaction_id
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class Transaction
3
- class AddressDetails # :nodoc:
3
+ class AddressDetails
4
4
  include BaseModule
5
5
 
6
6
  module ShippingMethod
@@ -10,6 +10,7 @@ module Braintree
10
10
  Ground = "ground"
11
11
  Electronic = "electronic"
12
12
  ShipToStore = "ship_to_store"
13
+ PickupInStore = "pickup_in_store"
13
14
  end
14
15
 
15
16
  attr_reader :company
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class Transaction
3
- class CreditCardDetails # :nodoc:
3
+ class CreditCardDetails
4
4
  include BaseModule
5
5
 
6
6
  attr_reader :account_type
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class Transaction
3
- class CustomerDetails # :nodoc:
3
+ class CustomerDetails
4
4
  include BaseModule
5
5
 
6
6
  attr_reader :company
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class Transaction
3
- class DisbursementDetails # :nodoc:
3
+ class DisbursementDetails
4
4
  include BaseModule
5
5
 
6
6
  attr_reader :disbursement_date
@@ -0,0 +1,52 @@
1
+ module Braintree
2
+ class Transaction
3
+ class MetaCheckoutCardDetails # :nodoc:
4
+ include BaseModule
5
+
6
+ attr_reader :bin
7
+ attr_reader :card_type
8
+ attr_reader :cardholder_name
9
+ attr_reader :commercial
10
+ attr_reader :container_id
11
+ attr_reader :country_of_issuance
12
+ attr_reader :created_at
13
+ attr_reader :customer_location
14
+ attr_reader :debit
15
+ attr_reader :durbin_regulated
16
+ attr_reader :expiration_month
17
+ attr_reader :expiration_year
18
+ attr_reader :healthcare
19
+ attr_reader :image_url
20
+ attr_reader :is_network_tokenized
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 :token
27
+ attr_reader :unique_number_identifier
28
+ attr_reader :updated_at
29
+
30
+ def initialize(attributes)
31
+ set_instance_variables_from_hash attributes unless attributes.nil?
32
+ end
33
+
34
+ def expiration_date
35
+ "#{expiration_month}/#{expiration_year}"
36
+ end
37
+
38
+ def inspect
39
+ attr_order = [:token, :bin, :last_4, :card_type, :expiration_date, :cardholder_name, :customer_location, :prepaid,
40
+ :healthcare, :durbin_regulated, :debit, :commercial, :payroll, :product_id, :country_of_issuance, :issuing_bank, :image_url, :container_id]
41
+ formatted_attrs = attr_order.map do |attr|
42
+ "#{attr}: #{send(attr).inspect}"
43
+ end
44
+ "#<#{formatted_attrs.join(", ")}>"
45
+ end
46
+
47
+ def masked_number
48
+ "#{bin}******#{last_4}"
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,54 @@
1
+ module Braintree
2
+ class Transaction
3
+ class MetaCheckoutTokenDetails # :nodoc:
4
+ include BaseModule
5
+
6
+ attr_reader :bin
7
+ attr_reader :container_id
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 :cryptogram
14
+ attr_reader :customer_location
15
+ attr_reader :debit
16
+ attr_reader :durbin_regulated
17
+ attr_reader :ecommerce_indicator
18
+ attr_reader :expiration_month
19
+ attr_reader :expiration_year
20
+ attr_reader :healthcare
21
+ attr_reader :image_url
22
+ attr_reader :issuing_bank
23
+ attr_reader :is_network_tokenized
24
+ attr_reader :last_4
25
+ attr_reader :payroll
26
+ attr_reader :prepaid
27
+ attr_reader :product_id
28
+ attr_reader :token
29
+ attr_reader :unique_number_identifier
30
+ attr_reader :updated_at
31
+
32
+ def initialize(attributes)
33
+ set_instance_variables_from_hash attributes unless attributes.nil?
34
+ end
35
+
36
+ def expiration_date
37
+ "#{expiration_month}/#{expiration_year}"
38
+ end
39
+
40
+ def inspect
41
+ attr_order = [:container_id, :cryptogram, :ecommerce_indicator, :token, :bin, :last_4, :card_type, :expiration_date, :cardholder_name, :customer_location, :prepaid,
42
+ :healthcare, :durbin_regulated, :debit, :commercial, :payroll, :product_id, :country_of_issuance, :issuing_bank, :is_network_tokenized, :image_url]
43
+ formatted_attrs = attr_order.map do |attr|
44
+ "#{attr}: #{send(attr).inspect}"
45
+ end
46
+ "#<#{formatted_attrs.join(", ")}>"
47
+ end
48
+
49
+ def masked_number
50
+ "#{bin}******#{last_4}"
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,16 @@
1
+ module Braintree
2
+ class Transaction
3
+ class PackageDetails
4
+ include BaseModule
5
+
6
+ attr_reader :carrier
7
+ attr_reader :id
8
+ attr_reader :paypal_tracking_id
9
+ attr_reader :tracking_number
10
+
11
+ def initialize(attributes)
12
+ set_instance_variables_from_hash attributes unless attributes.nil?
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class Transaction
3
- class SamsungPayCardDetails # :nodoc:
3
+ class SamsungPayCardDetails
4
4
  include BaseModule
5
5
 
6
6
  attr_reader :bin
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class Transaction
3
- class SepaDirectDebitAccountDetails # :nodoc:
3
+ class SepaDirectDebitAccountDetails
4
4
  include BaseModule
5
5
 
6
6
  attr_reader :bank_reference_token
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class Transaction
3
- class StatusDetails # :nodoc:
3
+ class StatusDetails
4
4
  include BaseModule
5
5
 
6
6
  attr_reader :amount
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class Transaction
3
- class SubscriptionDetails # :nodoc:
3
+ class SubscriptionDetails
4
4
  include BaseModule
5
5
 
6
6
  attr_reader :billing_period_end_date
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class Transaction
3
- class UsBankAccountDetails # :nodoc:
3
+ class UsBankAccountDetails
4
4
  include BaseModule
5
5
 
6
6
  attr_reader :account_holder_name
@@ -1,6 +1,6 @@
1
1
  module Braintree
2
2
  class Transaction
3
- class VisaCheckoutCardDetails # :nodoc:
3
+ class VisaCheckoutCardDetails
4
4
  include BaseModule
5
5
 
6
6
  attr_reader :bin