braintree 2.98.0 → 4.23.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 (308) 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 +4 -4
  5. data/lib/braintree/ach_mandate.rb +1 -1
  6. data/lib/braintree/add_on_gateway.rb +1 -1
  7. data/lib/braintree/address.rb +7 -27
  8. data/lib/braintree/address_gateway.rb +8 -7
  9. data/lib/braintree/advanced_search.rb +11 -12
  10. data/lib/braintree/apple_pay.rb +4 -4
  11. data/lib/braintree/apple_pay_card.rb +18 -4
  12. data/lib/braintree/apple_pay_options.rb +4 -4
  13. data/lib/braintree/authorization_adjustment.rb +4 -4
  14. data/lib/braintree/base_module.rb +11 -1
  15. data/lib/braintree/bin_data.rb +10 -3
  16. data/lib/braintree/client_token.rb +1 -1
  17. data/lib/braintree/client_token_gateway.rb +4 -3
  18. data/lib/braintree/configuration.rb +35 -35
  19. data/lib/braintree/connected_merchant_paypal_status_changed.rb +2 -2
  20. data/lib/braintree/connected_merchant_status_transitioned.rb +2 -2
  21. data/lib/braintree/credit_card.rb +40 -86
  22. data/lib/braintree/credit_card_gateway.rb +58 -44
  23. data/lib/braintree/credit_card_verification.rb +39 -20
  24. data/lib/braintree/credit_card_verification_gateway.rb +35 -5
  25. data/lib/braintree/credit_card_verification_search.rb +2 -2
  26. data/lib/braintree/customer.rb +23 -88
  27. data/lib/braintree/customer_gateway.rb +17 -32
  28. data/lib/braintree/customer_search.rb +2 -2
  29. data/lib/braintree/descriptor.rb +1 -1
  30. data/lib/braintree/digest.rb +1 -1
  31. data/lib/braintree/disbursement.rb +7 -7
  32. data/lib/braintree/discount_gateway.rb +1 -1
  33. data/lib/braintree/dispute/evidence.rb +1 -1
  34. data/lib/braintree/{transaction/coinbase_details.rb → dispute/paypal_message.rb} +5 -6
  35. data/lib/braintree/dispute/{history_event.rb → status_history.rb} +3 -1
  36. data/lib/braintree/dispute/transaction.rb +3 -1
  37. data/lib/braintree/dispute/transaction_details.rb +1 -1
  38. data/lib/braintree/dispute.rb +47 -6
  39. data/lib/braintree/dispute_gateway.rb +5 -10
  40. data/lib/braintree/dispute_search.rb +8 -4
  41. data/lib/braintree/document_upload.rb +3 -3
  42. data/lib/braintree/document_upload_gateway.rb +3 -3
  43. data/lib/braintree/enriched_customer_data.rb +21 -0
  44. data/lib/braintree/error_codes.rb +217 -175
  45. data/lib/braintree/error_result.rb +2 -3
  46. data/lib/braintree/errors.rb +3 -3
  47. data/lib/braintree/exceptions.rb +6 -5
  48. data/lib/braintree/exchange_rate.rb +13 -0
  49. data/lib/braintree/exchange_rate_quote.rb +24 -0
  50. data/lib/braintree/exchange_rate_quote_gateway.rb +35 -0
  51. data/lib/braintree/exchange_rate_quote_input.rb +21 -0
  52. data/lib/braintree/exchange_rate_quote_request.rb +18 -0
  53. data/lib/braintree/exchange_rate_quote_response.rb +18 -0
  54. data/lib/braintree/facilitated_details.rb +1 -1
  55. data/lib/braintree/facilitator_details.rb +1 -1
  56. data/lib/braintree/gateway.rb +6 -12
  57. data/lib/braintree/{android_pay_card.rb → google_pay_card.rb} +18 -5
  58. data/lib/braintree/granted_payment_instrument_update.rb +2 -2
  59. data/lib/braintree/graphql_client.rb +14 -8
  60. data/lib/braintree/http.rb +9 -10
  61. data/lib/braintree/local_payment_completed/blik_alias.rb +23 -0
  62. data/lib/braintree/local_payment_completed.rb +10 -5
  63. data/lib/braintree/local_payment_expired.rb +21 -0
  64. data/lib/braintree/local_payment_funded.rb +22 -0
  65. data/lib/braintree/local_payment_reversed.rb +19 -0
  66. data/lib/braintree/merchant.rb +4 -4
  67. data/lib/braintree/merchant_account.rb +3 -3
  68. data/lib/braintree/merchant_account_gateway.rb +10 -8
  69. data/lib/braintree/merchant_gateway.rb +1 -1
  70. data/lib/braintree/meta_checkout_card.rb +89 -0
  71. data/lib/braintree/meta_checkout_token.rb +88 -0
  72. data/lib/braintree/modification.rb +4 -4
  73. data/lib/braintree/oauth_credentials.rb +4 -4
  74. data/lib/braintree/oauth_gateway.rb +5 -5
  75. data/lib/braintree/paginated_collection.rb +2 -2
  76. data/lib/braintree/paginated_result.rb +1 -1
  77. data/lib/braintree/payment_instrument_type.rb +14 -13
  78. data/lib/braintree/payment_method_customer_data_updated_metadata.rb +24 -0
  79. data/lib/braintree/payment_method_gateway.rb +52 -22
  80. data/lib/braintree/payment_method_nonce.rb +12 -7
  81. data/lib/braintree/payment_method_nonce_details.rb +40 -0
  82. data/lib/braintree/payment_method_nonce_details_payer_info.rb +32 -0
  83. data/lib/braintree/payment_method_nonce_gateway.rb +14 -3
  84. data/lib/braintree/payment_method_parser.rb +4 -7
  85. data/lib/braintree/paypal_account.rb +3 -2
  86. data/lib/braintree/paypal_account_gateway.rb +5 -5
  87. data/lib/braintree/plan.rb +22 -2
  88. data/lib/braintree/plan_gateway.rb +101 -1
  89. data/lib/braintree/processor_response_types.rb +3 -3
  90. data/lib/braintree/resource_collection.rb +10 -5
  91. data/lib/braintree/revoked_payment_method_metadata.rb +2 -2
  92. data/lib/braintree/risk_data/liability_shift.rb +22 -0
  93. data/lib/braintree/risk_data.rb +10 -3
  94. data/lib/braintree/samsung_pay_card.rb +8 -6
  95. data/lib/braintree/sepa_direct_debit_account.rb +60 -0
  96. data/lib/braintree/sepa_direct_debit_account_gateway.rb +25 -0
  97. data/lib/braintree/sepa_direct_debit_account_nonce_details.rb +28 -0
  98. data/lib/braintree/settlement_batch_summary.rb +2 -2
  99. data/lib/braintree/settlement_batch_summary_gateway.rb +1 -1
  100. data/lib/braintree/sha256_digest.rb +1 -1
  101. data/lib/braintree/subscription/status_details.rb +1 -1
  102. data/lib/braintree/subscription.rb +13 -13
  103. data/lib/braintree/subscription_gateway.rb +6 -6
  104. data/lib/braintree/subscription_search.rb +1 -1
  105. data/lib/braintree/successful_result.rb +5 -4
  106. data/lib/braintree/test/authentication_id.rb +21 -0
  107. data/lib/braintree/test/credit_card.rb +9 -10
  108. data/lib/braintree/test/merchant_account.rb +1 -1
  109. data/lib/braintree/test/nonce.rb +27 -20
  110. data/lib/braintree/test/transaction_amounts.rb +2 -3
  111. data/lib/braintree/test/venmo_sdk.rb +2 -0
  112. data/lib/braintree/testing_gateway.rb +1 -1
  113. data/lib/braintree/three_d_secure_info.rb +23 -11
  114. data/lib/braintree/transaction/address_details.rb +14 -1
  115. data/lib/braintree/transaction/apple_pay_details.rb +13 -10
  116. data/lib/braintree/transaction/credit_card_details.rb +8 -1
  117. data/lib/braintree/transaction/customer_details.rb +3 -2
  118. data/lib/braintree/transaction/disbursement_details.rb +2 -1
  119. data/lib/braintree/transaction/{android_pay_details.rb → google_pay_details.rb} +6 -1
  120. data/lib/braintree/transaction/installment/adjustment.rb +33 -0
  121. data/lib/braintree/transaction/installment.rb +28 -0
  122. data/lib/braintree/transaction/local_payment_details.rb +3 -0
  123. data/lib/braintree/transaction/meta_checkout_card_details.rb +52 -0
  124. data/lib/braintree/transaction/meta_checkout_token_details.rb +54 -0
  125. data/lib/braintree/transaction/package_details.rb +19 -0
  126. data/lib/braintree/transaction/payment_receipt/card_present_data.rb +36 -0
  127. data/lib/braintree/transaction/payment_receipt/merchant_address.rb +19 -0
  128. data/lib/braintree/transaction/payment_receipt.rb +31 -0
  129. data/lib/braintree/transaction/paypal_details.rb +5 -0
  130. data/lib/braintree/transaction/samsung_pay_card_details.rb +3 -1
  131. data/lib/braintree/transaction/sepa_direct_debit_account_details.rb +27 -0
  132. data/lib/braintree/transaction/status_details.rb +1 -1
  133. data/lib/braintree/transaction/subscription_details.rb +3 -1
  134. data/lib/braintree/transaction/us_bank_account_details.rb +2 -1
  135. data/lib/braintree/transaction/visa_checkout_card_details.rb +1 -1
  136. data/lib/braintree/transaction.rb +119 -128
  137. data/lib/braintree/transaction_gateway.rb +138 -64
  138. data/lib/braintree/transaction_line_item.rb +14 -11
  139. data/lib/braintree/transaction_line_item_gateway.rb +1 -1
  140. data/lib/braintree/transaction_review.rb +18 -0
  141. data/lib/braintree/transaction_search.rb +11 -7
  142. data/lib/braintree/unknown_payment_method.rb +2 -2
  143. data/lib/braintree/us_bank_account.rb +5 -5
  144. data/lib/braintree/us_bank_account_verification.rb +24 -16
  145. data/lib/braintree/us_bank_account_verification_gateway.rb +1 -1
  146. data/lib/braintree/us_bank_account_verification_search.rb +1 -1
  147. data/lib/braintree/util.rb +25 -10
  148. data/lib/braintree/validation_error.rb +1 -1
  149. data/lib/braintree/validation_error_collection.rb +3 -3
  150. data/lib/braintree/venmo_account.rb +4 -4
  151. data/lib/braintree/venmo_profile_data.rb +25 -0
  152. data/lib/braintree/version.rb +2 -2
  153. data/lib/braintree/visa_checkout_card.rb +8 -8
  154. data/lib/braintree/webhook_notification.rb +55 -33
  155. data/lib/braintree/webhook_notification_gateway.rb +9 -9
  156. data/lib/braintree/webhook_testing.rb +1 -1
  157. data/lib/braintree/webhook_testing_gateway.rb +569 -46
  158. data/lib/braintree/xml/generator.rb +6 -5
  159. data/lib/braintree/xml/libxml.rb +1 -1
  160. data/lib/braintree/xml/parser.rb +24 -37
  161. data/lib/braintree/xml/rexml.rb +6 -7
  162. data/lib/braintree/xml.rb +1 -1
  163. data/lib/braintree.rb +41 -24
  164. data/lib/ssl/api_braintreegateway_com.ca.crt +401 -168
  165. data/spec/integration/braintree/add_on_spec.rb +10 -10
  166. data/spec/integration/braintree/address_spec.rb +101 -178
  167. data/spec/integration/braintree/advanced_search_spec.rb +93 -93
  168. data/spec/integration/braintree/apple_pay_spec.rb +12 -12
  169. data/spec/integration/braintree/braintree_gateway_spec.rb +2 -1
  170. data/spec/integration/braintree/client_api/client_token_spec.rb +279 -62
  171. data/spec/integration/braintree/client_api/spec_helper.rb +99 -73
  172. data/spec/integration/braintree/credit_card_spec.rb +522 -821
  173. data/spec/integration/braintree/credit_card_verification_search_spec.rb +18 -18
  174. data/spec/integration/braintree/credit_card_verification_spec.rb +219 -30
  175. data/spec/integration/braintree/customer_search_spec.rb +28 -28
  176. data/spec/integration/braintree/customer_spec.rb +840 -757
  177. data/spec/integration/braintree/disbursement_spec.rb +2 -2
  178. data/spec/integration/braintree/discount_spec.rb +9 -9
  179. data/spec/integration/braintree/dispute_search_spec.rb +45 -9
  180. data/spec/integration/braintree/dispute_spec.rb +109 -82
  181. data/spec/integration/braintree/document_upload_spec.rb +29 -17
  182. data/spec/integration/braintree/error_codes_spec.rb +3 -3
  183. data/spec/integration/braintree/exchange_rate_quote_spec.rb +97 -0
  184. data/spec/integration/braintree/graphql_client_spec.rb +0 -2
  185. data/spec/integration/braintree/http_spec.rb +31 -33
  186. data/spec/integration/braintree/merchant_account_spec.rb +155 -156
  187. data/spec/integration/braintree/merchant_spec.rb +71 -192
  188. data/spec/integration/braintree/oauth_spec.rb +72 -72
  189. data/spec/integration/braintree/package_tracking_spec.rb +130 -0
  190. data/spec/integration/braintree/payment_method_nonce_spec.rb +173 -78
  191. data/spec/integration/braintree/payment_method_spec.rb +953 -501
  192. data/spec/integration/braintree/payment_method_us_bank_account_spec.rb +147 -234
  193. data/spec/integration/braintree/paypal_account_spec.rb +74 -72
  194. data/spec/integration/braintree/plan_spec.rb +96 -15
  195. data/spec/integration/braintree/samsung_pay_card_spec.rb +75 -73
  196. data/spec/integration/braintree/sepa_direct_debit_account_spec.rb +194 -0
  197. data/spec/integration/braintree/settlement_batch_summary_spec.rb +18 -18
  198. data/spec/integration/braintree/subscription_spec.rb +507 -513
  199. data/spec/integration/braintree/test/transaction_amounts_spec.rb +4 -4
  200. data/spec/integration/braintree/test_transaction_spec.rb +29 -29
  201. data/spec/integration/braintree/transaction_line_item_spec.rb +12 -6
  202. data/spec/integration/braintree/transaction_search_spec.rb +410 -217
  203. data/spec/integration/braintree/transaction_spec.rb +3252 -2102
  204. data/spec/integration/braintree/transaction_us_bank_account_spec.rb +42 -278
  205. data/spec/integration/braintree/us_bank_account_spec.rb +36 -36
  206. data/spec/integration/braintree/us_bank_account_verification_search_spec.rb +25 -25
  207. data/spec/integration/braintree/us_bank_account_verification_spec.rb +41 -41
  208. data/spec/integration/braintree/visa_checkout_card_spec.rb +62 -62
  209. data/spec/integration/spec_helper.rb +22 -7
  210. data/spec/oauth_test_helper.rb +1 -1
  211. data/spec/script/httpsd.rb +6 -6
  212. data/spec/spec_helper.rb +15 -20
  213. data/spec/unit/braintree/address_spec.rb +9 -17
  214. data/spec/unit/braintree/apple_pay_card_spec.rb +110 -7
  215. data/spec/unit/braintree/base_module_spec.rb +4 -4
  216. data/spec/unit/braintree/client_token_spec.rb +6 -6
  217. data/spec/unit/braintree/configuration_spec.rb +84 -84
  218. data/spec/unit/braintree/credentials_parser_spec.rb +6 -6
  219. data/spec/unit/braintree/credit_card_spec.rb +91 -58
  220. data/spec/unit/braintree/credit_card_verification_gateway_spec.rb +56 -0
  221. data/spec/unit/braintree/credit_card_verification_search_spec.rb +10 -10
  222. data/spec/unit/braintree/credit_card_verification_spec.rb +40 -18
  223. data/spec/unit/braintree/customer_spec.rb +102 -57
  224. data/spec/unit/braintree/digest_spec.rb +5 -6
  225. data/spec/unit/braintree/disbursement_spec.rb +14 -14
  226. data/spec/unit/braintree/dispute_search_spec.rb +6 -2
  227. data/spec/unit/braintree/dispute_spec.rb +144 -66
  228. data/spec/unit/braintree/document_upload_spec.rb +8 -8
  229. data/spec/unit/braintree/enriched_customer_data_spec.rb +41 -0
  230. data/spec/unit/braintree/error_result_spec.rb +11 -11
  231. data/spec/unit/braintree/errors_spec.rb +17 -17
  232. data/spec/unit/braintree/exchange_rate_quote_input_spec.rb +42 -0
  233. data/spec/unit/braintree/exchange_rate_quote_request_spec.rb +82 -0
  234. data/spec/unit/braintree/exchange_rate_quote_response_spec.rb +52 -0
  235. data/spec/unit/braintree/exchange_rate_quote_spec.rb +42 -0
  236. data/spec/unit/braintree/exchange_rate_spec.rb +23 -0
  237. data/spec/unit/braintree/http_spec.rb +19 -17
  238. data/spec/unit/braintree/local_payment_completed_spec.rb +62 -8
  239. data/spec/unit/braintree/local_payment_expired_spec.rb +24 -0
  240. data/spec/unit/braintree/local_payment_funded_spec.rb +34 -0
  241. data/spec/unit/braintree/merchant_account_spec.rb +5 -5
  242. data/spec/unit/braintree/meta_checkout_card_details_spec.rb +60 -0
  243. data/spec/unit/braintree/meta_checkout_card_spec.rb +60 -0
  244. data/spec/unit/braintree/meta_checkout_token_details_spec.rb +63 -0
  245. data/spec/unit/braintree/meta_checkout_token_spec.rb +63 -0
  246. data/spec/unit/braintree/modification_spec.rb +1 -1
  247. data/spec/unit/braintree/package_tracking_spec.rb +77 -0
  248. data/spec/unit/braintree/payment_method_customer_data_updated_metadata_spec.rb +45 -0
  249. data/spec/unit/braintree/payment_method_nonce_details_payer_info_spec.rb +31 -0
  250. data/spec/unit/braintree/payment_method_nonce_details_spec.rb +51 -0
  251. data/spec/unit/braintree/payment_method_nonce_spec.rb +40 -0
  252. data/spec/unit/braintree/payment_method_spec.rb +20 -20
  253. data/spec/unit/braintree/paypal_account_spec.rb +16 -7
  254. data/spec/unit/braintree/resource_collection_spec.rb +34 -5
  255. data/spec/unit/braintree/risk_data/liability_shift.rb +26 -0
  256. data/spec/unit/braintree/risk_data_spec.rb +38 -8
  257. data/spec/unit/braintree/sepa_debit_account_nonce_details_spec.rb +29 -0
  258. data/spec/unit/braintree/sepa_debit_account_spec.rb +86 -0
  259. data/spec/unit/braintree/sha256_digest_spec.rb +1 -1
  260. data/spec/unit/braintree/signature_service_spec.rb +2 -2
  261. data/spec/unit/braintree/subscription_search_spec.rb +18 -18
  262. data/spec/unit/braintree/subscription_spec.rb +8 -8
  263. data/spec/unit/braintree/successful_result_spec.rb +6 -6
  264. data/spec/unit/braintree/three_d_secure_info_spec.rb +37 -17
  265. data/spec/unit/braintree/transaction/credit_card_details_spec.rb +22 -6
  266. data/spec/unit/braintree/transaction/customer_details_spec.rb +3 -2
  267. data/spec/unit/braintree/transaction/deposit_details_spec.rb +4 -4
  268. data/spec/unit/braintree/transaction/installment_spec.rb +25 -0
  269. data/spec/unit/braintree/transaction/local_payment_details_spec.rb +36 -0
  270. data/spec/unit/braintree/transaction/payment_receipt_spec.rb +73 -0
  271. data/spec/unit/braintree/transaction/paypal_details_spec.rb +63 -0
  272. data/spec/unit/braintree/transaction/sepa_direct_debit_account_details_spec.rb +33 -0
  273. data/spec/unit/braintree/transaction_gateway_spec.rb +150 -0
  274. data/spec/unit/braintree/transaction_search_spec.rb +12 -12
  275. data/spec/unit/braintree/transaction_spec.rb +221 -124
  276. data/spec/unit/braintree/unknown_payment_method_spec.rb +4 -4
  277. data/spec/unit/braintree/us_bank_account_spec.rb +2 -2
  278. data/spec/unit/braintree/us_bank_account_verification_search_spec.rb +7 -7
  279. data/spec/unit/braintree/us_bank_account_verification_spec.rb +12 -7
  280. data/spec/unit/braintree/util_spec.rb +78 -44
  281. data/spec/unit/braintree/validation_error_collection_spec.rb +62 -62
  282. data/spec/unit/braintree/validation_error_spec.rb +4 -4
  283. data/spec/unit/braintree/venmo_profile_data_spec.rb +43 -0
  284. data/spec/unit/braintree/webhook_notification_spec.rb +434 -197
  285. data/spec/unit/braintree/xml/libxml_spec.rb +5 -5
  286. data/spec/unit/braintree/xml/parser_spec.rb +27 -22
  287. data/spec/unit/braintree/xml/rexml_spec.rb +5 -5
  288. data/spec/unit/braintree/xml_spec.rb +38 -38
  289. data/spec/unit/braintree_spec.rb +2 -2
  290. metadata +91 -30
  291. data/lib/braintree/amex_express_checkout_card.rb +0 -38
  292. data/lib/braintree/coinbase_account.rb +0 -34
  293. data/lib/braintree/europe_bank_account.rb +0 -36
  294. data/lib/braintree/europe_bank_account_gateway.rb +0 -17
  295. data/lib/braintree/ideal_payment.rb +0 -61
  296. data/lib/braintree/ideal_payment_gateway.rb +0 -19
  297. data/lib/braintree/masterpass_card.rb +0 -81
  298. data/lib/braintree/settlement_batch.rb +0 -0
  299. data/lib/braintree/transaction/amex_express_checkout_details.rb +0 -21
  300. data/lib/braintree/transaction/ideal_payment_details.rb +0 -19
  301. data/lib/braintree/transaction/masterpass_card_details.rb +0 -47
  302. data/lib/braintree/transparent_redirect.rb +0 -40
  303. data/lib/braintree/transparent_redirect_gateway.rb +0 -105
  304. data/spec/hacks/tcp_socket.rb +0 -18
  305. data/spec/integration/braintree/coinbase_spec.rb +0 -34
  306. data/spec/integration/braintree/masterpass_card_spec.rb +0 -97
  307. data/spec/integration/braintree/transparent_redirect_spec.rb +0 -268
  308. data/spec/unit/braintree/transparent_redirect_spec.rb +0 -223
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class TransactionGateway # :nodoc:
2
+ class TransactionGateway
3
3
  include BaseModule
