Class: Stripe::Billing::CreditGrantService::CreateParams

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/billing/credit_grant_service.rb

Defined Under Namespace

Classes: Amount, ApplicabilityConfig

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, applicability_config: nil, category: nil, customer: nil, effective_at: nil, expand: nil, expires_at: nil, metadata: nil, name: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/stripe/services/billing/credit_grant_service.rb', line 93

def initialize(
  amount: nil,
  applicability_config: nil,
  category: nil,
  customer: nil,
  effective_at: nil,
  expand: nil,
  expires_at: nil,
  metadata: nil,
  name: nil
)
  @amount = amount
  @applicability_config = applicability_config
  @category = category
  @customer = customer
  @effective_at = effective_at
  @expand = expand
  @expires_at = expires_at
  @metadata = 
  @name = name
end

Instance Attribute Details

#amountObject

Amount of this credit grant.



75
76
77
# File 'lib/stripe/services/billing/credit_grant_service.rb', line 75

def amount
  @amount
end

#applicability_configObject

Configuration specifying what this credit grant applies to.



77
78
79
# File 'lib/stripe/services/billing/credit_grant_service.rb', line 77

def applicability_config
  @applicability_config
end

#categoryObject

The category of this credit grant.



79
80
81
# File 'lib/stripe/services/billing/credit_grant_service.rb', line 79

def category
  @category
end

#customerObject

ID of the customer to receive the billing credits.



81
82
83
# File 'lib/stripe/services/billing/credit_grant_service.rb', line 81

def customer
  @customer
end

#effective_atObject

The time when the billing credits become effective-when they’re eligible for use. It defaults to the current timestamp if not specified.



83
84
85
# File 'lib/stripe/services/billing/credit_grant_service.rb', line 83

def effective_at
  @effective_at
end

#expandObject

Specifies which fields in the response should be expanded.



85
86
87
# File 'lib/stripe/services/billing/credit_grant_service.rb', line 85

def expand
  @expand
end

#expires_atObject

The time when the billing credits expire. If not specified, the billing credits don’t expire.



87
88
89
# File 'lib/stripe/services/billing/credit_grant_service.rb', line 87

def expires_at
  @expires_at
end

#metadataObject

Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.



89
90
91
# File 'lib/stripe/services/billing/credit_grant_service.rb', line 89

def 
  @metadata
end

#nameObject

A descriptive name shown in the Dashboard.



91
92
93
# File 'lib/stripe/services/billing/credit_grant_service.rb', line 91

def name
  @name
end