class ExpertSenderApi::Subscriber::Property

Constants

TYPE_DATE
TYPE_DATE_TIME
TYPE_INTEGER
TYPE_STRING

Attributes

id[RW]
type[RW]
value[RW]

Public Class Methods

new(id: nil, value: nil, type: TYPE_STRING) click to toggle source
# File lib/expertsender_api/subscriber/property.rb, line 10
def initialize(id: nil, value: nil, type: TYPE_STRING)
  @id = id
  @value = value
  @type = type
end

Public Instance Methods

insert_to(xml) click to toggle source
# File lib/expertsender_api/subscriber/property.rb, line 16
def insert_to(xml)
  xml.Property {
    xml.Id id
    xml.Value value, 'xsi:type' => "xs:#{type}"
  }
end