forked from FilipeMata/gn-api-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
162902b
commit 93a48a1
Showing
6 changed files
with
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# 1.0.1 | ||
|
||
- Added: new endpoint (update plan) | ||
- Added: new endpoint (create subscription history) | ||
- Updated: examples | ||
|
||
# 1.0.0 | ||
|
||
- Initial release |
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,25 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/gerencianet/gn-api-sdk-go/gerencianet" | ||
"github.com/gerencianet/gn-api-sdk-go/_examples/configs" | ||
) | ||
|
||
func main(){ | ||
|
||
credentials := configs.Credentials | ||
gn := gerencianet.NewGerencianet(credentials) | ||
|
||
body := map[string]interface{} { | ||
"description": "This subscription was not fully paid", | ||
} | ||
|
||
res, err := gn.CreateSubscriptionHistory(13100, body) // no lugar do 1 coloque o subscription_id certo | ||
|
||
if err != nil { | ||
fmt.Println(err) | ||
} else { | ||
fmt.Println(res) | ||
} | ||
} |
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,25 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/gerencianet/gn-api-sdk-go/gerencianet" | ||
"github.com/gerencianet/gn-api-sdk-go/_examples/configs" | ||
) | ||
|
||
func main(){ | ||
|
||
credentials := configs.Credentials | ||
gn := gerencianet.NewGerencianet(credentials) | ||
|
||
body := map[string]interface{} { | ||
"name": "My new plan", | ||
} | ||
|
||
res, err := gn.UpdatePlan(1, body) // no lugar do 1 coloque o plan_id certo | ||
|
||
if err != nil { | ||
fmt.Println(err) | ||
} else { | ||
fmt.Println(res) | ||
} | ||
} |
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