braintree 2.104.0 → 4.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/braintree.gemspec +7 -4
  4. data/lib/braintree/account_updater_daily_report.rb +1 -1
  5. data/lib/braintree/address.rb +2 -23
  6. data/lib/braintree/apple_pay.rb +1 -1
  7. data/lib/braintree/apple_pay_card.rb +11 -1
  8. data/lib/braintree/apple_pay_options.rb +1 -1
  9. data/lib/braintree/authorization_adjustment.rb +1 -1
  10. data/lib/braintree/base_module.rb +6 -0
  11. data/lib/braintree/bin_data.rb +9 -2
  12. data/lib/braintree/client_token.rb +1 -1
  13. data/lib/braintree/configuration.rb +12 -12
  14. data/lib/braintree/connected_merchant_paypal_status_changed.rb +1 -1
  15. data/lib/braintree/connected_merchant_status_transitioned.rb +1 -1
  16. data/lib/braintree/credit_card.rb +2 -77
  17. data/lib/braintree/credit_card_gateway.rb +17 -36
  18. data/lib/braintree/credit_card_verification.rb +18 -5
  19. data/lib/braintree/credit_card_verification_search.rb +1 -1
  20. data/lib/braintree/customer.rb +9 -78
  21. data/lib/braintree/customer_gateway.rb +2 -23
  22. data/lib/braintree/customer_search.rb +1 -1
  23. data/lib/braintree/disbursement.rb +1 -1
  24. data/lib/braintree/{transaction/coinbase_details.rb → dispute/paypal_message.rb} +5 -6
  25. data/lib/braintree/dispute/{history_event.rb → status_history.rb} +3 -1
  26. data/lib/braintree/dispute.rb +32 -8
  27. data/lib/braintree/dispute_gateway.rb +4 -9
  28. data/lib/braintree/dispute_search.rb +6 -3
  29. data/lib/braintree/document_upload.rb +1 -1
  30. data/lib/braintree/enriched_customer_data.rb +21 -0
  31. data/lib/braintree/error_codes.rb +150 -171
  32. data/lib/braintree/exceptions.rb +5 -3
  33. data/lib/braintree/exchange_rate.rb +13 -0
  34. data/lib/braintree/exchange_rate_quote.rb +24 -0
  35. data/lib/braintree/exchange_rate_quote_gateway.rb +35 -0
  36. data/lib/braintree/exchange_rate_quote_input.rb +21 -0
  37. data/lib/braintree/exchange_rate_quote_request.rb +18 -0
  38. data/lib/braintree/exchange_rate_quote_response.rb +18 -0
  39. data/lib/braintree/gateway.rb +4 -14
  40. data/lib/braintree/{android_pay_card.rb → google_pay_card.rb} +11 -3
  41. data/lib/braintree/granted_payment_instrument_update.rb +1 -1
  42. data/lib/braintree/graphql_client.rb +7 -7
  43. data/lib/braintree/http.rb +4 -3
  44. data/lib/braintree/local_payment_completed.rb +2 -2
  45. data/lib/braintree/local_payment_expired.rb +21 -0
  46. data/lib/braintree/local_payment_funded.rb +22 -0
  47. data/lib/braintree/local_payment_reversed.rb +19 -0
  48. data/lib/braintree/merchant.rb +1 -1
  49. data/lib/braintree/merchant_account.rb +1 -1
  50. data/lib/braintree/merchant_account_gateway.rb +3 -1
  51. data/lib/braintree/merchant_gateway.rb +1 -1
  52. data/lib/braintree/modification.rb +1 -1
  53. data/lib/braintree/oauth_credentials.rb +1 -1
  54. data/lib/braintree/oauth_gateway.rb +5 -5
  55. data/lib/braintree/payment_instrument_type.rb +10 -14
  56. data/lib/braintree/payment_method_customer_data_updated_metadata.rb +24 -0
  57. data/lib/braintree/payment_method_gateway.rb +15 -17
  58. data/lib/braintree/payment_method_nonce.rb +7 -4
  59. data/lib/braintree/payment_method_nonce_details.rb +37 -0
  60. data/lib/braintree/payment_method_nonce_details_payer_info.rb +32 -0
  61. data/lib/braintree/payment_method_nonce_gateway.rb +1 -1
  62. data/lib/braintree/payment_method_parser.rb +1 -8
  63. data/lib/braintree/plan.rb +21 -1
  64. data/lib/braintree/plan_gateway.rb +100 -0
  65. data/lib/braintree/processor_response_types.rb +3 -3
  66. data/lib/braintree/resource_collection.rb +8 -3
  67. data/lib/braintree/revoked_payment_method_metadata.rb +1 -1
  68. data/lib/braintree/risk_data/liability_shift.rb +22 -0
  69. data/lib/braintree/risk_data.rb +5 -1
  70. data/lib/braintree/samsung_pay_card.rb +1 -1
  71. data/lib/braintree/settlement_batch_summary.rb +2 -2
  72. data/lib/braintree/subscription.rb +11 -11
  73. data/lib/braintree/successful_result.rb +3 -2
  74. data/lib/braintree/test/credit_card.rb +1 -0
  75. data/lib/braintree/test/nonce.rb +4 -23
  76. data/lib/braintree/three_d_secure_info.rb +22 -12
  77. data/lib/braintree/transaction/disbursement_details.rb +1 -0
  78. data/lib/braintree/transaction/{android_pay_details.rb → google_pay_details.rb} +1 -1
  79. data/lib/braintree/transaction/installment/adjustment.rb +33 -0
  80. data/lib/braintree/transaction/installment.rb +28 -0
  81. data/lib/braintree/transaction/paypal_details.rb +3 -0
  82. data/lib/braintree/transaction/subscription_details.rb +2 -0
  83. data/lib/braintree/transaction.rb +65 -120
  84. data/lib/braintree/transaction_gateway.rb +39 -27
  85. data/lib/braintree/transaction_line_item.rb +1 -1
  86. data/lib/braintree/transaction_review.rb +18 -0
  87. data/lib/braintree/transaction_search.rb +5 -3
  88. data/lib/braintree/unknown_payment_method.rb +1 -1
  89. data/lib/braintree/us_bank_account.rb +3 -3
  90. data/lib/braintree/us_bank_account_verification.rb +1 -1
  91. data/lib/braintree/us_bank_account_verification_gateway.rb +1 -1
  92. data/lib/braintree/util.rb +21 -6
  93. data/lib/braintree/venmo_account.rb +1 -1
  94. data/lib/braintree/venmo_profile_data.rb +23 -0
  95. data/lib/braintree/version.rb +2 -2
  96. data/lib/braintree/visa_checkout_card.rb +2 -2
  97. data/lib/braintree/webhook_notification.rb +44 -30
  98. data/lib/braintree/webhook_notification_gateway.rb +5 -5
  99. data/lib/braintree/webhook_testing_gateway.rb +104 -43
  100. data/lib/braintree/xml/generator.rb +5 -4
  101. data/lib/braintree/xml/parser.rb +22 -35
  102. data/lib/braintree/xml/rexml.rb +4 -5
  103. data/lib/braintree.rb +28 -23
  104. data/spec/integration/braintree/add_on_spec.rb +1 -1
  105. data/spec/integration/braintree/address_spec.rb +30 -113
  106. data/spec/integration/braintree/advanced_search_spec.rb +45 -45
  107. data/spec/integration/braintree/apple_pay_spec.rb +3 -3
  108. data/spec/integration/braintree/braintree_gateway_spec.rb +2 -1
  109. data/spec/integration/braintree/client_api/client_token_spec.rb +14 -14
  110. data/spec/integration/braintree/client_api/spec_helper.rb +5 -31
  111. data/spec/integration/braintree/credit_card_spec.rb +219 -593
  112. data/spec/integration/braintree/credit_card_verification_search_spec.rb +2 -2
  113. data/spec/integration/braintree/credit_card_verification_spec.rb +1 -1
  114. data/spec/integration/braintree/customer_search_spec.rb +8 -8
  115. data/spec/integration/braintree/customer_spec.rb +484 -513
  116. data/spec/integration/braintree/dispute_search_spec.rb +35 -6
  117. data/spec/integration/braintree/dispute_spec.rb +6 -7
  118. data/spec/integration/braintree/error_codes_spec.rb +1 -1
  119. data/spec/integration/braintree/exchange_rate_quote_spec.rb +97 -0
  120. data/spec/integration/braintree/graphql_client_spec.rb +0 -2
  121. data/spec/integration/braintree/http_spec.rb +2 -2
  122. data/spec/integration/braintree/merchant_account_spec.rb +28 -29
  123. data/spec/integration/braintree/merchant_spec.rb +14 -14
  124. data/spec/integration/braintree/oauth_spec.rb +11 -11
  125. data/spec/integration/braintree/payment_method_nonce_spec.rb +29 -35
  126. data/spec/integration/braintree/payment_method_spec.rb +535 -270
  127. data/spec/integration/braintree/payment_method_us_bank_account_spec.rb +17 -13
  128. data/spec/integration/braintree/paypal_account_spec.rb +28 -28
  129. data/spec/integration/braintree/plan_spec.rb +82 -0
  130. data/spec/integration/braintree/samsung_pay_card_spec.rb +9 -9
  131. data/spec/integration/braintree/settlement_batch_summary_spec.rb +8 -8
  132. data/spec/integration/braintree/subscription_spec.rb +144 -149
  133. data/spec/integration/braintree/test/transaction_amounts_spec.rb +2 -2
  134. data/spec/integration/braintree/test_transaction_spec.rb +10 -10
  135. data/spec/integration/braintree/transaction_search_spec.rb +175 -70
  136. data/spec/integration/braintree/transaction_spec.rb +955 -894
  137. data/spec/integration/braintree/transaction_us_bank_account_spec.rb +32 -26
  138. data/spec/integration/braintree/us_bank_account_spec.rb +6 -6
  139. data/spec/integration/braintree/us_bank_account_verification_search_spec.rb +7 -7
  140. data/spec/integration/braintree/us_bank_account_verification_spec.rb +8 -8
  141. data/spec/integration/braintree/visa_checkout_card_spec.rb +5 -5
  142. data/spec/integration/spec_helper.rb +16 -7
  143. data/spec/oauth_test_helper.rb +1 -1
  144. data/spec/script/httpsd.rb +6 -6
  145. data/spec/spec_helper.rb +8 -14
  146. data/spec/unit/braintree/address_spec.rb +1 -9
  147. data/spec/unit/braintree/apple_pay_card_spec.rb +7 -1
  148. data/spec/unit/braintree/client_token_spec.rb +2 -2
  149. data/spec/unit/braintree/configuration_spec.rb +42 -42
  150. data/spec/unit/braintree/credit_card_spec.rb +13 -32
  151. data/spec/unit/braintree/credit_card_verification_search_spec.rb +1 -1
  152. data/spec/unit/braintree/credit_card_verification_spec.rb +8 -4
  153. data/spec/unit/braintree/customer_spec.rb +21 -22
  154. data/spec/unit/braintree/disbursement_spec.rb +7 -7
  155. data/spec/unit/braintree/dispute_search_spec.rb +3 -0
  156. data/spec/unit/braintree/dispute_spec.rb +75 -21
  157. data/spec/unit/braintree/enriched_customer_data_spec.rb +32 -0
  158. data/spec/unit/braintree/error_result_spec.rb +5 -5
  159. data/spec/unit/braintree/errors_spec.rb +8 -8
  160. data/spec/unit/braintree/exchange_rate_quote_input_spec.rb +42 -0
  161. data/spec/unit/braintree/exchange_rate_quote_request_spec.rb +82 -0
  162. data/spec/unit/braintree/exchange_rate_quote_response_spec.rb +52 -0
  163. data/spec/unit/braintree/exchange_rate_quote_spec.rb +42 -0
  164. data/spec/unit/braintree/exchange_rate_spec.rb +23 -0
  165. data/spec/unit/braintree/http_spec.rb +10 -8
  166. data/spec/unit/braintree/local_payment_completed_spec.rb +14 -0
  167. data/spec/unit/braintree/local_payment_expired_spec.rb +24 -0
  168. data/spec/unit/braintree/local_payment_funded_spec.rb +34 -0
  169. data/spec/unit/braintree/merchant_account_spec.rb +1 -1
  170. data/spec/unit/braintree/payment_method_customer_data_updated_metadata_spec.rb +45 -0
  171. data/spec/unit/braintree/payment_method_nonce_details_payer_info_spec.rb +31 -0
  172. data/spec/unit/braintree/payment_method_nonce_details_spec.rb +43 -0
  173. data/spec/unit/braintree/payment_method_nonce_spec.rb +40 -0
  174. data/spec/unit/braintree/payment_method_spec.rb +1 -1
  175. data/spec/unit/braintree/paypal_account_spec.rb +2 -2
  176. data/spec/unit/braintree/resource_collection_spec.rb +30 -1
  177. data/spec/unit/braintree/risk_data/liability_shift.rb +26 -0
  178. data/spec/unit/braintree/risk_data_spec.rb +38 -8
  179. data/spec/unit/braintree/subscription_search_spec.rb +1 -1
  180. data/spec/unit/braintree/successful_result_spec.rb +1 -1
  181. data/spec/unit/braintree/three_d_secure_info_spec.rb +32 -14
  182. data/spec/unit/braintree/transaction/credit_card_details_spec.rb +3 -3
  183. data/spec/unit/braintree/transaction/customer_details_spec.rb +1 -1
  184. data/spec/unit/braintree/transaction/deposit_details_spec.rb +2 -2
  185. data/spec/unit/braintree/transaction/installment_spec.rb +25 -0
  186. data/spec/unit/braintree/transaction/paypal_details_spec.rb +7 -1
  187. data/spec/unit/braintree/transaction_search_spec.rb +12 -12
  188. data/spec/unit/braintree/transaction_spec.rb +36 -54
  189. data/spec/unit/braintree/util_spec.rb +55 -21
  190. data/spec/unit/braintree/validation_error_collection_spec.rb +36 -36
  191. data/spec/unit/braintree/venmo_profile_data_spec.rb +32 -0
  192. data/spec/unit/braintree/webhook_notification_spec.rb +166 -57
  193. data/spec/unit/braintree/xml/parser_spec.rb +21 -16
  194. data/spec/unit/braintree/xml_spec.rb +31 -31
  195. metadata +62 -30
  196. data/lib/braintree/amex_express_checkout_card.rb +0 -40
  197. data/lib/braintree/coinbase_account.rb +0 -34
  198. data/lib/braintree/europe_bank_account.rb +0 -36
  199. data/lib/braintree/europe_bank_account_gateway.rb +0 -17
  200. data/lib/braintree/ideal_payment.rb +0 -61
  201. data/lib/braintree/ideal_payment_gateway.rb +0 -19
  202. data/lib/braintree/masterpass_card.rb +0 -83
  203. data/lib/braintree/settlement_batch.rb +0 -0
  204. data/lib/braintree/transaction/amex_express_checkout_details.rb +0 -21
  205. data/lib/braintree/transaction/ideal_payment_details.rb +0 -19
  206. data/lib/braintree/transaction/masterpass_card_details.rb +0 -49
  207. data/lib/braintree/transparent_redirect.rb +0 -40
  208. data/lib/braintree/transparent_redirect_gateway.rb +0 -105
  209. data/spec/hacks/tcp_socket.rb +0 -18
  210. data/spec/integration/braintree/coinbase_spec.rb +0 -34
  211. data/spec/integration/braintree/masterpass_card_spec.rb +0 -97
  212. data/spec/integration/braintree/transparent_redirect_spec.rb +0 -268
  213. data/spec/unit/braintree/transparent_redirect_spec.rb +0 -223
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: braintree
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.104.0
4
+ version: 4.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Braintree
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-02 00:00:00.000000000 Z
11
+ date: 2022-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -16,15 +16,30 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0
19
+ version: 3.2.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.0
27
- description: Ruby library for integrating with the Braintree Gateway
26
+ version: 3.2.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: rexml
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 3.1.9
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 3.1.9
41
+ description: Resources and tools for developers to integrate Braintree's global payments
42
+ platform.
28
43
  email: code@getbraintree.com