4
4
 
5
5
  def initialize(gateway)
@@ -9,6 +9,14 @@ module Braintree
9
9
  end
10
10
 
11
11
  def create(attributes)
12
+ # NEXT_MAJOR_VERSION remove this check
13
+ if attributes.has_key?(:venmo_sdk_payment_method_code) || attributes.has_key?(:venmo_sdk_session)
14
+ warn "[DEPRECATED] The Venmo SDK integration is Unsupported. Please update your integration to use Pay with Venmo instead."
15
+ end
16
+ # NEXT_MAJOR_VERSION remove this check
17
+ if attributes.has_key?(:three_d_secure_token)
18
+ warn "[DEPRECATED] Passing :three_d_secure_token to create is deprecated. Please use :three_d_secure_authentication_id"
19
+ end
12
20
  Util.verify_keys(TransactionGateway._create_signature, attributes)
13
21
  _do_create "/transactions", :transaction => attributes
14
22
  end
@@ -52,19 +60,8 @@ module Braintree
52
60
  return_object_or_raise(:transaction) { clone_transaction(*args) }
53
61
  end
54
62
 
55
- # Deprecated
56
- def create_from_transparent_redirect(query_string)
57
- params = @gateway.transparent_redirect.parse_and_validate_query_string query_string
58
- _do_create("/transactions/all/confirm_transparent_redirect_request", :id => params[:id])
59
- end
60
-
61
- def create_transaction_url
62
- warn "[DEPRECATED] Transaction.create_transaction_url is deprecated. Please use TransparentRedirect.url"
63
- "#{@config.base_merchant_url}/transactions/all/create_via_transparent_redirect_request"
64
- end
65
-
66
63
  def credit(attributes)
