Class: Stripe::Capital::FinancingOffer

Inherits:
APIResource show all
Extended by:
APIOperations::List
Defined in:
lib/stripe/resources/capital/financing_offer.rb

Overview

This is an object representing an offer of financing from Stripe Capital to a Connect subaccount.

Defined Under Namespace

Classes: AcceptedTerms, ListParams, MarkDeliveredParams, OfferedTerms

Constant Summary collapse

OBJECT_NAME =
"capital.financing_offer"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from APIOperations::List

list

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#accepted_termsObject (readonly)

This is an object representing the terms of an offer of financing from Stripe Capital to a Connected account. This resource represents the terms accepted by the Connected account, which may differ from those offered.



128
129
130
# File 'lib/stripe/resources/capital/financing_offer.rb', line 128

def accepted_terms
  @accepted_terms
end

#accountObject (readonly)

The ID of the merchant associated with this financing object.



130
131
132
# File 'lib/stripe/resources/capital/financing_offer.rb', line 130

def 
  @account
end

#charged_off_atObject (readonly)

The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch.



132
133
134
# File 'lib/stripe/resources/capital/financing_offer.rb', line 132

def charged_off_at
  @charged_off_at
end

#createdObject (readonly)

Time at which the offer was created. Given in seconds since unix epoch.



134
135
136
# File 'lib/stripe/resources/capital/financing_offer.rb', line 134

def created
  @created
end

#expires_afterObject (readonly)

Time at which the offer expires. Given in seconds since unix epoch.



136
137
138
# File 'lib/stripe/resources/capital/financing_offer.rb', line 136

def expires_after
  @expires_after
end

#financing_typeObject (readonly)

The type of financing being offered.



138
139
140
# File 'lib/stripe/resources/capital/financing_offer.rb', line 138

def financing_type
  @financing_type
end

#idObject (readonly)

A unique identifier for the financing object.



140
141
142
# File 'lib/stripe/resources/capital/financing_offer.rb', line 140

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



142
143
144
# File 'lib/stripe/resources/capital/financing_offer.rb', line 142

def livemode
  @livemode
end

#metadataObject (readonly)

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



144
145
146
# File 'lib/stripe/resources/capital/financing_offer.rb', line 144

def 
  @metadata
end

#objectObject (readonly)

The object type: financing_offer.



146
147
148
# File 'lib/stripe/resources/capital/financing_offer.rb', line 146

def object
  @object
end

#offered_termsObject (readonly)

This is an object representing the terms of an offer of financing from Stripe Capital to a Connected account. This resource represents both the terms offered to the Connected account.



150
151
152
# File 'lib/stripe/resources/capital/financing_offer.rb', line 150

def offered_terms
  @offered_terms
end

#product_typeObject (readonly)

Financing product identifier.



152
153
154
# File 'lib/stripe/resources/capital/financing_offer.rb', line 152

def product_type
  @product_type
end

#replacementObject (readonly)

The ID of the financing offer that replaced this offer.



154
155
156
# File 'lib/stripe/resources/capital/financing_offer.rb', line 154

def replacement
  @replacement
end

#replacement_forObject (readonly)

The ID of the financing offer that this offer is a replacement for.



156
157
158
# File 'lib/stripe/resources/capital/financing_offer.rb', line 156

def replacement_for
  @replacement_for
end

#statusObject (readonly)

The current status of the offer.



158
159
160
# File 'lib/stripe/resources/capital/financing_offer.rb', line 158

def status
  @status
end

#typeObject (readonly)



160
161
162
# File 'lib/stripe/resources/capital/financing_offer.rb', line 160

def type
  @type
end

Class Method Details

.field_remappingsObject



198
199
200
# File 'lib/stripe/resources/capital/financing_offer.rb', line 198

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



194
195
196
# File 'lib/stripe/resources/capital/financing_offer.rb', line 194

def self.inner_class_types
  @inner_class_types = { accepted_terms: AcceptedTerms, offered_terms: OfferedTerms }
end

.list(params = {}, opts = {}) ⇒ Object

Retrieves the financing offers available for Connected accounts that belong to your platform.



163
164
165
166
167
168
169
170
# File 'lib/stripe/resources/capital/financing_offer.rb', line 163

def self.list(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/capital/financing_offers",
    params: params,
    opts: opts
  )
end

.mark_delivered(financing_offer, params = {}, opts = {}) ⇒ Object

Acknowledges that platform has received and delivered the financing_offer to the intended merchant recipient.



185
186
187
188
189
190
191
192
# File 'lib/stripe/resources/capital/financing_offer.rb', line 185

def self.mark_delivered(financing_offer, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/capital/financing_offers/%<financing_offer>s/mark_delivered", { financing_offer: CGI.escape(financing_offer) }),
    params: params,
    opts: opts
  )
end

.object_nameObject



12
13
14
# File 'lib/stripe/resources/capital/financing_offer.rb', line 12

def self.object_name
  "capital.financing_offer"
end

Instance Method Details

#mark_delivered(params = {}, opts = {}) ⇒ Object

Acknowledges that platform has received and delivered the financing_offer to the intended merchant recipient.



174
175
176
177
178
179
180
181
# File 'lib/stripe/resources/capital/financing_offer.rb', line 174

def mark_delivered(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/capital/financing_offers/%<financing_offer>s/mark_delivered", { financing_offer: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end