Class: DocuSign_eSign::AccountBillingPlan

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_esign/models/account_billing_plan.rb

Overview

Contains information about an account billing plan.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AccountBillingPlan

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 136

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

  if attributes.has_key?(:'addOns')
    if (value = attributes[:'addOns']).is_a?(Array)
      self.add_ons = value
    end
  end

  if attributes.has_key?(:'canCancelRenewal')
    self.can_cancel_renewal = attributes[:'canCancelRenewal']
  end

  if attributes.has_key?(:'canUpgrade')
    self.can_upgrade = attributes[:'canUpgrade']
  end

  if attributes.has_key?(:'currencyCode')
    self.currency_code = attributes[:'currencyCode']
  end

  if attributes.has_key?(:'downgradePlanInformation')
    self.downgrade_plan_information = attributes[:'downgradePlanInformation']
  end

  if attributes.has_key?(:'enableSupport')
    self.enable_support = attributes[:'enableSupport']
  end

  if attributes.has_key?(:'includedSeats')
    self.included_seats = attributes[:'includedSeats']
  end

  if attributes.has_key?(:'incrementalSeats')
    self.incremental_seats = attributes[:'incrementalSeats']
  end

  if attributes.has_key?(:'isDowngrade')
    self.is_downgrade = attributes[:'isDowngrade']
  end

  if attributes.has_key?(:'otherDiscountPercent')
    self.other_discount_percent = attributes[:'otherDiscountPercent']
  end

  if attributes.has_key?(:'paymentCycle')
    self.payment_cycle = attributes[:'paymentCycle']
  end

  if attributes.has_key?(:'paymentMethod')
    self.payment_method = attributes[:'paymentMethod']
  end

  if attributes.has_key?(:'perSeatPrice')
    self.per_seat_price = attributes[:'perSeatPrice']
  end

  if attributes.has_key?(:'planClassification')
    self.plan_classification = attributes[:'planClassification']
  end

  if attributes.has_key?(:'planFeatureSets')
    if (value = attributes[:'planFeatureSets']).is_a?(Array)
      self.plan_feature_sets = value
    end
  end

  if attributes.has_key?(:'planId')
    self.plan_id = attributes[:'planId']
  end

  if attributes.has_key?(:'planName')
    self.plan_name = attributes[:'planName']
  end

  if attributes.has_key?(:'renewalStatus')
    self.renewal_status = attributes[:'renewalStatus']
  end

  if attributes.has_key?(:'seatDiscounts')
    if (value = attributes[:'seatDiscounts']).is_a?(Array)
      self.seat_discounts = value
    end
  end

  if attributes.has_key?(:'supportIncidentFee')
    self.support_incident_fee = attributes[:'supportIncidentFee']
  end

  if attributes.has_key?(:'supportPlanFee')
    self.support_plan_fee = attributes[:'supportPlanFee']
  end

end

Instance Attribute Details

#add_onsObject

Reserved:



18
19
20
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 18

def add_ons
  @add_ons
end

#can_cancel_renewalObject

Reserved: TBD



21
22
23
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 21

def can_cancel_renewal
  @can_cancel_renewal
end

#can_upgradeObject

When set to true, specifies that you can upgrade the account through the API.



24
25
26
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 24

def can_upgrade
  @can_upgrade
end

#currency_codeObject

Specifies the ISO currency code for the account.



27
28
29
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 27

def currency_code
  @currency_code
end

#downgrade_plan_informationObject

Returns the value of attribute downgrade_plan_information.



29
30
31
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 29

def downgrade_plan_information
  @downgrade_plan_information
end

#enable_supportObject

When set to true, then customer support is provided as part of the account plan.



32
33
34
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 32

def enable_support
  @enable_support
end

#included_seatsObject

The number of seats (users) included.



35
36
37
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 35

def included_seats
  @included_seats
end

#incremental_seatsObject

Reserved: TBD



38
39
40
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 38

def incremental_seats
  @incremental_seats
end

#is_downgradeObject

Returns the value of attribute is_downgrade.



41
42
43
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 41

def is_downgrade
  @is_downgrade
end

#other_discount_percentObject

Any other percentage discount for the plan.



44
45
46
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 44

def other_discount_percent
  @other_discount_percent
end

#payment_cycleObject

Returns the value of attribute payment_cycle.



47
48
49
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 47

def payment_cycle
  @payment_cycle
end

#payment_methodObject

The payment method used with the plan. The possible values are: CreditCard, PurchaseOrder, Premium, or Freemium.



50
51
52
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 50

def payment_method
  @payment_method
end

#per_seat_priceObject

Returns the value of attribute per_seat_price.



53
54
55
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 53

def per_seat_price
  @per_seat_price
end

#plan_classificationObject

Identifies the type of plan. Examples include Business, Corporate, Enterprise, Free.



56
57
58
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 56

def plan_classification
  @plan_classification
end

#plan_feature_setsObject

A complex type that sets the feature sets for the account. It contains the following information (all string content): * currencyFeatureSetPrices - Contains the currencyCode and currencySymbol for the alternate currency values for envelopeFee, fixedFee, seatFee that are configured for this plan feature set. * envelopeFee - An incremental envelope cost for plans with envelope overages (when isEnabled=true). * featureSetId - A unique ID for the feature set. * fixedFee - A one-time fee associated with the plan (when isEnabled=true). * isActive - Specifies whether the feature set is actively set as part of the plan. * isEnabled - Specifies whether the feature set is actively enabled as part of the plan. * name - The name of the feature set. * seatFee - An incremental seat cost for seat-based plans (when isEnabled=true).