67
- create(attributes.merge(:type => 'credit'))
64
+ create(attributes.merge(:type => "credit"))
68
65
  end
69
66
 
70
67
  def credit!(*args)
@@ -72,7 +69,7 @@ module Braintree
72
69
  end
73
70
 
74
71
  def find(id)
75
- raise ArgumentError if id.nil? || id.strip.to_s == ""
72
+ raise ArgumentError, "id can not be empty" if id.nil? || id.strip.to_s == ""
76
73
  response = @config.http.get("#{@config.base_merchant_path}/transactions/#{id}")
77
74
  Transaction._new(@gateway, response[:transaction])
78
75
  rescue NotFoundError
@@ -83,7 +80,7 @@ module Braintree
83
80
  options = if amount_or_options.is_a?(Hash)
84
81
  amount_or_options
85
82
  else
86
- { :amount => amount_or_options }
83
+ {:amount => amount_or_options}
87
84
  end
88
85
 
89
86
  Util.verify_keys(TransactionGateway._refund_signature, options)
@@ -108,13 +105,23 @@ module Braintree
108
105
  end
109
106
 
110
107
  def sale(attributes)
111
- create(attributes.merge(:type => 'sale'))
108
+ create(attributes.merge(:type => "sale"))
112
109
  end
113
110
 
