Class: Vx::ServiceConnector::Model::Payload

Inherits:
Struct
  • Object
show all
Defined in:
lib/vx/service_connector/model.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authorObject

Returns the value of attribute author

Returns:

  • (Object)

    the current value of author



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def author
  @author
end

#author_emailObject

Returns the value of attribute author_email

Returns:

  • (Object)

    the current value of author_email



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def author_email
  @author_email
end

#branchObject

Returns the value of attribute branch

Returns:

  • (Object)

    the current value of branch



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def branch
  @branch
end

#branch_labelObject

Returns the value of attribute branch_label

Returns:

  • (Object)

    the current value of branch_label



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def branch_label
  @branch_label
end

#ignore?Object

Returns the value of attribute ignore?

Returns:

  • (Object)

    the current value of ignore?



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def ignore?
  @ignore?
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def message
  @message
end

#pull_request?Object

Returns the value of attribute pull_request?

Returns:

  • (Object)

    the current value of pull_request?



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def pull_request?
  @pull_request?
end

#pull_request_numberObject

Returns the value of attribute pull_request_number

Returns:

  • (Object)

    the current value of pull_request_number



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def pull_request_number
  @pull_request_number
end

#shaObject

Returns the value of attribute sha

Returns:

  • (Object)

    the current value of sha



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def sha
  @sha
end

#web_urlObject

Returns the value of attribute web_url

Returns:

  • (Object)

    the current value of web_url



14
15
16
# File 'lib/vx/service_connector/model.rb', line 14

def web_url
  @web_url
end

Class Method Details

.from_hash(params) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/vx/service_connector/model.rb', line 29

def from_hash(params)
  payload = Payload.new
  payload.members.each do |m|
    payload[m] = params.key?(m) ? params[m] : params[m.to_s]
  end
  payload
end

Instance Method Details

#to_hashObject



26
# File 'lib/vx/service_connector/model.rb', line 26

def to_hash ; to_h end