29
44
  executables: []
30
45
  extensions: []
@@ -41,8 +56,6 @@ files:
41
56
  - lib/braintree/address/country_names.rb
42
57
  - lib/braintree/address_gateway.rb
43
58
  - lib/braintree/advanced_search.rb
44
- - lib/braintree/amex_express_checkout_card.rb
45
- - lib/braintree/android_pay_card.rb
46
59
  - lib/braintree/apple_pay.rb
47
60
  - lib/braintree/apple_pay_card.rb
48
61
  - lib/braintree/apple_pay_gateway.rb
@@ -52,7 +65,6 @@ files:
52
65
  - lib/braintree/bin_data.rb
53
66
  - lib/braintree/client_token.rb
54
67
  - lib/braintree/client_token_gateway.rb
55
- - lib/braintree/coinbase_account.rb
56
68
  - lib/braintree/configuration.rb
57
69
  - lib/braintree/connected_merchant_paypal_status_changed.rb
58
70
  - lib/braintree/connected_merchant_status_transitioned.rb
@@ -72,29 +84,36 @@ files:
72
84
  - lib/braintree/discount_gateway.rb
73
85
  - lib/braintree/dispute.rb
74
86
  - lib/braintree/dispute/evidence.rb
75
- - lib/braintree/dispute/history_event.rb
87
+ - lib/braintree/dispute/paypal_message.rb
88
+ - lib/braintree/dispute/status_history.rb
76
89
  - lib/braintree/dispute/transaction.rb
