Class: Io::Flow::V0::Models::DutyItemApprovalForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::DutyItemApprovalForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#effective_at ⇒ Object
readonly
Returns the value of attribute effective_at.
-
#producer_key ⇒ Object
readonly
Returns the value of attribute producer_key.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#trade_agreement_certifier_key ⇒ Object
readonly
Returns the value of attribute trade_agreement_certifier_key.
-
#trade_agreement_key ⇒ Object
readonly
Returns the value of attribute trade_agreement_key.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ DutyItemApprovalForm
constructor
A new instance of DutyItemApprovalForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ DutyItemApprovalForm
Returns a new instance of DutyItemApprovalForm.
40491 40492 40493 40494 40495 40496 40497 40498 40499 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40491 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:status, :trade_agreement_key, :trade_agreement_certifier_key, :producer_key, :effective_at], 'DutyItemApprovalForm') @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::DutyItemApprovalStatus) ? x : ::Io::Flow::V0::Models::DutyItemApprovalStatus.apply(x)) @trade_agreement_key = HttpClient::Preconditions.assert_class('trade_agreement_key', opts.delete(:trade_agreement_key), String) @trade_agreement_certifier_key = HttpClient::Preconditions.assert_class('trade_agreement_certifier_key', opts.delete(:trade_agreement_certifier_key), String) @producer_key = HttpClient::Preconditions.assert_class('producer_key', opts.delete(:producer_key), String) @effective_at = HttpClient::Preconditions.assert_class('effective_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:effective_at)), DateTime) end |
Instance Attribute Details
#effective_at ⇒ Object (readonly)
Returns the value of attribute effective_at.
40489 40490 40491 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40489 def effective_at @effective_at end |
#producer_key ⇒ Object (readonly)
Returns the value of attribute producer_key.
40489 40490 40491 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40489 def producer_key @producer_key end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
40489 40490 40491 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40489 def status @status end |
#trade_agreement_certifier_key ⇒ Object (readonly)
Returns the value of attribute trade_agreement_certifier_key.
40489 40490 40491 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40489 def trade_agreement_certifier_key @trade_agreement_certifier_key end |
#trade_agreement_key ⇒ Object (readonly)
Returns the value of attribute trade_agreement_key.
40489 40490 40491 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40489 def trade_agreement_key @trade_agreement_key end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
40505 40506 40507 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40505 def copy(incoming={}) DutyItemApprovalForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
40509 40510 40511 40512 40513 40514 40515 40516 40517 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40509 def to_hash { :status => status.value, :trade_agreement_key => trade_agreement_key, :trade_agreement_certifier_key => trade_agreement_certifier_key, :producer_key => producer_key, :effective_at => effective_at } end |
#to_json ⇒ Object
40501 40502 40503 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40501 def to_json JSON.dump(to_hash) end |