test/test_data.rb in stripe-1.17.3 vs test/test_data.rb in stripe-1.18.0
- old
+ new
@@ -183,19 +183,28 @@
}.merge(params)
end
def test_file(params={})
{
+ :object => "file_upload",
:id => "fil_test_file",
:created => 1403047735,
:size => 4908,
:purpose => params[:purpose] || "dispute_evidence",
:url => nil,
- :mimetype => nil,
+ :type => nil,
}
end
+ def test_file_array
+ {
+ :data => [test_file, test_file, test_file],
+ :object => 'list',
+ :url => '/v1/files'
+ }
+ end
+
#FIXME nested overrides would be better than hardcoding plan_id
def test_subscription(params = {})
plan = params.delete(:plan) || 'gold'
{
:current_period_end => 1308681468,
@@ -368,9 +377,48 @@
def test_canceled_transfer
test_transfer.merge({
:status => 'canceled'
})
+ end
+
+ def test_bitcoin_receiver(params={})
+ {
+ :id => 'btcrcv_test_receiver',
+ :amount => 100,
+ :currency => 'usd',
+ :description => 'some details',
+ :metadata => {},
+ :object => 'bitcoin_receiver',
+ :transactions => test_bitcoin_transaction_array
+ }.merge(params)
+ end
+
+ def test_bitcoin_receiver_array
+ {
+ :data => [test_bitcoin_receiver, test_bitcoin_receiver, test_bitcoin_receiver],
+ :object => 'list',
+ :url => '/v1/bitcoin/receivers'
+ }
+ end
+
+ def test_bitcoin_transaction(params={})
+ {
+ :id => 'btctxn_test_transaction',
+ :object => 'bitcoin_transaction',
+ :amount => 100,
+ :currency => 'usd',
+ :bitcoin_amount => 90,
+ :receiver => 'btcrcv_test_receiver'
+ }.merge(params)
+ end
+
+ def test_bitcoin_transaction_array
+ {
+ :data => [test_bitcoin_transaction, test_bitcoin_transaction, test_bitcoin_transaction],
+ :object => 'list',
+ :url => "/v1/bitcoin/receivers/btcrcv_test_receiver/transactions"
+ }
end
def test_invalid_api_key_error
{
:error => {