114
111
  def sale!(*args)
115
112
  return_object_or_raise(:transaction) { sale(*args) }
116
113
  end
117
114
 
115
+ def package_tracking(transaction_id, package_tracking_request)
116
+ raise ArgumentError, "transaction_id is invalid" unless transaction_id =~ /\A[0-9a-z]+\z/
117
+ Util.verify_keys(TransactionGateway._package_tracking_request_signature, package_tracking_request)
118
+ _do_create "/transactions/#{transaction_id}/shipments", :shipment => package_tracking_request
119
+ end
120
+
121
+ def package_tracking!(*args)
122
+ return_object_or_raise(:transaction) { package_tracking(*args) }
123
+ end
124
+
118
125
  def search(&block)
119
126
  search = TransactionSearch.new
120
127
  block.call(search) if block
@@ -124,7 +131,7 @@ module Braintree
124
131
  if response.has_key?(:search_results)
125
132
  ResourceCollection.new(response) { |ids| _fetch_transactions(search, ids) }
126
133
  else
127
- raise DownForMaintenanceError
134
+ raise UnexpectedError, "expected :search_results"
128
135
  end
129
136
  end
130
137
 
@@ -150,6 +157,18 @@ module Braintree
150
157
  return_object_or_raise(:transaction) { submit_for_settlement(*args) }
