Class: Killbill::Plugin::Model::Account
- Defined in:
- lib/killbill/gen/api/account.rb
Instance Attribute Summary collapse
-
#address1 ⇒ Object
Returns the value of attribute address1.
-
#address2 ⇒ Object
Returns the value of attribute address2.
-
#bill_cycle_day_local ⇒ Object
Returns the value of attribute bill_cycle_day_local.
-
#city ⇒ Object
Returns the value of attribute city.
-
#company_name ⇒ Object
Returns the value of attribute company_name.
-
#country ⇒ Object
Returns the value of attribute country.
-
#created_date ⇒ Object
Returns the value of attribute created_date.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#email ⇒ Object
Returns the value of attribute email.
-
#external_key ⇒ Object
Returns the value of attribute external_key.
-
#first_name_length ⇒ Object
Returns the value of attribute first_name_length.
-
#fixed_offset_time_zone ⇒ Object
Returns the value of attribute fixed_offset_time_zone.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_migrated ⇒ Object
Returns the value of attribute is_migrated.
-
#is_payment_delegated_to_parent ⇒ Object
Returns the value of attribute is_payment_delegated_to_parent.
-
#locale ⇒ Object
Returns the value of attribute locale.
-
#name ⇒ Object
Returns the value of attribute name.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#parent_account_id ⇒ Object
Returns the value of attribute parent_account_id.
-
#payment_method_id ⇒ Object
Returns the value of attribute payment_method_id.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#reference_time ⇒ Object
Returns the value of attribute reference_time.
-
#state_or_province ⇒ Object
Returns the value of attribute state_or_province.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
-
#updated_date ⇒ Object
Returns the value of attribute updated_date.
Instance Method Summary collapse
-
#initialize ⇒ Account
constructor
A new instance of Account.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ Account
Returns a new instance of Account.
39 40 |
# File 'lib/killbill/gen/api/account.rb', line 39 def initialize() end |
Instance Attribute Details
#address1 ⇒ Object
Returns the value of attribute address1.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def address1 @address1 end |
#address2 ⇒ Object
Returns the value of attribute address2.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def address2 @address2 end |
#bill_cycle_day_local ⇒ Object
Returns the value of attribute bill_cycle_day_local.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def bill_cycle_day_local @bill_cycle_day_local end |
#city ⇒ Object
Returns the value of attribute city.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def city @city end |
#company_name ⇒ Object
Returns the value of attribute company_name.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def company_name @company_name end |
#country ⇒ Object
Returns the value of attribute country.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def country @country end |
#created_date ⇒ Object
Returns the value of attribute created_date.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def created_date @created_date end |
#currency ⇒ Object
Returns the value of attribute currency.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def currency @currency end |
#email ⇒ Object
Returns the value of attribute email.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def email @email end |
#external_key ⇒ Object
Returns the value of attribute external_key.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def external_key @external_key end |
#first_name_length ⇒ Object
Returns the value of attribute first_name_length.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def first_name_length @first_name_length end |
#fixed_offset_time_zone ⇒ Object
Returns the value of attribute fixed_offset_time_zone.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def fixed_offset_time_zone @fixed_offset_time_zone end |
#id ⇒ Object
Returns the value of attribute id.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def id @id end |
#is_migrated ⇒ Object
Returns the value of attribute is_migrated.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def is_migrated @is_migrated end |
#is_payment_delegated_to_parent ⇒ Object
Returns the value of attribute is_payment_delegated_to_parent.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def is_payment_delegated_to_parent @is_payment_delegated_to_parent end |
#locale ⇒ Object
Returns the value of attribute locale.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def locale @locale end |
#name ⇒ Object
Returns the value of attribute name.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def name @name end |
#notes ⇒ Object
Returns the value of attribute notes.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def notes @notes end |
#parent_account_id ⇒ Object
Returns the value of attribute parent_account_id.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def parent_account_id @parent_account_id end |
#payment_method_id ⇒ Object
Returns the value of attribute payment_method_id.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def payment_method_id @payment_method_id end |
#phone ⇒ Object
Returns the value of attribute phone.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def phone @phone end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def postal_code @postal_code end |
#reference_time ⇒ Object
Returns the value of attribute reference_time.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def reference_time @reference_time end |
#state_or_province ⇒ Object
Returns the value of attribute state_or_province.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def state_or_province @state_or_province end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
37 38 39 |
# File 'lib/killbill/gen/api/account.rb', line 37 def time_zone @time_zone end |
#updated_date ⇒ Object
Returns the value of attribute updated_date.
37 38 39 |
# File 'lib/killbill/gen/api/account.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 68 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 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/killbill/gen/api/account.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 external_key [type = java.lang.String] @external_key = @external_key.to_s unless @external_key.nil? # conversion for currency [type = org.killbill.billing.catalog.api.Currency] @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil? # conversion for time_zone [type = org.joda.time.DateTimeZone] if !@time_zone.nil? @time_zone = Java::org.joda.time.DateTimeZone.forID((@time_zone.respond_to?(:identifier) ? @time_zone.identifier : @time_zone.to_s)) end # conversion for fixed_offset_time_zone [type = org.joda.time.DateTimeZone] if !@fixed_offset_time_zone.nil? @fixed_offset_time_zone = Java::org.joda.time.DateTimeZone.forID((@fixed_offset_time_zone.respond_to?(:identifier) ? @fixed_offset_time_zone.identifier : @fixed_offset_time_zone.to_s)) end # conversion for reference_time [type = org.joda.time.DateTime] if !@reference_time.nil? @reference_time = (@reference_time.kind_of? Time) ? DateTime.parse(@reference_time.to_s) : @reference_time @reference_time = Java::org.joda.time.DateTime.new(@reference_time.to_s, Java::org.joda.time.DateTimeZone::UTC) end # conversion for name [type = java.lang.String] @name = @name.to_s unless @name.nil? # conversion for first_name_length [type = java.lang.Integer] @first_name_length = @first_name_length # conversion for email [type = java.lang.String] @email = @email.to_s unless @email.nil? # conversion for bill_cycle_day_local [type = java.lang.Integer] @bill_cycle_day_local = @bill_cycle_day_local # conversion for payment_method_id [type = java.util.UUID] @payment_method_id = java.util.UUID.fromString(@payment_method_id.to_s) unless @payment_method_id.nil? # conversion for locale [type = java.lang.String] @locale = @locale.to_s unless @locale.nil? # conversion for address1 [type = java.lang.String] @address1 = @address1.to_s unless @address1.nil? # conversion for address2 [type = java.lang.String] @address2 = @address2.to_s unless @address2.nil? # conversion for company_name [type = java.lang.String] @company_name = @company_name.to_s unless @company_name.nil? # conversion for city [type = java.lang.String] @city = @city.to_s unless @city.nil? # conversion for state_or_province [type = java.lang.String] @state_or_province = @state_or_province.to_s unless @state_or_province.nil? # conversion for postal_code [type = java.lang.String] @postal_code = @postal_code.to_s unless @postal_code.nil? # conversion for country [type = java.lang.String] @country = @country.to_s unless @country.nil? # conversion for phone [type = java.lang.String] @phone = @phone.to_s unless @phone.nil? # conversion for is_migrated [type = java.lang.Boolean] @is_migrated = @is_migrated.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_migrated) # conversion for parent_account_id [type = java.util.UUID] @parent_account_id = java.util.UUID.fromString(@parent_account_id.to_s) unless @parent_account_id.nil? # conversion for is_payment_delegated_to_parent [type = java.lang.Boolean] @is_payment_delegated_to_parent = @is_payment_delegated_to_parent.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_payment_delegated_to_parent) # conversion for notes [type = java.lang.String] @notes = @notes.to_s unless @notes.nil? self end |
#to_ruby(j_obj) ⇒ Object
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/killbill/gen/api/account.rb', line 136 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 external_key [type = java.lang.String] @external_key = j_obj.external_key # conversion for currency [type = org.killbill.billing.catalog.api.Currency] @currency = j_obj.currency @currency = @currency.to_s.to_sym unless @currency.nil? # conversion for time_zone [type = org.joda.time.DateTimeZone] @time_zone = j_obj.time_zone if !@time_zone.nil? @time_zone = TZInfo::Timezone.get(@time_zone.get_id) rescue @time_zone.get_id end # conversion for fixed_offset_time_zone [type = org.joda.time.DateTimeZone] @fixed_offset_time_zone = j_obj.fixed_offset_time_zone if !@fixed_offset_time_zone.nil? @fixed_offset_time_zone = TZInfo::Timezone.get(@fixed_offset_time_zone.get_id) rescue @fixed_offset_time_zone.get_id end # conversion for reference_time [type = org.joda.time.DateTime] @reference_time = j_obj.reference_time if !@reference_time.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(@reference_time) @reference_time = DateTime.iso8601(str) end # conversion for name [type = java.lang.String] @name = j_obj.name # conversion for first_name_length [type = java.lang.Integer] @first_name_length = j_obj.first_name_length # conversion for email [type = java.lang.String] @email = j_obj.email # conversion for bill_cycle_day_local [type = java.lang.Integer] @bill_cycle_day_local = j_obj.bill_cycle_day_local # conversion for payment_method_id [type = java.util.UUID] @payment_method_id = j_obj.payment_method_id @payment_method_id = @payment_method_id.nil? ? nil : @payment_method_id.to_s # conversion for locale [type = java.lang.String] @locale = j_obj.locale # conversion for address1 [type = java.lang.String] @address1 = j_obj.address1 # conversion for address2 [type = java.lang.String] @address2 = j_obj.address2 # conversion for company_name [type = java.lang.String] @company_name = j_obj.company_name # conversion for city [type = java.lang.String] @city = j_obj.city # conversion for state_or_province [type = java.lang.String] @state_or_province = j_obj.state_or_province # conversion for postal_code [type = java.lang.String] @postal_code = j_obj.postal_code # conversion for country [type = java.lang.String] @country = j_obj.country # conversion for phone [type = java.lang.String] @phone = j_obj.phone # conversion for is_migrated [type = java.lang.Boolean] @is_migrated = j_obj.is_migrated if @is_migrated.nil? @is_migrated = false else tmp_bool = (@is_migrated.java_kind_of? java.lang.Boolean) ? @is_migrated.boolean_value : @is_migrated @is_migrated = tmp_bool ? true : false end # conversion for parent_account_id [type = java.util.UUID] @parent_account_id = j_obj.parent_account_id @parent_account_id = @parent_account_id.nil? ? nil : @parent_account_id.to_s # conversion for is_payment_delegated_to_parent [type = java.lang.Boolean] @is_payment_delegated_to_parent = j_obj.is_payment_delegated_to_parent if @is_payment_delegated_to_parent.nil? @is_payment_delegated_to_parent = false else tmp_bool = (@is_payment_delegated_to_parent.java_kind_of? java.lang.Boolean) ? @is_payment_delegated_to_parent.boolean_value : @is_payment_delegated_to_parent @is_payment_delegated_to_parent = tmp_bool ? true : false end # conversion for notes [type = java.lang.String] @notes = j_obj.notes self end |