From 25a94e6f33f8b07118fe23e2881ecba9dcf493cb Mon Sep 17 00:00:00 2001 From: Kirill Sysoev Date: Wed, 29 May 2024 08:04:22 +0000 Subject: [PATCH] Updates API schema --- schema/get_account_status_resp.go | 349 ------------------------------ schema/verify_email.go | 2 + 2 files changed, 2 insertions(+), 349 deletions(-) diff --git a/schema/get_account_status_resp.go b/schema/get_account_status_resp.go index 41b449f..023cd94 100644 --- a/schema/get_account_status_resp.go +++ b/schema/get_account_status_resp.go @@ -221,10 +221,6 @@ type GetAccountStatusRespGetAccountStatusAuthenticationAttemptsLatest map[string // The authentication status for document. type GetAccountStatusRespGetAccountStatusAuthenticationDocument struct { - // This represents the current status of idv authentication for each mt5 - // jurisdiction. - AuthenticatedWithIdv *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdv `json:"authenticated_with_idv,omitempty"` - // This is the epoch of the document expiry date. ExpiryDate *int `json:"expiry_date,omitempty"` @@ -236,351 +232,6 @@ type GetAccountStatusRespGetAccountStatusAuthenticationDocument struct { VerifiedJurisdiction *GetAccountStatusRespGetAccountStatusAuthenticationDocumentVerifiedJurisdiction `json:"verified_jurisdiction,omitempty"` } -// This represents the current status of idv authentication for each mt5 -// jurisdiction. -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdv struct { - // This represents whether the client is allowed or not to create an account under - // this jurisdiction - Bvi *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvBvi `json:"bvi,omitempty"` - - // This represents whether the client is allowed or not to create an account under - // this jurisdiction - Dsl *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvDsl `json:"dsl,omitempty"` - - // This represents whether the client is allowed or not to create an account under - // this jurisdiction - Iom *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvIom `json:"iom,omitempty"` - - // This represents whether the client is allowed or not to create an account under - // this jurisdiction - Labuan *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvLabuan `json:"labuan,omitempty"` - - // This represents whether the client is allowed or not to create an account under - // this jurisdiction - Malta *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMalta `json:"malta,omitempty"` - - // This represents whether the client is allowed or not to create an account under - // this jurisdiction - Maltainvest *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMaltainvest `json:"maltainvest,omitempty"` - - // This represents whether the client is allowed or not to create an account under - // this jurisdiction - Samoa *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoa `json:"samoa,omitempty"` - - // This represents whether the client is allowed or not to create an account under - // this jurisdiction - SamoaVirtual *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoaVirtual `json:"samoa-virtual,omitempty"` - - // This represents whether the client is allowed or not to create an account under - // this jurisdiction - Svg *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSvg `json:"svg,omitempty"` - - // This represents whether the client is allowed or not to create an account under - // this jurisdiction - Vanuatu *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVanuatu `json:"vanuatu,omitempty"` - - // This represents whether the client is allowed or not to create an account under - // this jurisdiction - Virtual *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVirtual `json:"virtual,omitempty"` -} - -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvBvi int - -var enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvBvi = []interface{}{ - 0, - 1, -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvBvi) UnmarshalJSON(b []byte) error { - var v int - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvBvi { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvBvi, v) - } - *j = GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvBvi(v) - return nil -} - -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvDsl int - -var enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvDsl = []interface{}{ - 0, - 1, -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvDsl) UnmarshalJSON(b []byte) error { - var v int - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvDsl { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvDsl, v) - } - *j = GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvDsl(v) - return nil -} - -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvIom int - -var enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvIom = []interface{}{ - 0, - 1, -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvIom) UnmarshalJSON(b []byte) error { - var v int - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvIom { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvIom, v) - } - *j = GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvIom(v) - return nil -} - -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvLabuan int - -var enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvLabuan = []interface{}{ - 0, - 1, -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvLabuan) UnmarshalJSON(b []byte) error { - var v int - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvLabuan { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvLabuan, v) - } - *j = GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvLabuan(v) - return nil -} - -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMalta int - -var enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMalta = []interface{}{ - 0, - 1, -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMalta) UnmarshalJSON(b []byte) error { - var v int - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMalta { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMalta, v) - } - *j = GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMalta(v) - return nil -} - -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMaltainvest int - -var enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMaltainvest = []interface{}{ - 0, - 1, -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMaltainvest) UnmarshalJSON(b []byte) error { - var v int - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMaltainvest { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMaltainvest, v) - } - *j = GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvMaltainvest(v) - return nil -} - -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoa int - -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoaVirtual int - -var enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoaVirtual = []interface{}{ - 0, - 1, -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoaVirtual) UnmarshalJSON(b []byte) error { - var v int - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoaVirtual { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoaVirtual, v) - } - *j = GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoaVirtual(v) - return nil -} - -var enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoa = []interface{}{ - 0, - 1, -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoa) UnmarshalJSON(b []byte) error { - var v int - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoa { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoa, v) - } - *j = GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSamoa(v) - return nil -} - -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSvg int - -var enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSvg = []interface{}{ - 0, - 1, -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSvg) UnmarshalJSON(b []byte) error { - var v int - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSvg { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSvg, v) - } - *j = GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvSvg(v) - return nil -} - -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVanuatu int - -var enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVanuatu = []interface{}{ - 0, - 1, -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVanuatu) UnmarshalJSON(b []byte) error { - var v int - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVanuatu { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVanuatu, v) - } - *j = GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVanuatu(v) - return nil -} - -type GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVirtual int - -var enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVirtual = []interface{}{ - 0, - 1, -} - -// UnmarshalJSON implements json.Unmarshaler. -func (j *GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVirtual) UnmarshalJSON(b []byte) error { - var v int - if err := json.Unmarshal(b, &v); err != nil { - return err - } - var ok bool - for _, expected := range enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVirtual { - if reflect.DeepEqual(v, expected) { - ok = true - break - } - } - if !ok { - return fmt.Errorf("invalid value (expected one of %#v): %#v", enumValues_GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVirtual, v) - } - *j = GetAccountStatusRespGetAccountStatusAuthenticationDocumentAuthenticatedWithIdvVirtual(v) - return nil -} - type GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus string const GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatusExpired GetAccountStatusRespGetAccountStatusAuthenticationDocumentStatus = "expired" diff --git a/schema/verify_email.go b/schema/verify_email.go index 5a224de..7ed1bd3 100644 --- a/schema/verify_email.go +++ b/schema/verify_email.go @@ -42,6 +42,7 @@ const VerifyEmailTypeAccountVerification VerifyEmailType = "account_verification const VerifyEmailTypePartnerAccountOpening VerifyEmailType = "partner_account_opening" const VerifyEmailTypePaymentWithdraw VerifyEmailType = "payment_withdraw" const VerifyEmailTypePaymentagentWithdraw VerifyEmailType = "paymentagent_withdraw" +const VerifyEmailTypePhoneNumberVerification VerifyEmailType = "phone_number_verification" const VerifyEmailTypeRequestEmail VerifyEmailType = "request_email" const VerifyEmailTypeResetPassword VerifyEmailType = "reset_password" const VerifyEmailTypeTradingPlatformDxtradePasswordReset VerifyEmailType = "trading_platform_dxtrade_password_reset" @@ -59,6 +60,7 @@ var enumValues_VerifyEmailType = []interface{}{ "trading_platform_mt5_password_reset", "trading_platform_investor_password_reset", "request_email", + "phone_number_verification", } // UnmarshalJSON implements json.Unmarshaler.