151
158
  end
152
159
 
160
+ def adjust_authorization(transaction_id, amount)
161
+ raise ArgumentError, "transaction_id is invalid" unless transaction_id =~ /\A[0-9a-z]+\z/
162
+ Util.verify_keys(TransactionGateway._adjust_authorization_signature, {})
163
+ transaction_params = {:amount => amount}
164
+ response = @config.http.put("#{@config.base_merchant_path}/transactions/#{transaction_id}/adjust_authorization", :transaction => transaction_params)
165
+ _handle_transaction_response(response)
166
+ end
167
+
168
+ def adjust_authorization!(*args)
169
+ return_object_or_raise(:transaction) { adjust_authorization(*args) }
170
+ end
171
+
153
172
  def update_details(transaction_id, options = {})
154
173
  raise ArgumentError, "transaction_id is invalid" unless transaction_id =~ /\A[0-9a-z]+\z/
155
174
  Util.verify_keys(TransactionGateway._update_details_signature, options)
@@ -159,7 +178,7 @@ module Braintree
159
178
 
160
179
  def submit_for_partial_settlement(authorized_transaction_id, amount = nil, options = {})
161
180
  raise ArgumentError, "authorized_transaction_id is invalid" unless authorized_transaction_id =~ /\A[0-9a-z]+\z/
162
- Util.verify_keys(TransactionGateway._submit_for_settlement_signature, options)
181
+ Util.verify_keys(TransactionGateway._submit_for_partial_settlement_signature, options)
163
182
  transaction_params = {:amount => amount}.merge(options)
164
183
  response = @config.http.post("#{@config.base_merchant_path}/transactions/#{authorized_transaction_id}/submit_for_partial_settlement", :transaction => transaction_params)
165
184
  _handle_transaction_response(response)
@@ -178,40 +197,62 @@ module Braintree
178
197
  return_object_or_raise(:transaction) { void(*args) }
179
198
  end
180
199
 
181
- def self._clone_signature # :nodoc:
200
+ def self._package_tracking_request_signature
201
+ [
202
+ :carrier,
203
+ {:line_items => [:commodity_code, :description, :discount_amount, :image_url, :kind, :name, :product_code, :quantity, :tax_amount, :total_amount, :unit_amount, :unit_of_measure, :unit_tax_amount, :upc_code, :upc_type, :url]},
204
+ :notify_payer, :tracking_number,
205
+ ]
206
+ end
207
+
208
+ def self._clone_signature
182
209
  [:amount, :channel, {:options => [:submit_for_settlement]}]
183
210
  end
184
211
 
