Class: AdvancedBilling::ListSubcriptionGroupPrepaymentItem
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::ListSubcriptionGroupPrepaymentItem
- Defined in:
- lib/advanced_billing/models/list_subcription_group_prepayment_item.rb
Overview
ListSubcriptionGroupPrepaymentItem Model.
Instance Attribute Summary collapse
-
#amount_in_cents ⇒ Float
TODO: Write general description for this method.
-
#created_at ⇒ String
:- When the ‘method` specified is `“credit_card_on_file”`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance.
-
#details ⇒ String
TODO: Write general description for this method.
-
#external ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#id ⇒ Float
TODO: Write general description for this method.
-
#memo ⇒ String
TODO: Write general description for this method.
-
#payment_type ⇒ PrepaymentMethod
:- When the ‘method` specified is `“credit_card_on_file”`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance.
-
#remaining_amount_in_cents ⇒ Float
TODO: Write general description for this method.
-
#subscription_group_uid ⇒ String
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(id = SKIP, subscription_group_uid = SKIP, amount_in_cents = SKIP, remaining_amount_in_cents = SKIP, details = SKIP, external = SKIP, memo = SKIP, payment_type = SKIP, created_at = SKIP) ⇒ ListSubcriptionGroupPrepaymentItem
constructor
A new instance of ListSubcriptionGroupPrepaymentItem.
Methods inherited from BaseModel
Constructor Details
#initialize(id = SKIP, subscription_group_uid = SKIP, amount_in_cents = SKIP, remaining_amount_in_cents = SKIP, details = SKIP, external = SKIP, memo = SKIP, payment_type = SKIP, created_at = SKIP) ⇒ ListSubcriptionGroupPrepaymentItem
Returns a new instance of ListSubcriptionGroupPrepaymentItem.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 89 def initialize(id = SKIP, subscription_group_uid = SKIP, amount_in_cents = SKIP, remaining_amount_in_cents = SKIP, details = SKIP, external = SKIP, memo = SKIP, payment_type = SKIP, created_at = SKIP) @id = id unless id == SKIP @subscription_group_uid = subscription_group_uid unless subscription_group_uid == SKIP @amount_in_cents = amount_in_cents unless amount_in_cents == SKIP unless remaining_amount_in_cents == SKIP @remaining_amount_in_cents = remaining_amount_in_cents end @details = details unless details == SKIP @external = external unless external == SKIP @memo = memo unless memo == SKIP @payment_type = payment_type unless payment_type == SKIP @created_at = created_at unless created_at == SKIP end |
Instance Attribute Details
#amount_in_cents ⇒ Float
TODO: Write general description for this method
22 23 24 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 22 def amount_in_cents @amount_in_cents end |
#created_at ⇒ String
:- When the ‘method` specified is `“credit_card_on_file”`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions.
52 53 54 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 52 def created_at @created_at end |
#details ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 30 def details @details end |
#external ⇒ TrueClass | FalseClass
TODO: Write general description for this method
34 35 36 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 34 def external @external end |
#id ⇒ Float
TODO: Write general description for this method
14 15 16 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 14 def id @id end |
#memo ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 38 def memo @memo end |
#payment_type ⇒ PrepaymentMethod
:- When the ‘method` specified is `“credit_card_on_file”`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions.
45 46 47 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 45 def payment_type @payment_type end |
#remaining_amount_in_cents ⇒ Float
TODO: Write general description for this method
26 27 28 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 26 def remaining_amount_in_cents @remaining_amount_in_cents end |
#subscription_group_uid ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 18 def subscription_group_uid @subscription_group_uid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 135 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 108 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP subscription_group_uid = hash.key?('subscription_group_uid') ? hash['subscription_group_uid'] : SKIP amount_in_cents = hash.key?('amount_in_cents') ? hash['amount_in_cents'] : SKIP remaining_amount_in_cents = hash.key?('remaining_amount_in_cents') ? hash['remaining_amount_in_cents'] : SKIP details = hash.key?('details') ? hash['details'] : SKIP external = hash.key?('external') ? hash['external'] : SKIP memo = hash.key?('memo') ? hash['memo'] : SKIP payment_type = hash.key?('payment_type') ? hash['payment_type'] : SKIP created_at = hash.key?('created_at') ? hash['created_at'] : SKIP # Create object from extracted values. ListSubcriptionGroupPrepaymentItem.new(id, subscription_group_uid, amount_in_cents, remaining_amount_in_cents, details, external, memo, payment_type, created_at) end |
.names ⇒ Object
A mapping from model property names to API property names.
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 55 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['subscription_group_uid'] = 'subscription_group_uid' @_hash['amount_in_cents'] = 'amount_in_cents' @_hash['remaining_amount_in_cents'] = 'remaining_amount_in_cents' @_hash['details'] = 'details' @_hash['external'] = 'external' @_hash['memo'] = 'memo' @_hash['payment_type'] = 'payment_type' @_hash['created_at'] = 'created_at' @_hash end |
.nullables ⇒ Object
An array for nullable fields
85 86 87 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 85 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/advanced_billing/models/list_subcription_group_prepayment_item.rb', line 70 def self.optionals %w[ id subscription_group_uid amount_in_cents remaining_amount_in_cents details external memo payment_type created_at ] end |