Class: Worldline::Connect::SDK::V1::Domain::OrderStatusOutput
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::OrderStatusOutput
- Defined in:
- lib/worldline/connect/sdk/v1/domain/order_status_output.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#errors ⇒ Array<Worldline::Connect::SDK::V1::Domain::APIError>
The current value of errors.
-
#is_cancellable ⇒ true/false
The current value of is_cancellable.
-
#is_retriable ⇒ true/false
The current value of is_retriable.
-
#provider_raw_output ⇒ Array<Worldline::Connect::SDK::V1::Domain::KeyValuePair>
The current value of provider_raw_output.
-
#status_category ⇒ String
The current value of status_category.
-
#status_code ⇒ Integer
The current value of status_code.
-
#status_code_change_date_time ⇒ String
The current value of status_code_change_date_time.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#errors ⇒ Array<Worldline::Connect::SDK::V1::Domain::APIError>
Returns the current value of errors.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/order_status_output.rb', line 21 def errors @errors end |
#is_cancellable ⇒ true/false
Returns the current value of is_cancellable.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/order_status_output.rb', line 21 def is_cancellable @is_cancellable end |
#is_retriable ⇒ true/false
Returns the current value of is_retriable.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/order_status_output.rb', line 21 def is_retriable @is_retriable end |
#provider_raw_output ⇒ Array<Worldline::Connect::SDK::V1::Domain::KeyValuePair>
Returns the current value of provider_raw_output.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/order_status_output.rb', line 21 def provider_raw_output @provider_raw_output end |
#status_category ⇒ String
Returns the current value of status_category.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/order_status_output.rb', line 21 def status_category @status_category end |
#status_code ⇒ Integer
Returns the current value of status_code.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/order_status_output.rb', line 21 def status_code @status_code end |
#status_code_change_date_time ⇒ String
Returns the current value of status_code_change_date_time.
21 22 23 |
# File 'lib/worldline/connect/sdk/v1/domain/order_status_output.rb', line 21 def status_code_change_date_time @status_code_change_date_time end |
Instance Method Details
#from_hash(hash) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/worldline/connect/sdk/v1/domain/order_status_output.rb', line 50 def from_hash(hash) super if hash.has_key? 'errors' raise TypeError, "value '%s' is not an Array" % [hash['errors']] unless hash['errors'].is_a? Array @errors = [] hash['errors'].each do |e| @errors << Worldline::Connect::SDK::V1::Domain::APIError.new_from_hash(e) end end if hash.has_key? 'isCancellable' @is_cancellable = hash['isCancellable'] end if hash.has_key? 'isRetriable' @is_retriable = hash['isRetriable'] end if hash.has_key? 'providerRawOutput' raise TypeError, "value '%s' is not an Array" % [hash['providerRawOutput']] unless hash['providerRawOutput'].is_a? Array @provider_raw_output = [] hash['providerRawOutput'].each do |e| @provider_raw_output << Worldline::Connect::SDK::V1::Domain::KeyValuePair.new_from_hash(e) end end if hash.has_key? 'statusCategory' @status_category = hash['statusCategory'] end if hash.has_key? 'statusCode' @status_code = hash['statusCode'] end if hash.has_key? 'statusCodeChangeDateTime' @status_code_change_date_time = hash['statusCodeChangeDateTime'] end end |
#to_h ⇒ Hash
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/worldline/connect/sdk/v1/domain/order_status_output.rb', line 38 def to_h hash = super hash['errors'] = @errors.collect{|val| val.to_h} unless @errors.nil? hash['isCancellable'] = @is_cancellable unless @is_cancellable.nil? hash['isRetriable'] = @is_retriable unless @is_retriable.nil? hash['providerRawOutput'] = @provider_raw_output.collect{|val| val.to_h} unless @provider_raw_output.nil? hash['statusCategory'] = @status_category unless @status_category.nil? hash['statusCode'] = @status_code unless @status_code.nil? hash['statusCodeChangeDateTime'] = @status_code_change_date_time unless @status_code_change_date_time.nil? hash end |