185
- def self._create_signature # :nodoc:
212
+ # NEXT_MAJOR_VERSION Remove venmo_sdk_payment_method_code, venmo_sdk_session, and three_d_secure_token
213
+ # The old venmo SDK class has been deprecated
214
+ # three_d_secure_token has been deprecated in favor of three_d_secure_authentication_id
215
+ def self._create_signature
186
216
  [
187
- :amount, :customer_id, :merchant_account_id, :order_id, :channel, :payment_method_token,
188
- :purchase_order_number, :recurring, :transaction_source, :shipping_address_id, :type, :tax_amount, :tax_exempt,
189
- :venmo_sdk_payment_method_code, :device_session_id, :service_fee_amount, :device_data, :fraud_merchant_id,
190
- :shipping_amount, :discount_amount, :ships_from_postal_code,
191
- :billing_address_id, :payment_method_nonce, :three_d_secure_token,
192
- :shared_payment_method_token, :shared_billing_address_id, :shared_customer_id, :shared_shipping_address_id, :shared_payment_method_nonce,
193
- {:line_items => [:quantity, :name, :description, :kind, :unit_amount, :unit_tax_amount, :total_amount, :discount_amount, :tax_amount, :unit_of_measure, :product_code, :commodity_code, :url]},
194
- {:risk_data => [:customer_browser, :customer_ip]},
195
- {:credit_card => [:token, :cardholder_name, :cvv, :expiration_date, :expiration_month, :expiration_year, :number]},
196
- {:customer => [:id, :company, :email, :fax, :first_name, :last_name, :phone, :website]},
217
+ :amount, :billing_address_id, :channel, :currency_iso_code, :customer_id, :device_data,
218
+ :discount_amount, :exchange_rate_quote_id, :foreign_retailer,
219
+ :merchant_account_id, :order_id, :payment_method_nonce, :payment_method_token,
220
+ :product_sku, :purchase_order_number, :service_fee_amount, :shared_billing_address_id,
221
+ :shared_customer_id, :shared_payment_method_nonce, :shared_payment_method_token,
222
+ :shared_shipping_address_id, :shipping_address_id, :shipping_amount, :shipping_tax_amount,
223
+ :ships_from_postal_code, :tax_amount, :tax_exempt, :three_d_secure_authentication_id,:three_d_secure_token, #Deprecated
224
+ :transaction_source, :type, :venmo_sdk_payment_method_code, # Deprecated
225
+ :sca_exemption,
226
+ {:apple_pay_card => [:number, :cardholder_name, :cryptogram, :expiration_month, :expiration_year, :eci_indicator]},
197
227
  {
198
228
  :billing => AddressGateway._shared_signature
199
229
  },
200
- {
201
- :shipping => AddressGateway._shared_signature
202
- },
203
- {
204
- :three_d_secure_pass_thru => [
205
- :eci_flag,
206
- :cavv,
207
- :xid,
208
- :three_d_secure_version,
209
- :authentication_response,
210
- :directory_response,
211
- :cavv_algorithm,
212
- :ds_transaction_id,
213
- ]
214
- },
230
+ {:credit_card => [:token, :cardholder_name, :cvv, :expiration_date, :expiration_month, :expiration_year, :number, {:payment_reader_card_details => [:encrypted_card_data, :key_serial_number]}, {:network_tokenization_attributes => [:cryptogram, :ecommerce_indicator, :token_requestor_id]}]},
231
+ {:customer => [:id, :company, :email, :fax, :first_name, :last_name, :phone, :website]},
232
+ {:custom_fields => :_any_key_},
233
+ {:descriptor => [:name, :phone, :url]},
234
+ {:external_vault => [
235
+ :status,
236
+ :previous_network_transaction_id,
237
+ ]},
238
+ {:google_pay_card => [:number, :cryptogram, :google_transaction_id, :expiration_month, :expiration_year, :source_card_type, :source_card_last_four, :eci_indicator]},
239
+ {:industry => [
240
+ :industry_type,
241
+ {:data => [
242
+ :country_code, :date_of_birth, :folio_number, :check_in_date, :check_out_date, :travel_package, :lodging_check_in_date, :lodging_check_out_date, :departure_date, :lodging_name, :room_rate, :room_tax,
243
+ :passenger_first_name, :passenger_last_name, :passenger_middle_initial, :passenger_title, :issued_date, :travel_agency_name, :travel_agency_code, :ticket_number,
244
+ :issuing_carrier_code, :customer_code, :fare_amount, :fee_amount, :tax_amount, :restricted_ticket, :no_show, :advanced_deposit, :fire_safe, :property_phone, :ticket_issuer_address, :arrival_date,
245
+ {:legs => [
246
+ :conjunction_ticket, :exchange_ticket, :coupon_number, :service_class, :carrier_code, :fare_basis_code, :flight_number, :departure_date, :departure_airport_code, :departure_time,
247
+ :arrival_airport_code, :arrival_time, :stopover_permitted, :fare_amount, :fee_amount, :tax_amount, :endorsement_or_restrictions,
248
+ ]},
249
+ {:additional_charges => [
250
+ :kind, :amount,
251
+ ]},
252
+ ]},
253
+ ]},
254
+ {:installments => [:count]},
255
+ {:line_items => [:commodity_code, :description, :discount_amount, :image_url, :kind, :name, :product_code, :quantity, :tax_amount, :total_amount, :unit_amount, :unit_of_measure, :unit_tax_amount, :upc_code, :upc_type, :url]},
215
256
  {:options => [
216
257
  :hold_in_escrow,
217
258
  :store_in_vault,
@@ -219,32 +260,50 @@ module Braintree
219
260
  :submit_for_settlement,
220
261
  :add_billing_address_to_payment_method,
221
262
  :store_shipping_address_in_vault,
222
- :venmo_sdk_session,
263
+ :venmo_sdk_session, # Deprecated
223
264
  :payee_id,
224
265
  :payee_email,
225
266
  :skip_advanced_fraud_checking,
226
267
  :skip_avs,
227
268
  :skip_cvv,
228
269
  {:paypal => [:custom_field, :payee_id, :payee_email, :description, {:supplementary_data => :_any_key_}]},
270
+ {:processing_overrides => [:customer_email, :customer_first_name, :customer_last_name, :customer_tax_identifier]},
229
271
  {:three_d_secure => [:required]},
230
272
  {:amex_rewards => [:request_id, :points, :currency_amount, :currency_iso_code]},
231
273
  {:venmo => [:profile_id]},
232
- {:credit_card => [:account_type]},
274
+ {:credit_card => [:account_type, :process_debit_as_credit]},
233
275
  ]
234
276
  },
235
- {:external_vault => [
236
- :status,
237
- :previous_network_transaction_id,
238
- ]},
239
- {:custom_fields => :_any_key_},
240
- {:descriptor => [:name, :phone, :url]},
241
277
  {:paypal_account => [:email, :token, :paypal_data, :payee_id, :payee_email, :payer_id, :payment_id]},
278
+ {:risk_data => [:customer_browser, :customer_device_id, :customer_ip, :customer_location_zip, :customer_tenure]},
279
+ {
280
+ :shipping => AddressGateway._shared_signature + [:shipping_method],
281
+ },
282
+ {
283
+ :three_d_secure_pass_thru => [
284
+ :eci_flag,
285
+ :cavv,
286
+ :xid,
287
+ :three_d_secure_version,
288
+ :authentication_response,
289
+ :directory_response,
290
+ :cavv_algorithm,
291
+ :ds_transaction_id,
292
+ ]
293
+ },
294
+ ]
295
+ end
296
+
297
+ def self._submit_for_settlement_signature
298
+ [
299
+ :order_id,
300
+ {:descriptor => [:name, :phone, :url]},
242
301
  {:industry => [
243
302
  :industry_type,
244
303
  {:data => [
245
- :folio_number, :check_in_date, :check_out_date, :travel_package, :lodging_check_in_date, :lodging_check_out_date, :departure_date, :lodging_name, :room_rate, :room_tax,
304
+ :country_code, :date_of_birth, :folio_number, :check_in_date, :check_out_date, :travel_package, :lodging_check_in_date, :lodging_check_out_date, :departure_date, :lodging_name, :room_rate, :room_tax,
246
305
  :passenger_first_name, :passenger_last_name, :passenger_middle_initial, :passenger_title, :issued_date, :travel_agency_name, :travel_agency_code, :ticket_number,
247
- :issuing_carrier_code, :customer_code, :fare_amount, :fee_amount, :tax_amount, :restricted_ticket, :no_show, :advanced_deposit, :fire_safe, :property_phone,
306
+ :issuing_carrier_code, :customer_code, :fare_amount, :fee_amount, :tax_amount, :restricted_ticket, :no_show, :advanced_deposit, :fire_safe, :property_phone, :ticket_issuer_address, :arrival_date,
248
307
  {:legs => [
249
308
  :conjunction_ticket, :exchange_ticket, :coupon_number, :service_class, :carrier_code, :fare_basis_code, :flight_number, :departure_date, :departure_airport_code, :departure_time,
250
309
  :arrival_airport_code, :arrival_time, :stopover_permitted, :fare_amount, :fee_amount, :tax_amount, :endorsement_or_restrictions,
@@ -254,19 +313,30 @@ module Braintree
254
313
  ]},
255
314
  ]},
256
315
  ]},
257
- {:apple_pay_card => [:number, :cardholder_name, :cryptogram, :expiration_month, :expiration_year, :eci_indicator]},
258
- {:android_pay_card => [:number, :cryptogram, :google_transaction_id, :expiration_month, :expiration_year, :source_card_type, :source_card_last_four, :eci_indicator]}
316
+ :purchase_order_number,
317
+ :tax_amount,
318
+ :tax_exempt,
319
+ :discount_amount,
320
+ :shipping_amount,
321
+ :shipping_tax_amount,
322
+ :ships_from_postal_code,
323
+ :line_items => [:commodity_code, :description, :discount_amount, :image_url, :kind, :name, :product_code, :quantity, :tax_amount, :total_amount, :unit_amount, :unit_of_measure, :unit_tax_amount, :upc_code, :upc_type, :url],
259
324
  ]