59
60
61
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 59

def plan_feature_sets
  @plan_feature_sets
end

#plan_idObject

Returns the value of attribute plan_id.



62
63
64
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 62

def plan_id
  @plan_id
end

#plan_nameObject

The name of the Billing Plan.



65
66
67
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 65

def plan_name
  @plan_name
end

#renewal_statusObject

The renewal status for the account. The acceptable values are: * auto: The account automatically renews. * queued_for_close: Account will be closed at the billingPeriodEndDate. * queued_for_downgrade: Account will be downgraded at the billingPeriodEndDate.



68
69
70
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 68

def renewal_status
  @renewal_status
end

#seat_discountsObject

A complex type that contains any seat discount information. Values are: BeginSeatCount, EndSeatCount, and SeatDiscountPercent.



71
72
73
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 71

def seat_discounts
  @seat_discounts
end

#support_incident_feeObject

The support incident fee charged for each support incident.



74
75
76
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 74

def support_incident_fee
  @support_incident_fee
end

#support_plan_feeObject

The support plan fee charged for this plan.



77
78
79
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 77

def support_plan_fee
  @support_plan_fee
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 81

def self.attribute_map
  {
    :'add_ons' => :'addOns',
    :'can_cancel_renewal' => :'canCancelRenewal',
    :'can_upgrade' => :'canUpgrade',
    :'currency_code' => :'currencyCode',
    :'downgrade_plan_information' => :'downgradePlanInformation',
    :'enable_support' => :'enableSupport',
    :'included_seats' => :'includedSeats',
    :'incremental_seats' => :'incrementalSeats',
    :'is_downgrade' => :'isDowngrade',
    :'other_discount_percent' => :'otherDiscountPercent',
    :'payment_cycle' => :'paymentCycle',
    :'payment_method' => :'paymentMethod',
    :'per_seat_price' => :'perSeatPrice',
    :'plan_classification' => :'planClassification',
    :'plan_feature_sets' => :'planFeatureSets',
    :'plan_id' => :'planId',
    :'plan_name' => :'planName',
    :'renewal_status' => :'renewalStatus',
    :'seat_discounts' => :'seatDiscounts',
    :'support_incident_fee' => :'supportIncidentFee',
    :'support_plan_fee' => :'supportPlanFee'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 108

def self.swagger_types
  {
    :'add_ons' => :'Array<AddOn>',
    :'can_cancel_renewal' => :'String',
    :'can_upgrade' => :'String',
    :'currency_code' => :'String',
    :'downgrade_plan_information' => :'DowngradePlanUpdateResponse',
    :'enable_support' => :'String',
    :'included_seats' => :'String',
    :'incremental_seats' => :'String',
    :'is_downgrade' => :'String',
    :'other_discount_percent' => :'String',
    :'payment_cycle' => :'String',
    :'payment_method' => :'String',
    :'per_seat_price' => :'String',
    :'plan_classification' => :'String',
    :'plan_feature_sets' => :'Array<FeatureSet>',
    :'plan_id' => :'String',
    :'plan_name' => :'String',
    :'renewal_status' => :'String',
    :'seat_discounts' => :'Array<SeatDiscount>',
    :'support_incident_fee' => :'String',
    :'support_plan_fee' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 249

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      add_ons == o.add_ons &&
      can_cancel_renewal == o.can_cancel_renewal &&
      can_upgrade == o.can_upgrade &&
      currency_code == o.currency_code &&
      downgrade_plan_information == o.downgrade_plan_information &&
      enable_support == o.enable_support &&
      included_seats == o.included_seats &&
      incremental_seats == o.incremental_seats &&
      is_downgrade == o.is_downgrade &&
      other_discount_percent == o.other_discount_percent &&
      payment_cycle == o.payment_cycle &&
      payment_method == o.payment_method &&
      per_seat_price == o.per_seat_price &&
      plan_classification == o.plan_classification &&
      plan_feature_sets == o.plan_feature_sets &&
      plan_id == o.plan_id &&
      plan_name == o.plan_name &&
      renewal_status == o.renewal_status &&
      seat_discounts == o.seat_discounts &&
      support_incident_fee == o.support_incident_fee &&
      support_plan_fee == o.support_plan_fee
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 311

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = DocuSign_eSign.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



377
378
379
380
381
382
383
384
385
386
387
388
389
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 377

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map{ |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 290

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


277
278
279
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 277

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



283
284
285
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 283

def hash
  [add_ons, can_cancel_renewal, can_upgrade, currency_code, downgrade_plan_information, enable_support, included_seats, incremental_seats, is_downgrade, other_discount_percent, payment_cycle, payment_method, per_seat_price, plan_classification, plan_feature_sets, plan_id, plan_name, renewal_status, seat_discounts, support_incident_fee, support_plan_fee].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properies with the reasons



236
237
238
239
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 236

def list_invalid_properties
  invalid_properties = Array.new
  return invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



357
358
359
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 357

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



363
364
365
366
367
368
369
370
371
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 363

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



351
352
353
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 351

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



243
244
245
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 243

def valid?
  return true
end