Class: Killbill::Plugin::Model::Tag
- Defined in:
- lib/killbill/gen/api/tag.rb
Instance Attribute Summary collapse
-
#created_date ⇒ Object
Returns the value of attribute created_date.
-
#id ⇒ Object
Returns the value of attribute id.
-
#object_id ⇒ Object
Returns the value of attribute object_id.
-
#object_type ⇒ Object
Returns the value of attribute object_type.
-
#tag_definition_id ⇒ Object
Returns the value of attribute tag_definition_id.
-
#updated_date ⇒ Object
Returns the value of attribute updated_date.
Instance Method Summary collapse
-
#initialize ⇒ Tag
constructor
A new instance of Tag.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ Tag
Returns a new instance of Tag.
39 40 |
# File 'lib/killbill/gen/api/tag.rb', line 39 def initialize() end |
Instance Attribute Details
#created_date ⇒ Object
Returns the value of attribute created_date.
37 38 39 |
# File 'lib/killbill/gen/api/tag.rb', line 37 def created_date @created_date end |
#id ⇒ Object
Returns the value of attribute id.
37 38 39 |
# File 'lib/killbill/gen/api/tag.rb', line 37 def id @id end |
#object_id ⇒ Object
Returns the value of attribute object_id.
37 38 39 |
# File 'lib/killbill/gen/api/tag.rb', line 37 def object_id @object_id end |
#object_type ⇒ Object
Returns the value of attribute object_type.
37 38 39 |
# File 'lib/killbill/gen/api/tag.rb', line 37 def object_type @object_type end |
#tag_definition_id ⇒ Object
Returns the value of attribute tag_definition_id.
37 38 39 |
# File 'lib/killbill/gen/api/tag.rb', line 37 def tag_definition_id @tag_definition_id end |
#updated_date ⇒ Object
Returns the value of attribute updated_date.
37 38 39 |
# File 'lib/killbill/gen/api/tag.rb', line 37 def updated_date @updated_date end |
Instance Method Details
#to_java ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/killbill/gen/api/tag.rb', line 42 def to_java() # conversion for id [type = java.util.UUID] @id = java.util.UUID.fromString(@id.to_s) unless @id.nil? # conversion for created_date [type = org.joda.time.DateTime] if !@created_date.nil? @created_date = (@created_date.kind_of? Time) ? DateTime.parse(@created_date.to_s) : @created_date @created_date = Java::org.joda.time.DateTime.new(@created_date.to_s, Java::org.joda.time.DateTimeZone::UTC) end # conversion for updated_date [type = org.joda.time.DateTime] if !@updated_date.nil? @updated_date = (@updated_date.kind_of? Time) ? DateTime.parse(@updated_date.to_s) : @updated_date @updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC) end # conversion for tag_definition_id [type = java.util.UUID] @tag_definition_id = java.util.UUID.fromString(@tag_definition_id.to_s) unless @tag_definition_id.nil? # conversion for object_type [type = org.killbill.billing.ObjectType] @object_type = Java::org.killbill.billing.ObjectType.value_of( @object_type.to_s ) unless @object_type.nil? # conversion for object_id [type = java.util.UUID] @object_id = java.util.UUID.fromString(@object_id.to_s) unless @object_id.nil? self end |
#to_ruby(j_obj) ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/killbill/gen/api/tag.rb', line 69 def to_ruby(j_obj) # conversion for id [type = java.util.UUID] @id = j_obj.id @id = @id.nil? ? nil : @id.to_s # conversion for created_date [type = org.joda.time.DateTime] @created_date = j_obj.created_date if !@created_date.nil? fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3 str = fmt.print(@created_date) @created_date = DateTime.iso8601(str) end # conversion for updated_date [type = org.joda.time.DateTime] @updated_date = j_obj.updated_date if !@updated_date.nil? fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3 str = fmt.print(@updated_date) @updated_date = DateTime.iso8601(str) end # conversion for tag_definition_id [type = java.util.UUID] @tag_definition_id = j_obj.tag_definition_id @tag_definition_id = @tag_definition_id.nil? ? nil : @tag_definition_id.to_s # conversion for object_type [type = org.killbill.billing.ObjectType] @object_type = j_obj.object_type @object_type = @object_type.to_s.to_sym unless @object_type.nil? # conversion for object_id [type = java.util.UUID] @object_id = j_obj.object_id @object_id = @object_id.nil? ? nil : @object_id.to_s self end |