260
325
  end
261
326
 
262
- def self._submit_for_settlement_signature # :nodoc:
327
+ def self._submit_for_partial_settlement_signature
328
+ _submit_for_settlement_signature + [
329
+ :final_capture
330
+ ]
331
+ end
332
+
333
+ def self._adjust_authorization_signature
263
334
  [
264
- :order_id,
265
- {:descriptor => [:name, :phone, :url]},
335
+ :amount
266
336
  ]
267
337
  end
268
338
 
269
- def self._update_details_signature # :nodoc:
339
+ def self._update_details_signature
270
340
  [
271
341
  :amount,
272
342
  :order_id,
@@ -277,16 +347,20 @@ module Braintree
277
347
  def self._refund_signature
278
348
  [
279
349
  :amount,
280
- :order_id
350
+ :merchant_account_id,
351
+ :order_id,
281
352
  ]
282
353
  end
283
354
 
284
- def _do_create(path, params=nil) # :nodoc:
355
+ def _do_create(path, params=nil)
356
+ if !params.nil?
357
+ params = Util.replace_key(params, :google_pay_card, :android_pay_card)
358
+ end
285
359
  response = @config.http.post("#{@config.base_merchant_path}#{path}", params)
286
360
  _handle_transaction_response(response)
287
361
  end
288
362
 
289
- def _fetch_transactions(search, ids) # :nodoc:
363
+ def _fetch_transactions(search, ids)
290
364
  search.ids.in ids
291
365
  response = @config.http.post("#{@config.base_merchant_path}/transactions/advanced_search", {:search => search.to_hash})
292
366
  attributes = response[:credit_card_transactions]
@@ -1,21 +1,24 @@
1
1
  module Braintree
2
2
  class TransactionLineItem
3
3
  include BaseModule
4
- attr_reader :quantity
5
- attr_reader :name
4
+ attr_reader :commodity_code
6
5
  attr_reader :description
7
- attr_reader :kind
8
- attr_reader :unit_amount
9
- attr_reader :unit_tax_amount
10
- attr_reader :unit_of_measure
11
6
  attr_reader :discount_amount
7
+ attr_reader :image_url
8
+ attr_reader :kind
9
+ attr_reader :name
10
+ attr_reader :product_code
11
+ attr_reader :quantity
12
12
  attr_reader :tax_amount
13
13
  attr_reader :total_amount
14
- attr_reader :product_code
15
- attr_reader :commodity_code
14
+ attr_reader :unit_amount
15
+ attr_reader :unit_of_measure
16
+ attr_reader :unit_tax_amount
17
+ attr_reader :upc_code
18
+ attr_reader :upc_type
16
19
  attr_reader :url
17
20
 
18
- def initialize(gateway, attributes) # :nodoc:
21
+ def initialize(gateway, attributes)
19
22
  @gateway = gateway
20
23
  set_instance_variables_from_hash(attributes)
21
24
  @quantity = Util.to_big_decimal(quantity)
@@ -28,8 +31,8 @@ module Braintree
28
31
 
29
32
  class << self
30
33
  protected :new
31
- def _new(*args) # :nodoc:
32
- self.new *args
34
+ def _new(*args)
35
+ self.new(*args)
33
36
  end
34
37
  end
35
38
 
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class TransactionLineItemGateway # :nodoc:
2
+ class TransactionLineItemGateway
3
3
  def initialize(gateway)
4
4
  @gateway = gateway
5
5
  @config = gateway.config
@@ -0,0 +1,18 @@
1
+ module Braintree
2
+ class TransactionReview
3
+ include BaseModule
4
+
5
+ attr_reader :transaction_id, :decision, :reviewer_email, :reviewer_note, :reviewer_time
6
+
7
+ def initialize(attributes)
8
+ set_instance_variables_from_hash(attributes)
9
+ end
10
+
11
+ class << self
12
+ protected :new
13
+ def _new(*args)
14
+ self.new(*args)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class TransactionSearch < AdvancedSearch # :nodoc:
2
+ class TransactionSearch < AdvancedSearch
3
3
  text_fields(
4
4
  :billing_company,
5
5
  :billing_country_name,
@@ -28,7 +28,7 @@ module Braintree
28
28
  :paypal_authorization_id,
29
29
  :paypal_payer_email,
30
30
  :processor_authorization_code,
31
- :europe_bank_account_iban,
31
+ :sepa_debit_paypal_v2_order_id,
32
32
  :settlement_batch_id,
33
33
  :shipping_company,
34
34
  :shipping_country_name,
@@ -38,7 +38,8 @@ module Braintree
38
38
  :shipping_locality,
39
39
  :shipping_postal_code,
40
40
  :shipping_region,
41
- :shipping_street_address
41
+ :shipping_street_address,
42
+ :store_id,
42
43
  )
43
44
 
44
45
  equality_fields :credit_card_expiration_date
@@ -53,19 +54,22 @@ module Braintree
53
54
  CreditCard::CustomerLocation::International,
54
55
  CreditCard::CustomerLocation::US
55
56
  ]
