Class: Io::Flow::V0::Models::TokenForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TokenForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Used to create a new token for the user authorized by the request. You can only create an API token for your own account.
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ TokenForm
constructor
A new instance of TokenForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ TokenForm
Returns a new instance of TokenForm.
17432 17433 17434 17435 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17432 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String)) end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
17430 17431 17432 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17430 def description @description end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
17441 17442 17443 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17441 def copy(incoming={}) TokenForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
17445 17446 17447 17448 17449 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17445 def to_hash { :description => description } end |
#to_json ⇒ Object
17437 17438 17439 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17437 def to_json JSON.dump(to_hash) end |