braintree 4.14.0 → 4.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/braintree/account_updater_daily_report.rb +3 -3
- data/lib/braintree/ach_mandate.rb +1 -1
- data/lib/braintree/add_on_gateway.rb +1 -1
- data/lib/braintree/address.rb +4 -4
- data/lib/braintree/address_gateway.rb +5 -5
- data/lib/braintree/advanced_search.rb +10 -10
- data/lib/braintree/apple_pay.rb +3 -3
- data/lib/braintree/apple_pay_card.rb +3 -3
- data/lib/braintree/apple_pay_options.rb +3 -3
- data/lib/braintree/authorization_adjustment.rb +3 -3
- data/lib/braintree/base_module.rb +1 -1
- data/lib/braintree/bin_data.rb +2 -2
- data/lib/braintree/client_token_gateway.rb +1 -1
- data/lib/braintree/configuration.rb +22 -22
- data/lib/braintree/connected_merchant_paypal_status_changed.rb +1 -1
- data/lib/braintree/connected_merchant_status_transitioned.rb +1 -1
- data/lib/braintree/credit_card.rb +22 -9
- data/lib/braintree/credit_card_gateway.rb +23 -11
- data/lib/braintree/credit_card_verification.rb +3 -3
- data/lib/braintree/credit_card_verification_gateway.rb +28 -11
- data/lib/braintree/credit_card_verification_search.rb +1 -1
- data/lib/braintree/customer.rb +5 -9
- data/lib/braintree/customer_gateway.rb +7 -7
- data/lib/braintree/customer_search.rb +1 -1
- data/lib/braintree/descriptor.rb +1 -1
- data/lib/braintree/digest.rb +1 -1
- data/lib/braintree/disbursement.rb +5 -5
- data/lib/braintree/discount_gateway.rb +1 -1
- data/lib/braintree/dispute/evidence.rb +1 -1
- data/lib/braintree/dispute/paypal_message.rb +1 -1
- data/lib/braintree/dispute/status_history.rb +1 -1
- data/lib/braintree/dispute/transaction.rb +1 -1
- data/lib/braintree/dispute/transaction_details.rb +1 -1
- data/lib/braintree/dispute.rb +3 -3
- data/lib/braintree/dispute_gateway.rb +1 -1
- data/lib/braintree/dispute_search.rb +1 -1
- data/lib/braintree/document_upload.rb +2 -2
- data/lib/braintree/document_upload_gateway.rb +3 -3
- data/lib/braintree/enriched_customer_data.rb +2 -2
- data/lib/braintree/error_codes.rb +4 -0
- data/lib/braintree/error_result.rb +2 -3
- data/lib/braintree/errors.rb +3 -3
- data/lib/braintree/exceptions.rb +1 -2
- data/lib/braintree/exchange_rate.rb +2 -2
- data/lib/braintree/exchange_rate_quote.rb +3 -3
- data/lib/braintree/exchange_rate_quote_gateway.rb +1 -1
- data/lib/braintree/exchange_rate_quote_input.rb +3 -3
- data/lib/braintree/exchange_rate_quote_request.rb +3 -3
- data/lib/braintree/exchange_rate_quote_response.rb +3 -3
- data/lib/braintree/facilitated_details.rb +1 -1
- data/lib/braintree/facilitator_details.rb +1 -1
- data/lib/braintree/google_pay_card.rb +3 -3
- data/lib/braintree/granted_payment_instrument_update.rb +1 -1
- data/lib/braintree/graphql_client.rb +1 -1
- data/lib/braintree/http.rb +5 -5
- data/lib/braintree/local_payment_completed.rb +2 -2
- data/lib/braintree/local_payment_expired.rb +2 -2
- data/lib/braintree/local_payment_funded.rb +2 -2
- data/lib/braintree/local_payment_reversed.rb +2 -2
- data/lib/braintree/merchant.rb +3 -3
- data/lib/braintree/merchant_account.rb +2 -2
- data/lib/braintree/merchant_account_gateway.rb +9 -9
- data/lib/braintree/meta_checkout_card.rb +89 -0
- data/lib/braintree/meta_checkout_token.rb +88 -0
- data/lib/braintree/modification.rb +3 -3
- data/lib/braintree/oauth_credentials.rb +3 -3
- data/lib/braintree/paginated_collection.rb +2 -2
- data/lib/braintree/paginated_result.rb +1 -1
- data/lib/braintree/payment_instrument_type.rb +2 -0
- data/lib/braintree/payment_method_customer_data_updated_metadata.rb +2 -2
- data/lib/braintree/payment_method_gateway.rb +23 -10
- data/lib/braintree/payment_method_nonce.rb +4 -4
- data/lib/braintree/payment_method_nonce_details.rb +1 -1
- data/lib/braintree/payment_method_nonce_details_payer_info.rb +1 -1
- data/lib/braintree/payment_method_nonce_gateway.rb +1 -1
- data/lib/braintree/paypal_account.rb +1 -2
- data/lib/braintree/paypal_account_gateway.rb +5 -5
- data/lib/braintree/plan.rb +1 -1
- data/lib/braintree/plan_gateway.rb +2 -2
- data/lib/braintree/resource_collection.rb +2 -2
- data/lib/braintree/revoked_payment_method_metadata.rb +1 -1
- data/lib/braintree/risk_data.rb +1 -1
- data/lib/braintree/samsung_pay_card.rb +5 -5
- data/lib/braintree/sepa_direct_debit_account.rb +2 -2
- data/lib/braintree/sepa_direct_debit_account_nonce_details.rb +1 -1
- data/lib/braintree/settlement_batch_summary_gateway.rb +1 -1
- data/lib/braintree/sha256_digest.rb +1 -1
- data/lib/braintree/subscription/status_details.rb +1 -1
- data/lib/braintree/subscription.rb +2 -2
- data/lib/braintree/subscription_gateway.rb +6 -6
- data/lib/braintree/subscription_search.rb +1 -1
- data/lib/braintree/successful_result.rb +2 -2
- data/lib/braintree/test/credit_card.rb +7 -10
- data/lib/braintree/test/merchant_account.rb +1 -1
- data/lib/braintree/test/nonce.rb +4 -0
- data/lib/braintree/test/transaction_amounts.rb +2 -3
- data/lib/braintree/test/venmo_sdk.rb +2 -0
- data/lib/braintree/testing_gateway.rb +1 -1
- data/lib/braintree/three_d_secure_info.rb +1 -1
- data/lib/braintree/transaction/address_details.rb +2 -1
- data/lib/braintree/transaction/credit_card_details.rb +4 -1
- data/lib/braintree/transaction/customer_details.rb +1 -1
- data/lib/braintree/transaction/disbursement_details.rb +1 -1
- data/lib/braintree/transaction/local_payment_details.rb +2 -0
- data/lib/braintree/transaction/meta_checkout_card_details.rb +52 -0
- data/lib/braintree/transaction/meta_checkout_token_details.rb +54 -0
- data/lib/braintree/transaction/package_details.rb +16 -0
- data/lib/braintree/transaction/samsung_pay_card_details.rb +1 -1
- data/lib/braintree/transaction/sepa_direct_debit_account_details.rb +1 -1
- data/lib/braintree/transaction/status_details.rb +1 -1
- data/lib/braintree/transaction/subscription_details.rb +1 -1
- data/lib/braintree/transaction/us_bank_account_details.rb +1 -1
- data/lib/braintree/transaction/visa_checkout_card_details.rb +1 -1
- data/lib/braintree/transaction.rb +37 -20
- data/lib/braintree/transaction_gateway.rb +44 -15
- data/lib/braintree/transaction_line_item.rb +13 -10
- data/lib/braintree/transaction_line_item_gateway.rb +1 -1
- data/lib/braintree/transaction_review.rb +1 -1
- data/lib/braintree/transaction_search.rb +7 -6
- data/lib/braintree/unknown_payment_method.rb +1 -1
- data/lib/braintree/us_bank_account.rb +2 -2
- data/lib/braintree/us_bank_account_verification.rb +23 -15
- data/lib/braintree/us_bank_account_verification_search.rb +1 -1
- data/lib/braintree/util.rb +3 -3
- data/lib/braintree/validation_error.rb +1 -1
- data/lib/braintree/validation_error_collection.rb +3 -3
- data/lib/braintree/venmo_account.rb +3 -3
- data/lib/braintree/venmo_profile_data.rb +6 -4
- data/lib/braintree/version.rb +1 -1
- data/lib/braintree/visa_checkout_card.rb +7 -7
- data/lib/braintree/webhook_notification.rb +3 -2
- data/lib/braintree/webhook_notification_gateway.rb +4 -4
- data/lib/braintree/webhook_testing.rb +1 -1
- data/lib/braintree/webhook_testing_gateway.rb +18 -1
- data/lib/braintree/xml/generator.rb +1 -1
- data/lib/braintree/xml/libxml.rb +1 -1
- data/lib/braintree/xml/parser.rb +3 -3
- data/lib/braintree/xml/rexml.rb +2 -2
- data/lib/braintree/xml.rb +1 -1
- data/lib/braintree.rb +5 -1
- data/spec/integration/braintree/add_on_spec.rb +9 -9
- data/spec/integration/braintree/address_spec.rb +69 -69
- data/spec/integration/braintree/advanced_search_spec.rb +45 -45
- data/spec/integration/braintree/apple_pay_spec.rb +8 -8
- data/spec/integration/braintree/client_api/client_token_spec.rb +15 -15
- data/spec/integration/braintree/client_api/spec_helper.rb +2 -2
- data/spec/integration/braintree/credit_card_spec.rb +227 -228
- data/spec/integration/braintree/credit_card_verification_search_spec.rb +16 -16
- data/spec/integration/braintree/credit_card_verification_spec.rb +98 -53
- data/spec/integration/braintree/customer_search_spec.rb +20 -20
- data/spec/integration/braintree/customer_spec.rb +317 -317
- data/spec/integration/braintree/disbursement_spec.rb +2 -2
- data/spec/integration/braintree/discount_spec.rb +9 -9
- data/spec/integration/braintree/dispute_search_spec.rb +0 -1
- data/spec/integration/braintree/dispute_spec.rb +87 -87
- data/spec/integration/braintree/document_upload_spec.rb +17 -17
- data/spec/integration/braintree/error_codes_spec.rb +2 -2
- data/spec/integration/braintree/http_spec.rb +28 -28
- data/spec/integration/braintree/merchant_account_spec.rb +127 -127
- data/spec/integration/braintree/merchant_spec.rb +103 -103
- data/spec/integration/braintree/oauth_spec.rb +61 -61
- data/spec/integration/braintree/package_tracking_spec.rb +111 -0
- data/spec/integration/braintree/payment_method_nonce_spec.rb +89 -69
- data/spec/integration/braintree/payment_method_spec.rb +391 -391
- data/spec/integration/braintree/payment_method_us_bank_account_spec.rb +150 -78
- data/spec/integration/braintree/paypal_account_spec.rb +38 -38
- data/spec/integration/braintree/plan_spec.rb +15 -15
- data/spec/integration/braintree/samsung_pay_card_spec.rb +65 -65
- data/spec/integration/braintree/sepa_direct_debit_account_spec.rb +51 -51
- data/spec/integration/braintree/settlement_batch_summary_spec.rb +11 -11
- data/spec/integration/braintree/subscription_spec.rb +364 -364
- data/spec/integration/braintree/test/transaction_amounts_spec.rb +2 -2
- data/spec/integration/braintree/test_transaction_spec.rb +19 -19
- data/spec/integration/braintree/transaction_line_item_spec.rb +12 -6
- data/spec/integration/braintree/transaction_search_spec.rb +225 -165
- data/spec/integration/braintree/transaction_spec.rb +1606 -1230
- data/spec/integration/braintree/transaction_us_bank_account_spec.rb +32 -32
- data/spec/integration/braintree/us_bank_account_spec.rb +30 -30
- data/spec/integration/braintree/us_bank_account_verification_search_spec.rb +18 -18
- data/spec/integration/braintree/us_bank_account_verification_spec.rb +33 -33
- data/spec/integration/braintree/visa_checkout_card_spec.rb +57 -57
- data/spec/spec_helper.rb +9 -8
- data/spec/unit/braintree/address_spec.rb +8 -8
- data/spec/unit/braintree/base_module_spec.rb +4 -4
- data/spec/unit/braintree/client_token_spec.rb +2 -2
- data/spec/unit/braintree/configuration_spec.rb +57 -57
- data/spec/unit/braintree/credentials_parser_spec.rb +6 -6
- data/spec/unit/braintree/credit_card_spec.rb +31 -29
- data/spec/unit/braintree/credit_card_verification_gateway_spec.rb +33 -28
- data/spec/unit/braintree/credit_card_verification_search_spec.rb +9 -9
- data/spec/unit/braintree/credit_card_verification_spec.rb +17 -17
- data/spec/unit/braintree/customer_spec.rb +41 -40
- data/spec/unit/braintree/digest_spec.rb +5 -5
- data/spec/unit/braintree/disbursement_spec.rb +11 -11
- data/spec/unit/braintree/dispute_search_spec.rb +2 -2
- data/spec/unit/braintree/dispute_spec.rb +56 -56
- data/spec/unit/braintree/document_upload_spec.rb +8 -8
- data/spec/unit/braintree/enriched_customer_data_spec.rb +11 -2
- data/spec/unit/braintree/error_result_spec.rb +5 -5
- data/spec/unit/braintree/errors_spec.rb +9 -9
- data/spec/unit/braintree/http_spec.rb +9 -9
- data/spec/unit/braintree/local_payment_completed_spec.rb +11 -11
- data/spec/unit/braintree/local_payment_expired_spec.rb +2 -2
- data/spec/unit/braintree/local_payment_funded_spec.rb +6 -6
- data/spec/unit/braintree/merchant_account_spec.rb +4 -4
- data/spec/unit/braintree/meta_checkout_card_details_spec.rb +60 -0
- data/spec/unit/braintree/meta_checkout_card_spec.rb +60 -0
- data/spec/unit/braintree/meta_checkout_token_details_spec.rb +63 -0
- data/spec/unit/braintree/meta_checkout_token_spec.rb +63 -0
- data/spec/unit/braintree/modification_spec.rb +1 -1
- data/spec/unit/braintree/package_tracking_spec.rb +74 -0
- data/spec/unit/braintree/payment_method_customer_data_updated_metadata_spec.rb +6 -6
- data/spec/unit/braintree/payment_method_nonce_details_payer_info_spec.rb +7 -7
- data/spec/unit/braintree/payment_method_nonce_details_spec.rb +14 -14
- data/spec/unit/braintree/payment_method_spec.rb +19 -19
- data/spec/unit/braintree/paypal_account_spec.rb +4 -4
- data/spec/unit/braintree/resource_collection_spec.rb +7 -7
- data/spec/unit/braintree/sepa_debit_account_nonce_details_spec.rb +1 -1
- data/spec/unit/braintree/sha256_digest_spec.rb +1 -1
- data/spec/unit/braintree/signature_service_spec.rb +2 -2
- data/spec/unit/braintree/subscription_search_spec.rb +17 -17
- data/spec/unit/braintree/subscription_spec.rb +8 -8
- data/spec/unit/braintree/successful_result_spec.rb +5 -5
- data/spec/unit/braintree/three_d_secure_info_spec.rb +20 -20
- data/spec/unit/braintree/transaction/credit_card_details_spec.rb +5 -5
- data/spec/unit/braintree/transaction/customer_details_spec.rb +1 -1
- data/spec/unit/braintree/transaction/deposit_details_spec.rb +2 -2
- data/spec/unit/braintree/transaction/local_payment_details_spec.rb +30 -0
- data/spec/unit/braintree/transaction_gateway_spec.rb +41 -9
- data/spec/unit/braintree/transaction_search_spec.rb +2 -2
- data/spec/unit/braintree/transaction_spec.rb +101 -93
- data/spec/unit/braintree/unknown_payment_method_spec.rb +4 -4
- data/spec/unit/braintree/us_bank_account_spec.rb +2 -2
- data/spec/unit/braintree/us_bank_account_verification_search_spec.rb +7 -7
- data/spec/unit/braintree/us_bank_account_verification_spec.rb +12 -7
- data/spec/unit/braintree/util_spec.rb +27 -27
- data/spec/unit/braintree/validation_error_collection_spec.rb +34 -34
- data/spec/unit/braintree/validation_error_spec.rb +4 -4
- data/spec/unit/braintree/venmo_profile_data_spec.rb +16 -5
- data/spec/unit/braintree/webhook_notification_spec.rb +206 -191
- data/spec/unit/braintree/xml/libxml_spec.rb +5 -5
- data/spec/unit/braintree/xml/parser_spec.rb +8 -8
- data/spec/unit/braintree/xml/rexml_spec.rb +5 -5
- data/spec/unit/braintree/xml_spec.rb +17 -17
- data/spec/unit/braintree_spec.rb +2 -2
- metadata +14 -2
@@ -84,8 +84,8 @@ describe Braintree::MerchantAccount do
|
|
84
84
|
)
|
85
85
|
|
86
86
|
result = gateway.merchant_account.all
|
87
|
-
result.
|
88
|
-
result.merchant_accounts.count.
|
87
|
+
expect(result).to be_success
|
88
|
+
expect(result.merchant_accounts.count).to be > 20
|
89
89
|
end
|
90
90
|
|
91
91
|
it "returns merchant account with correct attributes" do
|
@@ -107,11 +107,11 @@ describe Braintree::MerchantAccount do
|
|
107
107
|
)
|
108
108
|
|
109
109
|
result = gateway.merchant_account.all
|
110
|
-
result.
|
111
|
-
result.merchant_accounts.count.
|
112
|
-
result.merchant_accounts.first.currency_iso_code.
|
113
|
-
result.merchant_accounts.first.status.
|
114
|
-
result.merchant_accounts.first.default.
|
110
|
+
expect(result).to be_success
|
111
|
+
expect(result.merchant_accounts.count).to eq(1)
|
112
|
+
expect(result.merchant_accounts.first.currency_iso_code).to eq("USD")
|
113
|
+
expect(result.merchant_accounts.first.status).to eq("active")
|
114
|
+
expect(result.merchant_accounts.first.default).to eq(true)
|
115
115
|
end
|
116
116
|
|
117
117
|
it "returns all merchant accounts for read_only scoped grants" do
|
@@ -137,8 +137,8 @@ describe Braintree::MerchantAccount do
|
|
137
137
|
)
|
138
138
|
|
139
139
|
result = gateway.merchant_account.all
|
140
|
-
result.
|
141
|
-
result.merchant_accounts.count.
|
140
|
+
expect(result).to be_success
|
141
|
+
expect(result.merchant_accounts.count).to be > 20
|
142
142
|
end
|
143
143
|
end
|
144
144
|
|
@@ -146,17 +146,17 @@ describe Braintree::MerchantAccount do
|
|
146
146
|
it "accepts the deprecated parameters" do
|
147
147
|
result = Braintree::MerchantAccount.create(DEPRECATED_APPLICATION_PARAMS)
|
148
148
|
|
149
|
-
result.
|
150
|
-
result.merchant_account.status.
|
151
|
-
result.merchant_account.master_merchant_account.id.
|
149
|
+
expect(result).to be_success
|
150
|
+
expect(result.merchant_account.status).to eq(Braintree::MerchantAccount::Status::Pending)
|
151
|
+
expect(result.merchant_account.master_merchant_account.id).to eq("sandbox_master_merchant_account")
|
152
152
|
end
|
153
153
|
|
154
154
|
it "creates a merchant account with the new parameters and doesn't require an id" do
|
155
155
|
result = Braintree::MerchantAccount.create(VALID_APPLICATION_PARAMS)
|
156
156
|
|
157
|
-
result.
|
158
|
-
result.merchant_account.status.
|
159
|
-
result.merchant_account.master_merchant_account.id.
|
157
|
+
expect(result).to be_success
|
158
|
+
expect(result.merchant_account.status).to eq(Braintree::MerchantAccount::Status::Pending)
|
159
|
+
expect(result.merchant_account.master_merchant_account.id).to eq("sandbox_master_merchant_account")
|
160
160
|
end
|
161
161
|
|
162
162
|
it "allows an id to be passed" do
|
@@ -168,24 +168,24 @@ describe Braintree::MerchantAccount do
|
|
168
168
|
),
|
169
169
|
)
|
170
170
|
|
171
|
-
result.
|
172
|
-
result.merchant_account.status.
|
173
|
-
result.merchant_account.id.
|
174
|
-
result.merchant_account.master_merchant_account.id.
|
171
|
+
expect(result).to be_success
|
172
|
+
expect(result.merchant_account.status).to eq(Braintree::MerchantAccount::Status::Pending)
|
173
|
+
expect(result.merchant_account.id).to eq(sub_merchant_account_id)
|
174
|
+
expect(result.merchant_account.master_merchant_account.id).to eq("sandbox_master_merchant_account")
|
175
175
|
end
|
176
176
|
|
177
177
|
it "handles unsuccessful results" do
|
178
178
|
result = Braintree::MerchantAccount.create({})
|
179
|
-
result.
|
180
|
-
result.errors.for(:merchant_account).on(:master_merchant_account_id).first.code.
|
179
|
+
expect(result).not_to be_success
|
180
|
+
expect(result.errors.for(:merchant_account).on(:master_merchant_account_id).first.code).to eq(Braintree::ErrorCodes::MerchantAccount::MasterMerchantAccountIdIsRequired)
|
181
181
|
end
|
182
182
|
|
183
183
|
it "requires all fields" do
|
184
184
|
result = Braintree::MerchantAccount.create(
|
185
185
|
:master_merchant_account_id => "sandbox_master_merchant_account",
|
186
186
|
)
|
187
|
-
result.
|
188
|
-
result.errors.for(:merchant_account).on(:tos_accepted).first.code.
|
187
|
+
expect(result).not_to be_success
|
188
|
+
expect(result.errors.for(:merchant_account).on(:tos_accepted).first.code).to eq(Braintree::ErrorCodes::MerchantAccount::TosAcceptedIsRequired)
|
189
189
|
end
|
190
190
|
|
191
191
|
context "funding destination" do
|
@@ -194,7 +194,7 @@ describe Braintree::MerchantAccount do
|
|
194
194
|
params[:funding][:destination] = ::Braintree::MerchantAccount::FundingDestination::Bank
|
195
195
|
result = Braintree::MerchantAccount.create(params)
|
196
196
|
|
197
|
-
result.
|
197
|
+
expect(result).to be_success
|
198
198
|
end
|
199
199
|
|
200
200
|
it "accepts an email" do
|
@@ -203,7 +203,7 @@ describe Braintree::MerchantAccount do
|
|
203
203
|
params[:funding][:email] = "joebloggs@compuserve.com"
|
204
204
|
result = Braintree::MerchantAccount.create(params)
|
205
205
|
|
206
|
-
result.
|
206
|
+
expect(result).to be_success
|
207
207
|
end
|
208
208
|
|
209
209
|
it "accepts a mobile_phone" do
|
@@ -212,7 +212,7 @@ describe Braintree::MerchantAccount do
|
|
212
212
|
params[:funding][:mobile_phone] = "3125882300"
|
213
213
|
result = Braintree::MerchantAccount.create(params)
|
214
214
|
|
215
|
-
result.
|
215
|
+
expect(result).to be_success
|
216
216
|
end
|
217
217
|
end
|
218
218
|
end
|
@@ -221,15 +221,15 @@ describe Braintree::MerchantAccount do
|
|
221
221
|
it "creates a merchant account with the new parameters and doesn't require an id" do
|
222
222
|
merchant_account = Braintree::MerchantAccount.create!(VALID_APPLICATION_PARAMS)
|
223
223
|
|
224
|
-
merchant_account.status.
|
225
|
-
merchant_account.master_merchant_account.id.
|
224
|
+
expect(merchant_account.status).to eq(Braintree::MerchantAccount::Status::Pending)
|
225
|
+
expect(merchant_account.master_merchant_account.id).to eq("sandbox_master_merchant_account")
|
226
226
|
end
|
227
227
|
end
|
228
228
|
|
229
229
|
describe "create_for_currency" do
|
230
230
|
it "creates a new merchant account for currency" do
|
231
231
|
result = SpecHelper::create_merchant
|
232
|
-
result.
|
232
|
+
expect(result).to be_success
|
233
233
|
|
234
234
|
gateway = Braintree::Gateway.new(
|
235
235
|
:access_token => result.credentials.access_token,
|
@@ -239,13 +239,13 @@ describe Braintree::MerchantAccount do
|
|
239
239
|
result = gateway.merchant_account.create_for_currency(
|
240
240
|
:currency => "JPY",
|
241
241
|
)
|
242
|
-
result.
|
243
|
-
result.merchant_account.currency_iso_code.
|
242
|
+
expect(result).to be_success
|
243
|
+
expect(result.merchant_account.currency_iso_code).to eq("JPY")
|
244
244
|
end
|
245
245
|
|
246
246
|
it "returns error if a merchant account already exists for that currency" do
|
247
247
|
result = SpecHelper::create_merchant
|
248
|
-
result.
|
248
|
+
expect(result).to be_success
|
249
249
|
|
250
250
|
gateway = Braintree::Gateway.new(
|
251
251
|
:access_token => result.credentials.access_token,
|
@@ -255,20 +255,20 @@ describe Braintree::MerchantAccount do
|
|
255
255
|
result = gateway.merchant_account.create_for_currency(
|
256
256
|
:currency => "USD",
|
257
257
|
)
|
258
|
-
result.
|
258
|
+
expect(result).to be_success
|
259
259
|
|
260
260
|
result = gateway.merchant_account.create_for_currency(
|
261
261
|
:currency => "USD",
|
262
262
|
)
|
263
|
-
result.
|
263
|
+
expect(result).not_to be_success
|
264
264
|
|
265
265
|
errors = result.errors.for(:merchant).on(:currency)
|
266
|
-
errors[0].code.
|
266
|
+
expect(errors[0].code).to eq(Braintree::ErrorCodes::Merchant::MerchantAccountExistsForCurrency)
|
267
267
|
end
|
268
268
|
|
269
269
|
it "returns error if no currency is provided" do
|
270
270
|
result = SpecHelper::create_merchant
|
271
|
-
result.
|
271
|
+
expect(result).to be_success
|
272
272
|
|
273
273
|
gateway = Braintree::Gateway.new(
|
274
274
|
:access_token => result.credentials.access_token,
|
@@ -278,21 +278,21 @@ describe Braintree::MerchantAccount do
|
|
278
278
|
result = gateway.merchant_account.create_for_currency(
|
279
279
|
:currency => nil,
|
280
280
|
)
|
281
|
-
result.
|
281
|
+
expect(result).not_to be_success
|
282
282
|
|
283
283
|
errors = result.errors.for(:merchant).on(:currency)
|
284
|
-
errors[0].code.
|
284
|
+
expect(errors[0].code).to eq(Braintree::ErrorCodes::Merchant::CurrencyIsRequired)
|
285
285
|
|
286
286
|
result = gateway.merchant_account.create_for_currency({})
|
287
|
-
result.
|
287
|
+
expect(result).not_to be_success
|
288
288
|
|
289
289
|
errors = result.errors.for(:merchant).on(:currency)
|
290
|
-
errors[0].code.
|
290
|
+
expect(errors[0].code).to eq(Braintree::ErrorCodes::Merchant::CurrencyIsRequired)
|
291
291
|
end
|
292
292
|
|
293
293
|
it "returns error if a currency is not supported" do
|
294
294
|
result = SpecHelper::create_merchant
|
295
|
-
result.
|
295
|
+
expect(result).to be_success
|
296
296
|
|
297
297
|
gateway = Braintree::Gateway.new(
|
298
298
|
:access_token => result.credentials.access_token,
|
@@ -302,15 +302,15 @@ describe Braintree::MerchantAccount do
|
|
302
302
|
result = gateway.merchant_account.create_for_currency(
|
303
303
|
:currency => "FAKE_CURRENCY",
|
304
304
|
)
|
305
|
-
result.
|
305
|
+
expect(result).not_to be_success
|
306
306
|
|
307
307
|
errors = result.errors.for(:merchant).on(:currency)
|
308
|
-
errors[0].code.
|
308
|
+
expect(errors[0].code).to eq(Braintree::ErrorCodes::Merchant::CurrencyIsInvalid)
|
309
309
|
end
|
310
310
|
|
311
311
|
it "returns error if id is passed and already taken" do
|
312
312
|
result = SpecHelper::create_merchant
|
313
|
-
result.
|
313
|
+
expect(result).to be_success
|
314
314
|
|
315
315
|
gateway = Braintree::Gateway.new(
|
316
316
|
:access_token => result.credentials.access_token,
|
@@ -322,30 +322,30 @@ describe Braintree::MerchantAccount do
|
|
322
322
|
:currency => "USD",
|
323
323
|
:id => merchant.merchant_accounts.first.id,
|
324
324
|
)
|
325
|
-
result.
|
325
|
+
expect(result).not_to be_success
|
326
326
|
|
327
327
|
errors = result.errors.for(:merchant).on(:id)
|
328
|
-
errors[0].code.
|
328
|
+
expect(errors[0].code).to eq(Braintree::ErrorCodes::Merchant::MerchantAccountExistsForId)
|
329
329
|
end
|
330
330
|
end
|
331
331
|
|
332
332
|
describe "find" do
|
333
333
|
it "finds the merchant account with the given token" do
|
334
334
|
result = Braintree::MerchantAccount.create(VALID_APPLICATION_PARAMS)
|
335
|
-
result.
|
336
|
-
result.merchant_account.status.
|
335
|
+
expect(result).to be_success
|
336
|
+
expect(result.merchant_account.status).to eq(Braintree::MerchantAccount::Status::Pending)
|
337
337
|
|
338
338
|
id = result.merchant_account.id
|
339
339
|
merchant_account = Braintree::MerchantAccount.find(id)
|
340
340
|
|
341
|
-
merchant_account.individual_details.first_name.
|
342
|
-
merchant_account.individual_details.last_name.
|
341
|
+
expect(merchant_account.individual_details.first_name).to eq(VALID_APPLICATION_PARAMS[:individual][:first_name])
|
342
|
+
expect(merchant_account.individual_details.last_name).to eq(VALID_APPLICATION_PARAMS[:individual][:last_name])
|
343
343
|
end
|
344
344
|
|
345
345
|
it "retrieves the currency iso code for an existing master merchant account" do
|
346
346
|
merchant_account = Braintree::MerchantAccount.find("sandbox_master_merchant_account")
|
347
347
|
|
348
|
-
merchant_account.currency_iso_code.
|
348
|
+
expect(merchant_account.currency_iso_code).to eq("USD")
|
349
349
|
end
|
350
350
|
|
351
351
|
it "raises a NotFoundError exception if merchant account cannot be found" do
|
@@ -382,37 +382,37 @@ describe Braintree::MerchantAccount do
|
|
382
382
|
params[:funding][:mobile_phone] = "1234567890"
|
383
383
|
params[:funding][:destination] = Braintree::MerchantAccount::FundingDestination::MobilePhone
|
384
384
|
result = Braintree::MerchantAccount.update("sandbox_sub_merchant_account", params)
|
385
|
-
result.
|
386
|
-
result.merchant_account.status.
|
387
|
-
result.merchant_account.id.
|
388
|
-
result.merchant_account.master_merchant_account.id.
|
389
|
-
result.merchant_account.individual_details.first_name.
|
390
|
-
result.merchant_account.individual_details.last_name.
|
391
|
-
result.merchant_account.individual_details.email.
|
392
|
-
result.merchant_account.individual_details.date_of_birth.
|
393
|
-
result.merchant_account.individual_details.phone.
|
394
|
-
result.merchant_account.individual_details.address_details.street_address.
|
395
|
-
result.merchant_account.individual_details.address_details.locality.
|
396
|
-
result.merchant_account.individual_details.address_details.region.
|
397
|
-
result.merchant_account.individual_details.address_details.postal_code.
|
398
|
-
result.merchant_account.business_details.dba_name.
|
399
|
-
result.merchant_account.business_details.legal_name.
|
400
|
-
result.merchant_account.business_details.tax_id.
|
401
|
-
result.merchant_account.business_details.address_details.street_address.
|
402
|
-
result.merchant_account.business_details.address_details.locality.
|
403
|
-
result.merchant_account.business_details.address_details.region.
|
404
|
-
result.merchant_account.business_details.address_details.postal_code.
|
405
|
-
result.merchant_account.funding_details.account_number_last_4.
|
406
|
-
result.merchant_account.funding_details.routing_number.
|
407
|
-
result.merchant_account.funding_details.email.
|
408
|
-
result.merchant_account.funding_details.mobile_phone.
|
409
|
-
result.merchant_account.funding_details.destination.
|
410
|
-
result.merchant_account.funding_details.descriptor.
|
385
|
+
expect(result).to be_success
|
386
|
+
expect(result.merchant_account.status).to eq("active")
|
387
|
+
expect(result.merchant_account.id).to eq("sandbox_sub_merchant_account")
|
388
|
+
expect(result.merchant_account.master_merchant_account.id).to eq("sandbox_master_merchant_account")
|
389
|
+
expect(result.merchant_account.individual_details.first_name).to eq("John")
|
390
|
+
expect(result.merchant_account.individual_details.last_name).to eq("Doe")
|
391
|
+
expect(result.merchant_account.individual_details.email).to eq("john.doe@example.com")
|
392
|
+
expect(result.merchant_account.individual_details.date_of_birth).to eq("1970-01-01")
|
393
|
+
expect(result.merchant_account.individual_details.phone).to eq("3125551234")
|
394
|
+
expect(result.merchant_account.individual_details.address_details.street_address).to eq("123 Fake St")
|
395
|
+
expect(result.merchant_account.individual_details.address_details.locality).to eq("Chicago")
|
396
|
+
expect(result.merchant_account.individual_details.address_details.region).to eq("IL")
|
397
|
+
expect(result.merchant_account.individual_details.address_details.postal_code).to eq("60622")
|
398
|
+
expect(result.merchant_account.business_details.dba_name).to eq("James's Bloggs")
|
399
|
+
expect(result.merchant_account.business_details.legal_name).to eq("James's Bloggs Inc")
|
400
|
+
expect(result.merchant_account.business_details.tax_id).to eq("423456789")
|
401
|
+
expect(result.merchant_account.business_details.address_details.street_address).to eq("999 Fake St")
|
402
|
+
expect(result.merchant_account.business_details.address_details.locality).to eq("Miami")
|
403
|
+
expect(result.merchant_account.business_details.address_details.region).to eq("FL")
|
404
|
+
expect(result.merchant_account.business_details.address_details.postal_code).to eq("99999")
|
405
|
+
expect(result.merchant_account.funding_details.account_number_last_4).to eq("8798")
|
406
|
+
expect(result.merchant_account.funding_details.routing_number).to eq("071000013")
|
407
|
+
expect(result.merchant_account.funding_details.email).to eq("check@this.com")
|
408
|
+
expect(result.merchant_account.funding_details.mobile_phone).to eq("1234567890")
|
409
|
+
expect(result.merchant_account.funding_details.destination).to eq(Braintree::MerchantAccount::FundingDestination::MobilePhone)
|
410
|
+
expect(result.merchant_account.funding_details.descriptor).to eq("Joes Bloggs MI")
|
411
411
|
end
|
412
412
|
|
413
413
|
it "does not require all fields" do
|
414
414
|
result = Braintree::MerchantAccount.update("sandbox_sub_merchant_account", {:individual => {:first_name => "Jose"}})
|
415
|
-
result.
|
415
|
+
expect(result).to be_success
|
416
416
|
end
|
417
417
|
|
418
418
|
it "handles validation errors for blank fields" do
|
@@ -445,17 +445,17 @@ describe Braintree::MerchantAccount do
|
|
445
445
|
}
|
446
446
|
)
|
447
447
|
|
448
|
-
result.
|
449
|
-
result.errors.for(:merchant_account).for(:individual).on(:first_name).map(&:code).
|
450
|
-
result.errors.for(:merchant_account).for(:individual).on(:last_name).map(&:code).
|
451
|
-
result.errors.for(:merchant_account).for(:individual).on(:date_of_birth).map(&:code).
|
452
|
-
result.errors.for(:merchant_account).for(:individual).on(:email).map(&:code).
|
453
|
-
result.errors.for(:merchant_account).for(:individual).for(:address).on(:street_address).map(&:code).
|
454
|
-
result.errors.for(:merchant_account).for(:individual).for(:address).on(:postal_code).map(&:code).
|
455
|
-
result.errors.for(:merchant_account).for(:individual).for(:address).on(:locality).map(&:code).
|
456
|
-
result.errors.for(:merchant_account).for(:individual).for(:address).on(:region).map(&:code).
|
457
|
-
result.errors.for(:merchant_account).for(:funding).on(:destination).map(&:code).
|
458
|
-
result.errors.for(:merchant_account).on(:base).
|
448
|
+
expect(result).not_to be_success
|
449
|
+
expect(result.errors.for(:merchant_account).for(:individual).on(:first_name).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::FirstNameIsRequired])
|
450
|
+
expect(result.errors.for(:merchant_account).for(:individual).on(:last_name).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::LastNameIsRequired])
|
451
|
+
expect(result.errors.for(:merchant_account).for(:individual).on(:date_of_birth).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::DateOfBirthIsRequired])
|
452
|
+
expect(result.errors.for(:merchant_account).for(:individual).on(:email).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::EmailIsRequired])
|
453
|
+
expect(result.errors.for(:merchant_account).for(:individual).for(:address).on(:street_address).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::Address::StreetAddressIsRequired])
|
454
|
+
expect(result.errors.for(:merchant_account).for(:individual).for(:address).on(:postal_code).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::Address::PostalCodeIsRequired])
|
455
|
+
expect(result.errors.for(:merchant_account).for(:individual).for(:address).on(:locality).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::Address::LocalityIsRequired])
|
456
|
+
expect(result.errors.for(:merchant_account).for(:individual).for(:address).on(:region).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::Address::RegionIsRequired])
|
457
|
+
expect(result.errors.for(:merchant_account).for(:funding).on(:destination).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Funding::DestinationIsRequired])
|
458
|
+
expect(result.errors.for(:merchant_account).on(:base)).to be_empty
|
459
459
|
end
|
460
460
|
|
461
461
|
it "handles validation errors for invalid fields" do
|
@@ -494,30 +494,30 @@ describe Braintree::MerchantAccount do
|
|
494
494
|
}
|
495
495
|
)
|
496
496
|
|
497
|
-
result.
|
498
|
-
result.errors.for(:merchant_account).for(:individual).on(:first_name).map(&:code).
|
499
|
-
result.errors.for(:merchant_account).for(:individual).on(:last_name).map(&:code).
|
500
|
-
result.errors.for(:merchant_account).for(:individual).on(:email).map(&:code).
|
501
|
-
result.errors.for(:merchant_account).for(:individual).on(:phone).map(&:code).
|
502
|
-
result.errors.for(:merchant_account).for(:individual).for(:address).on(:street_address).map(&:code).
|
503
|
-
result.errors.for(:merchant_account).for(:individual).for(:address).on(:postal_code).map(&:code).
|
504
|
-
result.errors.for(:merchant_account).for(:individual).for(:address).on(:region).map(&:code).
|
505
|
-
result.errors.for(:merchant_account).for(:individual).on(:ssn).map(&:code).
|
506
|
-
|
507
|
-
result.errors.for(:merchant_account).for(:business).on(:legal_name).map(&:code).
|
508
|
-
result.errors.for(:merchant_account).for(:business).on(:dba_name).map(&:code).
|
509
|
-
result.errors.for(:merchant_account).for(:business).on(:tax_id).map(&:code).
|
510
|
-
result.errors.for(:merchant_account).for(:business).for(:address).on(:street_address).map(&:code).
|
511
|
-
result.errors.for(:merchant_account).for(:business).for(:address).on(:postal_code).map(&:code).
|
512
|
-
result.errors.for(:merchant_account).for(:business).for(:address).on(:region).map(&:code).
|
513
|
-
|
514
|
-
result.errors.for(:merchant_account).for(:funding).on(:destination).map(&:code).
|
515
|
-
result.errors.for(:merchant_account).for(:funding).on(:routing_number).map(&:code).
|
516
|
-
result.errors.for(:merchant_account).for(:funding).on(:account_number).map(&:code).
|
517
|
-
result.errors.for(:merchant_account).for(:funding).on(:email).map(&:code).
|
518
|
-
result.errors.for(:merchant_account).for(:funding).on(:mobile_phone).map(&:code).
|
519
|
-
|
520
|
-
result.errors.for(:merchant_account).on(:base).
|
497
|
+
expect(result).not_to be_success
|
498
|
+
expect(result.errors.for(:merchant_account).for(:individual).on(:first_name).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::FirstNameIsInvalid])
|
499
|
+
expect(result.errors.for(:merchant_account).for(:individual).on(:last_name).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::LastNameIsInvalid])
|
500
|
+
expect(result.errors.for(:merchant_account).for(:individual).on(:email).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::EmailIsInvalid])
|
501
|
+
expect(result.errors.for(:merchant_account).for(:individual).on(:phone).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::PhoneIsInvalid])
|
502
|
+
expect(result.errors.for(:merchant_account).for(:individual).for(:address).on(:street_address).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::Address::StreetAddressIsInvalid])
|
503
|
+
expect(result.errors.for(:merchant_account).for(:individual).for(:address).on(:postal_code).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::Address::PostalCodeIsInvalid])
|
504
|
+
expect(result.errors.for(:merchant_account).for(:individual).for(:address).on(:region).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::Address::RegionIsInvalid])
|
505
|
+
expect(result.errors.for(:merchant_account).for(:individual).on(:ssn).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Individual::SsnIsInvalid])
|
506
|
+
|
507
|
+
expect(result.errors.for(:merchant_account).for(:business).on(:legal_name).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Business::LegalNameIsInvalid])
|
508
|
+
expect(result.errors.for(:merchant_account).for(:business).on(:dba_name).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Business::DbaNameIsInvalid])
|
509
|
+
expect(result.errors.for(:merchant_account).for(:business).on(:tax_id).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Business::TaxIdIsInvalid])
|
510
|
+
expect(result.errors.for(:merchant_account).for(:business).for(:address).on(:street_address).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Business::Address::StreetAddressIsInvalid])
|
511
|
+
expect(result.errors.for(:merchant_account).for(:business).for(:address).on(:postal_code).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Business::Address::PostalCodeIsInvalid])
|
512
|
+
expect(result.errors.for(:merchant_account).for(:business).for(:address).on(:region).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Business::Address::RegionIsInvalid])
|
513
|
+
|
514
|
+
expect(result.errors.for(:merchant_account).for(:funding).on(:destination).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Funding::DestinationIsInvalid])
|
515
|
+
expect(result.errors.for(:merchant_account).for(:funding).on(:routing_number).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Funding::RoutingNumberIsInvalid])
|
516
|
+
expect(result.errors.for(:merchant_account).for(:funding).on(:account_number).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Funding::AccountNumberIsInvalid])
|
517
|
+
expect(result.errors.for(:merchant_account).for(:funding).on(:email).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Funding::EmailIsInvalid])
|
518
|
+
expect(result.errors.for(:merchant_account).for(:funding).on(:mobile_phone).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Funding::MobilePhoneIsInvalid])
|
519
|
+
|
520
|
+
expect(result.errors.for(:merchant_account).on(:base)).to be_empty
|
521
521
|
end
|
522
522
|
|
523
523
|
it "handles validation errors for business fields" do
|
@@ -530,9 +530,9 @@ describe Braintree::MerchantAccount do
|
|
530
530
|
}
|
531
531
|
)
|
532
532
|
|
533
|
-
result.
|
534
|
-
result.errors.for(:merchant_account).for(:business).on(:legal_name).map(&:code).
|
535
|
-
result.errors.for(:merchant_account).for(:business).on(:tax_id).map(&:code).
|
533
|
+
expect(result).not_to be_success
|
534
|
+
expect(result.errors.for(:merchant_account).for(:business).on(:legal_name).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Business::LegalNameIsRequiredWithTaxId])
|
535
|
+
expect(result.errors.for(:merchant_account).for(:business).on(:tax_id).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Business::TaxIdMustBeBlank])
|
536
536
|
|
537
537
|
result = Braintree::MerchantAccount.update(
|
538
538
|
"sandbox_sub_merchant_account", {
|
@@ -543,8 +543,8 @@ describe Braintree::MerchantAccount do
|
|
543
543
|
}
|
544
544
|
)
|
545
545
|
|
546
|
-
result.
|
547
|
-
result.errors.for(:merchant_account).for(:business).on(:tax_id).map(&:code).
|
546
|
+
expect(result).not_to be_success
|
547
|
+
expect(result.errors.for(:merchant_account).for(:business).on(:tax_id).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Business::TaxIdIsRequiredWithLegalName])
|
548
548
|
end
|
549
549
|
|
550
550
|
it "handles validation errors for funding fields" do
|
@@ -558,9 +558,9 @@ describe Braintree::MerchantAccount do
|
|
558
558
|
}
|
559
559
|
)
|
560
560
|
|
561
|
-
result.
|
562
|
-
result.errors.for(:merchant_account).for(:funding).on(:routing_number).map(&:code).
|
563
|
-
result.errors.for(:merchant_account).for(:funding).on(:account_number).map(&:code).
|
561
|
+
expect(result).not_to be_success
|
562
|
+
expect(result.errors.for(:merchant_account).for(:funding).on(:routing_number).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Funding::RoutingNumberIsRequired])
|
563
|
+
expect(result.errors.for(:merchant_account).for(:funding).on(:account_number).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Funding::AccountNumberIsRequired])
|
564
564
|
|
565
565
|
result = Braintree::MerchantAccount.update(
|
566
566
|
"sandbox_sub_merchant_account", {
|
@@ -571,8 +571,8 @@ describe Braintree::MerchantAccount do
|
|
571
571
|
}
|
572
572
|
)
|
573
573
|
|
574
|
-
result.
|
575
|
-
result.errors.for(:merchant_account).for(:funding).on(:email).map(&:code).
|
574
|
+
expect(result).not_to be_success
|
575
|
+
expect(result.errors.for(:merchant_account).for(:funding).on(:email).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Funding::EmailIsRequired])
|
576
576
|
|
577
577
|
result = Braintree::MerchantAccount.update(
|
578
578
|
"sandbox_sub_merchant_account", {
|
@@ -583,8 +583,8 @@ describe Braintree::MerchantAccount do
|
|
583
583
|
}
|
584
584
|
)
|
585
585
|
|
586
|
-
result.
|
587
|
-
result.errors.for(:merchant_account).for(:funding).on(:mobile_phone).map(&:code).
|
586
|
+
expect(result).not_to be_success
|
587
|
+
expect(result.errors.for(:merchant_account).for(:funding).on(:mobile_phone).map(&:code)).to eq([Braintree::ErrorCodes::MerchantAccount::Funding::MobilePhoneIsRequired])
|
588
588
|
end
|
589
589
|
end
|
590
590
|
|
@@ -596,8 +596,8 @@ describe Braintree::MerchantAccount do
|
|
596
596
|
params[:individual][:first_name] = "John"
|
597
597
|
params[:individual][:last_name] = "Doe"
|
598
598
|
merchant_account = Braintree::MerchantAccount.update!("sandbox_sub_merchant_account", params)
|
599
|
-
merchant_account.individual_details.first_name.
|
600
|
-
merchant_account.individual_details.last_name.
|
599
|
+
expect(merchant_account.individual_details.first_name).to eq("John")
|
600
|
+
expect(merchant_account.individual_details.last_name).to eq("Doe")
|
601
601
|
end
|
602
602
|
end
|
603
603
|
end
|