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
174 175 176 |
# File 'lib/stripe/resources/tax/form.rb', line 174 def au_serr @au_serr end |
#ca_mrdp ⇒ Object (readonly)
Attribute for field ca_mrdp
177 178 179 |
# File 'lib/stripe/resources/tax/form.rb', line 177 def ca_mrdp @ca_mrdp end |
#corrected_by ⇒ Object (readonly)
The form that corrects this form, if any.
180 181 182 |
# File 'lib/stripe/resources/tax/form.rb', line 180 def corrected_by @corrected_by end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
183 184 185 |
# File 'lib/stripe/resources/tax/form.rb', line 183 def created @created end |
#eu_dac7 ⇒ Object (readonly)
Attribute for field eu_dac7
186 187 188 |
# File 'lib/stripe/resources/tax/form.rb', line 186 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.
189 190 191 |
# File 'lib/stripe/resources/tax/form.rb', line 189 def filing_statuses @filing_statuses end |
#gb_mrdp ⇒ Object (readonly)
Attribute for field gb_mrdp
192 193 194 |
# File 'lib/stripe/resources/tax/form.rb', line 192 def gb_mrdp @gb_mrdp end |
#id ⇒ Object (readonly)
Unique identifier for the object.
195 196 197 |
# File 'lib/stripe/resources/tax/form.rb', line 195 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.
198 199 200 |
# File 'lib/stripe/resources/tax/form.rb', line 198 def livemode @livemode end |
#nz_mrdp ⇒ Object (readonly)
Attribute for field nz_mrdp
201 202 203 |
# File 'lib/stripe/resources/tax/form.rb', line 201 def nz_mrdp @nz_mrdp end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
204 205 206 |
# File 'lib/stripe/resources/tax/form.rb', line 204 def object @object end |
#payee ⇒ Object (readonly)
Attribute for field payee
207 208 209 |
# File 'lib/stripe/resources/tax/form.rb', line 207 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.
210 211 212 |
# File 'lib/stripe/resources/tax/form.rb', line 210 def type @type end |
#us_1099_k ⇒ Object (readonly)
Attribute for field us_1099_k
213 214 215 |
# File 'lib/stripe/resources/tax/form.rb', line 213 def us_1099_k @us_1099_k end |
#us_1099_misc ⇒ Object (readonly)
Attribute for field us_1099_misc
216 217 218 |
# File 'lib/stripe/resources/tax/form.rb', line 216 def us_1099_misc @us_1099_misc end |
#us_1099_nec ⇒ Object (readonly)
Attribute for field us_1099_nec
219 220 221 |
# File 'lib/stripe/resources/tax/form.rb', line 219 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.
222 223 224 |
# File 'lib/stripe/resources/tax/form.rb', line 222 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.
240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/stripe/resources/tax/form.rb', line 240 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.
227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/stripe/resources/tax/form.rb', line 227 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 |