-
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.
Create/Update support for BillingEntities
- Loading branch information
Showing
16 changed files
with
436 additions
and
162 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
2 changes: 1 addition & 1 deletion
2
apiserver/billing/odoostorage/odoo/odoo8/client/clientmock/session.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
apiserver/billing/odoostorage/odoo/odoo8/client/model/category_id_test.go
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,16 @@ | ||
package model_test | ||
|
||
import ( | ||
"encoding/json" | ||
"testing" | ||
|
||
"github.com/appuio/control-api/apiserver/billing/odoostorage/odoo/odoo8/client/model" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestCategoryIDs_MarshalJSON(t *testing.T) { | ||
m, err := json.Marshal(model.CategoryIDs{1, 2, 3}) | ||
|
||
require.NoError(t, err) | ||
require.Equal(t, `[[6,false,[1,2,3]]]`, string(m)) | ||
} |
11 changes: 11 additions & 0 deletions
11
apiserver/billing/odoostorage/odoo/odoo8/client/model/category_ids.go
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 @@ | ||
package model | ||
|
||
import "encoding/json" | ||
|
||
type CategoryIDs []int | ||
|
||
func (t CategoryIDs) MarshalJSON() ([]byte, error) { | ||
// Values observed on test and prod instances. | ||
// I neither know or care what the fuck they mean. | ||
return json.Marshal([][]any{{6, false, []int(t)}}) | ||
} |
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
81 changes: 0 additions & 81 deletions
81
apiserver/billing/odoostorage/odoo/odoo8/client/model/tax_id.go
This file was deleted.
Oops, something went wrong.
47 changes: 0 additions & 47 deletions
47
apiserver/billing/odoostorage/odoo/odoo8/client/model/tax_id_test.go
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
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
Oops, something went wrong.