class InfobipApi::LastPartOfUrlFieldConversionRule

Public Class Methods

new(json_field_name: nil) click to toggle source
Calls superclass method InfobipApi::FieldConversionRule::new
# File lib/infobipapi/objects.rb, line 84
def initialize(json_field_name: nil)
    super(json_field_name)
end

Public Instance Methods

from_json(value) click to toggle source
# File lib/infobipapi/objects.rb, line 88
def from_json(value)
    if ! value
        return nil
    end

    parts = value.split('/')

    parts[-1]
end
to_json(value) click to toggle source
# File lib/infobipapi/objects.rb, line 98
def to_json(value)
    value
end