Class: Files::As2OutgoingMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/as2_outgoing_message.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ As2OutgoingMessage

Returns a new instance of As2OutgoingMessage.



7
8
9
10
# File 'lib/files.com/models/as2_outgoing_message.rb', line 7

def initialize(attributes = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/as2_outgoing_message.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/as2_outgoing_message.rb', line 5

def options
  @options
end

Class Method Details

.all(params = {}, options = {}) ⇒ Object



166
167
168
# File 'lib/files.com/models/as2_outgoing_message.rb', line 166

def self.all(params = {}, options = {})
  list(params, options)
end

.list(params = {}, options = {}) ⇒ Object

Parameters:

cursor - string - Used for pagination.  Send a cursor value to resume an existing list from the point at which you left off.  Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
per_page - int64 - Number of records to show per page.  (Max: 10,000, 1,000 or less is recommended).
as2_partner_id - int64 - As2 Partner ID.  If provided, will return message specific to that partner.


156
157
158
159
160
161
162
163
164
# File 'lib/files.com/models/as2_outgoing_message.rb', line 156

def self.list(params = {}, options = {})
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String)
  raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: as2_partner_id must be an Integer") if params.dig(:as2_partner_id) and !params.dig(:as2_partner_id).is_a?(Integer)

  List.new(As2OutgoingMessage, params) do
    Api.send_request("/as2_outgoing_messages", :get, params, options)
  end
end

Instance Method Details

#activity_logObject

string - JSON Structure of the activity log.



38
39
40
# File 'lib/files.com/models/as2_outgoing_message.rb', line 38

def activity_log
  @attributes[:activity_log]
end

#as2_fromObject

string - AS2 FROM



63
64
65
# File 'lib/files.com/models/as2_outgoing_message.rb', line 63

def as2_from
  @attributes[:as2_from]
end

#as2_partner_idObject

int64 - Id of the AS2 Partner associated with this message.



18
19
20
# File 'lib/files.com/models/as2_outgoing_message.rb', line 18

def as2_partner_id
  @attributes[:as2_partner_id]
end

#as2_station_idObject

int64 - Id of the AS2 Station associated with this message.



23
24
25
# File 'lib/files.com/models/as2_outgoing_message.rb', line 23

def as2_station_id
  @attributes[:as2_station_id]
end

#as2_toObject

string - AS2 TO



58
59
60
# File 'lib/files.com/models/as2_outgoing_message.rb', line 58

def as2_to
  @attributes[:as2_to]
end

#attachment_filenameObject

string - Filename of the file being sent.



78
79
80
# File 'lib/files.com/models/as2_outgoing_message.rb', line 78

def attachment_filename
  @attributes[:attachment_filename]
end

#body_sizeObject

string - Encrypted Payload Body Size



73
74
75
# File 'lib/files.com/models/as2_outgoing_message.rb', line 73

def body_size
  @attributes[:body_size]
end

#created_atObject

date-time - Message creation date/time



83
84
85
# File 'lib/files.com/models/as2_outgoing_message.rb', line 83

def created_at
  @attributes[:created_at]
end

#encrypted_uriObject

string - URL to download the encrypted signed smime that is to sent as AS2 body



143
144
145
# File 'lib/files.com/models/as2_outgoing_message.rb', line 143

def encrypted_uri
  @attributes[:encrypted_uri]
end

#http_headersObject

object - HTTP Headers sent with this message.



33
34
35
# File 'lib/files.com/models/as2_outgoing_message.rb', line 33

def http_headers
  @attributes[:http_headers]
end

#http_response_codeObject

string - HTTP Response Code received for this message



88
89
90
# File 'lib/files.com/models/as2_outgoing_message.rb', line 88

def http_response_code
  @attributes[:http_response_code]
end

#http_response_headersObject

object - HTTP Headers received for this message.



93
94
95
# File 'lib/files.com/models/as2_outgoing_message.rb', line 93

def http_response_headers
  @attributes[:http_response_headers]
end

#idObject

int64 - Id of the AS2 Partner.



13
14
15
# File 'lib/files.com/models/as2_outgoing_message.rb', line 13

def id
  @attributes[:id]
end

#mdn_message_id_matchedObject

boolean - MDN message id matched?



113
114
115
# File 'lib/files.com/models/as2_outgoing_message.rb', line 113

def mdn_message_id_matched
  @attributes[:mdn_message_id_matched]
end

#mdn_mic_matchedObject

boolean - MDN MIC matched?



118
119
120
# File 'lib/files.com/models/as2_outgoing_message.rb', line 118

def mdn_mic_matched
  @attributes[:mdn_mic_matched]
end

#mdn_processing_successObject

boolean - MDN disposition indicate a successful processing?



123
124
125
# File 'lib/files.com/models/as2_outgoing_message.rb', line 123

def mdn_processing_success
  @attributes[:mdn_processing_success]
end

#mdn_receivedObject

boolean - Did the partner give a response body?



98
99
100
# File 'lib/files.com/models/as2_outgoing_message.rb', line 98

def mdn_received
  @attributes[:mdn_received]
end

#mdn_response_uriObject

string - URL to download the http response body



148
149
150
# File 'lib/files.com/models/as2_outgoing_message.rb', line 148

def mdn_response_uri
  @attributes[:mdn_response_uri]
end

#mdn_signature_verifiedObject

boolean - MDN signature verified?



108
109
110
# File 'lib/files.com/models/as2_outgoing_message.rb', line 108

def mdn_signature_verified
  @attributes[:mdn_signature_verified]
end

#mdn_validObject

boolean - Is the response in MDN format?



103
104
105
# File 'lib/files.com/models/as2_outgoing_message.rb', line 103

def mdn_valid
  @attributes[:mdn_valid]
end

#message_idObject

string - AS2 Message Id



68
69
70
# File 'lib/files.com/models/as2_outgoing_message.rb', line 68

def message_id
  @attributes[:message_id]
end

#micObject

string - AS2 Message Integrity Check SHA1



48
49
50
# File 'lib/files.com/models/as2_outgoing_message.rb', line 48

def mic
  @attributes[:mic]
end

#mic_sha_256Object

string - AS2 Message Integrity Check SHA256



53
54
55
# File 'lib/files.com/models/as2_outgoing_message.rb', line 53

def mic_sha_256
  @attributes[:mic_sha_256]
end

#processing_resultObject

string - Result of processing.



43
44
45
# File 'lib/files.com/models/as2_outgoing_message.rb', line 43

def processing_result
  @attributes[:processing_result]
end

#raw_uriObject

string - URL to download the original file contents



128
129
130
# File 'lib/files.com/models/as2_outgoing_message.rb', line 128

def raw_uri
  @attributes[:raw_uri]
end

#smime_signed_uriObject

string - URL to download the file contents as smime with signature



138
139
140
# File 'lib/files.com/models/as2_outgoing_message.rb', line 138

def smime_signed_uri
  @attributes[:smime_signed_uri]
end

#smime_uriObject

string - URL to download the file contents encoded as smime



133
134
135
# File 'lib/files.com/models/as2_outgoing_message.rb', line 133

def smime_uri
  @attributes[:smime_uri]
end

#uuidObject

string - UUID assigned to this message.



28
29
30
# File 'lib/files.com/models/as2_outgoing_message.rb', line 28

def uuid
  @attributes[:uuid]
end