Skip to content

Commit

Permalink
Add support for Source sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-stripe committed Dec 12, 2017
1 parent 859fb32 commit cbfc009
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions source.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ type SourceObjectParams struct {
Currency Currency `form:"currency"`
Customer string `form:"customer"`
Flow SourceFlow `form:"flow"`
OriginalSource string `form:"original_source"`
Owner *SourceOwnerParams `form:"owner"`
Redirect *RedirectParams `form:"redirect"`
StatementDescriptor string `form:"statement_descriptor"`
Expand Down
13 changes: 13 additions & 0 deletions source/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,16 @@ func TestSourceDetach(t *testing.T) {
assert.Nil(t, err)
assert.NotNil(t, source)
}

func TestSourceSharing(t *testing.T) {
params := &stripe.SourceObjectParams{
Type: "card",
Customer: "cus_123",
OriginalSource: "src_123",
Usage: stripe.UsageReusable,
}
params.SetStripeAccount("acct_123")
source, err := New(params)
assert.Nil(t, err)
assert.NotNil(t, source)
}

0 comments on commit cbfc009

Please sign in to comment.