Class: AgridClient::LeadInput

Inherits:
Object
  • Object
show all
Includes:
SwaggerModel
Defined in:
lib/agrid_client/models/lead_input.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SwaggerModel

#_deserialize, #_to_hash, #build_from_hash, #eql?, #to_body, #to_hash

Constructor Details

#initialize(attributes = {}) ⇒ LeadInput

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/agrid_client/models/lead_input.rb', line 55

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

  if attributes[:'message']
    self.message = attributes[:'message']
  end
  if attributes[:'partner_id']
    self.partner_id = attributes[:'partner_id']
  end
  if attributes[:'quote_id']
    self.quote_id = attributes[:'quote_id']
  end
  if attributes[:'company_id']
    self.company_id = attributes[:'company_id']
  end
  if attributes[:'customer']
    self.customer = attributes[:'customer']
  end
end

Instance Attribute Details

#company_idObject

Returns the value of attribute company_id.



27
28
29
# File 'lib/agrid_client/models/lead_input.rb', line 27

def company_id
  @company_id
end

#customerObject

Returns the value of attribute customer.



29
30
31
# File 'lib/agrid_client/models/lead_input.rb', line 29

def customer
  @customer
end

#messageObject

Returns the value of attribute message.



20
21
22
# File 'lib/agrid_client/models/lead_input.rb', line 20

def message
  @message
end

#partner_idObject

The id which will identify your leads



23
24
25
# File 'lib/agrid_client/models/lead_input.rb', line 23

def partner_id
  @partner_id
end

#quote_idObject

Returns the value of attribute quote_id.



25
26
27
# File 'lib/agrid_client/models/lead_input.rb', line 25

def quote_id
  @quote_id
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



32
33
34
35
36
37
38
39
40
# File 'lib/agrid_client/models/lead_input.rb', line 32

def self.attribute_map
  {
    :'message' => :'message',
    :'partner_id' => :'partner_id',
    :'quote_id' => :'quote_id',
    :'company_id' => :'company_id',
    :'customer' => :'customer'
  }
end

.swagger_typesObject

Attribute type mapping.



43
44
45
46
47
48
49
50
51
# File 'lib/agrid_client/models/lead_input.rb', line 43

def self.swagger_types
  {
    :'message' => :'String',
    :'partner_id' => :'String',
    :'quote_id' => :'String',
    :'company_id' => :'String',
    :'customer' => :'CustomerInput'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



80
81
82
83
84
85
86
87
88
# File 'lib/agrid_client/models/lead_input.rb', line 80

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      message == o.message &&
      partner_id == o.partner_id &&
      quote_id == o.quote_id &&
      company_id == o.company_id &&
      customer == o.customer
end