nt.com/services/OrdersService.updateOrder.json',
create_awb_endpoint =>
'https://delivery.econt.com/services/OrdersService.createAWB.json'
}}
},
#...
],
=head1
jo::Util qw(encode decode getopt dumper);
use YAML::XS qw(Dump DumpFile LoadFile);
use Mojo::JSON qw(to_json);
has description => 'Manage products on the command line';
has usage => sub { shift->ex
from' . $/ . $/ . $self->usage)
&& return;
$file =~ /\.(ya?ml|json)$/
|| STDERR->say(
'Only YAML and json files are supported right now.' . $/ . $/ . $self->usage)
&& retu
p_type => $_->{p_type},
# The data is NOT encoded to UTF8 by to_json
properties => to_json($_->{properties})});
} unless $db->select('products', ['id'], {alias => $_->{
e 'Slovo::Controller', -signatures;
use Mojo::Util qw(dumper decode );
use Mojo::JSON qw(true false from_json to_json);
# POST /poruchki
# Create and store a new order.
# Invoked via OpenAPI by cart
shop->{crupdate_order_endpoint} =>
{'Content-Type' => 'application/json', Authorization => $shop->{private_key}},
json => $_order_struct
)->res;
$c->debug(
'req_url: ' => $sho
uct:' => $_order_struct
);
$c->debug('$eco_res->json:' => $eco_res->json);
if ($eco_res->is_success) {
$o->{deliverer_id} = $eco_res->json->{id} + 0;
$o->{created_at} = $o->{tstamp} =
properties => {-like => '%"images"%'} #only variants which have images
},
limit => 35
})->each(sub {
$_->{properties} = Mojo::JSON::from_json($_->{properties});
});
}
1;
Plugin::Prodan;
use feature ':5.26';
use Mojo::Base 'Mojolicious::Plugin', -signatures;
use Mojo::JSON qw(true false);
our $AUTHORITY = 'cpan:BEROV';
our $VERSION = '0.05';
has app => sub { Slovo-
rResponse'}}}
},
);
}
# Returns description as a perl structure of objects defined for the json API
# to be added to the /definitions of our OpenAPI
sub _definitions {
return (
ListOfPoru
pdate_order_endpoint}
//= 'https://delivery-demo.econt.com/services/OrdersService.updateOrder.json';
# Ендпойнта на услугата за създаване или редактира