77
90
  - lib/braintree/dispute/transaction_details.rb
78
91
  - lib/braintree/dispute_gateway.rb
79
92
  - lib/braintree/dispute_search.rb
80
93
  - lib/braintree/document_upload.rb
81
94
  - lib/braintree/document_upload_gateway.rb
95
+ - lib/braintree/enriched_customer_data.rb
82
96
  - lib/braintree/error_codes.rb
83
97
  - lib/braintree/error_result.rb
84
98
  - lib/braintree/errors.rb
85
- - lib/braintree/europe_bank_account.rb
86
- - lib/braintree/europe_bank_account_gateway.rb
87
99
  - lib/braintree/exceptions.rb
100
+ - lib/braintree/exchange_rate.rb
101
+ - lib/braintree/exchange_rate_quote.rb
102
+ - lib/braintree/exchange_rate_quote_gateway.rb
103
+ - lib/braintree/exchange_rate_quote_input.rb
104
+ - lib/braintree/exchange_rate_quote_request.rb
105
+ - lib/braintree/exchange_rate_quote_response.rb
88
106
  - lib/braintree/facilitated_details.rb
89
107
  - lib/braintree/facilitator_details.rb
90
108
  - lib/braintree/gateway.rb
109
+ - lib/braintree/google_pay_card.rb
91
110
  - lib/braintree/granted_payment_instrument_update.rb
