-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/payment-methods
- Loading branch information
Showing
10 changed files
with
100 additions
and
118 deletions.
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
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,37 @@ | ||
package config | ||
|
||
import ( | ||
"github.com/mercadopago/sdk-go/pkg/internal/requester" | ||
) | ||
|
||
type Option func(*Config) | ||
|
||
// WithHTTTPClient allow to do requests using received http client. | ||
func WithHTTTPClient(r requester.Requester) Option { | ||
return func(c *Config) { | ||
if r != nil { | ||
c.Requester = r | ||
} | ||
} | ||
} | ||
|
||
// WithCorporationID send corporation id to api by headers. | ||
func WithCorporationID(value string) Option { | ||
return func(c *Config) { | ||
c.CorporationID = value | ||
} | ||
} | ||
|
||
// WithIntegratorID send integrator id to api by headers. | ||
func WithIntegratorID(i string) Option { | ||
return func(c *Config) { | ||
c.IntegratorID = i | ||
} | ||
} | ||
|
||
// WithPlatformID send platform id to api by headers. | ||
func WithPlatformID(p string) Option { | ||
return func(c *Config) { | ||
c.PlatformID = p | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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