123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package response
- import "log"
- import "encoding/xml"
- ///////////// InstructionRejectedEvent
- type InstructionRejectedEvent struct {
- XMLName xml.Name `xml:"instructionRejected"`
- InstructionId string `xml:"instructionId"`
- Reason string `xml:"reason"`
- AccountId int64 `xml:"accountId"`
- InstrumentId int64 `xml:"instrumentId"`
- }
- func (this *InstructionRejectedEvent) GetId() string {
- return this.InstructionId
- }
- func (this *InstructionRejectedEvent) SetId(id string) {
- this.InstructionId = id
- }
- func (this *InstructionRejectedEvent) Clone() interface{} {
- tmp := *this
- return &tmp
- }
- func (this *InstructionRejectedEvent) SetAccountId(id int64) {
- this.AccountId = id
- }
- func NewInstructionRejectedEvent(eventData string) *InstructionRejectedEvent {
- event := InstructionRejectedEvent{}
- err := xml.Unmarshal([]byte(eventData), &event)
- if err != nil {
- log.Println("NewInstructionRejectedEvent:", err, eventData)
- return nil
- }
- return &event
- }
|