92
111
  - lib/braintree/graphql_client.rb
93
112
  - lib/braintree/http.rb
94
- - lib/braintree/ideal_payment.rb
95
- - lib/braintree/ideal_payment_gateway.rb
96
113
  - lib/braintree/local_payment_completed.rb
97
- - lib/braintree/masterpass_card.rb
114
+ - lib/braintree/local_payment_expired.rb
115
+ - lib/braintree/local_payment_funded.rb
116
+ - lib/braintree/local_payment_reversed.rb
98
117
  - lib/braintree/merchant.rb
99
118
  - lib/braintree/merchant_account.rb
100
119
  - lib/braintree/merchant_account/address_details.rb
@@ -110,8 +129,11 @@ files:
110
129
  - lib/braintree/paginated_result.rb
111
130
  - lib/braintree/payment_instrument_type.rb
112
131
  - lib/braintree/payment_method.rb
132
+ - lib/braintree/payment_method_customer_data_updated_metadata.rb
113
133
  - lib/braintree/payment_method_gateway.rb
114
134
  - lib/braintree/payment_method_nonce.rb
135
+ - lib/braintree/payment_method_nonce_details.rb
136
+ - lib/braintree/payment_method_nonce_details_payer_info.rb
115
137
  - lib/braintree/payment_method_nonce_gateway.rb
116
138
  - lib/braintree/payment_method_parser.rb
117
139
  - lib/braintree/paypal_account.rb
@@ -122,8 +144,8 @@ files:
122
144
  - lib/braintree/resource_collection.rb
123
145
  - lib/braintree/revoked_payment_method_metadata.rb
124
146
  - lib/braintree/risk_data.rb
147
+ - lib/braintree/risk_data/liability_shift.rb
125
148
  - lib/braintree/samsung_pay_card.rb
126
- - lib/braintree/settlement_batch.rb
127
149
  - lib/braintree/settlement_batch_summary.rb
128
150
  - lib/braintree/settlement_batch_summary_gateway.rb
129
151
  - lib/braintree/sha256_digest.rb
@@ -144,16 +166,14 @@ files:
144
166
  - lib/braintree/three_d_secure_info.rb
145
167
  - lib/braintree/transaction.rb
146
168
  - lib/braintree/transaction/address_details.rb
147
- - lib/braintree/transaction/amex_express_checkout_details.rb
148
- - lib/braintree/transaction/android_pay_details.rb
149
169
  - lib/braintree/transaction/apple_pay_details.rb
150
- - lib/braintree/transaction/coinbase_details.rb
151
170
  - lib/braintree/transaction/credit_card_details.rb
152
171
  - lib/braintree/transaction/customer_details.rb
153
172
  - lib/braintree/transaction/disbursement_details.rb
