forked from stripe/stripe-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for v1/issuer_fraud_records endpoints (stripe#645)
- Loading branch information
1 parent
d07d1d3
commit 6ce4519
Showing
5 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Stripe | ||
class IssuerFraudRecord < APIResource | ||
extend Stripe::APIOperations::List | ||
|
||
OBJECT_NAME = "issuer_fraud_record".freeze | ||
|
||
def self.resource_url | ||
"/v1/issuer_fraud_records" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require File.expand_path("../../test_helper", __FILE__) | ||
|
||
module Stripe | ||
class IssuerFraudRecordTest < Test::Unit::TestCase | ||
should "be listable" do | ||
issfrs = Stripe::IssuerFraudRecord.list | ||
assert_requested :get, "#{Stripe.api_base}/v1/issuer_fraud_records" | ||
assert issfrs.data.is_a?(Array) | ||
assert issfrs.data[0].is_a?(Stripe::IssuerFraudRecord) | ||
end | ||
|
||
should "be retrievable" do | ||
issfr = Stripe::IssuerFraudRecord.retrieve("issfr_123") | ||
assert_requested :get, "#{Stripe.api_base}/v1/issuer_fraud_records/issfr_123" | ||
assert issfr.is_a?(Stripe::IssuerFraudRecord) | ||
end | ||
end | ||
end |