57
+ multiple_value_field :debit_network, :allows => CreditCard::DebitNetwork::All
56
58
  multiple_value_field :ids
57
- multiple_value_field :payment_instrument_type
58
- multiple_value_field :user
59
59
  multiple_value_field :merchant_account_id
60
- multiple_value_field :status, :allows => Transaction::Status::All
60
+ multiple_value_field :payment_instrument_type
61
+ multiple_value_field :reason_code
61
62
  multiple_value_field :source
63
+ multiple_value_field :status, :allows => Transaction::Status::All
64
+ multiple_value_field :store_ids
62
65
  multiple_value_field :type, :allows => Transaction::Type::All
66
+ multiple_value_field :user
63
67
 
64
68
  key_value_fields :refund
65
69
 
66
70
  range_fields :amount, :created_at, :authorization_expired_at, :authorized_at,
67
71
  :failed_at, :gateway_rejected_at, :processor_declined_at,
68
72
  :settled_at, :submitted_for_settlement_at, :voided_at,
69
- :disbursement_date, :dispute_date
73
+ :disbursement_date, :dispute_date, :ach_return_responses_created_at
70
74
  end
71
75
  end
@@ -19,8 +19,8 @@ module Braintree
19
19
  "https://assets.braintreegateway.com/payment_method_logo/unknown.png"
20
20
  end
21
21
 
22
- def self._new(*args) # :nodoc:
23
- self.new *args
22
+ def self._new(*args)
23
+ self.new(*args)
24
24
  end
25
25
  end
26
26
  end
@@ -14,7 +14,7 @@ module Braintree
14
14
  attr_reader :verifications
15
15
  attr_reader :verified
16
16
 
17
- def initialize(gateway, attributes) # :nodoc:
17
+ def initialize(gateway, attributes)
18
18
  @gateway = gateway
19
19
  set_instance_variables_from_hash(attributes)
20
20
  @ach_mandate = AchMandate.new(attributes[:ach_mandate]) if attributes[:ach_mandate]
@@ -34,8 +34,8 @@ module Braintree
34
34
  protected :new
35
35
  end
36
36
 
37
- def self._new(*args) # :nodoc:
38
- self.new *args
37
+ def self._new(*args)
38
+ self.new(*args)
39
39
  end
40
40
 
41
41
  def self.find(*args)
@@ -45,8 +45,8 @@ module Braintree
45
45
  def self.sale(token, transaction_attributes)
46
46
  Configuration.gateway.transaction.sale(transaction_attributes.merge(
47
47
  :payment_method_token => token,
48
- :options => { :submit_for_settlement => true }
49
- )
48
+ :options => {:submit_for_settlement => true},
49
+ ),
50
50
  )
51
51
  end
52
52
 
@@ -22,33 +22,41 @@ module Braintree
22
22
  All = [IndependentCheck, NetworkCheck, TokenizedCheck, MicroTransfers]
23
23
  end
24
24
 
25
+ module VerificationAddOns
26
+ CustomerVerification = "customer_verification"
27
+
28
+ All = [CustomerVerification]
29
+ end
30
+
31
+ attr_reader :additional_processor_response
32
+ attr_reader :created_at
33
+ attr_reader :gateway_rejection_reason
25
34
  attr_reader :id
26
- attr_reader :status
27
- attr_reader :verification_determined_at
28
- attr_reader :verification_method
35
+ attr_reader :merchant_account_id
29
36
  attr_reader :processor_response_code
30
37
  attr_reader :processor_response_text
31
- attr_reader :merchant_account_id
32
- attr_reader :gateway_rejection_reason
38
+ attr_reader :status
33
39
  attr_reader :us_bank_account
34
- attr_reader :created_at
40
+ attr_reader :verification_determined_at
41
+ attr_reader :verification_method
35
42
 
36
- def initialize(attributes) # :nodoc:
43
+ def initialize(attributes)
37
44
  set_instance_variables_from_hash(attributes)
38
45
  end
39
46
 
40
- def inspect # :nodoc:
47
+ def inspect
41
48
  attr_order = [
42
- :status,
43
- :processor_response_code,
44
- :processor_response_text,
45
- :merchant_account_id,
49
+ :additional_processor_response,
50
+ :created_at,
46
51
  :gateway_rejection_reason,
47
52
  :id,
53
+ :merchant_account_id,
54
+ :processor_response_code,
55
+ :processor_response_text,
56
+ :status,
48
57
  :us_bank_account,
49
- :verification_method,
50
58
  :verification_determined_at,
51
- :created_at
59
+ :verification_method
52
60
  ]
53
61
 
54
62
  formatted_attrs = attr_order.map do |attr|
@@ -62,8 +70,8 @@ module Braintree
62
70
  protected :new
63
71
  end
64
72
 
65
- def self._new(*args) # :nodoc:
66
- self.new *args
73
+ def self._new(*args)
74
+ self.new(*args)
67
75
  end
68
76
 
69
77
  def self.confirm_micro_transfer_amounts(*args)
@@ -18,7 +18,7 @@ module Braintree
18
18
  ErrorResult.new(@gateway, response[:api_error_response])
19
19
  else
20
20
  SuccessfulResult.new(
21
- :us_bank_account_verification => UsBankAccountVerification._new(response[:us_bank_account_verification])
21
+ :us_bank_account_verification => UsBankAccountVerification._new(response[:us_bank_account_verification]),
22
22
  )
23
23
  end
24
24
  rescue NotFoundError
@@ -1,5 +1,5 @@
1
1
  module Braintree
2
- class UsBankAccountVerificationSearch < AdvancedSearch # :nodoc:
2
+ class UsBankAccountVerificationSearch < AdvancedSearch
3
3
  text_fields(
4
4
  :id,
5
5
  :account_holder_name,