154
- - lib/braintree/transaction/ideal_payment_details.rb
173
+ - lib/braintree/transaction/google_pay_details.rb
174
+ - lib/braintree/transaction/installment.rb
175
+ - lib/braintree/transaction/installment/adjustment.rb
155
176
  - lib/braintree/transaction/local_payment_details.rb
156
- - lib/braintree/transaction/masterpass_card_details.rb
157
177
  - lib/braintree/transaction/paypal_details.rb
158
178
  - lib/braintree/transaction/paypal_here_details.rb
159
179
  - lib/braintree/transaction/samsung_pay_card_details.rb
@@ -165,9 +185,8 @@ files:
165
185
  - lib/braintree/transaction_gateway.rb
166
186
  - lib/braintree/transaction_line_item.rb
167
187
  - lib/braintree/transaction_line_item_gateway.rb
188
+ - lib/braintree/transaction_review.rb
168
189
  - lib/braintree/transaction_search.rb
169
- - lib/braintree/transparent_redirect.rb
170
- - lib/braintree/transparent_redirect_gateway.rb
171
190
  - lib/braintree/unknown_payment_method.rb
172
191
  - lib/braintree/us_bank_account.rb
173
192
  - lib/braintree/us_bank_account_gateway.rb
@@ -178,6 +197,7 @@ files:
178
197
  - lib/braintree/validation_error.rb
179
198
  - lib/braintree/validation_error_collection.rb
180
199
  - lib/braintree/venmo_account.rb
200
+ - lib/braintree/venmo_profile_data.rb
181
201
  - lib/braintree/version.rb
182
202
  - lib/braintree/visa_checkout_card.rb
183
203
  - lib/braintree/webhook_notification.rb
@@ -195,7 +215,6 @@ files:
195
215
  - spec/fixtures/files/gif_extension_bt_logo.gif
196
216
  - spec/fixtures/files/malformed_pdf.pdf
197
217
  - spec/fixtures/files/too_long.pdf
198
- - spec/hacks/tcp_socket.rb
199
218
  - spec/integration/braintree/add_on_spec.rb
200
219
  - spec/integration/braintree/address_spec.rb
201
220
  - spec/integration/braintree/advanced_search_spec.rb
@@ -203,7 +222,6 @@ files:
203
222
  - spec/integration/braintree/braintree_gateway_spec.rb
204
223
  - spec/integration/braintree/client_api/client_token_spec.rb
205
224
  - spec/integration/braintree/client_api/spec_helper.rb
206
- - spec/integration/braintree/coinbase_spec.rb
207
225
  - spec/integration/braintree/credit_card_spec.rb
208
226
  - spec/integration/braintree/credit_card_verification_search_spec.rb
209
227
  - spec/integration/braintree/credit_card_verification_spec.rb
@@ -215,9 +233,9 @@ files:
215
233
  - spec/integration/braintree/dispute_spec.rb
216
234
  - spec/integration/braintree/document_upload_spec.rb
217
235
  - spec/integration/braintree/error_codes_spec.rb
236
+ - spec/integration/braintree/exchange_rate_quote_spec.rb
218
237
  - spec/integration/braintree/graphql_client_spec.rb
219
238
  - spec/integration/braintree/http_spec.rb
220
- - spec/integration/braintree/masterpass_card_spec.rb
221
239
  - spec/integration/braintree/merchant_account_spec.rb
222
240
  - spec/integration/braintree/merchant_spec.rb
223
241
  - spec/integration/braintree/oauth_spec.rb
@@ -235,7 +253,6 @@ files:
235
253
  - spec/integration/braintree/transaction_search_spec.rb
236
254
  - spec/integration/braintree/transaction_spec.rb
237
255
  - spec/integration/braintree/transaction_us_bank_account_spec.rb
238
- - spec/integration/braintree/transparent_redirect_spec.rb
239
256
  - spec/integration/braintree/us_bank_account_spec.rb
240
257
  - spec/integration/braintree/us_bank_account_verification_search_spec.rb
241
258
  - spec/integration/braintree/us_bank_account_verification_spec.rb
@@ -263,15 +280,28 @@ files:
263
280
  - spec/unit/braintree/dispute_search_spec.rb
264
281
  - spec/unit/braintree/dispute_spec.rb
265
282
  - spec/unit/braintree/document_upload_spec.rb
283
+ - spec/unit/braintree/enriched_customer_data_spec.rb
266
284
  - spec/unit/braintree/error_result_spec.rb
267
285
  - spec/unit/braintree/errors_spec.rb
286
+ - spec/unit/braintree/exchange_rate_quote_input_spec.rb
287
+ - spec/unit/braintree/exchange_rate_quote_request_spec.rb
288
+ - spec/unit/braintree/exchange_rate_quote_response_spec.rb
289
+ - spec/unit/braintree/exchange_rate_quote_spec.rb
290
+ - spec/unit/braintree/exchange_rate_spec.rb
268
291
  - spec/unit/braintree/http_spec.rb
269
292
  - spec/unit/braintree/local_payment_completed_spec.rb
293
+ - spec/unit/braintree/local_payment_expired_spec.rb
294
+ - spec/unit/braintree/local_payment_funded_spec.rb
270
295
  - spec/unit/braintree/merchant_account_spec.rb
271
296
  - spec/unit/braintree/modification_spec.rb
