Class: ShopifyApp::BillingConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/shopify_app/configuration.rb

Constant Summary collapse

INTERVAL_ONE_TIME =
"ONE_TIME"
INTERVAL_EVERY_30_DAYS =
"EVERY_30_DAYS"
INTERVAL_ANNUAL =
"ANNUAL"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(charge_name:, amount:, interval:, currency_code: "USD", trial_days: 0, test: !Rails.env.production?)) ⇒ BillingConfiguration

Returns a new instance of BillingConfiguration.



194
195
196
197
198
199
200
201
# File 'lib/shopify_app/configuration.rb', line 194

def initialize(charge_name:, amount:, interval:, currency_code: "USD", trial_days: 0, test: !Rails.env.production?)
  @charge_name = charge_name
  @amount = amount
  @currency_code = currency_code
  @interval = interval
  @trial_days = trial_days
  @test = test
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



188
189
190
# File 'lib/shopify_app/configuration.rb', line 188

def amount
  @amount
end

#charge_nameObject (readonly)

Returns the value of attribute charge_name.



187
188
189
# File 'lib/shopify_app/configuration.rb', line 187

def charge_name
  @charge_name
end

#currency_codeObject (readonly)

Returns the value of attribute currency_code.



189
190
191
# File 'lib/shopify_app/configuration.rb', line 189

def currency_code
  @currency_code
end

#intervalObject (readonly)

Returns the value of attribute interval.



190
191
192
# File 'lib/shopify_app/configuration.rb', line 190

def interval
  @interval
end

#testObject (readonly)

Returns the value of attribute test.



192
193
194
# File 'lib/shopify_app/configuration.rb', line 192

def test
  @test
end

#trial_daysObject (readonly)

Returns the value of attribute trial_days.



191
192
193
# File 'lib/shopify_app/configuration.rb', line 191

def trial_days
  @trial_days
end