Class: Stripe::Capital::FinancingOffer
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Capital::FinancingOffer
- 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, OfferedTerms
Constant Summary collapse
- OBJECT_NAME =
"capital.financing_offer"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#accepted_terms ⇒ Object
readonly
This is an object representing the terms of an offer of financing from Stripe Capital to a Connected account.
-
#account ⇒ Object
readonly
The ID of the merchant associated with this financing object.
-
#charged_off_at ⇒ Object
readonly
The time at which this financing offer was charged off, if applicable.
-
#created ⇒ Object
readonly
Time at which the offer was created.
-
#expires_after ⇒ Object
readonly
Time at which the offer expires.
-
#financing_type ⇒ Object
readonly
The type of financing being offered.
-
#id ⇒ Object
readonly
A unique identifier for the financing object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is ‘true`.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
The object type: financing_offer.
-
#offered_terms ⇒ Object
readonly
This is an object representing the terms of an offer of financing from Stripe Capital to a Connected account.
-
#product_type ⇒ Object
readonly
Financing product identifier.
-
#replacement ⇒ Object
readonly
The ID of the financing offer that replaced this offer.
-
#replacement_for ⇒ Object
readonly
The ID of the financing offer that this offer is a replacement for.
-
#status ⇒ Object
readonly
The current status of the offer.
-
#type ⇒ Object
readonly
See [financing_type](docs.stripe.com/api/capital/connect_financing_object#financing_offer_object-financing_type).
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Retrieves the financing offers available for Connected accounts that belong to your platform.
-
.mark_delivered(financing_offer, params = {}, opts = {}) ⇒ Object
Acknowledges that platform has received and delivered the financing_offer to the intended merchant recipient.
- .object_name ⇒ Object
Instance Method Summary collapse
-
#mark_delivered(params = {}, opts = {}) ⇒ Object
Acknowledges that platform has received and delivered the financing_offer to the intended merchant recipient.
Methods included from APIOperations::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
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #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_terms ⇒ Object (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.
67 68 69 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 67 def accepted_terms @accepted_terms end |
#account ⇒ Object (readonly)
The ID of the merchant associated with this financing object.
69 70 71 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 69 def account @account end |
#charged_off_at ⇒ Object (readonly)
The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch.
71 72 73 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 71 def charged_off_at @charged_off_at end |
#created ⇒ Object (readonly)
Time at which the offer was created. Given in seconds since unix epoch.
73 74 75 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 73 def created @created end |
#expires_after ⇒ Object (readonly)
Time at which the offer expires. Given in seconds since unix epoch.
75 76 77 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 75 def expires_after @expires_after end |
#financing_type ⇒ Object (readonly)
The type of financing being offered.
77 78 79 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 77 def financing_type @financing_type end |
#id ⇒ Object (readonly)
A unique identifier for the financing object.
79 80 81 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 79 def id @id end |
#livemode ⇒ Object (readonly)
If the object exists in live mode, the value is ‘true`. If the object exists in test mode, the value is `false`.
81 82 83 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 81 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
83 84 85 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 83 def @metadata end |
#object ⇒ Object (readonly)
The object type: financing_offer.
85 86 87 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 85 def object @object end |
#offered_terms ⇒ Object (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.
89 90 91 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 89 def offered_terms @offered_terms end |
#product_type ⇒ Object (readonly)
Financing product identifier.
91 92 93 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 91 def product_type @product_type end |
#replacement ⇒ Object (readonly)
The ID of the financing offer that replaced this offer.
93 94 95 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 93 def replacement @replacement end |
#replacement_for ⇒ Object (readonly)
The ID of the financing offer that this offer is a replacement for.
95 96 97 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 95 def replacement_for @replacement_for end |
#status ⇒ Object (readonly)
The current status of the offer.
97 98 99 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 97 def status @status end |
#type ⇒ Object (readonly)
See [financing_type](docs.stripe.com/api/capital/connect_financing_object#financing_offer_object-financing_type).
99 100 101 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 99 def type @type end |
Class Method Details
.field_remappings ⇒ Object
137 138 139 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 137 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
133 134 135 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 133 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.
102 103 104 105 106 107 108 109 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 102 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.
124 125 126 127 128 129 130 131 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 124 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_name ⇒ Object
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.
113 114 115 116 117 118 119 120 |
# File 'lib/stripe/resources/capital/financing_offer.rb', line 113 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 |