297
+ - spec/unit/braintree/payment_method_customer_data_updated_metadata_spec.rb
298
+ - spec/unit/braintree/payment_method_nonce_details_payer_info_spec.rb
299
+ - spec/unit/braintree/payment_method_nonce_details_spec.rb
300
+ - spec/unit/braintree/payment_method_nonce_spec.rb
272
301
  - spec/unit/braintree/payment_method_spec.rb
273
302
  - spec/unit/braintree/paypal_account_spec.rb
274
303
  - spec/unit/braintree/resource_collection_spec.rb
304
+ - spec/unit/braintree/risk_data/liability_shift.rb
275
305
  - spec/unit/braintree/risk_data_spec.rb
276
306
  - spec/unit/braintree/sha256_digest_spec.rb
277
307
  - spec/unit/braintree/signature_service_spec.rb
@@ -282,10 +312,10 @@ files:
282
312
  - spec/unit/braintree/transaction/credit_card_details_spec.rb
283
313
  - spec/unit/braintree/transaction/customer_details_spec.rb
284
314
  - spec/unit/braintree/transaction/deposit_details_spec.rb
315
+ - spec/unit/braintree/transaction/installment_spec.rb
285
316
  - spec/unit/braintree/transaction/paypal_details_spec.rb
286
317
  - spec/unit/braintree/transaction_search_spec.rb
287
318
  - spec/unit/braintree/transaction_spec.rb
288
- - spec/unit/braintree/transparent_redirect_spec.rb
289
319
  - spec/unit/braintree/unknown_payment_method_spec.rb
290
320
  - spec/unit/braintree/us_bank_account_spec.rb
291
321
  - spec/unit/braintree/us_bank_account_verification_search_spec.rb
@@ -293,6 +323,7 @@ files:
293
323
  - spec/unit/braintree/util_spec.rb
294
324
  - spec/unit/braintree/validation_error_collection_spec.rb
295
325
  - spec/unit/braintree/validation_error_spec.rb
326
+ - spec/unit/braintree/venmo_profile_data_spec.rb
296
327
  - spec/unit/braintree/webhook_notification_spec.rb
297
328
  - spec/unit/braintree/xml/libxml_spec.rb
298
329
  - spec/unit/braintree/xml/parser_spec.rb
@@ -307,6 +338,7 @@ metadata:
307
338
  bug_tracker_uri: https://github.com/braintree/braintree_ruby/issues
308
339
  changelog_uri: https://github.com/braintree/braintree_ruby/blob/master/CHANGELOG.md
309
340
  source_code_uri: https://github.com/braintree/braintree_ruby
341
+ documentation_uri: https://developer.paypal.com/braintree/docs
310
342
  post_install_message:
311
343
  rdoc_options: []
312
344
  require_paths:
@@ -315,15 +347,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
315
347
  requirements:
316
348
  - - ">="
317
349
  - !ruby/object:Gem::Version
318
- version: '0'
350
+ version: 2.6.0
319
351
  required_rubygems_version: !ruby/object:Gem::Requirement
320
352
  requirements:
321
353
  - - ">="
322
354
  - !ruby/object:Gem::Version
323
355
  version: '0'
324
356
  requirements: []
325
- rubygems_version: 3.0.8
357
+ rubygems_version: 3.3.22
326
358
  signing_key:
327
359
  specification_version: 4
328
- summary: Braintree Gateway Ruby Client Library
360
+ summary: Braintree Ruby Server SDK
329
361
  test_files: []
