Class: Stripe::Tax::Form
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Tax::Form
- Extended by:
- APIOperations::List
- Defined in:
- lib/stripe/resources/tax/form.rb
Overview
Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes.
Related guide: [US tax reporting for Connect platforms](stripe.com/docs/connect/tax-reporting)
Defined Under Namespace
Classes: AuSerr, CaMrdp, EuDac7, FilingStatus, GbMrdp, ListParams, NzMrdp, Payee, PdfParams, RetrieveParams, Us1099K, Us1099Misc, Us1099Nec
Constant Summary collapse
- OBJECT_NAME =
"tax.form"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#au_serr ⇒ Object
readonly
Attribute for field au_serr.
-
#ca_mrdp ⇒ Object
readonly
Attribute for field ca_mrdp.
-
#corrected_by ⇒ Object
readonly
The form that corrects this form, if any.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#eu_dac7 ⇒ Object
readonly
Attribute for field eu_dac7.
-
#filing_statuses ⇒ Object
readonly
A list of tax filing statuses.
-
#gb_mrdp ⇒ Object
readonly
Attribute for field gb_mrdp.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#nz_mrdp ⇒ Object
readonly
Attribute for field nz_mrdp.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#payee ⇒ Object
readonly
Attribute for field payee.
-
#type ⇒ Object
readonly
The type of the tax form.
-
#us_1099_k ⇒ Object
readonly
Attribute for field us_1099_k.
-
#us_1099_misc ⇒ Object
readonly
Attribute for field us_1099_misc.
-
#us_1099_nec ⇒ Object
readonly
Attribute for field us_1099_nec.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of tax forms which were previously created.
- .object_name ⇒ Object
-
.pdf(id, params = {}, opts = {}, &read_body_chunk_block) ⇒ Object
Download the PDF for a tax form.
Instance Method Summary collapse
-
#pdf(params = {}, opts = {}, &read_body_chunk_block) ⇒ Object
Download the PDF for a tax form.
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
#==, #[], #[]=, 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
#au_serr ⇒ Object (readonly)
Attribute for field au_serr
156 157 158 |
# File 'lib/stripe/resources/tax/form.rb', line 156 def au_serr @au_serr end |
#ca_mrdp ⇒ Object (readonly)
Attribute for field ca_mrdp
158 159 160 |
# File 'lib/stripe/resources/tax/form.rb', line 158 def ca_mrdp @ca_mrdp end |
#corrected_by ⇒ Object (readonly)
The form that corrects this form, if any.
160 161 162 |
# File 'lib/stripe/resources/tax/form.rb', line 160 def corrected_by @corrected_by end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
162 163 164 |
# File 'lib/stripe/resources/tax/form.rb', line 162 def created @created end |
#eu_dac7 ⇒ Object (readonly)
Attribute for field eu_dac7
164 165 166 |
# File 'lib/stripe/resources/tax/form.rb', line 164 def eu_dac7 @eu_dac7 end |
#filing_statuses ⇒ Object (readonly)
A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction’s tax authority.
166 167 168 |
# File 'lib/stripe/resources/tax/form.rb', line 166 def filing_statuses @filing_statuses end |
#gb_mrdp ⇒ Object (readonly)
Attribute for field gb_mrdp
168 169 170 |
# File 'lib/stripe/resources/tax/form.rb', line 168 def gb_mrdp @gb_mrdp end |
#id ⇒ Object (readonly)
Unique identifier for the object.
170 171 172 |
# File 'lib/stripe/resources/tax/form.rb', line 170 def id @id end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
172 173 174 |
# File 'lib/stripe/resources/tax/form.rb', line 172 def livemode @livemode end |
#nz_mrdp ⇒ Object (readonly)
Attribute for field nz_mrdp
174 175 176 |
# File 'lib/stripe/resources/tax/form.rb', line 174 def nz_mrdp @nz_mrdp end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
176 177 178 |
# File 'lib/stripe/resources/tax/form.rb', line 176 def object @object end |
#payee ⇒ Object (readonly)
Attribute for field payee
178 179 180 |
# File 'lib/stripe/resources/tax/form.rb', line 178 def payee @payee end |
#type ⇒ Object (readonly)
The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type.
180 181 182 |
# File 'lib/stripe/resources/tax/form.rb', line 180 def type @type end |
#us_1099_k ⇒ Object (readonly)
Attribute for field us_1099_k
182 183 184 |
# File 'lib/stripe/resources/tax/form.rb', line 182 def us_1099_k @us_1099_k end |
#us_1099_misc ⇒ Object (readonly)
Attribute for field us_1099_misc
184 185 186 |
# File 'lib/stripe/resources/tax/form.rb', line 184 def us_1099_misc @us_1099_misc end |
#us_1099_nec ⇒ Object (readonly)
Attribute for field us_1099_nec
186 187 188 |
# File 'lib/stripe/resources/tax/form.rb', line 186 def us_1099_nec @us_1099_nec end |
Class Method Details
.list(params = {}, opts = {}) ⇒ Object
Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first.
189 190 191 |
# File 'lib/stripe/resources/tax/form.rb', line 189 def self.list(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/tax/forms", params: params, opts: opts) end |
.object_name ⇒ Object
13 14 15 |
# File 'lib/stripe/resources/tax/form.rb', line 13 def self.object_name "tax.form" end |
.pdf(id, params = {}, opts = {}, &read_body_chunk_block) ⇒ Object
Download the PDF for a tax form.
207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/stripe/resources/tax/form.rb', line 207 def self.pdf(id, params = {}, opts = {}, &read_body_chunk_block) opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts) execute_resource_request_stream( :get, format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(id) }), :files, params, opts, &read_body_chunk_block ) end |
Instance Method Details
#pdf(params = {}, opts = {}, &read_body_chunk_block) ⇒ Object
Download the PDF for a tax form.
194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/stripe/resources/tax/form.rb', line 194 def pdf(params = {}, opts = {}, &read_body_chunk_block) opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts) request_stream( method: :get, path: format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(self["id"]) }), params: params, opts: opts, base_address: :files, &read_body_chunk_block ) end |