diff --git a/schema/account_list_resp.go b/schema/account_list_resp.go index d4801c4..b0e2d53 100644 --- a/schema/account_list_resp.go +++ b/schema/account_list_resp.go @@ -152,7 +152,6 @@ type AccountListRespAccountListElemLinkedToElem struct { type AccountListRespAccountListElemLinkedToElemPlatform string const AccountListRespAccountListElemLinkedToElemPlatformCtrader AccountListRespAccountListElemLinkedToElemPlatform = "ctrader" -const AccountListRespAccountListElemLinkedToElemPlatformDerivez AccountListRespAccountListElemLinkedToElemPlatform = "derivez" const AccountListRespAccountListElemLinkedToElemPlatformDtrade AccountListRespAccountListElemLinkedToElemPlatform = "dtrade" const AccountListRespAccountListElemLinkedToElemPlatformDwallet AccountListRespAccountListElemLinkedToElemPlatform = "dwallet" const AccountListRespAccountListElemLinkedToElemPlatformDxtrade AccountListRespAccountListElemLinkedToElemPlatform = "dxtrade" @@ -160,7 +159,6 @@ const AccountListRespAccountListElemLinkedToElemPlatformMt5 AccountListRespAccou var enumValues_AccountListRespAccountListElemLinkedToElemPlatform = []interface{}{ "ctrader", - "derivez", "dtrade", "dwallet", "dxtrade", diff --git a/schema/authorize_resp.go b/schema/authorize_resp.go index 803c4cc..b17a7a4 100644 --- a/schema/authorize_resp.go +++ b/schema/authorize_resp.go @@ -211,7 +211,6 @@ type AuthorizeRespAuthorizeAccountListElemLinkedToElem struct { type AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform string const AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatformCtrader AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform = "ctrader" -const AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatformDerivez AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform = "derivez" const AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatformDtrade AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform = "dtrade" const AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatformDwallet AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform = "dwallet" const AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatformDxtrade AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform = "dxtrade" @@ -219,7 +218,6 @@ const AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatformMt5 AuthorizeResp var enumValues_AuthorizeRespAuthorizeAccountListElemLinkedToElemPlatform = []interface{}{ "ctrader", - "derivez", "dtrade", "dwallet", "dxtrade", @@ -284,7 +282,6 @@ type AuthorizeRespAuthorizeLinkedToElem struct { type AuthorizeRespAuthorizeLinkedToElemPlatform string const AuthorizeRespAuthorizeLinkedToElemPlatformCtrader AuthorizeRespAuthorizeLinkedToElemPlatform = "ctrader" -const AuthorizeRespAuthorizeLinkedToElemPlatformDerivez AuthorizeRespAuthorizeLinkedToElemPlatform = "derivez" const AuthorizeRespAuthorizeLinkedToElemPlatformDtrade AuthorizeRespAuthorizeLinkedToElemPlatform = "dtrade" const AuthorizeRespAuthorizeLinkedToElemPlatformDwallet AuthorizeRespAuthorizeLinkedToElemPlatform = "dwallet" const AuthorizeRespAuthorizeLinkedToElemPlatformDxtrade AuthorizeRespAuthorizeLinkedToElemPlatform = "dxtrade" @@ -292,7 +289,6 @@ const AuthorizeRespAuthorizeLinkedToElemPlatformMt5 AuthorizeRespAuthorizeLinked var enumValues_AuthorizeRespAuthorizeLinkedToElemPlatform = []interface{}{ "ctrader", - "derivez", "dtrade", "dwallet", "dxtrade", diff --git a/schema/landing_company_resp.go b/schema/landing_company_resp.go index e2ee137..2963d77 100644 --- a/schema/landing_company_resp.go +++ b/schema/landing_company_resp.go @@ -191,9 +191,6 @@ type LandingCompanyRespLandingCompany struct { // Available CTrader accounts. Ctrader *LandingCompanyRespLandingCompanyCtrader `json:"ctrader,omitempty"` - // Available DerivEZ accounts. - Derivez *LandingCompanyRespLandingCompanyDerivez `json:"derivez,omitempty"` - // Available Deriv X all account types (Synthetic Indices and Financials). DxtradeAllCompany *LandingCompanyRespLandingCompanyDxtradeAllCompany `json:"dxtrade_all_company,omitempty"` @@ -369,48 +366,6 @@ func (j *LandingCompanyRespLandingCompanyCtraderAllStandard) UnmarshalJSON(b []b return nil } -// Available DerivEZ accounts. -type LandingCompanyRespLandingCompanyDerivez struct { - // DerivEZ all account types (Synthetic Indices and Financials). - All *LandingCompanyRespLandingCompanyDerivezAll `json:"all,omitempty"` -} - -// DerivEZ all account types (Synthetic Indices and Financials). -type LandingCompanyRespLandingCompanyDerivezAll struct { - // For standard client - Standard *LandingCompanyRespLandingCompanyDerivezAllStandard `json:"standard,omitempty"` -} - -type LandingCompanyRespLandingCompanyDerivezAllStandard string - -const LandingCompanyRespLandingCompanyDerivezAllStandardNone LandingCompanyRespLandingCompanyDerivezAllStandard = "none" -const LandingCompanyRespLandingCompanyDerivezAllStandardSvg LandingCompanyRespLandingCompanyDerivezAllStandard = "svg" - -var enumValues_LandingCompanyRespLandingCompanyDerivezAllStandard = []interface{}{ - "svg", - "none", -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *LandingCompanyRespLandingCompanyDerivezAllStandard) UnmarshalJSON(b []byte) error { - var v string - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_LandingCompanyRespLandingCompanyDerivezAllStandard { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_LandingCompanyRespLandingCompanyDerivezAllStandard, v) - } - *j = LandingCompanyRespLandingCompanyDerivezAllStandard(v) - return nil -} - // Available Deriv X all account types (Synthetic Indices and Financials). type LandingCompanyRespLandingCompanyDxtradeAllCompany struct { // Landing Company details. diff --git a/schema/mt5_get_settings_resp.go b/schema/mt5_get_settings_resp.go index 01630da..5131545 100644 --- a/schema/mt5_get_settings_resp.go +++ b/schema/mt5_get_settings_resp.go @@ -330,13 +330,11 @@ func (j *Mt5GetSettingsRespMt5GetSettingsSubAccountCategory) UnmarshalJSON(b []b type Mt5GetSettingsRespMt5GetSettingsSubAccountType string -const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeDerivez Mt5GetSettingsRespMt5GetSettingsSubAccountType = "derivez" const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeFinancial Mt5GetSettingsRespMt5GetSettingsSubAccountType = "financial" const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeFinancialStp Mt5GetSettingsRespMt5GetSettingsSubAccountType = "financial_stp" const Mt5GetSettingsRespMt5GetSettingsSubAccountTypeStandard Mt5GetSettingsRespMt5GetSettingsSubAccountType = "standard" var enumValues_Mt5GetSettingsRespMt5GetSettingsSubAccountType = []interface{}{ - "derivez", "financial", "financial_stp", "standard", diff --git a/schema/p2p_advertiser_relations.go b/schema/p2p_advertiser_relations.go index 7a10df8..579bca1 100644 --- a/schema/p2p_advertiser_relations.go +++ b/schema/p2p_advertiser_relations.go @@ -79,17 +79,29 @@ func (j *P2PAdvertiserRelations) UnmarshalJSON(b []byte) error { if err := json.Unmarshal(b, &plain); err != nil { return err } - if len(plain.AddBlocked) > 100 { - return fmt.Errorf("field %s length: must be <= %d", "add_blocked", 100) + if plain.AddBlocked != nil && len(plain.AddBlocked) < 1 { + return fmt.Errorf("field %s length: must be >= %d", "add_blocked", 1) } - if len(plain.AddFavourites) > 100 { - return fmt.Errorf("field %s length: must be <= %d", "add_favourites", 100) + if len(plain.AddBlocked) > 5 { + return fmt.Errorf("field %s length: must be <= %d", "add_blocked", 5) } - if len(plain.RemoveBlocked) > 100 { - return fmt.Errorf("field %s length: must be <= %d", "remove_blocked", 100) + if plain.AddFavourites != nil && len(plain.AddFavourites) < 1 { + return fmt.Errorf("field %s length: must be >= %d", "add_favourites", 1) } - if len(plain.RemoveFavourites) > 100 { - return fmt.Errorf("field %s length: must be <= %d", "remove_favourites", 100) + if len(plain.AddFavourites) > 5 { + return fmt.Errorf("field %s length: must be <= %d", "add_favourites", 5) + } + if plain.RemoveBlocked != nil && len(plain.RemoveBlocked) < 1 { + return fmt.Errorf("field %s length: must be >= %d", "remove_blocked", 1) + } + if len(plain.RemoveBlocked) > 5 { + return fmt.Errorf("field %s length: must be <= %d", "remove_blocked", 5) + } + if plain.RemoveFavourites != nil && len(plain.RemoveFavourites) < 1 { + return fmt.Errorf("field %s length: must be >= %d", "remove_favourites", 1) + } + if len(plain.RemoveFavourites) > 5 { + return fmt.Errorf("field %s length: must be <= %d", "remove_favourites", 5) } *j = P2PAdvertiserRelations(plain) return nil diff --git a/schema/transfer_between_accounts_resp.go b/schema/transfer_between_accounts_resp.go index c522b66..00b3700 100644 --- a/schema/transfer_between_accounts_resp.go +++ b/schema/transfer_between_accounts_resp.go @@ -51,9 +51,6 @@ type TransferBetweenAccountsRespAccountsElem struct { // 0 for real accounts; 1 for virtual/demo accounts. DemoAccount *TransferBetweenAccountsRespAccountsElemDemoAccount `json:"demo_account,omitempty"` - // The group of derivez account. - DerivezGroup *string `json:"derivez_group,omitempty"` - // Landing company shortcode of the Trading account. LandingCompanyShort *string `json:"landing_company_short,omitempty"` @@ -115,7 +112,6 @@ type TransferBetweenAccountsRespAccountsElemAccountType string const TransferBetweenAccountsRespAccountsElemAccountTypeBinary TransferBetweenAccountsRespAccountsElemAccountType = "binary" const TransferBetweenAccountsRespAccountsElemAccountTypeCrypto TransferBetweenAccountsRespAccountsElemAccountType = "crypto" const TransferBetweenAccountsRespAccountsElemAccountTypeCtrader TransferBetweenAccountsRespAccountsElemAccountType = "ctrader" -const TransferBetweenAccountsRespAccountsElemAccountTypeDerivez TransferBetweenAccountsRespAccountsElemAccountType = "derivez" const TransferBetweenAccountsRespAccountsElemAccountTypeDoughflow TransferBetweenAccountsRespAccountsElemAccountType = "doughflow" const TransferBetweenAccountsRespAccountsElemAccountTypeDxtrade TransferBetweenAccountsRespAccountsElemAccountType = "dxtrade" const TransferBetweenAccountsRespAccountsElemAccountTypeMt5 TransferBetweenAccountsRespAccountsElemAccountType = "mt5" @@ -131,7 +127,6 @@ var enumValues_TransferBetweenAccountsRespAccountsElemAccountType = []interface{ "ctrader", "doughflow", "dxtrade", - "derivez", "mt5", "p2p", "paymentagent",