@@ -1,40 +0,0 @@
1
- module Braintree
2
- # NEXT_MAJOR_VERSION Remove this class.
3
- # DEPRECATED The American Express Checkout payment method is deprecated.
4
- class AmexExpressCheckoutCard
5
- include BaseModule # :nodoc:
6
-
7
- attr_reader :bin
8
- attr_reader :card_member_expiry_date
9
- attr_reader :card_member_number
10
- attr_reader :card_type
11
- attr_reader :created_at
12
- attr_reader :customer_id
13
- attr_reader :default
14
- attr_reader :expiration_month
15
- attr_reader :expiration_year
16
- attr_reader :image_url
17
- attr_reader :source_description
18
- attr_reader :subscriptions
19
- attr_reader :token
20
- attr_reader :updated_at
21
-
22
- def initialize(gateway, attributes) # :nodoc:
23
- @gateway = gateway
24
- set_instance_variables_from_hash(attributes)
25
- @subscriptions = (@subscriptions || []).map { |subscription_hash| Subscription._new(@gateway, subscription_hash) }
26
- end
27
-
28
- def default?
29
- @default
30
- end
31
-
32
- class << self
33
- protected :new
34
- end
35
-
36
- def self._new(*args) # :nodoc:
37
- self.new *args
38
- end
39
- end
40
- end
@@ -1,34 +0,0 @@
1
- module Braintree
2
- class CoinbaseAccount
3
- include BaseModule # :nodoc:
4
-
5
- attr_reader :created_at
6
- attr_reader :customer_id
7
- attr_reader :default
8
- attr_reader :subscriptions
9
- attr_reader :token
10
- attr_reader :updated_at
11
- attr_reader :user_email
12
- attr_reader :user_id
13
- attr_reader :user_name
14
-
15
- def initialize(gateway, attributes) # :nodoc:
16
- @gateway = gateway
17
- set_instance_variables_from_hash(attributes)
18
- @subscriptions = (@subscriptions || []).map { |subscription_hash| Subscription._new(@gateway, subscription_hash) }
19
- end
20
-
21
- class << self
22
- protected :new
23
- end
24
-
25
- def self._new(*args) # :nodoc:
26
- self.new *args
27
- end
28
-
29
- # Returns true if this coinbase account is the customer's default payment method.
30
- def default?
31
- @default
32
- end
33
- end
34
- end
@@ -1,36 +0,0 @@
1
- module Braintree
2
- class EuropeBankAccount
3
- include BaseModule
4
-
5
- module MandateType
6
- Business = 'business'
7
- Consumer = 'consumer'
8
- end
9
-
10
- attr_reader :customer_id
11
- attr_reader :image_url
12
- attr_reader :token
13
-
14
- def initialize(gateway, attributes) # :nodoc:
15
- @gateway = gateway
16
- set_instance_variables_from_hash(attributes)
17
- end
18
-
19
- class << self
20
- protected :new
21
- end
22
-
23
- def self._new(*args)
24
- self.new(*args)
25
- end
26
-
27
- def self.find(token)
28
- Configuration.gateway.europe_bank_account.find(token)
29
- end
30
-
31
- def default?
32
- @default
33
- end
34
-
35
- end
36
- end
@@ -1,17 +0,0 @@
1
- module Braintree
2
- class EuropeBankAccountGateway
3
- def initialize(gateway)
4
- @gateway = gateway
5
- @config = gateway.config
6
- @config.assert_has_access_token_or_keys
7
- end
8
-
9
- def find(token)
10
- raise ArgumentError if token.nil? || token.to_s.strip == ""
11
- response = @config.http.get("#{@config.base_merchant_path}/payment_methods/europe_bank_account/#{token}")
12
- EuropeBankAccount._new(@gateway, response[:europe_bank_account])
13
- rescue NotFoundError
14
- raise NotFoundError, "payment method with token #{token.inspect} not found"
15
- end
16
- end
17
- end
@@ -1,61 +0,0 @@
1
- module Braintree
2
- # NEXT_MAJOR_VERSION Remove this class as legacy Ideal has been removed/disabled in the Braintree Gateway
3
- # DEPRECATED If you're looking to accept iDEAL as a payment method contact accounts@braintreepayments.com for a solution.
4
- class IdealPayment
5
- include BaseModule
6
-
7
- attr_reader :amount
8
- attr_reader :approval_url
9
- attr_reader :currency
10
- attr_reader :iban_bank_account
11
- attr_reader :id
12
- attr_reader :ideal_transaction_id
13
- attr_reader :issuer
14
- attr_reader :order_id
15
- attr_reader :status
16
-
17
- def initialize(gateway, attributes) # :nodoc:
18
- @gateway = gateway
19
- set_instance_variables_from_hash(attributes)
20
- @iban_bank_account = IbanBankAccount.new(attributes[:iban_bank_account]) if attributes[:iban_bank_account]
21
- end
22
-
23
- class << self
24
- protected :new
25
- end
26
-
27
- def self._new(*args) # :nodoc:
28
- self.new *args
29
- end
30
-
31
- def self.sale(ideal_payment_id, transaction_attributes)
32
- Configuration.gateway.transaction.sale(transaction_attributes.merge(
33
- :payment_method_nonce => ideal_payment_id,
34
- :options => { :submit_for_settlement => true }
35
- )
36
- )
37
- end
38
-
39
- def self.sale!(ideal_payment_id, transaction_attributes)
40
- return_object_or_raise(:transaction) { sale(ideal_payment_id, transaction_attributes) }
41
- end
42
-
43
- def self.find(ideal_payment_id)
44
- Configuration.gateway.ideal_payment.find(ideal_payment_id)
45
- end
46
-
47
- class IbanBankAccount
48
- include BaseModule
49
- attr_reader :account_holder_name
50
- attr_reader :bic
51
- attr_reader :description
52
- attr_reader :iban_account_number_last_4
53
- attr_reader :iban_country
54
- attr_reader :masked_iban
55
-
56
- def initialize(attributes) # :nodoc:
57
- set_instance_variables_from_hash(attributes)
58
- end
59
- end
60
- end
61
- end
@@ -1,19 +0,0 @@
1
- module Braintree
2
- # NEXT_MAJOR_VERSION Remove this class as legacy Ideal has been removed/disabled in the Braintree Gateway
3
- # DEPRECATED If you're looking to accept iDEAL as a payment method contact accounts@braintreepayments.com for a solution.
4
- class IdealPaymentGateway
5
- def initialize(gateway)
6
- @gateway = gateway
7
- @config = gateway.config
8
- @config.assert_has_access_token_or_keys
9
- end
10
-
11
- def find(ideal_payment_id)
12
- raise ArgumentError if ideal_payment_id.nil? || ideal_payment_id.to_s.strip == ""
13
- response = @config.http.get("#{@config.base_merchant_path}/ideal_payments/#{ideal_payment_id}")
14
- IdealPayment._new(@gateway, response[:ideal_payment])
15
- rescue NotFoundError
16
- raise NotFoundError, "ideal payment with ideal_payment_id #{ideal_payment_id.inspect} not found"
17
- end
18
- end
19
- end
@@ -1,83 +0,0 @@
1
- module Braintree
2
- # NEXT_MAJOR_VERSION Remove this class.
3
- # DEPRECATED The Masterpass Card payment method is deprecated.
4
- class MasterpassCard
5
- include BaseModule # :nodoc:
6
- include Braintree::Util::TokenEquality
7
-
8
- attr_reader :billing_address
9
- attr_reader :bin
10
- attr_reader :card_type
11
- attr_reader :cardholder_name
12
- attr_reader :commercial
13
- attr_reader :country_of_issuance
14
- attr_reader :created_at
15
- attr_reader :customer_id
16
- attr_reader :customer_location
17
- attr_reader :debit
18
- attr_reader :durbin_regulated
19
- attr_reader :expiration_month
20
- attr_reader :expiration_year
21
- attr_reader :healthcare
22
- attr_reader :image_url
23
- attr_reader :issuing_bank
24
- attr_reader :last_4
25
- attr_reader :payroll
26
- attr_reader :prepaid
27
- attr_reader :product_id
28
- attr_reader :subscriptions
29
- attr_reader :token
30
- attr_reader :unique_number_identifier
31
- attr_reader :updated_at
32
- attr_reader :verification
33
-
34
- def initialize(gateway, attributes) # :nodoc:
35
- @gateway = gateway
36
- set_instance_variables_from_hash(attributes)
37
- @billing_address = attributes[:billing_address] ? Address._new(@gateway, attributes[:billing_address]) : nil
38
- @subscriptions = (@subscriptions || []).map { |subscription_hash| Subscription._new(@gateway, subscription_hash) }
39
- @verification = _most_recent_verification(attributes)
40
- end
41
-
42
- def _most_recent_verification(attributes)
43
- verification = (attributes[:verifications] || []).sort_by{ |verification| verification[:created_at] }.reverse.first
44
- CreditCardVerification._new(verification) if verification
45
- end
46
-
47
- def default?
48
- @default
49
- end
50
-
51
- # Expiration date formatted as MM/YYYY
52
- def expiration_date
53
- "#{expiration_month}/#{expiration_year}"
54
- end
55
-
56
- def expired?
57
- @expired
58
- end
59
-
60
- def inspect # :nodoc:
61
- first = [:token]
62
- order = first + (self.class._attributes - first)
63
- nice_attributes = order.map do |attr|
64
- "#{attr}: #{send(attr).inspect}"
65
- end
66
- "#<#{self.class} #{nice_attributes.join(', ')}>"
67
- end
68
-
69
- def self._attributes # :nodoc:
70
- [
71
- :billing_address, :bin, :card_type, :cardholder_name, :created_at,
72
- :customer_id, :customer_location, :expiration_month, :expiration_year,
73
- :last_4, :token, :updated_at, :prepaid, :payroll, :product_id,
74
- :commercial, :debit, :durbin_regulated, :healthcare,
75
- :country_of_issuance, :issuing_bank, :image_url
76
- ]
77
- end
78
-
79
- def self._new(*args) # :nodoc:
80
- self.new *args
81
- end
82
- end
83
- end
File without changes
@@ -1,21 +0,0 @@
1
- module Braintree
2
- class Transaction
3
- class AmexExpressCheckoutDetails
4
- include BaseModule
5
-
6
- attr_reader :bin
7
- attr_reader :card_member_expiry_date
8
- attr_reader :card_member_number
9
- attr_reader :card_type
10
- attr_reader :expiration_month
11
- attr_reader :expiration_year
12
- attr_reader :image_url
13
- attr_reader :source_description
14
- attr_reader :token
15
-
16
- def initialize(attributes)
17
- set_instance_variables_from_hash attributes unless attributes.nil?
18
- end
19
- end
20
- end
21
- end
@@ -1,19 +0,0 @@
1
- module Braintree
2
- # NEXT_MAJOR_VERSION Remove this class as legacy Ideal has been removed/disabled in the Braintree Gateway
3
- # DEPRECATED If you're looking to accept iDEAL as a payment method contact accounts@braintreepayments.com for a solution.
4
- class Transaction
5
- class IdealPaymentDetails # :nodoc:
6
- include BaseModule
7
-
8
- attr_reader :bic
9
- attr_reader :ideal_payment_id
10
- attr_reader :ideal_transaction_id
11
- attr_reader :image_url
12
- attr_reader :masked_iban
13
-
14
- def initialize(attributes)
15
- set_instance_variables_from_hash attributes unless attributes.nil?
16
- end
17
- end
18
- end
19
- end
@@ -1,49 +0,0 @@
1
- module Braintree
2
- class Transaction
3
- # NEXT_MAJOR_VERSION Remove this class.
4
- # DEPRECATED The Masterpass Card payment method is deprecated.
5
- class MasterpassCardDetails # :nodoc:
6
- include BaseModule
7
-
8
- attr_reader :bin
9
- attr_reader :card_type
10
- attr_reader :cardholder_name
11
- attr_reader :commercial
12
- attr_reader :country_of_issuance
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 :issuing_bank
21
- attr_reader :last_4
22
- attr_reader :payroll
23
- attr_reader :prepaid
24
- attr_reader :product_id
25
- attr_reader :token
26
-
27
- def initialize(attributes)
28
- set_instance_variables_from_hash attributes unless attributes.nil?
29
- end
30
-
31
- def expiration_date
32
- "#{expiration_month}/#{expiration_year}"
33
- end
34
-
35
- def inspect
36
- attr_order = [:token, :bin, :last_4, :card_type, :expiration_date, :cardholder_name, :customer_location, :prepaid,
37
- :healthcare, :durbin_regulated, :debit, :commercial, :payroll, :product_id, :country_of_issuance, :issuing_bank, :image_url]
38
- formatted_attrs = attr_order.map do |attr|
39
- "#{attr}: #{send(attr).inspect}"
40
- end
41
- "#<#{formatted_attrs.join(", ")}>"
42
- end
43
-
44
- def masked_number
45
- "#{bin}******#{last_4}"
46
- end
47
- end
48
- end
49
- end