Skip to content

Commit

Permalink
Merge pull request #472 from stripe/ob-sources-statement-descriptor
Browse files Browse the repository at this point in the history
Adds support for statement_descriptor field
  • Loading branch information
brandur-stripe authored Oct 9, 2017
2 parents 8cc9afd + 59a8f7b commit 8118b6c
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions source.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,18 @@ type RedirectParams struct {
}

type SourceObjectParams struct {
Params `form:"*"`
Amount uint64 `form:"amount"`
Currency Currency `form:"currency"`
Customer string `form:"customer"`
Flow SourceFlow `form:"flow"`
Owner *SourceOwnerParams `form:"owner"`
Redirect *RedirectParams `form:"redirect"`
Token string `form:"token"`
Type string `form:"type"`
TypeData map[string]string `form:"-"`
Usage SourceUsage `form:"usage"`
Params `form:"*"`
Amount uint64 `form:"amount"`
Currency Currency `form:"currency"`
Customer string `form:"customer"`
Flow SourceFlow `form:"flow"`
Owner *SourceOwnerParams `form:"owner"`
Redirect *RedirectParams `form:"redirect"`
StatementDescriptor string `form:"statement_descriptor"`
Token string `form:"token"`
Type string `form:"type"`
TypeData map[string]string `form:"-"`
Usage SourceUsage `form:"usage"`
}

// SourceObjectDetachParams is the set of parameters that can be used when detaching
Expand Down Expand Up @@ -187,22 +188,23 @@ type VerificationFlow struct {
}

type Source struct {
Amount int64 `json:"amount"`
ClientSecret string `json:"client_secret"`
Created int64 `json:"created"`
Currency Currency `json:"currency"`
Flow SourceFlow `json:"flow"`
ID string `json:"id"`
Live bool `json:"livemode"`
Meta map[string]string `json:"metadata"`
Owner SourceOwner `json:"owner"`
Receiver *ReceiverFlow `json:"receiver,omitempty"`
Redirect *RedirectFlow `json:"redirect,omitempty"`
Status SourceStatus `json:"status"`
Type string `json:"type"`
TypeData map[string]interface{}
Usage SourceUsage `json:"usage"`
Verification *VerificationFlow `json:"verification,omitempty"`
Amount int64 `json:"amount"`
ClientSecret string `json:"client_secret"`
Created int64 `json:"created"`
Currency Currency `json:"currency"`
Flow SourceFlow `json:"flow"`
ID string `json:"id"`
Live bool `json:"livemode"`
Meta map[string]string `json:"metadata"`
Owner SourceOwner `json:"owner"`
Receiver *ReceiverFlow `json:"receiver,omitempty"`
Redirect *RedirectFlow `json:"redirect,omitempty"`
StatementDescriptor string `json:"statement_descriptor"`
Status SourceStatus `json:"status"`
Type string `json:"type"`
TypeData map[string]interface{}
Usage SourceUsage `json:"usage"`
Verification *VerificationFlow `json:"verification,omitempty"`
}

// AppendTo implements custom encoding logic for SourceObjectParams so that the special
Expand Down

0 comments on commit 8118b6c

Please sign in to comment.